summaryrefslogtreecommitdiffstats
path: root/source/a
diff options
context:
space:
mode:
Diffstat (limited to 'source/a')
-rw-r--r--source/a/mkinitrd/0002-bail-if-temp-dir-is-not-created.patch16
-rwxr-xr-xsource/a/mkinitrd/mkinitrd.SlackBuild4
2 files changed, 19 insertions, 1 deletions
diff --git a/source/a/mkinitrd/0002-bail-if-temp-dir-is-not-created.patch b/source/a/mkinitrd/0002-bail-if-temp-dir-is-not-created.patch
new file mode 100644
index 000000000..1c6dcb929
--- /dev/null
+++ b/source/a/mkinitrd/0002-bail-if-temp-dir-is-not-created.patch
@@ -0,0 +1,16 @@
+--- ./mkinitrd.orig 2021-04-27 13:53:00.500036921 -0500
++++ ./mkinitrd 2021-07-16 13:04:05.246136283 -0500
+@@ -237,6 +237,13 @@
+ # Then copy all remaining libs our initrd files link against:
+ COUNT=1
+ PRFX=$(mktemp --suffix -ldd)
++
++ # Make sure a temporary directory was actually created:
++ if [ -z "${PRFX}" ]; then
++ echo "ERROR: Could not create a temp directory"
++ exit 1
++ fi
++
+ TMPFILE=${PRFX}${COUNT}
+
+ find $SOURCE_TREE -type f -exec ldd {} 2>/dev/null \; | unify_libs > $TMPFILE
diff --git a/source/a/mkinitrd/mkinitrd.SlackBuild b/source/a/mkinitrd/mkinitrd.SlackBuild
index 232dc6ac2..58dc341de 100755
--- a/source/a/mkinitrd/mkinitrd.SlackBuild
+++ b/source/a/mkinitrd/mkinitrd.SlackBuild
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=mkinitrd
VERSION=${VERSION:-1.4.11}
BB=1.32.1
-BUILD=${BUILD:-24}
+BUILD=${BUILD:-25}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -120,6 +120,8 @@ chmod 755 $PKG/sbin/mkinitrd
# Patch to switch to mktemp:
( cd $PKG/sbin ; zcat $CWD/mkinitrd.tempfile.to.mktemp.patch.gz | patch --verbose || exit 1) || exit 1
+# Patch mkinitrd to bail on no temp directory:
+( cd $PKG/sbin ; zcat $CWD/0002-bail-if-temp-dir-is-not-created.patch.gz | patch -p1 --verbose || exit 1) || exit 1
rm -f $PKG/sbin/mkinitrd.orig
mkdir -p $PKG/usr/man/man{5,8}