3 commits - liveusb/creator.py liveusb-creator.spec liveusb/gui.py liveusb/releases.py

Luke Macken lmacken at fedoraproject.org
Thu Apr 9 18:04:45 UTC 2009


 liveusb-creator.spec |    2 +-
 liveusb/creator.py   |   12 +++++++++---
 liveusb/gui.py       |    2 +-
 liveusb/releases.py  |   28 ++++------------------------
 4 files changed, 15 insertions(+), 29 deletions(-)

New commits:
commit aec98e08d99283699908f4e8a000e88bcdc86357
Author: Luke Macken <lmacken at redhat.com>
Date:   Thu Apr 9 14:04:26 2009 -0400

    Fedora 8 is EOL'd

diff --git a/liveusb/releases.py b/liveusb/releases.py
index 3689eb7..b4ce95b 100644
--- a/liveusb/releases.py
+++ b/liveusb/releases.py
@@ -62,26 +62,6 @@ releases = (
         'url': 'http://download.fedoraproject.org/pub/fedora/linux/releases/9/Live/x86_64/Fedora-9-x86_64-Live-KDE.iso',
         'sha1': 'ebb037e50b16e9e4741c49b98a44e223cf77e236',
     },
-    {
-        'name': 'Fedora 8 (i686)',
-        'url': 'http://download.fedoraproject.org/pub/fedora/linux/releases/8/Live/i686/Fedora-8-Live-i686.iso',
-        'sha1':  'afc54d62424f36e377fc0440227ccc2de21e2a58',
-    },
-    {
-        'name': 'Fedora 8 (x86_64)',
-        'url': 'http://download.fedoraproject.org/pub/fedora/linux/releases/8/Live/x86_64/Fedora-8-Live-x86_64.iso',
-        'sha1':  '51733eba9eca6e7b4c92677b8f3da2b8f8ac5a9a',
-    },
-    {
-        'name': 'Fedora 8 KDE (i686)',
-        'url': 'http://download.fedoraproject.org/pub/fedora/linux/releases/8/Live/i686/Fedora-8-Live-KDE-i686.iso',
-        'sha1': '74c8ae2529ddbb1b56ceb1a7091ea4475d3f45f9',
-    },
-    {
-        'name': 'Fedora 8 KDE (x86_64)',
-        'url': 'http://download.fedoraproject.org/pub/fedora/linux/releases/8/Live/x86_64/Fedora-8-Live-KDE-x86_64.iso',
-        'sha1':  '9b7e08afe5dc919be3ba8c146261d684b9327556',
-    },
 
     ##
     ## Custom spins


commit aaa024430216c380fd031c440b55a88364d1f1b1
Author: Luke Macken <lmacken at redhat.com>
Date:   Thu Apr 9 13:54:28 2009 -0400

    Display the appropriate hash algorithm

diff --git a/liveusb/creator.py b/liveusb/creator.py
index 1d751f4..cb21c71 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -192,7 +192,6 @@ class LiveUSBCreator(object):
 
     def verify_iso_sha1(self, progress=None):
         """ Verify the SHA1 checksum of our ISO if it is in our release list """
-        self.log.info(_("Verifying SHA1 of LiveCD image..."))
         if not progress:
             class DummyProgress:
                 def set_max_progress(self, value): pass
@@ -202,9 +201,11 @@ class LiveUSBCreator(object):
         if release:
             progress.set_max_progress(self.isosize / 1024)
             if 'sha1' in release:
+                self.log.info(_("Verifying SHA1 checksum of LiveCD image..."))
                 hash = 'sha1'
                 checksum = hashlib.sha1()
             elif 'sha256' in release:
+                self.log.info(_("Verifying SHA256 checksum of LiveCD image..."))
                 hash = 'sha256'
                 checksum = hashlib.sha256()
             isofile = file(self.iso, 'rb')


commit 8a28d48f91a588f421495c64ac8102c6f4699984
Author: Luke Macken <lmacken at redhat.com>
Date:   Thu Apr 9 11:38:02 2009 -0400

    Support sha256 checksums for our release ISOs

