File createrepo-0.9.9-keep_sha1_default.patch of Package createrepo
--- modifyrepo.py.old 2013-03-11 09:23:17.000000000 +0000
+++ modifyrepo.py 2013-03-11 09:23:29.000000000 +0000
@@ -38,7 +38,7 @@
""" Parses the repomd.xml file existing in the given repo directory. """
self.repodir = os.path.abspath(repo)
self.repomdxml = os.path.join(self.repodir, 'repomd.xml')
- self.checksum_type = 'sha256'
+ self.checksum_type = 'sha'
if not os.path.exists(self.repomdxml):
raise MDError, '%s not found' % self.repomdxml
--- docs/createrepo.8.old 2013-03-11 09:22:49.000000000 +0000
+++ docs/createrepo.8 2013-03-11 09:23:05.000000000 +0000
@@ -76,7 +76,7 @@
Ignore symlinks of packages
.IP "\fB\-s --checksum\fP"
Choose the checksum type used in repomd.xml and for packages in the metadata.
-The default is now "sha256" (if python has hashlib). The older default was
+The default is now "sha1" (if python has hashlib). The older default was
"sha", which is actually "sha1", however explicitly using "sha1" doesn't work
on older (3.0.x) versions of yum, you need to specify "sha".
.IP "\fB\--profile\fP"
--- createrepo/__init__.py.old 2013-03-11 09:22:20.000000000 +0000
+++ createrepo/__init__.py 2013-03-11 09:22:33.000000000 +0000
@@ -61,7 +61,7 @@
self.excludes = []
self.baseurl = None
self.groupfile = None
- self.sumtype = 'sha256'
+ self.sumtype = 'sha'
self.pretty = False
self.cachedir = None
self.use_cache = False
--- createrepo/deltarpms.py.old 2013-03-11 09:21:40.000000000 +0000
+++ createrepo/deltarpms.py 2013-03-11 09:22:09.000000000 +0000
@@ -36,7 +36,7 @@
del stats
except OSError, e:
raise MDError, "Error Stat'ing file %s%s" % (basedir, filename)
- self.csum_type = 'sha256'
+ self.csum_type = 'sha'
self.relativepath = filename
self.po = po
--- createrepo/utils.py.old 2013-03-11 09:21:13.000000000 +0000
+++ createrepo/utils.py 2013-03-11 09:21:22.000000000 +0000
@@ -100,7 +100,7 @@
result = True
return result
-def checksum_and_rename(fn_path, sumtype='sha256'):
+def checksum_and_rename(fn_path, sumtype='sha'):
"""checksum the file rename the file to contain the checksum as a prefix
return the new filename"""
csum = misc.checksum(sumtype, fn_path)
--- genpkgmetadata.py.old 2013-03-11 09:50:40.000000000 +0000
+++ genpkgmetadata.py 2013-03-11 09:50:51.000000000 +0000
@@ -37,7 +37,7 @@
Sanity check all the things being passed in.
"""
- _def = yum.misc._default_checksums[0]
+ _def = "sha"
_avail = yum.misc._available_checksums
parser = OptionParser(version = "createrepo %s" % createrepo.__version__)
# query options