summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2008-07-18 16:03:38 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2008-07-18 16:03:38 +0000
commit406f476b18cbb10c4f0fb5e6d11b7f9f4d4094f8 (patch)
tree5fa2480da39f9a098065e67f350f70963150e484 /sys-block
parentRemove useless autotools inherit (diff)
downloadhistorical-406f476b18cbb10c4f0fb5e6d11b7f9f4d4094f8.tar.gz
historical-406f476b18cbb10c4f0fb5e6d11b7f9f4d4094f8.tar.bz2
historical-406f476b18cbb10c4f0fb5e6d11b7f9f4d4094f8.zip
Add a snapshot of current SVN for iscsitarget, this has the proper fixes for glibc 2.8 rather than our hacks, and also builds and runs fine with kernel 2.6.26. Also update to the new init script provided by Natanael Copa in bug #197472 that is POSIX compatible.
Package-Manager: portage-2.2_rc1/cvs/Linux 2.6.26-gentoo x86_64
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/iscsitarget/ChangeLog12
-rw-r--r--sys-block/iscsitarget/Manifest12
-rw-r--r--sys-block/iscsitarget/files/ietd-init.d-2106
-rw-r--r--sys-block/iscsitarget/files/iscsitarget-0.4.17-build.patch23
-rw-r--r--sys-block/iscsitarget/iscsitarget-0.4.16_p162.ebuild57
5 files changed, 205 insertions, 5 deletions
diff --git a/sys-block/iscsitarget/ChangeLog b/sys-block/iscsitarget/ChangeLog
index b6f99a4a24ba..bd01f67a1e9e 100644
--- a/sys-block/iscsitarget/ChangeLog
+++ b/sys-block/iscsitarget/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-block/iscsitarget
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.13 2008/06/14 08:18:53 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.14 2008/07/18 16:03:37 flameeyes Exp $
+
+*iscsitarget-0.4.16_p162 (18 Jul 2008)
+
+ 18 Jul 2008; Diego Pettenò <flameeyes@gentoo.org>
+ +files/iscsitarget-0.4.17-build.patch, +files/ietd-init.d-2,
+ +iscsitarget-0.4.16_p162.ebuild:
+ Add a snapshot of current SVN for iscsitarget, this has the proper fixes
+ for glibc 2.8 rather than our hacks, and also builds and runs fine with
+ kernel 2.6.26. Also update to the new init script provided by Natanael
+ Copa in bug #197472 that is POSIX compatible.
*iscsitarget-0.4.16 (14 Jun 2008)
diff --git a/sys-block/iscsitarget/Manifest b/sys-block/iscsitarget/Manifest
index e0b75f7227f6..f3de019dd178 100644
--- a/sys-block/iscsitarget/Manifest
+++ b/sys-block/iscsitarget/Manifest
@@ -3,21 +3,25 @@ Hash: SHA1
AUX ietd-conf.d 1073 RMD160 ade5301c8e2eb8cbc16dfae4bfa80e22393e2953 SHA1 1bb990e26b847169d4937e5d2fc28a5f86d55003 SHA256 28c4a6ddfe555d9f400513de04e2e44473263c4505434fc6e926d2b2fe89c414
AUX ietd-init.d 2490 RMD160 f8236e27db076f93308a627d20f6bf11eef0cdac SHA1 731b4ba2e0a60cd8ce3892988e6248501ec6c91b SHA256 efe61cefe96571dd5ef3c38d0f692f40f66ad9dc30db436471ef998c0491a9a2
+AUX ietd-init.d-2 2492 RMD160 5ab62e5b1f0edd17bb296d4f61c8c7ff562b3d02 SHA1 d91acd801928673e7d03639f8c9e4bf7008ebe43 SHA256 403884a4a90c475689d0fd6deb3bffa402cf4b7a0b215cc0cad219ebf9c00ee2
AUX iscsitarget-0.4.15-build.patch 527 RMD160 2199754d3e8befbe12fb4e12b25cd9ca0974cb15 SHA1 4bce3d74e723fd4d8ddbf2ca3623651eea684f63 SHA256 508535914bac15c14ce727ddc9f3962478afe38fbb53bfe1392fc031611bfef1
AUX iscsitarget-0.4.15-isns-set-scn-flag.patch 507 RMD160 9a3b091eafb3d213a0c830a691684e0dc1f04b9c SHA1 9d80a8d1b5069e6ec5252ed8b1636023288bada2 SHA256 dc99ad8fa1cc10f6c6af4c99374dd0da14d3a56aebee2c48dd02cd8e156f9996
AUX iscsitarget-0.4.15-kmem.patch 1459 RMD160 9bff8127a865fe6ca86616966f092344de24c240 SHA1 8af2830595558373c0e9e5be0e673ea840fed0ee SHA256 f65e20f1bf5c7823056d0760b43841c4e2a4b1280c923bc91fbda951cf72dd91
AUX iscsitarget-0.4.15-scatter.patch 4388 RMD160 f41ad197a2b27e34595a4bf1be743eaed2e7cd12 SHA1 b0bbfb2b088d8f18792c4ce44b65557dccabaa0a SHA256 277607b25d32e73846e2dde0bfdd0393b5c804e93c3a1eb93d9daae0e4101b20
AUX iscsitarget-0.4.16+glibc-2.8-lists.patch 12736 RMD160 e6b4d39d4e2ae88db8f9fd8661759181200de219 SHA1 921d48ce83031610223b88ed3f0aa944bd1499a3 SHA256 8476001e2ea14e92f3c46467dc17284b38b9a73d4cd54400c6a92869793e0175
+AUX iscsitarget-0.4.17-build.patch 580 RMD160 a770b10dfc4f7c16daefa3e5e0827d1a2164e470 SHA1 81d46f22fd9ff73dbe7baa1792706c79c5ed7a2a SHA256 f1a29431674e4e185d3565df045ad575800c48f49de3a2a53d5723c7b2b7383d
DIST iscsitarget-0.4.15.tar.gz 102922 RMD160 d7d787f1fcbdb124d17eaaa62eaa47c21b6e5dd2 SHA1 c4802e208077bc0249518555c7eace6808de1878 SHA256 da8eb570f9abb6e50c515321747407e9945f5a83bab774c42ed41809234505cb
DIST iscsitarget-0.4.16.tar.gz 103196 RMD160 e0a68f04523191d6116646566fa9132e5aebdb58 SHA1 a7ddbd15767764bad221f59cff4b5e9f0bf57d7b SHA256 e6605ae5f9ed2e2fdbe84df967236678579a4fbe536b75a93277cbb607bead7d
+DIST iscsitarget-0.4.16_p162.tar.bz2 84559 RMD160 df48d9f8b0416cd47f926257801c8357ea1ea7b6 SHA1 163d3272f859b7f04900d5a56856140c083b90c1 SHA256 306f98bd2d1847f97cd079f31239cfb72640606e560b8e1d6e01b263fda501b7
EBUILD iscsitarget-0.4.15-r1.ebuild 1848 RMD160 7294286c00a5f59b13a01fd7da2e8aca3a694585 SHA1 949d43f991de676b676714213dfea02626d31217 SHA256 fcd6fd854e27a10e93442956fab35833ac94b3b831a39b36b2257c3e881bd1f7
EBUILD iscsitarget-0.4.16.ebuild 1902 RMD160 69b66c9c8fb1a49a4fab49c02630444c64024f56 SHA1 02ec71d4172269e14ea680339f52f6bf43290228 SHA256 f1309cda1d1eedf776032010300142b35bbfbca94c5eedb62ea6cb82fd50d1e0
-MISC ChangeLog 2675 RMD160 28d3422b73b56e2685e0038c3ffbcb53021ac6cf SHA1 0f342bca8fd8ddd94e250e5024b4c3af99102464 SHA256 7b3659e919f98d0cb457e179579930646912043f7a6018bc31fa6d445df243aa
+EBUILD iscsitarget-0.4.16_p162.ebuild 1766 RMD160 4a3b249e891f61469d39ffaec007931bd643f19c SHA1 30eea1d9f60f340579c3115de19c13cef6387a24 SHA256 0fb76ca48de8599071b6c54ae02401990ba5237585b6d5ab5efb9c9c28fd448f
+MISC ChangeLog 3137 RMD160 9449b8b588efeed034e9b9e524237c496ce2403d SHA1 7b2d7a019f41425002a79e3687d352a2cd99fa01 SHA256 aea2eda3f97f7aecf95a6dec04d76ee5e158fb60f11a56733f83fcc5f5719d9f
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
-iEYEARECAAYFAkhTfvUACgkQAiZjviIA2XgNAwCghUczQiWVmIV3KwcYMTwdXF2K
-WwUAoO1Cg7t+vBqJ2z2ugV5Ivk+k8oss
-=qIEI
+iEYEARECAAYFAkiAvu8ACgkQAiZjviIA2XiLtQCeMZjQIE3jWCGegf5ZvdXl/iby
+iMIAnAt97C+ZiJIfk3sApCoIlqg9P/Gq
+=rWAv
-----END PGP SIGNATURE-----
diff --git a/sys-block/iscsitarget/files/ietd-init.d-2 b/sys-block/iscsitarget/files/ietd-init.d-2
new file mode 100644
index 000000000000..6ea9a4b51e80
--- /dev/null
+++ b/sys-block/iscsitarget/files/ietd-init.d-2
@@ -0,0 +1,106 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/files/ietd-init.d-2,v 1.1 2008/07/18 16:03:38 flameeyes Exp $
+
+MEM_SIZE=1048576
+DAEMON=/usr/sbin/ietd
+CONFIG_FILE=/etc/ietd.conf
+PID_FILE=/var/run/iscsi_trgt.pid
+NAME="iSCSI Enterprise Target"
+
+ARGS=""
+[ -n "$USER" ] && ARGS="${ARGS} --uid=${USER}"
+[ -n "$GROUP" ] && ARGS="${ARGS} --gid=${GROUP}"
+[ -n "$ISNS" ] && ARGS="${ARGS} --isns=${ISNS}"
+[ -n "$PORT" ] && ARGS="${ARGS} --port=${PORT}"
+[ -n "$ADDRESS" ] && ARGS="${ARGS} --address=${ADDRESS}"
+[ -n "$DEBUGLEVEL" ] && ARGS="${ARGS} --debug=${DEBUGLEVEL}"
+
+depend() {
+ use net
+ after modules
+}
+checkconfig() {
+ if [ ! -f $CONFIG_FILE ]; then
+ eerror "Config file $CONFIG_FILE does not exist!"
+ return 1
+ fi
+ if [ -z "$DISABLE_MEMORY_WARNINGS" ]; then
+ check_memsize
+ fi
+}
+
+check_memsize() {
+ local wr md sysctl_key v k
+ for wr in r w; do
+ for md in max default; do
+ sysctl_key="net.core.${wr}mem_${md}"
+ v="$(sysctl -n ${sysctl_key})"
+ if [ "${v}" -lt "${MEM_SIZE}" ]; then
+ ewarn "$sysctl_key ($v) is lower than recommended ${MEM_SIZE}"
+ fi
+ done
+ done
+ for wr in "" r w; do
+ sysctl_key="net.ipv4.tcp_${wr}mem"
+ set -- $(sysctl -n ${sysctl_key})
+ for k in min default max ; do
+ if [ "${1}" -lt "${MEM_SIZE}" ]; then
+ ewarn "$sysctl_key:$k (${1}) is lower than recommended ${MEM_SIZE}"
+ fi
+ shift
+ done
+ done
+}
+
+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
+ do_modules 'Loading iSCSI-Target modules' 'iscsi_trgt'
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --exec $DAEMON --quiet -- ${ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Removing ${NAME} devices"
+ # ugly, but ietadm does not allways provides correct exit values
+ RETURN="$(ietadm --op delete 2>&1)"
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] && [ "$RETURN" != "something wrong" ] ; then
+ eend 0
+ else
+ eend 1
+ eerror "ietadm failed - $RETURN"
+ return 1
+ fi
+
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet --exec $DAEMON --pidfile $PID_FILE
+ ret=$?
+ eend $ret
+ [ $ret -ne 0 ] && return 1
+
+ # ugly, but pid file is not removed by ietd
+ rm -f $PID_FILE
+ do_modules 'Removing iSCSI-Target modules' 'iscsi_trgt' '-r'
+ return $?
+}
+
+# vim: tw=72:
diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.17-build.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.17-build.patch
new file mode 100644
index 000000000000..e984bd3ec374
--- /dev/null
+++ b/sys-block/iscsitarget/files/iscsitarget-0.4.17-build.patch
@@ -0,0 +1,23 @@
+--- usr/Makefile
++++ usr/Makefile
+@@ -1,16 +1,15 @@
+-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
++CFLAGS ?= -O2 -fno-inline -g
+ CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8
++WARNFLAGS = -Wall -Wstrict-prototypes
++CFLAGS += $(WARNFLAGS) -I../include
+ PROGRAMS = ietd ietadm
+-LIBS = -lcrypto
++LDLIBS = -lcrypto
+
+ all: $(PROGRAMS)
+
+ ietd: ietd.o iscsid.o conn.o session.o target.o message.o ctldev.o log.o chap.o event.o param.o plain.o isns.o
+
+- $(CC) $^ -o $@ $(LIBS)
+-
+ ietadm: ietadm.o param.o
+- $(CC) $^ -o $@
+
+ clean:
+ rm -f *.o $(PROGRAMS)
diff --git a/sys-block/iscsitarget/iscsitarget-0.4.16_p162.ebuild b/sys-block/iscsitarget/iscsitarget-0.4.16_p162.ebuild
new file mode 100644
index 000000000000..aba2ec483430
--- /dev/null
+++ b/sys-block/iscsitarget/iscsitarget-0.4.16_p162.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-0.4.16_p162.ebuild,v 1.1 2008/07/18 16:03:37 flameeyes Exp $
+
+inherit linux-mod eutils flag-o-matic
+
+DESCRIPTION="Open Source iSCSI target with professional features"
+HOMEPAGE="http://iscsitarget.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+
+MODULE_NAMES="iscsi_trgt(kernel/iscsi:${S}/kernel)"
+CONFIG_CHECK="CRYPTO_CRC32C"
+ERROR_CFG="iscsitarget needs support for CRC32C in your kernel."
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-0.4.15-isns-set-scn-flag.patch #180619
+ epatch "${FILESDIR}"/${PN}-0.4.17-build.patch
+ convert_to_m "${S}"/Makefile
+}
+
+src_compile() {
+ emake usr || die "failed to build userspace"
+
+ unset ARCH
+ emake KSRC="${KERNEL_DIR}" kernel || die "failed to build module"
+}
+
+src_install() {
+ einfo "Installing userspace"
+ dosbin usr/ietd usr/ietadm || die "dosbin failed"
+ insinto /etc
+ doins etc/ietd.conf etc/initiators.{allow,deny} || die "doins failed"
+ # Upstream's provided Gentoo init script is out of date compared to
+ # their Debian init script. And isn't that nice.
+ #newinitd etc/initd/initd.gentoo ietd || die
+ newinitd "${FILESDIR}"/ietd-init.d-2 ietd || die "newinitd failed"
+ newconfd "${FILESDIR}"/ietd-conf.d ietd || die "newconfd failed"
+
+ # Lock down perms, per bug 198209
+ fperms 0640 /etc/ietd.conf /etc/initiators.{allow,deny}
+
+ doman doc/manpages/*.[1-9] || die "manpages failed"
+ dodoc ChangeLog README || die "docs failed"
+
+ einfo "Installing kernel module"
+ unset ARCH
+ linux-mod_src_install || die "modules failed"
+}