From: Marcin Krol Date: Fri, 7 Aug 2015 17:22:18 +0000 (+0000) Subject: - revert moving initrd-release to /usr/lib, there is no /usr/lib on x86_64 X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=62f9a8418bf564550ee5d04a6b79e9519a0dcad5;p=packages%2Fdracut.git - revert moving initrd-release to /usr/lib, there is no /usr/lib on x86_64 --- diff --git a/dracut.spec b/dracut.spec index c7ae75e..8d2bd9e 100644 --- a/dracut.spec +++ b/dracut.spec @@ -17,6 +17,7 @@ Patch7: config.patch Patch8: xz_compressor.patch Patch9: proc_sys_remount.patch Patch10: misc_fixes.patch +Patch11: initrd-release.patch URL: https://dracut.wiki.kernel.org/ BuildRequires: asciidoc BuildRequires: dash @@ -198,6 +199,7 @@ Bashowe dopełnianie składni dla polecenia dracut. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %{__sed} -i -e 's,@lib@,%{_lib},g' modules.d/50plymouth/module-setup.sh %{__sed} -i -e 's,@lib@,%{_lib},g' modules.d/95resume/module-setup.sh diff --git a/initrd-release.patch b/initrd-release.patch new file mode 100644 index 0000000..be1d975 --- /dev/null +++ b/initrd-release.patch @@ -0,0 +1,162 @@ +diff -ur dracut-043.orig/modules.d/01systemd-initrd/module-setup.sh dracut-043/modules.d/01systemd-initrd/module-setup.sh +--- dracut-043.orig/modules.d/01systemd-initrd/module-setup.sh 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/01systemd-initrd/module-setup.sh 2015-08-07 17:00:41.855567301 +0000 +@@ -59,10 +59,8 @@ + echo VERSION_ID=$VERSION_ID + echo PRETTY_NAME=\"$PRETTY_NAME\" + echo ANSI_COLOR=\"$ANSI_COLOR\" +- } > $initdir/usr/lib/initrd-release ++ } > $initdir/etc/initrd-release + echo dracut-$DRACUT_VERSION > $initdir/lib/dracut/dracut-$DRACUT_VERSION +- ln -sf ../usr/lib/initrd-release $initdir/etc/initrd-release +- ln -sf initrd-release $initdir/usr/lib/os-release + ln -sf initrd-release $initdir/etc/os-release + } + +diff -ur dracut-043.orig/modules.d/98dracut-systemd/dracut-cmdline-ask.service dracut-043/modules.d/98dracut-systemd/dracut-cmdline-ask.service +--- dracut-043.orig/modules.d/98dracut-systemd/dracut-cmdline-ask.service 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/98dracut-systemd/dracut-cmdline-ask.service 2015-08-07 17:01:39.047090272 +0000 +@@ -13,7 +13,7 @@ + Before=dracut-cmdline.service + After=systemd-journald.socket + Wants=systemd-journald.socket +-ConditionPathExists=/usr/lib/initrd-release ++ConditionPathExists=/etc/initrd-release + ConditionKernelCommandLine=rd.cmdline=ask + + [Service] +diff -ur dracut-043.orig/modules.d/98dracut-systemd/dracut-cmdline.service dracut-043/modules.d/98dracut-systemd/dracut-cmdline.service +--- dracut-043.orig/modules.d/98dracut-systemd/dracut-cmdline.service 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/98dracut-systemd/dracut-cmdline.service 2015-08-07 17:01:43.389261760 +0000 +@@ -14,7 +14,7 @@ + Before=dracut-pre-udev.service + After=systemd-journald.socket + Wants=systemd-journald.socket +-ConditionPathExists=/usr/lib/initrd-release ++ConditionPathExists=/etc/initrd-release + ConditionPathExistsGlob=|/etc/cmdline.d/*.conf + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline + ConditionKernelCommandLine=|rd.break=cmdline +diff -ur dracut-043.orig/modules.d/98dracut-systemd/dracut-cmdline.sh dracut-043/modules.d/98dracut-systemd/dracut-cmdline.sh +--- dracut-043.orig/modules.d/98dracut-systemd/dracut-cmdline.sh 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/98dracut-systemd/dracut-cmdline.sh 2015-08-07 17:01:34.828982244 +0000 +@@ -5,7 +5,7 @@ + fi + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + +-[ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release ++[ -f /etc/initrd-release ] && . /etc/initrd-release + [ -n "$VERSION" ] && info "dracut-$VERSION" + + if ! getargbool 1 'rd.hostonly'; then +diff -ur dracut-043.orig/modules.d/98dracut-systemd/dracut-initqueue.service dracut-043/modules.d/98dracut-systemd/dracut-initqueue.service +--- dracut-043.orig/modules.d/98dracut-systemd/dracut-initqueue.service 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/98dracut-systemd/dracut-initqueue.service 2015-08-07 17:01:28.936035859 +0000 +@@ -15,7 +15,7 @@ + Wants=remote-fs-pre.target + After=systemd-udev-trigger.service + Wants=systemd-udev-trigger.service +-ConditionPathExists=/usr/lib/initrd-release ++ConditionPathExists=/etc/initrd-release + ConditionPathExists=|/lib/dracut/need-initqueue + ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/*.sh + ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/settled/*.sh +diff -ur dracut-043.orig/modules.d/98dracut-systemd/dracut-mount.service dracut-043/modules.d/98dracut-systemd/dracut-mount.service +--- dracut-043.orig/modules.d/98dracut-systemd/dracut-mount.service 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/98dracut-systemd/dracut-mount.service 2015-08-07 17:01:51.992559672 +0000 +@@ -12,7 +12,7 @@ + Documentation=man:dracut-mount.service(8) + After=initrd-root-fs.target initrd-parse-etc.service + After=dracut-initqueue.service dracut-pre-mount.service +-ConditionPathExists=/usr/lib/initrd-release ++ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount + ConditionKernelCommandLine=|rd.break=mount + +diff -ur dracut-043.orig/modules.d/98dracut-systemd/dracut-pre-mount.service dracut-043/modules.d/98dracut-systemd/dracut-pre-mount.service +--- dracut-043.orig/modules.d/98dracut-systemd/dracut-pre-mount.service 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/98dracut-systemd/dracut-pre-mount.service 2015-08-07 17:01:41.108120404 +0000 +@@ -14,7 +14,7 @@ + Before=initrd-root-fs.target sysroot.mount + After=dracut-initqueue.service + After=cryptsetup.target +-ConditionPathExists=/usr/lib/initrd-release ++ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount + ConditionKernelCommandLine=|rd.break=pre-mount + +diff -ur dracut-043.orig/modules.d/98dracut-systemd/dracut-pre-pivot.service dracut-043/modules.d/98dracut-systemd/dracut-pre-pivot.service +--- dracut-043.orig/modules.d/98dracut-systemd/dracut-pre-pivot.service 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/98dracut-systemd/dracut-pre-pivot.service 2015-08-07 17:01:45.669399767 +0000 +@@ -15,7 +15,7 @@ + Before=initrd-cleanup.service + Wants=remote-fs.target + After=remote-fs.target +-ConditionPathExists=/usr/lib/initrd-release ++ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup + ConditionKernelCommandLine=|rd.break=pre-pivot +diff -ur dracut-043.orig/modules.d/98dracut-systemd/dracut-pre-trigger.service dracut-043/modules.d/98dracut-systemd/dracut-pre-trigger.service +--- dracut-043.orig/modules.d/98dracut-systemd/dracut-pre-trigger.service 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/98dracut-systemd/dracut-pre-trigger.service 2015-08-07 17:01:49.791458705 +0000 +@@ -14,7 +14,7 @@ + Before=systemd-udev-trigger.service dracut-initqueue.service + After=dracut-pre-udev.service systemd-udevd.service systemd-tmpfiles-setup-dev.service + Wants=dracut-pre-udev.service systemd-udevd.service +-ConditionPathExists=/usr/lib/initrd-release ++ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger + ConditionKernelCommandLine=|rd.break=pre-trigger + +diff -ur dracut-043.orig/modules.d/98dracut-systemd/dracut-pre-udev.service dracut-043/modules.d/98dracut-systemd/dracut-pre-udev.service +--- dracut-043.orig/modules.d/98dracut-systemd/dracut-pre-udev.service 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/98dracut-systemd/dracut-pre-udev.service 2015-08-07 17:01:47.669399123 +0000 +@@ -14,7 +14,7 @@ + Before=systemd-udevd.service dracut-pre-trigger.service + After=dracut-cmdline.service + Wants=dracut-cmdline.service +-ConditionPathExists=/usr/lib/initrd-release ++ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-udev + ConditionKernelCommandLine=|rd.break=pre-udev + ConditionKernelCommandLine=|rd.driver.blacklist +diff -ur dracut-043.orig/modules.d/99base/dracut-lib.sh dracut-043/modules.d/99base/dracut-lib.sh +--- dracut-043.orig/modules.d/99base/dracut-lib.sh 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/99base/dracut-lib.sh 2015-08-07 17:00:50.435567301 +0000 +@@ -396,7 +396,7 @@ + } + + setdebug() { +- [ -f /usr/lib/initrd-release ] || return ++ [ -f /etc/initrd-release ] || return + if [ -z "$RD_DEBUG" ]; then + if [ -e /proc/cmdline ]; then + RD_DEBUG=no +diff -ur dracut-043.orig/modules.d/99base/init.sh dracut-043/modules.d/99base/init.sh +--- dracut-043.orig/modules.d/99base/init.sh 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/99base/init.sh 2015-08-07 17:01:00.536567301 +0000 +@@ -106,7 +106,7 @@ + exec 0<>/dev/console 1<>/dev/console 2<>/dev/console + fi + +-[ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release ++[ -f /etc/initrd-release ] && . /etc/initrd-release + [ -n "$VERSION_ID" ] && info "$NAME-$VERSION_ID" + + source_conf /etc/conf.d +diff -ur dracut-043.orig/modules.d/99base/module-setup.sh dracut-043/modules.d/99base/module-setup.sh +--- dracut-043.orig/modules.d/99base/module-setup.sh 2015-06-15 10:27:21.000000000 +0000 ++++ dracut-043/modules.d/99base/module-setup.sh 2015-08-07 17:01:25.104122302 +0000 +@@ -84,10 +84,8 @@ + echo VERSION_ID=$VERSION_ID + echo PRETTY_NAME=\"$PRETTY_NAME\" + echo ANSI_COLOR=\"$ANSI_COLOR\" +- } > $initdir/usr/lib/initrd-release ++ } > $initdir/etc/initrd-release + echo dracut-$DRACUT_VERSION > $initdir/lib/dracut/dracut-$DRACUT_VERSION +- ln -sf ../usr/lib/initrd-release $initdir/etc/initrd-release +- ln -sf initrd-release $initdir/usr/lib/os-release + ln -sf initrd-release $initdir/etc/os-release + + ## save host_devs which we need bring up