diff options
author | Mike Doty <kingtaco@gentoo.org> | 2008-03-25 02:33:04 +0000 |
---|---|---|
committer | Mike Doty <kingtaco@gentoo.org> | 2008-03-25 02:33:04 +0000 |
commit | 95d13fdbc722792e7373425fd8527adbd9e1e523 (patch) | |
tree | 315e345c01687e5449c5162ec93a4f7b1a98174b /sys-block/open-iscsi | |
parent | Version bump. https://savannah.gnu.org/forum/forum.php?forum_id=5248 (diff) | |
download | historical-95d13fdbc722792e7373425fd8527adbd9e1e523.tar.gz historical-95d13fdbc722792e7373425fd8527adbd9e1e523.tar.bz2 historical-95d13fdbc722792e7373425fd8527adbd9e1e523.zip |
adding open-iscsi-2.0.868_rc1.ebuild and related files thanks to Craig <craig -at- haquarter.de> Bug 196096
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sys-block/open-iscsi')
-rw-r--r-- | sys-block/open-iscsi/ChangeLog | 10 | ||||
-rw-r--r-- | sys-block/open-iscsi/Manifest | 6 | ||||
-rw-r--r-- | sys-block/open-iscsi/files/iscsid-2.0.868_rc1.conf.d | 11 | ||||
-rw-r--r-- | sys-block/open-iscsi/files/iscsid-2.0.868_rc1.init.d | 66 | ||||
-rw-r--r-- | sys-block/open-iscsi/open-iscsi-2.0.868_rc1.ebuild | 101 |
5 files changed, 192 insertions, 2 deletions
diff --git a/sys-block/open-iscsi/ChangeLog b/sys-block/open-iscsi/ChangeLog index 1d019311eac1..4defd086ce4f 100644 --- a/sys-block/open-iscsi/ChangeLog +++ b/sys-block/open-iscsi/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-block/open-iscsi # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/ChangeLog,v 1.15 2008/01/14 02:09:44 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/ChangeLog,v 1.16 2008/03/25 02:33:03 kingtaco Exp $ + +*open-iscsi-2.0.868_rc1 (25 Mar 2008) + + 25 Mar 2008; Mike Doty <kingtaco@gentoo.org> + +files/iscsid-2.0.868_rc1.conf.d, +files/iscsid-2.0.868_rc1.init.d, + +open-iscsi-2.0.868_rc1.ebuild: + adding open-iscsi-2.0.868_rc1.ebuild and related files thanks to Craig + <craig -at- haquarter.de> Bug 196096 14 Jan 2008; Robin H. Johnson <robbat2@gentoo.org> metadata.xml: Add herd per email. diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest index e3de09c8fda9..80732a7dc2ab 100644 --- a/sys-block/open-iscsi/Manifest +++ b/sys-block/open-iscsi/Manifest @@ -1,6 +1,10 @@ AUX initiatorname.iscsi 1282 RMD160 6af81c25d2704e2c6bb98ff5155de91cdbd17ff7 SHA1 2d2b0a50652772e0e3a16f3a90ef5977639b97ee SHA256 4ae558522881796f67ad5915ecf38d01e64c9d9768469847adb17405404485f3 +AUX iscsid-2.0.868_rc1.conf.d 242 RMD160 9de3648df641408c467c8c91e1fc52ae58a31b2d SHA1 27b32fcf0eca189658ccb1028d33892acd7556fb SHA256 4ca57ef1823aa9696d2be9e49da04dba00f2daa64feb8d9deb6c13f1112154f8 +AUX iscsid-2.0.868_rc1.init.d 1755 RMD160 f826a2ec99d4007193a12fb3ec3cf1defe5590a0 SHA1 f6e9099ba90215eafec6259fd7c6373aa36dad4b SHA256 1d8a89767b95e56d7bde552ba93ddc4ee541bbf384ff480b82ad7fc59f52b276 AUX iscsid-init.d 2541 RMD160 cda6eddbf72c399127d74d7aca62769789dfe98a SHA1 34554031fa23fd1d397e11d6523a77061e4ab992 SHA256 60903a4a356f2a201c978e42b6adb6233ffcda6105000e1029d93d6406dad904 DIST open-iscsi-2.0-865.12.tar.gz 230395 RMD160 b663cc4773a9ec55ce0e27de63e53d334a1e7111 SHA1 e5e6e23f7f8b624f29ffeecf80ed8332e0048718 SHA256 f6413d9d7f03bdcac76a3dfa3931a163553694937ae9170aa79ef3d91eae13e5 +DIST open-iscsi-2.0-868-rc1.tar.gz 275494 RMD160 22ed6b42710dd8bc652b3c467f7af89a12c2aa39 SHA1 7a1c84f04d2190075a125e897b717fac9a7332bb SHA256 0c3d956063e0c3d6f1d8ed12fae7e7ea109a1e5872abd362e2ab3e41674c7222 EBUILD open-iscsi-2.0.865.12.ebuild 2572 RMD160 e6ac1699d340a98cd5155789191fb1fa5a08ab11 SHA1 2e5800ab5853179b014c4693ed8449b2cd301d48 SHA256 aa3ecb705af8564581cebfaaefb0c320fec04df6838fdfd7bd53fa061a2159fc -MISC ChangeLog 3448 RMD160 e31f098f6f0dde36c6ced8f9fc8644bb3608f8d4 SHA1 7bddfc903d6e76779460010b06e6d5efa1b7d3ec SHA256 fdd6896fb5073ee08588886806bd3b46b8e3e2062adb6730c43980c2a92e3961 +EBUILD open-iscsi-2.0.868_rc1.ebuild 2625 RMD160 0f1e4ab6a8d25b203b563a233ec6244e2dbe5359 SHA1 a7d65c5575a055bccfcd665491b698c473963f0d SHA256 9e62208a5ab246712960fc8a13df9460125e507ee5cf60f3a139edd2eb64c554 +MISC ChangeLog 3752 RMD160 809e9a4a67bff1da9c69b1d3a2d7d8a691a960d8 SHA1 1955b09f737f7a90e24bd3657d42521f445553e3 SHA256 186f9975b5b8dff55244467646760b58722520895b3022aba54dbe442a3c10f8 MISC metadata.xml 228 RMD160 3f556ce6581e441eed8d8e3c233d3ca97d91f081 SHA1 9429ae1da35023f906262fd8f3ddbb3041845ba9 SHA256 2ec046a68060fea819ba22c13c58397c09600c38cf976b2ae05f3e50d14e1b42 diff --git a/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.conf.d b/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.conf.d new file mode 100644 index 000000000000..37dbbe14d04d --- /dev/null +++ b/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.conf.d @@ -0,0 +1,11 @@ +# /etc/conf.d/iscsid + +# config file to use +CONFIG_FILE=/etc/iscsi/iscsid.conf + +# you need to specify an initiatorname in the file +INITIATORNAME_FILE=/etc/iscsi/initiatorname.iscsi + +# options to pass to iscsid +OPTS="-i ${INITIATORNAME_FILE}" + diff --git a/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.init.d b/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.init.d new file mode 100644 index 000000000000..2b70d6494b4b --- /dev/null +++ b/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.init.d @@ -0,0 +1,66 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.init.d,v 1.1 2008/03/25 02:33:04 kingtaco Exp $ + +depend() { + after modules + use net +} + +checkconfig() { + if [ ! -f $CONFIG_FILE ]; then + eerror "Config file $CONFIG_FILE does not exist!" + return 1 + fi + if ! grep "^InitiatorName=iqn." ${INITIATORNAME_FILE} &>/dev/null; then + ewarn "${INITIATORNAME_FILE} should contain a string with your initiatior name." + IQN=iqn.$(date +%Y-%m).$(hostname -f | awk 'BEGIN { FS=".";}{x=NF; while (x>0) {printf $x ;x--; if (x>0) printf ".";} print ""}'):openiscsi + IQN=${IQN}-$(echo ${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM} | md5sum | sed -e "s/\(.*\) -/\1/g" -e 's/ //g') + ebegin "Creating InitiatorName ${IQN} in ${INITIATORNAME_FILE}" + echo "InitiatorName=${IQN}" >> ${INITIATORNAME_FILE} + eend $? + fi +} + +do_modules() { + msg="$1" + shift + modules="$1" + shift + opts="$@" + for m in ${modules}; do + ebegin "${msg} - ${m}" + modprobe ${opts} $m + ret=$? + eend $ret + [ $ret -ne 0 ] && return $ret + done + return 0 +} + +start() { + checkconfig + do_modules 'Loading iSCSI modules' 'scsi_transport_iscsi iscsi_tcp' + ret=$? + [ $ret -ne 0 ] && return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet --exec /usr/sbin/iscsid -- ${OPTS} + ret=$? + eend $ret + return $ret +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --signal HUP --stop --quiet --exec /usr/sbin/iscsid #--pidfile $PID_FILE + eend $? + + # ugly, but pid file is not removed by iscsid + rm -f $PID_FILE + + do_modules 'Removing iSCSI modules' 'iscsi_tcp scsi_transport_iscsi' '-r' + ret=$? + return $ret +} + diff --git a/sys-block/open-iscsi/open-iscsi-2.0.868_rc1.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.868_rc1.ebuild new file mode 100644 index 000000000000..2850f8d879b6 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.868_rc1.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-2.0.868_rc1.ebuild,v 1.1 2008/03/25 02:33:03 kingtaco Exp $ + +inherit versionator linux-mod eutils flag-o-matic + +DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.org/" +MY_PV="$(replace_all_version_separators '-')" +MY_PV="${PN}-$(replace_version_separator 1 "." $MY_PV)" +SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~ppc ~mips" +IUSE="modules utils debug" +DEPEND="virtual/libc + virtual/linux-sources" +RDEPEND="${DEPEND} + virtual/modutils + sys-apps/util-linux" + +S="${WORKDIR}/${MY_PV}" + +MODULE_NAMES_ARG="kernel/drivers/scsi:${S}/kernel" +MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${MODULE_NAMES_ARG}) libiscsi(${MODULE_NAMES_ARG})" +BUILD_TARGETS="all" +CONFIG_CHECK="CRYPTO_CRC32C" +ERROR_CFG="open-iscsi needs CRC32C support in your kernel." + +src_unpack() { + unpack ${A} + export EPATCH_OPTS="-d${S}" + if [ $KV_PATCH -lt 15 ]; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi +} + +src_compile() { + use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI + + if use modules; then + einfo "Building kernel modules" + export KSRC="${KERNEL_DIR}" + linux-mod_src_compile || die "failed to build modules" + fi + + einfo "Building fwparam_ibft" + cd "${S}"/utils/fwparam_ibft && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" + + einfo "Building userspace" + cd "${S}"/usr && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" + + if use utils; then + einfo "Building utils" + cd "${S}"/utils && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" + fi +} + +src_install() { + if use modules; then + einfo "Installing kernel modules" + export KSRC="${KERNEL_DIR}" + linux-mod_src_install + fi + + einfo "Installing userspace" + dosbin usr/iscsid usr/iscsiadm usr/iscsistart + + if use utils; then + einfo "Installing utilities" + dosbin utils/iscsi-iname utils/iscsi_discovery + fi + + einfo "Installing docs" + doman doc/*[1-8] + dodoc README THANKS + docinto test + dodoc test/* + + einfo "Installing configuration" + insinto /etc/iscsi + doins etc/iscsid.conf + doins "${FILESDIR}"/initiatorname.iscsi + insinto /etc/conf.d + newins "${FILESDIR}"/iscsid-${PV}.conf.d iscsid + newinitd "${FILESDIR}"/iscsid-${PV}.init.d iscsid + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsi/iscsid.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst +} |