summaryrefslogtreecommitdiffstats
path: root/network/open-iscsi
diff options
context:
space:
mode:
Diffstat (limited to 'network/open-iscsi')
-rw-r--r--network/open-iscsi/doinst.sh13
-rw-r--r--network/open-iscsi/include_sysmacros.patch11
-rw-r--r--network/open-iscsi/open-iscsi.SlackBuild32
-rw-r--r--network/open-iscsi/open-iscsi.info6
-rw-r--r--network/open-iscsi/remove_werror.patch24
5 files changed, 59 insertions, 27 deletions
diff --git a/network/open-iscsi/doinst.sh b/network/open-iscsi/doinst.sh
index 718295b2e7..a4797f0184 100644
--- a/network/open-iscsi/doinst.sh
+++ b/network/open-iscsi/doinst.sh
@@ -1,16 +1,19 @@
+# 20230620 bkw: reverted this to the config() function from SBo
+# template. Please leave this as-is. It works, and it won't confuse
+# us (we have over 8000 scripts to look after...)
config() {
- NEW="${1}.new"
- OLD="$1"
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
- elif [ "$(md5sum <$OLD)" = "$(md5sum <$NEW)" ]; then
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/iscsi/iscsid.conf
-config etc/iscsi/initiatorname.iscsi
+config etc/iscsi/iscsid.conf.new
+config etc/iscsi/initiatorname.iscsi.new
diff --git a/network/open-iscsi/include_sysmacros.patch b/network/open-iscsi/include_sysmacros.patch
index 75a7231321..6e357faef3 100644
--- a/network/open-iscsi/include_sysmacros.patch
+++ b/network/open-iscsi/include_sysmacros.patch
@@ -20,14 +20,3 @@ diff -Naur open-iscsi-2.0.875.orig/iscsiuio/src/unix/libs/bnx2x.c open-iscsi-2.0
#include "config.h"
-diff -Naur open-iscsi-2.0.875.orig/iscsiuio/src/unix/libs/qedi.c open-iscsi-2.0.875/iscsiuio/src/unix/libs/qedi.c
---- open-iscsi-2.0.875.orig/iscsiuio/src/unix/libs/qedi.c 2017-09-01 20:05:23.000000000 +0200
-+++ open-iscsi-2.0.875/iscsiuio/src/unix/libs/qedi.c 2019-09-06 14:29:00.780039000 +0200
-@@ -58,6 +58,7 @@
- #include <sys/user.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#include <sys/sysmacros.h>
-
- #include "config.h"
-
diff --git a/network/open-iscsi/open-iscsi.SlackBuild b/network/open-iscsi/open-iscsi.SlackBuild
index 54dda75cd6..fe0c9a4274 100644
--- a/network/open-iscsi/open-iscsi.SlackBuild
+++ b/network/open-iscsi/open-iscsi.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for open-iscsi
# Copyright 2019 Wayne Cuddy USA
+# Copyright 2021 Mario Preksavec, Zagreb, Croatia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,14 +23,21 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230620 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - Fix doinst.sh (conf files were missing .new suffix).
+# - Do not install /usr/include headers with +x permission.
+
#
# 2019/09/08 - add patch to support building on Slackware "current"
#
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=open-iscsi
-VERSION=${VERSION:-2.0.875}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-2.1.5}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,7 +47,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -70,16 +82,20 @@ cd $PRGNAM-$VERSION
# Allow this SB to work on "current", benign on 14.2.
patch -p1 <$CWD/include_sysmacros.patch
+patch -p1 <$CWD/remove_werror.patch
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
-make
+make OPTFLAGS="-DNO_SYSTEMD" NO_SYSTEMD=1
make install DESTDIR=$PKG
+chmod -x $PKG/usr/include/*.h
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -115,4 +131,4 @@ mkdir -p $PKG/etc/rc.d
cat $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/network/open-iscsi/open-iscsi.info b/network/open-iscsi/open-iscsi.info
index 1b71602177..ea87d3944b 100644
--- a/network/open-iscsi/open-iscsi.info
+++ b/network/open-iscsi/open-iscsi.info
@@ -1,8 +1,8 @@
PRGNAM="open-iscsi"
-VERSION="2.0.875"
+VERSION="2.1.5"
HOMEPAGE="https://github.com/open-iscsi/open-iscsi"
-DOWNLOAD="https://github.com/open-iscsi/open-iscsi/archive/2.0.875/open-iscsi-2.0.875.tar.gz"
-MD5SUM="982e48181411365fa11b3364cf91a977"
+DOWNLOAD="https://github.com/open-iscsi/open-iscsi/archive/2.1.5/open-iscsi-2.1.5.tar.gz"
+MD5SUM="fcde2e39f3bec7b668751035987fdc35"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="open-isns"
diff --git a/network/open-iscsi/remove_werror.patch b/network/open-iscsi/remove_werror.patch
new file mode 100644
index 0000000000..03164c9a59
--- /dev/null
+++ b/network/open-iscsi/remove_werror.patch
@@ -0,0 +1,24 @@
+--- open-iscsi-2.1.1/libopeniscsiusr/Makefile.orig 2020-02-26 20:07:13.000000000 +0100
++++ open-iscsi-2.1.1/libopeniscsiusr/Makefile 2020-07-14 18:13:07.144477155 +0200
+@@ -44,7 +44,7 @@
+ OBJS = context.o misc.o session.o sysfs.o iface.o idbm.o node.o default.o
+
+ CFLAGS ?= -O2 -g
+-CFLAGS += -Wall -Werror -Wextra -fvisibility=hidden -fPIC
++CFLAGS += -Wall -Wextra -fvisibility=hidden -fPIC
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod)
+
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod)
+
+--- open-iscsi-2.1.1/usr/Makefile 2020-02-26 20:07:13.000000000 +0100
++++ open-iscsi-2.1.1/usr/Makefile 2020-07-14 17:56:48.298477155 +0200
+@@ -35,7 +35,7 @@
+ PKG_CONFIG = /usr/bin/pkg-config
+
+ CFLAGS ?= -O2 -g
+-WARNFLAGS ?= -Wall -Wextra -Werror -Wstrict-prototypes -fno-common
++WARNFLAGS ?= -Wall -Wextra -Wstrict-prototypes -fno-common
+ CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \
+ -I$(TOPDIR)/libopeniscsiusr
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod)
+