summaryrefslogtreecommitdiff
path: root/network/iscsitarget
diff options
context:
space:
mode:
Diffstat (limited to 'network/iscsitarget')
-rw-r--r--network/iscsitarget/doinst.sh13
-rw-r--r--network/iscsitarget/iscsi-target-1.4.19-add-CFLAGS.patch8
-rw-r--r--network/iscsitarget/iscsitarget-0.4.17-2.6.29.patch79
-rw-r--r--network/iscsitarget/iscsitarget-0.4.17-add_OPTS_cflags.patch9
-rw-r--r--network/iscsitarget/iscsitarget.SlackBuild40
-rw-r--r--network/iscsitarget/iscsitarget.info6
-rw-r--r--network/iscsitarget/rc.iscsi-target.new (renamed from network/iscsitarget/rc.iscsi-target)9
7 files changed, 41 insertions, 123 deletions
diff --git a/network/iscsitarget/doinst.sh b/network/iscsitarget/doinst.sh
index 09c804906d..9ff0023984 100644
--- a/network/iscsitarget/doinst.sh
+++ b/network/iscsitarget/doinst.sh
@@ -20,10 +20,17 @@ else
# Install executable otherwise - irrelevant unless user starts in rc.local
chmod 0755 etc/rc.d/rc.iscsi-target.new
fi
+
+if [ -f /etc/ietd.conf ];then
+echo -en "\n\n\n!! iSCSI-target has recently changed the default location for conf files !!\n"
+echo -en "The new location for conf files is now at /etc/iet\n"
+echo -en "Furthermore the conf file initiators.deny is obsolete. \nFor futher info read the Man page\n\n\n"
+fi
+
config etc/rc.d/rc.iscsi-target.new
-config etc/initiators.deny.new
-config etc/initiators.allow.new
-config etc/ietd.conf.new
+config etc/iet/ietd.conf.new
+config etc/iet/targets.allow.new
+config etc/iet/initiators.allow.new
chroot . depmod -a @KERNEL@ 2>/dev/null 1>/dev/null
diff --git a/network/iscsitarget/iscsi-target-1.4.19-add-CFLAGS.patch b/network/iscsitarget/iscsi-target-1.4.19-add-CFLAGS.patch
new file mode 100644
index 0000000000..79ec4b48f0
--- /dev/null
+++ b/network/iscsitarget/iscsi-target-1.4.19-add-CFLAGS.patch
@@ -0,0 +1,8 @@
+--- iscsitarget-1.4.19-source/usr/Makefile 2008-06-19 00:10:19.000000000 +0100
++++ iscsitarget-1.4.19/usr/Makefile 2010-01-09 17:32:28.000000000 +0000
+@@ -1,4 +1,4 @@
+-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
++CFLAGS += @ARCH@ -fno-inline -Wall -Wstrict-prototypes -g -I../include
+ CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8
+ PROGRAMS = ietd ietadm
+ LIBS = -lcrypto
diff --git a/network/iscsitarget/iscsitarget-0.4.17-2.6.29.patch b/network/iscsitarget/iscsitarget-0.4.17-2.6.29.patch
deleted file mode 100644
index 3c222d35b5..0000000000
--- a/network/iscsitarget/iscsitarget-0.4.17-2.6.29.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-Fix build with 2.6.29.
-
-Addresses these changes:
-http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=30c40d2c01f68c7eb1a41ab3552bdaf5dbf300d4;hp=9a1c3542768b5a58e45a9216921cd10a3bae1205
-http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b189db5d299c6824780af5590564ff608adb3dea;hp=a20fd0a783551831bb6b9b69710e5bbb93dc2730
-Lubomir Rintel <lkundrak@v3.sk>
-
-Index: kernel/block-io.c
-===================================================================
---- kernel/block-io.c (revision 198)
-+++ kernel/block-io.c (working copy)
-@@ -13,6 +13,7 @@
- #include <linux/blkdev.h>
- #include <linux/parser.h>
- #include <linux/buffer_head.h>
-+#include <linux/version.h>
-
- #include "iscsi.h"
- #include "iscsi_dbg.h"
-@@ -154,14 +155,22 @@
- {
- struct blockio_data *bio_data = volume->private;
- struct block_device *bdev;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
- int flags = LUReadonly(volume) ? MS_RDONLY : 0;
-+#else
-+ fmode_t flags = LUReadonly(volume) ? FMODE_READ : (FMODE_READ | FMODE_WRITE);
-+#endif
- int err = 0;
-
- bio_data->path = kstrdup(path, GFP_KERNEL);
- if (!bio_data->path)
- return -ENOMEM;
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
- bdev = open_bdev_excl(path, flags, THIS_MODULE);
-+#else
-+ bdev = open_bdev_exclusive(path, flags, THIS_MODULE);
-+#endif
- if (IS_ERR(bdev)) {
- err = PTR_ERR(bdev);
- eprintk("Can't open device %s, error %d\n", path, err);
-@@ -324,8 +333,17 @@
- {
- struct blockio_data *bio_data = volume->private;
-
-- if (bio_data->bdev)
-+ if (bio_data->bdev) {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
- close_bdev_excl(bio_data->bdev);
-+#else
-+ if (LUReadonly(volume)) {
-+ close_bdev_exclusive(bio_data->bdev, FMODE_READ);
-+ } else {
-+ close_bdev_exclusive(bio_data->bdev, FMODE_READ|FMODE_WRITE);
-+ }
-+#endif
-+ }
- kfree(bio_data->path);
-
- kfree(volume->private);
-Index: kernel/conn.c
-===================================================================
---- kernel/conn.c (revision 198)
-+++ kernel/conn.c (working copy)
-@@ -46,9 +46,13 @@
- "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->daddr));
- break;
- case AF_INET6:
-+#ifdef NIP6
- snprintf(buf, sizeof(buf),
- "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]",
- NIP6(inet6_sk(sk)->daddr));
-+#else
-+ snprintf(buf, sizeof(buf), "[%p6]", &inet6_sk(sk)->daddr);
-+#endif
- break;
- default:
- break;
diff --git a/network/iscsitarget/iscsitarget-0.4.17-add_OPTS_cflags.patch b/network/iscsitarget/iscsitarget-0.4.17-add_OPTS_cflags.patch
deleted file mode 100644
index 06e38544d6..0000000000
--- a/network/iscsitarget/iscsitarget-0.4.17-add_OPTS_cflags.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -Nur iscsitarget-0.4.17.orig/usr/Makefile iscsitarget-0.4.17/usr/Makefile
---- iscsitarget-0.4.17.orig/usr/Makefile 2008-06-18 18:10:19.000000000 -0500
-+++ iscsitarget-0.4.17/usr/Makefile 2009-10-10 22:09:54.221991340 -0500
-@@ -1,4 +1,4 @@
--CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
-+CFLAGS += $(OPTS) -fno-inline -Wall -Wstrict-prototypes -g -I../include
- CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8
- PROGRAMS = ietd ietadm
- LIBS = -lcrypto
diff --git a/network/iscsitarget/iscsitarget.SlackBuild b/network/iscsitarget/iscsitarget.SlackBuild
index 04c0b820a3..9b3f5f6ee7 100644
--- a/network/iscsitarget/iscsitarget.SlackBuild
+++ b/network/iscsitarget/iscsitarget.SlackBuild
@@ -4,7 +4,7 @@
# ===========================
# By: Thales A. Tsailas <ttsailas@enforcingit.com>
# For: iSCSI target
-# Descr: Provides an open source professional iSCSI target solution for Linux
+# Descr: Provides an iSCSI target solution for Linux
# URL: http://iscsitarget.sourceforge.net/
#
# All rights reserved.
@@ -27,7 +27,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=iscsitarget
-VERSION=0.4.17
+VERSION=1.4.19
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -41,13 +41,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- SRCARCH=x86 # Needed for the kernel module building
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- SRCARCH=x86 # Needed for the kernel module building
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- SRCARCH=x86 # Needed for the kernel module building
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -61,29 +61,25 @@ cd $TMP/$PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
-# Patch the source to fix compiling issue with 2.6.29 kernels
-patch -p0 < $CWD/iscsitarget-0.4.17-2.6.29.patch
-
+# Set right ARCH on SLKCFLAGS patch
# Allow use of our SLKCFLAGS for the non-kernel parts
-patch -p1 < $CWD/iscsitarget-0.4.17-add_OPTS_cflags.patch
+sed "s/@ARCH@/$SLKCFLAGS/" $CWD/iscsi-target-1.4.19-add-CFLAGS.patch | patch -p1 || exit 1
make \
- OPTS="$SLKCFLAGS" \
MANDIR=/usr/man \
DOCDIR=/usr/doc/$PRGNAM-$VERSION \
- KSRC=/lib/modules/$KERNEL/build \
- SRCARCH=$SRCARCH
+ KSRC=/lib/modules/$KERNEL/build
make install \
MANDIR=/usr/man \
DOCDIR=/usr/doc/$PRGNAM-$VERSION \
KSRC=/lib/modules/$KERNEL/build \
DISTDIR=$PKG
-# Rename init script and don't clobber existing config files on upgrade
-mv $PKG/etc/rc.d/iscsi-target $PKG/etc/rc.d/rc.iscsi-target.new
-mv $PKG/etc/initiators.deny $PKG/etc/initiators.deny.new
-mv $PKG/etc/initiators.allow $PKG/etc/initiators.allow.new
-mv $PKG/etc/ietd.conf $PKG/etc/ietd.conf.new
+# Scrap original init file and don't clobber existing config files on upgrade
+cat $CWD/rc.iscsi-target.new > $PKG/etc/rc.d/rc.iscsi-target.new
+mv $PKG/etc/iet/ietd.conf $PKG/etc/iet/ietd.conf.new
+mv $PKG/etc/iet/initiators.allow $PKG/etc/iet/initiators.allow.new
+mv $PKG/etc/iet/targets.allow $PKG/etc/iet/targets.allow.new
# Add the build script to the docs
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -91,12 +87,8 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Remove some cruft that shouldn't be in the package
rm -f $PKG/lib/modules/$KERNEL/modules*
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null
-)
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
( cd $PKG/usr/man || exit 1
find . -type f -exec gzip -9 {} \;
@@ -105,7 +97,7 @@ rm -f $PKG/lib/modules/$KERNEL/modules*
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-sed "s%@KERNEL@%$KERNEL%" $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/iscsitarget/iscsitarget.info b/network/iscsitarget/iscsitarget.info
index e4fc070e4e..012d269ec1 100644
--- a/network/iscsitarget/iscsitarget.info
+++ b/network/iscsitarget/iscsitarget.info
@@ -1,8 +1,8 @@
PRGNAM="iscsitarget"
-VERSION="0.4.17"
+VERSION="1.4.19"
HOMEPAGE="http://iscsitarget.sourceforge.net/"
-DOWNLOAD="http://downloads.sourceforge.net/iscsitarget/iscsitarget-0.4.17.tar.gz"
-MD5SUM="e79b437695fc50e7d054631855a16b1b"
+DOWNLOAD="http://download.sourceforge.net/iscsitarget/iscsitarget-1.4.19.tar.gz"
+MD5SUM="9beca214c28949cce1716b49fec57de4"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Thales A. Tsailas"
diff --git a/network/iscsitarget/rc.iscsi-target b/network/iscsitarget/rc.iscsi-target.new
index 6fac6c7575..acfbe38c85 100644
--- a/network/iscsitarget/rc.iscsi-target
+++ b/network/iscsitarget/rc.iscsi-target.new
@@ -1,12 +1,12 @@
#!/bin/bash
+# Written by Thales A. Tsailas <ttsailas@enforcingit.com>
# Init script for the iSCSI Enterprise Target.
# http://iscsitarget.sourceforge.net/
-
-# Written by Thales A. Tsailas For Slackware Linux
+# For Slackware Linux
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-CONF=/etc/ietd.conf
+CONF=/etc/iet/ietd.conf
PID=$(pidof ietd)
RETVAL=0
@@ -17,8 +17,7 @@ start()
if [ ! "$PID" = '' ]; then
echo -en "iSCSI enterprise target is already running\n"
else
- echo -en "Loading iSCSI enterprise target modules\n"
- modprobe -q crc32c
+ echo -en "Loading iSCSI enterprise target module\n"
modprobe iscsi_trgt
echo -en "Starting iSCSI enterprise target..."
/usr/sbin/ietd -c $CONF