aboutsummaryrefslogtreecommitdiff
path: root/system/dracut/dracut.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/dracut/dracut.SlackBuild')
-rw-r--r--system/dracut/dracut.SlackBuild61
1 files changed, 41 insertions, 20 deletions
diff --git a/system/dracut/dracut.SlackBuild b/system/dracut/dracut.SlackBuild
index 750fbfb279..e943a75c05 100644
--- a/system/dracut/dracut.SlackBuild
+++ b/system/dracut/dracut.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/bash
-# Slackware build script for dracut
-
-# Copyright 2023-2024 Matt Egger USA
+# Copyright 2023 Matt Egger USA
+# Copyright 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2025 Matt Egger USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -11,7 +11,7 @@
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -25,7 +25,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=dracut
-VERSION=${VERSION:-105}
+SRCNAM=dracut-ng
+VERSION=${VERSION:-108}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -65,11 +66,12 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
+
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-ng-$VERSION.tar.gz
-mv $PRGNAM-ng-$VERSION $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z || exit 1
+cd $SRCNAM-$VERSION || exit 1
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -77,8 +79,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# edit upstream scripts to use architecture appropiate libdir location
-sed -i "s|/usr/lib/dracut|/usr/lib$LIBDIRSUFFIX/dracut|" *.sh
+# configure accepts --libdir, but the scripts still need to be edited
+# or they won't work:
+sed -i "s|/usr/lib/dracut|/usr/lib$LIBDIRSUFFIX/dracut|g" *.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -87,25 +90,43 @@ CXXFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
make
-make install DESTDIR=$PKG
+make install DESTDIR=$PKG || exit 1
+
+# Include elogind-uaccess-command to allow processing uaccess rules correctly:
+cat $CWD/elogind.conf | sed "s#/lib/#/lib${LIBDIRSUFFIX}/#g" > $PKG/etc/dracut.conf.d/elogind.conf.new
+
+# Don't search for systemd services in the startup messages --
+# it's scaring the children. ;-)
+cat $CWD/omit_systemd_modules.conf > $PKG/etc/dracut.conf.d/omit_systemd_modules.conf.new
+
+# Set hostonly_cmdline=yes, otherwise encrypted root will fail.
+echo "hostonly_cmdline=yes" > $PKG/etc/dracut.conf.d/hostonly_cmdline_yes.conf.new
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
-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
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+find $PKG/usr/man -type f -exec gzip -9 {} \+
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a docs $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS CONTRIBUTING.md NEWS.md README.md $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/${PRGNAM}-$VERSION
+cp -a \
+ AUTHORS* COPYING* NEWS* README* \
+ $PKG/usr/doc/${PRGNAM}-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG