[fedup-dracut] add patch for fedup-0.7.x
Will Woods
wwoods at fedoraproject.org
Tue Dec 10 23:05:35 UTC 2013
commit 44b01f8e53ee5270357c2b6423543b9c64da58bc
Author: Will Woods <wwoods at redhat.com>
Date: Tue Dec 10 18:05:20 2013 -0500
add patch for fedup-0.7.x
...x-backward-compatibility-with-fedup-0.7.x.patch | 39 ++++++++++++++++++++
fedup-dracut.spec | 10 ++++-
2 files changed, 47 insertions(+), 2 deletions(-)
---
diff --git a/0001-Fix-backward-compatibility-with-fedup-0.7.x.patch b/0001-Fix-backward-compatibility-with-fedup-0.7.x.patch
new file mode 100644
index 0000000..872e7e7
--- /dev/null
+++ b/0001-Fix-backward-compatibility-with-fedup-0.7.x.patch
@@ -0,0 +1,39 @@
+From f3c51b6ca3c4ae5289272e7d0db719a4eaf307f4 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Tue, 10 Dec 2013 14:07:06 -0500
+Subject: [PATCH] Fix backward compatibility with fedup-0.7.x
+
+Fedup 0.7.x still exists in the world, and it has some some special
+needs in order for us to get the system to start the upgrade:
+
+1) /run/initramfs/upgrade.conf needs to exist and contain the usual
+values for UPGRADEROOT and UPGRADELINK.
+
+2) /proc/cmdline will contain "systemd.unit=system-upgrade.target", so
+we need to make sure that exists inside the initramfs.
+
+So let's set that stuff up, so we don't stick people in infinite reboot
+loops if they're using an old version of fedup with a newer
+fedup-dracut.
+---
+ 90system-upgrade/upgrade-pre-pivot.sh | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/90system-upgrade/upgrade-pre-pivot.sh b/90system-upgrade/upgrade-pre-pivot.sh
+index 58cf06f..5556ffd 100644
+--- a/90system-upgrade/upgrade-pre-pivot.sh
++++ b/90system-upgrade/upgrade-pre-pivot.sh
+@@ -11,3 +11,10 @@ mkdir -p /run/systemd/system/sysinit.target.wants
+ for d in system system/sysinit.target.wants; do
+ mv -f /etc/systemd/$d/system-upgrade-shell.service /run/systemd/$d/
+ done
++
++# fedup-0.7.x compat. drop this when 0.7.x is old & irrelevant.
++if grep -qw 'systemd.unit=system-upgrade.target' /proc/cmdline; then
++ echo "UPGRADEROOT=/system-upgrade-root" > /run/initramfs/upgrade.conf
++ echo "UPGRADELINK=/system-upgrade" >> /run/initramfs/upgrade.conf
++ ln -sf upgrade.target /etc/systemd/system/system-upgrade.target
++fi
+--
+1.8.3.1
+
diff --git a/fedup-dracut.spec b/fedup-dracut.spec
index c51ceda..0d309cd 100644
--- a/fedup-dracut.spec
+++ b/fedup-dracut.spec
@@ -3,13 +3,15 @@
Name: fedup-dracut
Version: 0.8.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: The Fedora Upgrade tool initramfs environment
License: GPLv2+
URL: https://github.com/wgwoods/fedup-dracut
Source0: https://github.com/downloads/wgwoods/fedup-dracut/%{name}-%{version}.tar.xz
+Patch1: 0001-Fix-backward-compatibility-with-fedup-0.7.x.patch
+
Summary: initramfs environment for system upgrades
BuildRequires: rpm-devel >= 4.10.0
BuildRequires: plymouth-devel >= %{plymouthver}
@@ -35,6 +37,7 @@ The plymouth theme used during system upgrade.
%prep
%setup -q
+%patch1 -p1
%build
@@ -58,7 +61,10 @@ make install DESTDIR=$RPM_BUILD_ROOT \
%changelog
-* Wed Dec 4 2013 Will Woods <wwoods at redhat.com> 0.8.0-0
+* Tue Dec 10 2013 Will Woods <wwoods at redhat.com> 0.8.0-2
+- Fix compatibility with fedup 0.7.x
+
+* Wed Dec 4 2013 Will Woods <wwoods at redhat.com> 0.8.0-1
- Always put a shell on tty2
- Show text output from upgrade if graphics not available
- Fix --iso upgrades to F20 (#1024223)
More information about the scm-commits
mailing list