[koji] revert "avoid baseurl option in createrepo" patch

Dennis Gilmore ausil at fedoraproject.org
Sun Jan 20 16:17:22 UTC 2013


commit dc4262550abe82315c66f087200135a0dd33bc85
Author: Dennis Gilmore <dennis at ausil.us>
Date:   Sun Jan 20 10:17:15 2013 -0600

    revert "avoid baseurl option in createrepo" patch
    
    - fix integer overflow issue in checkUpload handler

 koji-1.7.1-checkUpload.patch        |   30 +++++++++++++++++++++++
 koji-1.7.1-fix-external-repos.patch |   44 +++++++++++++++++++++++++++++++++++
 koji.spec                           |   10 +++++++-
 3 files changed, 83 insertions(+), 1 deletions(-)
---
diff --git a/koji-1.7.1-checkUpload.patch b/koji-1.7.1-checkUpload.patch
new file mode 100644
index 0000000..248f580
--- /dev/null
+++ b/koji-1.7.1-checkUpload.patch
@@ -0,0 +1,30 @@
+From eaa43f8cbd863daeee7709710bbfb00bde52bd7d Mon Sep 17 00:00:00 2001
+From: Mike McLean <mikem at redhat.com>
+Date: Thu, 17 Jan 2013 21:16:50 +0000
+Subject: fix integer overflow issue in checkUpload handler
+
+---
+diff --git a/hub/kojihub.py b/hub/kojihub.py
+index 003e1fc..b433169 100644
+--- a/hub/kojihub.py
++++ b/hub/kojihub.py
+@@ -7061,7 +7061,7 @@ class RootExports(object):
+             try:
+                 fcntl.lockf(fd, fcntl.LOCK_SH|fcntl.LOCK_NB)
+             except IOError, e:
+-                koji.LockError, e
++                raise koji.LockError, e
+             st = os.fstat(fd)
+             if not stat.S_ISREG(st.st_mode):
+                 raise koji.GenericError, "Not a regular file: %s" % fn
+@@ -7081,7 +7081,7 @@ class RootExports(object):
+                     length += len(chunk)
+                     chksum.update(chunk)
+                     chunk = os.read(fd, 8192)
+-                data['sumlength'] = length
++                data['sumlength'] = koji.encode_int(length)
+                 data['hexdigest'] = chksum.hexdigest()
+             return data
+         finally:
+--
+cgit v0.9.1
diff --git a/koji-1.7.1-fix-external-repos.patch b/koji-1.7.1-fix-external-repos.patch
new file mode 100644
index 0000000..3bc6300
--- /dev/null
+++ b/koji-1.7.1-fix-external-repos.patch
@@ -0,0 +1,44 @@
+diff -uNr koji-1.7.1-orig/builder/kojid koji-1.7.1/builder/kojid
+--- koji-1.7.1-orig/builder/kojid	2012-11-19 22:36:03.000000000 -0600
++++ koji-1.7.1/builder/kojid	2013-01-20 10:08:08.408515512 -0600
+@@ -2698,7 +2698,7 @@
+ 
+     def create_local_repo(self, rinfo, arch, pkglist, groupdata, oldrepo):
+         koji.ensuredir(self.outdir)
+-        cmd = ['/usr/bin/createrepo', '-vd', '-o', self.outdir]
++        cmd = ['/usr/bin/createrepo', '-vd', '-o', self.outdir, '-u', self.options.topurl]
+         if pkglist is not None:
+             cmd.extend(['-i', pkglist])
+         if os.path.isfile(groupdata):
+@@ -2725,7 +2725,7 @@
+         if pkglist is None:
+             cmd.append(self.outdir)
+         else:
+-            cmd.append(self.repodir)
++            cmd.append(self.options.topdir)
+ 
+         logfile = '%s/createrepo.log' % self.workdir
+         status = log_output(self.session, cmd[0], cmd, logfile, self.getUploadDir(), logerror=True)
+diff -uNr koji-1.7.1-orig/hub/kojihub.py koji-1.7.1/hub/kojihub.py
+--- koji-1.7.1-orig/hub/kojihub.py	2012-11-19 22:36:03.000000000 -0600
++++ koji-1.7.1/hub/kojihub.py	2013-01-20 10:08:11.076535467 -0600
+@@ -2188,7 +2188,7 @@
+     packages = {}
+     for repoarch in repo_arches:
+         packages.setdefault(repoarch, [])
+-    relpathinfo = koji.PathInfo(topdir='toplink')
++    relpathinfo = koji.PathInfo(topdir='')
+     for rpminfo in rpms:
+         if not with_debuginfo and koji.is_debuginfo(rpminfo['name']):
+             continue
+@@ -2221,10 +2221,6 @@
+             # src and noarch special-cased -- see below
+         archdir = os.path.join(repodir, arch)
+         koji.ensuredir(archdir)
+-        # Make a symlink to our topdir
+-        top_relpath = koji.util.relpath(koji.pathinfo.topdir, archdir)
+-        top_link = os.path.join(archdir, 'toplink')
+-        os.symlink(top_relpath, top_link)
+         pkglist = file(os.path.join(repodir, arch, 'pkglist'), 'w')
+         logger.info("Creating package list for %s" % arch)
+         for rpminfo in packages[arch]:
diff --git a/koji.spec b/koji.spec
index 2f667ff..11b95e2 100644
--- a/koji.spec
+++ b/koji.spec
@@ -2,13 +2,15 @@
 
 Name: koji
 Version: 1.7.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: LGPLv2 and GPLv2+
 # koji.ssl libs (from plague) are GPLv2+
 Summary: Build system tools
 Group: Applications/System
 URL: http://fedorahosted.org/koji
 Patch0: fedora-config.patch
+Patch1: koji-1.7.1-fix-external-repos.patch
+Patch2: koji-1.7.1-checkUpload.patch
 
 Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -122,6 +124,8 @@ koji-web is a web UI to the Koji system.
 %prep
 %setup -q
 %patch0 -p1 -b .orig
+%patch1 -p1 -b .repos
+%patch2 -p1 -b .int
 
 %build
 
@@ -225,6 +229,10 @@ if [ $1 = 0 ]; then
 fi
 
 %changelog
+* Sun Jan 20 2013 Dennis Gilmore <dennis at ausil.us> - 1.7.1-2
+- revert "avoid baseurl option in createrepo" patch
+- fix integer overflow issue in checkUpload handler
+
 * Wed Nov 21 2012 Dennis Gilmore <dennis at ausil.us> - 1.7.1-1
 - update to upstream 1.7.1 release
 


More information about the scm-commits mailing list