From 4226e2b12c5b492f30ba99632f24506cdec4c5d2 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald(a)redhat.com>
Date: Tue, 1 Dec 2015 08:56:38 +0100
Subject: dracut-044-6.git20151201
- fix for readonly /run on shutdown
- fix for the dmsquash-live module
---
0004-shutdown-guard-against-read-only-run.patch | 39 ++++++++++++++++++++++
...ve-dmsquash-live-root.sh-SQUASHED-can-be-.patch | 30 +++++++++++++++++
dracut.spec | 9 ++++-
3 files changed, 77 insertions(+), 1 deletion(-)
create mode 100644 0004-shutdown-guard-against-read-only-run.patch
create mode 100644 0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch
diff --git a/0004-shutdown-guard-against-read-only-run.patch
b/0004-shutdown-guard-against-read-only-run.patch
new file mode 100644
index 0000000..24e9a17
--- /dev/null
+++ b/0004-shutdown-guard-against-read-only-run.patch
@@ -0,0 +1,39 @@
+From 54e09dfb72b557ac8ccd48f5d37089287d272ec7 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald(a)redhat.com>
+Date: Mon, 30 Nov 2015 11:27:03 +0100
+Subject: [PATCH] shutdown: guard against read-only /run
+
+remount the switch rooted /run writeable again.
+---
+ modules.d/99shutdown/module-setup.sh | 2 +-
+ modules.d/99shutdown/shutdown.sh | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/modules.d/99shutdown/module-setup.sh b/modules.d/99shutdown/module-setup.sh
+index b80a82c..5cb3594 100755
+--- a/modules.d/99shutdown/module-setup.sh
++++ b/modules.d/99shutdown/module-setup.sh
+@@ -14,7 +14,7 @@ depends() {
+ # called by dracut
+ install() {
+ local _d
+- inst_multiple umount poweroff reboot halt losetup
++ inst_multiple umount poweroff reboot halt losetup stat
+ inst_multiple -o kexec
+ inst "$moddir/shutdown.sh" "$prefix/shutdown"
+ [ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib
+diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh
+index afee051..918a8a4 100755
+--- a/modules.d/99shutdown/shutdown.sh
++++ b/modules.d/99shutdown/shutdown.sh
+@@ -12,6 +12,10 @@ export TERM=linux
+ export PATH=/usr/sbin:/usr/bin:/sbin:/bin
+ . /lib/dracut-lib.sh
+
++if [ "$(stat -c '%T' -f /)" = "tmpfs" ]; then
++ mount -o remount,rw /
++fi
++
+ mkdir /oldsys
+ for i in sys proc run dev; do
+ mkdir /oldsys/$i
diff --git a/0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch
b/0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch
new file mode 100644
index 0000000..dfea06c
--- /dev/null
+++ b/0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch
@@ -0,0 +1,30 @@
+From ce9a398771d6e8503d767b450282db52b7a4b482 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald(a)redhat.com>
+Date: Tue, 1 Dec 2015 08:52:00 +0100
+Subject: [PATCH] dmsquash-live/dmsquash-live-root.sh: SQUASHED can be set
+ earlier
+
+8b5ee88ff667693b2d8da85a8552ad8f5ab95127 removed the check for SQUASHED,
+assuming, that the if clause above was the only place, where SQUASHED is
+set.
+
+This patch reverts to the old logic, because SQUASHED can be set
+earlier.
+---
+ modules.d/90dmsquash-live/dmsquash-live-root.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh
b/modules.d/90dmsquash-live/dmsquash-live-root.sh
+index fa44a03..68d076c 100755
+--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
+@@ -203,6 +203,9 @@ fi
+ # we might have an embedded fs image on squashfs (compressed live)
+ if [ -e /run/initramfs/live/${live_dir}/${squash_image} ]; then
+ SQUASHED="/run/initramfs/live/${live_dir}/${squash_image}"
++fi
++
++if [ -e "$SQUASHED" ] ; then
+ if [ -n "$live_ram" ]; then
+ echo "Copying live image to RAM..."
+ echo "(this may take a few minutes)"
diff --git a/dracut.spec b/dracut.spec
index 7b2b7ea..9e21587 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -16,7 +16,7 @@
Name: dracut
Version: 044
-Release: 4.git20151127%{?dist}
+Release: 6.git20151201%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@@ -38,6 +38,8 @@ Source0:
http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar
Patch1: 0001-dmsquash-live-dmsquash-live-root.sh-fixed-typo.patch
Patch2: 0002-dmraid-61-dmraid-imsm.rules-add-nowatch-option-for-u.patch
Patch3: 0003-livenet-livenet-generator.sh-mode-0755.patch
+Patch4: 0004-shutdown-guard-against-read-only-run.patch
+Patch5: 0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch
Source1:
https://www.gnu.org/licenses/lgpl-2.1.txt
@@ -498,6 +500,11 @@ rm -rf -- $RPM_BUILD_ROOT
%endif
%changelog
+* Tue Dec 1 2015 Harald Hoyer <harald(a)redhat.com> - 044-6.git20151201
+- fix for readonly /run on shutdown
+- fix for the dmsquash-live module
+Resolves: rhbz#1286866
+
* Wed Nov 25 2015 Harald Hoyer <harald(a)redhat.com> - 044-4.git20151127
- fixes for the dmsquash-live module
- remove udev watch for raid members
--
cgit v0.11.2
http://pkgs.fedoraproject.org/cgit/dracut.git/commit/?h=master&id=422...