diff options
author | Alexey Shvetsov <alexxy@gentoo.org> | 2012-04-16 21:09:32 +0000 |
---|---|---|
committer | Alexey Shvetsov <alexxy@gentoo.org> | 2012-04-16 21:09:32 +0000 |
commit | 9117689b5acb2a36b36432e0e6903c477efde7c1 (patch) | |
tree | fbb7417a7642cda9e7ee8fdda4154dc18e9c6273 /sys-block | |
parent | Marking bchunk-1.2.0-r1 ppc for bug 394053 (diff) | |
download | historical-9117689b5acb2a36b36432e0e6903c477efde7c1.tar.gz historical-9117689b5acb2a36b36432e0e6903c477efde7c1.tar.bz2 historical-9117689b5acb2a36b36432e0e6903c477efde7c1.zip |
[sys-block/lio-utils] Initial import
Package-Manager: portage-2.2.0_alpha100/cvs/Linux x86_64
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/lio-utils/ChangeLog | 11 | ||||
-rw-r--r-- | sys-block/lio-utils/Manifest | 26 | ||||
-rw-r--r-- | sys-block/lio-utils/files/snmp-makefile.patch | 22 | ||||
-rw-r--r-- | sys-block/lio-utils/files/target.initd | 137 | ||||
-rw-r--r-- | sys-block/lio-utils/files/tools-makefile.patch | 8 | ||||
-rw-r--r-- | sys-block/lio-utils/lio-utils-9999.ebuild | 99 | ||||
-rw-r--r-- | sys-block/lio-utils/metadata.xml | 8 | ||||
-rw-r--r-- | sys-block/targetcli/Manifest | 23 |
8 files changed, 334 insertions, 0 deletions
diff --git a/sys-block/lio-utils/ChangeLog b/sys-block/lio-utils/ChangeLog new file mode 100644 index 000000000000..1b360610cf6d --- /dev/null +++ b/sys-block/lio-utils/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for sys-block/lio-utils +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/lio-utils/ChangeLog,v 1.1 2012/04/16 21:09:32 alexxy Exp $ + +*lio-utils-9999 (16 Apr 2012) + + 16 Apr 2012; Alexey Shvetsov <alexxy@gentoo.org> +files/snmp-makefile.patch, + +files/target.initd, +files/tools-makefile.patch, +lio-utils-9999.ebuild, + +metadata.xml: + [sys-block/lio-utils] Initial import + diff --git a/sys-block/lio-utils/Manifest b/sys-block/lio-utils/Manifest new file mode 100644 index 000000000000..29e2e4c4e78c --- /dev/null +++ b/sys-block/lio-utils/Manifest @@ -0,0 +1,26 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX snmp-makefile.patch 615 RMD160 bbd6c2a38bf89b7f41932359fada74531f72533f SHA1 f362e04dad801ef016c1442da795c81d3d1895e0 SHA256 f03463d4577faacb7a8f8974c8ab00555772cf9746132dba848009a1b702241f +AUX target.initd 3283 RMD160 fc208d7682ab2795af06a1533f13f82d47446aad SHA1 567d36dba3d56a1ffcd4a77bff7ab610b766d2b0 SHA256 f45640df1e7d23f9730d0a983a0dca620eb60cc080555d8896586ffd4a130025 +AUX tools-makefile.patch 280 RMD160 191099d43bad165261bb7b3c5a05c5b8256efb7a SHA1 950f9d3c3e2e5bdb12ede7a7c9159b9e562bffe9 SHA256 99c7b1e467f95b70781c0e43d63d2f3b1ac0aac75662c55009970652255e6fd9 +EBUILD lio-utils-9999.ebuild 2498 RMD160 32167401bead94b1dfadcbea6302e0d82fcc2708 SHA1 35395992893457866e5f3c4078a0b1f56ba68810 SHA256 11e6152af9693adeca67746c22072af7076448a0395f4059f8e941f9ad9fce0d +MISC ChangeLog 454 RMD160 1a70c9802ac7f9c4758db7b7540b1be658ee71d5 SHA1 0164df2f754ceb1110754a0dc762e12ad772f186 SHA256 dc3f960ec738f1fbb7cfcd8d462788b11fbc78f4d770d609d969946d210aafb0 +MISC metadata.xml 245 RMD160 bb90c6c2a534f0a7f72a472afdcfe4f2521b37c3 SHA1 d36c31899ea7f31a40aeafbf07d33517a701a1db SHA256 19e93016c44ea06640369073a79690cddca798d46f95351caa3d18adf6680715 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iQIcBAEBCAAGBQJPjIqOAAoJEOf+E+/4L5LmIzcP/3urhdJQlJUqk4Dj6wi1H2F6 +6gmLdFvDLvIaaTZ7OJ/xus9clAuTiWaGcrMS0SfIKz4cMCbMiYK8YzKUZodZz3KP +m8vhYGBH0Mb/PavNbEdZe6TOvMXBWKzK9uCUxZxxWWPIpMb1JhwiulDmd9KH1TtC +b6gn4kc9pkSEuncBzeSV5Np/UE6tm8rskcQEBCYagAXmTdx0uul6Y1i0/Kk3Kyz9 +9N8e4zBNu14dOc4A806zPxLCndJCKhILljThx9Uo2FIr9zryZnWxXja3/X1RE9yU +7kVzXgvYFgc9AGLJELSEsffgx9cJgjggj+rezbKO4bzcq7cMnZsBx/VhxibxV94j +h+fDmwjwhs7KAILojQDSd2Ipb8XUI5boZpgrVC5NgcG/ptoiavqqFl7QIkZebpnr +pKrJkZfdpNgqh0kygNZiTGhuxkw8nPP07aHjIJXjN1asVlvuDmxnG7nx5O93JQ7U +Yd6p68ywZDiqY+zMmOIO2b8hasJ/MsLOp0M1U6yF3hzZ97MBdLQBqSNcl/AEbX2p +3XbrIkxPJMtpT9R1F6AogDt1zCOlTcerSlIL0gSzjlSzdTIMT9igg8edilseLvcC +QABaEUb+p636mpnmlYJTkgfOW3PXolnDFc1E38kts+7fxrgT5TVT0oQXTxOj1z4X +pNT/A5t1EuUjAvTXuLs6 +=DDD9 +-----END PGP SIGNATURE----- diff --git a/sys-block/lio-utils/files/snmp-makefile.patch b/sys-block/lio-utils/files/snmp-makefile.patch new file mode 100644 index 000000000000..f9301ae7912b --- /dev/null +++ b/sys-block/lio-utils/files/snmp-makefile.patch @@ -0,0 +1,22 @@ +--- mib-modules/Makefile.old 2011-06-21 00:26:30.000000000 +0400 ++++ mib-modules/Makefile 2011-06-21 00:29:28.000000000 +0400 +@@ -18,8 +18,8 @@ + iscsiAuthData.o + + CC = gcc +-CFLAGS = -I$(INCLDIR) -I$(INCLDIR)/agent -I$(INCLDIR)/agent/mibgroup -shared -fPIC +-CFLAGS += -I../include -Wall -Werror ++INCLUDES = -I$(INCLDIR) -I$(INCLDIR)/agent -I$(INCLDIR)/agent/mibgroup ++INCLUDES += -I../include + #CFLAGS +=$(AUTO_CFLAGS) + + LD = gcc -shared +@@ -29,7 +29,7 @@ + all: $(TARG) + + %.o: %.c *.h +- $(CC) $(CFLAGS) -o $@ -c $< ++ $(CC) -fPIC $(INCLUDES) $(CFLAGS) -o $@ -c $< + + $(TARG): $(OBJS) + $(LD) -o $@ $(OBJS) diff --git a/sys-block/lio-utils/files/target.initd b/sys-block/lio-utils/files/target.initd new file mode 100644 index 000000000000..4edde81cf394 --- /dev/null +++ b/sys-block/lio-utils/files/target.initd @@ -0,0 +1,137 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/lio-utils/files/target.initd,v 1.1 2012/04/16 21:09:32 alexxy Exp $ + +description="Linux-iSCSI.org target" + +depend() { + after modules + use net +} + +MODNAME="target_core_mod" + +TCM_CFS_DIR="/sys/kernel/config/target/core" +LIO_CFS_DIR="/sys/kernel/config/target/iscsi" +TCM_NODE="/usr/sbin/tcm_node" +LIO_NODE="/usr/sbin/lio_node" +TCM_FABRIC="/usr/sbin/tcm_fabric" +CONFIGFS_SCRIPT_DIR="/etc/target" +TCM_CONFIGFS_SCRIPT="/etc/target/tcm_start.sh" +LIO_CONFIGFS_SCRIPT="/etc/target/lio_start.sh" +TCM_CORE_MODULE="target_core_mod" +TCM_CORE_IO_MODULES="target_core_iblock target_core_file target_core_pscsi" +FABRICS_MODULES="tcm_fc tcm_loop ib_srpt" +LIO_MODULE="iscsi_target_mod" + +checkconfig() { + if ! modinfo ${TCM_CORE_MODULE} > /dev/null 2>&1 ; then + eerror "Target Core modules not found!" + return 1 + elif ! modinfo ${LIO_MODULE} > /dev/null 2>&1 ; then + eerror "Linux iSCSI modules not found!" + return 1 + elif [ ! -f ${TCM_CONFIGFS_SCRIPT} ]; then + eerror "${TCM_CONFIGFS_SCRIPT} does not exist. run targetcli to configure your target!" + return 1 + elif [ ! -f ${LIO_CONFIGFS_SCRIPT} ]; then + eerror "${LIO_CONFIGFS_SCRIPT} does not exist. run targetcli to configure your target!" + return 1 + fi +} + +fabrics_start() { + ebegin "Starting Targets: " + for module in ${FABRICS_MODULES}; do + if modinfo $module > /dev/null 2>&1 ; then + ebegin "Loading ${module}" + modprobe ${module} + eend $? + fi + done + for cfgscript in ${CONFIGFS_SCRIPT_DIR}/*.sh; do + if [ ! -f ${cfgscript} ]; then + continue + fi + # target core is handled in tcm_start + if [ ${cfgscript} == ${TCM_CONFIGFS_SCRIPT} ]; then + continue + fi + # iscsi-target fabric module is handled in lio_target_start + if [ ${cfgscript} == ${LIO_CONFIGFS_SCRIPT} ]; then + continue + fi + ebegin "Calling ConfigFS script $cfgscript: " + sh ${cfgscript} > /dev/null 2>&1 + eend $? + done + eend $? +} + +lio_target_start() { + ebegin "Loading iSCSI target modules: ${LIO_MODULE}" + modprobe ${LIO_MODULE} + eend $? + ebegin "Configuring iSCSI target iscsi_target_mod" + sh ${LIO_CONFIGFS_SCRIPT} > /dev/null 2>&1 + eend $? +} + +tcm_start() { + ebegin "Loading Target Core modules : ${TCM_CORE_MODULE}" + modprobe ${TCM_CORE_MODULE} + eend $? + ebegin "Loading Target Core backend modules: " + for module in ${TCM_CORE_IO_MODULES} ; do + ebegin "${module}" + modprobe ${module} + eend $? + done + eend $? + ebegin "Calling ConfigFS script $TCM_CONFIGFS_SCRIPT for target_core_mod" + sh ${TCM_CONFIGFS_SCRIPT} > /dev/null 2>&1 + eend $? +} + +lio_target_stop() { + ebegin "Unload Linux-iSCSI.org Fabric module" + ${LIO_NODE} --unload + eend $? +} + +fabrics_stop() { + ebegin "Unloading misc fabric modules: " + ${TCM_FABRIC} --unloadall + eend $? +} + +tcm_stop() { + ebegin "Unloading Target Core modules: " + $TCM_NODE --unload + eend $? +} + +start() { + checkconfig + tcm_start + lio_target_start + fabrics_start +} + +stop() { + lio_target_stop + fabrics_stop + tcm_stop +} + +status() { + if [[ -d ${TCM_CFS_DIR} && -d ${LIO_CFS_DIR} ]]; then + einfo "Target core mode status" + ${TCM_NODE} --listhbas + einfo "Linux iSCSI status" + ${LIO_NODE} --listendpoints + else + einfo "Target not started (yet)" + fi +} diff --git a/sys-block/lio-utils/files/tools-makefile.patch b/sys-block/lio-utils/files/tools-makefile.patch new file mode 100644 index 000000000000..d9ee0400d215 --- /dev/null +++ b/sys-block/lio-utils/files/tools-makefile.patch @@ -0,0 +1,8 @@ +--- tools/Makefile 2011-06-20 23:25:07.000000000 +0400 ++++ tools/Makefile 2011-06-21 00:06:26.000000000 +0400 +@@ -12,4 +12,5 @@ + rm -f $(ISCSI_NAME_OBJS) $(ISCSI_NAME) + + install: ++ mkdir -p $(DESTDIR)/usr/sbin + install -m 0755 $(ISCSI_NAME) $(DESTDIR)/usr/sbin/iscsi-name diff --git a/sys-block/lio-utils/lio-utils-9999.ebuild b/sys-block/lio-utils/lio-utils-9999.ebuild new file mode 100644 index 000000000000..bc17df321140 --- /dev/null +++ b/sys-block/lio-utils/lio-utils-9999.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/lio-utils/lio-utils-9999.ebuild,v 1.1 2012/04/16 21:09:32 alexxy Exp $ + +EAPI=4 + +EGIT_REPO_URI="git://linux-iscsi.org/lio-utils.git" +PYTHON_DEPEND="2" +RESTRICT_PYTHON_ABIS="3.*" +SUPPORT_PYTHON_ABIS="1" + +inherit eutils distutils git-2 python linux-info + +DESCRIPTION="Tools for controlling target_core_mod/ConfigFS" +HOMEPAGE="http://linux-iscsi.org/" +SRC_URI="" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" +IUSE="snmp" + +DEPEND="snmp? ( net-analyzer/net-snmp )" +RDEPEND="${DEPEND}" + +CONFIG_CHECK="~TARGET_CORE" + +src_prepare(){ + local module + + for module in tcm-py lio-py; do + cd ${module} + distutils_src_prepare + cd .. + done + epatch "${FILESDIR}"/tools-makefile.patch + epatch "${FILESDIR}"/snmp-makefile.patch +} + +src_compile(){ + local module + + for module in tcm-py lio-py; do + cd ${module} + distutils_src_compile + cd .. + done + cd tools/ + emake || die "emake failed" + cd .. + if use snmp; then + cd mib-modules/ + emake || die "emake snmp failed" + cd .. + fi +} + +src_install(){ + local module + + for module in tcm-py lio-py; do + cd ${module} + distutils_src_install + cd .. + done + cd tools/ + emake DESTDIR="${ED}" install || die "emake install failed" + cd .. + + symlink_to_sbin(){ + local ver=$(python_get_version) sitedir="$(python_get_sitedir)" + ln -s "${sitedir}"/lio_dump.py \ + "${ED}"/usr/sbin/lio_dump-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/lio_dump.py + ln -s "${sitedir}"/lio_node.py \ + "${ED}"/usr/sbin/lio_node-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/lio_node.py + ln -s "${sitedir}"/tcm_dump.py \ + "${ED}"/usr/sbin/tcm_dump-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/tcm_dump.py + ln -s "${sitedir}"/tcm_node.py \ + "${ED}"/usr/sbin/tcm_node-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/tcm_node.py + ln -s "${sitedir}"/tcm_fabric.py \ + "${ED}"/usr/sbin/tcm_fabric-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/tcm_fabric.py + } + python_execute_function --action-message "Making symlinks to /usr/sbin" symlink_to_sbin + python_generate_wrapper_scripts "${ED}"/usr/sbin/{lio_dump,lio_node,tcm_node,tcm_dump,tcm_fabric} + + if use snmp; then + cd mib-modules/ + emake DESTDIR="${ED}" install || die "emake install snmp failed" + cd .. + fi + + emake DESTDIR="${ED}" conf_install || die "emake conf_install failed" + newinitd "${FILESDIR}/target.initd" target +} diff --git a/sys-block/lio-utils/metadata.xml b/sys-block/lio-utils/metadata.xml new file mode 100644 index 000000000000..ed404319e336 --- /dev/null +++ b/sys-block/lio-utils/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>cluster</herd> +<longdescription> + Tools for controlling target_core_mod/ConfigFS +</longdescription> +</pkgmetadata> diff --git a/sys-block/targetcli/Manifest b/sys-block/targetcli/Manifest new file mode 100644 index 000000000000..0a9b629de8bf --- /dev/null +++ b/sys-block/targetcli/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +EBUILD targetcli-9999.ebuild 668 RMD160 d6fb754766533e053c76da81518de3c6690c30d6 SHA1 6906e58b173c9d468beeec3223f282cb83d66bc6 SHA256 980d3ef6fcd3036a5926aebe5b3181ef53f634f266a87f998bd94196858c3ff6 +MISC ChangeLog 374 RMD160 7dba9b4eec4f2abdb5aa2a4494b870399421e067 SHA1 2acb04f8b9de922d126cd45861f88e65cab6590d SHA256 b76466426bf0ef3cc264d9d49f080e7c2c3a6b057621b48ed648478e1149cf0f +MISC metadata.xml 277 RMD160 14b4359ec46d6cd80e8f33b933e992dd6101a172 SHA1 76e03f2ea77df8b2e132e2637d767d376ffe3e9d SHA256 84fb99ed27c7a5d76f3061cf6ed8527d4c641bc634e2fc6ec326847d6e088142 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iQIcBAEBCAAGBQJPjIulAAoJEOf+E+/4L5Lm6CUP/1KSDrt+VmnS/5tbkK9i3SYs +EcBN9oLtOe5f5WOMTLW2i+N+F3HZxW3AoUclPV1tDD2w8+E/bcBYNlA3Y3oTB1/P +DezDyYd3VFMAgKSc0HWEnLm9spxCRXeWJM3bBey1Hkz16zcpGtGTnpTtvBmKNOGl +dSA5hR3zYzRGCAHY9aalTchaDbt73YKMyi7KQrQvpWObuzELufIhXGue2LHbsUfy +FkAhIk+iKiYCzZx8U8Mz1TeRm39RojsrZhsJXkpx+WOMQMA/pAfGHzk6Tu6Y1Zys +gad4F95QHBiz472NIOXqhFWkGgFJmH1aezziniARO9bvL60dQNWzVpXh8D9jxi6e +azjyCtTtgWXGjUR5DnIxdjXibYPfuUtEWcZ8TTxaT0jXe7FhJhV5mRddnw13TqZe +U7Ti1RpsMx/1XMYXHELbWRC2nqHeZFopkN+46j3GUMOj9VEKudza6+kg8T7j9BAq +nz0faOt9kqLIQY27OvxtFgV28LBj4OMq6TuO60cNauEQxUqxVkS9CM9oaxIrYA9f +cp+ftH75OjGc7H2rnPDIvCdLdCCZ6ApkyghF/nlpqCh5CUDGnnezzb9ZussFYuo9 +4q1eRanlCKvlWGq9VEWeFi5PCQSo9Pj3hllTDcKDv3+CrUE1h43kfkIjIshhoL1K ++kt2u+eoNCJBPyh5Wu3I +=ttfR +-----END PGP SIGNATURE----- |