From aec7069f7b5ab4114bbbbf59e47fea0bc94a1c1d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 28 May 2012 15:41:05 +0200 Subject: [PATCH] dracut: add 2 patches that will be submitted upstream. --- .../dracut/patches/001-check-for-valid-init.patch | 14 ++++++++++++++ ...msquash-live-root-dont-harcode-mount-path.patch | 14 ++++++++++++++ srcpkgs/dracut/template | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/dracut/patches/001-check-for-valid-init.patch create mode 100644 srcpkgs/dracut/patches/002-dmsquash-live-root-dont-harcode-mount-path.patch diff --git a/srcpkgs/dracut/patches/001-check-for-valid-init.patch b/srcpkgs/dracut/patches/001-check-for-valid-init.patch new file mode 100644 index 00000000000..b9ed41d3198 --- /dev/null +++ b/srcpkgs/dracut/patches/001-check-for-valid-init.patch @@ -0,0 +1,14 @@ +Make sure to check in correct path for a valid init. This was failing if +/sbin/init is a symlink to /lib/systemd/systemd in voidlinux. + +--- modules.d/99base/init.sh.orig 2012-05-28 15:28:06.363878326 +0200 ++++ modules.d/99base/init.sh 2012-05-28 15:29:03.361485893 +0200 +@@ -234,7 +234,7 @@ for i in "$(getarg real_init=)" "$(getar + [ -n "$i" ] || continue + + __p=$(readlink -f "${NEWROOT}/${i}") +- if [ -x "$__p" ]; then ++ if [ -x "$__p" -o -x "${NEWROOT}/${__p}" ]; then + INIT="$i" + break + fi diff --git a/srcpkgs/dracut/patches/002-dmsquash-live-root-dont-harcode-mount-path.patch b/srcpkgs/dracut/patches/002-dmsquash-live-root-dont-harcode-mount-path.patch new file mode 100644 index 00000000000..bf10ce717b5 --- /dev/null +++ b/srcpkgs/dracut/patches/002-dmsquash-live-root-dont-harcode-mount-path.patch @@ -0,0 +1,14 @@ +mount(8) might not be available in /bin/mount as dmsquash-live-root.sh expects. +It will be in PATH anyway. + +--- modules.d/90dmsquash-live/dmsquash-live-root.sh.orig 2012-05-28 15:35:50.791973219 +0200 ++++ modules.d/90dmsquash-live/dmsquash-live-root.sh 2012-05-28 15:35:59.742754521 +0200 +@@ -204,7 +204,7 @@ if [ -b "$BASE_LOOPDEV" ]; then + ln -s $BASE_LOOPDEV /run/initramfs/live-baseloop + fi + ln -s /dev/mapper/live-rw /dev/root +-printf '/bin/mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh ++printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh + + need_shutdown + diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template index 19705bbd721..2fb83ef6de5 100644 --- a/srcpkgs/dracut/template +++ b/srcpkgs/dracut/template @@ -1,7 +1,7 @@ # Template file for 'dracut' pkgname=dracut version=018 -revision=1 +revision=2 noarch=yes build_style=gnu-makefile make_build_args="sysconfdir=/etc systemdsystemunitdir=/lib/systemd/system"