[fedup] backport some useful fixes from master while we wait for 0.8.1

Adam Williamson adamwill at fedoraproject.org
Fri Feb 28 21:39:16 UTC 2014


commit fc9711fd28538843a4a712e2a4fa044149e7fd6a
Author: Adam Williamson <awilliam at redhat.com>
Date:   Fri Feb 28 13:39:57 2014 -0800

    backport some useful fixes from master while we wait for 0.8.1

 ...-startup-when-packagedir-isn-t-on-root-10.patch |   32 +++++++++++++++++
 ...-VERSION-if-etc-debian_release-exists-105.patch |   33 ++++++++++++++++++
 ...n-the-user-if-upgrade-contains-no-kernels.patch |   36 ++++++++++++++++++++
 fedup.spec                                         |   19 ++++++++--
 4 files changed, 116 insertions(+), 4 deletions(-)
---
diff --git a/0004-fix-upgrade-startup-when-packagedir-isn-t-on-root-10.patch b/0004-fix-upgrade-startup-when-packagedir-isn-t-on-root-10.patch
new file mode 100644
index 0000000..1c7f434
--- /dev/null
+++ b/0004-fix-upgrade-startup-when-packagedir-isn-t-on-root-10.patch
@@ -0,0 +1,32 @@
+From a5953755b80c18d090aefda9873975bfe079c046 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Tue, 21 Jan 2014 15:55:31 -0500
+Subject: [PATCH] fix upgrade startup when packagedir isn't on root (#1045168)
+
+When the generators run, we haven't mounted anything yet. So if
+/system-upgrade points to something that isn't on the root or /usr
+partition, the [ -d /system-upgrade ] test will fail, and the upgrade
+won't start.
+
+We don't need to check it here anyway - upgrade-prep.sh will do sanity
+checks to make sure everything we need is actually mounted.
+---
+ systemd/system-upgrade-generator.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/systemd/system-upgrade-generator.in b/systemd/system-upgrade-generator.in
+index c6d1275..1da30f3 100644
+--- a/systemd/system-upgrade-generator.in
++++ b/systemd/system-upgrade-generator.in
+@@ -5,7 +5,7 @@
+ UPGRADE_UNIT_PATH='@UNITDIR@'
+ 
+ ready_for_upgrade() {
+-    [ -L /system-upgrade -a -d /system-upgrade ] && \
++    [ -L /system-upgrade ] && \
+     [ -d /system-upgrade-root ] &&
+     [ -L /run/system-upgrade -o -f /run/initramfs/upgrade.conf ]
+ }
+-- 
+1.9.0
+
diff --git a/0005-Fix-network-VERSION-if-etc-debian_release-exists-105.patch b/0005-Fix-network-VERSION-if-etc-debian_release-exists-105.patch
new file mode 100644
index 0000000..a216de5
--- /dev/null
+++ b/0005-Fix-network-VERSION-if-etc-debian_release-exists-105.patch
@@ -0,0 +1,33 @@
+From 081b78018d4a76b2f9e49a40b7ada9e72d4c8b22 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Thu, 30 Jan 2014 14:47:25 -0500
+Subject: [PATCH 1/2] Fix --network VERSION if /etc/debian_release exists
+ (#1057817)
+
+It turns out that platform.linux_distribution() will return the Debian
+release version string rather than the Fedora one if /etc/debian_release
+exists.
+
+Since fedup is designed for Fedora (and its derivatives), only check the
+release files for Fedora (and its derivatives).
+---
+ fedup/commandline.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/fedup/commandline.py b/fedup/commandline.py
+index 6eeed9d..a1b8784 100644
+--- a/fedup/commandline.py
++++ b/fedup/commandline.py
+@@ -202,7 +202,8 @@ def VERSION(arg):
+     if arg.lower() == 'rawhide':
+         return 'rawhide'
+ 
+-    distro, version, id = platform.linux_distribution()
++    _distros=('fedora', 'redhat', 'centos')
++    distro, version, id = platform.linux_distribution(supported_dists=_distros)
+     version = int(version)
+ 
+     if int(arg) >= version:
+-- 
+1.9.0
+
diff --git a/0006-Warn-the-user-if-upgrade-contains-no-kernels.patch b/0006-Warn-the-user-if-upgrade-contains-no-kernels.patch
new file mode 100644
index 0000000..05e5c83
--- /dev/null
+++ b/0006-Warn-the-user-if-upgrade-contains-no-kernels.patch
@@ -0,0 +1,36 @@
+From 9f484f93d9b09e1ac8557de915a86ddf7444e162 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Thu, 13 Feb 2014 13:08:12 -0500
+Subject: [PATCH 2/2] Warn the user if upgrade contains no kernels
+
+Various problems can arise if the upgrade contains no kernels, since we
+don't build a new initramfs. (Normally we should get a new kernel with
+the upgrade but sometimes there's upgrade path problems.)
+
+So: check the upgrade transaction for any package that matches the list
+of kernel package names, and warn the user if there's nothing there.
+
+(Yes, in theory we could look through the rpmdb and force-install a
+kernel package from the new distribution, but this violates the "no
+special cases for packages" principle.)
+---
+ fedup.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/fedup.py b/fedup.py
+index aa3e3b7..f37bef0 100755
+--- a/fedup.py
++++ b/fedup.py
+@@ -199,6 +199,9 @@ def main(args):
+         for p in missing:
+             message("  %s" % p)
+ 
++    if not any(p.name in f.conf.kernelpkgnames for p in pkgs):
++        message(_('WARNING: no new kernel will be installed during upgrade'))
++
+     # warn if the "important" repos are disabled
+     if f.disabled_repos:
+         # NOTE: I hate having a hardcoded list of Important Repos here.
+-- 
+1.9.0
+
diff --git a/fedup.spec b/fedup.spec
index 823bfc6..b6ff8b9 100644
--- a/fedup.spec
+++ b/fedup.spec
@@ -1,6 +1,6 @@
 Name:           fedup
 Version:        0.8.0
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        The Fedora Upgrade tool
 
 License:        GPLv2+
@@ -10,10 +10,11 @@ Source0:        https://github.com/downloads/wgwoods/fedup/%{name}-%{version}.ta
 Patch1:         0001-Fix-NameError-if-you-hit-Ctrl-C-during-download.patch
 Patch2:         0002-Improve-log-messages-when-the-GPG-key-is-missing.patch
 Patch3:         0003-Let-instrepo-override-iso-device-instrepo.patch
+Patch4:         0004-fix-upgrade-startup-when-packagedir-isn-t-on-root-10.patch
+Patch5:         0005-Fix-network-VERSION-if-etc-debian_release-exists-105.patch
+Patch6:         0006-Warn-the-user-if-upgrade-contains-no-kernels.patch
 
-# Require updates to various packages where necessary to fix bugs.
-# Bug #910326
-Requires:       systemd >= 44-23.fc17
+Requires:       systemd >= 183
 Requires:       grubby
 
 BuildRequires:  python-libs
@@ -33,6 +34,9 @@ fedup is the Fedora Upgrade tool.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 %build
 make PYTHON=%{__python}
@@ -77,6 +81,13 @@ mkdir -p $RPM_BUILD_ROOT/etc/fedup/update.img.d
 #{_datadir}/fedup/ui
 
 %changelog
+* Fri Feb 28 2014 Adam Williamson <awilliam at redhat.com> 0.8.0-4
+- backport a few more bugfixes from git master:
+  + fix upgrade startup when packagedir isn't on root (#1045168)
+  + Fix --network VERSION if /etc/debian_release exists (#1057817)
+  + Warn the user if upgrade contains no kernels
+- bump the required systemd version (also a 'backport' from git)
+
 * Tue Dec 10 2013 Will Woods <wwoods at redhat.com> 0.8.0-3
 - Fix crash with Ctrl-C on F18
 - Fix --instrepo with --device/--iso


More information about the scm-commits mailing list