[fedup/f18] Add three fixes from git master

Will Woods wwoods at fedoraproject.org
Tue Dec 10 23:56:38 UTC 2013


commit 6cacbd12a8f9b02f69e4451b82af3c0dadcbaca9
Author: Will Woods <wwoods at redhat.com>
Date:   Tue Dec 10 18:10:26 2013 -0500

    Add three fixes from git master
    
    Conflict from the Obsoletes: oopsie
    
    Conflicts:
    	fedup.spec

 ...meError-if-you-hit-Ctrl-C-during-download.patch |   28 ++++++++++++
 ...-log-messages-when-the-GPG-key-is-missing.patch |   46 ++++++++++++++++++++
 ...Let-instrepo-override-iso-device-instrepo.patch |   38 ++++++++++++++++
 fedup.spec                                         |   13 +++++-
 4 files changed, 124 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-NameError-if-you-hit-Ctrl-C-during-download.patch b/0001-Fix-NameError-if-you-hit-Ctrl-C-during-download.patch
new file mode 100644
index 0000000..6a95512
--- /dev/null
+++ b/0001-Fix-NameError-if-you-hit-Ctrl-C-during-download.patch
@@ -0,0 +1,28 @@
+From 7257daa62cb94117e8b5ccd47a6cc59924f50256 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Fri, 6 Dec 2013 15:33:52 -0500
+Subject: [PATCH 1/3] Fix NameError if you hit Ctrl-C during download
+
+Forgot that it's yum.URLGrabError here, not URLGrabError. This doesn't
+trigger on F19/F20 'cuz the interrupt callback stuff doesn't work in yum
+there.
+---
+ fedup/download.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fedup/download.py b/fedup/download.py
+index acd2a3a..ba6f1f1 100644
+--- a/fedup/download.py
++++ b/fedup/download.py
+@@ -154,7 +154,7 @@ class UpgradeDownloader(yum.YumBase):
+             raise KeyboardInterrupt
+         else:
+             self._lastinterrupt = now
+-            raise URLGrabError(15, "user interrupt") # skip to next mirror
++            raise yum.URLGrabError(15, "user interrupt") # skip to next mirror
+ 
+     def setup_repos(self, callback=None, progressbar=None, multi_progressbar=None, repos=[]):
+         '''Return a list of repos that had problems setting up.'''
+-- 
+1.8.3.1
+
diff --git a/0002-Improve-log-messages-when-the-GPG-key-is-missing.patch b/0002-Improve-log-messages-when-the-GPG-key-is-missing.patch
new file mode 100644
index 0000000..9cf3965
--- /dev/null
+++ b/0002-Improve-log-messages-when-the-GPG-key-is-missing.patch
@@ -0,0 +1,46 @@
+From 979e67b5d64a6153129480ce757e344be2009913 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Fri, 6 Dec 2013 15:35:33 -0500
+Subject: [PATCH 2/3] Improve log messages when the GPG key is missing
+
+Before, if the GPG key was missing, you'd get:
+
+  fedup.yum:check_keyfile() REJECTED: %s does not belong to any package
+
+So - fix the misplaced format string, and actually check to see if the
+file *exists* before bothering to look it up in RPMDB.
+---
+ fedup/download.py | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/fedup/download.py b/fedup/download.py
+index ba6f1f1..3c86b6e 100644
+--- a/fedup/download.py
++++ b/fedup/download.py
+@@ -501,14 +501,21 @@ class UpgradeDownloader(yum.YumBase):
+         '''
+         if keyfile.startswith('file://'):
+             keyfile = keyfile[7:]
++
++        log.info("checking keyfile %s", keyfile)
++
++        # does the key exist?
++        if not os.path.exists(keyfile):
++            log.info("ERROR: keyfile does not exist")
++            return False
++
+         # did the key come from a package?
+         keypkgs = self.rpmdb.searchFiles(keyfile)
+-        log.info("checking keyfile %s", keyfile)
+         if keypkgs:
+             keypkg = sorted(keypkgs)[-1]
+             log.debug("keyfile owned by package %s", keypkg.nevr)
+         if not keypkgs:
+-            log.info("REJECTED: %s does not belong to any package")
++            log.info("REJECTED: keyfile does not belong to any package")
+             return False
+ 
+         # was that package signed?
+-- 
+1.8.3.1
+
diff --git a/0003-Let-instrepo-override-iso-device-instrepo.patch b/0003-Let-instrepo-override-iso-device-instrepo.patch
new file mode 100644
index 0000000..496332a
--- /dev/null
+++ b/0003-Let-instrepo-override-iso-device-instrepo.patch
@@ -0,0 +1,38 @@
+From 26291b1b69e91718a75c7a296a4ee13e829d4c39 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Mon, 9 Dec 2013 10:42:54 -0500
+Subject: [PATCH 3/3] Let --instrepo override --iso/--device instrepo
+
+--iso and --device both overwrote args.instrepo, which meant that even
+if the user provided a custom --instrepo we'd ignore it and use the
+kernel/initramfs from the DVD image.
+
+This lets us test new upgrade images on top of existing DVD/ISO images.
+---
+ fedup/commandline.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/fedup/commandline.py b/fedup/commandline.py
+index 22a2d74..b85f496 100644
+--- a/fedup/commandline.py
++++ b/fedup/commandline.py
+@@ -225,7 +225,8 @@ def device_setup(args):
+     # treat --device like --repo REPO=file://$MOUNTPOINT
+     if args.device:
+         args.repos.append(('add', 'upgradedevice=file://%s' % args.device.mnt))
+-        args.instrepo = 'upgradedevice'
++        if not args.instrepo:
++            args.instrepo = 'upgradedevice'
+     elif args.iso:
+         try:
+             args.device = media.loopmount(args.iso)
+@@ -235,4 +236,5 @@ def device_setup(args):
+             raise SystemExit(2)
+         else:
+             args.repos.append(('add', 'upgradeiso=file://%s' % args.device.mnt))
+-            args.instrepo = 'upgradeiso'
++            if not args.instrepo:
++                args.instrepo = 'upgradeiso'
+-- 
+1.8.3.1
+
diff --git a/fedup.spec b/fedup.spec
index c0e79cb..3020012 100644
--- a/fedup.spec
+++ b/fedup.spec
@@ -1,12 +1,16 @@
 Name:           fedup
 Version:        0.8.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        The Fedora Upgrade tool
 
 License:        GPLv2+
 URL:            https://github.com/wgwoods/fedup
 Source0:        https://github.com/downloads/wgwoods/fedup/%{name}-%{version}.tar.xz
 
+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
+
 # Require updates to various packages where necessary to fix bugs.
 # Bug #910326
 Requires:       systemd >= 44-23.fc17
@@ -23,6 +27,9 @@ fedup is the Fedora Upgrade tool.
 
 %prep
 %setup -q
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 make PYTHON=%{__python}
@@ -67,6 +74,10 @@ mkdir -p $RPM_BUILD_ROOT/etc/fedup/update.img.d
 #{_datadir}/fedup/ui
 
 %changelog
+* 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
+
 * Fri Dec 06 2013 Will Woods <wwoods at redhat.com> 0.8.0-2
 - Drop "Obsoletes: preupgrade" 'cuz we can't do that in F18
 


More information about the scm-commits mailing list