summaryrefslogtreecommitdiff
path: root/sys-kernel/dracut/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/dracut/files')
-rw-r--r--sys-kernel/dracut/files/048-dracut-install-simplify-ldd-parsing-logic.patch41
-rw-r--r--sys-kernel/dracut/files/048-redcore-change-default-initramfs-name.patch17
-rw-r--r--sys-kernel/dracut/files/048-remove_JobRunningTimeoutSec.patch40
-rw-r--r--sys-kernel/dracut/files/048-sort-fixup-creating-early-microcode.patch31
-rw-r--r--sys-kernel/dracut/files/056-fix-lvm-add-missing-grep-requirement.patch36
-rw-r--r--sys-kernel/dracut/files/056-musl.patch33
-rw-r--r--sys-kernel/dracut/files/056-redcore-change-default-initramfs-name.patch17
-rw-r--r--sys-kernel/dracut/files/fix-bash-5.patch57
-rw-r--r--sys-kernel/dracut/files/gentoo-ldconfig-paths-r1.patch39
9 files changed, 125 insertions, 186 deletions
diff --git a/sys-kernel/dracut/files/048-dracut-install-simplify-ldd-parsing-logic.patch b/sys-kernel/dracut/files/048-dracut-install-simplify-ldd-parsing-logic.patch
deleted file mode 100644
index aa9c543f..00000000
--- a/sys-kernel/dracut/files/048-dracut-install-simplify-ldd-parsing-logic.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 6d886bb74d1608e4565d926aa259ea5afc9df7b9 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Thu, 4 Oct 2018 16:45:47 -0400
-Subject: [PATCH] dracut-install: simplify ldd parsing logic
-
-The previous logic would not handle absolute paths on the left side of
-the "=>" properly. For example, on Gentoo ARM64, ldd outputs this:
-
- /lib/ld-linux-aarch64.so.1 => /lib64/ld-linux-aarch64.so.1
-
-At runtime, the kernel tries to load the file from /lib, and fails if we
-only provide it in /lib64.
-
-Instead of looking for the first slash after the "=>", just look for the
-first slash, period. This would fail if we somehow had a relative path
-on the left side (foo/libbar.so), but I'm not aware of any binaries that
-would contain such an entry in DT_NEEDED.
-
-Bug: https://bugs.gentoo.org/667752
-Signed-off-by: Mike Gilbert <floppym@gentoo.org>
----
- install/dracut-install.c | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/install/dracut-install.c b/install/dracut-install.c
-index 88bca1d44..5f352b360 100644
---- a/install/dracut-install.c
-+++ b/install/dracut-install.c
-@@ -479,11 +479,7 @@ static int resolve_deps(const char *src)
- if (strstr(buf, destrootdir))
- break;
-
-- p = strstr(buf, "=>");
-- if (!p)
-- p = buf;
--
-- p = strchr(p, '/');
-+ p = strchr(buf, '/');
- if (p) {
- char *q;
-
diff --git a/sys-kernel/dracut/files/048-redcore-change-default-initramfs-name.patch b/sys-kernel/dracut/files/048-redcore-change-default-initramfs-name.patch
deleted file mode 100644
index 82519600..00000000
--- a/sys-kernel/dracut/files/048-redcore-change-default-initramfs-name.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -Nur a/dracut.sh b/dracut.sh
---- a/dracut.sh 2018-07-06 09:37:51.000000000 +0100
-+++ b/dracut.sh 2019-07-19 22:33:11.571832132 +0100
-@@ -791,11 +791,11 @@
- outfile="$efidir/Linux/linux-$kernel${MACHINE_ID:+-${MACHINE_ID}}${BUILD_ID:+-${BUILD_ID}}.efi"
- else
- if [[ -e "/boot/vmlinuz-$kernel" ]]; then
-- outfile="/boot/initramfs-$kernel.img"
-+ outfile="/boot/initrd-$kernel"
- elif [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
- outfile="/boot/${MACHINE_ID}/$kernel/initrd"
- else
-- outfile="/boot/initramfs-$kernel.img"
-+ outfile="/boot/initrd-$kernel"
- fi
- fi
- fi
diff --git a/sys-kernel/dracut/files/048-remove_JobRunningTimeoutSec.patch b/sys-kernel/dracut/files/048-remove_JobRunningTimeoutSec.patch
deleted file mode 100644
index 4953bb1c..00000000
--- a/sys-kernel/dracut/files/048-remove_JobRunningTimeoutSec.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff -Naur dracut-047/modules.d/90dmsquash-live/dmsquash-generator.sh dracut-047.new/modules.d/90dmsquash-live/dmsquash-generator.sh
---- dracut-047/modules.d/90dmsquash-live/dmsquash-generator.sh 2018-02-19 10:00:33.000000000 +0100
-+++ dracut-047.new/modules.d/90dmsquash-live/dmsquash-generator.sh 2018-04-03 09:27:39.770986599 +0200
-@@ -78,5 +78,4 @@
- {
- echo "[Unit]"
- echo "JobTimeoutSec=3000"
-- echo "JobRunningTimeoutSec=3000"
- } > "$GENERATOR_DIR/$_dev.device.d/timeout.conf"
-diff -Naur dracut-047/modules.d/90livenet/livenet-generator.sh dracut-047.new/modules.d/90livenet/livenet-generator.sh
---- dracut-047/modules.d/90livenet/livenet-generator.sh 2018-02-19 10:00:33.000000000 +0100
-+++ dracut-047.new/modules.d/90livenet/livenet-generator.sh 2018-04-03 09:27:47.559986347 +0200
-@@ -57,5 +57,4 @@
- {
- echo "[Unit]"
- echo "JobTimeoutSec=3000"
-- echo "JobRunningTimeoutSec=3000"
- } > "$GENERATOR_DIR/dev-mapper-live\x2drw.device.d/timeout.conf"
-diff -Naur dracut-047/modules.d/98dracut-systemd/rootfs-generator.sh dracut-047.new/modules.d/98dracut-systemd/rootfs-generator.sh
---- dracut-047/modules.d/98dracut-systemd/rootfs-generator.sh 2018-02-19 10:00:33.000000000 +0100
-+++ dracut-047.new/modules.d/98dracut-systemd/rootfs-generator.sh 2018-04-03 09:27:32.335986840 +0200
-@@ -32,7 +32,6 @@
- {
- echo "[Unit]"
- echo "JobTimeoutSec=$_timeout"
-- echo "JobRunningTimeoutSec=$_timeout"
- } > "$GENERATOR_DIR"/${_name}.device.d/timeout.conf
- fi
- }
-diff -Naur dracut-047/modules.d/99base/dracut-lib.sh dracut-047.new/modules.d/99base/dracut-lib.sh
---- dracut-047/modules.d/99base/dracut-lib.sh 2018-02-19 10:00:33.000000000 +0100
-+++ dracut-047.new/modules.d/99base/dracut-lib.sh 2018-04-03 09:27:21.155987203 +0200
-@@ -938,7 +938,6 @@
- {
- echo "[Unit]"
- echo "JobTimeoutSec=$_timeout"
-- echo "JobRunningTimeoutSec=$_timeout"
- } > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf
- type mark_hostonly >/dev/null 2>&1 && mark_hostonly /etc/systemd/system/${_name}.device.d/timeout.conf
- _needreload=1
diff --git a/sys-kernel/dracut/files/048-sort-fixup-creating-early-microcode.patch b/sys-kernel/dracut/files/048-sort-fixup-creating-early-microcode.patch
deleted file mode 100644
index 1dc95158..00000000
--- a/sys-kernel/dracut/files/048-sort-fixup-creating-early-microcode.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -Naur dracut-047/dracut.sh dracut-047-microcode/dracut.sh
---- dracut-047/dracut.sh 2018-02-19 10:00:33.000000000 +0100
-+++ dracut-047-microcode/dracut.sh 2018-05-16 21:14:14.440286520 +0200
-@@ -1686,10 +1686,23 @@
- break 2
- done
- for i in $_fwdir/$_fw/$_src; do
-- [[ -e "$i" ]] || continue
-- # skip gpg files
-- str_ends "$i" ".asc" && continue
-- cat "$i" >> $_dest_dir/${ucode_dest[$idx]}
-+ ## match intel and amd ucode ignore other stuff
-+ _i=$(echo $i | egrep "[0-9a-z]\w-[0-9a-z]\w-[0-9a-z]\w$|microcode_amd.*.bin$")
-+ if [[ -n $_i ]]; then
-+ j=$(file -bi $_i)
-+ case $j in
-+ *application/octet-stream*)
-+ [[ -e "$_i" ]] || continue
-+ ;;
-+ *)
-+ ## ignore also files matches names but are not data ( octet-stream )
-+ dinfo " Ignoring '$(basename $_i)', matches ucode names but is not a data file."
-+ continue
-+ ;;
-+ esac
-+
-+ cat "$_i" >> $_dest_dir/${ucode_dest[$idx]}
-+ fi
- done
- create_early_cpio="yes"
- fi
diff --git a/sys-kernel/dracut/files/056-fix-lvm-add-missing-grep-requirement.patch b/sys-kernel/dracut/files/056-fix-lvm-add-missing-grep-requirement.patch
new file mode 100644
index 00000000..ca24180f
--- /dev/null
+++ b/sys-kernel/dracut/files/056-fix-lvm-add-missing-grep-requirement.patch
@@ -0,0 +1,36 @@
+From 79f9d9e1c29a9c8fc046ab20765e5bde2aaa3428 Mon Sep 17 00:00:00 2001
+From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
+Date: Mon, 11 Apr 2022 08:33:17 +0200
+Subject: [PATCH] fix(lvm): add missing grep requirement
+
+Since commit https://github.com/dracutdevs/dracut/commit/7ffc5e38
+lvm_scan.sh needs grep.
+---
+ modules.d/90lvm/module-setup.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
+index 25be0133..aa8c6db8 100755
+--- a/modules.d/90lvm/module-setup.sh
++++ b/modules.d/90lvm/module-setup.sh
+@@ -3,7 +3,7 @@
+ # called by dracut
+ check() {
+ # No point trying to support lvm if the binaries are missing
+- require_binaries lvm || return 1
++ require_binaries lvm grep || return 1
+
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ for fs in "${host_fs_types[@]}"; do
+@@ -48,7 +48,7 @@ installkernel() {
+
+ # called by dracut
+ install() {
+- inst lvm
++ inst_multiple lvm grep
+
+ if [[ $hostonly_cmdline == "yes" ]]; then
+ local _lvmconf
+--
+2.35.1
+
diff --git a/sys-kernel/dracut/files/056-musl.patch b/sys-kernel/dracut/files/056-musl.patch
new file mode 100644
index 00000000..ded18888
--- /dev/null
+++ b/sys-kernel/dracut/files/056-musl.patch
@@ -0,0 +1,33 @@
+From ce55a85ed5d902c19d75895508856f96ec2ceb1a Mon Sep 17 00:00:00 2001
+From: Laszlo Gombos <laszlo.gombos@gmail.com>
+Date: Sun, 20 Feb 2022 22:23:49 -0500
+Subject: [PATCH] fix(install): restore musl support
+
+__GLIBC_PREREQ is only defined in glibc.
+---
+ src/install/util.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/install/util.c b/src/install/util.c
+index 5721de89e..0af387c27 100644
+--- a/src/install/util.c
++++ b/src/install/util.c
+@@ -24,17 +24,15 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <sys/types.h>
++#include <sys/syscall.h>
+
+ #include "util.h"
+
+-#if __GLIBC_PREREQ(2, 30) == 0
+-#include <sys/syscall.h>
+ #ifndef SYS_gettid
+ #error "SYS_gettid unavailable on this system"
+ #endif
+
+ #define gettid() ((pid_t) syscall(SYS_gettid))
+-#endif /*__GLIBC_PREREQ */
+
+ size_t page_size(void)
+ {
diff --git a/sys-kernel/dracut/files/056-redcore-change-default-initramfs-name.patch b/sys-kernel/dracut/files/056-redcore-change-default-initramfs-name.patch
new file mode 100644
index 00000000..c6539434
--- /dev/null
+++ b/sys-kernel/dracut/files/056-redcore-change-default-initramfs-name.patch
@@ -0,0 +1,17 @@
+diff -Nur a/dracut.sh b/dracut.sh
+--- a/dracut.sh 2022-02-18 11:32:53.000000000 +0000
++++ b/dracut.sh 2022-09-07 15:01:59.055893269 +0100
+@@ -1054,11 +1054,11 @@
+ outfile="$dracutsysrootdir$efidir/Linux/linux-$kernel${MACHINE_ID:+-${MACHINE_ID}}${BUILD_ID:+-${BUILD_ID}}.efi"
+ else
+ if [[ -e $dracutsysrootdir/boot/vmlinuz-$kernel ]]; then
+- outfile="/boot/initramfs-$kernel.img"
++ outfile="/boot/initrd-$kernel"
+ elif [[ $MACHINE_ID ]] && { [[ -d $dracutsysrootdir/boot/${MACHINE_ID} ]] || [[ -L $dracutsysrootdir/boot/${MACHINE_ID} ]]; }; then
+ outfile="$dracutsysrootdir/boot/${MACHINE_ID}/$kernel/initrd"
+ else
+- outfile="$dracutsysrootdir/boot/initramfs-$kernel.img"
++ outfile="$dracutsysrootdir/boot/initrd-$kernel"
+ fi
+ fi
+ fi
diff --git a/sys-kernel/dracut/files/fix-bash-5.patch b/sys-kernel/dracut/files/fix-bash-5.patch
deleted file mode 100644
index 1f8f29cb..00000000
--- a/sys-kernel/dracut/files/fix-bash-5.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh
-index d39ca1b7..8dbc8b3c 100755
---- ./modules.d/99fs-lib/fs-lib.sh
-+++ ./modules.d/99fs-lib/fs-lib.sh
-@@ -44,22 +44,22 @@ fsck_able() {
- ;;
- ext?)
- type e2fsck >/dev/null 2>&1 &&
-- _drv="_drv=e2fsck fsck_drv_com" &&
-+ _drv="_drv=e2fsck fsck_drv_com e2fsck" &&
- return 0
- ;;
- f2fs)
- type fsck.f2fs >/dev/null 2>&1 &&
-- _drv="_drv=fsck.f2fs fsck_drv_com" &&
-+ _drv="_drv=fsck.f2fs fsck_drv_com fsck.f2fs" &&
- return 0
- ;;
- jfs)
- type jfs_fsck >/dev/null 2>&1 &&
-- _drv="_drv=jfs_fsck fsck_drv_com" &&
-+ _drv="_drv=jfs_fsck fsck_drv_com jfs_fsck" &&
- return 0
- ;;
- reiserfs)
- type reiserfsck >/dev/null 2>&1 &&
-- _drv="_drv=reiserfsck fsck_drv_com" &&
-+ _drv="_drv=reiserfsck fsck_drv_com reiserfsck" &&
- return 0
- ;;
- btrfs)
-@@ -75,7 +75,7 @@ fsck_able() {
- ;;
- *)
- type fsck >/dev/null 2>&1 &&
-- _drv="_drv=fsck fsck_drv_std" &&
-+ _drv="_drv=fsck fsck_drv_std fsck" &&
- return 0
- ;;
- esac
-@@ -99,6 +99,7 @@ fsck_drv_btrfs() {
- fsck_drv_com() {
- local _ret
- local _out
-+ local _drv=$1
-
- if ! strglobin "$_fop" "-[ynap]"; then
- _fop="-a ${_fop}"
-@@ -177,7 +178,7 @@ fsck_batch() {
- _out="$(fsck -M -T "$@" -- -a)"
- _ret=$?
-
-- fsck_tail
-+ _drv=$_drv fsck_tail
-
- return $_ret
- }
diff --git a/sys-kernel/dracut/files/gentoo-ldconfig-paths-r1.patch b/sys-kernel/dracut/files/gentoo-ldconfig-paths-r1.patch
new file mode 100644
index 00000000..53349a1f
--- /dev/null
+++ b/sys-kernel/dracut/files/gentoo-ldconfig-paths-r1.patch
@@ -0,0 +1,39 @@
+From e6a5f02038954ede223cc75901386acf43ec4264 Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Mon, 9 Mar 2020 02:47:07 +0300
+Subject: [PATCH] Remove redundant gcc paths in ldconfig_paths()
+
+Bug: https://bugs.gentoo.org/705728
+---
+ dracut-functions.sh | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/dracut-functions.sh b/dracut-functions.sh
+index 5206bd21..a119fb15 100755
+--- a/dracut-functions.sh
++++ b/dracut-functions.sh
+@@ -81,7 +81,20 @@ find_binary() {
+ }
+
+ ldconfig_paths() {
+- $DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2> /dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
++ local gccpath
++
++ if type -P gcc-config &>/dev/null; then
++ gccpath=$(gcc-config -c)
++ gccpath=/usr/lib/gcc/${gccpath%-*}/${gccpath##*-}
++ fi
++
++ while read -r line; do
++ if [[ ${line} != /usr/lib/gcc/* || -z ${gccpath} ]]; then
++ echo ${line}
++ elif [[ ${line} == ${gccpath} ]]; then
++ echo ${line}
++ fi
++ done < <($DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq)
+ }
+
+ # Version comparision function. Assumes Linux style version scheme.
+--
+2.32.0
+