From 88c99502d17979f10f6fc535384509ab644a1bad Mon Sep 17 00:00:00 2001 From: Laszlo Gombos Date: Thu, 19 Jan 2023 03:02:23 +0000 Subject: [PATCH 1/2] dracut: update to 059 --- srcpkgs/dracut/patches/force_poweroff.patch | 31 +++++++++---- srcpkgs/dracut/patches/kmod-fix.patch | 15 ------- srcpkgs/dracut/patches/musl-__wordsize.patch | 15 ------- srcpkgs/dracut/patches/network.patch | 47 +++++++++++--------- srcpkgs/dracut/template | 20 +++++---- 5 files changed, 60 insertions(+), 68 deletions(-) delete mode 100644 srcpkgs/dracut/patches/kmod-fix.patch delete mode 100644 srcpkgs/dracut/patches/musl-__wordsize.patch diff --git a/srcpkgs/dracut/patches/force_poweroff.patch b/srcpkgs/dracut/patches/force_poweroff.patch index 655746cc3745..9056685e32b9 100644 --- a/srcpkgs/dracut/patches/force_poweroff.patch +++ b/srcpkgs/dracut/patches/force_poweroff.patch @@ -1,17 +1,30 @@ +The shutdown binary is actually provided by runit and expects the runit +init to be running. This is not the case in the initramfs. Forcing the +shutdown, halt or reboot is necessary to ignore this requirement. + +--- + modules.d/99base/dracut-lib.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh -@@ -1128,11 +1128,11 @@ - +@@ -1004,13 +1004,13 @@ emergency_shell() { + case "$_emergency_action" in reboot) -- reboot || exit 1;; -+ reboot -f || exit 1;; +- reboot || exit 1 ++ reboot -f || exit 1 + ;; poweroff) -- poweroff || exit 1;; -+ poweroff -f || exit 1;; +- poweroff || exit 1 ++ poweroff -f || exit 1 + ;; halt) -- halt || exit 1;; -+ halt -f || exit 1;; +- halt || exit 1 ++ halt -f || exit 1 + ;; esac } - +-- +2.37.3 diff --git a/srcpkgs/dracut/patches/kmod-fix.patch b/srcpkgs/dracut/patches/kmod-fix.patch deleted file mode 100644 index fcde1eb76dc4..000000000000 --- a/srcpkgs/dracut/patches/kmod-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -The depmod program from kmod>=30 looks for modules.builtin.modinfo and throws a -warning when it isn't found. Newer versions of dracut pull in this file as well -as modules.builtin.alias, so let's pull this in here and avoid the warning. - ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -982,7 +982,7 @@ - } - - dracut_kernel_post() { -- for _f in modules.builtin.bin modules.builtin modules.order; do -+ for _f in modules.builtin.{bin,alias,modinfo} modules.builtin modules.order; do - [[ -e $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" - done - diff --git a/srcpkgs/dracut/patches/musl-__wordsize.patch b/srcpkgs/dracut/patches/musl-__wordsize.patch deleted file mode 100644 index 7a8b40a29034..000000000000 --- a/srcpkgs/dracut/patches/musl-__wordsize.patch +++ /dev/null @@ -1,15 +0,0 @@ -For musl libc it is required to include to -have __WORDSIZE defined to e.g. 32 for arm*-musl. - ---- a/install/util.h 2015-06-15 12:27:21.000000000 +0200 -+++ b/install/util.h 2015-09-02 09:07:57.321104222 +0200 -@@ -33,6 +33,9 @@ - #include - #include - #include -+#if !defined(__GLIBC__) -+#include -+#endif - #include - #include - #include diff --git a/srcpkgs/dracut/patches/network.patch b/srcpkgs/dracut/patches/network.patch index 09f08e327503..d438f83b95fe 100644 --- a/srcpkgs/dracut/patches/network.patch +++ b/srcpkgs/dracut/patches/network.patch @@ -1,32 +1,37 @@ -From 209812fe905ab8a66e0c131a1173dd46ee7c4cc7 Mon Sep 17 00:00:00 2001 +From 11a34f6b55f91610effd79ff1bf6a4bb2db760d3 Mon Sep 17 00:00:00 2001 From: Laszlo Gombos -Date: Wed, 18 Jan 2023 20:50:27 +0000 +Date: Wed, 18 Jan 2023 19:59:24 +0000 Subject: [PATCH] meta module should check if module exists Bug: https://github.com/dracutdevs/dracut/issues/1756 --- - modules.d/40network/module-setup.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + modules.d/40network/module-setup.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index d30f496..a69978c 100755 +index 1ab13ef..078cb4b 100755 --- a/modules.d/40network/module-setup.sh +++ b/modules.d/40network/module-setup.sh -@@ -17,11 +17,11 @@ depends() { - done; - - if [ -z "$network_handler" ]; then -- if find_binary wicked &>/dev/null ; then -+ if [[ -d "$dracutbasedir"/modules.d/35network-wicked ]] && find_binary wicked &>/dev/null ; then - network_handler="network-wicked" -- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]]; then -+ elif [[ -d "$dracutbasedir"/modules.d/35connman ]] && [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]]; then - network_handler="network-manager" -- else -+ elif [[ -d "$dracutbasedir"/modules.d/35network-legacy ]]; then - network_handler="network-legacy" - fi +@@ -17,15 +17,15 @@ depends() { + done + + if [ -z "$network_handler" ]; then +- if [[ -e $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then ++ if [[ -d "$dracutbasedir"/modules.d/35network-wicked ]] && [[ -e $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then + network_handler="network-wicked" +- elif [[ -e $dracutsysrootdir$systemdsystemunitdir/connman.service ]]; then ++ elif [[ -d "$dracutbasedir"/modules.d/35connman ]] && [[ -e $dracutsysrootdir$systemdsystemunitdir/connman.service ]]; then + network_handler="connman" +- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then ++ elif [[ -d "$dracutbasedir"/modules.d/35network-manager ]] && ( [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]] ); then + network_handler="network-manager" +- elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then ++ elif [[ -d "$dracutbasedir"/modules.d/01systemd-networkd ]] && [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then + network_handler="systemd-networkd" +- else ++ elif [[ -d "$dracutbasedir"/modules.d/35network-legacy ]] + network_handler="network-legacy" fi --- + fi +-- 2.34.1 - diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template index 63153c5fe0bd..525d8b5bbe11 100644 --- a/srcpkgs/dracut/template +++ b/srcpkgs/dracut/template @@ -1,20 +1,20 @@ # Template file for 'dracut' pkgname=dracut -reverts="056_1" -version=053 -revision=7 +version=059 +revision=1 build_style=configure configure_args="--prefix=/usr --sysconfdir=/etc" conf_files="/etc/dracut.conf" -hostmakedepends="pkg-config" +hostmakedepends="pkg-config asciidoc" makedepends="libkmod-devel" depends="bash coreutils cpio eudev gzip kmod>=3.7 kpartx util-linux" short_desc="Low-level tool for generating an initramfs/initrd image" -maintainer="Orphaned " +maintainer="Zach Dykstra " license="GPL-2.0-or-later, LGPL-2.0-or-later" -homepage="http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html" -distfiles="${KERNEL_SITE}/utils/boot/dracut/dracut-${version}.tar.xz" -checksum=d5a1b47cdb07919d8225d5b5f538e6ae604988f3df0afbde99a8dc775277b726 +homepage="https://github.com/dracutdevs/dracut/wiki" +changelog="https://raw.githubusercontent.com/dracutdevs/dracut/master/NEWS.md" +distfiles="https://github.com/dracutdevs/dracut/archive/refs/tags/${version}.tar.gz" +checksum=eabf0bb685420c1e1d5475b6855ef787104508f0135ff570312845256e0fcecf alternatives=" initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/dracut/kernel-hook-postinst initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/dracut/kernel-hook-postrm @@ -61,6 +61,10 @@ post_install() { rm ${DESTDIR}/usr/share/man/man8/*.service.* rm -r ${DESTDIR}/usr/lib/kernel + + if [[ ! -f ${DESTDIR}/usr/lib/dracut/dracut-version.sh ]] ; then + echo "DRACUT_VERSION=%{version}" > ${DESTDIR}/usr/lib/dracut/dracut-version.sh + fi } dracut-network_package() { From ca17da8b89e645905832bb48a34cbe01e2611e4e Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Thu, 19 Jan 2023 13:00:33 -0500 Subject: [PATCH 2/2] fixup! dracut: update to 059 --- srcpkgs/dracut/template | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template index 525d8b5bbe11..d706e9199316 100644 --- a/srcpkgs/dracut/template +++ b/srcpkgs/dracut/template @@ -37,6 +37,11 @@ case "$XBPS_TARGET_MACHINE" in ;; esac +pre_build() { + # Upstream tarball is missing version information + DRACUT_VERSION="${version}" make dracut-version.sh +} + post_install() { # kernel hooks. vinstall ${FILESDIR}/kernel-hook-postinst 755 usr/libexec/dracut @@ -61,10 +66,6 @@ post_install() { rm ${DESTDIR}/usr/share/man/man8/*.service.* rm -r ${DESTDIR}/usr/lib/kernel - - if [[ ! -f ${DESTDIR}/usr/lib/dracut/dracut-version.sh ]] ; then - echo "DRACUT_VERSION=%{version}" > ${DESTDIR}/usr/lib/dracut/dracut-version.sh - fi } dracut-network_package() {