diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-09-07 15:04:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-09-07 15:04:43 +0100 |
commit | dec27629c2ed853cc45d8483db97cd5f6cb85dd1 (patch) | |
tree | 58c7ad4ad65a55b5f9b87c7750922b666f55656e /sys-kernel/dracut | |
parent | 424cb0fa7a8daf1f3d10a4be5eff3cdc5f95e952 (diff) |
sys-kernel/dracut : version bump
Diffstat (limited to 'sys-kernel/dracut')
-rw-r--r-- | sys-kernel/dracut/Manifest | 2 | ||||
-rw-r--r-- | sys-kernel/dracut/dracut-056-r10.ebuild (renamed from sys-kernel/dracut/dracut-048-r10.ebuild) | 89 | ||||
-rw-r--r-- | sys-kernel/dracut/files/048-dracut-install-simplify-ldd-parsing-logic.patch | 41 | ||||
-rw-r--r-- | sys-kernel/dracut/files/048-redcore-change-default-initramfs-name.patch | 17 | ||||
-rw-r--r-- | sys-kernel/dracut/files/048-remove_JobRunningTimeoutSec.patch | 40 | ||||
-rw-r--r-- | sys-kernel/dracut/files/048-sort-fixup-creating-early-microcode.patch | 31 | ||||
-rw-r--r-- | sys-kernel/dracut/files/056-fix-lvm-add-missing-grep-requirement.patch | 36 | ||||
-rw-r--r-- | sys-kernel/dracut/files/056-musl.patch | 33 | ||||
-rw-r--r-- | sys-kernel/dracut/files/056-redcore-change-default-initramfs-name.patch | 17 | ||||
-rw-r--r-- | sys-kernel/dracut/files/fix-bash-5.patch | 57 | ||||
-rw-r--r-- | sys-kernel/dracut/files/gentoo-ldconfig-paths-r1.patch | 39 |
11 files changed, 176 insertions, 226 deletions
diff --git a/sys-kernel/dracut/Manifest b/sys-kernel/dracut/Manifest index ff319ade..13b4cf9c 100644 --- a/sys-kernel/dracut/Manifest +++ b/sys-kernel/dracut/Manifest @@ -1 +1 @@ -DIST dracut-048.tar.xz 308484 BLAKE2B b19c8122034a8b40cbc9d09245730900b59691c336f1d231e768786ad64068e0a8daf57ae9a4182ab50d9e1c683c9b7dcac354eb26d8a60f061db78121bc11c7 SHA512 97fcfd5d314ef40687c245d95d2f1d0f3f9ff0472e66b6e6324bf9bd6b98186104f9d71fd9af344126d6ea9fa47b744d52831a374225633225f6f17fb15c04e0 +DIST dracut-056.tar.xz 384196 BLAKE2B e3e4fa3024b401cc954ba6069c54e95912691ff68a838e3c43bfc6a5b284bdee1669c782b30503c0246b7146c545ee8825febefcff93bae76ec46067cb7b87e1 SHA512 19268763e128984d20cab766bbdf2de12fe534ce2562fc688203099ef9b4cf83d0ccd2129499c70cdc6dd4ad53f0ffc2f3378eff5b8a15fda27c23b20f903df2 diff --git a/sys-kernel/dracut/dracut-048-r10.ebuild b/sys-kernel/dracut/dracut-056-r10.ebuild index 3358639c..fe140cc9 100644 --- a/sys-kernel/dracut/dracut-048-r10.ebuild +++ b/sys-kernel/dracut/dracut-056-r10.ebuild @@ -1,25 +1,24 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 -inherit bash-completion-r1 eutils linux-info systemd toolchain-funcs +inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs + +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86" +SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" DESCRIPTION="Generic initramfs generation tool" HOMEPAGE="https://dracut.wiki.kernel.org" -SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="alpha amd64 ~arm ia64 ~mips ppc ~ppc64 sparc x86" -IUSE="+cryptsetup debug +device-mapper +lvm +microcode +splash +mdadm selinux" +IUSE="+cryptsetup +device-mapper +lvm +microcode +splash +mdadm selinux test" -# Tests need root privileges, bug #298014 -RESTRICT="test" +RESTRICT="!test? ( test )" -COMMON_DEPEND=">=sys-apps/kmod-23[tools] - virtual/pkgconfig - virtual/udev + +COMMON_DEPEND=" cryptsetup? ( sys-fs/cryptsetup ) @@ -38,43 +37,48 @@ COMMON_DEPEND=">=sys-apps/kmod-23[tools] ) mdadm? ( sys-fs/mdadm - ) - " + )" + RDEPEND="${COMMON_DEPEND} app-arch/cpio >=app-shells/bash-4.0:0 sys-apps/coreutils[xattr(-)] + >=sys-apps/kmod-23[tools] || ( - sys-apps/openrc[sysv-utils,selinux?] + sys-apps/openrc[sysv-utils(-),selinux?] sys-apps/systemd[sysv-utils] ) >=sys-apps/util-linux-2.21 + virtual/pkgconfig + virtual/udev - debug? ( dev-util/strace ) + elibc_musl? ( sys-libs/fts-standalone ) selinux? ( sec-policy/selinux-dracut sys-libs/libselinux sys-libs/libsepol ) - " +" DEPEND="${COMMON_DEPEND} + >=sys-apps/kmod-23 + elibc_musl? ( sys-libs/fts-standalone ) +" + +BDEPEND=" app-text/asciidoc app-text/docbook-xml-dtd:4.5 >=app-text/docbook-xsl-stylesheets-1.75.2 >=dev-libs/libxslt-1.1.26 - " - -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules - README.testsuite TODO ) + virtual/pkgconfig +" QA_MULTILIB_PATHS="usr/lib/dracut/.*" PATCHES=( - "${FILESDIR}"/048-dracut-install-simplify-ldd-parsing-logic.patch - "${FILESDIR}"/048-redcore-change-default-initramfs-name.patch - "${FILESDIR}"/048-remove_JobRunningTimeoutSec.patch - "${FILESDIR}"/048-sort-fixup-creating-early-microcode.patch - "${FILESDIR}"/fix-bash-5.patch + "${FILESDIR}"/gentoo-ldconfig-paths-r1.patch + "${FILESDIR}"/056-redcore-change-default-initramfs-name.patch + "${FILESDIR}"/056-musl.patch + "${FILESDIR}"/056-fix-lvm-add-missing-grep-requirement.patch ) src_configure() { @@ -91,22 +95,29 @@ src_configure() { ./configure "${myconf[@]}" || die } -src_install() { - default - - local libdirs=( /$(get_libdir) /usr/$(get_libdir) ) - if [[ ${SYMLINK_LIB} = yes && $(get_libdir) != lib ]]; then - # Preserve lib -> lib64 symlinks in initramfs - libdirs+=( /lib /usr/lib ) +src_test() { + if [[ ${EUID} != 0 ]]; then + # Tests need root privileges, bug #298014 + ewarn "Skipping tests: Not running as root." + elif [[ ! -w /dev/kvm ]]; then + ewarn "Skipping tests: Unable to access /dev/kvm." + else + emake -C test check fi +} - einfo "Setting libdirs to \"${libdirs[*]}\" ..." - echo "libdirs=\"${libdirs[*]}\"" > "${T}/gentoo.conf" || die - insinto "/usr/lib/dracut/dracut.conf.d" - doins "${T}/gentoo.conf" +src_install() { + local DOCS=( + AUTHORS + NEWS.md + README.md + docs/README.cross + docs/README.generic + docs/README.kernel + docs/SECURITY.md + ) - insinto /etc/logrotate.d - newins dracut.logrotate dracut + default docinto html dodoc dracut.html @@ -120,7 +131,7 @@ _dracut_initramfs_regen() { pkg_postinst() { if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then - _dracut_initramfs_regen + _dracut_initramfs_rege fi if linux-info_get_any_version && linux_config_exists; then 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 + |