diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2006-03-07 08:26:46 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2006-03-07 08:26:46 +0000 |
commit | badea8bc5b76cdc55fc19a7ee4db9e9dc9ef2dff (patch) | |
tree | 4adf6df976a571ac5a62dc9c2e76a9d411c9a052 | |
parent | Punted old version (diff) | |
download | gentoo-2-badea8bc5b76cdc55fc19a7ee4db9e9dc9ef2dff.tar.gz gentoo-2-badea8bc5b76cdc55fc19a7ee4db9e9dc9ef2dff.tar.bz2 gentoo-2-badea8bc5b76cdc55fc19a7ee4db9e9dc9ef2dff.zip |
New upstream snapshots. Not for production use at all!.
(Portage version: 2.1_pre5-r2)
-rw-r--r-- | sys-block/open-iscsi/ChangeLog | 12 | ||||
-rw-r--r-- | sys-block/open-iscsi/Manifest | 27 | ||||
-rw-r--r-- | sys-block/open-iscsi/files/digest-open-iscsi-1.0.490 | 9 | ||||
-rw-r--r-- | sys-block/open-iscsi/files/digest-open-iscsi-1.0.490-r1 | 9 | ||||
-rw-r--r-- | sys-block/open-iscsi/files/digest-open-iscsi-1.0.514 | 3 | ||||
-rw-r--r-- | sys-block/open-iscsi/files/iscsid-init.d | 35 | ||||
-rw-r--r-- | sys-block/open-iscsi/files/open-iscsi-485-out.state.patch | 19 | ||||
-rw-r--r-- | sys-block/open-iscsi/open-iscsi-1.0.490-r1.ebuild | 124 | ||||
-rw-r--r-- | sys-block/open-iscsi/open-iscsi-1.0.490.ebuild | 123 | ||||
-rw-r--r-- | sys-block/open-iscsi/open-iscsi-1.0.514.ebuild | 105 |
10 files changed, 451 insertions, 15 deletions
diff --git a/sys-block/open-iscsi/ChangeLog b/sys-block/open-iscsi/ChangeLog index 5fb5634d0701..9f4dd70ff18a 100644 --- a/sys-block/open-iscsi/ChangeLog +++ b/sys-block/open-iscsi/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sys-block/open-iscsi # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/ChangeLog,v 1.8 2006/02/02 10:08:03 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/ChangeLog,v 1.9 2006/03/07 08:26:46 robbat2 Exp $ + +*open-iscsi-1.0.514 (07 Mar 2006) +*open-iscsi-1.0.490-r1 (07 Mar 2006) +*open-iscsi-1.0.490 (07 Mar 2006) + + 07 Mar 2006; Robin H. Johnson <robbat2@gentoo.org> + +files/open-iscsi-485-out.state.patch, files/iscsid-init.d, + +open-iscsi-1.0.490.ebuild, +open-iscsi-1.0.490-r1.ebuild, + +open-iscsi-1.0.514.ebuild: + New upstream snapshots. Not for production use at all!. 02 Feb 2006; Robin H. Johnson <robbat2@gentoo.org> open-iscsi-0.5.485.ebuild: diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest index 9487808ba887..ddae7c8bf94b 100644 --- a/sys-block/open-iscsi/Manifest +++ b/sys-block/open-iscsi/Manifest @@ -19,12 +19,24 @@ SHA256 7432ac473f806b4dba6bacff272cb5e224d04d23afd0aa1a96aafd67dd0a4775 files/di MD5 9878fff8ccf7d43ac07c315700a91c04 files/digest-open-iscsi-0.5.485 256 RMD160 9ee348cf082366f049d35080b09e42185046f38c files/digest-open-iscsi-0.5.485 256 SHA256 f34b16ca4e8890ddd22cee025968c95d455343d8b50ee8d974af98a248f5dde3 files/digest-open-iscsi-0.5.485 256 +MD5 dd5f0ac7aef8142ae201c1a511f54a82 files/digest-open-iscsi-1.0.490 810 +RMD160 be8c7c073541c54293606f625b8c91c6e7889ded files/digest-open-iscsi-1.0.490 810 +SHA256 8b6698c20b3c885fa8aa9de393dda259df923ae9b9b35fc071896378d9e59b17 files/digest-open-iscsi-1.0.490 810 +MD5 c6ea6d101c83448607b5cbf07b17e845 files/digest-open-iscsi-1.0.490-r1 813 +RMD160 df0a3952f06f68b93d353df4d827527e4678d6a1 files/digest-open-iscsi-1.0.490-r1 813 +SHA256 19e2d67b39564385e18f89d27612aa50ed0ffa5a6a7051bc069f413a4457fb45 files/digest-open-iscsi-1.0.490-r1 813 +MD5 dab20ecbb35ceb14bb8712ee7b86618c files/digest-open-iscsi-1.0.514 256 +RMD160 3e2fdcdb61c1c989ae2dc24a2261d10c74546034 files/digest-open-iscsi-1.0.514 256 +SHA256 e9048d3e8304d25d6f797988e235412471c7af3d8582874a1a92aa79617a3eea files/digest-open-iscsi-1.0.514 256 MD5 ec58849ae9c14ba36b99b28f204bd9be files/initiatorname.iscsi 422 RMD160 c84baa808fc303916f426ff9e47e202015dec931 files/initiatorname.iscsi 422 SHA256 a0561e28b0d3af179a453cb02327f4eb9d2959823fbdadbe747cfeb8de456f01 files/initiatorname.iscsi 422 -MD5 c6ed0fd5937c35362e510fd1c4f17232 files/iscsid-init.d 2381 -RMD160 522d91a8115a82e44efdb4e4b23dbb7eb4b58971 files/iscsid-init.d 2381 -SHA256 6912514bbea1cf259ad150d71f5e1c45565dd35d77c431e72a5f050ce9823910 files/iscsid-init.d 2381 +MD5 d9816c629534b64f9d1f6ad9f738b65d files/iscsid-init.d 2541 +RMD160 17ca982c6f985d7a2b59a60e4aa57c7a67357d1c files/iscsid-init.d 2541 +SHA256 1d6e995cf81c504e9bd6e474ccd0496e9459c42d918699aa45058a88223282e6 files/iscsid-init.d 2541 +MD5 75e7cc8aa2b2cce092ff4d80ce7bbe3d files/open-iscsi-485-out.state.patch 670 +RMD160 581c941a63d17b634aa6b1da72453a644e938117 files/open-iscsi-485-out.state.patch 670 +SHA256 ae1b8c3bc518047b615a33ce16837efa82a8bfbd9503d1baa139e4c79d443fc4 files/open-iscsi-485-out.state.patch 670 MD5 1b1ec0732d8609b14f7aae743da78f49 files/r438-idbm-file-locking.diff 865 RMD160 30c4b04f2ce8aab0755fb1eb792a265a1f7cff88 files/r438-idbm-file-locking.diff 865 SHA256 6840ebe2fde815306a46a443b207e8c99beae14ea3e0558b20c51df2abfe56b2 files/r438-idbm-file-locking.diff 865 @@ -46,3 +58,12 @@ SHA256 a35e63673bea49e25382c358b2fbefcb9610ed5c3a2e5174d3f3fbe3178c080f open-isc MD5 2c44233cc6bb53542d7854487f71ca4e open-iscsi-0.5.485.ebuild 2779 RMD160 6835424370812f10b621d4dd04d9c878f1f43357 open-iscsi-0.5.485.ebuild 2779 SHA256 530a322fed206f02b4dff6de4c2938109934312b29dc3e098ffa5997c4f6ebb6 open-iscsi-0.5.485.ebuild 2779 +MD5 75585cbbb89fee7d7392409a3f8f9ae9 open-iscsi-1.0.490-r1.ebuild 3518 +RMD160 6969e1d93accad4eb8e03c67874dd1cb68f5972d open-iscsi-1.0.490-r1.ebuild 3518 +SHA256 c9611ba815665b9332abb66703162a361f2d20b8513bf9b118fe3e5f42ca8f4e open-iscsi-1.0.490-r1.ebuild 3518 +MD5 e0a3972351e7e8b0498d91f862132914 open-iscsi-1.0.490.ebuild 3524 +RMD160 bac2fd6ebdfdf4bb8511c454633a352b076a70d1 open-iscsi-1.0.490.ebuild 3524 +SHA256 f99fa7e565d92823be3c9c51aa443e5ee4745d6ab3b0382916ae3bbc0cee1617 open-iscsi-1.0.490.ebuild 3524 +MD5 cf546e87cd886dde20fe1040ae14999f open-iscsi-1.0.514.ebuild 2824 +RMD160 1121e28b7cfb0384f62a57bb5fa881f83dfebd67 open-iscsi-1.0.514.ebuild 2824 +SHA256 e9fe63073a6b018080546c7cf7c5dd1123106d9887e3c20af688c2457661894e open-iscsi-1.0.514.ebuild 2824 diff --git a/sys-block/open-iscsi/files/digest-open-iscsi-1.0.490 b/sys-block/open-iscsi/files/digest-open-iscsi-1.0.490 new file mode 100644 index 000000000000..374db99c5501 --- /dev/null +++ b/sys-block/open-iscsi/files/digest-open-iscsi-1.0.490 @@ -0,0 +1,9 @@ +MD5 9020f8e9ea4cb244e413b7d03aca0151 open-iscsi-1.0-490.tar.gz 158204 +RMD160 36b7b12080e1dab1f578b85bb11010f2535e5b98 open-iscsi-1.0-490.tar.gz 158204 +SHA256 8cad467cdcf34858d142189107bc40765beb52f5aaeecaac889370e05d2bd650 open-iscsi-1.0-490.tar.gz 158204 +MD5 ce7835ec32474e4aa0934caa7a3281fd open-iscsi-490-add-targetname.patch.gz 2699 +RMD160 5cd09da29de1f02be9bb180cef2da66b3f80dc48 open-iscsi-490-add-targetname.patch.gz 2699 +SHA256 6946ce93fd8e55dbe76474c2cbbe3fe9717aeab500173153da1d8f1d20434d7c open-iscsi-490-add-targetname.patch.gz 2699 +MD5 9f89d96ef75d91978f756e734f3a0aa3 open-iscsi-490-boot13.patch.gz 9840 +RMD160 845e72d7b0c37cfa7a8b9f0630f184f17563ec77 open-iscsi-490-boot13.patch.gz 9840 +SHA256 83b6b463c7f9d3eb4bde68637434f6d008ab518d3735c095c2b0e7e9d5d4ab94 open-iscsi-490-boot13.patch.gz 9840 diff --git a/sys-block/open-iscsi/files/digest-open-iscsi-1.0.490-r1 b/sys-block/open-iscsi/files/digest-open-iscsi-1.0.490-r1 new file mode 100644 index 000000000000..3b300855e6e1 --- /dev/null +++ b/sys-block/open-iscsi/files/digest-open-iscsi-1.0.490-r1 @@ -0,0 +1,9 @@ +MD5 9020f8e9ea4cb244e413b7d03aca0151 open-iscsi-1.0-490.tar.gz 158204 +RMD160 36b7b12080e1dab1f578b85bb11010f2535e5b98 open-iscsi-1.0-490.tar.gz 158204 +SHA256 8cad467cdcf34858d142189107bc40765beb52f5aaeecaac889370e05d2bd650 open-iscsi-1.0-490.tar.gz 158204 +MD5 b956817eb22ebd8df2b72c565f20632c open-iscsi-490-add-targetname2.patch.gz 5110 +RMD160 485738c13d956c2e38663a89d34e3892590e28c3 open-iscsi-490-add-targetname2.patch.gz 5110 +SHA256 5eb8ebb9c34c48433e26142ce7ce2ff9af2f9d923c93bbd63ce6a069d5c56742 open-iscsi-490-add-targetname2.patch.gz 5110 +MD5 9f89d96ef75d91978f756e734f3a0aa3 open-iscsi-490-boot13.patch.gz 9840 +RMD160 845e72d7b0c37cfa7a8b9f0630f184f17563ec77 open-iscsi-490-boot13.patch.gz 9840 +SHA256 83b6b463c7f9d3eb4bde68637434f6d008ab518d3735c095c2b0e7e9d5d4ab94 open-iscsi-490-boot13.patch.gz 9840 diff --git a/sys-block/open-iscsi/files/digest-open-iscsi-1.0.514 b/sys-block/open-iscsi/files/digest-open-iscsi-1.0.514 new file mode 100644 index 000000000000..c036fec5788c --- /dev/null +++ b/sys-block/open-iscsi/files/digest-open-iscsi-1.0.514 @@ -0,0 +1,3 @@ +MD5 fc4c5bc128b8914c4adc2017396ef766 open-iscsi-1.0-514.tar.gz 172086 +RMD160 5dfd6dec0459ef795eb42019245709619d1edcdc open-iscsi-1.0-514.tar.gz 172086 +SHA256 b7c6c3d4478682f85f285f33457063b5daae07b3a1763ae05b5d7678bc51e3c6 open-iscsi-1.0-514.tar.gz 172086 diff --git a/sys-block/open-iscsi/files/iscsid-init.d b/sys-block/open-iscsi/files/iscsid-init.d index 98cffff8a138..faedcb193dfe 100644 --- a/sys-block/open-iscsi/files/iscsid-init.d +++ b/sys-block/open-iscsi/files/iscsid-init.d @@ -1,7 +1,7 @@ #!/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-init.d,v 1.3 2005/09/23 05:55:28 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/files/iscsid-init.d,v 1.4 2006/03/07 08:26:46 robbat2 Exp $ PID_FILE=/var/run/iscsid.pid CONFIG_FILE=/etc/iscsid.conf @@ -10,9 +10,11 @@ DUMP_NODE="${DUMP_DIR}/node.dump" DUMP_DISCOVERY="${DUMP_DIR}/discovery.dump" INITIATORNAME=/etc/initiatorname.iscsi DAEMON=/usr/sbin/iscsid +NAME="iSCSI initiator service" depend() { after modules + use net } checkconfig() { @@ -28,14 +30,28 @@ checkconfig() { 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 || return 1 - ebegin "Loading iSCSI modules" - modprobe scsi_transport_iscsi && modprobe iscsi_tcp + do_modules 'Loading iSCSI modules' 'scsi_transport_iscsi iscsi_tcp' ret=$? - eend $ret - [ $ret -gt 0 ] && return $ret - ebegin "Starting iSCSI initiator service" + [ $ret -ne 0 ] && return 1 + ebegin "Starting ${NAME}" start-stop-daemon --start --exec $DAEMON --quiet ret=$? eend $ret @@ -43,18 +59,15 @@ start() { } stop() { - ebegin "Stopping iSCSI initiator service" + ebegin "Stopping ${NAME}" start-stop-daemon --signal HUP --stop --quiet --exec $DAEMON #--pidfile $PID_FILE eend $? # ugly, but pid file is not removed by iscsid rm -f $PID_FILE - ebegin "Removing iSCSI modules" - modprobe -r iscsi_tcp - modprobe -r scsi_transport_iscsi + do_modules 'Removing iSCSI modules' 'iscsi_tcp scsi_transport_iscsi' '-r' ret=$? - eend $ret return $ret } diff --git a/sys-block/open-iscsi/files/open-iscsi-485-out.state.patch b/sys-block/open-iscsi/files/open-iscsi-485-out.state.patch new file mode 100644 index 000000000000..63a92ba2eea8 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-485-out.state.patch @@ -0,0 +1,19 @@ +Index: kernel/iscsi_tcp.c +=================================================================== +--- kernel/iscsi_tcp.c (revision 485) ++++ kernel/iscsi_tcp.c (working copy) +@@ -1240,13 +1240,7 @@ + conn = (struct iscsi_conn*)sk->sk_user_data; + session = conn->session; + +- if ((sk->sk_state == TCP_CLOSE_WAIT || +- sk->sk_state == TCP_CLOSE) && +- !atomic_read(&sk->sk_rmem_alloc)) { +- debug_tcp("iscsi_tcp_state_change: TCP_CLOSE|TCP_CLOSE_WAIT\n"); +- iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); +- } +- ++ printk(KERN_ERR "iscsi_tcp_state_change state %d\n", sk->sk_state); + old_state_change = conn->old_state_change; + + read_unlock(&sk->sk_callback_lock); diff --git a/sys-block/open-iscsi/open-iscsi-1.0.490-r1.ebuild b/sys-block/open-iscsi/open-iscsi-1.0.490-r1.ebuild new file mode 100644 index 000000000000..f5f498302584 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-1.0.490-r1.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-1.0.490-r1.ebuild,v 1.1 2006/03/07 08:26:46 robbat2 Exp $ + +inherit versionator linux-mod eutils flag-o-matic + +DESCRIPTION="Open-iSCSI project is a high performance, transport independent, multi-platform implementation of RFC3720." +HOMEPAGE="http://www.open-iscsi.org/" +MY_PV="$(replace_version_separator 2 '-')" +MY_SVN_R=490 +MY_P="${PN}-${MY_PV}" +#SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz" +SRC_URI="mirror://gentoo/${MY_P}.tar.gz + mirror://gentoo/${PN}-490-add-targetname2.patch.gz + mirror://gentoo/${PN}-490-boot13.patch.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="debug" +DEPEND="virtual/libc + virtual/linux-sources" +RDEPEND="${DEPEND} + virtual/modutils + sys-apps/util-linux" + +S="${WORKDIR}/${MY_P}" + +MODULE_NAMES_ARG="kernel/drivers/scsi:${S}/kernel" +MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${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}/kernel -p0" + export EPATCH_OPTS="-d${S}" + if [ $KV_PATCH -lt 11 ]; then + die "Sorry, your kernel must be 2.6.11 or newer!" + elif [ $KV_PATCH -eq 11 ]; then + einfo "2.6.11 found" + epatch ${S}/kernel/2.6.11-compat.patch + elif [ $KV_PATCH -eq 12 ]; then + einfo "2.6.12 found" + epatch ${S}/kernel/2.6.12-compat.patch + elif [ $KV_PATCH -eq 13 ]; then + einfo "2.6.13 found" + epatch ${S}/kernel/2.6.13-compat.patch + elif [ $KV_PATCH -eq 14 ]; then + einfo "2.6.14 found" + epatch ${S}/kernel/2.6.14-and-2.6.15-compat.patch + elif [ $KV_PATCH -eq 15 ]; then + einfo "2.6.15 found" + epatch ${S}/kernel/2.6.14-and-2.6.15-compat.patch + else + einfo "2.6.16 or newer found." + einfo "Please file a bug if this does not compile." + fi + # O_EXCL locking on idbm files + epatch ${FILESDIR}/r438-idbm-file-locking.diff + + #EPATCH_OPTS="-p0 -d${S}" \ + #epatch ${FILESDIR}/open-iscsi-488-udev.patch + + # Converts the close on error to a log message + epatch ${FILESDIR}/${PN}-485-out.state.patch + # iscsistart root/boot stuff + EPATCH_OPTS="-p0 -d${S}" \ + epatch ${DISTDIR}/${PN}-490-boot13.patch.gz + # new sysfs params + EPATCH_OPTS="-p1 -d${S}" \ + epatch ${DISTDIR}/${PN}-490-add-targetname2.patch.gz +} + + +src_compile() { + use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI + + einfo "Building kernel modules" + export KSRC="${KERNEL_DIR}" + linux-mod_src_compile || die "failed to build modules" + einfo "Building userspace" + cd ${S}/usr && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" +} + +src_install() { + einfo "Installing kernel modules" + export KSRC="${KERNEL_DIR}" + #S=${S}/kernel + linux-mod_src_install + + einfo "Installing userspace" + dosbin usr/iscsid usr/iscsiadm usr/iscsistart + + einfo "Installing docs" + doman doc/*[1-8] + dodoc README THANKS + docinto test + dodoc test/* + + einfo "Installing configuration" + insinto /etc + doins etc/iscsid.conf + doins ${FILESDIR}/initiatorname.iscsi + newinitd ${FILESDIR}/iscsid-init.d iscsid + + # This is for later + # dosbin usr/iscsi_id + #insinto /etc/udev/rules.d/ + #doins doc/iscsi-55.rules + + # security + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsid.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst + [ -d ${ROOT}/var/db/iscsi ] && chmod 700 ${ROOT}/var/db/iscsi + [ -f ${ROOT}/etc/iscsid.conf ] && chmod 600 ${ROOT}/etc/iscsid.conf +} diff --git a/sys-block/open-iscsi/open-iscsi-1.0.490.ebuild b/sys-block/open-iscsi/open-iscsi-1.0.490.ebuild new file mode 100644 index 000000000000..7e16c6ad8791 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-1.0.490.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-1.0.490.ebuild,v 1.1 2006/03/07 08:26:46 robbat2 Exp $ + +inherit versionator linux-mod eutils flag-o-matic + +DESCRIPTION="Open-iSCSI project is a high performance, transport independent, multi-platform implementation of RFC3720." +HOMEPAGE="http://www.open-iscsi.org/" +MY_PV="$(replace_version_separator 2 '-')" +MY_P="${PN}-${MY_PV}" +#SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz" +SRC_URI="mirror://gentoo/${MY_P}.tar.gz + mirror://gentoo/${PN}-490-add-targetname.patch.gz + mirror://gentoo/${PN}-490-boot13.patch.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="debug" +DEPEND="virtual/libc + virtual/linux-sources" +RDEPEND="${DEPEND} + virtual/modutils + sys-apps/util-linux" + +S="${WORKDIR}/${MY_P}" + +MODULE_NAMES_ARG="kernel/drivers/scsi:${S}/kernel" +MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${MODULE_NAMES_ARG})" +BUILD_TARGETS="all" +CONFIG_CHECK="CRYPTO_MD5 CRYPTO_CRC32C" +ERROR_CFG="open-iscsi needs both MD5 and CRC32C support in your kernel." + +src_unpack() { + unpack ${A} + #export EPATCH_OPTS="-d${S}/kernel -p0" + export EPATCH_OPTS="-d${S}" + if [ $KV_PATCH -lt 11 ]; then + die "Sorry, your kernel must be 2.6.11 or newer!" + elif [ $KV_PATCH -eq 11 ]; then + einfo "2.6.11 found" + epatch ${S}/kernel/2.6.11-compat.patch + elif [ $KV_PATCH -eq 12 ]; then + einfo "2.6.12 found" + epatch ${S}/kernel/2.6.12-compat.patch + elif [ $KV_PATCH -eq 13 ]; then + einfo "2.6.13 found" + epatch ${S}/kernel/2.6.13-compat.patch + elif [ $KV_PATCH -eq 14 ]; then + einfo "2.6.14 found" + epatch ${S}/kernel/2.6.14-and-2.6.15-compat.patch + elif [ $KV_PATCH -eq 15 ]; then + einfo "2.6.15 found" + epatch ${S}/kernel/2.6.14-and-2.6.15-compat.patch + else + einfo "2.6.16 or newer found." + einfo "Please file a bug if this does not compile." + fi + # O_EXCL locking on idbm files + epatch ${FILESDIR}/r438-idbm-file-locking.diff + + #EPATCH_OPTS="-p0 -d${S}" \ + #epatch ${FILESDIR}/open-iscsi-488-udev.patch + + # Converts the close on error to a log message + epatch ${FILESDIR}/${PN}-485-out.state.patch + # iscsistart root/boot stuff + EPATCH_OPTS="-p0 -d${S}" \ + epatch ${FILESDIR}/${PN}-490-boot13.patch + # new sysfs params + EPATCH_OPTS="-p1 -d${S}" \ + epatch ${FILESDIR}/${PN}-490-add-targetname.patch +} + + +src_compile() { + use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI + + einfo "Building kernel modules" + export KSRC="${KERNEL_DIR}" + linux-mod_src_compile || die "failed to build modules" + einfo "Building userspace" + cd ${S}/usr && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" +} + +src_install() { + einfo "Installing kernel modules" + export KSRC="${KERNEL_DIR}" + #S=${S}/kernel + linux-mod_src_install + + einfo "Installing userspace" + dosbin usr/iscsid usr/iscsiadm usr/iscsistart + + einfo "Installing docs" + doman doc/*[1-8] + dodoc README THANKS + docinto test + dodoc test/* + + einfo "Installing configuration" + insinto /etc + doins etc/iscsid.conf + doins ${FILESDIR}/initiatorname.iscsi + newinitd ${FILESDIR}/iscsid-init.d iscsid + + # This is for later + # dosbin usr/iscsi_id + #insinto /etc/udev/rules.d/ + #doins doc/iscsi-55.rules + + # security + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsid.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst + [ -d ${ROOT}/var/db/iscsi ] && chmod 700 ${ROOT}/var/db/iscsi + [ -f ${ROOT}/etc/iscsid.conf ] && chmod 600 ${ROOT}/etc/iscsid.conf +} diff --git a/sys-block/open-iscsi/open-iscsi-1.0.514.ebuild b/sys-block/open-iscsi/open-iscsi-1.0.514.ebuild new file mode 100644 index 000000000000..338bda65c8fc --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-1.0.514.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-1.0.514.ebuild,v 1.1 2006/03/07 08:26:46 robbat2 Exp $ + +inherit versionator linux-mod eutils flag-o-matic + +DESCRIPTION="Open-iSCSI project is a high performance, transport independent, multi-platform implementation of RFC3720." +HOMEPAGE="http://www.open-iscsi.org/" +MY_PV="$(replace_version_separator 2 '-')" +MY_SVN_R=514 +MY_P="${PN}-${MY_PV}" +#SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz" +SRC_URI="mirror://gentoo/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="debug" +DEPEND="virtual/libc + virtual/linux-sources" +RDEPEND="${DEPEND} + virtual/modutils + sys-apps/util-linux" + +S="${WORKDIR}/${MY_P}" + +MODULE_NAMES_ARG="kernel/drivers/scsi:${S}/kernel" +MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${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}/kernel -p0" + export EPATCH_OPTS="-d${S}" + if [ $KV_PATCH -lt 15 ]; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + elif [ $KV_PATCH -eq 16 ]; then + einfo "2.6.16 or newer found." + einfo "Please file a bug if this does not compile." + fi + + # clean up some junk + find ${S} -name '*~' -exec rm \{} \; >/dev/null 2>/dev/null + + # O_EXCL locking on idbm files + epatch ${FILESDIR}/r438-idbm-file-locking.diff + + #EPATCH_OPTS="-p0 -d${S}" \ + #epatch ${FILESDIR}/open-iscsi-488-udev.patch + + # Converts the close on error to a log message + #epatch ${FILESDIR}/${PN}-485-out.state.patch +} + + +src_compile() { + use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI + + einfo "Building kernel modules" + export KSRC="${KERNEL_DIR}" + linux-mod_src_compile || die "failed to build modules" + einfo "Building userspace" + cd ${S}/usr && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" +} + +src_install() { + einfo "Installing kernel modules" + export KSRC="${KERNEL_DIR}" + #S=${S}/kernel + linux-mod_src_install + + einfo "Installing userspace" + dosbin usr/iscsid usr/iscsiadm usr/iscsistart + + einfo "Installing docs" + doman doc/*[1-8] + dodoc README THANKS + docinto test + dodoc test/* + + einfo "Installing configuration" + insinto /etc + doins etc/iscsid.conf + doins ${FILESDIR}/initiatorname.iscsi + newinitd ${FILESDIR}/iscsid-init.d iscsid + + # This is for later + # dosbin usr/iscsi_id + #insinto /etc/udev/rules.d/ + #doins doc/iscsi-55.rules + + # security + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsid.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst + [ -d ${ROOT}/var/db/iscsi ] && chmod 700 ${ROOT}/var/db/iscsi + [ -f ${ROOT}/etc/iscsid.conf ] && chmod 600 ${ROOT}/etc/iscsid.conf +} |