Hello community, here is the log from the commit of package createrepo for openSUSE:Factory checked in at 2012-02-17 12:00:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/createrepo (Old) and /work/SRC/openSUSE:Factory/.createrepo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "createrepo", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/createrepo/createrepo.changes 2011-09-23 01:54:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.createrepo.new/createrepo.changes 2012-02-17 12:00:18.000000000 +0100 @@ -1,0 +2,17 @@ +Wed Jan 25 13:17:41 UTC 2012 - [email protected] + +- Spec cleanup: + * Simplified macro usage + * Dropped old suse version checks + * Removed Requires libxml2-python, upstream now uses lxml + * Package COPYING and COPYING.lib +- Update to version 0.9.9: + * Bugfix release +- Rebased generate-gzip-headers, disable-symlinks, cache_utime, cachefix, + license-to-confirm, add-lzma-option-to-generate-primary.xml.lzma, + sort-packages-before-writing-repodata patches +- Dropped createrepo-0.9.8-disable-deltarpm-1.patch and + createrepo-0.9.8-disable-deltarpm-2.patch, we now have deltarpm + Python bindings packaged as 'python-deltarpm' + +------------------------------------------------------------------- Old: ---- createrepo-0.9.8-add-lzma-option-to-generate-primary.xml.lzma.patch createrepo-0.9.8-cache_utime.patch createrepo-0.9.8-cachefix.patch createrepo-0.9.8-disable-deltarpm-1.patch createrepo-0.9.8-disable-deltarpm-2.patch createrepo-0.9.8-disable-symlinks.patch createrepo-0.9.8-generate-gzip-headers.patch createrepo-0.9.8-license-to-confirm.patch createrepo-0.9.8-sort-packages-before-writing-repodata.patch createrepo-0.9.8.tar.bz2 createrepo-rpmlintrc New: ---- createrepo-0.9.9-add-lzma-option-to-generate-primary.xml.lzma.patch createrepo-0.9.9-cache_utime.patch createrepo-0.9.9-cachefix.patch createrepo-0.9.9-disable-symlinks.patch createrepo-0.9.9-generate-gzip-headers.patch createrepo-0.9.9-license-to-confirm.patch createrepo-0.9.9-sort-packages-before-writing-repodata.patch createrepo-0.9.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ createrepo.spec ++++++ --- /var/tmp/diff_new_pack.f2n3p6/_old 2012-02-17 12:00:20.000000000 +0100 +++ /var/tmp/diff_new_pack.f2n3p6/_new 2012-02-17 12:00:20.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package createrepo # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,40 +15,34 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: createrepo -BuildRequires: python -Version: 0.9.8 -Release: 9 -License: GPL-2.0+ +Version: 0.9.9 +Release: 0 Summary: Creates a Common Metadata Repository +License: GPL-2.0+ Group: System/Packages -Source: %{name}-%{version}.tar.bz2 -Source1: createrepo-rpmlintrc -Patch0: createrepo-0.9.8-disable-deltarpm-1.patch -Patch1: createrepo-0.9.8-disable-deltarpm-2.patch -Patch2: createrepo-0.9.8-cache_utime.patch -Patch3: createrepo-0.9.8-cachefix.patch -Patch4: createrepo-0.9.8-license-to-confirm.patch -Patch5: createrepo-0.9.8-sort-packages-before-writing-repodata.patch -Patch6: createrepo-0.9.8-add-lzma-option-to-generate-primary.xml.lzma.patch -Patch7: createrepo-0.9.8-generate-gzip-headers.patch -Patch8: createrepo-0.9.8-disable-symlinks.patch -Patch9: createrepo-0.9.8-workaround-umask-reset.patch Url: http://linux.duke.edu/metadata/ -BuildRoot: %{_tmppath}/%{name}-%{version}-build -#BuildArch: noarch -Requires: yum-common >= 3.2.25 +Source: http://createrepo.baseurl.org/download/%{name}-%{version}.tar.gz +Patch2: createrepo-0.9.9-cache_utime.patch +Patch3: createrepo-0.9.9-cachefix.patch +Patch4: createrepo-0.9.9-license-to-confirm.patch +Patch5: createrepo-0.9.9-sort-packages-before-writing-repodata.patch +Patch6: createrepo-0.9.9-add-lzma-option-to-generate-primary.xml.lzma.patch +Patch7: createrepo-0.9.9-generate-gzip-headers.patch +Patch8: createrepo-0.9.9-disable-symlinks.patch +Patch9: createrepo-0.9.8-workaround-umask-reset.patch +BuildRequires: python-devel +Requires: python-deltarpm +Requires: python-lxml +Requires: python-urlgrabber Requires: rpm >= 4.1.1 Requires: rpm-python -Requires: libxml2-python -Requires: python-urlgrabber -Requires: python-lxml -%if %{suse_version} > 910 +Requires: yum-common >= 3.2.25 Requires: yum-metadata-parser +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%{!?python_sitearch: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %endif -%py_requires %description This utility generates a common metadata repository from a directory of @@ -56,50 +50,30 @@ %prep %setup -q -%patch0 -%patch1 %patch2 %patch3 %patch4 %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 +%patch8 -p1 %patch9 +sed -i "1d" createrepo/{readMetadata,yumbased,utils,deltarpms,merge}.py # Fix non-executable scripts (remove she-bang line) %build - %install - -# fix the install paths -cp createrepo/Makefile createrepo/Makefile.old -sed -e 's,PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER),PYLIBDIR = %{py_libdir},g' createrepo/Makefile.old > createrepo/Makefile -cp createrepo/Makefile createrepo/Makefile.old -sed -e 's,PKGDIR = $(PYLIBDIR)/site-packages/$(PKGNAME),PKGDIR = %{py_sitedir}/%{name},g' createrepo/Makefile.old > createrepo/Makefile -rm createrepo/Makefile.old - -%if %{suse_version} <= 1010 -sed -e "s,rpm.RPMTAG_ENHANCESNAME,1159," \ - -e "s,rpm.RPMTAG_ENHANCESFLAGS,1161," \ - -e "s,rpm.RPMTAG_ENHANCESVERSION,1160," \ - -e "s,rpm.RPMTAG_SUGGESTSNAME,1156," \ - -e "s,rpm.RPMTAG_SUGGESTSFLAGS,1158," \ - -e "s,rpm.RPMTAG_SUGGESTSVERSION,1157," \ - -e "s,rpm.RPMSENSE_STRONG,0x8000000," \ - dumpMetadata.py > dumpMetadata.py.patched -mv dumpMetadata.py.patched dumpMetadata.py -%endif -make install DESTDIR=$RPM_BUILD_ROOT sysconfdir=/etc +# Fix the install paths: +sed -i -e 's|PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)|PYLIBDIR = %{py_libdir}|g' \ + -e 's|PKGDIR = $(PYLIBDIR)/site-packages/$(PKGNAME)|PKGDIR = %{python_sitearch}/%{name}|g' createrepo/Makefile +%make_install sysconfdir=%{_sysconfdir} %files -%defattr(-, root, root) -%doc ChangeLog README -%{_mandir}/*/* +%defattr(-,root,root) +%doc ChangeLog COPYING COPYING.lib README %{_bindir}/* -%config /etc/bash_completion.d/createrepo.bash -%dir %{_datadir}/%{name} -%{_datadir}/%{name}/* -%dir %{py_sitedir}/createrepo -%{py_sitedir}/createrepo/* +%{_mandir}/*/* +%config %{_sysconfdir}/bash_completion.d/createrepo.bash +%{_datadir}/%{name}/ +%{python_sitearch}/* %changelog ++++++ createrepo-0.9.8-add-lzma-option-to-generate-primary.xml.lzma.patch -> createrepo-0.9.9-add-lzma-option-to-generate-primary.xml.lzma.patch ++++++ --- /work/SRC/openSUSE:Factory/createrepo/createrepo-0.9.8-add-lzma-option-to-generate-primary.xml.lzma.patch 2011-09-23 01:54:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.createrepo.new/createrepo-0.9.9-add-lzma-option-to-generate-primary.xml.lzma.patch 2012-02-17 12:00:17.000000000 +0100 @@ -1,15 +1,16 @@ ---- a/createrepo/__init__.py -+++ b/createrepo/__init__.py -@@ -45,7 +45,7 @@ try: +diff -ru a/createrepo/__init__.py b/createrepo/__init__.py +--- a/createrepo/__init__.py 2011-01-26 18:14:30.000000000 +0100 ++++ b/createrepo/__init__.py 2012-01-25 15:17:30.299525298 +0100 +@@ -46,7 +46,7 @@ except ImportError: pass -from utils import _gzipOpen, bzipFile, checkAndMakeDir, GzipFile, \ +from utils import _gzipOpen, bzipFile, checkAndMakeDir, GzipFile, HybridFile, \ - checksum_and_rename + checksum_and_rename, split_list_into_equal_chunks import deltarpms -@@ -389,7 +389,10 @@ class MetaDataGenerator: +@@ -412,7 +412,10 @@ # setup the primary metadata file primaryfilepath = os.path.join(self.conf.outputdir, self.conf.tempdir, self.conf.primaryfile) @@ -21,15 +22,16 @@ fo.write('<?xml version="1.0" encoding="UTF-8"?>\n') fo.write('<metadata xmlns="http://linux.duke.edu/metadata/common"' \ ' xmlns:suse="http://novell.com/package/metadata/suse/common"' \ -@@ -870,18 +873,30 @@ class MetaDataGenerator: - except AttributeError: +@@ -923,18 +926,31 @@ dbversion = '9' - rp = sqlitecachec.RepodataParserSqlite(repopath, repoid, None) + #FIXME - in theory some sort of try/except here + rp = sqlitecachec.RepodataParserSqlite(repopath, repomd.repoid, None) + if self.conf.lzma: + workfiles.append((self.conf.primaryfile[:-3] + ".lzma", "primary_lzma")) - ++ + open_csums = {} + open_sizes = {} + for (rpm_file, ftype) in workfiles: complete_path = os.path.join(repopath, rpm_file) @@ -60,18 +62,19 @@ csum = misc.checksum(sumtype, complete_path) timestamp = os.stat(complete_path)[8] -@@ -981,7 +996,7 @@ class MetaDataGenerator: - if self.conf.baseurl is not None: - location.newProp('xml:base', self.conf.baseurl) +@@ -1020,7 +1036,7 @@ + data.openchecksum = (sumtype, uncsum) + if self.conf.unique_md_filenames: - res_file = '%s-%s.xml.gz' % (csum, ftype) + res_file = '%s-%s' % (csum, rpm_file) orig_file = os.path.join(repopath, rpm_file) dest_file = os.path.join(repopath, res_file) os.rename(orig_file, dest_file) ---- a/createrepo/utils.py -+++ b/createrepo/utils.py -@@ -21,6 +21,7 @@ import os.path +diff -ru a/createrepo/utils.py b/createrepo/utils.py +--- a/createrepo/utils.py 2011-01-26 18:14:30.000000000 +0100 ++++ b/createrepo/utils.py 2012-01-25 15:14:40.848521260 +0100 +@@ -21,6 +21,7 @@ import sys import bz2 import gzip @@ -79,10 +82,10 @@ from gzip import write32u, FNAME from yum import misc -@@ -50,6 +51,46 @@ class GzipFile(gzip.GzipFile): - if fname: +@@ -51,6 +52,48 @@ self.fileobj.write(fname + '\000') + +class LzmaFile: + def __init__(self, filename, mode, compresslevel=None): + if mode != "w" and mode != "wb": @@ -123,12 +126,15 @@ + self.gz.close() + self.lzma.close() + return - ++ ++ def _gzipOpen(filename, mode="rb", compresslevel=9): return GzipFile(filename, mode, compresslevel) ---- a/genpkgmetadata.py -+++ b/genpkgmetadata.py -@@ -70,6 +70,8 @@ def parse_args(args, conf): + +diff -ru a/genpkgmetadata.py b/genpkgmetadata.py +--- a/genpkgmetadata.py 2011-01-26 18:14:30.000000000 +0100 ++++ b/genpkgmetadata.py 2012-01-25 15:14:55.074521596 +0100 +@@ -72,6 +72,8 @@ #parser.add_option("--database-only", default=False, action="store_true", # dest='database_only', # help="Only make the sqlite databases - does not work with --update, yet") @@ -137,4 +143,3 @@ parser.add_option("--update", default=False, action="store_true", help="use the existing repodata to speed up creation of new") parser.add_option("--update-md-path", default=None, dest='update_md_path', - ++++++ createrepo-0.9.8-cache_utime.patch -> createrepo-0.9.9-cache_utime.patch ++++++ --- /work/SRC/openSUSE:Factory/createrepo/createrepo-0.9.8-cache_utime.patch 2011-09-23 01:54:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.createrepo.new/createrepo-0.9.9-cache_utime.patch 2012-02-17 12:00:17.000000000 +0100 @@ -1,6 +1,6 @@ --- createrepo/yumbased.py.orig 2010-04-09 10:22:09.000000000 +0200 +++ createrepo/yumbased.py 2010-04-09 10:22:26.000000000 +0200 -@@ -70,7 +70,7 @@ +@@ -78,7 +78,7 @@ csumo = open(csumfile, 'r') checksum = csumo.readline() csumo.close() ++++++ createrepo-0.9.8-cachefix.patch -> createrepo-0.9.9-cachefix.patch ++++++ --- /work/SRC/openSUSE:Factory/createrepo/createrepo-0.9.8-cachefix.patch 2011-09-23 01:54:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.createrepo.new/createrepo-0.9.9-cachefix.patch 2012-02-17 12:00:17.000000000 +0100 @@ -1,6 +1,6 @@ --- createrepo/yumbased.py.orig 2010-04-09 10:22:09.000000000 +0200 +++ createrepo/yumbased.py 2010-04-09 10:28:58.000000000 +0200 -@@ -55,8 +55,8 @@ +@@ -63,8 +63,8 @@ t.append("".join(self.hdr[rpm.RPMTAG_SIGGPG])) if type(self.hdr[rpm.RPMTAG_SIGPGP]) is not types.NoneType: t.append("".join(self.hdr[rpm.RPMTAG_SIGPGP])) ++++++ createrepo-0.9.8-disable-symlinks.patch -> createrepo-0.9.9-disable-symlinks.patch ++++++ --- /work/SRC/openSUSE:Factory/createrepo/createrepo-0.9.8-disable-symlinks.patch 2011-09-23 01:54:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.createrepo.new/createrepo-0.9.9-disable-symlinks.patch 2012-02-17 12:00:18.000000000 +0100 @@ -1,18 +1,7 @@ ---- genpkgmetadata.py.orig 2010-05-25 11:25:43.000000000 +0200 -+++ genpkgmetadata.py 2010-05-25 11:26:01.000000000 +0200 -@@ -90,6 +90,8 @@ - help="<dir> = optional directory to output to") - parser.add_option("-S", "--skip-symlinks", dest="skip_symlinks", - default=False, action="store_true", help="ignore symlinks of packages") -+ parser.add_option("--skip-symlinked-dirs", dest="skip_symlinked_dirs", -+ default=False, action="store_true", help="ignore symlinked directories") - parser.add_option("--changelog-limit", dest="changelog_limit", - default=None, help="only import the last N changelog entries") - parser.add_option("--unique-md-filenames", dest="unique_md_filenames", - ---- createrepo/__init__.py.orig 2010-05-25 11:26:06.000000000 +0200 -+++ createrepo/__init__.py 2010-05-25 11:27:12.000000000 +0200 -@@ -82,6 +82,7 @@ +diff -ru a/createrepo/__init__.py b/createrepo/__init__.py +--- a/createrepo/__init__.py 2011-01-26 18:14:30.000000000 +0100 ++++ b/createrepo/__init__.py 2012-01-25 14:58:01.560497445 +0100 +@@ -84,6 +84,7 @@ self.file_patterns = ['.*bin\/.*', '^\/etc\/.*', '^\/usr\/lib\/sendmail$'] self.dir_patterns = ['.*bin\/.*', '^\/etc\/.*'] self.skip_symlinks = False @@ -20,7 +9,7 @@ self.pkglist = [] self.database_only = False self.primaryfile = 'primary.xml.gz' -@@ -261,6 +262,8 @@ +@@ -280,6 +281,8 @@ func(arg, top, names) for name in names: name = os.path.join(top, name) @@ -29,3 +18,17 @@ if os.path.isdir(name): self._os_path_walk(name, func, arg) def getFileList(self, directory, ext): +Only in b/createrepo: .__init__.py.swp +diff -ru a/genpkgmetadata.py b/genpkgmetadata.py +--- a/genpkgmetadata.py 2011-01-26 18:14:30.000000000 +0100 ++++ b/genpkgmetadata.py 2012-01-25 14:57:19.262496442 +0100 +@@ -92,6 +92,8 @@ + help="<dir> = optional directory to output to") + parser.add_option("-S", "--skip-symlinks", dest="skip_symlinks", + default=False, action="store_true", help="ignore symlinks of packages") ++ parser.add_option("--skip-symlinked-dirs", dest="skip_symlinked_dirs", ++ default=False, action="store_true", help="ignore symlinked directories") + parser.add_option("--changelog-limit", dest="changelog_limit", + default=None, help="only import the last N changelog entries") + parser.add_option("--unique-md-filenames", dest="unique_md_filenames", +Only in b: .genpkgmetadata.py.swp ++++++ createrepo-0.9.8-generate-gzip-headers.patch -> createrepo-0.9.9-generate-gzip-headers.patch ++++++ --- /work/SRC/openSUSE:Factory/createrepo/createrepo-0.9.8-generate-gzip-headers.patch 2011-09-23 01:54:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.createrepo.new/createrepo-0.9.9-generate-gzip-headers.patch 2012-02-17 12:00:18.000000000 +0100 @@ -1,6 +1,7 @@ ---- a/createrepo/utils.py -+++ b/createrepo/utils.py -@@ -35,21 +35,14 @@ def _(args): +diff -ru a/createrepo/utils.py b/createrepo/utils.py +--- a/createrepo/utils.py 2011-01-26 18:14:30.000000000 +0100 ++++ b/createrepo/utils.py 2012-01-25 14:54:00.939491715 +0100 +@@ -35,21 +36,14 @@ class GzipFile(gzip.GzipFile): def _write_gzip_header(self): @@ -26,6 +27,5 @@ + self.fileobj.write('\002') # max compression + self.fileobj.write('\003') # UNIX + class LzmaFile: - def __init__(self, filename, mode, compresslevel=None): - ++++++ createrepo-0.9.8-license-to-confirm.patch -> createrepo-0.9.9-license-to-confirm.patch ++++++ --- /work/SRC/openSUSE:Factory/createrepo/createrepo-0.9.8-license-to-confirm.patch 2011-09-23 01:54:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.createrepo.new/createrepo-0.9.9-license-to-confirm.patch 2012-02-17 12:00:18.000000000 +0100 @@ -1,6 +1,6 @@ --- createrepo/__init__.py.orig 2010-04-09 11:09:01.000000000 +0200 +++ createrepo/__init__.py 2010-04-09 11:13:01.000000000 +0200 -@@ -391,6 +392,7 @@ +@@ -417,6 +418,7 @@ fo = _gzipOpen(primaryfilepath, 'w') fo.write('<?xml version="1.0" encoding="UTF-8"?>\n') fo.write('<metadata xmlns="http://linux.duke.edu/metadata/common"' \ @@ -8,11 +8,3 @@ ' xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="%s">' % self.pkgcount) return fo -@@ -806,6 +829,7 @@ - rpmns = reporoot.newNs("http://linux.duke.edu/metadata/rpm", 'rpm') - repopath = os.path.join(self.conf.outputdir, self.conf.tempdir) - repofilepath = os.path.join(repopath, self.conf.repomdfile) -+ susens = reporoot.newNs("http://novell.com/package/metadata/suse/common", 'suse') - - revision = reporoot.newChild(None, 'revision', self.conf.revision) - if self.conf.content_tags or self.conf.distro_tags or self.conf.repo_tags: ++++++ createrepo-0.9.8-sort-packages-before-writing-repodata.patch -> createrepo-0.9.9-sort-packages-before-writing-repodata.patch ++++++ --- /work/SRC/openSUSE:Factory/createrepo/createrepo-0.9.8-sort-packages-before-writing-repodata.patch 2011-09-23 01:54:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.createrepo.new/createrepo-0.9.9-sort-packages-before-writing-repodata.patch 2012-02-17 12:00:18.000000000 +0100 @@ -1,17 +1,19 @@ ---- a/createrepo/__init__.py -+++ b/createrepo/__init__.py -@@ -25,6 +25,7 @@ from bz2 import BZ2File +diff -ru a/createrepo/__init__.py b/createrepo/__init__.py +--- a/createrepo/__init__.py 2011-01-26 18:14:30.000000000 +0100 ++++ b/createrepo/__init__.py 2012-01-25 16:05:55.627594528 +0100 +@@ -24,6 +24,7 @@ from urlgrabber import grabber import tempfile import stat +import re + import fcntl + import subprocess - from yum import misc, Errors, to_unicode - from yum.sqlutils import executeSQL -@@ -478,6 +479,30 @@ class MetaDataGenerator: +@@ -504,6 +505,30 @@ + " add it" % po return po - ++ + def sortPackages(self, pkglist): + class PackageKey: + def __init__(self, package): @@ -35,16 +37,16 @@ + + return sorted(pkglist, key=PackageKey) + -+ + def writeMetadataDocs(self, pkglist=[], pkgpath=None): - if not pkglist: -@@ -488,6 +513,7 @@ class MetaDataGenerator: +@@ -515,6 +540,8 @@ else: directory = pkgpath + pkglist = self.sortPackages(pkglist) - for pkg in pkglist: - self.current_pkg += 1 - recycled = False - ++ + # for worker/forked model + # iterate the pkglist - see which ones are handled by --update and let them + # go on their merry way +Only in b/createrepo: .__init__.py.swp -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
