New open-iscsi ebuild

git-svn-id: svn+ssh://svnintern.kmrc.de/projects/gentoo/iwm-overlay@11449 cbe59ace-07ea-0310-918e-868702b5370d
This commit is contained in:
Torsten Kurbad 2009-11-05 16:04:41 +00:00
parent 69bc427bd6
commit cb1a889ef3
3 changed files with 56 additions and 19 deletions

View File

@ -1,3 +1,4 @@
AUX CVE-2009-1297.patch 798 RMD160 e1f3411aef17b8e238928b88ebe008b2ae28c070 SHA1 55f3af418fb3eebe2b2f1ee59dc94b8a6ef0ad9a SHA256 b52320fb0e25876d7b9cd7a40e1a01246a9175822c98c3796d6e2822fda39af5
AUX initiatorname.iscsi 1282 RMD160 6af81c25d2704e2c6bb98ff5155de91cdbd17ff7 SHA1 2d2b0a50652772e0e3a16f3a90ef5977639b97ee SHA256 4ae558522881796f67ad5915ecf38d01e64c9d9768469847adb17405404485f3 AUX initiatorname.iscsi 1282 RMD160 6af81c25d2704e2c6bb98ff5155de91cdbd17ff7 SHA1 2d2b0a50652772e0e3a16f3a90ef5977639b97ee SHA256 4ae558522881796f67ad5915ecf38d01e64c9d9768469847adb17405404485f3
AUX iscsid-conf.d 276 RMD160 3e6de6c30fb77b8731512867cab8e5801db76a72 SHA1 1b81ad8382012bd98ad6d9c42f58c59623614527 SHA256 09d617fb76f8f61a1f99836286f424e0d9c0b57b9a382c3733ecb090b3fea100 AUX iscsid-conf.d 276 RMD160 3e6de6c30fb77b8731512867cab8e5801db76a72 SHA1 1b81ad8382012bd98ad6d9c42f58c59623614527 SHA256 09d617fb76f8f61a1f99836286f424e0d9c0b57b9a382c3733ecb090b3fea100
AUX iscsid-init.d 4389 RMD160 1fd15a99d953053a678e1947ed385ea01e25f6c3 SHA1 0ab1350f4b1f5c7ac8e598985b813cc01cee4cf9 SHA256 7bee28bf59371a844c68b3e7cfdc6ff19c445bcae4c8b69bf7888ad47db1dcde AUX iscsid-init.d 4389 RMD160 1fd15a99d953053a678e1947ed385ea01e25f6c3 SHA1 0ab1350f4b1f5c7ac8e598985b813cc01cee4cf9 SHA256 7bee28bf59371a844c68b3e7cfdc6ff19c445bcae4c8b69bf7888ad47db1dcde
@ -8,4 +9,4 @@ DIST open-iscsi-2.0-871.tar.gz 330514 RMD160 f996d9145bc3727394f1a4999f430bd5ea5
EBUILD open-iscsi-2.0.865.12.ebuild 2365 RMD160 9c111ca890fcf37583cad293201c505900e4c0e5 SHA1 b4fe12f059f703fbc616e53cc19b520e312a7ea8 SHA256 121be1d84b9b981634ae79ff00d524dde5884d53d89f75eafb5570367df7ac47 EBUILD open-iscsi-2.0.865.12.ebuild 2365 RMD160 9c111ca890fcf37583cad293201c505900e4c0e5 SHA1 b4fe12f059f703fbc616e53cc19b520e312a7ea8 SHA256 121be1d84b9b981634ae79ff00d524dde5884d53d89f75eafb5570367df7ac47
EBUILD open-iscsi-2.0.870-r1.ebuild 2635 RMD160 82d2d0c8ba94d4270f875fdaf98945a8a550bc26 SHA1 422c04dfdf1b75b042c82161307dcc551ab92b10 SHA256 4297b1c3cf70e3186fdcf453a89727f998949eadabbb9e7c0d4ece6397c61038 EBUILD open-iscsi-2.0.870-r1.ebuild 2635 RMD160 82d2d0c8ba94d4270f875fdaf98945a8a550bc26 SHA1 422c04dfdf1b75b042c82161307dcc551ab92b10 SHA256 4297b1c3cf70e3186fdcf453a89727f998949eadabbb9e7c0d4ece6397c61038
EBUILD open-iscsi-2.0.870.3.ebuild 3027 RMD160 26b5b1c848d7b4840e96ff44bca675ae45dfc7c6 SHA1 06d83df4918140b7464bdd849051d9b15fb7fa5d SHA256 6b57700b50f93f6a2d04aecec5b9d902363c0b535bf290034b1c5ad927dfa5b9 EBUILD open-iscsi-2.0.870.3.ebuild 3027 RMD160 26b5b1c848d7b4840e96ff44bca675ae45dfc7c6 SHA1 06d83df4918140b7464bdd849051d9b15fb7fa5d SHA256 6b57700b50f93f6a2d04aecec5b9d902363c0b535bf290034b1c5ad927dfa5b9
EBUILD open-iscsi-2.0.871.ebuild 2754 RMD160 5a82cd41ececa74b4909c8ed7eacf835895074cb SHA1 bebf2eecfdad6f540f109dbfe6f58eb7a4096c0d SHA256 46d51e80c3126deaa40d2c6c63f0a7c6a7a9ced6a3e1ff640211db069305d0b4 EBUILD open-iscsi-2.0.871.ebuild 3149 RMD160 1999c962be1a5c8ac5da72703ba206faa30bda1e SHA1 d4742fd50339c3e62c06e67edb058dfa5f9bbd33 SHA256 00f70a8e3f1efeb0db97ec5a0e12ef42fe59e6c92ea0a7478107b7f72e75f644

