[packaging] Branch 'f12/custom-kolabsys.com' - 2 commits - 0901-md5-for-el5.patch fedora-packager.spec

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Sun Nov 14 21:42:15 CET 2010


 0901-md5-for-el5.patch |   25 +++++++++++++++++++++++++
 fedora-packager.spec   |    9 +++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)

New commits:
commit 88a2978f3ce70d82647d70fc012469df65910dec
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sun Nov 14 20:40:26 2010 +0000

    Bump release

diff --git a/fedora-packager.spec b/fedora-packager.spec
index a00cee1..1253f38 100644
--- a/fedora-packager.spec
+++ b/fedora-packager.spec
@@ -6,7 +6,7 @@ Epoch:		1
 
 Name:           fedora-packager
 Version:        0.5.1.4
-Release:        12%{?dist}
+Release:        13%{?dist}
 Summary:        Tools for setting up a fedora maintainer environment
 
 Group:          Applications/Productivity
@@ -178,7 +178,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/bash_completion.d/kolabpkg.bash
 
 %changelog
-* Sun Nov 14 2010 Jeroen van Meeuwen <vanmeeuwen at kolabsys.com> - 0.5.1.4-12
+* Sun Nov 14 2010 Jeroen van Meeuwen <vanmeeuwen at kolabsys.com> - 0.5.1.4-13
+- Fix using md5 instead of hashlib on el5
 - Fix substitution for pykolabpkg
 
 * Sat Nov 13 2010 Jeroen van Meeuwen <vanmeeuwen at kolabsys.com> - 0.5.1.4-10


commit 49d6fc9beb4a6c883b56d38fd95c0342dd983597
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sun Nov 14 20:39:16 2010 +0000

    Patch el5 version to use the md5 lib, and not hashlib

diff --git a/0901-md5-for-el5.patch b/0901-md5-for-el5.patch
new file mode 100644
index 0000000..57d02d6
--- /dev/null
+++ b/0901-md5-for-el5.patch
@@ -0,0 +1,25 @@
+diff -ur fedora-packager-0.5.1.4.orig/src/pyfedpkg/__init__.py fedora-packager-0.5.1.4/src/pyfedpkg/__init__.py
+--- fedora-packager-0.5.1.4.orig/src/pyfedpkg/__init__.py	2010-08-24 22:28:06.000000000 +0100
++++ fedora-packager-0.5.1.4/src/pyfedpkg/__init__.py	2010-11-14 20:37:50.521421875 +0000
+@@ -18,7 +18,11 @@
+     from kitchen.pycompat27 import subprocess
+ except ImportError:
+     import subprocess
+-import hashlib
++try:
++    import hashlib
++except ImportError:
++    import md5
++
+ import koji
+ import rpm
+ import logging
+@@ -79,6 +83,8 @@
+         sum = hashlib.new(hashtype)
+     except ValueError:
+         raise FedpkgError('Invalid hash type: %s' % hashtype)
++    except NameError:
++	sum = md5.new()
+ 
+     input = open(file, 'rb')
+     # Loop through the file reading chunks at a time as to not
diff --git a/fedora-packager.spec b/fedora-packager.spec
index 686cf0f..a00cee1 100644
--- a/fedora-packager.spec
+++ b/fedora-packager.spec
@@ -19,6 +19,7 @@ Patch2:         0003-add-author-and-copyright-info-for-fedora-burn-yubike.patch
 Patch3:         Makefile.in.patch
 
 Patch900:	0900-include-kolabpkg.patch
+Patch901:	0901-md5-for-el5.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -100,6 +101,9 @@ Provides kolab-cert and the fedora_cert python library
 %patch3 -p1
 
 %patch900 -p1
+%if 0%{?rhel} == 5
+%patch901 -p1
+%endif
 
 cp -a src/fedpkg.bash src/kolabpkg.bash
 cp -a src/fedpkg.py src/kolabpkg.py




More information about the packaging-commits mailing list