diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2006-02-20 08:33:40 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2006-02-20 08:33:40 +0000 |
commit | 7944936268db07f5c48dfb62e457293ddc612093 (patch) | |
tree | 07b12a719b887ab58310c0a8adbc741877907a1f /sys-block | |
parent | Some minor ebuild cleanup (diff) | |
download | gentoo-2-7944936268db07f5c48dfb62e457293ddc612093.tar.gz gentoo-2-7944936268db07f5c48dfb62e457293ddc612093.tar.bz2 gentoo-2-7944936268db07f5c48dfb62e457293ddc612093.zip |
Bug #122632 - amd64 keyword. Bug #115529, version bump. Now includes much better init scripts.
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/iscsitarget/ChangeLog | 12 | ||||
-rw-r--r-- | sys-block/iscsitarget/Manifest | 25 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/digest-iscsitarget-0.4.13 | 3 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/ietd-conf.d | 30 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/ietd-init.d | 102 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-0.4.13-usrbuildfix.patch | 10 | ||||
-rw-r--r-- | sys-block/iscsitarget/iscsitarget-0.4.13.ebuild | 57 |
7 files changed, 236 insertions, 3 deletions
diff --git a/sys-block/iscsitarget/ChangeLog b/sys-block/iscsitarget/ChangeLog index 8832a22985fa..bd83b8966326 100644 --- a/sys-block/iscsitarget/ChangeLog +++ b/sys-block/iscsitarget/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-block/iscsitarget -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.1 2005/12/05 03:32:30 robbat2 Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.2 2006/02/20 08:33:40 robbat2 Exp $ + +*iscsitarget-0.4.13 (20 Feb 2006) + + 20 Feb 2006; Robin H. Johnson <robbat2@gentoo.org> + +files/iscsitarget-0.4.13-usrbuildfix.patch, +files/ietd-conf.d, + +files/ietd-init.d, +iscsitarget-0.4.13.ebuild: + Bug #122632 - amd64 keyword. Bug #115529, version bump. Now includes much + better init scripts. *iscsitarget-0.4.12 (05 Dec 2005) diff --git a/sys-block/iscsitarget/Manifest b/sys-block/iscsitarget/Manifest index 22cddacc679f..ee54a1f583b4 100644 --- a/sys-block/iscsitarget/Manifest +++ b/sys-block/iscsitarget/Manifest @@ -1,4 +1,27 @@ -MD5 8ed012d7997532a7657791d3c30e456d ChangeLog 441 +MD5 a34198ca914c8aab4520b3bf761b0755 ChangeLog 746 +RMD160 aa646f15fae126e3e0ec2b1017997264c3364912 ChangeLog 746 +SHA256 b4fb140c06499bac5f1c87817f97ae14d5684a190ab53b9fd1fabd0d720bc286 ChangeLog 746 MD5 4b2724f93d212d66f73fd9c938189408 files/digest-iscsitarget-0.4.12 69 +RMD160 84f59e927d949c56103df1c6f080dcb462de365e files/digest-iscsitarget-0.4.12 69 +SHA256 a1581c97907ac62065994b1c50c5402c32f91c8239a1cbca9f11b8aa48803030 files/digest-iscsitarget-0.4.12 69 +MD5 a026a72ea77d6ce209257f20048c2c97 files/digest-iscsitarget-0.4.13 253 +RMD160 f9c6c980c46c3349b1512c9926a8c00849cf5b58 files/digest-iscsitarget-0.4.13 253 +SHA256 faf55daf8c6fecf6e0fbe7f0372c4123478ddcdcc8040ca08e62556659fff683 files/digest-iscsitarget-0.4.13 253 +MD5 6b191f67148ca6d682280c2f28efad09 files/ietd-conf.d 1074 +RMD160 714a6d6c671c3efc37803d64284d1d619dcf7ca7 files/ietd-conf.d 1074 +SHA256 ec7f53777a343788b0f3beb6cf36da9793e59c53136e8b293d0ccddfafe5a71a files/ietd-conf.d 1074 +MD5 d1ec0c550ed21d0de7e42b9ae9ef2a4d files/ietd-init.d 2492 +RMD160 5cbaaadc73c05a0862e571d6ed78fb0d2a9565e1 files/ietd-init.d 2492 +SHA256 06eff9bc153718868b5630410585697e9a206b8c9e4462ca34be895aea26d311 files/ietd-init.d 2492 +MD5 351e6974ac137e8a0d4537b91f15fd67 files/iscsitarget-0.4.13-usrbuildfix.patch 360 +RMD160 db8d564f28d966caa795e69c5cc56fd8e0d5a38f files/iscsitarget-0.4.13-usrbuildfix.patch 360 +SHA256 b55c547d1d8c622beff46c01c0e683c1c47e23f1aef0afda78007b3507401eb2 files/iscsitarget-0.4.13-usrbuildfix.patch 360 MD5 61dd15e51565ed0e8996f5e1d8411ab7 iscsitarget-0.4.12.ebuild 1246 +RMD160 d45b7d20f63eb3446a0d1f59673b56f098046b9a iscsitarget-0.4.12.ebuild 1246 +SHA256 0937fc4175143dfb9572d848d5d6527f327c114d59967f99be373a64a27ca5e0 iscsitarget-0.4.12.ebuild 1246 +MD5 244cd419332edf942457979b5b929d13 iscsitarget-0.4.13.ebuild 1788 +RMD160 a6edbb6c663b98429273d7d150a32670e3eaaba1 iscsitarget-0.4.13.ebuild 1788 +SHA256 795923393baaffe6d6ac964709a4dec0c51bc5393f97e77edca954a9bd9cf8d7 iscsitarget-0.4.13.ebuild 1788 MD5 21cd68602737d7c996bceabf6e62c468 metadata.xml 223 +RMD160 ffa99612cf27469c417944deed0e0c9155e64331 metadata.xml 223 +SHA256 d6bb9ba68629616062b4433ab3b8fb01dfcafae5bb47804d9e06cdd6c66daa44 metadata.xml 223 diff --git a/sys-block/iscsitarget/files/digest-iscsitarget-0.4.13 b/sys-block/iscsitarget/files/digest-iscsitarget-0.4.13 new file mode 100644 index 000000000000..a0f09df45622 --- /dev/null +++ b/sys-block/iscsitarget/files/digest-iscsitarget-0.4.13 @@ -0,0 +1,3 @@ +MD5 03c1df51a060afa0499fbe303c8ad123 iscsitarget-0.4.13.tar.gz 88236 +RMD160 d0924c0e46f4131eaf2565db8e92c8fc1527e4ea iscsitarget-0.4.13.tar.gz 88236 +SHA256 afb74a6753e5e73c5b614da2bfc779c7b3e11576474582cbd22f86babbfeeb06 iscsitarget-0.4.13.tar.gz 88236 diff --git a/sys-block/iscsitarget/files/ietd-conf.d b/sys-block/iscsitarget/files/ietd-conf.d new file mode 100644 index 000000000000..3621326b1a72 --- /dev/null +++ b/sys-block/iscsitarget/files/ietd-conf.d @@ -0,0 +1,30 @@ +# Copyright 1999-2006 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-conf.d,v 1.1 2006/02/20 08:33:40 robbat2 Exp $ + +# Address and port to listen on for connections. +#ADDRESS="" # set this to non-empty to listen somewhere specific +PORT=3260 + +# Address of your SNS server +# if available +#ISNS="" + +# User and group to run as +# You must ensure that the UID/GID have access to the files/devices you +# have provided in your configuration. +USER="root" +GROUP="root" + +# Debug level - see ietd(8) for the levels +#DEBUGLEVEL= + +# This setting disables the memory configuration warnings. +# Upstream takes the general policy of forcing all of the memory settings that +# they want, but that doesn't mesh with users that have it set higher. +# Gentoo by default ignores the settings that are higher, but issues warnings +# on those that are lower. +# Uncomment the next line to disable those warnings. +#DISABLE_MEMORY_WARNINGS=1 + +# vim: filetype=gentoo-conf-d tw=72: diff --git a/sys-block/iscsitarget/files/ietd-init.d b/sys-block/iscsitarget/files/ietd-init.d new file mode 100644 index 000000000000..33d65f4baea1 --- /dev/null +++ b/sys-block/iscsitarget/files/ietd-init.d @@ -0,0 +1,102 @@ +#!/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/iscsitarget/files/ietd-init.d,v 1.1 2006/02/20 08:33:40 robbat2 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() { + for sysctl_key in net.core.{w,r}mem_{max,default}; do + v="$(sysctl -n ${sysctl_key})" + if [ "${v}" -lt "${MEM_SIZE}" ]; then + ewarn "$sysctl_key is lower than recommended ${MEM_SIZE}" + fi + done + for sysctl_key in net.ipv4.tcp_{,r,w}mem ; do + v="$(sysctl -n ${sysctl_key} | xargs)" + v1="${v/ *}" v2="${v#* }" v3="${v2/* }" v2="${v2/ *}" + min="${v1}" default="${v2}" max="${v3}" + for k in min default max ; do + if [ "${!k}" -lt "${MEM_SIZE}" ]; then + ewarn "$sysctl_key:$k is lower than recommended ${MEM_SIZE}" + fi + 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 == "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.13-usrbuildfix.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.13-usrbuildfix.patch new file mode 100644 index 000000000000..b8f16f9e66f8 --- /dev/null +++ b/sys-block/iscsitarget/files/iscsitarget-0.4.13-usrbuildfix.patch @@ -0,0 +1,10 @@ +--- usr/Makefile.backup 2006-02-19 22:00:51.061332070 -0800 ++++ usr/Makefile 2006-02-19 22:01:54.896278374 -0800 +@@ -1,4 +1,6 @@ +-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include ++OPTFLAGS = -O2 -fno-inline -g ++WARNFLAGS = -Wall -Wstrict-prototypes ++CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../include + PROGRAMS = ietd ietadm + LIBS = -lcrypto + diff --git a/sys-block/iscsitarget/iscsitarget-0.4.13.ebuild b/sys-block/iscsitarget/iscsitarget-0.4.13.ebuild new file mode 100644 index 000000000000..5d2f8532d25f --- /dev/null +++ b/sys-block/iscsitarget/iscsitarget-0.4.13.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-0.4.13.ebuild,v 1.1 2006/02/20 08:33:40 robbat2 Exp $ + +inherit linux-mod eutils + +DESCRIPTION="Open Source iSCSI target with professional features" +HOMEPAGE="http://iscsitarget.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +RDEPEND="dev-libs/openssl" +DEPEND="${RDEPEND} + virtual/linux-sources" +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} + EPATCH_OPTS="-d ${S} -p0" \ + epatch ${FILESDIR}/${P}-usrbuildfix.patch \ + || die "Failed to fix userspace build process" + convert_to_m ${S}/Makefile +} + +src_compile() { + einfo "Building userspace" + CFLAGS="" emake progs OPTFLAGS="${CFLAGS}" || die "failed to build userspace" + + einfo "Building kernel modules" + unset ARCH + emake KERNELSRC="${KERNEL_DIR}" mods || 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 ietd || die "newinitd failed" + newconfd ${FILESDIR}/ietd-conf.d ietd || die "newconfd failed" + + 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" +} |