diff --git a/0001.patch b/0001.patch new file mode 100644 index 0000000..e7b9b16 --- /dev/null +++ b/0001.patch @@ -0,0 +1,42 @@ +From 6d886bb74d1608e4565d926aa259ea5afc9df7b9 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +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 +--- + 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 88bca1d4..5f352b36 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/0002.patch b/0002.patch new file mode 100644 index 0000000..bed89a4 --- /dev/null +++ b/0002.patch @@ -0,0 +1,44 @@ +From f51ab4a81f1fedb9eac31ecd22a3f87db3951650 Mon Sep 17 00:00:00 2001 +From: Kairui Song +Date: Sat, 29 Sep 2018 17:14:31 +0800 +Subject: [PATCH] dracut.spec: Fix error introduced by 70291ed + +70291e0 ('dracut.spec: Add dracut-squash package') introduced a new +dracut-squash package, but by accident it overrided some other package +spec and the dependency name is wrong. This patch will fix it. +--- + dracut.spec | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/dracut.spec b/dracut.spec +index 155868ce..0c266192 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -181,7 +181,7 @@ This package contains tools to assemble the local initrd and host configuration. + %package squash + Summary: dracut module to build an initramfs with most files in a squashfs image + Requires: %{name} = %{version}-%{release} +-Requires: squash-tools ++Requires: squashfs-tools + + %description squash + This package provides a dracut module to build an initramfs, but store most files +@@ -452,14 +452,14 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne + %doc %{_mandir}/man8/dracut-catimages.8* + %endif + +-%files squash +-%{dracutlibdir}/modules.d/99squash +- + %{_bindir}/dracut-catimages + %dir /boot/dracut + %dir /var/lib/dracut + %dir /var/lib/dracut/overlay + ++%files squash ++%{dracutlibdir}/modules.d/99squash ++ + %files config-generic + %{dracutlibdir}/dracut.conf.d/02-generic-image.conf + + diff --git a/0003.patch b/0003.patch new file mode 100644 index 0000000..348735a --- /dev/null +++ b/0003.patch @@ -0,0 +1,23 @@ +From db4d6bb42c3e9a2bf7a62d8327cc3c13e5594935 Mon Sep 17 00:00:00 2001 +From: Pedro Monreal +Date: Mon, 8 Oct 2018 11:09:11 +0200 +Subject: [PATCH] Added space in Resolving executable dependencies done as in + the rest of the messages + +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index e683a9bc..fb50cfda 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1572,7 +1572,7 @@ if [[ $kernel_only != yes ]]; then + dinfo "*** Resolving executable dependencies ***" + find "$initdir" -type f -perm /0111 -not -path '*.ko' -print0 \ + | xargs -r -0 $DRACUT_INSTALL ${initdir:+-D "$initdir"} -R ${DRACUT_FIPS_MODE:+-f} -- +- dinfo "*** Resolving executable dependencies done***" ++ dinfo "*** Resolving executable dependencies done ***" + fi + + # Now we are done with lazy resolving, always install dependencies diff --git a/dracut.spec b/dracut.spec index 722951c..01d8083 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 1 +%define dist_free_release 4.git20181010 Name: dracut Version: 049 @@ -28,6 +28,9 @@ URL: https://dracut.wiki.kernel.org/ # Source can be generated by # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz +Patch1: 0001.patch +Patch2: 0002.patch +Patch3: 0003.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -182,7 +185,7 @@ This package contains tools to assemble the local initrd and host configuration. %package squash Summary: dracut module to build an initramfs with most files in a squashfs image Requires: %{name} = %{version}-%{release} -Requires: squash-tools +Requires: squashfs-tools %description squash This package provides a dracut module to build an initramfs, but store most files @@ -453,14 +456,14 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %doc %{_mandir}/man8/dracut-catimages.8* %endif -%files squash -%{dracutlibdir}/modules.d/99squash - %{_bindir}/dracut-catimages %dir /boot/dracut %dir /var/lib/dracut %dir /var/lib/dracut/overlay +%files squash +%{dracutlibdir}/modules.d/99squash + %files config-generic %{dracutlibdir}/dracut.conf.d/02-generic-image.conf @@ -473,6 +476,10 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %endif %changelog +* Wed Oct 10 2018 Harald Hoyer - 049-4.git20181010 +- fixed spec file +- git snapshot + * Mon Oct 08 2018 Harald Hoyer - 049-1 - version 049