View File

@ -0,0 +1,31 @@
--- utils.orig/iscsi_discovery 2009-10-26 23:09:08.000000000 +0100
+++ utils/iscsi_discovery 2009-10-26 23:11:56.000000000 +0100
@@ -104,24 +104,22 @@
connected=0
discovered=0
- df=/tmp/discovered.$$
dbg "starting discovery to $ip"
- iscsiadm -m discovery --type sendtargets --portal ${ip}:${port} > ${df}
- while read portal target
+ disc="$(iscsiadm -m discovery --type sendtargets --portal ${ip}:${port})"
+ echo "${disc}" | while read portal target
do
portal=${portal%,*}
select_transport
- done < ${df}
+ done
- discovered=$(cat ${df} | wc -l)
+ discovered=$(echo "${disc}" | wc -l)
if [ ${discovered} = 0 ]; then
echo "failed to discover targets at ${ip}"
exit 2
else
echo "discovered ${discovered} targets at ${ip}"
fi
- /bin/rm -f ${df}
}
try_login()

View File

@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation # Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-2.0.870.3.ebuild,v 1.2 2009/03/20 18:36:32 mr_bones_ Exp $ # $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-2.0.871.ebuild,v 1.2 2009/10/28 16:49:50 dertobi123 Exp $
inherit versionator linux-mod eutils flag-o-matic inherit versionator linux-mod eutils flag-o-matic
@ -12,10 +12,8 @@ LICENSE="GPL-2"
SLOT="0" SLOT="0"
KEYWORDS="~x86 ~amd64 ~ppc ~mips" KEYWORDS="~x86 ~amd64 ~ppc ~mips"
IUSE="utils debug" IUSE="utils debug"
DEPEND="virtual/libc DEPEND="virtual/linux-sources"
virtual/linux-sources"
RDEPEND="${DEPEND} RDEPEND="${DEPEND}
virtual/modutils
sys-apps/util-linux" sys-apps/util-linux"
S="${WORKDIR}/${MY_PV}" S="${WORKDIR}/${MY_PV}"
@ -24,35 +22,40 @@ 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})" MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${MODULE_NAMES_ARG}) libiscsi(${MODULE_NAMES_ARG})"
BUILD_TARGETS="all" BUILD_TARGETS="all"
CONFIG_CHECK="CRYPTO_CRC32C" CONFIG_CHECK="CRYPTO_CRC32C"
CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
ERROR_CFG="open-iscsi needs CRC32C support in your kernel." ERROR_CFG="open-iscsi needs CRC32C support in your kernel."
pkg_setup() {
linux-info_pkg_setup
linux-mod_pkg_setup
# Needs to be done, as iscsid currently only starts, when having the iSCSI
# support loaded as module. Kernel builtion options don't work. See this for
# more information:
# http://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966
# If there's a new release, check whether this is still valid!
for module in ${CONFIG_CHECK_MODULES}; do
linux_chkconfig_module ${module} || die "${module} needs to be built as module (builtin doesn't work)"
done
}
src_unpack() { src_unpack() {
unpack ${A} unpack ${A}
export EPATCH_OPTS="-d${S}" export EPATCH_OPTS="-d${S}"
if [ $KV_PATCH -lt 15 ]; then if [ $KV_PATCH -lt 15 ]; then
die "Sorry, your kernel must be 2.6.16-rc5 or newer!" die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
fi fi
epatch "${FILESDIR}"/CVE-2009-1297.patch
} }
src_compile() { src_compile() {
use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
einfo "Building fwparam_ibft"
cd "${S}"/utils/fwparam_ibft && \
CFLAGS="" emake OPTFLAGS="${CFLAGS}" \
|| die "emake failed"
einfo "Building userspace" einfo "Building userspace"
cd "${S}"/usr && \ cd "${S}" && \
CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ CFLAGS="" emake OPTFLAGS="${CFLAGS}" user \
|| die "emake failed" || die "emake failed"
if use utils; then
einfo "Building utils"
cd "${S}"/utils && \
CFLAGS="" emake OPTFLAGS="${CFLAGS}" \
|| die "emake failed"
fi
} }
src_install() { src_install() {
@ -73,6 +76,8 @@ src_install() {
einfo "Installing configuration" einfo "Installing configuration"
insinto /etc/iscsi insinto /etc/iscsi
doins etc/iscsid.conf doins etc/iscsid.conf
insinto /etc/iscsi/ifaces
doins etc/iface.example
# only contains iscsi initiatorname, no need to update # only contains iscsi initiatorname, no need to update
if [ ! -e /etc/iscsi/initiatorname.iscsi ]; then if [ ! -e /etc/iscsi/initiatorname.iscsi ]; then