From 345e10991a9dd7e62a61780d23f4fdf51a5d95a4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:03:38 +0000 Subject: import createrepo-0.9.9-26.el7 --- diff --git a/SOURCES/BZ-1083182-traceback-on-nonexisting-pkglist.patch b/SOURCES/BZ-1083182-traceback-on-nonexisting-pkglist.patch new file mode 100644 index 0000000..0b36cdb --- /dev/null +++ b/SOURCES/BZ-1083182-traceback-on-nonexisting-pkglist.patch @@ -0,0 +1,34 @@ +commit a45146a2e7bd623c72823edbeef1f22753625d78 +Author: Zdenek Pavlas +Date: Thu Dec 19 15:48:52 2013 +0100 + + catch IOErrors when loading pkglist. BZ 1044997 + +diff --git a/genpkgmetadata.py b/genpkgmetadata.py +index 946f6b6..35e7fc9 100755 +--- a/genpkgmetadata.py ++++ b/genpkgmetadata.py +@@ -199,14 +199,15 @@ def parse_args(args, conf): + + lst = [] + if conf.pkglist: +- pfo = open(conf.pkglist, 'r') +- for line in pfo.readlines(): +- line = line.strip() +- if re.match('^\s*\#.*', line) or re.match('^\s*$', line): +- continue +- lst.append(line) +- pfo.close() +- ++ try: ++ for line in open(conf.pkglist): ++ line = line.strip() ++ if re.match('^\s*\#.*', line) or re.match('^\s*$', line): ++ continue ++ lst.append(line) ++ except EnvironmentError, e: ++ print >> sys.stderr, e ++ sys.exit(1) + conf.pkglist = lst + + if conf.includepkg: diff --git a/SOURCES/BZ-1270784-checksum-prefix.patch b/SOURCES/BZ-1270784-checksum-prefix.patch new file mode 100644 index 0000000..5502c02 --- /dev/null +++ b/SOURCES/BZ-1270784-checksum-prefix.patch @@ -0,0 +1,28 @@ +commit 0904d34bc9286b903b79f8fc42afc3f7cb63a9ad +Author: Valentina Mukhamedzhanova +Date: Mon Jan 4 15:18:21 2016 +0100 + + Make sure filename doesn't already contain a checksum. BZ#1104840 + +diff --git a/createrepo/utils.py b/createrepo/utils.py +index b0d92ec..697728b 100644 +--- a/createrepo/utils.py ++++ b/createrepo/utils.py +@@ -18,6 +18,7 @@ + + import os + import os.path ++import re + import sys + import bz2 + import gzip +@@ -173,6 +174,9 @@ def checksum_and_rename(fn_path, sumtype='sha256'): + csum = misc.checksum(sumtype, fn_path) + fn = os.path.basename(fn_path) + fndir = os.path.dirname(fn_path) ++ fn_match = re.match(r'[0-9A-Fa-f]{32,128}-(.+)', fn) ++ if fn_match: ++ fn = fn_match.groups()[0] + csum_fn = csum + '-' + fn + csum_path = os.path.join(fndir, csum_fn) + os.rename(fn_path, csum_path) diff --git a/SOURCES/BZ-1285761-modifyrepo-mergerepo-options-manpage.patch b/SOURCES/BZ-1285761-modifyrepo-mergerepo-options-manpage.patch new file mode 100644 index 0000000..e351220 --- /dev/null +++ b/SOURCES/BZ-1285761-modifyrepo-mergerepo-options-manpage.patch @@ -0,0 +1,71 @@ +diff -up createrepo-0.9.9/docs/mergerepo.1.old createrepo-0.9.9/docs/mergerepo.1 +--- createrepo-0.9.9/docs/mergerepo.1.old 2011-01-26 18:14:30.000000000 +0100 ++++ createrepo-0.9.9/docs/mergerepo.1 2014-05-06 15:40:13.144392250 +0200 +@@ -21,7 +21,7 @@ Path where merged repository metadata sh + repository metadata will be written to `pwd`/merged_repo/. + + .IP "\fB\-d --database\fP" +-Generate sqlite databases of the merged repository metadata. ++Generate sqlite databases of the merged repository metadata. This is now the default. + + .IP "\fB\-a --archlist\fP" + Specify a comma-separated list of architectures to use. Defaults to ALL. +@@ -32,6 +32,17 @@ Do not merge/include groups metadata in + .IP "\fB\--noupdateinfo\fP" + Do not merge/include updateinfo metadata in the repository. + ++.IP "\fB\-\-no-database\fP" ++Do not generate sqlite databases in the repository. ++ ++.IP "\fB\-\-compress-type \fP" ++Specify which compression type to use: compat (default), xz (may not be available), gz, bz2. ++ ++.IP "\fB\-\-version\fP" ++Output version. ++ ++.IP "\fB\-h \-\-help\fP" ++Show help menu. + + .SH "EXAMPLES" + .PP +diff -up createrepo-0.9.9/docs/modifyrepo.1.old createrepo-0.9.9/docs/modifyrepo.1 +--- createrepo-0.9.9/docs/modifyrepo.1.old 2011-01-26 18:14:30.000000000 +0100 ++++ createrepo-0.9.9/docs/modifyrepo.1 2014-05-06 15:39:06.994191423 +0200 +@@ -10,6 +10,37 @@ modifyrepo \- Modify a repomd (xml-rpm-m + .SH "DESCRIPTION" + \fBmodifyrepo\fP is a program that allows you to insert arbitrary metadata into a repomd (xml-based rpm metadata) repository. + ++.SH "OPTIONS" ++.IP "\fB\-\-mdtype \fP" ++Specify datatype of the metadata. If not specified, datatype will be derived from the filename. ++ ++.IP "\fB\-\-remove\fP" ++Remove specified file from repodata. ++ ++.IP "\fB\-\-compress\fP" ++Compress the new repodata before adding it to the repo. This is used by default. ++ ++.IP "\fB\-\-no-compress\fP" ++Do not compress the new repodata before adding it to the repo. ++ ++.IP "\fB\-\-compress-type \fP" ++Specify which compression type to use: compat (default), xz (may not be available), gz, bz2. ++ ++.IP "\fB\-s, \-\-checksum \fP" ++Specify the checksum type to use. ++ ++.IP "\fB\-\-unique-md-filenames\fP" ++Include the file's checksum in the metadata filename, helps with HTTP caching (default). ++ ++.IP "\fB\-\-simple-md-filenames\fP" ++Do not include the file's checksum in the metadata filename. ++ ++.IP "\fB\-\-version\fP" ++Output version. ++ ++.IP "\fB\-h \-\-help\fP" ++Show help menu. ++ + .SH "EXAMPLES" + .PP + $ \fBmodifyrepo\fP --mdtype=newmd metadata.xml /repository/repodata diff --git a/SPECS/createrepo.spec b/SPECS/createrepo.spec index 2ba4bd9..3b1f2fe 100644 --- a/SPECS/createrepo.spec +++ b/SPECS/createrepo.spec @@ -15,7 +15,7 @@ BuildRequires: bash-completion Summary: Creates a common metadata repository Name: createrepo Version: 0.9.9 -Release: 25%{?dist} +Release: 26%{?dist} License: GPLv2 Group: System Environment/Base Source: %{name}-%{version}.tar.gz @@ -24,6 +24,9 @@ Patch1: ten-changelog-limit.patch Patch2: BZ-1022028-wrong-package-count.patch Patch3: BZ-1256216-cifs-share-oserror.patch Patch4: BZ-1178763-duplicates.patch +Patch5: BZ-1270784-checksum-prefix.patch +Patch6: BZ-1083182-traceback-on-nonexisting-pkglist.patch +Patch7: BZ-1285761-modifyrepo-mergerepo-options-manpage.patch URL: http://createrepo.baseurl.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArchitectures: noarch @@ -42,6 +45,9 @@ packages. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build @@ -66,6 +72,14 @@ rm -rf $RPM_BUILD_ROOT %{python_sitelib}/createrepo %changelog +* Mon Feb 29 2016 Valentina Mukhamedzhanova - 0.9.9-26 +- Make sure filename doesn't already contain a checksum. +- Resolves: bug#1270784 +- Catch IOErrors when loading pkglist. +- Resolves: bug#1083182 +- Add missing options to the manpage. +- Resolves: bug#1285761 + * Wed Dec 10 2015 Valentina Mukhamedzhanova - 0.9.9-25 - mergerepo: fix getattr() crash. - Related: bug#1178763