diff --git a/liveusb-creator.spec b/liveusb-creator.spec
index 597847d..9b7dd41 100644
--- a/liveusb-creator.spec
+++ b/liveusb-creator.spec
@@ -2,7 +2,7 @@
 
 Name:           liveusb-creator
 Version:        3.6.5
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A liveusb creator
 
 Group:          Applications/System
diff --git a/liveusb/creator.py b/liveusb/creator.py
index c1bb518..1d751f4 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -201,7 +201,12 @@ class LiveUSBCreator(object):
         release = self.get_release_from_iso()
         if release:
             progress.set_max_progress(self.isosize / 1024)
-            checksum = hashlib.sha1()
+            if 'sha1' in release:
+                hash = 'sha1'
+                checksum = hashlib.sha1()
+            elif 'sha256' in release:
+                hash = 'sha256'
+                checksum = hashlib.sha256()
             isofile = file(self.iso, 'rb')
             bytes = 1024**2
             total = 0
@@ -211,7 +216,7 @@ class LiveUSBCreator(object):
                 bytes = len(data)
                 total += bytes
                 progress.update_progress(total / 1024)
-            if checksum.hexdigest() == release['sha1']:
+            if checksum.hexdigest() == release[hash]:
                 return True
             else:
                 self.log.info(_("Error: The SHA1 of your Live CD is "
diff --git a/liveusb/gui.py b/liveusb/gui.py
index b55e405..3853a69 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -183,7 +183,7 @@ class LiveUSBThread(QtCore.QThread):
 
                 # If we know about this ISO, and it's SHA1 -- verify it
                 release = self.live.get_release_from_iso()
-                if release and 'sha1' in release and release['sha1']:
+                if release and ('sha1' in release or 'sha256' in release):
                     if not self.live.verify_iso_sha1(progress=self):
                         return
 
diff --git a/liveusb/releases.py b/liveusb/releases.py
index 3f07fa3..3689eb7 100644
--- a/liveusb/releases.py
+++ b/liveusb/releases.py
@@ -3,22 +3,22 @@ releases = (
     {
         'name': 'Fedora 11 Beta (i686)',
         'url': 'http://download.fedoraproject.org/pub/fedora/linux//releases/test/11-Beta/Live/i686/F11-Beta-i686-Live.iso',
-        'sha1': '46b3251533402acb0b20b4d0df323e6783c32ec717921133b6c557e5cd091d0a',
+        'sha256': '46b3251533402acb0b20b4d0df323e6783c32ec717921133b6c557e5cd091d0a',
     },
     {
         'name': 'Fedora 11 Beta KDE (i686)',
         'url': 'http://download.fedoraproject.org/pub/fedora/linux//releases/test/11-Beta/Live/i686/F11-Beta-i686-Live-KDE.iso',
-        'sha1': '149257a5283053dcde2b0525d46ba18fe9fe07484c6c5c8c58949877dafd201d',
+        'sha256': '149257a5283053dcde2b0525d46ba18fe9fe07484c6c5c8c58949877dafd201d',
     },
     {
         'name': 'Fedora 11 Beta (x86_64)',
         'url': 'http://download.fedoraproject.org/pub/fedora/linux//releases/test/11-Beta/Live/x86_64/F11-Beta-x86_64-Live.iso',
-        'sha1': 'fdc068688f302decef00bdfc95f474a9612fddf505eec0840f0345f112ddd055',
+        'sha256': 'fdc068688f302decef00bdfc95f474a9612fddf505eec0840f0345f112ddd055',
     },
     {
         'name': 'Fedora 11 Beta KDE (x86_64)',
         'url': 'http://download.fedoraproject.org/pub/fedora/linux//releases/test/11-Beta/Live/x86_64/F11-Beta-x86_64-Live-KDE.iso',
-        'sha1': '4ca6dd4be116789d3c3b50b742cc9f8c07c0adc5e314fd4c144e0d08ecff0b44',
+        'sha256': '4ca6dd4be116789d3c3b50b742cc9f8c07c0adc5e314fd4c144e0d08ecff0b44',
     },
 
     {




More information about the liveusb-creator mailing list