Removed obsolete open-iscsi ebuild
git-svn-id: svn+ssh://svnintern.kmrc.de/projects/gentoo/iwm-overlay@29883 cbe59ace-07ea-0310-918e-868702b5370d
This commit is contained in:
parent
50dd4adf6e
commit
b000a18712
@ -1,17 +0,0 @@
|
||||
AUX CVE-2009-1297.patch 798 RMD160 e1f3411aef17b8e238928b88ebe008b2ae28c070 SHA1 55f3af418fb3eebe2b2f1ee59dc94b8a6ef0ad9a SHA256 b52320fb0e25876d7b9cd7a40e1a01246a9175822c98c3796d6e2822fda39af5
|
||||
AUX initiatorname.iscsi 1282 RMD160 6af81c25d2704e2c6bb98ff5155de91cdbd17ff7 SHA1 2d2b0a50652772e0e3a16f3a90ef5977639b97ee SHA256 4ae558522881796f67ad5915ecf38d01e64c9d9768469847adb17405404485f3
|
||||
AUX iscsid-2.0.871-r1.conf.d 314 RMD160 de4885dcc1ed6440ea385b7b234deeaa9cb18478 SHA1 57b899e74027252f5686c0bf28aafbda6f669132 SHA256 673bf4744efc3276d372587c996270821d39dcdc0bf27a13691ea6b0e814b6d0
|
||||
AUX iscsid-2.0.871-r1.init.d 2916 RMD160 8a596eaf43e9c708b92b948d73a7d6385854dd3c SHA1 2c2c514b01199ef94f955fffa58a0be464a1912b SHA256 e0a8c9aa68c0f87f7e9ac89b7299e5a905d33fd271d58f7d6d0bfaea661862c9
|
||||
AUX iscsid-conf.d 276 RMD160 3e6de6c30fb77b8731512867cab8e5801db76a72 SHA1 1b81ad8382012bd98ad6d9c42f58c59623614527 SHA256 09d617fb76f8f61a1f99836286f424e0d9c0b57b9a382c3733ecb090b3fea100
|
||||
AUX iscsid-init.d 4389 RMD160 1fd15a99d953053a678e1947ed385ea01e25f6c3 SHA1 0ab1350f4b1f5c7ac8e598985b813cc01cee4cf9 SHA256 7bee28bf59371a844c68b3e7cfdc6ff19c445bcae4c8b69bf7888ad47db1dcde
|
||||
AUX open-iscsi-2.0.871-makefile-cleanup.patch 1205 RMD160 04f60526916cd9a707e4c3158c6cb7edc7da4169 SHA1 be59e170705927b1b3dffd07329a1a20d067e8df SHA256 8412850ea40dd7b5bacbae18c760ef305df36dbaa507d9618555e32c8e8e2ae6
|
||||
DIST open-iscsi-2.0-865.12.tar.gz 230395 RMD160 b663cc4773a9ec55ce0e27de63e53d334a1e7111 SHA1 e5e6e23f7f8b624f29ffeecf80ed8332e0048718 SHA256 f6413d9d7f03bdcac76a3dfa3931a163553694937ae9170aa79ef3d91eae13e5
|
||||
DIST open-iscsi-2.0-870.3.tar.gz 301242 RMD160 f3be0aeaa7b2988a794983bc6d88511026605b13 SHA1 bc8253558b1a6b0c12ec0fbb0f01d6cb56d39395 SHA256 8ca6708895b17424efe20a4f6cbdf32ea44c40e7d9faa0f9c44bd720bae715ec
|
||||
DIST open-iscsi-2.0-870.tar.gz 301105 RMD160 25f6a8dbe47e89d0f600c5fc6e25bc08cac5d99d SHA1 1365b5f370224aba5be1265e4439ef00a6765330 SHA256 7d42d030aef768d732439a26f0b04c9abe848902855d00cc6ad818f56815bfc6
|
||||
DIST open-iscsi-2.0-871.tar.gz 330514 RMD160 f996d9145bc3727394f1a4999f430bd5ea5c2a0d SHA1 968baf16d4094fb9842bc04b0fe8109103356252 SHA256 bcea8746ae82f2ada7bc05d2aa59bcda1ca0d5197f05f2e16744aae59f0a7dcb
|
||||
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.3.ebuild 3027 RMD160 26b5b1c848d7b4840e96ff44bca675ae45dfc7c6 SHA1 06d83df4918140b7464bdd849051d9b15fb7fa5d SHA256 6b57700b50f93f6a2d04aecec5b9d902363c0b535bf290034b1c5ad927dfa5b9
|
||||
EBUILD open-iscsi-2.0.871-r1.ebuild 3149 RMD160 1999c962be1a5c8ac5da72703ba206faa30bda1e SHA1 d4742fd50339c3e62c06e67edb058dfa5f9bbd33 SHA256 00f70a8e3f1efeb0db97ec5a0e12ef42fe59e6c92ea0a7478107b7f72e75f644
|
||||
EBUILD open-iscsi-2.0.871.ebuild 3149 RMD160 1999c962be1a5c8ac5da72703ba206faa30bda1e SHA1 d4742fd50339c3e62c06e67edb058dfa5f9bbd33 SHA256 00f70a8e3f1efeb0db97ec5a0e12ef42fe59e6c92ea0a7478107b7f72e75f644
|
||||
EBUILD open-iscsi-2.0.872.ebuild 2694 RMD160 783fc89613afaabb612d35d4d7b87f477bf519ae SHA1 a031330bc97b32706a4f1ecb65b0f66e8c14507f SHA256 5267999f27a15374b9125baf5ecdc114d668152f09306b6879ada32a693c519b
|
@ -1,31 +0,0 @@
|
||||
--- 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()
|
@ -1,31 +0,0 @@
|
||||
# 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/initiatorname.iscsi,v 1.2 2006/03/08 09:19:25 robbat2 Exp $
|
||||
#
|
||||
# This file must contain a InitiatorName entry!
|
||||
# white space is significent here!
|
||||
#InitiatorName=iqn.2005-09.tld.domain.hostname:openiscsi-initiator
|
||||
#InitiatorAlias=foobar
|
||||
|
||||
# Sample documentation follows:
|
||||
|
||||
# The InitiatorName should take the following format
|
||||
# iqn.${YEAR}-${MONTH}-${DOMAIN_REVERSED}.${HOSTNAME}:${UNIQUE_STRING}
|
||||
# Where YEAR and MONTH are the dates that your domain was registered.
|
||||
# You can use WHOIS to find when your domain was registered.
|
||||
# If you don't have a real domain in the outside world, invent one, but use
|
||||
# .local for your top-level.
|
||||
|
||||
# Example case #1:
|
||||
# This assumes you own foobar.co.uk.
|
||||
# Domain name: foobar.co.uk.
|
||||
# Registration date: March 2001
|
||||
# Hostname: linux
|
||||
# InitiatorName=iqn.2001-03.uk.co.foobar.linux:openiscsi-29b48ad602d5f83dd9cd9aa3ef741216
|
||||
|
||||
# Example case #2:
|
||||
# This assumes you don't have a domain of your own.
|
||||
# Domain name: foobar.local
|
||||
# Registration date: March 2001
|
||||
# Hostname: linux
|
||||
# InitiatorName=iqn.2001-03.local.foobar.linux:openiscsi-29b48ad602d5f83dd9cd9aa3ef741216
|
@ -1,13 +0,0 @@
|
||||
# /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}"
|
||||
|
||||
# Start automatic targets when iscsid is started
|
||||
AUTOSTARTTARGETS="yes"
|
@ -1,127 +0,0 @@
|
||||
#!/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/open-iscsi/files/iscsid-2.0.871-r1.init.d,v 1.1 2009/11/12 09:29:48 robbat2 Exp $
|
||||
|
||||
opts="${opts} starttargets stoptargets restarttargets"
|
||||
|
||||
depend() {
|
||||
after modules
|
||||
use net
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -e /etc/conf.d/${SVCNAME} ]; then
|
||||
eerror "Config file /etc/conf.d/${SVCNAME} does not exist!"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -e "${CONFIG_FILE}" ]; then
|
||||
eerror "Config file ${CONFIG_FILE} does not exist!"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -e ${INITIATORNAME_FILE} ] || [ ! "$(grep "^InitiatorName=iqn\." ${INITIATORNAME_FILE})" ]; 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
|
||||
modopts="$@"
|
||||
for m in ${modules}
|
||||
do
|
||||
if [ -n "$(modprobe -l | grep ${m})" ]
|
||||
then
|
||||
ebegin "${msg} ${m}"
|
||||
modprobe ${modopts} ${m}
|
||||
ret=$?
|
||||
eend ${ret}
|
||||
if [ ${ret} -ne 0 ]; then
|
||||
return ${ret}
|
||||
fi
|
||||
else
|
||||
ebegin "${msg} ${m}: not found"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Checking open-iSCSI configuration"
|
||||
checkconfig
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
eend 1
|
||||
return 1
|
||||
fi
|
||||
ebegin "Loading iSCSI modules"
|
||||
do_modules 'Loading' 'libiscsi scsi_transport_iscsi iscsi_tcp'
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
eend 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
ebegin "Starting ${SVCNAME}"
|
||||
start-stop-daemon --start --quiet --exec /usr/sbin/iscsid -- ${OPTS}
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
eend $?
|
||||
return $?
|
||||
fi
|
||||
|
||||
# Start automatic targets when iscsid is started
|
||||
if [ "${AUTOSTARTTARGETS}" = "yes" ]; then
|
||||
starttargets
|
||||
return $?
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
stop() {
|
||||
stoptargets
|
||||
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 libiscsi' '-r'
|
||||
eend $?
|
||||
}
|
||||
|
||||
starttargets() {
|
||||
ebegin "Setting up iSCSI targets"
|
||||
/usr/sbin/iscsiadm -m node --loginall=automatic
|
||||
ret=$?
|
||||
eend $ret
|
||||
return $ret
|
||||
}
|
||||
|
||||
stoptargets() {
|
||||
ebegin "Disconnecting iSCSI targets"
|
||||
sync
|
||||
/usr/sbin/iscsiadm -m node --logoutall=all
|
||||
ret=$?
|
||||
eend $ret
|
||||
return $ret
|
||||
}
|
||||
|
||||
restarttargets() {
|
||||
stoptargets
|
||||
starttargets
|
||||
}
|
||||
|
||||
status() {
|
||||
ebegin "Showing current active iSCSI sessions"
|
||||
/usr/sbin/iscsiadm -m session
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
# /etc/conf.d/iscsid
|
||||
|
||||
# If you built one or more of the iSCSI modules into
|
||||
# the monolithic part of the kernel, you have to
|
||||
# remove the relevant modules from the list below to
|
||||
# prevent the init script from trying to load them.
|
||||
LOAD_MODULES="scsi_transport_iscsi iscsi_tcp"
|
||||
|
@ -1,166 +0,0 @@
|
||||
#!/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.4 2006/03/07 08:26:46 robbat2 Exp $
|
||||
|
||||
PID_FILE=/var/run/iscsid.pid
|
||||
CONFIG_FILE=/etc/iscsi/iscsid.conf
|
||||
DUMP_DIR=/etc/iscsi
|
||||
DUMP_NODE="${DUMP_DIR}/node.dump"
|
||||
DUMP_DISCOVERY="${DUMP_DIR}/discovery.dump"
|
||||
INITIATORNAME=/etc/iscsi/initiatorname.iscsi
|
||||
DAEMON=/usr/sbin/iscsid
|
||||
ADM=/usr/sbin/iscsiadm
|
||||
NAME="iSCSI initiator service"
|
||||
if [ -x "/usr/bin/udevinfo" ] ; then
|
||||
UDEVINFO=/usr/bin/udevinfo
|
||||
else
|
||||
UDEVINFO="/sbin/udevadm info"
|
||||
fi
|
||||
|
||||
depend() {
|
||||
after modules
|
||||
use net
|
||||
before apache2 heimdal-kadmind heimdal-kdc mit-krb5kadmind mit-krb5kdc mysql postgresql radiusd samba slapd slurpd
|
||||
before zope*
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -f $CONFIG_FILE ]; then
|
||||
eerror "Config file $CONFIG_FILE does not exist!"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -f $INITIATORNAME -o -z "$(egrep '^InitiatorName=' "${INITIATORNAME}")" ]; then
|
||||
eerror "$INITIATORNAME should contain a string with your initiatior name, eg:"
|
||||
eerror "InitiatorName=iqn.2005-09.tld.domainname.hostname:initiator-name"
|
||||
eerror "Initiator name file does not exist!"
|
||||
return 1
|
||||
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
|
||||
if [ -n "${LOAD_MODULES}" ] ; then
|
||||
do_modules 'Loading iSCSI modules' "${LOAD_MODULES}"
|
||||
fi
|
||||
ret=$?
|
||||
[ $ret -ne 0 ] && return 1
|
||||
ebegin "Starting ${NAME}"
|
||||
start-stop-daemon --start --exec $DAEMON --quiet -- -i $INITIATORNAME
|
||||
ret=$?
|
||||
eend $ret
|
||||
|
||||
ebegin "Logging in to all automatic nodes"
|
||||
${ADM} -m node -L automatic
|
||||
ret=$?
|
||||
eend $ret
|
||||
|
||||
sleep 5
|
||||
|
||||
einfo "Mounting all disks with entries in /etc/fstab"
|
||||
|
||||
NUM_PARTS=0
|
||||
ISCSI_SESSION="`iscsiadm -m session -P 3 2>/dev/null | grep 'Attached scsi disk ' | grep 'State: running$'`"
|
||||
if [ "x${?}" == "x0" ] ; then
|
||||
DISKS="`echo ${ISCSI_SESSION} | awk '{ print }' | sed -e 's@Attached scsi disk @@g' -e 's@State: running@@g'`"
|
||||
|
||||
for DISK in ${DISKS} ; do
|
||||
(( NUM_PARTS += 1 ))
|
||||
PARTITIONS[NUM_PARTS]="`find /dev -name \"${DISK}[0-9]*\" | grep -v '\.udev/'` ${PARTITIONS}"
|
||||
done
|
||||
fi
|
||||
|
||||
for PARTITION in ${PARTITIONS[@]} ; do
|
||||
IN_FSTAB=""
|
||||
|
||||
PART_LABEL_RAW="`${UDEVINFO} -q env -n ${PARTITION} 2>/dev/null | grep '^ID_FS_LABEL='`"
|
||||
if [ "${PART_LABEL_RAW}x" != "x" ] ; then
|
||||
PART_LABEL="`echo ${PART_LABEL_RAW} | awk -F '=' '{ print $2; }'`"
|
||||
IN_FSTAB="`grep ${PART_LABEL} /etc/fstab`"
|
||||
fi
|
||||
|
||||
if [ "x${IN_FSTAB}" != "x" ] ; then
|
||||
ebegin "Mounting disk ${PART_LABEL}"
|
||||
mount -s /dev/disk/by-label/${PART_LABEL}
|
||||
eend $?
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${#PARTITIONS[*]}" == "0" ] ; then
|
||||
einfo "No automatic nodes or attached disks found!"
|
||||
ret=0
|
||||
fi
|
||||
|
||||
return $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
NETDEV_GREP="`grep _netdev /etc/mtab`"
|
||||
|
||||
if [ "x${?}" == "x0" ] ; then
|
||||
ebegin "Unmounting all disks with entries in /etc/mtab"
|
||||
|
||||
ISCSI_MOUNTS="`echo ${NETDEV_GREP} | awk '{ print $1; }'`"
|
||||
for ISCSI_MOUNT in "${ISCSI_MOUNTS}" ; do
|
||||
umount ${ISCSI_MOUNT}
|
||||
done
|
||||
|
||||
ret=$?
|
||||
eend $ret
|
||||
fi
|
||||
|
||||
ebegin "Logging out of all nodes"
|
||||
${ADM} -m node -U all
|
||||
ret=$?
|
||||
eend $ret
|
||||
|
||||
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
|
||||
|
||||
do_modules 'Removing iSCSI modules' 'iscsi_tcp scsi_transport_iscsi' '-r'
|
||||
ret=$?
|
||||
return $ret
|
||||
}
|
||||
|
||||
opts="${opts} dump"
|
||||
|
||||
dump() {
|
||||
einfo "Starting dump of iscsid database (nodes)"
|
||||
NODELIST="$(iscsiadm -m node | awk -F '[\\[\\]]' '{print $2}')"
|
||||
[ -f ${DUMP_NODE} ] && mv -f ${DUMP_NODE} ${DUMP_NODE}.old
|
||||
for i in $NODELIST ; do
|
||||
echo "# $(iscsiadm -m node | egrep "^\[$i\]")" >>${DUMP_NODE}
|
||||
iscsiadm -m node --record=$i >>${DUMP_NODE}
|
||||
echo >>${DUMP_NODE}
|
||||
done
|
||||
einfo "Starting dump of iscsid database (discovery)"
|
||||
DISCOVERYLIST="$(iscsiadm -m discovery | awk -F '[\\[\\]]' '{print $2}')"
|
||||
[ -f ${DUMP_DISCOVERY} ] && mv -f ${DUMP_DISCOVERY} ${DUMP_DISCOVERY}.old
|
||||
for i in $DISCOVERYLIST ; do
|
||||
echo "# $(iscsiadm -m discovery | egrep "^\[$i\]")" >>${DUMP_DISCOVERY}
|
||||
iscsiadm -m discovery --record=$i >>${DUMP_DISCOVERY}
|
||||
echo >>${DUMP_DISCOVERY}
|
||||
done
|
||||
|
||||
einfo "Config dumped to ${DUMP_DIR}/"
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
diff -Nuar open-iscsi-2.0-871.orig/usr/Makefile open-iscsi-2.0-871/usr/Makefile
|
||||
--- open-iscsi-2.0-871.orig/usr/Makefile 2009-07-10 20:55:58.000000000 -0700
|
||||
+++ open-iscsi-2.0-871/usr/Makefile 2009-11-12 00:58:16.467960344 -0800
|
||||
@@ -48,14 +48,14 @@
|
||||
all: $(PROGRAMS)
|
||||
|
||||
iscsid: $(COMMON_SRCS) $(IPC_OBJ) $(INITIATOR_SRCS) iscsid.o
|
||||
- $(CC) $(CFLAGS) $^ -o $@
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
||||
|
||||
iscsiadm: $(COMMON_SRCS) $(FW_BOOT_SRCS) strings.o discovery.o iscsiadm.o
|
||||
- $(CC) $(CFLAGS) $^ -o $@
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
||||
|
||||
iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
|
||||
iscsistart.o statics.o
|
||||
- $(CC) $(CFLAGS) -static $^ -o $@
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
||||
clean:
|
||||
rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
|
||||
|
||||
diff -Nuar open-iscsi-2.0-871.orig/utils/Makefile open-iscsi-2.0-871/utils/Makefile
|
||||
--- open-iscsi-2.0-871.orig/utils/Makefile 2009-07-10 20:55:58.000000000 -0700
|
||||
+++ open-iscsi-2.0-871/utils/Makefile 2009-11-12 00:58:56.404623435 -0800
|
||||
@@ -6,7 +6,7 @@
|
||||
all: $(PROGRAMS)
|
||||
|
||||
iscsi-iname: md5.o iscsi-iname.o
|
||||
- $(CC) $(CFLAGS) $^ $(DBM_LIB) -o $@
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(DBM_LIB) $^
|
||||
|
||||
clean:
|
||||
rm -f *.o $(PROGRAMS) .depend
|
@ -1,80 +0,0 @@
|
||||
# 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.2 2006/05/23 01:55:46 robbat2 Exp $
|
||||
|
||||
inherit versionator linux-mod eutils flag-o-matic
|
||||
|
||||
DESCRIPTION="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"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64 ~ppc"
|
||||
IUSE="debug module"
|
||||
RDEPEND="virtual/modutils
|
||||
sys-apps/util-linux"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/linux-sources"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MODULE_NAMES_ARG="kernel/drivers/scsi:${S}/kernel"
|
||||
MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) libiscsi(${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_compile() {
|
||||
if use module; then
|
||||
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"
|
||||
fi
|
||||
einfo "Building userspace"
|
||||
cd usr && emake || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use module; then
|
||||
einfo "Installing kernel modules"
|
||||
export KSRC="${KERNEL_DIR}"
|
||||
linux-mod_src_install
|
||||
fi
|
||||
|
||||
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/iscsi
|
||||
doins etc/iscsid.conf
|
||||
doins ${FILESDIR}/initiatorname.iscsi
|
||||
insinto /etc/conf.d
|
||||
newins ${FILESDIR}/iscsid-conf.d iscsid
|
||||
newinitd ${FILESDIR}/iscsid-init.d iscsid
|
||||
|
||||
# security
|
||||
keepdir /var/db/iscsi
|
||||
fperms 700 /var/db/iscsi
|
||||
fperms 600 /etc/iscsi/iscsid.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use module && linux-mod_pkg_postinst
|
||||
[ -d ${ROOT}/var/db/iscsi ] && chmod 700 ${ROOT}/var/db/iscsi
|
||||
[ -f ${ROOT}/etc/iscsi/iscsid.conf ] && chmod 600 ${ROOT}/etc/iscsi/iscsid.conf
|
||||
ewarn "This new version of open-iscsi is not compatible with the"
|
||||
ewarn "open-iscsi-1.0-485 release. You must upgrade your tools and you must"
|
||||
ewarn "clear your old DB."
|
||||
ewarn "To remove your old DB run: iscsiadm -m db --remove"
|
||||
ebeep
|
||||
epause 5
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
# 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.870-r1.ebuild,v 1.1 2008/12/06 16:57:10 dertobi123 Exp $
|
||||
|
||||
inherit versionator linux-mod eutils flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720"
|
||||
HOMEPAGE="http://www.open-iscsi.org/"
|
||||
MY_PV="${PN}-$(replace_version_separator 2 "-" $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}" CC="$(tc-getCC)" \
|
||||
|| die "emake failed"
|
||||
|
||||
einfo "Building userspace"
|
||||
cd "${S}"/usr && \
|
||||
CFLAGS="" emake OPTFLAGS="${CFLAGS}" CC="$(tc-getCC)" \
|
||||
|| die "emake failed"
|
||||
|
||||
if use utils; then
|
||||
einfo "Building utils"
|
||||
cd "${S}"/utils && \
|
||||
CFLAGS="" emake OPTFLAGS="${CFLAGS}" CC="$(tc-getCC)" \
|
||||
|| 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-conf.d iscsid
|
||||
newinitd "${FILESDIR}"/iscsid-init.d iscsid
|
||||
|
||||
keepdir /var/db/iscsi
|
||||
fperms 700 /var/db/iscsi
|
||||
fperms 600 /etc/iscsi/iscsid.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
}
|
@ -1,117 +0,0 @@
|
||||
# Copyright 1999-2009 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.870.3.ebuild,v 1.2 2009/03/20 18:36:32 mr_bones_ 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="${PN}-$(replace_version_separator 2 "-" $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
|
||||
|
||||
# only contains iscsi initiatorname, no need to update
|
||||
if [ ! -e /etc/iscsi/initiatorname.iscsi ]; then
|
||||
doins "${FILESDIR}"/initiatorname.iscsi
|
||||
fi
|
||||
|
||||
# if there is a special conf.d for this version, use it
|
||||
# otherwise, use the default: iscsid-conf.d
|
||||
insinto /etc/conf.d
|
||||
if [ -e "${FILESDIR}"/iscsid-${PV}.conf.d ]; then
|
||||
newins "${FILESDIR}"/iscsid-${PV}.conf.d iscsid
|
||||
else
|
||||
newins "${FILESDIR}"/iscsid-conf.d iscsid
|
||||
fi
|
||||
|
||||
# same for init.d
|
||||
if [ -e "${FILESDIR}"/iscsid-${PV}.init.d ]; then
|
||||
newinitd "${FILESDIR}"/iscsid-${PV}.init.d iscsid
|
||||
else
|
||||
newinitd "${FILESDIR}"/iscsid-init.d iscsid
|
||||
fi
|
||||
|
||||
keepdir /var/db/iscsi
|
||||
fperms 700 /var/db/iscsi
|
||||
fperms 600 /etc/iscsi/iscsid.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
# Copyright 1999-2009 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.871.ebuild,v 1.2 2009/10/28 16:49:50 dertobi123 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="${PN}-$(replace_version_separator 2 "-" $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="utils debug"
|
||||
DEPEND="virtual/linux-sources"
|
||||
RDEPEND="${DEPEND}
|
||||
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"
|
||||
CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
|
||||
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() {
|
||||
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
|
||||
epatch "${FILESDIR}"/CVE-2009-1297.patch
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
|
||||
|
||||
einfo "Building userspace"
|
||||
cd "${S}" && \
|
||||
CFLAGS="" emake OPTFLAGS="${CFLAGS}" user \
|
||||
|| die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
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
|
||||
insinto /etc/iscsi/ifaces
|
||||
doins etc/iface.example
|
||||
|
||||
# only contains iscsi initiatorname, no need to update
|
||||
if [ ! -e /etc/iscsi/initiatorname.iscsi ]; then
|
||||
doins "${FILESDIR}"/initiatorname.iscsi
|
||||
fi
|
||||
|
||||
# if there is a special conf.d for this version, use it
|
||||
# otherwise, use the default: iscsid-conf.d
|
||||
insinto /etc/conf.d
|
||||
if [ -e "${FILESDIR}"/iscsid-${PV}.conf.d ]; then
|
||||
newins "${FILESDIR}"/iscsid-${PV}.conf.d iscsid
|
||||
else
|
||||
newins "${FILESDIR}"/iscsid-conf.d iscsid
|
||||
fi
|
||||
|
||||
# same for init.d
|
||||
if [ -e "${FILESDIR}"/iscsid-${PV}.init.d ]; then
|
||||
newinitd "${FILESDIR}"/iscsid-${PV}.init.d iscsid
|
||||
else
|
||||
newinitd "${FILESDIR}"/iscsid-init.d iscsid
|
||||
fi
|
||||
|
||||
keepdir /var/db/iscsi
|
||||
fperms 700 /var/db/iscsi
|
||||
fperms 600 /etc/iscsi/iscsid.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
# Copyright 1999-2009 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.871.ebuild,v 1.2 2009/10/28 16:49:50 dertobi123 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="${PN}-$(replace_version_separator 2 "-" $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="utils debug"
|
||||
DEPEND="virtual/linux-sources"
|
||||
RDEPEND="${DEPEND}
|
||||
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"
|
||||
CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
|
||||
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() {
|
||||
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
|
||||
epatch "${FILESDIR}"/CVE-2009-1297.patch
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
|
||||
|
||||
einfo "Building userspace"
|
||||
cd "${S}" && \
|
||||
CFLAGS="" emake OPTFLAGS="${CFLAGS}" user \
|
||||
|| die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
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
|
||||
insinto /etc/iscsi/ifaces
|
||||
doins etc/iface.example
|
||||
|
||||
# only contains iscsi initiatorname, no need to update
|
||||
if [ ! -e /etc/iscsi/initiatorname.iscsi ]; then
|
||||
doins "${FILESDIR}"/initiatorname.iscsi
|
||||
fi
|
||||
|
||||
# if there is a special conf.d for this version, use it
|
||||
# otherwise, use the default: iscsid-conf.d
|
||||
insinto /etc/conf.d
|
||||
if [ -e "${FILESDIR}"/iscsid-${PV}.conf.d ]; then
|
||||
newins "${FILESDIR}"/iscsid-${PV}.conf.d iscsid
|
||||
else
|
||||
newins "${FILESDIR}"/iscsid-conf.d iscsid
|
||||
fi
|
||||
|
||||
# same for init.d
|
||||
if [ -e "${FILESDIR}"/iscsid-${PV}.init.d ]; then
|
||||
newinitd "${FILESDIR}"/iscsid-${PV}.init.d iscsid
|
||||
else
|
||||
newinitd "${FILESDIR}"/iscsid-init.d iscsid
|
||||
fi
|
||||
|
||||
keepdir /var/db/iscsi
|
||||
fperms 700 /var/db/iscsi
|
||||
fperms 600 /etc/iscsi/iscsid.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
# Copyright 1999-2010 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.871.3.ebuild,v 1.2 2010/03/31 23:19:39 robbat2 Exp $
|
||||
|
||||
EAPI=2
|
||||
inherit versionator linux-info eutils flag-o-matic git
|
||||
|
||||
DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720"
|
||||
HOMEPAGE="http://www.open-iscsi.org/"
|
||||
#SRC_URI="mirror://kernel/linux/kernel/people/mnc/open-iscsi/releases/${P}.tar.gz"
|
||||
|
||||
SRC_URI=""
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/mnc/open-iscsi.git"
|
||||
EGIT_COMMIT="fef28e39efcacad2dcbad4b94f95fe5dbfbcf068"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
|
||||
IUSE="debug"
|
||||
DEPEND=""
|
||||
RDEPEND="${DEPEND}
|
||||
sys-apps/util-linux"
|
||||
|
||||
pkg_setup() {
|
||||
linux-info_pkg_setup
|
||||
|
||||
if [ $KV_PATCH -lt 15 ]; then
|
||||
die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
|
||||
fi
|
||||
|
||||
# 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!
|
||||
CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
|
||||
if linux_config_exists; then
|
||||
for module in ${CONFIG_CHECK_MODULES}; do
|
||||
linux_chkconfig_module ${module} || die "${module} needs to be built as module (builtin doesn't work)"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
#src_prepare() {
|
||||
# export EPATCH_OPTS="-d${S}"
|
||||
# epatch "${FILESDIR}"/CVE-2009-1297.patch
|
||||
# epatch "${FILESDIR}"/${PN}-2.0.871-makefile-cleanup.patch
|
||||
#}
|
||||
|
||||
src_compile() {
|
||||
use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
|
||||
|
||||
einfo "Building userspace"
|
||||
cd "${S}" && \
|
||||
CFLAGS="" emake OPTFLAGS="${CFLAGS}" user \
|
||||
|| die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einfo "Installing userspace"
|
||||
dosbin usr/iscsid usr/iscsiadm usr/iscsistart
|
||||
|
||||
einfo "Installing utilities"
|
||||
dosbin utils/iscsi-iname utils/iscsi_discovery
|
||||
|
||||
einfo "Installing docs"
|
||||
doman doc/*[1-8]
|
||||
dodoc README THANKS
|
||||
docinto test
|
||||
dodoc test/*
|
||||
|
||||
einfo "Installing configuration"
|
||||
insinto /etc/iscsi
|
||||
doins etc/iscsid.conf
|
||||
newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example
|
||||
insinto /etc/iscsi/ifaces
|
||||
doins etc/iface.example
|
||||
|
||||
newconfd "${FILESDIR}"/iscsid-2.0.871-r1.conf.d iscsid
|
||||
newinitd "${FILESDIR}"/iscsid-2.0.871-r1.init.d iscsid
|
||||
|
||||
keepdir /var/db/iscsi
|
||||
fperms 700 /var/db/iscsi
|
||||
fperms 600 /etc/iscsi/iscsid.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
in='/etc/iscsi/initiatorname.iscsi'
|
||||
if [ ! -f "${ROOT}${in}" -a -f "${ROOT}${in}.example" ]; then
|
||||
cp -f "${ROOT}${in}.example" "${ROOT}${in}"
|
||||
fi
|
||||
}
|
Loading…
Reference in New Issue
Block a user