summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson <urchlay@slackware.uk>2023-06-20 03:36:59 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-06-23 07:48:05 +0700
commitdcbef36c9809dfb91f5b8378d1e5be46cb7dd9e7 (patch)
treecdebbd58e68e5a782f36be30b87454c3a89d29ad
parentbd81ae28fbb4afb302db384a67405b9161dae07f (diff)
downloadslackbuilds-dcbef36c9809dfb91f5b8378d1e5be46cb7dd9e7.tar.gz
slackbuilds-dcbef36c9809dfb91f5b8378d1e5be46cb7dd9e7.tar.xz
network/open-iscsi: Fix doinst, install headers -x.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--network/open-iscsi/doinst.sh13
-rw-r--r--network/open-iscsi/open-iscsi.SlackBuild15
2 files changed, 17 insertions, 11 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/open-iscsi.SlackBuild b/network/open-iscsi/open-iscsi.SlackBuild
index aa81b2ff0a..fe0c9a4274 100644
--- a/network/open-iscsi/open-iscsi.SlackBuild
+++ b/network/open-iscsi/open-iscsi.SlackBuild
@@ -23,6 +23,10 @@
# 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"
#
@@ -31,7 +35,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=open-iscsi
VERSION=${VERSION:-2.1.5}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -43,9 +47,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -86,13 +87,15 @@ 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 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