From 1d8ac98591021cafb8fcdfdc863879d7c5fba3a5 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Wed, 21 Feb 2007 22:02:50 +0000 Subject: [PATCH 001/202] Setup of module koji --- .cvsignore | 0 Makefile | 21 +++++++++++++++++++++ sources | 0 3 files changed, 21 insertions(+) create mode 100644 .cvsignore create mode 100644 Makefile create mode 100644 sources diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9b277c5 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: koji +# $Id$ +NAME := koji +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 85efc06f58dc542f77fd061f21c3745e2f24da8e Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 2 Apr 2007 17:20:28 +0000 Subject: [PATCH 002/202] auto-import koji-1.0-1 on branch devel from koji-1.0-1.src.rpm --- .cvsignore | 1 + koji.spec | 192 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 194 insertions(+) create mode 100644 koji.spec diff --git a/.cvsignore b/.cvsignore index e69de29..d5034e3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +koji-1.0.tar.bz2 diff --git a/koji.spec b/koji.spec new file mode 100644 index 0000000..09ffa2b --- /dev/null +++ b/koji.spec @@ -0,0 +1,192 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%define baserelease 1 +#build with --define 'testbuild 1' to have a timestamp appended to release +%if x%{?testbuild} == x1 +%define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) +%else +%define release %{baserelease} +%endif +Name: koji +Version: 1.0 +Release: %{release}%{?dist} +License: LGPL +Summary: Build system tools +Group: Applications/System +URL: http://hosted.fedoraproject.org/projects/koji +Source: %{name}-%{PACKAGE_VERSION}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +Requires: python-krbV >= 1.0.13 +Requires: rpm-python +Requires: pyOpenSSL +BuildRequires: python + +%description +Koji is a system for building and tracking RPMS. The base package +contains shared libraries and the command-line interface. + +%package hub +Summary: Koji XMLRPC interface +Group: Applications/Internet +Requires: httpd +Requires: mod_python +Requires: postgresql-python +Requires: %{name} = %{version}-%{release} + +%description hub +koji-hub is the XMLRPC interface to the koji database + +%package builder +Summary: Koji RPM builder daemon +Group: Applications/System +Requires: %{name} = %{version}-%{release} +Requires: mock >= 0.5-3 +Requires(post): /sbin/chkconfig +Requires(post): /sbin/service +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(pre): /usr/sbin/useradd +Requires: cvs +Requires: rpm-build +Requires: redhat-rpm-config +Requires: createrepo >= 0.4.4 + +%description builder +koji-builder is the daemon that runs on build machines and executes +tasks that come through the Koji system. + +%package utils +Summary: Koji Utilities +Group: Applications/Internet +Requires: postgresql-python +Requires: %{name} = %{version}-%{release} +Requires: rpm-build +Requires: createrepo >= 0.4.4 + +%description utils +Utilities for the Koji system + +%package web +Summary: Koji Web UI +Group: Applications/Internet +Requires: httpd +Requires: mod_python +Requires: mod_auth_kerb +Requires: postgresql-python +Requires: python-cheetah +Requires: %{name} = %{version}-%{release} +Requires: python-krbV >= 1.0.13 + +%description web +koji-web is a web UI to the Koji system. + +%prep +%setup -q + +%build + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_bindir}/* +%{python_sitelib}/%{name} +%config(noreplace) %{_sysconfdir}/koji.conf +%doc docs Authors COPYING LGPL + +%files hub +%defattr(-,root,root) +%{_datadir}/koji-hub +%config(noreplace) /etc/httpd/conf.d/kojihub.conf + +%files utils +%defattr(-,root,root) +%{_sbindir}/kojira +%{_initrddir}/kojira +%config(noreplace) %{_sysconfdir}/sysconfig/kojira +%{_sysconfdir}/kojira +%config(noreplace) %{_sysconfdir}/kojira/kojira.conf + +%files web +%defattr(-,root,root) +%{_datadir}/koji-web +%{_sysconfdir}/kojiweb +%config(noreplace) /etc/httpd/conf.d/kojiweb.conf + +%files builder +%defattr(-,root,root) +%{_sbindir}/kojid +%{_initrddir}/kojid +%config(noreplace) %{_sysconfdir}/sysconfig/kojid +%{_sysconfdir}/kojid +%config(noreplace) %{_sysconfdir}/kojid/kojid.conf +%attr(-,kojibuilder,kojibuilder) /etc/mock/koji + +%pre builder +/usr/sbin/useradd -r -s /bin/bash -G mock -d /builddir -M kojibuilder 2>/dev/null ||: + +%post builder +/sbin/chkconfig --add kojid +/sbin/service kojid condrestart &> /dev/null || : + +%preun builder +if [ $1 = 0 ]; then + /sbin/service kojid stop &> /dev/null + /sbin/chkconfig --del kojid +fi + +%post utils +/sbin/chkconfig --add kojira +/sbin/service kojira condrestart &> /dev/null || : +%preun utils +if [ $1 = 0 ]; then + /sbin/service kojira stop &> /dev/null || : + /sbin/chkconfig --del kojira +fi + +%changelog +* Mon Apr 02 2007 Jesse Keating 1.0-1 +- Release 1.0! + +* Wed Mar 28 2007 Mike Bonnet - 0.9.7-4 +- set SSL connection timeout to 12 hours + +* Wed Mar 28 2007 Mike Bonnet - 0.9.7-3 +- avoid SSL renegotiation +- improve log file handling in kojid +- bug fixes in command-line and web UI + +* Sun Mar 25 2007 Mike Bonnet - 0.9.7-2 +- enable http access to packages in kojid +- add Requires: pyOpenSSL +- building srpms from CVS now works with the Extras CVS structure +- fixes to the chain-build command +- bug fixes in the XML-RPC and web interfaces + +* Tue Mar 20 2007 Jesse Keating - 0.9.7-1 +- Package up the needed ssl files + +* Tue Mar 20 2007 Jesse Keating - 0.9.6-1 +- 0.9.6 release, mostly ssl auth stuff +- use named directories for config stuff +- remove -3 requires on creatrepo, don't need that specific anymore + +* Tue Feb 20 2007 Jesse Keating - 0.9.5-8 +- Add Authors COPYING LGPL to the docs of the main package + +* Tue Feb 20 2007 Jesse Keating - 0.9.5-7 +- Move web files from /var/www to /usr/share +- Use -p in install calls +- Add rpm-python to requires for koji + +* Mon Feb 19 2007 Jesse Keating - 0.9.5-6 +- Clean up spec for package review + +* Sun Feb 04 2007 Mike McLean - 0.9.5-1 +- project renamed to koji diff --git a/sources b/sources index e69de29..faf817b 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +509770ad9155722acf3baa4cb467c2b8 koji-1.0.tar.bz2 From 30d8ef90fc2fcda6cf967de370d797cbad2e0a50 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 9 Apr 2007 17:34:34 +0000 Subject: [PATCH 003/202] 1.1 release; add a fedora-packager-setup tool --- .cvsignore | 2 +- fedora-packager-setup.sh | 72 ++++++++++++++++++++++++++++++++++++++++ koji.spec | 10 +++++- sources | 2 +- 4 files changed, 83 insertions(+), 3 deletions(-) create mode 100755 fedora-packager-setup.sh diff --git a/.cvsignore b/.cvsignore index d5034e3..bbc4fbd 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.0.tar.bz2 +koji-1.1.tar.bz2 diff --git a/fedora-packager-setup.sh b/fedora-packager-setup.sh new file mode 100755 index 0000000..29959e7 --- /dev/null +++ b/fedora-packager-setup.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +echo Creating User Koji environment +if [ ! -d ~/.koji ]; then +mkdir ~/.koji +fi + +if [ ! -f ~/.koji/client.crt ]; then + if [ -f ~/.fedora.cert ]; then + cp ~/.fedora.cert ~/.koji/client.crt + else + echo "you need a client cert please download one from https://admin.fedoraproject.org/accounts/gen-cert.cgi" + echo "Save it to ~/.koji/client.crt" + echo "Then run this script again" + exit + fi +fi + +if [ -f ~/.fedora-upload-ca.cert ]; then + cp ~/.fedora-upload-ca.cert ~/.koji/clientca.crt +else + wget "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-upload-ca.cert" -O ~/.koji/clientca.crt +fi + +if [ -f ~/.fedora-server-ca.cert ]; then + cp ~/.fedora-server-ca.cert ~/.koji/serverca.crt +else + wget "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-server-ca.cert" -O ~/.koji/serverca.crt +fi + + +cat > ~/.koji/config < Preferences -> Advanced +Click "View Certificates" +On "Your Certificates" tab, click "Import" +Select fedora-client-cert.p12 +Type the export password (if you specified one) +You should see your username appear under "Fedora Project" + +- You should now be able to click the "login" link on the website successfully" +openssl pkcs12 -export -in ~/.koji/client.crt -CAfile ~/.koji/clientca.crt -out fedora-client-cert.p12 diff --git a/koji.spec b/koji.spec index 09ffa2b..4c2d4b3 100644 --- a/koji.spec +++ b/koji.spec @@ -8,13 +8,14 @@ %define release %{baserelease} %endif Name: koji -Version: 1.0 +Version: 1.1 Release: %{release}%{?dist} License: LGPL Summary: Build system tools Group: Applications/System URL: http://hosted.fedoraproject.org/projects/koji Source: %{name}-%{PACKAGE_VERSION}.tar.bz2 +Source1: fedora-packager-setup.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: python-krbV >= 1.0.13 @@ -89,6 +90,7 @@ koji-web is a web UI to the Koji system. %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install +install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} %clean rm -rf $RPM_BUILD_ROOT @@ -151,6 +153,12 @@ if [ $1 = 0 ]; then fi %changelog +* Mon Apr 09 2007 Jesse Keating 1.1-1 +- make the output listPackages() consistent regardless of with_dups +- prevent large batches of repo deletes from holding up regens +- allow sorting the host list by arches +- Add a script to setup Fedora developer's environment + * Mon Apr 02 2007 Jesse Keating 1.0-1 - Release 1.0! diff --git a/sources b/sources index faf817b..e1d6ddc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -509770ad9155722acf3baa4cb467c2b8 koji-1.0.tar.bz2 +9af35f955b1e806515e6e09c9f632eba koji-1.1.tar.bz2 From 3e62b1ad5180347ebfbf20cf88107aaa7aad8ee7 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 3 May 2007 22:19:02 +0000 Subject: [PATCH 004/202] clarify some of the fedora-packager-setup text --- fedora-packager-setup.sh | 16 +++++++++------- koji.spec | 5 ++++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/fedora-packager-setup.sh b/fedora-packager-setup.sh index 29959e7..7deec12 100755 --- a/fedora-packager-setup.sh +++ b/fedora-packager-setup.sh @@ -56,17 +56,19 @@ serverca = ~/.koji/serverca.crt EOF -echo "creating cert for import into browser to allow user authentication on the website. -Choose your own password, you will be propmted for this when using the cert. +echo "Creating an SSL Certificate to import into your browser to allow user authentication on at http://koji.fedoraproject.org/koji. +Choose your own passphrase, you will be prompted for this when using the certificate. -- import pkcs12 cert into Firefox: +- To import the Certificate into Firefox: Edit -> Preferences -> Advanced Click "View Certificates" On "Your Certificates" tab, click "Import" -Select fedora-client-cert.p12 -Type the export password (if you specified one) -You should see your username appear under "Fedora Project" +Select fedora-client-cert.p12 (from the directory you ran this script in) +Type the export passphrase (if you specified one) + +Once imported, you should see a certificate named "Fedora Project" +Your username should appear underneath this. -- You should now be able to click the "login" link on the website successfully" +- You should now be able to click the "login" link at http://koji.fedoraproject.org/koji successfully" openssl pkcs12 -export -in ~/.koji/client.crt -CAfile ~/.koji/clientca.crt -out fedora-client-cert.p12 diff --git a/koji.spec b/koji.spec index 4c2d4b3..cab7b5c 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 1 +%define baserelease 2 #build with --define 'testbuild 1' to have a timestamp appended to release %if x%{?testbuild} == x1 %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -153,6 +153,9 @@ if [ $1 = 0 ]; then fi %changelog +* Thu May 03 2007 Jesse Keating 1.1-2 +- Clean up some of the text in fedora-packager-setup.sh + * Mon Apr 09 2007 Jesse Keating 1.1-1 - make the output listPackages() consistent regardless of with_dups - prevent large batches of repo deletes from holding up regens From 6789f3dae4a7d4dab909c834525f3e75a79f083e Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 15 May 2007 19:17:44 +0000 Subject: [PATCH 005/202] New upstream koji release, lots of fixes. Some fixes for fedora-packager-setup based on feedback --- .cvsignore | 2 +- fedora-packager-setup.sh | 11 ++++++++--- koji.spec | 30 ++++++++++++++++++++++++++---- sources | 2 +- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/.cvsignore b/.cvsignore index bbc4fbd..4f914bb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.1.tar.bz2 +koji-1.2.0.tar.bz2 diff --git a/fedora-packager-setup.sh b/fedora-packager-setup.sh index 7deec12..a608c91 100755 --- a/fedora-packager-setup.sh +++ b/fedora-packager-setup.sh @@ -4,10 +4,15 @@ echo Creating User Koji environment if [ ! -d ~/.koji ]; then mkdir ~/.koji fi +if [ -f ~/.fedora.cert ] && [ -f ~/.koji/client.crt ]; then + if [ ~/.fedora.cert -nt ~/.koji/client.crt ]; then + rm ~/.koji/client.crt + fi +fi if [ ! -f ~/.koji/client.crt ]; then if [ -f ~/.fedora.cert ]; then - cp ~/.fedora.cert ~/.koji/client.crt + cp -l ~/.fedora.cert ~/.koji/client.crt else echo "you need a client cert please download one from https://admin.fedoraproject.org/accounts/gen-cert.cgi" echo "Save it to ~/.koji/client.crt" @@ -17,13 +22,13 @@ if [ ! -f ~/.koji/client.crt ]; then fi if [ -f ~/.fedora-upload-ca.cert ]; then - cp ~/.fedora-upload-ca.cert ~/.koji/clientca.crt + cp -l ~/.fedora-upload-ca.cert ~/.koji/clientca.crt else wget "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-upload-ca.cert" -O ~/.koji/clientca.crt fi if [ -f ~/.fedora-server-ca.cert ]; then - cp ~/.fedora-server-ca.cert ~/.koji/serverca.crt + cp -l ~/.fedora-server-ca.cert ~/.koji/serverca.crt else wget "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-server-ca.cert" -O ~/.koji/serverca.crt fi diff --git a/koji.spec b/koji.spec index cab7b5c..ed953e7 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %define release %{baserelease} %endif Name: koji -Version: 1.1 +Version: 1.2.0 Release: %{release}%{?dist} License: LGPL Summary: Build system tools @@ -51,7 +51,7 @@ Requires(pre): /usr/sbin/useradd Requires: cvs Requires: rpm-build Requires: redhat-rpm-config -Requires: createrepo >= 0.4.4 +Requires: createrepo >= 0.4.8-2 %description builder koji-builder is the daemon that runs on build machines and executes @@ -62,8 +62,6 @@ Summary: Koji Utilities Group: Applications/Internet Requires: postgresql-python Requires: %{name} = %{version}-%{release} -Requires: rpm-build -Requires: createrepo >= 0.4.4 %description utils Utilities for the Koji system @@ -153,9 +151,33 @@ if [ $1 = 0 ]; then fi %changelog +* Tue May 15 2007 Jesse Keating - 1.2.0-2 +- overwrite and hardlink ssl cert for fedora packagers (dgilmore) + +* Tue May 15 2007 Mike Bonnet - 1.2.0-1 +- change version numbering to a 3-token scheme +- install the koji favicon + +* Mon May 14 2007 Mike Bonnet - 1.1-5 +- cleanup koji-utils Requires +- fix encoding and formatting in email notifications +- expand archlist based on ExclusiveArch/BuildArchs +- allow import of rpms without srpms +- commit before linking in prepRepo to release db locks +- remove exec bit from kojid logs and uploaded files (patch by Enrico Scholz) + * Thu May 03 2007 Jesse Keating 1.1-2 - Clean up some of the text in fedora-packager-setup.sh +* Tue May 1 2007 Mike Bonnet - 1.1-4 +- remove spurious Requires: from the koji-utils package + +* Tue May 1 2007 Mike Bonnet - 1.1-3 +- fix typo in BuildNotificationTask (patch provided by Michael Schwendt) +- add the --changelog param to the buildinfo command +- always send email notifications to the package builder and package owner +- improvements to the web UI + * Mon Apr 09 2007 Jesse Keating 1.1-1 - make the output listPackages() consistent regardless of with_dups - prevent large batches of repo deletes from holding up regens diff --git a/sources b/sources index e1d6ddc..74e6bb6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9af35f955b1e806515e6e09c9f632eba koji-1.1.tar.bz2 +07e9596d3645834a1386120cab0cb7e2 koji-1.2.0.tar.bz2 From 88e72c1dacd0558eca9325284baae994ee388148 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 15 May 2007 20:56:30 +0000 Subject: [PATCH 006/202] More fixes to setup script --- fedora-packager-setup.sh | 85 +++++++++++++++++++++++----------------- koji.spec | 5 ++- 2 files changed, 54 insertions(+), 36 deletions(-) diff --git a/fedora-packager-setup.sh b/fedora-packager-setup.sh index a608c91..76be806 100755 --- a/fedora-packager-setup.sh +++ b/fedora-packager-setup.sh @@ -1,38 +1,40 @@ #!/bin/bash -echo Creating User Koji environment -if [ ! -d ~/.koji ]; then -mkdir ~/.koji -fi -if [ -f ~/.fedora.cert ] && [ -f ~/.koji/client.crt ]; then - if [ ~/.fedora.cert -nt ~/.koji/client.crt ]; then - rm ~/.koji/client.crt +set -e + +function check_wget() { + if [ ! -f /usr/bin/wget ]; then + echo "You must have wget installed to download the required CA certificates" + echo "Please run \"yum install wget\" as root, and re-run this script" + exit 1 fi +} + +echo "Setting up Koji client..." + +if [ ! -f ~/.fedora.cert ]; then + echo "You need a client certificate from the Fedora Account System" + echo "Please download one from https://admin.fedoraproject.org/accounts/gen-cert.cgi" + echo "Save it to ~/.fedora.cert and re-run this script" + exit 1 fi -if [ ! -f ~/.koji/client.crt ]; then - if [ -f ~/.fedora.cert ]; then - cp -l ~/.fedora.cert ~/.koji/client.crt - else - echo "you need a client cert please download one from https://admin.fedoraproject.org/accounts/gen-cert.cgi" - echo "Save it to ~/.koji/client.crt" - echo "Then run this script again" - exit - fi +if [ ! -f ~/.fedora-upload-ca.cert ]; then + check_wget + /usr/bin/wget -q "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-upload-ca.cert" -O ~/.fedora-upload-ca.cert fi -if [ -f ~/.fedora-upload-ca.cert ]; then - cp -l ~/.fedora-upload-ca.cert ~/.koji/clientca.crt -else - wget "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-upload-ca.cert" -O ~/.koji/clientca.crt +if [ ! -f ~/.fedora-server-ca.cert ]; then + check_wget + /usr/bin/wget -q "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-server-ca.cert" -O ~/.fedora-server-ca.cert fi -if [ -f ~/.fedora-server-ca.cert ]; then - cp -l ~/.fedora-server-ca.cert ~/.koji/serverca.crt -else - wget "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-server-ca.cert" -O ~/.koji/serverca.crt +if [ ! -d ~/.koji ]; then + mkdir ~/.koji fi +# remove existing contents of ~/.koji to avoid confusion +rm -f ~/.koji/* cat > ~/.koji/config < Preferences -> Advanced Click "View Certificates" On "Your Certificates" tab, click "Import" -Select fedora-client-cert.p12 (from the directory you ran this script in) -Type the export passphrase (if you specified one) +Select ~/fedora-browser-cert.p12 +Type the export passphrase you chose earlier -Once imported, you should see a certificate named "Fedora Project" +Once imported, you should see a certificate named "Fedora Project". Your username should appear underneath this. -- You should now be able to click the "login" link at http://koji.fedoraproject.org/koji successfully" -openssl pkcs12 -export -in ~/.koji/client.crt -CAfile ~/.koji/clientca.crt -out fedora-client-cert.p12 +You should now be able to click the "login" link at http://koji.fedoraproject.org/koji/ successfully. +EOF diff --git a/koji.spec b/koji.spec index ed953e7..244a151 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 2 +%define baserelease 3 #build with --define 'testbuild 1' to have a timestamp appended to release %if x%{?testbuild} == x1 %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -151,6 +151,9 @@ if [ $1 = 0 ]; then fi %changelog +* Tue May 15 2007 Jesse Keating - 1.2.0-3 +- More fixes to fedora-packager-setup.sh from mbonnet + * Tue May 15 2007 Jesse Keating - 1.2.0-2 - overwrite and hardlink ssl cert for fedora packagers (dgilmore) From 6bc8e1ffc5d9f810c9b564103eaa72005d05650d Mon Sep 17 00:00:00 2001 From: Mike Bonnet Date: Thu, 31 May 2007 22:02:26 +0000 Subject: [PATCH 007/202] add pkgurl to ~/.koji/config --- fedora-packager-setup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fedora-packager-setup.sh b/fedora-packager-setup.sh index 76be806..360424b 100755 --- a/fedora-packager-setup.sh +++ b/fedora-packager-setup.sh @@ -47,6 +47,9 @@ server = http://koji.fedoraproject.org/kojihub ;url of web interface weburl = http://koji.fedoraproject.org/koji +;url of package download site +pkgurl = http://koji.fedoraproject.org/packages + ;path to the koji top directory ;topdir = /mnt/koji From a358def7485da2161b4bafaa938ca0dd8ffd9159 Mon Sep 17 00:00:00 2001 From: Mike Bonnet Date: Tue, 5 Jun 2007 20:34:20 +0000 Subject: [PATCH 008/202] - update to 1.2.2 - patch /etc/koji.conf so the cli can work out-of-the-box with Fedora Koji --- .cvsignore | 2 +- fedora-config.patch | 34 ++++++++++++++++++++++++++++++++++ koji.spec | 18 +++++++++++++++--- sources | 2 +- 4 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 fedora-config.patch diff --git a/.cvsignore b/.cvsignore index 4f914bb..1050ee0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.2.0.tar.bz2 +koji-1.2.2.tar.bz2 diff --git a/fedora-config.patch b/fedora-config.patch new file mode 100644 index 0000000..69816a2 --- /dev/null +++ b/fedora-config.patch @@ -0,0 +1,34 @@ +--- koji-1.2.2/cli/koji.conf.orig 2007-06-05 15:28:12.751753000 -0400 ++++ koji-1.2.2/cli/koji.conf 2007-06-05 15:30:48.710640000 -0400 +@@ -3,24 +3,24 @@ + ;configuration for koji cli tool + + ;url of XMLRPC server +-;server = http://hub.example.com/kojihub ++server = http://koji.fedoraproject.org/kojihub + + ;url of web interface +-;weburl = http://www.example.com/koji ++weburl = http://koji.fedoraproject.org/koji + + ;url of package download site +-;pkgurl = http://www.example.com/packages ++pkgurl = http://koji.fedoraproject.org/packages + + ;path to the koji top directory +-;topdir = /mnt/koji ++topdir = /mnt/koji + + ;configuration for SSL athentication + + ;client certificate +-;cert = ~/.koji/client.crt ++cert = ~/.fedora.cert + + ;certificate of the CA that issued the client certificate +-;ca = ~/.koji/clientca.crt ++ca = ~/.fedora-upload-ca.cert + + ;certificate of the CA that issued the HTTP server certificate +-;serverca = ~/.koji/serverca.crt ++serverca = ~/.fedora-server-ca.cert diff --git a/koji.spec b/koji.spec index 244a151..4fdfe5e 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 3 +%define baserelease 1 #build with --define 'testbuild 1' to have a timestamp appended to release %if x%{?testbuild} == x1 %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -8,19 +8,21 @@ %define release %{baserelease} %endif Name: koji -Version: 1.2.0 +Version: 1.2.2 Release: %{release}%{?dist} License: LGPL Summary: Build system tools Group: Applications/System URL: http://hosted.fedoraproject.org/projects/koji -Source: %{name}-%{PACKAGE_VERSION}.tar.bz2 +Source: %{name}-%{version}.tar.bz2 Source1: fedora-packager-setup.sh +Patch0: fedora-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: python-krbV >= 1.0.13 Requires: rpm-python Requires: pyOpenSSL +Requires: python-urlgrabber BuildRequires: python %description @@ -82,6 +84,7 @@ koji-web is a web UI to the Koji system. %prep %setup -q +%patch0 -p1 -b .orig %build @@ -151,6 +154,15 @@ if [ $1 = 0 ]; then fi %changelog +* Tue Jun 5 2007 Mike Bonnet - 1.2.2-1 +- only allow admins to perform non-scratch builds from srpm +- bug fixes to the cmd-line and web UIs +- don't allow ExclusiveArch to expand the archlist (bz#239359) +- add a summary line stating whether the task succeeded or failed to the end of the "watch-task" output +- add a search box to the header of every page in the web UI +- new koji download-build command (patch provided by Dan Berrange) +- patch /etc/koji.conf so the cli will work out-of-the-box with Fedora Koji + * Tue May 15 2007 Jesse Keating - 1.2.0-3 - More fixes to fedora-packager-setup.sh from mbonnet diff --git a/sources b/sources index 74e6bb6..4ba21a3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -07e9596d3645834a1386120cab0cb7e2 koji-1.2.0.tar.bz2 +74e5271750ea76ab911029b85f43d1d1 koji-1.2.2.tar.bz2 From 16dc37608667a2a90cb6fb9afd4640695994cf0d Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 15 Nov 2007 21:01:34 +0000 Subject: [PATCH 009/202] Point to the right upstream location of the certs. --- fedora-packager-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fedora-packager-setup.sh b/fedora-packager-setup.sh index 360424b..386f5c3 100755 --- a/fedora-packager-setup.sh +++ b/fedora-packager-setup.sh @@ -21,12 +21,12 @@ fi if [ ! -f ~/.fedora-upload-ca.cert ]; then check_wget - /usr/bin/wget -q "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-upload-ca.cert" -O ~/.fedora-upload-ca.cert + /usr/bin/wget -q "https://admin.fedoraproject.org/accounts/fedora-upload-ca.cert" -O ~/.fedora-upload-ca.cert fi if [ ! -f ~/.fedora-server-ca.cert ]; then check_wget - /usr/bin/wget -q "http://fedoraproject.org/wiki/PackageMaintainers/BuildSystemClientSetup?action=AttachFile&do=get&target=fedora-server-ca.cert" -O ~/.fedora-server-ca.cert + /usr/bin/wget -q "https://admin.fedoraproject.org/accounts/fedora-server-ca.cert" -O ~/.fedora-server-ca.cert fi if [ ! -d ~/.koji ]; then From f0da961450e94cd4446e116b2ffb285d7380a14d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 4 Dec 2007 06:29:54 +0000 Subject: [PATCH 010/202] remove fedora-packager-setup.sh its now part of fedora-packager --- fedora-packager-setup.sh | 97 ---------------------------------------- koji.spec | 7 +-- 2 files changed, 4 insertions(+), 100 deletions(-) delete mode 100755 fedora-packager-setup.sh diff --git a/fedora-packager-setup.sh b/fedora-packager-setup.sh deleted file mode 100755 index 386f5c3..0000000 --- a/fedora-packager-setup.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash - -set -e - -function check_wget() { - if [ ! -f /usr/bin/wget ]; then - echo "You must have wget installed to download the required CA certificates" - echo "Please run \"yum install wget\" as root, and re-run this script" - exit 1 - fi -} - -echo "Setting up Koji client..." - -if [ ! -f ~/.fedora.cert ]; then - echo "You need a client certificate from the Fedora Account System" - echo "Please download one from https://admin.fedoraproject.org/accounts/gen-cert.cgi" - echo "Save it to ~/.fedora.cert and re-run this script" - exit 1 -fi - -if [ ! -f ~/.fedora-upload-ca.cert ]; then - check_wget - /usr/bin/wget -q "https://admin.fedoraproject.org/accounts/fedora-upload-ca.cert" -O ~/.fedora-upload-ca.cert -fi - -if [ ! -f ~/.fedora-server-ca.cert ]; then - check_wget - /usr/bin/wget -q "https://admin.fedoraproject.org/accounts/fedora-server-ca.cert" -O ~/.fedora-server-ca.cert -fi - -if [ ! -d ~/.koji ]; then - mkdir ~/.koji -fi - -# remove existing contents of ~/.koji to avoid confusion -rm -f ~/.koji/* - -cat > ~/.koji/config < Preferences -> Advanced -Click "View Certificates" -On "Your Certificates" tab, click "Import" -Select ~/fedora-browser-cert.p12 -Type the export passphrase you chose earlier - -Once imported, you should see a certificate named "Fedora Project". -Your username should appear underneath this. - -You should now be able to click the "login" link at http://koji.fedoraproject.org/koji/ successfully. -EOF diff --git a/koji.spec b/koji.spec index 4fdfe5e..95fdc87 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 1 +%define baserelease 2 #build with --define 'testbuild 1' to have a timestamp appended to release %if x%{?testbuild} == x1 %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -15,7 +15,6 @@ Summary: Build system tools Group: Applications/System URL: http://hosted.fedoraproject.org/projects/koji Source: %{name}-%{version}.tar.bz2 -Source1: fedora-packager-setup.sh Patch0: fedora-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -91,7 +90,6 @@ koji-web is a web UI to the Koji system. %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install -install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} %clean rm -rf $RPM_BUILD_ROOT @@ -154,6 +152,9 @@ if [ $1 = 0 ]; then fi %changelog +* Tue Dec 04 2007 Dennis Gilmore -1.2.2-2 +- remove fedora-packager-setup.sh it is now part of fedora-packager + * Tue Jun 5 2007 Mike Bonnet - 1.2.2-1 - only allow admins to perform non-scratch builds from srpm - bug fixes to the cmd-line and web UIs From 86272a6f8c6ae502af2cdbf000fc572317443e35 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 15 Dec 2007 02:34:33 +0000 Subject: [PATCH 011/202] New release, sync up spec file from upstream, remove references to fedora-packager. --- .cvsignore | 2 +- koji.spec | 34 +++++++++++++++------------------- sources | 2 +- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.cvsignore b/.cvsignore index 1050ee0..734bfc5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.2.2.tar.bz2 +koji-1.2.3.tar.bz2 diff --git a/koji.spec b/koji.spec index 95fdc87..8d27136 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 2 +%define baserelease 1 #build with --define 'testbuild 1' to have a timestamp appended to release %if x%{?testbuild} == x1 %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -8,13 +8,13 @@ %define release %{baserelease} %endif Name: koji -Version: 1.2.2 +Version: 1.2.3 Release: %{release}%{?dist} License: LGPL Summary: Build system tools Group: Applications/System URL: http://hosted.fedoraproject.org/projects/koji -Source: %{name}-%{version}.tar.bz2 +Source: %{name}-%{PACKAGE_VERSION}.tar.bz2 Patch0: fedora-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -43,16 +43,18 @@ koji-hub is the XMLRPC interface to the koji database Summary: Koji RPM builder daemon Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: mock >= 0.5-3 +Requires: mock >= 0.8.7 Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(pre): /usr/sbin/useradd -Requires: cvs +Requires: /usr/bin/cvs +Requires: /usr/bin/svn +Requires: /usr/bin/git Requires: rpm-build Requires: redhat-rpm-config -Requires: createrepo >= 0.4.8-2 +Requires: createrepo >= 0.4.11 %description builder koji-builder is the daemon that runs on build machines and executes @@ -152,23 +154,18 @@ if [ $1 = 0 ]; then fi %changelog -* Tue Dec 04 2007 Dennis Gilmore -1.2.2-2 -- remove fedora-packager-setup.sh it is now part of fedora-packager +* Fri Dec 14 2007 jkeating 1.2.3-1 +- New upstream release with lots of updates, bugfixes, and enhancements. * Tue Jun 5 2007 Mike Bonnet - 1.2.2-1 - only allow admins to perform non-scratch builds from srpm - bug fixes to the cmd-line and web UIs + +* Thu May 31 2007 Mike Bonnet - 1.2.1-1 - don't allow ExclusiveArch to expand the archlist (bz#239359) - add a summary line stating whether the task succeeded or failed to the end of the "watch-task" output - add a search box to the header of every page in the web UI - new koji download-build command (patch provided by Dan Berrange) -- patch /etc/koji.conf so the cli will work out-of-the-box with Fedora Koji - -* Tue May 15 2007 Jesse Keating - 1.2.0-3 -- More fixes to fedora-packager-setup.sh from mbonnet - -* Tue May 15 2007 Jesse Keating - 1.2.0-2 -- overwrite and hardlink ssl cert for fedora packagers (dgilmore) * Tue May 15 2007 Mike Bonnet - 1.2.0-1 - change version numbering to a 3-token scheme @@ -182,9 +179,6 @@ fi - commit before linking in prepRepo to release db locks - remove exec bit from kojid logs and uploaded files (patch by Enrico Scholz) -* Thu May 03 2007 Jesse Keating 1.1-2 -- Clean up some of the text in fedora-packager-setup.sh - * Tue May 1 2007 Mike Bonnet - 1.1-4 - remove spurious Requires: from the koji-utils package @@ -194,11 +188,13 @@ fi - always send email notifications to the package builder and package owner - improvements to the web UI +* Tue Apr 17 2007 Mike Bonnet - 1.1-2 +- re-enable use of the --update flag to createrepo + * Mon Apr 09 2007 Jesse Keating 1.1-1 - make the output listPackages() consistent regardless of with_dups - prevent large batches of repo deletes from holding up regens - allow sorting the host list by arches -- Add a script to setup Fedora developer's environment * Mon Apr 02 2007 Jesse Keating 1.0-1 - Release 1.0! diff --git a/sources b/sources index 4ba21a3..073adc3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -74e5271750ea76ab911029b85f43d1d1 koji-1.2.2.tar.bz2 +22cc3917703906b92d009190101ca6d5 koji-1.2.3.tar.bz2 From 7d9b5ae986556db94efe9d73bf09ed79b5c3d205 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 25 Jan 2008 02:11:39 +0000 Subject: [PATCH 012/202] - Use the --skip-stat flag in createrepo calls. - canonicalize tag arches before using them (dgilmore) - fix return value of delete_build - Revert to getfile urls if the task is not successful in emails - Pass --target instead of --arch to mock. - ignore trashcan tag in prune-signed-copies command - add the "allowed_scms" kojid parameter - allow filtering builds by the person who built them --- .cvsignore | 2 +- koji.spec | 23 +++++++++++++++++++---- sources | 2 +- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 734bfc5..54a4310 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.2.3.tar.bz2 +koji-1.2.4.tar.bz2 diff --git a/koji.spec b/koji.spec index 8d27136..9b48e7a 100644 --- a/koji.spec +++ b/koji.spec @@ -8,13 +8,13 @@ %define release %{baserelease} %endif Name: koji -Version: 1.2.3 +Version: 1.2.4 Release: %{release}%{?dist} License: LGPL Summary: Build system tools Group: Applications/System -URL: http://hosted.fedoraproject.org/projects/koji -Source: %{name}-%{PACKAGE_VERSION}.tar.bz2 +URL: http://fedorahosted.org/koji +Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{PACKAGE_VERSION}.tar.bz2 Patch0: fedora-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -54,7 +54,12 @@ Requires: /usr/bin/svn Requires: /usr/bin/git Requires: rpm-build Requires: redhat-rpm-config -Requires: createrepo >= 0.4.11 +%if 0%{?rhel} >= 5 +Requires: createrepo >= 0.4.11-2 +%endif +%if 0%{?fedora} >= 9 +Requires: createrepo >= 0.9.2 +%endif %description builder koji-builder is the daemon that runs on build machines and executes @@ -154,6 +159,16 @@ if [ $1 = 0 ]; then fi %changelog +* Thu Jan 24 2008 jkeating 1.2.4-1 +- Use the --skip-stat flag in createrepo calls. +- canonicalize tag arches before using them (dgilmore) +- fix return value of delete_build +- Revert to getfile urls if the task is not successful in emails +- Pass --target instead of --arch to mock. +- ignore trashcan tag in prune-signed-copies command +- add the "allowed_scms" kojid parameter +- allow filtering builds by the person who built them + * Fri Dec 14 2007 jkeating 1.2.3-1 - New upstream release with lots of updates, bugfixes, and enhancements. diff --git a/sources b/sources index 073adc3..a4858e1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -22cc3917703906b92d009190101ca6d5 koji-1.2.3.tar.bz2 +fa02ec3b1fc271bbde5449931a56f929 koji-1.2.4.tar.bz2 From 941c3e9bcdc8ad0fa0214f1cda211a518438652b Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 25 Jan 2008 07:22:54 +0000 Subject: [PATCH 013/202] - Put createrepo arguments in correct order --- .cvsignore | 2 +- koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 54a4310..5ca911b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.2.4.tar.bz2 +koji-1.2.5.tar.bz2 diff --git a/koji.spec b/koji.spec index 9b48e7a..cac2ed0 100644 --- a/koji.spec +++ b/koji.spec @@ -8,14 +8,14 @@ %define release %{baserelease} %endif Name: koji -Version: 1.2.4 +Version: 1.2.5 Release: %{release}%{?dist} License: LGPL Summary: Build system tools Group: Applications/System URL: http://fedorahosted.org/koji -Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{PACKAGE_VERSION}.tar.bz2 Patch0: fedora-config.patch +Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{PACKAGE_VERSION}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: python-krbV >= 1.0.13 @@ -159,6 +159,9 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Jan 25 2008 jkeating 1.2.5-1 +- Put createrepo arguments in correct order + * Thu Jan 24 2008 jkeating 1.2.4-1 - Use the --skip-stat flag in createrepo calls. - canonicalize tag arches before using them (dgilmore) diff --git a/sources b/sources index a4858e1..bff65c2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fa02ec3b1fc271bbde5449931a56f929 koji-1.2.4.tar.bz2 +6be9cfcd5698ee4c29666eedbbcfb346 koji-1.2.5.tar.bz2 From 09e6712c2d70775d99175e5eb8fb1a824c60364d Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 5 Aug 2008 17:40:47 +0000 Subject: [PATCH 014/202] fix license tag --- koji.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/koji.spec b/koji.spec index cac2ed0..1a5ee8f 100644 --- a/koji.spec +++ b/koji.spec @@ -1,8 +1,8 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 1 +%define baserelease 2 #build with --define 'testbuild 1' to have a timestamp appended to release -%if x%{?testbuild} == x1 +%if "x%{?testbuild}" == "x1" %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) %else %define release %{baserelease} @@ -10,7 +10,7 @@ Name: koji Version: 1.2.5 Release: %{release}%{?dist} -License: LGPL +License: LGPLv2 Summary: Build system tools Group: Applications/System URL: http://fedorahosted.org/koji @@ -159,6 +159,10 @@ if [ $1 = 0 ]; then fi %changelog +* Tue Aug 5 2008 Tom "spot" Callaway 1.2.5-2 +- fix conditional (line 5) +- fix license tag + * Fri Jan 25 2008 jkeating 1.2.5-1 - Put createrepo arguments in correct order From d2e38ff95c486e8c4a1e49830e4d4d9a115d6a16 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 26 Aug 2008 00:20:24 +0000 Subject: [PATCH 015/202] update to 1.2.6 --- .cvsignore | 2 +- koji.spec | 17 +++++++++++++---- sources | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 5ca911b..2d10bca 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.2.5.tar.bz2 +koji-1.2.6.tar.bz2 diff --git a/koji.spec b/koji.spec index 1a5ee8f..5d3c3a7 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 2 +%define baserelease 1 #build with --define 'testbuild 1' to have a timestamp appended to release %if "x%{?testbuild}" == "x1" %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -8,7 +8,7 @@ %define release %{baserelease} %endif Name: koji -Version: 1.2.5 +Version: 1.2.6 Release: %{release}%{?dist} License: LGPLv2 Summary: Build system tools @@ -59,6 +59,8 @@ Requires: createrepo >= 0.4.11-2 %endif %if 0%{?fedora} >= 9 Requires: createrepo >= 0.9.2 +%else +Requires: createrepo >= 0.4.11-2 %endif %description builder @@ -116,10 +118,13 @@ rm -rf $RPM_BUILD_ROOT %files utils %defattr(-,root,root) %{_sbindir}/kojira +%{_sbindir}/koji-gc %{_initrddir}/kojira %config(noreplace) %{_sysconfdir}/sysconfig/kojira -%{_sysconfdir}/kojira +%dir %{_sysconfdir}/kojira %config(noreplace) %{_sysconfdir}/kojira/kojira.conf +%dir %{_sysconfdir}/koji-gc +%config(noreplace) %{_sysconfdir}/koji-gc/koji-gc.conf %files web %defattr(-,root,root) @@ -132,7 +137,7 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/kojid %{_initrddir}/kojid %config(noreplace) %{_sysconfdir}/sysconfig/kojid -%{_sysconfdir}/kojid +%dir %{_sysconfdir}/kojid %config(noreplace) %{_sysconfdir}/kojid/kojid.conf %attr(-,kojibuilder,kojibuilder) /etc/mock/koji @@ -159,6 +164,10 @@ if [ $1 = 0 ]; then fi %changelog +* Mon Aug 25 2008 Dennis Gilmore - 1.2.6-1 +- update to 1.2.6 +- make sure we have to correct version of createrepo on Fedora 8 + * Tue Aug 5 2008 Tom "spot" Callaway 1.2.5-2 - fix conditional (line 5) - fix license tag diff --git a/sources b/sources index bff65c2..c03cdf5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6be9cfcd5698ee4c29666eedbbcfb346 koji-1.2.5.tar.bz2 +11fd77f4e2951363277d64ed1e005809 koji-1.2.6.tar.bz2 From b9a2a27fd377d0fa52fc4cd90acc884fb79a115d Mon Sep 17 00:00:00 2001 From: Ignacio Vazquez-Abrams Date: Sat, 29 Nov 2008 16:47:58 +0000 Subject: [PATCH 016/202] Rebuild for Python 2.6 --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 5d3c3a7..a05a1fd 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 1 +%define baserelease 2 #build with --define 'testbuild 1' to have a timestamp appended to release %if "x%{?testbuild}" == "x1" %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -164,6 +164,9 @@ if [ $1 = 0 ]; then fi %changelog +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 1.2.6-2 +- Rebuild for Python 2.6 + * Mon Aug 25 2008 Dennis Gilmore - 1.2.6-1 - update to 1.2.6 - make sure we have to correct version of createrepo on Fedora 8 From 0573e2639cb47f261a3b1d5830bb9a23c1c3ac71 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Feb 2009 04:52:49 +0000 Subject: [PATCH 017/202] update to 1.3.0 --- .cvsignore | 2 +- koji.spec | 26 ++++++++++++++------------ sources | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2d10bca..433ab82 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.2.6.tar.bz2 +koji-1.3.0.tar.bz2 diff --git a/koji.spec b/koji.spec index a05a1fd..68211dc 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 2 +%define baserelease 1 #build with --define 'testbuild 1' to have a timestamp appended to release %if "x%{?testbuild}" == "x1" %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -8,7 +8,7 @@ %define release %{baserelease} %endif Name: koji -Version: 1.2.6 +Version: 1.3.0 Release: %{release}%{?dist} License: LGPLv2 Summary: Build system tools @@ -43,7 +43,7 @@ koji-hub is the XMLRPC interface to the koji database Summary: Koji RPM builder daemon Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: mock >= 0.8.7 +Requires: mock >= 0.9.14 Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig @@ -54,14 +54,7 @@ Requires: /usr/bin/svn Requires: /usr/bin/git Requires: rpm-build Requires: redhat-rpm-config -%if 0%{?rhel} >= 5 -Requires: createrepo >= 0.4.11-2 -%endif -%if 0%{?fedora} >= 9 -Requires: createrepo >= 0.9.2 -%else -Requires: createrepo >= 0.4.11-2 -%endif +Requires: createrepo >= 0.9.6 %description builder koji-builder is the daemon that runs on build machines and executes @@ -113,18 +106,22 @@ rm -rf $RPM_BUILD_ROOT %files hub %defattr(-,root,root) %{_datadir}/koji-hub -%config(noreplace) /etc/httpd/conf.d/kojihub.conf +%{_libexecdir}/koji-hub/ +%config(noreplace) %{_sysconfdir}/httpd/conf.d/kojihub.conf +%config(noreplace) %{_sysconfdir}/koji-hub/hub.conf %files utils %defattr(-,root,root) %{_sbindir}/kojira %{_sbindir}/koji-gc +%{_sbindir}/koji-shadow %{_initrddir}/kojira %config(noreplace) %{_sysconfdir}/sysconfig/kojira %dir %{_sysconfdir}/kojira %config(noreplace) %{_sysconfdir}/kojira/kojira.conf %dir %{_sysconfdir}/koji-gc %config(noreplace) %{_sysconfdir}/koji-gc/koji-gc.conf +%config(noreplace) %{_sysconfdir}/koji-shadow/koji-shadow.conf %files web %defattr(-,root,root) @@ -136,6 +133,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_sbindir}/kojid %{_initrddir}/kojid +%{_libexecdir}/kojid/ +%{_datadir}/koji-builder %config(noreplace) %{_sysconfdir}/sysconfig/kojid %dir %{_sysconfdir}/kojid %config(noreplace) %{_sysconfdir}/kojid/kojid.conf @@ -164,6 +163,9 @@ if [ $1 = 0 ]; then fi %changelog +* Wed Feb 18 2009 Dennis Gilmore - 1.3.0-1 +- update to 1.3.0 + * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 1.2.6-2 - Rebuild for Python 2.6 diff --git a/sources b/sources index c03cdf5..1d1d9a7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -11fd77f4e2951363277d64ed1e005809 koji-1.2.6.tar.bz2 +97c8625dd708b25758027c782eaffdda koji-1.3.0.tar.bz2 From 90521551da78cc8e6c96d3d2178c4f89d2899cde Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Feb 2009 00:08:57 +0000 Subject: [PATCH 018/202] update to 1.3.1 --- .cvsignore | 2 +- koji.spec | 11 ++++++++++- sources | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 433ab82..6f88394 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.3.0.tar.bz2 +koji-1.3.1.tar.bz2 diff --git a/koji.spec b/koji.spec index 68211dc..c7c9c67 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %define release %{baserelease} %endif Name: koji -Version: 1.3.0 +Version: 1.3.1 Release: %{release}%{?dist} License: LGPLv2 Summary: Build system tools @@ -54,7 +54,13 @@ Requires: /usr/bin/svn Requires: /usr/bin/git Requires: rpm-build Requires: redhat-rpm-config +%if 0%{?fedora} Requires: createrepo >= 0.9.6 +%endif +%if 0%{?rhel} +Requires: python-createrepo >= 0.9.6 +Requires: python-hashlib +%endif %description builder koji-builder is the daemon that runs on build machines and executes @@ -163,6 +169,9 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Feb 20 2009 Dennis Gilmore - 1.3.1-1 +- update to 1.3.1 + * Wed Feb 18 2009 Dennis Gilmore - 1.3.0-1 - update to 1.3.0 diff --git a/sources b/sources index 1d1d9a7..cf3e757 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -97c8625dd708b25758027c782eaffdda koji-1.3.0.tar.bz2 +431044ff0bd4b34c552a74d4ae814c73 koji-1.3.1.tar.bz2 From 5fb985b45d69b30a3da8ba2d6dcc78405a77fa9a Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 11:45:17 +0000 Subject: [PATCH 019/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index c7c9c67..28894fa 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 1 +%define baserelease 2 #build with --define 'testbuild 1' to have a timestamp appended to release %if "x%{?testbuild}" == "x1" %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -169,6 +169,9 @@ if [ $1 = 0 ]; then fi %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 1.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Fri Feb 20 2009 Dennis Gilmore - 1.3.1-1 - update to 1.3.1 From ebeb443adc292d1fbff17d3d200894bf27e52fe5 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 25 Jul 2009 04:43:27 +0000 Subject: [PATCH 020/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 28894fa..c517769 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 2 +%define baserelease 3 #build with --define 'testbuild 1' to have a timestamp appended to release %if "x%{?testbuild}" == "x1" %define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) @@ -169,6 +169,9 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Jul 24 2009 Fedora Release Engineering - 1.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Wed Feb 25 2009 Fedora Release Engineering - 1.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 12b25f94882b7d3e8c61995622449db3437e62f8 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 20 Nov 2009 19:27:52 +0000 Subject: [PATCH 021/202] update to 1.3.2 --- .cvsignore | 2 +- koji.spec | 35 +++++++++++++++++++++++++---------- sources | 2 +- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.cvsignore b/.cvsignore index 6f88394..f9e0cd7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.3.1.tar.bz2 +koji-1.3.2.tar.bz2 diff --git a/koji.spec b/koji.spec index c517769..70853c1 100644 --- a/koji.spec +++ b/koji.spec @@ -1,21 +1,14 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%define baserelease 3 -#build with --define 'testbuild 1' to have a timestamp appended to release -%if "x%{?testbuild}" == "x1" -%define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S) -%else -%define release %{baserelease} -%endif Name: koji -Version: 1.3.1 -Release: %{release}%{?dist} +Version: 1.3.2 +Release: 1%{?dist} License: LGPLv2 Summary: Build system tools Group: Applications/System URL: http://fedorahosted.org/koji Patch0: fedora-config.patch -Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{PACKAGE_VERSION}.tar.bz2 +Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: python-krbV >= 1.0.13 @@ -31,6 +24,8 @@ contains shared libraries and the command-line interface. %package hub Summary: Koji XMLRPC interface Group: Applications/Internet +License: LGPLv2 and GPLv2 +# rpmdiff lib (from rpmlint) is GPLv2 (only) Requires: httpd Requires: mod_python Requires: postgresql-python @@ -39,6 +34,15 @@ Requires: %{name} = %{version}-%{release} %description hub koji-hub is the XMLRPC interface to the koji database +%package hub-plugins +Summary: Koji hub plugins +Group: Applications/Internet +Requires: %{name} = %{version}-%{release} +Requires: %{name}-hub = %{version}-%{release} + +%description hub-plugins +Plugins to the koji XMLRPC interface + %package builder Summary: Koji RPM builder daemon Group: Applications/System @@ -54,12 +58,15 @@ Requires: /usr/bin/svn Requires: /usr/bin/git Requires: rpm-build Requires: redhat-rpm-config +Requires: pykickstart +Requires: pycdio %if 0%{?fedora} Requires: createrepo >= 0.9.6 %endif %if 0%{?rhel} Requires: python-createrepo >= 0.9.6 Requires: python-hashlib +Requires: createrepo %endif %description builder @@ -116,6 +123,11 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/httpd/conf.d/kojihub.conf %config(noreplace) %{_sysconfdir}/koji-hub/hub.conf +%files hub-plugins +%defattr(-,root,root) +%dir %{_prefix}/lib/koji-hub-plugins +%{_prefix}/lib/koji-hub-plugins/*.py* + %files utils %defattr(-,root,root) %{_sbindir}/kojira @@ -169,6 +181,9 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Nov 20 2009 Dennis Gilmore - 1.3.2-1 +- update to 1.3.2 + * Fri Jul 24 2009 Fedora Release Engineering - 1.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index cf3e757..a72961d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -431044ff0bd4b34c552a74d4ae814c73 koji-1.3.1.tar.bz2 +c776f838f126276269e4bba2c2cea097 koji-1.3.2.tar.bz2 From 748540942d84f36c6cf5ee0086c625e869199556 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:51:26 +0000 Subject: [PATCH 022/202] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9b277c5..e0ab139 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := koji SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From b7bcf872d058492025d524596e4ad1ae33f109eb Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 9 Jul 2010 15:33:27 +0000 Subject: [PATCH 023/202] koji 1.4.0 --- .cvsignore | 2 +- fedora-config.patch | 8 ++++---- koji.spec | 34 ++++++++++++++++++++++++++++++---- sources | 2 +- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/.cvsignore b/.cvsignore index f9e0cd7..8bb102c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -koji-1.3.2.tar.bz2 +koji-1.4.0.tar.bz2 diff --git a/fedora-config.patch b/fedora-config.patch index 69816a2..a5bf323 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,5 +1,5 @@ ---- koji-1.2.2/cli/koji.conf.orig 2007-06-05 15:28:12.751753000 -0400 -+++ koji-1.2.2/cli/koji.conf 2007-06-05 15:30:48.710640000 -0400 +--- koji-1.4.0/cli/koji.conf.orig 2010-07-08 21:04:26.000000000 -0500 ++++ koji-1.4.0/cli/koji.conf 2010-07-09 10:21:24.000000000 -0500 @@ -3,24 +3,24 @@ ;configuration for koji cli tool @@ -19,7 +19,7 @@ -;topdir = /mnt/koji +topdir = /mnt/koji - ;configuration for SSL athentication + ;configuration for SSL authentication ;client certificate -;cert = ~/.koji/client.crt @@ -27,7 +27,7 @@ ;certificate of the CA that issued the client certificate -;ca = ~/.koji/clientca.crt -+ca = ~/.fedora-upload-ca.cert ++ca = ~/.fedora-server-ca.cert ;certificate of the CA that issued the HTTP server certificate -;serverca = ~/.koji/serverca.crt diff --git a/koji.spec b/koji.spec index 70853c1..b854c4d 100644 --- a/koji.spec +++ b/koji.spec @@ -1,9 +1,10 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: koji -Version: 1.3.2 +Version: 1.4.0 Release: 1%{?dist} -License: LGPLv2 +License: LGPLv2 and GPLv2+ +# koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System URL: http://fedorahosted.org/koji @@ -46,6 +47,8 @@ Plugins to the koji XMLRPC interface %package builder Summary: Koji RPM builder daemon Group: Applications/System +License: LGPLv2 and GPLv2+ +#mergerepos (from createrepo) is GPLv2+ Requires: %{name} = %{version}-%{release} Requires: mock >= 0.9.14 Requires(post): /sbin/chkconfig @@ -60,10 +63,10 @@ Requires: rpm-build Requires: redhat-rpm-config Requires: pykickstart Requires: pycdio -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} > 5 Requires: createrepo >= 0.9.6 %endif -%if 0%{?rhel} +%if 0%{?rhel} == 5 Requires: python-createrepo >= 0.9.6 Requires: python-hashlib Requires: createrepo @@ -127,6 +130,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %dir %{_prefix}/lib/koji-hub-plugins %{_prefix}/lib/koji-hub-plugins/*.py* +%dir %{_sysconfdir}/koji-hub/plugins/ +%config(noreplace) %{_sysconfdir}/koji-hub/plugins/messagebus.conf %files utils %defattr(-,root,root) @@ -181,6 +186,27 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Jul 09 2010 Dennis Gilmore - 1.4.0-1 +- update to 1.4.0 +- Merge mead branch: support for building jars with Maven * +- support for building appliance images * +- soft dependencies for LiveCD/Appliance features +- smarter prioritization of repo regenerations +- package list policy to determine if package list changes are allowed +- channel policy to determine which channel a task is placed in +- edit host data via webui +- description and comment fields for hosts * +- cleaner log entries for kojihub +- track user data in versioned tables * +- allow setting retry parameters for the cli +- track start time for tasks * +- allow packages built from the same srpm to span multiple external repos +- make the command used to fetch sources configuable per repo +- kojira: remove unexpected directories +- let kojid to decide if it can handle a noarch task +- avoid extraneous ssl handshakes +- schema changes to support starred items + * Fri Nov 20 2009 Dennis Gilmore - 1.3.2-1 - update to 1.3.2 diff --git a/sources b/sources index a72961d..8dfdcc5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c776f838f126276269e4bba2c2cea097 koji-1.3.2.tar.bz2 +182584f02660cd574714f55fe49333a3 koji-1.4.0.tar.bz2 From d6c730b5fe7f46272c390fd56514fd461716f309 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 11 Jul 2010 02:04:30 +0000 Subject: [PATCH 024/202] - add missing Requires: python-cheetah from koji-builder --- koji.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index b854c4d..9f6c231 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.4.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -62,7 +62,8 @@ Requires: /usr/bin/git Requires: rpm-build Requires: redhat-rpm-config Requires: pykickstart -Requires: pycdio +Requires: pycdio +Requires: python-cheetah %if 0%{?fedora} || 0%{?rhel} > 5 Requires: createrepo >= 0.9.6 %endif @@ -186,6 +187,9 @@ if [ $1 = 0 ]; then fi %changelog +* Sat Jul 10 2010 Dennis Gilmore - 1.4.0-2 +- add missing Requires: python-cheetah from koji-builder + * Fri Jul 09 2010 Dennis Gilmore - 1.4.0-1 - update to 1.4.0 - Merge mead branch: support for building jars with Maven * From f1c343b7553ae6a8cc56d04ede81b5e2313d9334 Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Thu, 22 Jul 2010 02:03:32 +0000 Subject: [PATCH 025/202] - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 9f6c231..67de2fa 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.4.0 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -187,6 +187,9 @@ if [ $1 = 0 ]; then fi %changelog +* Wed Jul 21 2010 David Malcolm - 1.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + * Sat Jul 10 2010 Dennis Gilmore - 1.4.0-2 - add missing Requires: python-cheetah from koji-builder From 3d0ce81d77b176b1d04bbe356f610a8c6f5391ca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 20:17:00 +0000 Subject: [PATCH 026/202] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index e0ab139..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: koji -# $Id$ -NAME := koji -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 021dece5bef1ef7df254cc98d8ac09599c0f2949 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 3 Aug 2010 19:36:09 -0400 Subject: [PATCH 027/202] fix python 2.7 incompatibilities (rhbz 619276) --- koji.spec | 10 +++++++++- python27.patch | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 python27.patch diff --git a/koji.spec b/koji.spec index 67de2fa..9d14b6b 100644 --- a/koji.spec +++ b/koji.spec @@ -2,13 +2,17 @@ Name: koji Version: 1.4.0 -Release: 3%{?dist} +Release: 4%{?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 + +# Fix python 2.7 incompatibilities (rbhz#619276) +Patch1: python27.patch + Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -103,6 +107,7 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b .orig +%patch1 -p5 %build @@ -187,6 +192,9 @@ if [ $1 = 0 ]; then fi %changelog +* Tue Aug 3 2010 David Malcolm - 1.4.0-4 +- fix python 2.7 incompatibilities (rhbz 619276) + * Wed Jul 21 2010 David Malcolm - 1.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild diff --git a/python27.patch b/python27.patch new file mode 100644 index 0000000..022cb68 --- /dev/null +++ b/python27.patch @@ -0,0 +1,24 @@ +diff -urN /usr/lib/python2.7/site-packages/koji/ssl/SSLConnection.py /usr/lib/python2.7/site-packages/koji-bak/ssl/SSLConnection.py +--- /usr/lib/python2.7/site-packages/koji/ssl/SSLConnection.py 2010-07-09 04:04:26.000000000 +0200 ++++ /usr/lib/python2.7/site-packages/koji-bak/ssl/SSLConnection.py 2010-08-02 19:39:00.000000000 +0200 +@@ -63,7 +63,7 @@ + c, a = self.__dict__["conn"].accept() + return (SSLConnection(c), a) + +- def makefile(self, mode, bufsize): ++ def makefile(self, mode='r', bufsize=-1): + """ + We need to use socket._fileobject Because SSL.Connection + doesn't have a 'dup'. Not exactly sure WHY this is, but +diff -urN /usr/lib/python2.7/site-packages/koji/ssl/XMLRPCServerProxy.py /usr/lib/python2.7/site-packages/koji-bak/ssl/XMLRPCServerProxy.py +--- /usr/lib/python2.7/site-packages/koji/ssl/XMLRPCServerProxy.py 2010-07-09 04:04:26.000000000 +0200 ++++ /usr/lib/python2.7/site-packages/koji-bak/ssl/XMLRPCServerProxy.py 2010-08-02 19:35:04.000000000 +0200 +@@ -41,7 +41,7 @@ + # Yay for Python 2.2 + pass + _host, _port = urllib.splitport(host) +- self._https = SSLCommon.PlgHTTPS(_host, (_port and int(_port) or 443), ssl_context=self.ssl_ctx, timeout=self._timeout) ++ self._https = SSLCommon.PlgHTTPSConnection(_host, (_port and int(_port) or 443), ssl_context=self.ssl_ctx, timeout=self._timeout) + return self._https + + def close(self): From 87dcb5e5252efe9210bcfbf5792c1508e3f3ab14 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 1 Dec 2010 11:03:26 -0600 Subject: [PATCH 028/202] iupdate to koji-1.5.0 --- .gitignore | 1 + koji.spec | 11 +++++------ python27.patch | 24 ------------------------ sources | 2 +- 4 files changed, 7 insertions(+), 31 deletions(-) delete mode 100644 python27.patch diff --git a/.gitignore b/.gitignore index 8bb102c..d4e6943 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ koji-1.4.0.tar.bz2 +/koji-1.5.0.tar.bz2 diff --git a/koji.spec b/koji.spec index 9d14b6b..b79073e 100644 --- a/koji.spec +++ b/koji.spec @@ -1,8 +1,8 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: koji -Version: 1.4.0 -Release: 4%{?dist} +Version: 1.5.0 +Release: 1%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -10,9 +10,6 @@ Group: Applications/System URL: http://fedorahosted.org/koji Patch0: fedora-config.patch -# Fix python 2.7 incompatibilities (rbhz#619276) -Patch1: python27.patch - Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -107,7 +104,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b .orig -%patch1 -p5 %build @@ -192,6 +188,9 @@ if [ $1 = 0 ]; then fi %changelog +* Wed Dec 01 2010 Dennis Gilmore - 1.5.0-1 +- update to 1.5.0 + * Tue Aug 3 2010 David Malcolm - 1.4.0-4 - fix python 2.7 incompatibilities (rhbz 619276) diff --git a/python27.patch b/python27.patch deleted file mode 100644 index 022cb68..0000000 --- a/python27.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urN /usr/lib/python2.7/site-packages/koji/ssl/SSLConnection.py /usr/lib/python2.7/site-packages/koji-bak/ssl/SSLConnection.py ---- /usr/lib/python2.7/site-packages/koji/ssl/SSLConnection.py 2010-07-09 04:04:26.000000000 +0200 -+++ /usr/lib/python2.7/site-packages/koji-bak/ssl/SSLConnection.py 2010-08-02 19:39:00.000000000 +0200 -@@ -63,7 +63,7 @@ - c, a = self.__dict__["conn"].accept() - return (SSLConnection(c), a) - -- def makefile(self, mode, bufsize): -+ def makefile(self, mode='r', bufsize=-1): - """ - We need to use socket._fileobject Because SSL.Connection - doesn't have a 'dup'. Not exactly sure WHY this is, but -diff -urN /usr/lib/python2.7/site-packages/koji/ssl/XMLRPCServerProxy.py /usr/lib/python2.7/site-packages/koji-bak/ssl/XMLRPCServerProxy.py ---- /usr/lib/python2.7/site-packages/koji/ssl/XMLRPCServerProxy.py 2010-07-09 04:04:26.000000000 +0200 -+++ /usr/lib/python2.7/site-packages/koji-bak/ssl/XMLRPCServerProxy.py 2010-08-02 19:35:04.000000000 +0200 -@@ -41,7 +41,7 @@ - # Yay for Python 2.2 - pass - _host, _port = urllib.splitport(host) -- self._https = SSLCommon.PlgHTTPS(_host, (_port and int(_port) or 443), ssl_context=self.ssl_ctx, timeout=self._timeout) -+ self._https = SSLCommon.PlgHTTPSConnection(_host, (_port and int(_port) or 443), ssl_context=self.ssl_ctx, timeout=self._timeout) - return self._https - - def close(self): diff --git a/sources b/sources index 8dfdcc5..edbc3e1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -182584f02660cd574714f55fe49333a3 koji-1.4.0.tar.bz2 +d9610eb7e039a870108c86f49fd77191 koji-1.5.0.tar.bz2 From 96455104295f303dc858039b0bf414513acbd5b7 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 17 Dec 2010 20:25:38 -0600 Subject: [PATCH 029/202] update koji to 1.6.0 --- .gitignore | 1 + koji.spec | 45 ++++++++++++++++++++++++++++++++++++++++++--- sources | 2 +- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d4e6943..92a7f70 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ koji-1.4.0.tar.bz2 /koji-1.5.0.tar.bz2 +/koji-1.6.0.tar.bz2 diff --git a/koji.spec b/koji.spec index b79073e..1e335ba 100644 --- a/koji.spec +++ b/koji.spec @@ -1,7 +1,7 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: koji -Version: 1.5.0 +Version: 1.6.0 Release: 1%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ @@ -10,7 +10,7 @@ Group: Applications/System URL: http://fedorahosted.org/koji Patch0: fedora-config.patch -Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{version}.tar.bz2 +Source: https://fedorahosted.org/releases/k/o/koji/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: python-krbV >= 1.0.13 @@ -78,6 +78,24 @@ Requires: createrepo koji-builder is the daemon that runs on build machines and executes tasks that come through the Koji system. +%package vm +Summary: Koji virtual machine management daemon +Group: Applications/System +License: LGPLv2 +Requires: %{name} = %{version}-%{release} +Requires(post): /sbin/chkconfig +Requires(post): /sbin/service +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires: libvirt-python +Requires: libxml2-python +Requires: python-virtinst +Requires: qemu-img + +%description vm +koji-vm contains a supplemental build daemon that executes certain tasks in a +virtual machine. This package is not required for most installations. + %package utils Summary: Koji Utilities Group: Applications/Internet @@ -134,6 +152,7 @@ rm -rf $RPM_BUILD_ROOT %{_prefix}/lib/koji-hub-plugins/*.py* %dir %{_sysconfdir}/koji-hub/plugins/ %config(noreplace) %{_sysconfdir}/koji-hub/plugins/messagebus.conf +%config(noreplace) %{_sysconfdir}/koji-hub/plugins/rpm2maven.conf %files utils %defattr(-,root,root) @@ -159,7 +178,6 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/kojid %{_initrddir}/kojid %{_libexecdir}/kojid/ -%{_datadir}/koji-builder %config(noreplace) %{_sysconfdir}/sysconfig/kojid %dir %{_sysconfdir}/kojid %config(noreplace) %{_sysconfdir}/kojid/kojid.conf @@ -178,6 +196,24 @@ if [ $1 = 0 ]; then /sbin/chkconfig --del kojid fi +%files vm +%defattr(-,root,root) +%{_sbindir}/kojivmd +%{_datadir}/kojivmd +%{_initrddir}/kojivmd +%config(noreplace) %{_sysconfdir}/sysconfig/kojivmd +%dir %{_sysconfdir}/kojivmd +%config(noreplace) %{_sysconfdir}/kojivmd/kojivmd.conf + +%post vm +/sbin/chkconfig --add kojivmd + +%preun vm +if [ $1 = 0 ]; then + /sbin/service kojivmd stop &> /dev/null + /sbin/chkconfig --del kojivmd +fi + %post utils /sbin/chkconfig --add kojira /sbin/service kojira condrestart &> /dev/null || : @@ -188,6 +224,9 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Dec 17 2010 Dennis Gilmore - 1.6.0-1 +- update to 1.6.0 + * Wed Dec 01 2010 Dennis Gilmore - 1.5.0-1 - update to 1.5.0 diff --git a/sources b/sources index edbc3e1..149c60f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d9610eb7e039a870108c86f49fd77191 koji-1.5.0.tar.bz2 +069e8229aa2b44698bbbbdea8d24aff4 koji-1.6.0.tar.bz2 From 0859941b10b7adf7a99d8d75ef319c5f1d8502fc Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 20:58:35 -0600 Subject: [PATCH 030/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 1e335ba..b4222f8 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.6.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -224,6 +224,9 @@ if [ $1 = 0 ]; then fi %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 1.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Fri Dec 17 2010 Dennis Gilmore - 1.6.0-1 - update to 1.6.0 From f1dd19f3e8eb52054c1122edaa48cb178e31aa3a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 00:55:51 -0600 Subject: [PATCH 031/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index b4222f8..415ddd0 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.6.0 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -224,6 +224,9 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Jan 13 2012 Fedora Release Engineering - 1.6.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Mon Feb 07 2011 Fedora Release Engineering - 1.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From bd91f988fd9402eaceaffb91bbfa4084a6953478 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 1 Jun 2012 10:56:04 -0500 Subject: [PATCH 032/202] update to koji 1.7.0 --- .gitignore | 1 + fedora-config.patch | 12 ++++++------ koji.spec | 17 +++++++++++------ sources | 2 +- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 92a7f70..5e70751 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ koji-1.4.0.tar.bz2 /koji-1.5.0.tar.bz2 /koji-1.6.0.tar.bz2 +/koji-1.7.0.tar.bz2 diff --git a/fedora-config.patch b/fedora-config.patch index a5bf323..df36b26 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,6 +1,6 @@ ---- koji-1.4.0/cli/koji.conf.orig 2010-07-08 21:04:26.000000000 -0500 -+++ koji-1.4.0/cli/koji.conf 2010-07-09 10:21:24.000000000 -0500 -@@ -3,24 +3,24 @@ +--- koji-1.7.0/cli/koji.conf.orig 2012-05-31 14:05:43.000000000 -0500 ++++ koji-1.7.0/cli/koji.conf 2012-06-01 10:50:12.000000000 -0500 +@@ -3,13 +3,13 @@ ;configuration for koji cli tool ;url of XMLRPC server @@ -16,9 +16,8 @@ +pkgurl = http://koji.fedoraproject.org/packages ;path to the koji top directory --;topdir = /mnt/koji -+topdir = /mnt/koji - + ;topdir = /mnt/koji +@@ -22,10 +22,11 @@ ;configuration for SSL authentication ;client certificate @@ -32,3 +31,4 @@ ;certificate of the CA that issued the HTTP server certificate -;serverca = ~/.koji/serverca.crt +serverca = ~/.fedora-server-ca.cert ++ diff --git a/koji.spec b/koji.spec index 415ddd0..b6d41e9 100644 --- a/koji.spec +++ b/koji.spec @@ -1,8 +1,8 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: koji -Version: 1.6.0 -Release: 3%{?dist} +Version: 1.7.0 +Release: 1%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -10,7 +10,7 @@ Group: Applications/System URL: http://fedorahosted.org/koji Patch0: fedora-config.patch -Source: https://fedorahosted.org/releases/k/o/koji/%{name}-%{version}.tar.bz2 +Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: python-krbV >= 1.0.13 @@ -29,7 +29,7 @@ Group: Applications/Internet License: LGPLv2 and GPLv2 # rpmdiff lib (from rpmlint) is GPLv2 (only) Requires: httpd -Requires: mod_python +Requires: mod_wsgi Requires: postgresql-python Requires: %{name} = %{version}-%{release} @@ -109,7 +109,7 @@ Utilities for the Koji system Summary: Koji Web UI Group: Applications/Internet Requires: httpd -Requires: mod_python +Requires: mod_wsgi Requires: mod_auth_kerb Requires: postgresql-python Requires: python-cheetah @@ -171,7 +171,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_datadir}/koji-web %{_sysconfdir}/kojiweb -%config(noreplace) /etc/httpd/conf.d/kojiweb.conf +%config(noreplace) %{_sysconfdir}/httpd/conf.d/kojiweb.conf +%config(noreplace) %{_sysconfdir}/kojiweb/web.conf %files builder %defattr(-,root,root) @@ -224,6 +225,10 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Jun 01 2012 Dennis Gilmore - 1.7.0-1 +- update to 1.7.0 many bugfixes and improvements +- now uses mod_wsgi + * Fri Jan 13 2012 Fedora Release Engineering - 1.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index 149c60f..90e04d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -069e8229aa2b44698bbbbdea8d24aff4 koji-1.6.0.tar.bz2 +84be4c5d35ccaa11a3f00191db5fd2e8 koji-1.7.0.tar.bz2 From 5d6eaf50092a59699fcb42619886e362d31377fc Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 5 Jun 2012 15:31:06 -0500 Subject: [PATCH 033/202] use topurl not pkgurl in the fedora config --- fedora-config.patch | 2 +- koji.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fedora-config.patch b/fedora-config.patch index df36b26..ebb14b9 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -13,7 +13,7 @@ ;url of package download site -;pkgurl = http://www.example.com/packages -+pkgurl = http://koji.fedoraproject.org/packages ++topurl = http://kojipkgs.fedoraproject.org/ ;path to the koji top directory ;topdir = /mnt/koji diff --git a/koji.spec b/koji.spec index b6d41e9..a2035ec 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.7.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -225,6 +225,9 @@ if [ $1 = 0 ]; then fi %changelog +* Tue Jun 05 2012 Dennis Gilmore - 1.7.0-2 +- use topurl not pkgurl in the fedora config + * Fri Jun 01 2012 Dennis Gilmore - 1.7.0-1 - update to 1.7.0 many bugfixes and improvements - now uses mod_wsgi From 6fcd16c50794ab897b699b6bdd8a99fdfdd5bb8f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 13:20:32 -0500 Subject: [PATCH 034/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index a2035ec..31012e9 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.7.0 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -225,6 +225,9 @@ if [ $1 = 0 ]; then fi %changelog +* Thu Jul 19 2012 Fedora Release Engineering - 1.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Tue Jun 05 2012 Dennis Gilmore - 1.7.0-2 - use topurl not pkgurl in the fedora config From 9028b35a62c52caafdd32003a13ab984f1137165 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 31 Aug 2012 01:12:07 -0500 Subject: [PATCH 035/202] add patch to only make /dev/urandom if it doesnt exist - add upstream patch for taginfo fixes with older servers --- koji.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 31012e9..5cd546b 100644 --- a/koji.spec +++ b/koji.spec @@ -2,13 +2,15 @@ Name: koji Version: 1.7.0 -Release: 3%{?dist} +Release: 4%{?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: 0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch +Patch2: 0003-in-taginfo-command-avoid-passing-recently-added-even.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 +%patch2 -p1 %build @@ -225,6 +229,10 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Aug 31 2012 Dennis Gilmore - 1.7.0-4 +- add patch to only make /dev/urandom if it doesnt exist +- add upstream patch for taginfo fixes with older servers + * Thu Jul 19 2012 Fedora Release Engineering - 1.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 90075b79e8719ef9c5788c6568bcd2f422353ed7 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 31 Aug 2012 01:20:02 -0500 Subject: [PATCH 036/202] add the patches --- ...nd-avoid-passing-recently-added-even.patch | 63 +++++++++++++++++++ ...-dev-urandom-if-it-doesnt-already-ex.patch | 26 ++++++++ 2 files changed, 89 insertions(+) create mode 100644 0003-in-taginfo-command-avoid-passing-recently-added-even.patch create mode 100644 0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch diff --git a/0003-in-taginfo-command-avoid-passing-recently-added-even.patch b/0003-in-taginfo-command-avoid-passing-recently-added-even.patch new file mode 100644 index 0000000..3390fb0 --- /dev/null +++ b/0003-in-taginfo-command-avoid-passing-recently-added-even.patch @@ -0,0 +1,63 @@ +From 19de74773d1e946c73161ac0d819812613463e47 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Wed, 6 Jun 2012 18:47:53 -0400 +Subject: [PATCH 03/22] in taginfo command, avoid passing (recently added) + event opts unless needed (otherwise we get an error + from older servers on plain taginfo commands) + +--- + cli/koji | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/cli/koji b/cli/koji +index c292f0f..01ca322 100755 +--- a/cli/koji ++++ b/cli/koji +@@ -4104,13 +4104,15 @@ def anon_handle_taginfo(options, session, args): + parser.error(_("Please specify a tag")) + assert False + activate_session(session) +- event = koji.util.eventFromOpts(session, options) or {} ++ event = koji.util.eventFromOpts(session, options) ++ event_opts = {} + if event: + event['timestr'] = time.asctime(time.localtime(event['ts'])) + print "Querying at event %(id)i (%(timestr)s)" % event ++ event_opts['event'] = event['id'] + perms = dict([(p['id'], p['name']) for p in session.getAllPerms()]) + for tag in args: +- info = session.getTag(tag, event=event.get('id')) ++ info = session.getTag(tag, **event_opts) + if info is None: + print "No such tag: %s\n" % tag + continue +@@ -4124,8 +4126,8 @@ def anon_handle_taginfo(options, session, args): + if session.mavenEnabled(): + print "Maven support?: %s" % (info['maven_support'] and 'yes' or 'no') + print "Include all Maven archives?: %s" % (info['maven_include_all'] and 'yes' or 'no') +- dest_targets = session.getBuildTargets(destTagID=info['id'], event=event.get('id')) +- build_targets = session.getBuildTargets(buildTagID=info['id'], event=event.get('id')) ++ dest_targets = session.getBuildTargets(destTagID=info['id'], **event_opts) ++ build_targets = session.getBuildTargets(buildTagID=info['id'], **event_opts) + repos = {} + if not event: + for target in dest_targets + build_targets: +@@ -4149,13 +4151,13 @@ def anon_handle_taginfo(options, session, args): + print "Targets that build from this tag:" + for target in build_targets: + print " %s" % target['name'] +- external_repos = session.getTagExternalRepos(tag_info=info['id'], event=event.get('id')) ++ external_repos = session.getTagExternalRepos(tag_info=info['id'], **event_opts) + if external_repos: + print "External repos:" + for rinfo in external_repos: + print " %(priority)3i %(external_repo_name)s (%(url)s)" % rinfo + print "Inheritance:" +- for parent in session.getInheritanceData(tag, event=event.get('id')): ++ for parent in session.getInheritanceData(tag, **event_opts): + flags = '' + for code,expr in ( + ('M',parent['maxdepth'] is not None), +-- +1.7.11.4 + diff --git a/0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch b/0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch new file mode 100644 index 0000000..2323a52 --- /dev/null +++ b/0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch @@ -0,0 +1,26 @@ +From 79352bb36675888d765b2a1eef970ded459bcbc5 Mon Sep 17 00:00:00 2001 +From: Dennis Gilmore +Date: Fri, 31 Aug 2012 00:13:16 -0500 +Subject: [PATCH 22/22] only try to make /dev/urandom if it doesnt already + exist + +--- + builder/kojid | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builder/kojid b/builder/kojid +index 92d40f1..58720b4 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -1779,7 +1779,7 @@ class ImageTask(BaseTaskHandler): + "Could not create loopback device files: %s" % parseStatus(rv, '"%s"' % cmd) + + # Create /dev/urandom +- cmd = 'mknod /dev/urandom c 1 9' ++ cmd = '[ ! -e /dev/urandom ] && (mknod /dev/urandom c 1 9)' + rv = broot.mock(['--chroot', cmd]) + if rv: + broot.expire() +-- +1.7.11.4 + From 9e57c29d6ebd784b20b334f61b7ed0faad684a8f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 31 Aug 2012 19:21:10 -0500 Subject: [PATCH 037/202] add patch to mount all of /dev on appliances and lives --- 0001-mount-all-of-dev.patch | 51 +++++++++++++++++++ ...-dev-urandom-if-it-doesnt-already-ex.patch | 26 ---------- koji.spec | 9 ++-- 3 files changed, 57 insertions(+), 29 deletions(-) create mode 100644 0001-mount-all-of-dev.patch delete mode 100644 0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch diff --git a/0001-mount-all-of-dev.patch b/0001-mount-all-of-dev.patch new file mode 100644 index 0000000..cf64bbf --- /dev/null +++ b/0001-mount-all-of-dev.patch @@ -0,0 +1,51 @@ +From d7311cbd83546a168337df6d267d0f76b1e10fba Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Thu, 17 Feb 2011 15:13:30 -0500 +Subject: [PATCH] mount all of /dev + +--- + builder/kojid | 21 +-------------------- + 1 file changed, 1 insertion(+), 20 deletions(-) + +diff --git a/builder/kojid b/builder/kojid +index 92d40f1..a80ca9d 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -1753,9 +1753,7 @@ class ImageTask(BaseTaskHandler): + + # Here we configure mock to bind mount a set of /dev directories + bind_opts = {'dirs' : { +- '/dev/pts' : '/dev/pts', +- '/dev/shm' : '/dev/shm', +- '/dev/mapper' : '/dev/mapper', ++ '/dev' : '/dev', + '/selinux' : '/selinux'} + } + rootopts = {'install_group': inst_group, +@@ -1769,23 +1767,6 @@ class ImageTask(BaseTaskHandler): + # create the mock chroot + self.logger.debug("Initializing image buildroot") + broot.init() +- +- # Create the loopback devices we need +- cmd = 'for i in $(seq 0 7); do mknod /dev/loop$i b 7 $i; done' +- rv = broot.mock(['--chroot', cmd]) +- if rv: +- broot.expire() +- raise koji.LiveCDError, \ +- "Could not create loopback device files: %s" % parseStatus(rv, '"%s"' % cmd) +- +- # Create /dev/urandom +- cmd = 'mknod /dev/urandom c 1 9' +- rv = broot.mock(['--chroot', cmd]) +- if rv: +- broot.expire() +- raise koji.LiveCDError, \ +- "Could not create /dev/urandom: %s" % parseStatus(rv, '"%s"' % cmd) +- + self.logger.debug("Image buildroot ready: " + broot.rootdir()) + return broot + +-- +1.7.11.4 + diff --git a/0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch b/0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch deleted file mode 100644 index 2323a52..0000000 --- a/0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 79352bb36675888d765b2a1eef970ded459bcbc5 Mon Sep 17 00:00:00 2001 -From: Dennis Gilmore -Date: Fri, 31 Aug 2012 00:13:16 -0500 -Subject: [PATCH 22/22] only try to make /dev/urandom if it doesnt already - exist - ---- - builder/kojid | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/builder/kojid b/builder/kojid -index 92d40f1..58720b4 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -1779,7 +1779,7 @@ class ImageTask(BaseTaskHandler): - "Could not create loopback device files: %s" % parseStatus(rv, '"%s"' % cmd) - - # Create /dev/urandom -- cmd = 'mknod /dev/urandom c 1 9' -+ cmd = '[ ! -e /dev/urandom ] && (mknod /dev/urandom c 1 9)' - rv = broot.mock(['--chroot', cmd]) - if rv: - broot.expire() --- -1.7.11.4 - diff --git a/koji.spec b/koji.spec index 5cd546b..c896ae8 100644 --- a/koji.spec +++ b/koji.spec @@ -2,15 +2,15 @@ Name: koji Version: 1.7.0 -Release: 4%{?dist} +Release: 7%{?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: 0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch -Patch2: 0003-in-taginfo-command-avoid-passing-recently-added-even.patch +Patch1: 0003-in-taginfo-command-avoid-passing-recently-added-even.patch +Patch2: 0001-mount-all-of-dev.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -229,6 +229,9 @@ if [ $1 = 0 ]; then fi %changelog +* Sat Sep 01 2012 Dennis Gilmore - 1.7.0-7 +- add patch to mount all of /dev on appliances and lives + * Fri Aug 31 2012 Dennis Gilmore - 1.7.0-4 - add patch to only make /dev/urandom if it doesnt exist - add upstream patch for taginfo fixes with older servers From 02a1c68e951760a77bda79d4eaf9e955b66d6b55 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 20 Nov 2012 19:59:20 -0600 Subject: [PATCH 038/202] update to upstream 1.7.1 release --- .gitignore | 1 + 0001-mount-all-of-dev.patch | 51 --------------- ...nd-avoid-passing-recently-added-even.patch | 63 ------------------- koji.spec | 11 ++-- sources | 2 +- 5 files changed, 7 insertions(+), 121 deletions(-) delete mode 100644 0001-mount-all-of-dev.patch delete mode 100644 0003-in-taginfo-command-avoid-passing-recently-added-even.patch diff --git a/.gitignore b/.gitignore index 5e70751..983abb7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ koji-1.4.0.tar.bz2 /koji-1.5.0.tar.bz2 /koji-1.6.0.tar.bz2 /koji-1.7.0.tar.bz2 +/koji-1.7.1.tar.bz2 diff --git a/0001-mount-all-of-dev.patch b/0001-mount-all-of-dev.patch deleted file mode 100644 index cf64bbf..0000000 --- a/0001-mount-all-of-dev.patch +++ /dev/null @@ -1,51 +0,0 @@ -From d7311cbd83546a168337df6d267d0f76b1e10fba Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Thu, 17 Feb 2011 15:13:30 -0500 -Subject: [PATCH] mount all of /dev - ---- - builder/kojid | 21 +-------------------- - 1 file changed, 1 insertion(+), 20 deletions(-) - -diff --git a/builder/kojid b/builder/kojid -index 92d40f1..a80ca9d 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -1753,9 +1753,7 @@ class ImageTask(BaseTaskHandler): - - # Here we configure mock to bind mount a set of /dev directories - bind_opts = {'dirs' : { -- '/dev/pts' : '/dev/pts', -- '/dev/shm' : '/dev/shm', -- '/dev/mapper' : '/dev/mapper', -+ '/dev' : '/dev', - '/selinux' : '/selinux'} - } - rootopts = {'install_group': inst_group, -@@ -1769,23 +1767,6 @@ class ImageTask(BaseTaskHandler): - # create the mock chroot - self.logger.debug("Initializing image buildroot") - broot.init() -- -- # Create the loopback devices we need -- cmd = 'for i in $(seq 0 7); do mknod /dev/loop$i b 7 $i; done' -- rv = broot.mock(['--chroot', cmd]) -- if rv: -- broot.expire() -- raise koji.LiveCDError, \ -- "Could not create loopback device files: %s" % parseStatus(rv, '"%s"' % cmd) -- -- # Create /dev/urandom -- cmd = 'mknod /dev/urandom c 1 9' -- rv = broot.mock(['--chroot', cmd]) -- if rv: -- broot.expire() -- raise koji.LiveCDError, \ -- "Could not create /dev/urandom: %s" % parseStatus(rv, '"%s"' % cmd) -- - self.logger.debug("Image buildroot ready: " + broot.rootdir()) - return broot - --- -1.7.11.4 - diff --git a/0003-in-taginfo-command-avoid-passing-recently-added-even.patch b/0003-in-taginfo-command-avoid-passing-recently-added-even.patch deleted file mode 100644 index 3390fb0..0000000 --- a/0003-in-taginfo-command-avoid-passing-recently-added-even.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 19de74773d1e946c73161ac0d819812613463e47 Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: Wed, 6 Jun 2012 18:47:53 -0400 -Subject: [PATCH 03/22] in taginfo command, avoid passing (recently added) - event opts unless needed (otherwise we get an error - from older servers on plain taginfo commands) - ---- - cli/koji | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/cli/koji b/cli/koji -index c292f0f..01ca322 100755 ---- a/cli/koji -+++ b/cli/koji -@@ -4104,13 +4104,15 @@ def anon_handle_taginfo(options, session, args): - parser.error(_("Please specify a tag")) - assert False - activate_session(session) -- event = koji.util.eventFromOpts(session, options) or {} -+ event = koji.util.eventFromOpts(session, options) -+ event_opts = {} - if event: - event['timestr'] = time.asctime(time.localtime(event['ts'])) - print "Querying at event %(id)i (%(timestr)s)" % event -+ event_opts['event'] = event['id'] - perms = dict([(p['id'], p['name']) for p in session.getAllPerms()]) - for tag in args: -- info = session.getTag(tag, event=event.get('id')) -+ info = session.getTag(tag, **event_opts) - if info is None: - print "No such tag: %s\n" % tag - continue -@@ -4124,8 +4126,8 @@ def anon_handle_taginfo(options, session, args): - if session.mavenEnabled(): - print "Maven support?: %s" % (info['maven_support'] and 'yes' or 'no') - print "Include all Maven archives?: %s" % (info['maven_include_all'] and 'yes' or 'no') -- dest_targets = session.getBuildTargets(destTagID=info['id'], event=event.get('id')) -- build_targets = session.getBuildTargets(buildTagID=info['id'], event=event.get('id')) -+ dest_targets = session.getBuildTargets(destTagID=info['id'], **event_opts) -+ build_targets = session.getBuildTargets(buildTagID=info['id'], **event_opts) - repos = {} - if not event: - for target in dest_targets + build_targets: -@@ -4149,13 +4151,13 @@ def anon_handle_taginfo(options, session, args): - print "Targets that build from this tag:" - for target in build_targets: - print " %s" % target['name'] -- external_repos = session.getTagExternalRepos(tag_info=info['id'], event=event.get('id')) -+ external_repos = session.getTagExternalRepos(tag_info=info['id'], **event_opts) - if external_repos: - print "External repos:" - for rinfo in external_repos: - print " %(priority)3i %(external_repo_name)s (%(url)s)" % rinfo - print "Inheritance:" -- for parent in session.getInheritanceData(tag, event=event.get('id')): -+ for parent in session.getInheritanceData(tag, **event_opts): - flags = '' - for code,expr in ( - ('M',parent['maxdepth'] is not None), --- -1.7.11.4 - diff --git a/koji.spec b/koji.spec index c896ae8..2f667ff 100644 --- a/koji.spec +++ b/koji.spec @@ -1,16 +1,14 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: koji -Version: 1.7.0 -Release: 7%{?dist} +Version: 1.7.1 +Release: 1%{?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: 0003-in-taginfo-command-avoid-passing-recently-added-even.patch -Patch2: 0001-mount-all-of-dev.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -124,8 +122,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b .orig -%patch1 -p1 -%patch2 -p1 %build @@ -229,6 +225,9 @@ if [ $1 = 0 ]; then fi %changelog +* Wed Nov 21 2012 Dennis Gilmore - 1.7.1-1 +- update to upstream 1.7.1 release + * Sat Sep 01 2012 Dennis Gilmore - 1.7.0-7 - add patch to mount all of /dev on appliances and lives diff --git a/sources b/sources index 90e04d9..87d1173 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -84be4c5d35ccaa11a3f00191db5fd2e8 koji-1.7.0.tar.bz2 +d150f499260f5180f1340a0e11f2d64c koji-1.7.1.tar.bz2 From dc4262550abe82315c66f087200135a0dd33bc85 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 20 Jan 2013 10:17:15 -0600 Subject: [PATCH 039/202] 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 deletion(-) create mode 100644 koji-1.7.1-checkUpload.patch create mode 100644 koji-1.7.1-fix-external-repos.patch 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 +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 - 1.7.1-2 +- revert "avoid baseurl option in createrepo" patch +- fix integer overflow issue in checkUpload handler + * Wed Nov 21 2012 Dennis Gilmore - 1.7.1-1 - update to upstream 1.7.1 release From 43116ae75682f279fc54973973c947e5da36a139 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 13 Feb 2013 21:28:38 -0600 Subject: [PATCH 040/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 11b95e2..727a9a9 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.7.1 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -229,6 +229,9 @@ if [ $1 = 0 ]; then fi %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 1.7.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Sun Jan 20 2013 Dennis Gilmore - 1.7.1-2 - revert "avoid baseurl option in createrepo" patch - fix integer overflow issue in checkUpload handler From 613da53828e27f1a20341cefcd563094cc670782 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 1 Apr 2013 19:49:32 -0500 Subject: [PATCH 041/202] update to upstream 1.8.0 --- .gitignore | 1 + koji-1.7.1-checkUpload.patch | 30 -------------------- koji-1.7.1-fix-external-repos.patch | 44 ----------------------------- koji.spec | 11 ++++---- sources | 2 +- 5 files changed, 7 insertions(+), 81 deletions(-) delete mode 100644 koji-1.7.1-checkUpload.patch delete mode 100644 koji-1.7.1-fix-external-repos.patch diff --git a/.gitignore b/.gitignore index 983abb7..9efb547 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ koji-1.4.0.tar.bz2 /koji-1.6.0.tar.bz2 /koji-1.7.0.tar.bz2 /koji-1.7.1.tar.bz2 +/koji-1.8.0.tar.bz2 diff --git a/koji-1.7.1-checkUpload.patch b/koji-1.7.1-checkUpload.patch deleted file mode 100644 index 248f580..0000000 --- a/koji-1.7.1-checkUpload.patch +++ /dev/null @@ -1,30 +0,0 @@ -From eaa43f8cbd863daeee7709710bbfb00bde52bd7d Mon Sep 17 00:00:00 2001 -From: Mike McLean -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 deleted file mode 100644 index 3bc6300..0000000 --- a/koji-1.7.1-fix-external-repos.patch +++ /dev/null @@ -1,44 +0,0 @@ -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 727a9a9..09dd72c 100644 --- a/koji.spec +++ b/koji.spec @@ -1,16 +1,14 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: koji -Version: 1.7.1 -Release: 3%{?dist} +Version: 1.8.0 +Release: 1%{?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) @@ -124,8 +122,6 @@ 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 @@ -229,6 +225,9 @@ if [ $1 = 0 ]; then fi %changelog +* Mon Apr 01 2013 Dennis Gilmore - 1.8.0-1 +- update to upstream 1.8.0 + * Thu Feb 14 2013 Fedora Release Engineering - 1.7.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index 87d1173..89a8cbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d150f499260f5180f1340a0e11f2d64c koji-1.7.1.tar.bz2 +a7d193a864f15ca91c3b71d6156e69e4 koji-1.8.0.tar.bz2 From 563e926a35bcbf8dac994d57d9f82beffc5a7cf6 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 31 Jul 2013 09:03:12 -0500 Subject: [PATCH 042/202] update from git snapshot --- koji.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 09dd72c..b277deb 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.8.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -225,6 +225,9 @@ if [ $1 = 0 ]; then fi %changelog +* Wed Jul 31 2013 Dennis Gilmore - 1.8.0-2 +- update from git snapshot + * Mon Apr 01 2013 Dennis Gilmore - 1.8.0-1 - update to upstream 1.8.0 diff --git a/sources b/sources index 89a8cbb..7e4893c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a7d193a864f15ca91c3b71d6156e69e4 koji-1.8.0.tar.bz2 +caa234e5b42f9168c6e427d93363527c koji-1.8.0.tar.bz2 From bf3a87061cde7735bf4cf663111d560843d9e16a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 24 Mar 2014 16:47:29 -0500 Subject: [PATCH 043/202] update to upstream 1.9.0 --- .gitignore | 1 + koji.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9efb547..726f49a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ koji-1.4.0.tar.bz2 /koji-1.7.0.tar.bz2 /koji-1.7.1.tar.bz2 /koji-1.8.0.tar.bz2 +/koji-1.9.0.tar.bz2 diff --git a/koji.spec b/koji.spec index b277deb..1545011 100644 --- a/koji.spec +++ b/koji.spec @@ -1,8 +1,8 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: koji -Version: 1.8.0 -Release: 2%{?dist} +Version: 1.9.0 +Release: 1%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -89,7 +89,7 @@ Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires: libvirt-python Requires: libxml2-python -Requires: python-virtinst +Requires: /usr/bin/virt-clone Requires: qemu-img %description vm @@ -225,6 +225,9 @@ if [ $1 = 0 ]; then fi %changelog +* Mon Mar 24 2014 Dennis Gilmore - 1.9.0-1 +- update to upstream 1.9.0 + * Wed Jul 31 2013 Dennis Gilmore - 1.8.0-2 - update from git snapshot diff --git a/sources b/sources index 7e4893c..5c7d3c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -caa234e5b42f9168c6e427d93363527c koji-1.8.0.tar.bz2 +0ce900022f67324858551622f9f75c73 koji-1.9.0.tar.bz2 From 7abba8168d4360e52110f9bb3c8ef0c0f2558f88 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 22:12:08 -0500 Subject: [PATCH 044/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 1545011..1e4cfa4 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.9.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -225,6 +225,9 @@ if [ $1 = 0 ]; then fi %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 1.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Mon Mar 24 2014 Dennis Gilmore - 1.9.0-1 - update to upstream 1.9.0 From 4736a75e98602853c2fecd3430cd7120d18c0e15 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 12 Jun 2014 13:27:33 -0500 Subject: [PATCH 045/202] add patch to move builder workdir to /var/tmp - add support for making raw.xz images --- ...orkdir-from-tmp-koji-to-var-tmp-koji.patch | 28 +++++ ...mage-support-xz-compressed-raw-files.patch | 119 ++++++++++++++++++ koji.spec | 10 +- 3 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch create mode 100644 0002-image-support-xz-compressed-raw-files.patch diff --git a/0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch b/0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch new file mode 100644 index 0000000..e3b5ec8 --- /dev/null +++ b/0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch @@ -0,0 +1,28 @@ +From 28b685087b620946c81ea72c04a018a174b1362f Mon Sep 17 00:00:00 2001 +From: Dennis Gilmore +Date: Thu, 29 May 2014 21:39:44 -0500 +Subject: [PATCH 1/2] move workdir from /tmp/koji/ to /var/tmp/koji/ + +moving the workdir is needed as /tmp can be quite small with /tmp on tmpfs + +Signed-off-by: Dennis Gilmore +--- + builder/kojid | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builder/kojid b/builder/kojid +index f101e0f..14309bb 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -3657,7 +3657,7 @@ def get_options(): + 'log_level': None, + 'topdir': '/mnt/koji', + 'topurl': None, +- 'workdir': '/tmp/koji', ++ 'workdir': '/var/tmp/koji', + 'pluginpath': '/usr/lib/koji-builder-plugins', + 'mockdir': '/var/lib/mock', + 'mockuser': 'kojibuilder', +-- +2.0.0 + diff --git a/0002-image-support-xz-compressed-raw-files.patch b/0002-image-support-xz-compressed-raw-files.patch new file mode 100644 index 0000000..60a8f63 --- /dev/null +++ b/0002-image-support-xz-compressed-raw-files.patch @@ -0,0 +1,119 @@ +From ce89836df875f17ba94c9d47144e89fda22612ce Mon Sep 17 00:00:00 2001 +From: Dennis Gilmore +Date: Thu, 29 May 2014 23:05:07 -0500 +Subject: [PATCH 2/2] image: support xz compressed raw files + +as we publish the raw files on the mirrors we want to be able to request +xz compressed versions of theraw image. + +Signed-off-by: Dennis Gilmore +--- + builder/kojid | 25 ++++++++++++++++++++++++- + cli/koji | 4 ++-- + docs/schema-upgrade-1.9-next.sql | 9 +++++++++ + docs/schema.sql | 1 + + 4 files changed, 36 insertions(+), 3 deletions(-) + create mode 100644 docs/schema-upgrade-1.9-next.sql + +diff --git a/builder/kojid b/builder/kojid +index 14309bb..34c62d8 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2737,7 +2737,7 @@ class BaseImageTask(OzImageTask): + we have to do this. rhevm-ova requires rhevm, but if the user did not + request it, we should not pass it back up. + """ +- supported = ('raw', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') ++ supported = ('raw', 'raw-xz', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') + for f in formats: + if f not in supported: + raise koji.ApplianceError('Invalid format: %s' % f) +@@ -2863,6 +2863,27 @@ class BaseImageTask(OzImageTask): + base.base_image.parameters['libvirt_xml']) + images[format] = {'image': newimg, 'libvirt': lxml} + ++ # xz compress the raw disk image if asked for ++ for format in ('raw-xz',): ++ if format not in self.formats: ++ continue ++ newimg = os.path.join(self.workdir, imgname + 'raw.xz') ++ rawimg = os.path.join(self.workdir, imgname + 'raw') ++ cmd = ['/bin/cp', base.base_image.data, rawimg] ++ conlog = os.path.join(self.workdir, ++ 'xz-cp-%s-%s.log' % (format, arch)) ++ log_output(self.session, cmd[0], cmd, conlog, ++ self.getUploadDir(), logerror=1) ++ cmd = ['/usr/bin/xz', '-z', rawimg] ++ conlog = os.path.join(self.workdir, ++ 'xz-%s-%s.log' % (format, arch)) ++ log_output(self.session, cmd[0], cmd, conlog, ++ self.getUploadDir(), logerror=1) ++ lxml = self.fixImageXML(format, imgname, ++ 'libvirt-%s-%s.xml' % (format, arch), ++ base.base_image.parameters['libvirt_xml']) ++ images[format] = {'image': newimg, 'libvirt': lxml} ++ + return images + + def handler(self, name, version, release, arch, target_info, build_tag, repo_info, inst_tree, opts=None): +@@ -2954,6 +2975,8 @@ class BaseImageTask(OzImageTask): + newname = imgname + '.' + format.replace('-', '.') + elif format == 'docker': + newname = imgname + '.' + 'tar.gz' ++ elif format == 'raw-xz': ++ newname = imgname + '.' + 'raw.xz' + else: + newname = imgname + '.' + format + if format != 'docker': +diff --git a/cli/koji b/cli/koji +index 504b4ba..1ba273f 100755 +--- a/cli/koji ++++ b/cli/koji +@@ -4981,7 +4981,7 @@ def handle_spin_appliance(options, session, args): + help=_("Set the number of virtual cpus in the appliance, " + + "default is 1")) + parser.add_option("--format", metavar="DISK_FORMAT", default='raw', +- help=_("Disk format, default is raw. Other options are qcow, " + ++ help=_("Disk format, default is raw. Other options are raw-xz, qcow, " + + "qcow2, and vmx.")) + + (task_options, args) = parser.parse_args(args) +@@ -4998,7 +4998,7 @@ def handle_spin_appliance(options, session, args): + def handle_image_build(options, session, args): + """Create a disk image given an install tree""" + formats = ('vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', +- 'docker') ++ 'docker', 'raw-xz') + usage = _("usage: %prog image-build [options] " + + " [...]") + usage += _("\n %prog image-build --config FILE") +diff --git a/docs/schema-upgrade-1.9-next.sql b/docs/schema-upgrade-1.9-next.sql +new file mode 100644 +index 0000000..7d45e91 +--- /dev/null ++++ b/docs/schema-upgrade-1.9-next.sql +@@ -0,0 +1,9 @@ ++-- schema migration from version 1.9 to next ++-- note: this update will require additional steps, please see the migration doc ++ ++BEGIN; ++ ++-- new archive types ++insert into archivetypes (name, description, extensions) values ('raw-xz', 'xz compressed raw disk image', 'raw.xz'); ++ ++COMMIT; +diff --git a/docs/schema.sql b/docs/schema.sql +index 56418c9..91bcfd2 100644 +--- a/docs/schema.sql ++++ b/docs/schema.sql +@@ -713,6 +713,7 @@ insert into archivetypes (name, description, extensions) values ('pdb', 'Windows + insert into archivetypes (name, description, extensions) values ('oem', 'Windows driver oem file', 'oem'); + insert into archivetypes (name, description, extensions) values ('iso', 'CD/DVD Image', 'iso'); + insert into archivetypes (name, description, extensions) values ('raw', 'Raw disk image', 'raw'); ++insert into archivetypes (name, description, extensions) values ('raw-xz', 'xz compressed raw disk image', 'raw.xz'); + insert into archivetypes (name, description, extensions) values ('qcow', 'QCOW image', 'qcow'); + insert into archivetypes (name, description, extensions) values ('qcow2', 'QCOW2 image', 'qcow2'); + insert into archivetypes (name, description, extensions) values ('vmdk', 'vSphere image', 'vmdk'); +-- +2.0.0 + diff --git a/koji.spec b/koji.spec index 1e4cfa4..88b9d10 100644 --- a/koji.spec +++ b/koji.spec @@ -2,13 +2,15 @@ Name: koji Version: 1.9.0 -Release: 2%{?dist} +Release: 3%{?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: 0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch +Patch2: 0002-image-support-xz-compressed-raw-files.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 +%patch2 -p1 %build @@ -225,6 +229,10 @@ if [ $1 = 0 ]; then fi %changelog +* Thu Jun 12 2014 Dennis Gilmore - 1.9.0-3 +- add patch to move builder workdir to /var/tmp +- add support for making raw.xz images + * Sun Jun 08 2014 Fedora Release Engineering - 1.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From ebb5f90126603d10fbdc28c81420648aac86275a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 29 Jul 2014 09:40:10 -0500 Subject: [PATCH 046/202] add upstream patch to compress docker images --- compress-docker.patch | 24 ++++++++++++++++++++++++ koji.spec | 10 +++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 compress-docker.patch diff --git a/compress-docker.patch b/compress-docker.patch new file mode 100644 index 0000000..d57f715 --- /dev/null +++ b/compress-docker.patch @@ -0,0 +1,24 @@ +From 073bdb69e73e8943f3fb031f56b3d3ca66412edc Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Tue, 15 Apr 2014 14:45:40 -0400 +Subject: compress docker tarball properly + + +diff --git a/builder/kojid b/builder/kojid +index 1691a54..cee7637 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2824,7 +2824,8 @@ class BaseImageTask(OzImageTask): + + # target-image type images + if 'docker' in self.formats: +- targ = do_target_image(base.base_image.identifier, 'docker') ++ targ = do_target_image(base.base_image.identifier, 'docker', ++ ova_opts={'compress': 'gzip'}) + images['docker'] = {'image': targ.target_image.data} + + ova_opts = {} +-- +cgit v0.10.2 + + diff --git a/koji.spec b/koji.spec index 88b9d10..4ab5fee 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.9.0 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -11,6 +11,7 @@ URL: http://fedorahosted.org/koji Patch0: fedora-config.patch Patch1: 0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch Patch2: 0002-image-support-xz-compressed-raw-files.patch +Patch3: compress-docker.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -93,6 +94,9 @@ Requires: libvirt-python Requires: libxml2-python Requires: /usr/bin/virt-clone Requires: qemu-img +%if 0%{?rhel} <= 7 +ExcludeArch: ppc ppc64 +%endif %description vm koji-vm contains a supplemental build daemon that executes certain tasks in a @@ -126,6 +130,7 @@ koji-web is a web UI to the Koji system. %patch0 -p1 -b .orig %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -229,6 +234,9 @@ if [ $1 = 0 ]; then fi %changelog +* Tue Jul 29 2014 Dennis Gilmore - 1.9.0-4 +- add upstream patch to compress docker images + * Thu Jun 12 2014 Dennis Gilmore - 1.9.0-3 - add patch to move builder workdir to /var/tmp - add support for making raw.xz images From d57324c53355dece2704a35dce5af2bfcd9503dd Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 4 Aug 2014 02:53:25 -0500 Subject: [PATCH 047/202] add upstream patches for better docker support --- ...factor-image-build-handlers-in-kojid.patch | 694 ++++++++++++++++++ ...mage-support-xz-compressed-raw-files.patch | 119 --- 0002-refactor-do_images.patch | 439 +++++++++++ 0003-add-raw-xz-option.patch | 148 ++++ koji.spec | 14 +- 5 files changed, 1292 insertions(+), 122 deletions(-) create mode 100644 0001-refactor-image-build-handlers-in-kojid.patch delete mode 100644 0002-image-support-xz-compressed-raw-files.patch create mode 100644 0002-refactor-do_images.patch create mode 100644 0003-add-raw-xz-option.patch diff --git a/0001-refactor-image-build-handlers-in-kojid.patch b/0001-refactor-image-build-handlers-in-kojid.patch new file mode 100644 index 0000000..22d4f0e --- /dev/null +++ b/0001-refactor-image-build-handlers-in-kojid.patch @@ -0,0 +1,694 @@ +From 440ec22696a5f65f43c042570abb8b39dec5d7ae Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Mon, 2 Jun 2014 15:54:42 -0400 +Subject: [PATCH 1/3] refactor image-build handlers in kojid + +--- + builder/kojid | 477 ++++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 345 insertions(+), 132 deletions(-) + +diff --git a/builder/kojid b/builder/kojid +index aece387..2ea0105 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2711,7 +2711,7 @@ class OzImageTask(BaseTaskHandler): + def fetchKickstart(self): + """ + Retrieve the kickstart file we were given (locally or remotely) and +- upload it. ++ upload it to the hub. + + Note that if the KS file existed locally, then "ksfile" is a relative + path to it in the /mnt/koji/work directory. If not, then it is still +@@ -2720,7 +2720,8 @@ class OzImageTask(BaseTaskHandler): + url with --ksurl. + + @args: None, use self.opts for options +- @returns: absolute path to the retrieved kickstart file ++ @returns: ++ absolute path to the retrieved kickstart file + """ + ksfile = self.opts.get('kickstart') + self.logger.debug("ksfile = %s" % ksfile) +@@ -2751,14 +2752,8 @@ class OzImageTask(BaseTaskHandler): + @returns: None + """ + # XXX: If the ks file came from a local path and has %include +- # macros, *-creator will fail because the included +- # kickstarts were not copied into the chroot. For now we +- # require users to flatten their kickstart file if submitting +- # the task with a local path. +- # +- # Note that if an SCM URL was used instead, %include macros +- # may not be a problem if the included kickstarts are present +- # in the repository we checked out. ++ # macros, Oz will fail because it can only handle flat files. ++ # We require users to flatten their kickstart file. + if self.opts.get('ksversion'): + version = ksparser.makeVersion( + ksparser.stringToVersion(self.opts['ksversion'])) +@@ -2775,16 +2770,15 @@ class OzImageTask(BaseTaskHandler): + raise koji.BuildError("Failed to parse kickstart file " + "'%s' : %s" % (kspath, e)) + +- def prepareKickstart(self, repo_info, target_info, arch): ++ def prepareKickstart(self, repo_info, target_info): + """ + Process the ks file to be used for controlled image generation. This + method also uploads the modified kickstart file to the task output +- area. ++ area on the hub.. + + @args: + target_info: a sesion.getBuildTarget() object + repo_info: session.getRepo() object +- arch: canonical architecture name + @returns: + absolute path to a processed kickstart file + """ +@@ -2794,12 +2788,13 @@ class OzImageTask(BaseTaskHandler): + # repo associated with the target passed in initially. + self.ks.handler.repo.repoList = [] # delete whatever the ks file told us + repo_class = kscontrol.dataMap[self.ks.version]['RepoData'] ++ # TODO: sensibly use "url" and "repo" commands in kickstart + if self.opts.get('repo'): + # the user used --repo at least once + user_repos = self.opts.get('repo') + index = 0 + for user_repo in user_repos: +- repo_url = user_repo.replace('$arch', arch) ++ repo_url = user_repo.replace('$arch', self.arch) + self.ks.handler.repo.repoList.append(repo_class( + baseurl=repo_url, name='koji-override-%i' % index)) + index += 1 +@@ -2808,7 +2803,7 @@ class OzImageTask(BaseTaskHandler): + path_info = koji.PathInfo(topdir=self.options.topurl) + repopath = path_info.repo(repo_info['id'], + target_info['build_tag_name']) +- baseurl = '%s/%s' % (repopath, arch) ++ baseurl = '%s/%s' % (repopath, self.arch) + self.logger.debug('BASEURL: %s' % baseurl) + self.ks.handler.repo.repoList.append(repo_class( + baseurl=baseurl, name='koji-override-0')) +@@ -2831,7 +2826,14 @@ class OzImageTask(BaseTaskHandler): + def makeConfig(self): + """ + Generate a configuration dict for ImageFactory. This will override +- anything in the /etc config files. ++ anything in the /etc config files. We do this forcibly so that it is ++ impossible for Koji to use any image caches or leftover metadata from ++ other images created by the service. ++ ++ @args: none ++ @returns: ++ a dictionary used for configuring ImageFactory to built an image ++ the way we want + """ + return { + #Oz specific +@@ -2852,9 +2854,14 @@ class OzImageTask(BaseTaskHandler): + 'storage_path': os.path.join(self.workdir, 'output_image')}, + } + +- def makeTemplate(self, imgname, arch, inst_tree): ++ def makeTemplate(self, inst_tree): + """ +- Generate a simple template for ImageFactory ++ Generate a simple "TDL" for ImageFactory to build an image with. ++ ++ @args: ++ inst_tree - a string, a URL to the install tree (a compose) ++ @returns: ++ An XML string that imagefactory can consume + """ + # we have to split this up so the variable substitution works + distname, distver = self.parseDistro(self.opts.get('distro')) +@@ -2867,7 +2874,7 @@ class OzImageTask(BaseTaskHandler): + + %s + +- """ % (imgname, distname, distver, arch, inst_tree) ++ """ % (self.imgname, distname, distver, self.arch, inst_tree) + template += """ + rpm -qa --qf '%{NAME},%{VERSION},%{RELEASE},%{ARCH},%{EPOCH},%{SIZE},%{SIGMD5},%{BUILDTIME}\n' + +@@ -2878,13 +2885,54 @@ class OzImageTask(BaseTaskHandler): + %sG + + +-""" % (imgname, self.opts.get('disk_size')) ++""" % (self.imgname, self.opts.get('disk_size')) ++ return template ++ ++ def makeDockerUtilTemplate(self, inst_tree, pkg_group): ++ """ ++ Generate a "TDL" for ImageFactory to build a utility image to run ++ docker commands on a docker image. ++ ++ @args: ++ inst_tree - a string, a URL to the install tree (a compose) ++ @returns: ++ An XML string that imagefactory can consume ++ """ ++ distname, distver = self.parseDistro(self.opts.get('distro')) ++ template = """ ++""" % self.id + return template + + def parseDistro(self, distro): + """ + Figure out the distribution name and version we are going to build an + image on. ++ ++ args: ++ a string of the form: RHEL-X.Y, Fedora-NN, CentOS-X.Y, or SL-X.Y ++ returns: ++ a 2-element list, depends on the distro where the split happened + """ + if distro.startswith('RHEL'): + major, minor = distro.split('.') +@@ -2900,7 +2948,8 @@ class OzImageTask(BaseTaskHandler): + else: + raise BuildError('Unknown or supported distro given: %s' % distro) + +- def fixImageXML(self, format, imgname, filename, xmltext): ++ def fixImageXML(self, format, filename, xmltext): ++ + """ + The XML generated by Oz/ImageFactory knows nothing about the name + or image format conversions Koji does. We fix those values in the +@@ -2909,18 +2958,18 @@ class OzImageTask(BaseTaskHandler): + + @args: + format = raw, qcow2, vmdk, etc... a string representation +- name = the (file) name of the image ++ filename = the name of the XML file we will save this too + xmltext = the libvirt XML to start with + @return: + an absolute path to the modified XML + """ + newxml = xml.dom.minidom.parseString(xmltext) + ename = newxml.getElementsByTagName('name')[0] +- ename.firstChild.nodeValue = imgname ++ ename.firstChild.nodeValue = self.imgname + esources = newxml.getElementsByTagName('source') + for e in esources: + if e.hasAttribute('file'): +- e.setAttribute('file', '%s.%s' % (imgname, format)) ++ e.setAttribute('file', '%s.%s' % (self.imgname, format)) + edriver = newxml.getElementsByTagName('driver')[0] + edriver.setAttribute('type', format) + xml_path = os.path.join(self.workdir, filename) +@@ -2933,6 +2982,9 @@ class OzImageTask(BaseTaskHandler): + """ + Locate a screenshot taken by libvirt in the case of build failure, + if it exists. If it does, return the path, else return None. ++ ++ @args: none ++ @returns: a path to a screenshot take by libvirt + """ + shotdir = os.path.join(self.workdir, 'oz_screenshots') + screenshot = None +@@ -2947,7 +2999,7 @@ class OzImageTask(BaseTaskHandler): + class BaseImageTask(OzImageTask): + + Methods = ['createImage'] +- _taskWeight = 1.5 ++ _taskWeight = 2.0 + + def getRootDevice(self): + """ +@@ -2959,7 +3011,38 @@ class BaseImageTask(OzImageTask): + return part.disk + raise koji.ApplianceError, 'kickstart lacks a "/" mountpoint' + +- def format_deps(self, formats): ++ def _makeDockerCmds(self, tags): ++ """ ++ When building a docker image, we call docker commands on it from ++ within the "utility" image. ImageFactory accepts an XML string that ++ describes what commands to run, which is what this method returns. ++ ++ @args: None ++ tags- a list of tags to apply to the docker image ++ @returns: ++ an XML string with docker commands ++ """ ++ # TODO: set up the file name correctly ++ # TODO: set up the image id in docker correctly ++ cmds = """ ++""" % self.imgname ++ self.logger.debug('docker command template: %s' % cmds) ++ return cmds ++ ++ def _format_deps(self, formats): + """ + Return a dictionary where the keys are the image formats we need to + build/convert, and the values are booleans that indicate whether the +@@ -2988,136 +3071,266 @@ class BaseImageTask(OzImageTask): + self.logger.debug('Image delivery plan: %s' % f_dict) + return f_dict + +- def do_images(self, arch, template, ozlog, imgname): ++ def do_images(self, template, inst_tree): + """ + Call out to ImageFactory to build the image(s) we want. Returns a dict + of details for each image type we had to ask ImageFactory to build +- {format: dispatcher object} + """ +- def do_target_image(base_id, image_type, ova_opts={}): +- self.logger.debug('ova_opts: %s' % ova_opts) +- try: +- target = bd.builder_for_target_image(image_type, +- image_id=base_id, template=None, parameters=ova_opts) +- target.target_thread.join() +- except: +- tlog.removeHandler(fhandler) +- self.uploadFile(ozlog) +- self.logger.debug( +- 'Target image results: %s' % target.target_image.status) +- if target.target_image.status == 'FAILED': +- if not self.session.checkUpload('', os.path.basename(ozlog)): +- tlog.removeHandler(fhandler) +- self.uploadFile(ozlog) +- raise koji.ApplianceError('Image status is %s: %s' % ( +- target.target_image.status, +- target.target_image.status_detail)) +- return target +- +- fhandler = logging.FileHandler(ozlog) +- bd = BuildDispatcher() +- tlog = logging.getLogger() +- tlog.setLevel(logging.DEBUG) +- tlog.addHandler(fhandler) ++ fcalls = {'raw': self._buildBase, ++ 'vmdk': self._buildConvert, ++ 'vdi': self._buildConvert, ++ 'qcow': self._buildConvert, ++ 'qcow2': self._buildConvert, ++ 'rhevm-ova': self._buildOVA, ++ 'vsphere-ova': self._buildOVA, ++ 'docker': self._buildIndirect ++ } ++ # add a handler to the logger so that we capture ImageFactory's logging ++ self.fhandler = logging.FileHandler(self.ozlog) ++ self.bd = BuildDispatcher() ++ self.tlog = logging.getLogger() ++ self.tlog.setLevel(logging.DEBUG) ++ self.tlog.addHandler(self.fhandler) + images = {} ++ random.seed() # necessary to ensure a unique mac address ++ # if we need a utility image for the indirection plugin we create it ++ # we do not join() this until later ++ # Future: 'livecd' will be in here ++ if 'docker' in self.formats: ++ self.session.host.setTaskWeight(self.id, 3.0) ++ self.util_img = self._buildDockerUtility(inst_tree) + params = {'install_script': str(self.ks.handler), + 'offline_icicle': True} +- random.seed() # necessary to ensure a unique mac address +- try: +- base = bd.builder_for_base_image(template, parameters=params) +- base.base_thread.join() +- except: +- # upload log even if we failed to help diagnose an issue +- tlog.removeHandler(fhandler) +- self.uploadFile(ozlog) +- self.logger.debug('Base image results: %s' % base.base_image.status) +- if base.base_image.status == 'FAILED': ++ # build the base (raw) image ++ self.base_img = self._buildBase(template, params) ++ images['raw'] = {'image': self.base_img.base_image.data, ++ 'icicle': self.base_img.base_image.icicle} ++ # Do the rest of the image types (everything but raw) ++ for format in self.formats: ++ if format == 'raw': ++ continue ++ self.logger.info('dispatching %s image builder' % format) ++ images[format] = fcalls[format](format) ++ imginfo = self._processXML(images) ++ self.tlog.removeHandler(self.fhandler) ++ self.uploadFile(self.ozlog) ++ return imginfo ++ ++ def _processXML(self, images): ++ """ ++ Produce XML that libvirt can import to create a domain based on image(s) ++ we produced. We save the location of the XML file in the dictionary ++ it corresponds to here. ++ ++ @args: ++ images - a dict where the keys are image formats, and the values ++ are dicts with details about the image (location, icicle, etc) ++ @returns: ++ a dictionary just like "images" but with a new key called "libvirt" ++ that points to the path of the XML file for that image ++ """ ++ imginfo = {} ++ for fmt in images.keys(): ++ imginfo[fmt] = images[fmt] ++ lxml = self.fixImageXML(fmt, 'libvirt-%s-%s.xml' % (fmt, self.arch), ++ self.base_img.base_image.parameters['libvirt_xml']) ++ imginfo[fmt]['libvirt'] = lxml ++ return imginfo ++ ++ def _checkImageState(self, image): ++ """ ++ Query ImageFactory for details of a dispatched image build. If it is ++ FAILED we raise an exception. ++ ++ @args: ++ image - a build dispatcher object returned by a BuildDispatcher ++ @returns: nothing ++ """ ++ if image.target_image: ++ status = image.target_image.status ++ details = image.target_image.status_detail ++ else: ++ status = image.base_image.status ++ details = image.base_image.status_detail ++ self.logger.debug('check image results: %s' % status) ++ if status == 'FAILED': + scrnshot = self.getScreenshot() + if scrnshot: + ext = scrnshot[-3:] + self.uploadFile(scrnshot, remoteName='screenshot.%s' % ext) +- base.os_plugin.abort() # forcibly tear down the VM ++ image.os_plugin.abort() # forcibly tear down the VM + # TODO abort when a task is CANCELLED +- if not self.session.checkUpload('', os.path.basename(ozlog)): +- tlog.removeHandler(fhandler) +- self.uploadFile(ozlog) +- ++ if not self.session.checkUpload('', os.path.basename(self.ozlog)): ++ self.tlog.removeHandler(self.fhandler) ++ self.uploadFile(self.ozlog) + raise koji.ApplianceError('Image status is %s: %s' % +- (base.base_image.status, base.base_image.status_detail)) +- lxml = self.fixImageXML('raw', imgname, +- 'libvirt-%s-%s.xml' % ('raw', arch), +- base.base_image.parameters['libvirt_xml']) +- images['raw'] = {'image': base.base_image.data, 'libvirt': lxml, +- 'icicle': base.base_image.icicle} +- +- # target-image type images +- if 'docker' in self.formats: +- targ = do_target_image(base.base_image.identifier, 'docker', +- ova_opts={'compress': 'gzip'}) +- images['docker'] = {'image': targ.target_image.data} ++ (status, details)) ++ ++ def _buildDockerUtility(self, inst_tree): ++ """ ++ Build a utility image used for the indirection plugin later. Docker ++ and eventually liveCDs will use this. The utility image provides an ++ environment where we will run post-build commands on the base image ++ we generated. + +- ova_opts = {} ++ @args: ++ inst_tree - a string URL to an install tree (a compose) ++ @returns: ++ a dict with some details about the image ++ """ ++ #dtemp = self.makeDockerUtilTemplate(inst_tree, 'docker-build') ++ dtemp = self.makeDockerUtilTemplate('http://download.lab.bos.redhat.com/rel-eng/RHEL-7.0-20140507.0/compose/Server/x86_64/os', 'docker-build') ++ # TODO: enable this and store it properly ++ # pkgs = [x['packagelist'] for x in brew.getTagGroups('rhel-7.0-build') if x['name'] == 'livecd-build'][0] ++ # print '\n'.join([p['package'] for p in pkgs]) ++ dparams = {'generate_icicle': False} ++ utilname = 'koji-%s-util' % self.id ++ return self._buildBase(dtemp, dparams, wait=False) ++ ++ def _buildBase(self, template, params, wait=True): ++ """ ++ Build a base image using ImageFactory. This is a "raw" image. ++ ++ @args: ++ template - an XML string for the TDL ++ params - a dict that controls some ImageFactory settings ++ wait - call join() on the building thread if True ++ @returns: ++ a dict with some metadata about the image (includes an icicle) ++ """ ++ # TODO: test the failure case where IF itself throws an exception ++ # ungracefully (missing a plugin for example) ++ # may need to still upload ozlog and remove the log handler ++ self.logger.info('dispatching a baseimg builder') ++ self.logger.debug('templates: %s' % template) ++ self.logger.debug('params: %s' % params) ++ base = self.bd.builder_for_base_image(template, parameters=params) ++ if wait: ++ base.base_thread.join() ++ self._checkImageState(base) ++ return base ++ ++ def _buildOVA(self, format): ++ """ ++ Build an OVA target image. This is a format supported by RHEV and ++ vSphere ++ ++ @args: ++ format - a string representing the image format, "rhevm-ova" ++ @returns ++ a dict with some metadata about the image ++ """ ++ img_opts = {} + if self.opts.get('ova_option'): +- ova_opts = dict([o.split('=') for o in self.opts.get('ova_option')]) +- for format in ('rhevm-ova', 'vsphere-ova'): +- # assumes self.formats is pre-populated with rhevm/vsphere if the +- # "ova" format for them was requested with --format only +- if format not in self.formats: +- continue +- targ = do_target_image(base.base_image.identifier, +- format.replace('-ova', '')) +- # Target images do not have their own modified libvirt xml files. +- # They may not even be bootable with libvirt. +- lxml = self.fixImageXML(format, imgname, +- 'libvirt-%s-%s.xml' % (format, arch), +- base.base_image.parameters['libvirt_xml']) +- targ2 = do_target_image(targ.target_image.identifier, 'OVA', +- ova_opts=ova_opts) +- images[format] = {'libvirt': lxml, 'image': targ2.target_image.data} +- tlog.removeHandler(fhandler) +- self.uploadFile(ozlog) +- +- # qemu-img conversions +- for format in ('qcow', 'qcow2', 'vdi', 'vmdk'): +- if format not in self.formats: +- continue +- newimg = os.path.join(self.workdir, imgname + '.%s' % format) +- cmd = ['/usr/bin/qemu-img', 'convert', '-f', 'raw', '-O', +- format, base.base_image.data, newimg] +- if format in ('qcow', 'qcow2'): +- cmd.insert(2, '-c') # enable compression for qcow images +- conlog = os.path.join(self.workdir, +- 'qemu-img-%s-%s.log' % (format, arch)) +- log_output(self.session, cmd[0], cmd, conlog, +- self.getUploadDir(), logerror=1) +- lxml = self.fixImageXML(format, imgname, +- 'libvirt-%s-%s.xml' % (format, arch), +- base.base_image.parameters['libvirt_xml']) +- images[format] = {'image': newimg, 'libvirt': lxml} +- +- return images ++ img_opts = dict([o.split('=') for o in self.opts.get('ova_option')]) ++ targ = self._do_target_image(self.base_img.base_image.identifier, ++ format.replace('-ova', '')) ++ targ2 = self._do_target_image(targ.target_image.identifier, 'OVA', ++ img_opts=img_opts) ++ return {'image': targ2.target_image.data} ++ ++ def _do_target_image(self, base_id, image_type, img_opts={}): ++ """ ++ A generic method for building what ImageFactory calls "target images". ++ These are images based on a raw disk that was built before using the ++ _buildBase method. ++ ++ @args: ++ base_id - a string ID of the image to build off of ++ image_type - a string representing the target type. ImageFactory ++ uses this to figure out what plugin to run ++ img_opts - a dict of additional options that specific to the target ++ type we pass in via image_type ++ @returns: ++ A Builder() object from ImageFactory that contains information ++ about the image building include state and progress. ++ """ ++ # TODO: test the failure case where IF itself throws an exception ++ # ungracefully (missing a plugin for example) ++ # may need to still upload ozlog and remove the log handler ++ self.logger.debug('img_opts: %s' % img_opts) ++ target = self.bd.builder_for_target_image(image_type, ++ image_id=base_id, template=None, parameters=img_opts) ++ target.target_thread.join() ++ self._checkImageState(target) ++ return target ++ ++ def _buildConvert(self, format): ++ """ ++ Build an image by converting the format using qemu-img. This is method ++ enables a variety of formats like qcow, qcow2, vmdk, and vdi. ++ ++ @args: ++ format - a string representing the image format, "qcow2" ++ @returns ++ a dict with some metadata about the image ++ """ ++ ++ newimg = os.path.join(self.workdir, self.imgname + '.%s' % format) ++ cmd = ['/usr/bin/qemu-img', 'convert', '-f', 'raw', '-O', ++ format, self.base_img.base_image.data, newimg] ++ if format in ('qcow', 'qcow2'): ++ cmd.insert(2, '-c') # enable compression for qcow images ++ conlog = os.path.join(self.workdir, ++ 'qemu-img-%s-%s.log' % (format, self.arch)) ++ log_output(self.session, cmd[0], cmd, conlog, ++ self.getUploadDir(), logerror=1) ++ return {'image': newimg} ++ ++ def _buildIndirect(self, format): ++ """ ++ "Indirect" images are target images that use the indirection plugin. ++ This plugin makes use of an additional guest, and launches that to run ++ commands on the base image we built earlier. The image that backs the ++ modifying guest is called the "utility" image, which we built before. ++ ++ @args: ++ format - a string representing the image format, "qcow2" ++ @returns ++ a dict with some metadata about the image ++ """ ++ # Future: livecd will be introduced here too ++ # we should have waited for and checked the base image already ++ # TODO: log the shit out of this new stuff ++ # TODO: test the failure case where IF itself throws an exception ++ # ungracefully (missing a plugin for example) ++ # may need to still upload ozlog and remove the log handler ++ self.util_img.base_thread.join() ++ self._checkImageState(self.util_img) ++ params = { ++ 'compress': 'gzip', ++ 'utility_image': self.util_img.base_image.identifier, ++ 'utility_customizations': self._makeDockerCmds([self.imgname]) ++ } ++ targ = self.bd.builder_for_target_image('indirection', ++ image_id=self.base.base_image.identifier, ++ template=None, parameters=params) ++ targ.target_thread.join() ++ self._checkImageState(targ) ++ return {'image': targ.target_image.data} + + def handler(self, name, version, release, arch, target_info, build_tag, repo_info, inst_tree, opts=None): + + if opts == None: + opts = {} ++ self.arch = arch + self.opts = opts +- self.formats = self.format_deps(opts.get('format')) ++ self.formats = self._format_deps(opts.get('format')) + + # First, prepare the kickstart to use the repos we tell it + kspath = self.fetchKickstart() + self.readKickstart(kspath) +- kskoji = self.prepareKickstart(repo_info, target_info, arch) ++ kskoji = self.prepareKickstart(repo_info, target_info) + + # auto-generate a TDL file and config dict for ImageFactory +- imgname = '%s-%s-%s.%s' % (name, version, release, arch) +- template = self.makeTemplate(imgname, arch, inst_tree) ++ self.imgname = '%s-%s-%s.%s' % (name, version, release, self.arch) ++ template = self.makeTemplate(inst_tree) + self.logger.debug('oz template: %s' % template) + config = self.makeConfig() + self.logger.debug('IF config object: %s' % config) + ApplicationConfiguration(configuration=config) + +- tdl_path = os.path.join(self.workdir, 'tdl-%s.xml' % arch) ++ tdl_path = os.path.join(self.workdir, 'tdl-%s.xml' % self.arch) + tdl = open(tdl_path, 'w') + tdl.write(template) + tdl.close() +@@ -3129,16 +3342,16 @@ class BaseImageTask(OzImageTask): + # the likelihood of image tasks clashing here is very small) + rm = ReservationManager() + rm._listen_port = rm.MIN_PORT + self.id % (rm.MAX_PORT - rm.MIN_PORT) +- ozlogname = 'oz-%s.log' % arch +- ozlog = os.path.join(self.workdir, ozlogname) ++ ozlogname = 'oz-%s.log' % self.arch ++ self.ozlog = os.path.join(self.workdir, ozlogname) + + # invoke the image builds +- images = self.do_images(arch, template, ozlog, imgname) ++ images = self.do_images(template, inst_tree) + images['raw']['tdl'] = os.path.basename(tdl_path), + + # structure the results to pass back to the hub: + imgdata = { +- 'arch': arch, ++ 'arch': self.arch, + 'task_id': self.id, + 'logs': [ozlogname], + 'name': name, +@@ -3175,7 +3388,7 @@ class BaseImageTask(OzImageTask): + rpm['epoch'] = int(bits[4]) + imgdata['rpmlist'].append(rpm) + # TODO: hack to make this work for now, need to refactor +- br = BuildRoot(self.session, self.options, build_tag, arch, ++ br = BuildRoot(self.session, self.options, build_tag, self.arch, + self.id, repo_id=repo_info['id']) + br.markExternalRPMs(imgdata['rpmlist']) + +@@ -3183,11 +3396,11 @@ class BaseImageTask(OzImageTask): + for format in (f for f in self.formats.keys() if self.formats[f]): + newimg = images[format]['image'] + if 'ova' in format: +- newname = imgname + '.' + format.replace('-', '.') ++ newname = self.imgname + '.' + format.replace('-', '.') + elif format == 'docker': +- newname = imgname + '.' + 'tar.gz' ++ newname = self.imgname + '.' + 'tar.gz' + else: +- newname = imgname + '.' + format ++ newname = self.imgname + '.' + format + if format != 'docker': + lxml = images[format]['libvirt'] + imgdata['files'].append(os.path.basename(lxml)) +-- +2.0.4 + diff --git a/0002-image-support-xz-compressed-raw-files.patch b/0002-image-support-xz-compressed-raw-files.patch deleted file mode 100644 index 60a8f63..0000000 --- a/0002-image-support-xz-compressed-raw-files.patch +++ /dev/null @@ -1,119 +0,0 @@ -From ce89836df875f17ba94c9d47144e89fda22612ce Mon Sep 17 00:00:00 2001 -From: Dennis Gilmore -Date: Thu, 29 May 2014 23:05:07 -0500 -Subject: [PATCH 2/2] image: support xz compressed raw files - -as we publish the raw files on the mirrors we want to be able to request -xz compressed versions of theraw image. - -Signed-off-by: Dennis Gilmore ---- - builder/kojid | 25 ++++++++++++++++++++++++- - cli/koji | 4 ++-- - docs/schema-upgrade-1.9-next.sql | 9 +++++++++ - docs/schema.sql | 1 + - 4 files changed, 36 insertions(+), 3 deletions(-) - create mode 100644 docs/schema-upgrade-1.9-next.sql - -diff --git a/builder/kojid b/builder/kojid -index 14309bb..34c62d8 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2737,7 +2737,7 @@ class BaseImageTask(OzImageTask): - we have to do this. rhevm-ova requires rhevm, but if the user did not - request it, we should not pass it back up. - """ -- supported = ('raw', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') -+ supported = ('raw', 'raw-xz', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') - for f in formats: - if f not in supported: - raise koji.ApplianceError('Invalid format: %s' % f) -@@ -2863,6 +2863,27 @@ class BaseImageTask(OzImageTask): - base.base_image.parameters['libvirt_xml']) - images[format] = {'image': newimg, 'libvirt': lxml} - -+ # xz compress the raw disk image if asked for -+ for format in ('raw-xz',): -+ if format not in self.formats: -+ continue -+ newimg = os.path.join(self.workdir, imgname + 'raw.xz') -+ rawimg = os.path.join(self.workdir, imgname + 'raw') -+ cmd = ['/bin/cp', base.base_image.data, rawimg] -+ conlog = os.path.join(self.workdir, -+ 'xz-cp-%s-%s.log' % (format, arch)) -+ log_output(self.session, cmd[0], cmd, conlog, -+ self.getUploadDir(), logerror=1) -+ cmd = ['/usr/bin/xz', '-z', rawimg] -+ conlog = os.path.join(self.workdir, -+ 'xz-%s-%s.log' % (format, arch)) -+ log_output(self.session, cmd[0], cmd, conlog, -+ self.getUploadDir(), logerror=1) -+ lxml = self.fixImageXML(format, imgname, -+ 'libvirt-%s-%s.xml' % (format, arch), -+ base.base_image.parameters['libvirt_xml']) -+ images[format] = {'image': newimg, 'libvirt': lxml} -+ - return images - - def handler(self, name, version, release, arch, target_info, build_tag, repo_info, inst_tree, opts=None): -@@ -2954,6 +2975,8 @@ class BaseImageTask(OzImageTask): - newname = imgname + '.' + format.replace('-', '.') - elif format == 'docker': - newname = imgname + '.' + 'tar.gz' -+ elif format == 'raw-xz': -+ newname = imgname + '.' + 'raw.xz' - else: - newname = imgname + '.' + format - if format != 'docker': -diff --git a/cli/koji b/cli/koji -index 504b4ba..1ba273f 100755 ---- a/cli/koji -+++ b/cli/koji -@@ -4981,7 +4981,7 @@ def handle_spin_appliance(options, session, args): - help=_("Set the number of virtual cpus in the appliance, " + - "default is 1")) - parser.add_option("--format", metavar="DISK_FORMAT", default='raw', -- help=_("Disk format, default is raw. Other options are qcow, " + -+ help=_("Disk format, default is raw. Other options are raw-xz, qcow, " + - "qcow2, and vmx.")) - - (task_options, args) = parser.parse_args(args) -@@ -4998,7 +4998,7 @@ def handle_spin_appliance(options, session, args): - def handle_image_build(options, session, args): - """Create a disk image given an install tree""" - formats = ('vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', -- 'docker') -+ 'docker', 'raw-xz') - usage = _("usage: %prog image-build [options] " + - " [...]") - usage += _("\n %prog image-build --config FILE") -diff --git a/docs/schema-upgrade-1.9-next.sql b/docs/schema-upgrade-1.9-next.sql -new file mode 100644 -index 0000000..7d45e91 ---- /dev/null -+++ b/docs/schema-upgrade-1.9-next.sql -@@ -0,0 +1,9 @@ -+-- schema migration from version 1.9 to next -+-- note: this update will require additional steps, please see the migration doc -+ -+BEGIN; -+ -+-- new archive types -+insert into archivetypes (name, description, extensions) values ('raw-xz', 'xz compressed raw disk image', 'raw.xz'); -+ -+COMMIT; -diff --git a/docs/schema.sql b/docs/schema.sql -index 56418c9..91bcfd2 100644 ---- a/docs/schema.sql -+++ b/docs/schema.sql -@@ -713,6 +713,7 @@ insert into archivetypes (name, description, extensions) values ('pdb', 'Windows - insert into archivetypes (name, description, extensions) values ('oem', 'Windows driver oem file', 'oem'); - insert into archivetypes (name, description, extensions) values ('iso', 'CD/DVD Image', 'iso'); - insert into archivetypes (name, description, extensions) values ('raw', 'Raw disk image', 'raw'); -+insert into archivetypes (name, description, extensions) values ('raw-xz', 'xz compressed raw disk image', 'raw.xz'); - insert into archivetypes (name, description, extensions) values ('qcow', 'QCOW image', 'qcow'); - insert into archivetypes (name, description, extensions) values ('qcow2', 'QCOW2 image', 'qcow2'); - insert into archivetypes (name, description, extensions) values ('vmdk', 'vSphere image', 'vmdk'); --- -2.0.0 - diff --git a/0002-refactor-do_images.patch b/0002-refactor-do_images.patch new file mode 100644 index 0000000..2b6a73d --- /dev/null +++ b/0002-refactor-do_images.patch @@ -0,0 +1,439 @@ +From ef2e41a672fecf6168dca5a177d61c8e77427279 Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Fri, 25 Jul 2014 13:34:10 -0400 +Subject: [PATCH 2/3] refactor do_images + +--- + builder/kojid | 248 +++++++++++++++++----------------------------------------- + 1 file changed, 73 insertions(+), 175 deletions(-) + +diff --git a/builder/kojid b/builder/kojid +index 2ea0105..d3446b9 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2749,7 +2749,8 @@ class OzImageTask(BaseTaskHandler): + + @args: + kspath: path to a kickstart file +- @returns: None ++ @returns: ++ a kickstart object returned by pykickstart + """ + # XXX: If the ks file came from a local path and has %include + # macros, Oz will fail because it can only handle flat files. +@@ -2759,35 +2760,36 @@ class OzImageTask(BaseTaskHandler): + ksparser.stringToVersion(self.opts['ksversion'])) + else: + version = ksparser.makeVersion() +- self.ks = ksparser.KickstartParser(version) ++ ks = ksparser.KickstartParser(version) + self.logger.debug('attempting to read kickstart: %s' % kspath) + try: +- self.ks.readKickstart(kspath) ++ ks.readKickstart(kspath) + except IOError, e: + raise koji.BuildError("Failed to read kickstart file " + "'%s' : %s" % (kspath, e)) + except kserrors.KickstartError, e: + raise koji.BuildError("Failed to parse kickstart file " + "'%s' : %s" % (kspath, e)) ++ return ks + +- def prepareKickstart(self, repo_info, target_info): ++ def prepareKickstart(self, kspath): + """ + Process the ks file to be used for controlled image generation. This + method also uploads the modified kickstart file to the task output +- area on the hub.. ++ area on the hub. + + @args: +- target_info: a sesion.getBuildTarget() object +- repo_info: session.getRepo() object ++ kspath: a path to a kickstart file + @returns: +- absolute path to a processed kickstart file ++ a kickstart object with koji-specific modifications + """ ++ ks = self.readKickstart(kspath) + # Now we do some kickstart manipulation. If the user passed in a repo + # url with --repo, then we substitute that in for the repo(s) specified + # in the kickstart file. If --repo wasn't specified, then we use the + # repo associated with the target passed in initially. +- self.ks.handler.repo.repoList = [] # delete whatever the ks file told us +- repo_class = kscontrol.dataMap[self.ks.version]['RepoData'] ++ ks.handler.repo.repoList = [] # delete whatever the ks file told us ++ repo_class = kscontrol.dataMap[ks.version]['RepoData'] + # TODO: sensibly use "url" and "repo" commands in kickstart + if self.opts.get('repo'): + # the user used --repo at least once +@@ -2795,33 +2797,41 @@ class OzImageTask(BaseTaskHandler): + index = 0 + for user_repo in user_repos: + repo_url = user_repo.replace('$arch', self.arch) +- self.ks.handler.repo.repoList.append(repo_class( ++ ks.handler.repo.repoList.append(repo_class( + baseurl=repo_url, name='koji-override-%i' % index)) + index += 1 + else: + # --repo was not given, so we use the target's build repo + path_info = koji.PathInfo(topdir=self.options.topurl) +- repopath = path_info.repo(repo_info['id'], +- target_info['build_tag_name']) ++ repopath = path_info.repo(self.repo_info['id'], ++ self.target_info['build_tag_name']) + baseurl = '%s/%s' % (repopath, self.arch) + self.logger.debug('BASEURL: %s' % baseurl) +- self.ks.handler.repo.repoList.append(repo_class( ++ ks.handler.repo.repoList.append(repo_class( + baseurl=baseurl, name='koji-override-0')) ++ return ks + +- # Write out the new ks file. Note that things may not be in the same +- # order and comments in the original ks file may be lost. +- kskoji = os.path.join(self.workdir, 'koji-image-%s-%i.ks' % +- (target_info['build_tag_name'], self.id)) +- self.logger.debug('modified ks file: %s' % kskoji) +- outfile = open(kskoji, 'w') +- outfile.write(str(self.ks.handler)) ++ def writeKickstart(self, ksobj, ksname): ++ """ ++ Write out the new ks file. Note that things may not be in the same ++ order and comments in the original ks file may be lost. ++ ++ @args: ++ ksobj: a pykickstart object of what we want to write ++ ksname: file name for the kickstart ++ @returns: ++ an absolute path to the kickstart file we wrote ++ """ ++ kspath = os.path.join(self.workdir, ksname) ++ outfile = open(kspath, 'w') ++ outfile.write(str(ksobj.handler)) + outfile.close() + + # put the new ksfile in the output directory +- if not os.path.exists(kskoji): +- raise koji.BuildError, "KS file missing: %s" % kskoji +- self.uploadFile(kskoji) # upload the modified ks file +- return kskoji ++ if not os.path.exists(kspath): ++ raise koji.BuildError, "KS file missing: %s" % kspath ++ self.uploadFile(kspath) # upload the modified ks file ++ return kspath + + def makeConfig(self): + """ +@@ -2854,16 +2864,20 @@ class OzImageTask(BaseTaskHandler): + 'storage_path': os.path.join(self.workdir, 'output_image')}, + } + +- def makeTemplate(self, inst_tree): ++ def makeTemplate(self, name, inst_tree): + """ + Generate a simple "TDL" for ImageFactory to build an image with. + + @args: +- inst_tree - a string, a URL to the install tree (a compose) ++ name: a name for the image ++ inst_tree: a string, a URL to the install tree (a compose) + @returns: + An XML string that imagefactory can consume + """ + # we have to split this up so the variable substitution works ++ # XXX: using a packages section (which we don't) will have IF boot the ++ # image and attempt to ssh in. This breaks docker image creation. ++ # TODO: intelligently guess the distro based on the install tree URL + distname, distver = self.parseDistro(self.opts.get('distro')) + template = """ +-""" % (self.imgname, self.opts.get('disk_size')) +- return template +- +- def makeDockerUtilTemplate(self, inst_tree, pkg_group): +- """ +- Generate a "TDL" for ImageFactory to build a utility image to run +- docker commands on a docker image. +- +- @args: +- inst_tree - a string, a URL to the install tree (a compose) +- @returns: +- An XML string that imagefactory can consume +- """ +- distname, distver = self.parseDistro(self.opts.get('distro')) +- template = """ +-""" % self.id ++""" % (name, self.opts.get('disk_size')) + return template + + def parseDistro(self, distro): +@@ -3001,47 +2980,6 @@ class BaseImageTask(OzImageTask): + Methods = ['createImage'] + _taskWeight = 2.0 + +- def getRootDevice(self): +- """ +- Return the device name for the / partition, as specified in the +- kickstart file. Appliances should have this defined. +- """ +- for part in self.ks.handler.partition.partitions: +- if part.mountpoint == '/': +- return part.disk +- raise koji.ApplianceError, 'kickstart lacks a "/" mountpoint' +- +- def _makeDockerCmds(self, tags): +- """ +- When building a docker image, we call docker commands on it from +- within the "utility" image. ImageFactory accepts an XML string that +- describes what commands to run, which is what this method returns. +- +- @args: None +- tags- a list of tags to apply to the docker image +- @returns: +- an XML string with docker commands +- """ +- # TODO: set up the file name correctly +- # TODO: set up the image id in docker correctly +- cmds = """ +-""" % self.imgname +- self.logger.debug('docker command template: %s' % cmds) +- return cmds +- + def _format_deps(self, formats): + """ + Return a dictionary where the keys are the image formats we need to +@@ -3049,8 +2987,7 @@ class BaseImageTask(OzImageTask): + output should be included in the task results. + + Some image formats require others to be processed first, which is why +- we have to do this. rhevm-ova requires rhevm, but if the user did not +- request it, we should not pass it back up. ++ we have to do this. raw files in particular may not be kept. + """ + supported = ('raw', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') + for f in formats: +@@ -3071,7 +3008,7 @@ class BaseImageTask(OzImageTask): + self.logger.debug('Image delivery plan: %s' % f_dict) + return f_dict + +- def do_images(self, template, inst_tree): ++ def do_images(self, ks, template, inst_tree): + """ + Call out to ImageFactory to build the image(s) we want. Returns a dict + of details for each image type we had to ask ImageFactory to build +@@ -3083,7 +3020,7 @@ class BaseImageTask(OzImageTask): + 'qcow2': self._buildConvert, + 'rhevm-ova': self._buildOVA, + 'vsphere-ova': self._buildOVA, +- 'docker': self._buildIndirect ++ 'docker': self._buildDocker + } + # add a handler to the logger so that we capture ImageFactory's logging + self.fhandler = logging.FileHandler(self.ozlog) +@@ -3093,13 +3030,7 @@ class BaseImageTask(OzImageTask): + self.tlog.addHandler(self.fhandler) + images = {} + random.seed() # necessary to ensure a unique mac address +- # if we need a utility image for the indirection plugin we create it +- # we do not join() this until later +- # Future: 'livecd' will be in here +- if 'docker' in self.formats: +- self.session.host.setTaskWeight(self.id, 3.0) +- self.util_img = self._buildDockerUtility(inst_tree) +- params = {'install_script': str(self.ks.handler), ++ params = {'install_script': str(ks.handler), + 'offline_icicle': True} + # build the base (raw) image + self.base_img = self._buildBase(template, params) +@@ -3166,26 +3097,6 @@ class BaseImageTask(OzImageTask): + raise koji.ApplianceError('Image status is %s: %s' % + (status, details)) + +- def _buildDockerUtility(self, inst_tree): +- """ +- Build a utility image used for the indirection plugin later. Docker +- and eventually liveCDs will use this. The utility image provides an +- environment where we will run post-build commands on the base image +- we generated. +- +- @args: +- inst_tree - a string URL to an install tree (a compose) +- @returns: +- a dict with some details about the image +- """ +- #dtemp = self.makeDockerUtilTemplate(inst_tree, 'docker-build') +- dtemp = self.makeDockerUtilTemplate('http://download.lab.bos.redhat.com/rel-eng/RHEL-7.0-20140507.0/compose/Server/x86_64/os', 'docker-build') +- # TODO: enable this and store it properly +- # pkgs = [x['packagelist'] for x in brew.getTagGroups('rhel-7.0-build') if x['name'] == 'livecd-build'][0] +- # print '\n'.join([p['package'] for p in pkgs]) +- dparams = {'generate_icicle': False} +- utilname = 'koji-%s-util' % self.id +- return self._buildBase(dtemp, dparams, wait=False) + + def _buildBase(self, template, params, wait=True): + """ +@@ -3217,7 +3128,7 @@ class BaseImageTask(OzImageTask): + + @args: + format - a string representing the image format, "rhevm-ova" +- @returns ++ @returns: + a dict with some metadata about the image + """ + img_opts = {} +@@ -3229,6 +3140,21 @@ class BaseImageTask(OzImageTask): + img_opts=img_opts) + return {'image': targ2.target_image.data} + ++ def _buildDocker(self, format): ++ """ ++ Build a base docker image. This image will be tagged with the NVR.A ++ automatically because we name it that way in the ImageFactory TDL. ++ ++ @args: ++ format - the string "docker" ++ @returns: ++ a dict with some metadata about the image ++ """ ++ img_opts = {'compress': 'gzip'} ++ targ = self._do_target_image(self.base_img.base_image.identifier, ++ 'docker', img_opts=img_opts) ++ return {'image': targ.target_image.data} ++ + def _do_target_image(self, base_id, image_type, img_opts={}): + """ + A generic method for building what ImageFactory calls "target images". +@@ -3277,54 +3203,26 @@ class BaseImageTask(OzImageTask): + self.getUploadDir(), logerror=1) + return {'image': newimg} + +- def _buildIndirect(self, format): +- """ +- "Indirect" images are target images that use the indirection plugin. +- This plugin makes use of an additional guest, and launches that to run +- commands on the base image we built earlier. The image that backs the +- modifying guest is called the "utility" image, which we built before. +- +- @args: +- format - a string representing the image format, "qcow2" +- @returns +- a dict with some metadata about the image +- """ +- # Future: livecd will be introduced here too +- # we should have waited for and checked the base image already +- # TODO: log the shit out of this new stuff +- # TODO: test the failure case where IF itself throws an exception +- # ungracefully (missing a plugin for example) +- # may need to still upload ozlog and remove the log handler +- self.util_img.base_thread.join() +- self._checkImageState(self.util_img) +- params = { +- 'compress': 'gzip', +- 'utility_image': self.util_img.base_image.identifier, +- 'utility_customizations': self._makeDockerCmds([self.imgname]) +- } +- targ = self.bd.builder_for_target_image('indirection', +- image_id=self.base.base_image.identifier, +- template=None, parameters=params) +- targ.target_thread.join() +- self._checkImageState(targ) +- return {'image': targ.target_image.data} +- + def handler(self, name, version, release, arch, target_info, build_tag, repo_info, inst_tree, opts=None): + + if opts == None: + opts = {} + self.arch = arch ++ self.target_info = target_info ++ self.repo_info = repo_info + self.opts = opts + self.formats = self._format_deps(opts.get('format')) + + # First, prepare the kickstart to use the repos we tell it + kspath = self.fetchKickstart() +- self.readKickstart(kspath) +- kskoji = self.prepareKickstart(repo_info, target_info) ++ ks = self.prepareKickstart(kspath) ++ kskoji = self.writeKickstart(ks, ++ os.path.join(self.workdir, 'koji-%s-%i-base.ks' % ++ (self.target_info['build_tag_name'], self.id))) + + # auto-generate a TDL file and config dict for ImageFactory + self.imgname = '%s-%s-%s.%s' % (name, version, release, self.arch) +- template = self.makeTemplate(inst_tree) ++ template = self.makeTemplate(self.imgname, inst_tree) + self.logger.debug('oz template: %s' % template) + config = self.makeConfig() + self.logger.debug('IF config object: %s' % config) +@@ -3346,7 +3244,7 @@ class BaseImageTask(OzImageTask): + self.ozlog = os.path.join(self.workdir, ozlogname) + + # invoke the image builds +- images = self.do_images(template, inst_tree) ++ images = self.do_images(ks, template, inst_tree) + images['raw']['tdl'] = os.path.basename(tdl_path), + + # structure the results to pass back to the hub: +@@ -3389,7 +3287,7 @@ class BaseImageTask(OzImageTask): + imgdata['rpmlist'].append(rpm) + # TODO: hack to make this work for now, need to refactor + br = BuildRoot(self.session, self.options, build_tag, self.arch, +- self.id, repo_id=repo_info['id']) ++ self.id, repo_id=self.repo_info['id']) + br.markExternalRPMs(imgdata['rpmlist']) + + # upload the results +-- +2.0.4 + diff --git a/0003-add-raw-xz-option.patch b/0003-add-raw-xz-option.patch new file mode 100644 index 0000000..62443fc --- /dev/null +++ b/0003-add-raw-xz-option.patch @@ -0,0 +1,148 @@ +From c1b42e0c67b1050c00c922f882cc192dbc571edc Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Tue, 29 Jul 2014 21:33:49 -0400 +Subject: [PATCH 3/3] add raw-xz option + +--- + builder/kojid | 50 +++++++++++++++++++++++++++++++++++++++++++------- + cli/koji | 2 +- + 2 files changed, 44 insertions(+), 8 deletions(-) + +diff --git a/builder/kojid b/builder/kojid +index d3446b9..b23e9ce 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2096,6 +2096,18 @@ class BuildBaseImageTask(BuildImageTask): + spec_url, subtask, target_info, bld_info, + repo_info['id']) + ++ # make sure we only import the user-submitted kickstart file one ++ # time, otherwise we will have collisions. Remove it from exactly ++ # 1 results hash from the subtasks ++ if opts.has_key('kickstart'): ++ saw_ks = False ++ for arch in results.keys(): ++ ks = os.path.basename(opts.get('kickstart')) ++ if ks in results[arch]['files']: ++ if saw_ks: ++ results[arch]['files'].remove(ks) ++ saw_ks = True ++ + self.logger.debug('Image Results for hub: %s' % results) + if opts.get('scratch'): + self.session.host.moveImageBuildToScratch(self.id, results) +@@ -2728,7 +2740,7 @@ class OzImageTask(BaseTaskHandler): + if self.opts.get('ksurl'): + scm = SCM(self.opts['ksurl']) + scm.assert_allowed(self.options.allowed_scms) +- logfile = os.path.join(self.workdir, 'checkout.log') ++ logfile = os.path.join(self.workdir, 'checkout-%s.log' % self.arch) + scmsrcdir = scm.checkout(self.workdir, self.session, + self.getUploadDir(), logfile) + kspath = os.path.join(scmsrcdir, os.path.basename(ksfile)) +@@ -2989,7 +3001,7 @@ class BaseImageTask(OzImageTask): + Some image formats require others to be processed first, which is why + we have to do this. raw files in particular may not be kept. + """ +- supported = ('raw', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') ++ supported = ('raw', 'raw-xz', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') + for f in formats: + if f not in supported: + raise koji.ApplianceError('Invalid format: %s' % f) +@@ -3014,6 +3026,7 @@ class BaseImageTask(OzImageTask): + of details for each image type we had to ask ImageFactory to build + """ + fcalls = {'raw': self._buildBase, ++ 'raw-xz': self._buildXZ, + 'vmdk': self._buildConvert, + 'vdi': self._buildConvert, + 'qcow': self._buildConvert, +@@ -3079,10 +3092,10 @@ class BaseImageTask(OzImageTask): + """ + if image.target_image: + status = image.target_image.status +- details = image.target_image.status_detail ++ details = image.target_image.status_detail['error'] + else: + status = image.base_image.status +- details = image.base_image.status_detail ++ details = image.base_image.status_detail['error'] + self.logger.debug('check image results: %s' % status) + if status == 'FAILED': + scrnshot = self.getScreenshot() +@@ -3094,10 +3107,11 @@ class BaseImageTask(OzImageTask): + if not self.session.checkUpload('', os.path.basename(self.ozlog)): + self.tlog.removeHandler(self.fhandler) + self.uploadFile(self.ozlog) ++ if 'No disk activity' in details: ++ details = 'Automated install failed or prompted for input. See the screenshot in the task results for more information.' + raise koji.ApplianceError('Image status is %s: %s' % + (status, details)) + +- + def _buildBase(self, template, params, wait=True): + """ + Build a base image using ImageFactory. This is a "raw" image. +@@ -3121,6 +3135,29 @@ class BaseImageTask(OzImageTask): + self._checkImageState(base) + return base + ++ def _buildXZ(self, format): ++ """ ++ Use xz to compress a raw disk image. This is very straightforward. ++ ++ @args: ++ format - a string representing the image format, "raw-xz" ++ @returns: ++ a dict with some metadata about the image ++ """ ++ newimg = os.path.join(self.workdir, self.imgname + '.raw.xz') ++ rawimg = os.path.join(self.workdir, self.imgname + '.raw') ++ cmd = ['/bin/cp', self.base_img.base_image.data, rawimg] ++ conlog = os.path.join(self.workdir, ++ 'xz-cp-%s-%s.log' % (format, self.arch)) ++ log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), ++ logerror=1) ++ cmd = ['/usr/bin/xz', '-z', rawimg] ++ conlog = os.path.join(self.workdir, ++ 'xz-%s-%s.log' % (format, self.arch)) ++ log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), ++ logerror=1) ++ return {'image': newimg} ++ + def _buildOVA(self, format): + """ + Build an OVA target image. This is a format supported by RHEV and +@@ -3191,7 +3228,6 @@ class BaseImageTask(OzImageTask): + @returns + a dict with some metadata about the image + """ +- + newimg = os.path.join(self.workdir, self.imgname + '.%s' % format) + cmd = ['/usr/bin/qemu-img', 'convert', '-f', 'raw', '-O', + format, self.base_img.base_image.data, newimg] +@@ -3293,7 +3329,7 @@ class BaseImageTask(OzImageTask): + # upload the results + for format in (f for f in self.formats.keys() if self.formats[f]): + newimg = images[format]['image'] +- if 'ova' in format: ++ if 'ova' in format or format == 'raw-xz': + newname = self.imgname + '.' + format.replace('-', '.') + elif format == 'docker': + newname = self.imgname + '.' + 'tar.gz' +diff --git a/cli/koji b/cli/koji +index 8722f01..9451963 100755 +--- a/cli/koji ++++ b/cli/koji +@@ -5130,7 +5130,7 @@ def handle_spin_appliance(options, session, args): + def handle_image_build(options, session, args): + """Create a disk image given an install tree""" + formats = ('vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', +- 'docker') ++ 'docker', 'raw-xz') + usage = _("usage: %prog image-build [options] " + + " [...]") + usage += _("\n %prog image-build --config FILE") +-- +2.0.4 + diff --git a/koji.spec b/koji.spec index 4ab5fee..f3ebd45 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.9.0 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -10,8 +10,11 @@ Group: Applications/System URL: http://fedorahosted.org/koji Patch0: fedora-config.patch Patch1: 0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch -Patch2: 0002-image-support-xz-compressed-raw-files.patch -Patch3: compress-docker.patch +Patch2: compress-docker.patch +Patch3: 0001-refactor-image-build-handlers-in-kojid.patch +Patch4: 0002-refactor-do_images.patch +Patch5: 0003-add-raw-xz-option.patch + Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -131,6 +134,8 @@ koji-web is a web UI to the Koji system. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 %build @@ -234,6 +239,9 @@ if [ $1 = 0 ]; then fi %changelog +* Mon Aug 04 2014 Dennis Gilmore - 1.9.0-5 +- add upstream patches for better docker support + * Tue Jul 29 2014 Dennis Gilmore - 1.9.0-4 - add upstream patch to compress docker images From 99dd5deeb560fbf42bc8f64c49f813e8d4303327 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 4 Aug 2014 03:35:44 -0500 Subject: [PATCH 048/202] add some extra patches we need --- 0001-fix-distro-behavior-for-rhel-5.patch | 28 ++++++++++ 0002-compress-docker-tarball-properly.patch | 26 +++++++++ ...-upload-the-tdl-priority-to-building.patch | 54 +++++++++++++++++++ ...before-the-try-in-case-of-an-earlier.patch | 33 ++++++++++++ 0005-put-ova-options-in-its-own-section.patch | 39 ++++++++++++++ 0006-use-offline-icicle-generation.patch | 26 +++++++++ 0007-include-multilib-packages-in-repos.patch | 44 +++++++++++++++ 0008-bump-install-timeout-to-2-hours.patch | 25 +++++++++ koji.spec | 22 ++++++-- 9 files changed, 293 insertions(+), 4 deletions(-) create mode 100644 0001-fix-distro-behavior-for-rhel-5.patch create mode 100644 0002-compress-docker-tarball-properly.patch create mode 100644 0003-upload-the-tdl-priority-to-building.patch create mode 100644 0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch create mode 100644 0005-put-ova-options-in-its-own-section.patch create mode 100644 0006-use-offline-icicle-generation.patch create mode 100644 0007-include-multilib-packages-in-repos.patch create mode 100644 0008-bump-install-timeout-to-2-hours.patch diff --git a/0001-fix-distro-behavior-for-rhel-5.patch b/0001-fix-distro-behavior-for-rhel-5.patch new file mode 100644 index 0000000..2eb869f --- /dev/null +++ b/0001-fix-distro-behavior-for-rhel-5.patch @@ -0,0 +1,28 @@ +From 2e587154eb101ae4b2015a3b47bbb18e53d393dd Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Tue, 15 Apr 2014 14:31:10 -0400 +Subject: [PATCH 1/8] fix distro behavior for rhel 5 + +--- + builder/kojid | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/builder/kojid b/builder/kojid +index 4163f49..1691a54 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2654,7 +2654,10 @@ class OzImageTask(BaseTaskHandler): + image on. + """ + if distro.startswith('RHEL'): +- return distro.split('.') ++ major, minor = distro.split('.') ++ if major == 'RHEL-5': ++ minor = 'U' + minor ++ return major, minor + elif distro.startswith('Fedora'): + return distro.split('-') + elif distro.startswith('CentOS'): +-- +2.0.4 + diff --git a/0002-compress-docker-tarball-properly.patch b/0002-compress-docker-tarball-properly.patch new file mode 100644 index 0000000..2ce299e --- /dev/null +++ b/0002-compress-docker-tarball-properly.patch @@ -0,0 +1,26 @@ +From 073bdb69e73e8943f3fb031f56b3d3ca66412edc Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Tue, 15 Apr 2014 14:45:40 -0400 +Subject: [PATCH 2/8] compress docker tarball properly + +--- + builder/kojid | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/builder/kojid b/builder/kojid +index 1691a54..cee7637 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2824,7 +2824,8 @@ class BaseImageTask(OzImageTask): + + # target-image type images + if 'docker' in self.formats: +- targ = do_target_image(base.base_image.identifier, 'docker') ++ targ = do_target_image(base.base_image.identifier, 'docker', ++ ova_opts={'compress': 'gzip'}) + images['docker'] = {'image': targ.target_image.data} + + ova_opts = {} +-- +2.0.4 + diff --git a/0003-upload-the-tdl-priority-to-building.patch b/0003-upload-the-tdl-priority-to-building.patch new file mode 100644 index 0000000..70e2dd2 --- /dev/null +++ b/0003-upload-the-tdl-priority-to-building.patch @@ -0,0 +1,54 @@ +From b566eba6f83b151fcc058906a0630f4d9e303490 Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Wed, 16 Apr 2014 11:18:53 -0400 +Subject: [PATCH 3/8] upload the tdl priority to building + +--- + builder/kojid | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/builder/kojid b/builder/kojid +index cee7637..32400c6 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2813,13 +2813,7 @@ class BaseImageTask(OzImageTask): + lxml = self.fixImageXML('raw', imgname, + 'libvirt-%s-%s.xml' % ('raw', arch), + base.base_image.parameters['libvirt_xml']) +- tdl_path = os.path.join(self.workdir, 'tdl-%s.xml' % arch) +- tdl = open(tdl_path, 'w') +- tdl.write(base.base_image.template) +- tdl.close() +- self.uploadFile(tdl_path) + images['raw'] = {'image': base.base_image.data, 'libvirt': lxml, +- 'tdl': os.path.basename(tdl_path), + 'icicle': base.base_image.icicle} + + # target-image type images +@@ -2889,6 +2883,12 @@ class BaseImageTask(OzImageTask): + self.logger.debug('IF config object: %s' % config) + ApplicationConfiguration(configuration=config) + ++ tdl_path = os.path.join(self.workdir, 'tdl-%s.xml' % arch) ++ tdl = open(tdl_path, 'w') ++ tdl.write(template) ++ tdl.close() ++ self.uploadFile(tdl_path) ++ + # ImageFactory picks a port to the guest VM using a rolling integer. + # This is a problem for concurrency, so we override the port it picks + # here using the task ID. (not a perfect solution but good enough: +@@ -2900,9 +2900,9 @@ class BaseImageTask(OzImageTask): + + # invoke the image builds + images = self.do_images(arch, template, ozlog, imgname) ++ images['raw']['tdl'] = os.path.basename(tdl_path), + + # structure the results to pass back to the hub: +- tdl_path = images['raw']['tdl'] + imgdata = { + 'arch': arch, + 'task_id': self.id, +-- +2.0.4 + diff --git a/0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch b/0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch new file mode 100644 index 0000000..b3a279c --- /dev/null +++ b/0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch @@ -0,0 +1,33 @@ +From 7a1d6c4cd42f6efe8a3833a77a4475b6cfe9da43 Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Wed, 16 Apr 2014 12:00:33 -0400 +Subject: [PATCH 4/8] define bld_info before the try in case of an earlier + exception + +--- + builder/kojid | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builder/kojid b/builder/kojid +index 32400c6..fa5daca 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -1824,6 +1824,7 @@ class BuildBaseImageTask(BuildImageTask): + raise koji.ApplianceError, 'ImageFactory functions not available' + + # build image(s) ++ bld_info = None + try: + release = opts.get('release') + if not release: +@@ -1832,7 +1833,6 @@ class BuildBaseImageTask(BuildImageTask): + raise koji.ApplianceError('The Version may not have a hyphen') + if '-' in release: + raise koji.ApplianceError('The Release may not have a hyphen') +- bld_info = None + if not opts.get('scratch'): + bld_info = self.initImageBuild(name, version, release, + target_info, opts) +-- +2.0.4 + diff --git a/0005-put-ova-options-in-its-own-section.patch b/0005-put-ova-options-in-its-own-section.patch new file mode 100644 index 0000000..64f9e78 --- /dev/null +++ b/0005-put-ova-options-in-its-own-section.patch @@ -0,0 +1,39 @@ +From 20bb3e15265499d129cb85b6cd41a8724e037082 Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Wed, 16 Apr 2014 14:00:17 -0400 +Subject: [PATCH 5/8] put ova options in its own section + +--- + cli/koji | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/cli/koji b/cli/koji +index 088c505..504b4ba 100755 +--- a/cli/koji ++++ b/cli/koji +@@ -5074,14 +5074,17 @@ def handle_image_build(options, session, args): + if config.has_option(section, arg): + setattr(task_options, arg, config.get(section, arg).split(',')) + config.remove_option(section, arg) +- # ova_option is newline separated, handle that +- if config.has_option(section, 'ova_option'): +- task_options.ova_option = \ +- config.get(section, 'ova_option').splitlines() +- config.remove_option(section, 'ova_option') + # handle everything else + for k, v in config.items(section): + setattr(task_options, k, v) ++ ++ # ova-options belong in their own section ++ section = 'ova-options' ++ if config.has_section(section): ++ task_options.ova_option = [] ++ for k, v in config.items(section): ++ task_options.ova_option.append('%s=%s' % (k, v)) ++ + else: + if len(args) < 5: + parser.error(_("At least five arguments are required: a name, " + +-- +2.0.4 + diff --git a/0006-use-offline-icicle-generation.patch b/0006-use-offline-icicle-generation.patch new file mode 100644 index 0000000..10377e4 --- /dev/null +++ b/0006-use-offline-icicle-generation.patch @@ -0,0 +1,26 @@ +From 61c1737652544150fe962921b9dfd3708e1d256e Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Thu, 17 Apr 2014 18:59:41 -0400 +Subject: [PATCH 6/8] use offline icicle generation + +--- + builder/kojid | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/builder/kojid b/builder/kojid +index fa5daca..4712cc5 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2787,7 +2787,8 @@ class BaseImageTask(OzImageTask): + tlog.setLevel(logging.DEBUG) + tlog.addHandler(fhandler) + images = {} +- params = {'install_script': str(self.ks.handler)} #ks contents ++ params = {'install_script': str(self.ks.handler), ++ 'offline_icicle': True} + random.seed() # necessary to ensure a unique mac address + try: + base = bd.builder_for_base_image(template, parameters=params) +-- +2.0.4 + diff --git a/0007-include-multilib-packages-in-repos.patch b/0007-include-multilib-packages-in-repos.patch new file mode 100644 index 0000000..0603ff7 --- /dev/null +++ b/0007-include-multilib-packages-in-repos.patch @@ -0,0 +1,44 @@ +From 794abb71b1cd5662354475e2beafbab0f287b409 Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Thu, 17 Apr 2014 19:00:08 -0400 +Subject: [PATCH 7/8] include multilib packages in repos + +--- + builder/mergerepos | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/builder/mergerepos b/builder/mergerepos +index b873ccd..fecbc4b 100755 +--- a/builder/mergerepos ++++ b/builder/mergerepos +@@ -48,6 +48,12 @@ EXPAND_ARCHES = { + 'sh4': ['sh4a'] + } + ++MULTILIB_ARCHES = { ++ 'x86_64': 'i386', ++ 'ppc64': 'ppc', ++ 's390x': 's390' ++ } ++ + def parse_args(args): + """Parse our opts/args""" + usage = """ +@@ -78,6 +84,14 @@ def parse_args(args): + if EXPAND_ARCHES.has_key(arch): + opts.arches.extend(EXPAND_ARCHES[arch]) + ++ # support multilib repos ++ for arch in opts.arches[:]: ++ multilib_arch = MULTILIB_ARCHES.get(arch) ++ if multilib_arch: ++ opts.arches.append(multilib_arch) ++ if multilib_arch in EXPAND_ARCHES: ++ opts.arches.extend(EXPAND_ARCHES[multilib_arch]) ++ + # always include noarch + if not 'noarch' in opts.arches: + opts.arches.append('noarch') +-- +2.0.4 + diff --git a/0008-bump-install-timeout-to-2-hours.patch b/0008-bump-install-timeout-to-2-hours.patch new file mode 100644 index 0000000..c4387cd --- /dev/null +++ b/0008-bump-install-timeout-to-2-hours.patch @@ -0,0 +1,25 @@ +From 1fbbf825ab7962e68d0059ab86b0955312997035 Mon Sep 17 00:00:00 2001 +From: Jay Greguske +Date: Thu, 8 May 2014 11:34:51 -0400 +Subject: [PATCH 8/8] bump install timeout to 2 hours + +--- + builder/kojid | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builder/kojid b/builder/kojid +index 4712cc5..90ff2bd 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2608,7 +2608,7 @@ class OzImageTask(BaseTaskHandler): + 'imgdir': os.path.join(self.workdir, 'scratch_images'), + 'tmpdir': os.path.join(self.workdir, 'oz-tmp'), + 'verbose' : True, +- 'timeout': 3600, ++ 'timeout': 7200, + 'output': 'log', + 'raw': False, + 'debug': True, +-- +2.0.4 + diff --git a/koji.spec b/koji.spec index f3ebd45..881768c 100644 --- a/koji.spec +++ b/koji.spec @@ -10,10 +10,17 @@ Group: Applications/System URL: http://fedorahosted.org/koji Patch0: fedora-config.patch Patch1: 0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch -Patch2: compress-docker.patch -Patch3: 0001-refactor-image-build-handlers-in-kojid.patch -Patch4: 0002-refactor-do_images.patch -Patch5: 0003-add-raw-xz-option.patch +Patch2: 0001-fix-distro-behavior-for-rhel-5.patch +Patch3: 0002-compress-docker-tarball-properly.patch +Patch4: 0003-upload-the-tdl-priority-to-building.patch +Patch5: 0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch +Patch6: 0005-put-ova-options-in-its-own-section.patch +Patch7: 0006-use-offline-icicle-generation.patch +Patch8: 0007-include-multilib-packages-in-repos.patch +Patch9: 0008-bump-install-timeout-to-2-hours.patch +Patch10: 0001-refactor-image-build-handlers-in-kojid.patch +Patch11: 0002-refactor-do_images.patch +Patch12: 0003-add-raw-xz-option.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 @@ -136,6 +143,13 @@ koji-web is a web UI to the Koji system. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 %build From a05409280801a3c8d07def25bde2f856c2c0c5d2 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 4 Aug 2014 07:07:33 -0500 Subject: [PATCH 049/202] add patch to fix kickstart parsing --- ...rectly-call-pykickstarts-makeVersion.patch | 41 +++++++++++++++++++ koji.spec | 8 +++- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 0001-correctly-call-pykickstarts-makeVersion.patch diff --git a/0001-correctly-call-pykickstarts-makeVersion.patch b/0001-correctly-call-pykickstarts-makeVersion.patch new file mode 100644 index 0000000..9da02a5 --- /dev/null +++ b/0001-correctly-call-pykickstarts-makeVersion.patch @@ -0,0 +1,41 @@ +From 049ab0dd94544bb0770defa54b1322812e6d3082 Mon Sep 17 00:00:00 2001 +From: Dennis Gilmore +Date: Mon, 4 Aug 2014 05:02:08 -0500 +Subject: [PATCH] correctly call pykickstarts makeVersion + +--- + builder/kojid | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/builder/kojid b/builder/kojid +index b23e9ce..2451ea6 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2387,9 +2387,9 @@ class ImageTask(BaseTaskHandler): + # may not be a problem if the included kickstarts are present + # in the repository we checked out. + if opts.get('ksversion'): +- version = ksparser.makeVersion(ksparser.stringToVersion(opts['ksversion'])) ++ version = ksparser.version.makeVersion(ksparser.stringToVersion(opts['ksversion'])) + else: +- version = ksparser.makeVersion() ++ version = ksparser.version.makeVersion() + self.ks = ksparser.KickstartParser(version) + try: + self.ks.readKickstart(kspath) +@@ -2768,10 +2768,10 @@ class OzImageTask(BaseTaskHandler): + # macros, Oz will fail because it can only handle flat files. + # We require users to flatten their kickstart file. + if self.opts.get('ksversion'): +- version = ksparser.makeVersion( ++ version = ksparser.version.makeVersion( + ksparser.stringToVersion(self.opts['ksversion'])) + else: +- version = ksparser.makeVersion() ++ version = ksparser.version.makeVersion() + ks = ksparser.KickstartParser(version) + self.logger.debug('attempting to read kickstart: %s' % kspath) + try: +-- +2.0.4 + diff --git a/koji.spec b/koji.spec index 881768c..f4ef49f 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.9.0 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -21,7 +21,7 @@ Patch9: 0008-bump-install-timeout-to-2-hours.patch Patch10: 0001-refactor-image-build-handlers-in-kojid.patch Patch11: 0002-refactor-do_images.patch Patch12: 0003-add-raw-xz-option.patch - +Patch13: 0001-correctly-call-pykickstarts-makeVersion.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -150,6 +150,7 @@ koji-web is a web UI to the Koji system. %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build @@ -253,6 +254,9 @@ if [ $1 = 0 ]; then fi %changelog +* Mon Aug 04 2014 Dennis Gilmore - 1.9.0-6 +- add patch to fix kickstart parsing + * Mon Aug 04 2014 Dennis Gilmore - 1.9.0-5 - add upstream patches for better docker support From 56be6ed856ba0ac0bf5a8ab294f1211a5fe7bcff Mon Sep 17 00:00:00 2001 From: Till Maas Date: Fri, 26 Sep 2014 19:46:33 +0200 Subject: [PATCH 050/202] Use https for kojipkgs --- fedora-config.patch | 2 +- koji.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fedora-config.patch b/fedora-config.patch index ebb14b9..538aed9 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -13,7 +13,7 @@ ;url of package download site -;pkgurl = http://www.example.com/packages -+topurl = http://kojipkgs.fedoraproject.org/ ++topurl = https://kojipkgs.fedoraproject.org/ ;path to the koji top directory ;topdir = /mnt/koji diff --git a/koji.spec b/koji.spec index f4ef49f..5ec61c5 100644 --- a/koji.spec +++ b/koji.spec @@ -2,12 +2,12 @@ Name: koji Version: 1.9.0 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System -URL: http://fedorahosted.org/koji +URL: https://fedorahosted.org/koji Patch0: fedora-config.patch Patch1: 0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch Patch2: 0001-fix-distro-behavior-for-rhel-5.patch @@ -254,6 +254,10 @@ if [ $1 = 0 ]; then fi %changelog +* Fri Sep 26 2014 Till Maas - 1.9.0-7 +- Use https for kojipkgs +- Update URL + * Mon Aug 04 2014 Dennis Gilmore - 1.9.0-6 - add patch to fix kickstart parsing From e9c0b57315d42bc3794a20793d76585d0e6cc7e1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 30 Sep 2014 15:29:13 -0500 Subject: [PATCH 051/202] don't exclude koji-vm from ppc and ppc64 --- koji.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/koji.spec b/koji.spec index 5ec61c5..b7f851a 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.9.0 -Release: 7%{?dist} +Release: 8%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -104,9 +104,6 @@ Requires: libvirt-python Requires: libxml2-python Requires: /usr/bin/virt-clone Requires: qemu-img -%if 0%{?rhel} <= 7 -ExcludeArch: ppc ppc64 -%endif %description vm koji-vm contains a supplemental build daemon that executes certain tasks in a @@ -254,6 +251,9 @@ if [ $1 = 0 ]; then fi %changelog +* Tue Sep 30 2014 Dennis Gilmore - 1.9.0-8 +- don't exclude koji-vm from ppc and ppc64 + * Fri Sep 26 2014 Till Maas - 1.9.0-7 - Use https for kojipkgs - Update URL From 8511f624245b7278bcde2e6649e25db26d69bab7 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 11 Dec 2014 09:09:38 -0600 Subject: [PATCH 052/202] add upstream patch switching to TLS1 from sslv3 --- ...-bugzilla.redhat.com-show_bug.cgi-id.patch | 35 +++++++++++++++++++ koji.spec | 7 +++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch diff --git a/0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch b/0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch new file mode 100644 index 0000000..6f2959e --- /dev/null +++ b/0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch @@ -0,0 +1,35 @@ +From 07d1eb810930fa1de7c89bad817ccca68b9ec7bc Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Wed, 15 Oct 2014 10:54:31 -0400 +Subject: [PATCH] use TLSv1. + https://bugzilla.redhat.com/show_bug.cgi?id=1152823 + +--- + koji/ssl/SSLCommon.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/koji/ssl/SSLCommon.py b/koji/ssl/SSLCommon.py +index 1a3b3d6..014fbf6 100644 +--- a/koji/ssl/SSLCommon.py ++++ b/koji/ssl/SSLCommon.py +@@ -37,7 +37,7 @@ def CreateSSLContext(certs): + if f and not os.access(f, os.R_OK): + raise StandardError, "%s does not exist or is not readable" % f + +- ctx = SSL.Context(SSL.SSLv3_METHOD) # SSLv3 only ++ ctx = SSL.Context(SSL.TLSv1_METHOD) # TLS v1 only + ctx.use_certificate_file(key_and_cert) + ctx.use_privatekey_file(key_and_cert) + ctx.load_client_ca(ca_cert) +@@ -45,7 +45,7 @@ def CreateSSLContext(certs): + verify = SSL.VERIFY_PEER | SSL.VERIFY_FAIL_IF_NO_PEER_CERT + ctx.set_verify(verify, our_verify) + ctx.set_verify_depth(10) +- ctx.set_options(SSL.OP_NO_SSLv2 | SSL.OP_NO_TLSv1) ++ ctx.set_options(SSL.OP_NO_SSLv3 | SSL.OP_NO_SSLv2 | SSL.OP_NO_TLSv1) + return ctx + + +-- +2.2.0 + diff --git a/koji.spec b/koji.spec index b7f851a..7ef3e63 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.9.0 -Release: 8%{?dist} +Release: 9%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -22,6 +22,7 @@ Patch10: 0001-refactor-image-build-handlers-in-kojid.patch Patch11: 0002-refactor-do_images.patch Patch12: 0003-add-raw-xz-option.patch Patch13: 0001-correctly-call-pykickstarts-makeVersion.patch +Patch14: 0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -148,6 +149,7 @@ koji-web is a web UI to the Koji system. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %build @@ -251,6 +253,9 @@ if [ $1 = 0 ]; then fi %changelog +* Thu Dec 11 2014 Dennis Gilmore - 1.9.0-9 +- add upstream patch switching to TLS1 from sslv3 + * Tue Sep 30 2014 Dennis Gilmore - 1.9.0-8 - don't exclude koji-vm from ppc and ppc64 From 4ce429fa936eeb12b2d6e926926d254d84d10f3c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 27 Jan 2015 22:56:42 -0600 Subject: [PATCH 053/202] update to git tarball --- ...rectly-call-pykickstarts-makeVersion.patch | 41 -- 0001-fix-distro-behavior-for-rhel-5.patch | 28 - ...orkdir-from-tmp-koji-to-var-tmp-koji.patch | 28 - ...factor-image-build-handlers-in-kojid.patch | 694 ------------------ ...-bugzilla.redhat.com-show_bug.cgi-id.patch | 35 - 0002-compress-docker-tarball-properly.patch | 26 - 0002-refactor-do_images.patch | 439 ----------- 0003-add-raw-xz-option.patch | 148 ---- ...-upload-the-tdl-priority-to-building.patch | 54 -- ...before-the-try-in-case-of-an-earlier.patch | 33 - 0005-put-ova-options-in-its-own-section.patch | 39 - 0006-use-offline-icicle-generation.patch | 26 - 0007-include-multilib-packages-in-repos.patch | 44 -- 0008-bump-install-timeout-to-2-hours.patch | 25 - compress-docker.patch | 24 - koji.spec | 33 +- sources | 2 +- 17 files changed, 5 insertions(+), 1714 deletions(-) delete mode 100644 0001-correctly-call-pykickstarts-makeVersion.patch delete mode 100644 0001-fix-distro-behavior-for-rhel-5.patch delete mode 100644 0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch delete mode 100644 0001-refactor-image-build-handlers-in-kojid.patch delete mode 100644 0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch delete mode 100644 0002-compress-docker-tarball-properly.patch delete mode 100644 0002-refactor-do_images.patch delete mode 100644 0003-add-raw-xz-option.patch delete mode 100644 0003-upload-the-tdl-priority-to-building.patch delete mode 100644 0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch delete mode 100644 0005-put-ova-options-in-its-own-section.patch delete mode 100644 0006-use-offline-icicle-generation.patch delete mode 100644 0007-include-multilib-packages-in-repos.patch delete mode 100644 0008-bump-install-timeout-to-2-hours.patch delete mode 100644 compress-docker.patch diff --git a/0001-correctly-call-pykickstarts-makeVersion.patch b/0001-correctly-call-pykickstarts-makeVersion.patch deleted file mode 100644 index 9da02a5..0000000 --- a/0001-correctly-call-pykickstarts-makeVersion.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 049ab0dd94544bb0770defa54b1322812e6d3082 Mon Sep 17 00:00:00 2001 -From: Dennis Gilmore -Date: Mon, 4 Aug 2014 05:02:08 -0500 -Subject: [PATCH] correctly call pykickstarts makeVersion - ---- - builder/kojid | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/builder/kojid b/builder/kojid -index b23e9ce..2451ea6 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2387,9 +2387,9 @@ class ImageTask(BaseTaskHandler): - # may not be a problem if the included kickstarts are present - # in the repository we checked out. - if opts.get('ksversion'): -- version = ksparser.makeVersion(ksparser.stringToVersion(opts['ksversion'])) -+ version = ksparser.version.makeVersion(ksparser.stringToVersion(opts['ksversion'])) - else: -- version = ksparser.makeVersion() -+ version = ksparser.version.makeVersion() - self.ks = ksparser.KickstartParser(version) - try: - self.ks.readKickstart(kspath) -@@ -2768,10 +2768,10 @@ class OzImageTask(BaseTaskHandler): - # macros, Oz will fail because it can only handle flat files. - # We require users to flatten their kickstart file. - if self.opts.get('ksversion'): -- version = ksparser.makeVersion( -+ version = ksparser.version.makeVersion( - ksparser.stringToVersion(self.opts['ksversion'])) - else: -- version = ksparser.makeVersion() -+ version = ksparser.version.makeVersion() - ks = ksparser.KickstartParser(version) - self.logger.debug('attempting to read kickstart: %s' % kspath) - try: --- -2.0.4 - diff --git a/0001-fix-distro-behavior-for-rhel-5.patch b/0001-fix-distro-behavior-for-rhel-5.patch deleted file mode 100644 index 2eb869f..0000000 --- a/0001-fix-distro-behavior-for-rhel-5.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2e587154eb101ae4b2015a3b47bbb18e53d393dd Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Tue, 15 Apr 2014 14:31:10 -0400 -Subject: [PATCH 1/8] fix distro behavior for rhel 5 - ---- - builder/kojid | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/builder/kojid b/builder/kojid -index 4163f49..1691a54 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2654,7 +2654,10 @@ class OzImageTask(BaseTaskHandler): - image on. - """ - if distro.startswith('RHEL'): -- return distro.split('.') -+ major, minor = distro.split('.') -+ if major == 'RHEL-5': -+ minor = 'U' + minor -+ return major, minor - elif distro.startswith('Fedora'): - return distro.split('-') - elif distro.startswith('CentOS'): --- -2.0.4 - diff --git a/0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch b/0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch deleted file mode 100644 index e3b5ec8..0000000 --- a/0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 28b685087b620946c81ea72c04a018a174b1362f Mon Sep 17 00:00:00 2001 -From: Dennis Gilmore -Date: Thu, 29 May 2014 21:39:44 -0500 -Subject: [PATCH 1/2] move workdir from /tmp/koji/ to /var/tmp/koji/ - -moving the workdir is needed as /tmp can be quite small with /tmp on tmpfs - -Signed-off-by: Dennis Gilmore ---- - builder/kojid | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/builder/kojid b/builder/kojid -index f101e0f..14309bb 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -3657,7 +3657,7 @@ def get_options(): - 'log_level': None, - 'topdir': '/mnt/koji', - 'topurl': None, -- 'workdir': '/tmp/koji', -+ 'workdir': '/var/tmp/koji', - 'pluginpath': '/usr/lib/koji-builder-plugins', - 'mockdir': '/var/lib/mock', - 'mockuser': 'kojibuilder', --- -2.0.0 - diff --git a/0001-refactor-image-build-handlers-in-kojid.patch b/0001-refactor-image-build-handlers-in-kojid.patch deleted file mode 100644 index 22d4f0e..0000000 --- a/0001-refactor-image-build-handlers-in-kojid.patch +++ /dev/null @@ -1,694 +0,0 @@ -From 440ec22696a5f65f43c042570abb8b39dec5d7ae Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Mon, 2 Jun 2014 15:54:42 -0400 -Subject: [PATCH 1/3] refactor image-build handlers in kojid - ---- - builder/kojid | 477 ++++++++++++++++++++++++++++++++++++++++++---------------- - 1 file changed, 345 insertions(+), 132 deletions(-) - -diff --git a/builder/kojid b/builder/kojid -index aece387..2ea0105 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2711,7 +2711,7 @@ class OzImageTask(BaseTaskHandler): - def fetchKickstart(self): - """ - Retrieve the kickstart file we were given (locally or remotely) and -- upload it. -+ upload it to the hub. - - Note that if the KS file existed locally, then "ksfile" is a relative - path to it in the /mnt/koji/work directory. If not, then it is still -@@ -2720,7 +2720,8 @@ class OzImageTask(BaseTaskHandler): - url with --ksurl. - - @args: None, use self.opts for options -- @returns: absolute path to the retrieved kickstart file -+ @returns: -+ absolute path to the retrieved kickstart file - """ - ksfile = self.opts.get('kickstart') - self.logger.debug("ksfile = %s" % ksfile) -@@ -2751,14 +2752,8 @@ class OzImageTask(BaseTaskHandler): - @returns: None - """ - # XXX: If the ks file came from a local path and has %include -- # macros, *-creator will fail because the included -- # kickstarts were not copied into the chroot. For now we -- # require users to flatten their kickstart file if submitting -- # the task with a local path. -- # -- # Note that if an SCM URL was used instead, %include macros -- # may not be a problem if the included kickstarts are present -- # in the repository we checked out. -+ # macros, Oz will fail because it can only handle flat files. -+ # We require users to flatten their kickstart file. - if self.opts.get('ksversion'): - version = ksparser.makeVersion( - ksparser.stringToVersion(self.opts['ksversion'])) -@@ -2775,16 +2770,15 @@ class OzImageTask(BaseTaskHandler): - raise koji.BuildError("Failed to parse kickstart file " - "'%s' : %s" % (kspath, e)) - -- def prepareKickstart(self, repo_info, target_info, arch): -+ def prepareKickstart(self, repo_info, target_info): - """ - Process the ks file to be used for controlled image generation. This - method also uploads the modified kickstart file to the task output -- area. -+ area on the hub.. - - @args: - target_info: a sesion.getBuildTarget() object - repo_info: session.getRepo() object -- arch: canonical architecture name - @returns: - absolute path to a processed kickstart file - """ -@@ -2794,12 +2788,13 @@ class OzImageTask(BaseTaskHandler): - # repo associated with the target passed in initially. - self.ks.handler.repo.repoList = [] # delete whatever the ks file told us - repo_class = kscontrol.dataMap[self.ks.version]['RepoData'] -+ # TODO: sensibly use "url" and "repo" commands in kickstart - if self.opts.get('repo'): - # the user used --repo at least once - user_repos = self.opts.get('repo') - index = 0 - for user_repo in user_repos: -- repo_url = user_repo.replace('$arch', arch) -+ repo_url = user_repo.replace('$arch', self.arch) - self.ks.handler.repo.repoList.append(repo_class( - baseurl=repo_url, name='koji-override-%i' % index)) - index += 1 -@@ -2808,7 +2803,7 @@ class OzImageTask(BaseTaskHandler): - path_info = koji.PathInfo(topdir=self.options.topurl) - repopath = path_info.repo(repo_info['id'], - target_info['build_tag_name']) -- baseurl = '%s/%s' % (repopath, arch) -+ baseurl = '%s/%s' % (repopath, self.arch) - self.logger.debug('BASEURL: %s' % baseurl) - self.ks.handler.repo.repoList.append(repo_class( - baseurl=baseurl, name='koji-override-0')) -@@ -2831,7 +2826,14 @@ class OzImageTask(BaseTaskHandler): - def makeConfig(self): - """ - Generate a configuration dict for ImageFactory. This will override -- anything in the /etc config files. -+ anything in the /etc config files. We do this forcibly so that it is -+ impossible for Koji to use any image caches or leftover metadata from -+ other images created by the service. -+ -+ @args: none -+ @returns: -+ a dictionary used for configuring ImageFactory to built an image -+ the way we want - """ - return { - #Oz specific -@@ -2852,9 +2854,14 @@ class OzImageTask(BaseTaskHandler): - 'storage_path': os.path.join(self.workdir, 'output_image')}, - } - -- def makeTemplate(self, imgname, arch, inst_tree): -+ def makeTemplate(self, inst_tree): - """ -- Generate a simple template for ImageFactory -+ Generate a simple "TDL" for ImageFactory to build an image with. -+ -+ @args: -+ inst_tree - a string, a URL to the install tree (a compose) -+ @returns: -+ An XML string that imagefactory can consume - """ - # we have to split this up so the variable substitution works - distname, distver = self.parseDistro(self.opts.get('distro')) -@@ -2867,7 +2874,7 @@ class OzImageTask(BaseTaskHandler): - - %s - -- """ % (imgname, distname, distver, arch, inst_tree) -+ """ % (self.imgname, distname, distver, self.arch, inst_tree) - template += """ - rpm -qa --qf '%{NAME},%{VERSION},%{RELEASE},%{ARCH},%{EPOCH},%{SIZE},%{SIGMD5},%{BUILDTIME}\n' - -@@ -2878,13 +2885,54 @@ class OzImageTask(BaseTaskHandler): - %sG - - --""" % (imgname, self.opts.get('disk_size')) -+""" % (self.imgname, self.opts.get('disk_size')) -+ return template -+ -+ def makeDockerUtilTemplate(self, inst_tree, pkg_group): -+ """ -+ Generate a "TDL" for ImageFactory to build a utility image to run -+ docker commands on a docker image. -+ -+ @args: -+ inst_tree - a string, a URL to the install tree (a compose) -+ @returns: -+ An XML string that imagefactory can consume -+ """ -+ distname, distver = self.parseDistro(self.opts.get('distro')) -+ template = """ -+""" % self.id - return template - - def parseDistro(self, distro): - """ - Figure out the distribution name and version we are going to build an - image on. -+ -+ args: -+ a string of the form: RHEL-X.Y, Fedora-NN, CentOS-X.Y, or SL-X.Y -+ returns: -+ a 2-element list, depends on the distro where the split happened - """ - if distro.startswith('RHEL'): - major, minor = distro.split('.') -@@ -2900,7 +2948,8 @@ class OzImageTask(BaseTaskHandler): - else: - raise BuildError('Unknown or supported distro given: %s' % distro) - -- def fixImageXML(self, format, imgname, filename, xmltext): -+ def fixImageXML(self, format, filename, xmltext): -+ - """ - The XML generated by Oz/ImageFactory knows nothing about the name - or image format conversions Koji does. We fix those values in the -@@ -2909,18 +2958,18 @@ class OzImageTask(BaseTaskHandler): - - @args: - format = raw, qcow2, vmdk, etc... a string representation -- name = the (file) name of the image -+ filename = the name of the XML file we will save this too - xmltext = the libvirt XML to start with - @return: - an absolute path to the modified XML - """ - newxml = xml.dom.minidom.parseString(xmltext) - ename = newxml.getElementsByTagName('name')[0] -- ename.firstChild.nodeValue = imgname -+ ename.firstChild.nodeValue = self.imgname - esources = newxml.getElementsByTagName('source') - for e in esources: - if e.hasAttribute('file'): -- e.setAttribute('file', '%s.%s' % (imgname, format)) -+ e.setAttribute('file', '%s.%s' % (self.imgname, format)) - edriver = newxml.getElementsByTagName('driver')[0] - edriver.setAttribute('type', format) - xml_path = os.path.join(self.workdir, filename) -@@ -2933,6 +2982,9 @@ class OzImageTask(BaseTaskHandler): - """ - Locate a screenshot taken by libvirt in the case of build failure, - if it exists. If it does, return the path, else return None. -+ -+ @args: none -+ @returns: a path to a screenshot take by libvirt - """ - shotdir = os.path.join(self.workdir, 'oz_screenshots') - screenshot = None -@@ -2947,7 +2999,7 @@ class OzImageTask(BaseTaskHandler): - class BaseImageTask(OzImageTask): - - Methods = ['createImage'] -- _taskWeight = 1.5 -+ _taskWeight = 2.0 - - def getRootDevice(self): - """ -@@ -2959,7 +3011,38 @@ class BaseImageTask(OzImageTask): - return part.disk - raise koji.ApplianceError, 'kickstart lacks a "/" mountpoint' - -- def format_deps(self, formats): -+ def _makeDockerCmds(self, tags): -+ """ -+ When building a docker image, we call docker commands on it from -+ within the "utility" image. ImageFactory accepts an XML string that -+ describes what commands to run, which is what this method returns. -+ -+ @args: None -+ tags- a list of tags to apply to the docker image -+ @returns: -+ an XML string with docker commands -+ """ -+ # TODO: set up the file name correctly -+ # TODO: set up the image id in docker correctly -+ cmds = """ -+""" % self.imgname -+ self.logger.debug('docker command template: %s' % cmds) -+ return cmds -+ -+ def _format_deps(self, formats): - """ - Return a dictionary where the keys are the image formats we need to - build/convert, and the values are booleans that indicate whether the -@@ -2988,136 +3071,266 @@ class BaseImageTask(OzImageTask): - self.logger.debug('Image delivery plan: %s' % f_dict) - return f_dict - -- def do_images(self, arch, template, ozlog, imgname): -+ def do_images(self, template, inst_tree): - """ - Call out to ImageFactory to build the image(s) we want. Returns a dict - of details for each image type we had to ask ImageFactory to build -- {format: dispatcher object} - """ -- def do_target_image(base_id, image_type, ova_opts={}): -- self.logger.debug('ova_opts: %s' % ova_opts) -- try: -- target = bd.builder_for_target_image(image_type, -- image_id=base_id, template=None, parameters=ova_opts) -- target.target_thread.join() -- except: -- tlog.removeHandler(fhandler) -- self.uploadFile(ozlog) -- self.logger.debug( -- 'Target image results: %s' % target.target_image.status) -- if target.target_image.status == 'FAILED': -- if not self.session.checkUpload('', os.path.basename(ozlog)): -- tlog.removeHandler(fhandler) -- self.uploadFile(ozlog) -- raise koji.ApplianceError('Image status is %s: %s' % ( -- target.target_image.status, -- target.target_image.status_detail)) -- return target -- -- fhandler = logging.FileHandler(ozlog) -- bd = BuildDispatcher() -- tlog = logging.getLogger() -- tlog.setLevel(logging.DEBUG) -- tlog.addHandler(fhandler) -+ fcalls = {'raw': self._buildBase, -+ 'vmdk': self._buildConvert, -+ 'vdi': self._buildConvert, -+ 'qcow': self._buildConvert, -+ 'qcow2': self._buildConvert, -+ 'rhevm-ova': self._buildOVA, -+ 'vsphere-ova': self._buildOVA, -+ 'docker': self._buildIndirect -+ } -+ # add a handler to the logger so that we capture ImageFactory's logging -+ self.fhandler = logging.FileHandler(self.ozlog) -+ self.bd = BuildDispatcher() -+ self.tlog = logging.getLogger() -+ self.tlog.setLevel(logging.DEBUG) -+ self.tlog.addHandler(self.fhandler) - images = {} -+ random.seed() # necessary to ensure a unique mac address -+ # if we need a utility image for the indirection plugin we create it -+ # we do not join() this until later -+ # Future: 'livecd' will be in here -+ if 'docker' in self.formats: -+ self.session.host.setTaskWeight(self.id, 3.0) -+ self.util_img = self._buildDockerUtility(inst_tree) - params = {'install_script': str(self.ks.handler), - 'offline_icicle': True} -- random.seed() # necessary to ensure a unique mac address -- try: -- base = bd.builder_for_base_image(template, parameters=params) -- base.base_thread.join() -- except: -- # upload log even if we failed to help diagnose an issue -- tlog.removeHandler(fhandler) -- self.uploadFile(ozlog) -- self.logger.debug('Base image results: %s' % base.base_image.status) -- if base.base_image.status == 'FAILED': -+ # build the base (raw) image -+ self.base_img = self._buildBase(template, params) -+ images['raw'] = {'image': self.base_img.base_image.data, -+ 'icicle': self.base_img.base_image.icicle} -+ # Do the rest of the image types (everything but raw) -+ for format in self.formats: -+ if format == 'raw': -+ continue -+ self.logger.info('dispatching %s image builder' % format) -+ images[format] = fcalls[format](format) -+ imginfo = self._processXML(images) -+ self.tlog.removeHandler(self.fhandler) -+ self.uploadFile(self.ozlog) -+ return imginfo -+ -+ def _processXML(self, images): -+ """ -+ Produce XML that libvirt can import to create a domain based on image(s) -+ we produced. We save the location of the XML file in the dictionary -+ it corresponds to here. -+ -+ @args: -+ images - a dict where the keys are image formats, and the values -+ are dicts with details about the image (location, icicle, etc) -+ @returns: -+ a dictionary just like "images" but with a new key called "libvirt" -+ that points to the path of the XML file for that image -+ """ -+ imginfo = {} -+ for fmt in images.keys(): -+ imginfo[fmt] = images[fmt] -+ lxml = self.fixImageXML(fmt, 'libvirt-%s-%s.xml' % (fmt, self.arch), -+ self.base_img.base_image.parameters['libvirt_xml']) -+ imginfo[fmt]['libvirt'] = lxml -+ return imginfo -+ -+ def _checkImageState(self, image): -+ """ -+ Query ImageFactory for details of a dispatched image build. If it is -+ FAILED we raise an exception. -+ -+ @args: -+ image - a build dispatcher object returned by a BuildDispatcher -+ @returns: nothing -+ """ -+ if image.target_image: -+ status = image.target_image.status -+ details = image.target_image.status_detail -+ else: -+ status = image.base_image.status -+ details = image.base_image.status_detail -+ self.logger.debug('check image results: %s' % status) -+ if status == 'FAILED': - scrnshot = self.getScreenshot() - if scrnshot: - ext = scrnshot[-3:] - self.uploadFile(scrnshot, remoteName='screenshot.%s' % ext) -- base.os_plugin.abort() # forcibly tear down the VM -+ image.os_plugin.abort() # forcibly tear down the VM - # TODO abort when a task is CANCELLED -- if not self.session.checkUpload('', os.path.basename(ozlog)): -- tlog.removeHandler(fhandler) -- self.uploadFile(ozlog) -- -+ if not self.session.checkUpload('', os.path.basename(self.ozlog)): -+ self.tlog.removeHandler(self.fhandler) -+ self.uploadFile(self.ozlog) - raise koji.ApplianceError('Image status is %s: %s' % -- (base.base_image.status, base.base_image.status_detail)) -- lxml = self.fixImageXML('raw', imgname, -- 'libvirt-%s-%s.xml' % ('raw', arch), -- base.base_image.parameters['libvirt_xml']) -- images['raw'] = {'image': base.base_image.data, 'libvirt': lxml, -- 'icicle': base.base_image.icicle} -- -- # target-image type images -- if 'docker' in self.formats: -- targ = do_target_image(base.base_image.identifier, 'docker', -- ova_opts={'compress': 'gzip'}) -- images['docker'] = {'image': targ.target_image.data} -+ (status, details)) -+ -+ def _buildDockerUtility(self, inst_tree): -+ """ -+ Build a utility image used for the indirection plugin later. Docker -+ and eventually liveCDs will use this. The utility image provides an -+ environment where we will run post-build commands on the base image -+ we generated. - -- ova_opts = {} -+ @args: -+ inst_tree - a string URL to an install tree (a compose) -+ @returns: -+ a dict with some details about the image -+ """ -+ #dtemp = self.makeDockerUtilTemplate(inst_tree, 'docker-build') -+ dtemp = self.makeDockerUtilTemplate('http://download.lab.bos.redhat.com/rel-eng/RHEL-7.0-20140507.0/compose/Server/x86_64/os', 'docker-build') -+ # TODO: enable this and store it properly -+ # pkgs = [x['packagelist'] for x in brew.getTagGroups('rhel-7.0-build') if x['name'] == 'livecd-build'][0] -+ # print '\n'.join([p['package'] for p in pkgs]) -+ dparams = {'generate_icicle': False} -+ utilname = 'koji-%s-util' % self.id -+ return self._buildBase(dtemp, dparams, wait=False) -+ -+ def _buildBase(self, template, params, wait=True): -+ """ -+ Build a base image using ImageFactory. This is a "raw" image. -+ -+ @args: -+ template - an XML string for the TDL -+ params - a dict that controls some ImageFactory settings -+ wait - call join() on the building thread if True -+ @returns: -+ a dict with some metadata about the image (includes an icicle) -+ """ -+ # TODO: test the failure case where IF itself throws an exception -+ # ungracefully (missing a plugin for example) -+ # may need to still upload ozlog and remove the log handler -+ self.logger.info('dispatching a baseimg builder') -+ self.logger.debug('templates: %s' % template) -+ self.logger.debug('params: %s' % params) -+ base = self.bd.builder_for_base_image(template, parameters=params) -+ if wait: -+ base.base_thread.join() -+ self._checkImageState(base) -+ return base -+ -+ def _buildOVA(self, format): -+ """ -+ Build an OVA target image. This is a format supported by RHEV and -+ vSphere -+ -+ @args: -+ format - a string representing the image format, "rhevm-ova" -+ @returns -+ a dict with some metadata about the image -+ """ -+ img_opts = {} - if self.opts.get('ova_option'): -- ova_opts = dict([o.split('=') for o in self.opts.get('ova_option')]) -- for format in ('rhevm-ova', 'vsphere-ova'): -- # assumes self.formats is pre-populated with rhevm/vsphere if the -- # "ova" format for them was requested with --format only -- if format not in self.formats: -- continue -- targ = do_target_image(base.base_image.identifier, -- format.replace('-ova', '')) -- # Target images do not have their own modified libvirt xml files. -- # They may not even be bootable with libvirt. -- lxml = self.fixImageXML(format, imgname, -- 'libvirt-%s-%s.xml' % (format, arch), -- base.base_image.parameters['libvirt_xml']) -- targ2 = do_target_image(targ.target_image.identifier, 'OVA', -- ova_opts=ova_opts) -- images[format] = {'libvirt': lxml, 'image': targ2.target_image.data} -- tlog.removeHandler(fhandler) -- self.uploadFile(ozlog) -- -- # qemu-img conversions -- for format in ('qcow', 'qcow2', 'vdi', 'vmdk'): -- if format not in self.formats: -- continue -- newimg = os.path.join(self.workdir, imgname + '.%s' % format) -- cmd = ['/usr/bin/qemu-img', 'convert', '-f', 'raw', '-O', -- format, base.base_image.data, newimg] -- if format in ('qcow', 'qcow2'): -- cmd.insert(2, '-c') # enable compression for qcow images -- conlog = os.path.join(self.workdir, -- 'qemu-img-%s-%s.log' % (format, arch)) -- log_output(self.session, cmd[0], cmd, conlog, -- self.getUploadDir(), logerror=1) -- lxml = self.fixImageXML(format, imgname, -- 'libvirt-%s-%s.xml' % (format, arch), -- base.base_image.parameters['libvirt_xml']) -- images[format] = {'image': newimg, 'libvirt': lxml} -- -- return images -+ img_opts = dict([o.split('=') for o in self.opts.get('ova_option')]) -+ targ = self._do_target_image(self.base_img.base_image.identifier, -+ format.replace('-ova', '')) -+ targ2 = self._do_target_image(targ.target_image.identifier, 'OVA', -+ img_opts=img_opts) -+ return {'image': targ2.target_image.data} -+ -+ def _do_target_image(self, base_id, image_type, img_opts={}): -+ """ -+ A generic method for building what ImageFactory calls "target images". -+ These are images based on a raw disk that was built before using the -+ _buildBase method. -+ -+ @args: -+ base_id - a string ID of the image to build off of -+ image_type - a string representing the target type. ImageFactory -+ uses this to figure out what plugin to run -+ img_opts - a dict of additional options that specific to the target -+ type we pass in via image_type -+ @returns: -+ A Builder() object from ImageFactory that contains information -+ about the image building include state and progress. -+ """ -+ # TODO: test the failure case where IF itself throws an exception -+ # ungracefully (missing a plugin for example) -+ # may need to still upload ozlog and remove the log handler -+ self.logger.debug('img_opts: %s' % img_opts) -+ target = self.bd.builder_for_target_image(image_type, -+ image_id=base_id, template=None, parameters=img_opts) -+ target.target_thread.join() -+ self._checkImageState(target) -+ return target -+ -+ def _buildConvert(self, format): -+ """ -+ Build an image by converting the format using qemu-img. This is method -+ enables a variety of formats like qcow, qcow2, vmdk, and vdi. -+ -+ @args: -+ format - a string representing the image format, "qcow2" -+ @returns -+ a dict with some metadata about the image -+ """ -+ -+ newimg = os.path.join(self.workdir, self.imgname + '.%s' % format) -+ cmd = ['/usr/bin/qemu-img', 'convert', '-f', 'raw', '-O', -+ format, self.base_img.base_image.data, newimg] -+ if format in ('qcow', 'qcow2'): -+ cmd.insert(2, '-c') # enable compression for qcow images -+ conlog = os.path.join(self.workdir, -+ 'qemu-img-%s-%s.log' % (format, self.arch)) -+ log_output(self.session, cmd[0], cmd, conlog, -+ self.getUploadDir(), logerror=1) -+ return {'image': newimg} -+ -+ def _buildIndirect(self, format): -+ """ -+ "Indirect" images are target images that use the indirection plugin. -+ This plugin makes use of an additional guest, and launches that to run -+ commands on the base image we built earlier. The image that backs the -+ modifying guest is called the "utility" image, which we built before. -+ -+ @args: -+ format - a string representing the image format, "qcow2" -+ @returns -+ a dict with some metadata about the image -+ """ -+ # Future: livecd will be introduced here too -+ # we should have waited for and checked the base image already -+ # TODO: log the shit out of this new stuff -+ # TODO: test the failure case where IF itself throws an exception -+ # ungracefully (missing a plugin for example) -+ # may need to still upload ozlog and remove the log handler -+ self.util_img.base_thread.join() -+ self._checkImageState(self.util_img) -+ params = { -+ 'compress': 'gzip', -+ 'utility_image': self.util_img.base_image.identifier, -+ 'utility_customizations': self._makeDockerCmds([self.imgname]) -+ } -+ targ = self.bd.builder_for_target_image('indirection', -+ image_id=self.base.base_image.identifier, -+ template=None, parameters=params) -+ targ.target_thread.join() -+ self._checkImageState(targ) -+ return {'image': targ.target_image.data} - - def handler(self, name, version, release, arch, target_info, build_tag, repo_info, inst_tree, opts=None): - - if opts == None: - opts = {} -+ self.arch = arch - self.opts = opts -- self.formats = self.format_deps(opts.get('format')) -+ self.formats = self._format_deps(opts.get('format')) - - # First, prepare the kickstart to use the repos we tell it - kspath = self.fetchKickstart() - self.readKickstart(kspath) -- kskoji = self.prepareKickstart(repo_info, target_info, arch) -+ kskoji = self.prepareKickstart(repo_info, target_info) - - # auto-generate a TDL file and config dict for ImageFactory -- imgname = '%s-%s-%s.%s' % (name, version, release, arch) -- template = self.makeTemplate(imgname, arch, inst_tree) -+ self.imgname = '%s-%s-%s.%s' % (name, version, release, self.arch) -+ template = self.makeTemplate(inst_tree) - self.logger.debug('oz template: %s' % template) - config = self.makeConfig() - self.logger.debug('IF config object: %s' % config) - ApplicationConfiguration(configuration=config) - -- tdl_path = os.path.join(self.workdir, 'tdl-%s.xml' % arch) -+ tdl_path = os.path.join(self.workdir, 'tdl-%s.xml' % self.arch) - tdl = open(tdl_path, 'w') - tdl.write(template) - tdl.close() -@@ -3129,16 +3342,16 @@ class BaseImageTask(OzImageTask): - # the likelihood of image tasks clashing here is very small) - rm = ReservationManager() - rm._listen_port = rm.MIN_PORT + self.id % (rm.MAX_PORT - rm.MIN_PORT) -- ozlogname = 'oz-%s.log' % arch -- ozlog = os.path.join(self.workdir, ozlogname) -+ ozlogname = 'oz-%s.log' % self.arch -+ self.ozlog = os.path.join(self.workdir, ozlogname) - - # invoke the image builds -- images = self.do_images(arch, template, ozlog, imgname) -+ images = self.do_images(template, inst_tree) - images['raw']['tdl'] = os.path.basename(tdl_path), - - # structure the results to pass back to the hub: - imgdata = { -- 'arch': arch, -+ 'arch': self.arch, - 'task_id': self.id, - 'logs': [ozlogname], - 'name': name, -@@ -3175,7 +3388,7 @@ class BaseImageTask(OzImageTask): - rpm['epoch'] = int(bits[4]) - imgdata['rpmlist'].append(rpm) - # TODO: hack to make this work for now, need to refactor -- br = BuildRoot(self.session, self.options, build_tag, arch, -+ br = BuildRoot(self.session, self.options, build_tag, self.arch, - self.id, repo_id=repo_info['id']) - br.markExternalRPMs(imgdata['rpmlist']) - -@@ -3183,11 +3396,11 @@ class BaseImageTask(OzImageTask): - for format in (f for f in self.formats.keys() if self.formats[f]): - newimg = images[format]['image'] - if 'ova' in format: -- newname = imgname + '.' + format.replace('-', '.') -+ newname = self.imgname + '.' + format.replace('-', '.') - elif format == 'docker': -- newname = imgname + '.' + 'tar.gz' -+ newname = self.imgname + '.' + 'tar.gz' - else: -- newname = imgname + '.' + format -+ newname = self.imgname + '.' + format - if format != 'docker': - lxml = images[format]['libvirt'] - imgdata['files'].append(os.path.basename(lxml)) --- -2.0.4 - diff --git a/0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch b/0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch deleted file mode 100644 index 6f2959e..0000000 --- a/0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 07d1eb810930fa1de7c89bad817ccca68b9ec7bc Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: Wed, 15 Oct 2014 10:54:31 -0400 -Subject: [PATCH] use TLSv1. - https://bugzilla.redhat.com/show_bug.cgi?id=1152823 - ---- - koji/ssl/SSLCommon.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/koji/ssl/SSLCommon.py b/koji/ssl/SSLCommon.py -index 1a3b3d6..014fbf6 100644 ---- a/koji/ssl/SSLCommon.py -+++ b/koji/ssl/SSLCommon.py -@@ -37,7 +37,7 @@ def CreateSSLContext(certs): - if f and not os.access(f, os.R_OK): - raise StandardError, "%s does not exist or is not readable" % f - -- ctx = SSL.Context(SSL.SSLv3_METHOD) # SSLv3 only -+ ctx = SSL.Context(SSL.TLSv1_METHOD) # TLS v1 only - ctx.use_certificate_file(key_and_cert) - ctx.use_privatekey_file(key_and_cert) - ctx.load_client_ca(ca_cert) -@@ -45,7 +45,7 @@ def CreateSSLContext(certs): - verify = SSL.VERIFY_PEER | SSL.VERIFY_FAIL_IF_NO_PEER_CERT - ctx.set_verify(verify, our_verify) - ctx.set_verify_depth(10) -- ctx.set_options(SSL.OP_NO_SSLv2 | SSL.OP_NO_TLSv1) -+ ctx.set_options(SSL.OP_NO_SSLv3 | SSL.OP_NO_SSLv2 | SSL.OP_NO_TLSv1) - return ctx - - --- -2.2.0 - diff --git a/0002-compress-docker-tarball-properly.patch b/0002-compress-docker-tarball-properly.patch deleted file mode 100644 index 2ce299e..0000000 --- a/0002-compress-docker-tarball-properly.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 073bdb69e73e8943f3fb031f56b3d3ca66412edc Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Tue, 15 Apr 2014 14:45:40 -0400 -Subject: [PATCH 2/8] compress docker tarball properly - ---- - builder/kojid | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/builder/kojid b/builder/kojid -index 1691a54..cee7637 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2824,7 +2824,8 @@ class BaseImageTask(OzImageTask): - - # target-image type images - if 'docker' in self.formats: -- targ = do_target_image(base.base_image.identifier, 'docker') -+ targ = do_target_image(base.base_image.identifier, 'docker', -+ ova_opts={'compress': 'gzip'}) - images['docker'] = {'image': targ.target_image.data} - - ova_opts = {} --- -2.0.4 - diff --git a/0002-refactor-do_images.patch b/0002-refactor-do_images.patch deleted file mode 100644 index 2b6a73d..0000000 --- a/0002-refactor-do_images.patch +++ /dev/null @@ -1,439 +0,0 @@ -From ef2e41a672fecf6168dca5a177d61c8e77427279 Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Fri, 25 Jul 2014 13:34:10 -0400 -Subject: [PATCH 2/3] refactor do_images - ---- - builder/kojid | 248 +++++++++++++++++----------------------------------------- - 1 file changed, 73 insertions(+), 175 deletions(-) - -diff --git a/builder/kojid b/builder/kojid -index 2ea0105..d3446b9 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2749,7 +2749,8 @@ class OzImageTask(BaseTaskHandler): - - @args: - kspath: path to a kickstart file -- @returns: None -+ @returns: -+ a kickstart object returned by pykickstart - """ - # XXX: If the ks file came from a local path and has %include - # macros, Oz will fail because it can only handle flat files. -@@ -2759,35 +2760,36 @@ class OzImageTask(BaseTaskHandler): - ksparser.stringToVersion(self.opts['ksversion'])) - else: - version = ksparser.makeVersion() -- self.ks = ksparser.KickstartParser(version) -+ ks = ksparser.KickstartParser(version) - self.logger.debug('attempting to read kickstart: %s' % kspath) - try: -- self.ks.readKickstart(kspath) -+ ks.readKickstart(kspath) - except IOError, e: - raise koji.BuildError("Failed to read kickstart file " - "'%s' : %s" % (kspath, e)) - except kserrors.KickstartError, e: - raise koji.BuildError("Failed to parse kickstart file " - "'%s' : %s" % (kspath, e)) -+ return ks - -- def prepareKickstart(self, repo_info, target_info): -+ def prepareKickstart(self, kspath): - """ - Process the ks file to be used for controlled image generation. This - method also uploads the modified kickstart file to the task output -- area on the hub.. -+ area on the hub. - - @args: -- target_info: a sesion.getBuildTarget() object -- repo_info: session.getRepo() object -+ kspath: a path to a kickstart file - @returns: -- absolute path to a processed kickstart file -+ a kickstart object with koji-specific modifications - """ -+ ks = self.readKickstart(kspath) - # Now we do some kickstart manipulation. If the user passed in a repo - # url with --repo, then we substitute that in for the repo(s) specified - # in the kickstart file. If --repo wasn't specified, then we use the - # repo associated with the target passed in initially. -- self.ks.handler.repo.repoList = [] # delete whatever the ks file told us -- repo_class = kscontrol.dataMap[self.ks.version]['RepoData'] -+ ks.handler.repo.repoList = [] # delete whatever the ks file told us -+ repo_class = kscontrol.dataMap[ks.version]['RepoData'] - # TODO: sensibly use "url" and "repo" commands in kickstart - if self.opts.get('repo'): - # the user used --repo at least once -@@ -2795,33 +2797,41 @@ class OzImageTask(BaseTaskHandler): - index = 0 - for user_repo in user_repos: - repo_url = user_repo.replace('$arch', self.arch) -- self.ks.handler.repo.repoList.append(repo_class( -+ ks.handler.repo.repoList.append(repo_class( - baseurl=repo_url, name='koji-override-%i' % index)) - index += 1 - else: - # --repo was not given, so we use the target's build repo - path_info = koji.PathInfo(topdir=self.options.topurl) -- repopath = path_info.repo(repo_info['id'], -- target_info['build_tag_name']) -+ repopath = path_info.repo(self.repo_info['id'], -+ self.target_info['build_tag_name']) - baseurl = '%s/%s' % (repopath, self.arch) - self.logger.debug('BASEURL: %s' % baseurl) -- self.ks.handler.repo.repoList.append(repo_class( -+ ks.handler.repo.repoList.append(repo_class( - baseurl=baseurl, name='koji-override-0')) -+ return ks - -- # Write out the new ks file. Note that things may not be in the same -- # order and comments in the original ks file may be lost. -- kskoji = os.path.join(self.workdir, 'koji-image-%s-%i.ks' % -- (target_info['build_tag_name'], self.id)) -- self.logger.debug('modified ks file: %s' % kskoji) -- outfile = open(kskoji, 'w') -- outfile.write(str(self.ks.handler)) -+ def writeKickstart(self, ksobj, ksname): -+ """ -+ Write out the new ks file. Note that things may not be in the same -+ order and comments in the original ks file may be lost. -+ -+ @args: -+ ksobj: a pykickstart object of what we want to write -+ ksname: file name for the kickstart -+ @returns: -+ an absolute path to the kickstart file we wrote -+ """ -+ kspath = os.path.join(self.workdir, ksname) -+ outfile = open(kspath, 'w') -+ outfile.write(str(ksobj.handler)) - outfile.close() - - # put the new ksfile in the output directory -- if not os.path.exists(kskoji): -- raise koji.BuildError, "KS file missing: %s" % kskoji -- self.uploadFile(kskoji) # upload the modified ks file -- return kskoji -+ if not os.path.exists(kspath): -+ raise koji.BuildError, "KS file missing: %s" % kspath -+ self.uploadFile(kspath) # upload the modified ks file -+ return kspath - - def makeConfig(self): - """ -@@ -2854,16 +2864,20 @@ class OzImageTask(BaseTaskHandler): - 'storage_path': os.path.join(self.workdir, 'output_image')}, - } - -- def makeTemplate(self, inst_tree): -+ def makeTemplate(self, name, inst_tree): - """ - Generate a simple "TDL" for ImageFactory to build an image with. - - @args: -- inst_tree - a string, a URL to the install tree (a compose) -+ name: a name for the image -+ inst_tree: a string, a URL to the install tree (a compose) - @returns: - An XML string that imagefactory can consume - """ - # we have to split this up so the variable substitution works -+ # XXX: using a packages section (which we don't) will have IF boot the -+ # image and attempt to ssh in. This breaks docker image creation. -+ # TODO: intelligently guess the distro based on the install tree URL - distname, distver = self.parseDistro(self.opts.get('distro')) - template = """ --""" % (self.imgname, self.opts.get('disk_size')) -- return template -- -- def makeDockerUtilTemplate(self, inst_tree, pkg_group): -- """ -- Generate a "TDL" for ImageFactory to build a utility image to run -- docker commands on a docker image. -- -- @args: -- inst_tree - a string, a URL to the install tree (a compose) -- @returns: -- An XML string that imagefactory can consume -- """ -- distname, distver = self.parseDistro(self.opts.get('distro')) -- template = """ --""" % self.id -+""" % (name, self.opts.get('disk_size')) - return template - - def parseDistro(self, distro): -@@ -3001,47 +2980,6 @@ class BaseImageTask(OzImageTask): - Methods = ['createImage'] - _taskWeight = 2.0 - -- def getRootDevice(self): -- """ -- Return the device name for the / partition, as specified in the -- kickstart file. Appliances should have this defined. -- """ -- for part in self.ks.handler.partition.partitions: -- if part.mountpoint == '/': -- return part.disk -- raise koji.ApplianceError, 'kickstart lacks a "/" mountpoint' -- -- def _makeDockerCmds(self, tags): -- """ -- When building a docker image, we call docker commands on it from -- within the "utility" image. ImageFactory accepts an XML string that -- describes what commands to run, which is what this method returns. -- -- @args: None -- tags- a list of tags to apply to the docker image -- @returns: -- an XML string with docker commands -- """ -- # TODO: set up the file name correctly -- # TODO: set up the image id in docker correctly -- cmds = """ --""" % self.imgname -- self.logger.debug('docker command template: %s' % cmds) -- return cmds -- - def _format_deps(self, formats): - """ - Return a dictionary where the keys are the image formats we need to -@@ -3049,8 +2987,7 @@ class BaseImageTask(OzImageTask): - output should be included in the task results. - - Some image formats require others to be processed first, which is why -- we have to do this. rhevm-ova requires rhevm, but if the user did not -- request it, we should not pass it back up. -+ we have to do this. raw files in particular may not be kept. - """ - supported = ('raw', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') - for f in formats: -@@ -3071,7 +3008,7 @@ class BaseImageTask(OzImageTask): - self.logger.debug('Image delivery plan: %s' % f_dict) - return f_dict - -- def do_images(self, template, inst_tree): -+ def do_images(self, ks, template, inst_tree): - """ - Call out to ImageFactory to build the image(s) we want. Returns a dict - of details for each image type we had to ask ImageFactory to build -@@ -3083,7 +3020,7 @@ class BaseImageTask(OzImageTask): - 'qcow2': self._buildConvert, - 'rhevm-ova': self._buildOVA, - 'vsphere-ova': self._buildOVA, -- 'docker': self._buildIndirect -+ 'docker': self._buildDocker - } - # add a handler to the logger so that we capture ImageFactory's logging - self.fhandler = logging.FileHandler(self.ozlog) -@@ -3093,13 +3030,7 @@ class BaseImageTask(OzImageTask): - self.tlog.addHandler(self.fhandler) - images = {} - random.seed() # necessary to ensure a unique mac address -- # if we need a utility image for the indirection plugin we create it -- # we do not join() this until later -- # Future: 'livecd' will be in here -- if 'docker' in self.formats: -- self.session.host.setTaskWeight(self.id, 3.0) -- self.util_img = self._buildDockerUtility(inst_tree) -- params = {'install_script': str(self.ks.handler), -+ params = {'install_script': str(ks.handler), - 'offline_icicle': True} - # build the base (raw) image - self.base_img = self._buildBase(template, params) -@@ -3166,26 +3097,6 @@ class BaseImageTask(OzImageTask): - raise koji.ApplianceError('Image status is %s: %s' % - (status, details)) - -- def _buildDockerUtility(self, inst_tree): -- """ -- Build a utility image used for the indirection plugin later. Docker -- and eventually liveCDs will use this. The utility image provides an -- environment where we will run post-build commands on the base image -- we generated. -- -- @args: -- inst_tree - a string URL to an install tree (a compose) -- @returns: -- a dict with some details about the image -- """ -- #dtemp = self.makeDockerUtilTemplate(inst_tree, 'docker-build') -- dtemp = self.makeDockerUtilTemplate('http://download.lab.bos.redhat.com/rel-eng/RHEL-7.0-20140507.0/compose/Server/x86_64/os', 'docker-build') -- # TODO: enable this and store it properly -- # pkgs = [x['packagelist'] for x in brew.getTagGroups('rhel-7.0-build') if x['name'] == 'livecd-build'][0] -- # print '\n'.join([p['package'] for p in pkgs]) -- dparams = {'generate_icicle': False} -- utilname = 'koji-%s-util' % self.id -- return self._buildBase(dtemp, dparams, wait=False) - - def _buildBase(self, template, params, wait=True): - """ -@@ -3217,7 +3128,7 @@ class BaseImageTask(OzImageTask): - - @args: - format - a string representing the image format, "rhevm-ova" -- @returns -+ @returns: - a dict with some metadata about the image - """ - img_opts = {} -@@ -3229,6 +3140,21 @@ class BaseImageTask(OzImageTask): - img_opts=img_opts) - return {'image': targ2.target_image.data} - -+ def _buildDocker(self, format): -+ """ -+ Build a base docker image. This image will be tagged with the NVR.A -+ automatically because we name it that way in the ImageFactory TDL. -+ -+ @args: -+ format - the string "docker" -+ @returns: -+ a dict with some metadata about the image -+ """ -+ img_opts = {'compress': 'gzip'} -+ targ = self._do_target_image(self.base_img.base_image.identifier, -+ 'docker', img_opts=img_opts) -+ return {'image': targ.target_image.data} -+ - def _do_target_image(self, base_id, image_type, img_opts={}): - """ - A generic method for building what ImageFactory calls "target images". -@@ -3277,54 +3203,26 @@ class BaseImageTask(OzImageTask): - self.getUploadDir(), logerror=1) - return {'image': newimg} - -- def _buildIndirect(self, format): -- """ -- "Indirect" images are target images that use the indirection plugin. -- This plugin makes use of an additional guest, and launches that to run -- commands on the base image we built earlier. The image that backs the -- modifying guest is called the "utility" image, which we built before. -- -- @args: -- format - a string representing the image format, "qcow2" -- @returns -- a dict with some metadata about the image -- """ -- # Future: livecd will be introduced here too -- # we should have waited for and checked the base image already -- # TODO: log the shit out of this new stuff -- # TODO: test the failure case where IF itself throws an exception -- # ungracefully (missing a plugin for example) -- # may need to still upload ozlog and remove the log handler -- self.util_img.base_thread.join() -- self._checkImageState(self.util_img) -- params = { -- 'compress': 'gzip', -- 'utility_image': self.util_img.base_image.identifier, -- 'utility_customizations': self._makeDockerCmds([self.imgname]) -- } -- targ = self.bd.builder_for_target_image('indirection', -- image_id=self.base.base_image.identifier, -- template=None, parameters=params) -- targ.target_thread.join() -- self._checkImageState(targ) -- return {'image': targ.target_image.data} -- - def handler(self, name, version, release, arch, target_info, build_tag, repo_info, inst_tree, opts=None): - - if opts == None: - opts = {} - self.arch = arch -+ self.target_info = target_info -+ self.repo_info = repo_info - self.opts = opts - self.formats = self._format_deps(opts.get('format')) - - # First, prepare the kickstart to use the repos we tell it - kspath = self.fetchKickstart() -- self.readKickstart(kspath) -- kskoji = self.prepareKickstart(repo_info, target_info) -+ ks = self.prepareKickstart(kspath) -+ kskoji = self.writeKickstart(ks, -+ os.path.join(self.workdir, 'koji-%s-%i-base.ks' % -+ (self.target_info['build_tag_name'], self.id))) - - # auto-generate a TDL file and config dict for ImageFactory - self.imgname = '%s-%s-%s.%s' % (name, version, release, self.arch) -- template = self.makeTemplate(inst_tree) -+ template = self.makeTemplate(self.imgname, inst_tree) - self.logger.debug('oz template: %s' % template) - config = self.makeConfig() - self.logger.debug('IF config object: %s' % config) -@@ -3346,7 +3244,7 @@ class BaseImageTask(OzImageTask): - self.ozlog = os.path.join(self.workdir, ozlogname) - - # invoke the image builds -- images = self.do_images(template, inst_tree) -+ images = self.do_images(ks, template, inst_tree) - images['raw']['tdl'] = os.path.basename(tdl_path), - - # structure the results to pass back to the hub: -@@ -3389,7 +3287,7 @@ class BaseImageTask(OzImageTask): - imgdata['rpmlist'].append(rpm) - # TODO: hack to make this work for now, need to refactor - br = BuildRoot(self.session, self.options, build_tag, self.arch, -- self.id, repo_id=repo_info['id']) -+ self.id, repo_id=self.repo_info['id']) - br.markExternalRPMs(imgdata['rpmlist']) - - # upload the results --- -2.0.4 - diff --git a/0003-add-raw-xz-option.patch b/0003-add-raw-xz-option.patch deleted file mode 100644 index 62443fc..0000000 --- a/0003-add-raw-xz-option.patch +++ /dev/null @@ -1,148 +0,0 @@ -From c1b42e0c67b1050c00c922f882cc192dbc571edc Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Tue, 29 Jul 2014 21:33:49 -0400 -Subject: [PATCH 3/3] add raw-xz option - ---- - builder/kojid | 50 +++++++++++++++++++++++++++++++++++++++++++------- - cli/koji | 2 +- - 2 files changed, 44 insertions(+), 8 deletions(-) - -diff --git a/builder/kojid b/builder/kojid -index d3446b9..b23e9ce 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2096,6 +2096,18 @@ class BuildBaseImageTask(BuildImageTask): - spec_url, subtask, target_info, bld_info, - repo_info['id']) - -+ # make sure we only import the user-submitted kickstart file one -+ # time, otherwise we will have collisions. Remove it from exactly -+ # 1 results hash from the subtasks -+ if opts.has_key('kickstart'): -+ saw_ks = False -+ for arch in results.keys(): -+ ks = os.path.basename(opts.get('kickstart')) -+ if ks in results[arch]['files']: -+ if saw_ks: -+ results[arch]['files'].remove(ks) -+ saw_ks = True -+ - self.logger.debug('Image Results for hub: %s' % results) - if opts.get('scratch'): - self.session.host.moveImageBuildToScratch(self.id, results) -@@ -2728,7 +2740,7 @@ class OzImageTask(BaseTaskHandler): - if self.opts.get('ksurl'): - scm = SCM(self.opts['ksurl']) - scm.assert_allowed(self.options.allowed_scms) -- logfile = os.path.join(self.workdir, 'checkout.log') -+ logfile = os.path.join(self.workdir, 'checkout-%s.log' % self.arch) - scmsrcdir = scm.checkout(self.workdir, self.session, - self.getUploadDir(), logfile) - kspath = os.path.join(scmsrcdir, os.path.basename(ksfile)) -@@ -2989,7 +3001,7 @@ class BaseImageTask(OzImageTask): - Some image formats require others to be processed first, which is why - we have to do this. raw files in particular may not be kept. - """ -- supported = ('raw', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') -+ supported = ('raw', 'raw-xz', 'vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', 'docker') - for f in formats: - if f not in supported: - raise koji.ApplianceError('Invalid format: %s' % f) -@@ -3014,6 +3026,7 @@ class BaseImageTask(OzImageTask): - of details for each image type we had to ask ImageFactory to build - """ - fcalls = {'raw': self._buildBase, -+ 'raw-xz': self._buildXZ, - 'vmdk': self._buildConvert, - 'vdi': self._buildConvert, - 'qcow': self._buildConvert, -@@ -3079,10 +3092,10 @@ class BaseImageTask(OzImageTask): - """ - if image.target_image: - status = image.target_image.status -- details = image.target_image.status_detail -+ details = image.target_image.status_detail['error'] - else: - status = image.base_image.status -- details = image.base_image.status_detail -+ details = image.base_image.status_detail['error'] - self.logger.debug('check image results: %s' % status) - if status == 'FAILED': - scrnshot = self.getScreenshot() -@@ -3094,10 +3107,11 @@ class BaseImageTask(OzImageTask): - if not self.session.checkUpload('', os.path.basename(self.ozlog)): - self.tlog.removeHandler(self.fhandler) - self.uploadFile(self.ozlog) -+ if 'No disk activity' in details: -+ details = 'Automated install failed or prompted for input. See the screenshot in the task results for more information.' - raise koji.ApplianceError('Image status is %s: %s' % - (status, details)) - -- - def _buildBase(self, template, params, wait=True): - """ - Build a base image using ImageFactory. This is a "raw" image. -@@ -3121,6 +3135,29 @@ class BaseImageTask(OzImageTask): - self._checkImageState(base) - return base - -+ def _buildXZ(self, format): -+ """ -+ Use xz to compress a raw disk image. This is very straightforward. -+ -+ @args: -+ format - a string representing the image format, "raw-xz" -+ @returns: -+ a dict with some metadata about the image -+ """ -+ newimg = os.path.join(self.workdir, self.imgname + '.raw.xz') -+ rawimg = os.path.join(self.workdir, self.imgname + '.raw') -+ cmd = ['/bin/cp', self.base_img.base_image.data, rawimg] -+ conlog = os.path.join(self.workdir, -+ 'xz-cp-%s-%s.log' % (format, self.arch)) -+ log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), -+ logerror=1) -+ cmd = ['/usr/bin/xz', '-z', rawimg] -+ conlog = os.path.join(self.workdir, -+ 'xz-%s-%s.log' % (format, self.arch)) -+ log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), -+ logerror=1) -+ return {'image': newimg} -+ - def _buildOVA(self, format): - """ - Build an OVA target image. This is a format supported by RHEV and -@@ -3191,7 +3228,6 @@ class BaseImageTask(OzImageTask): - @returns - a dict with some metadata about the image - """ -- - newimg = os.path.join(self.workdir, self.imgname + '.%s' % format) - cmd = ['/usr/bin/qemu-img', 'convert', '-f', 'raw', '-O', - format, self.base_img.base_image.data, newimg] -@@ -3293,7 +3329,7 @@ class BaseImageTask(OzImageTask): - # upload the results - for format in (f for f in self.formats.keys() if self.formats[f]): - newimg = images[format]['image'] -- if 'ova' in format: -+ if 'ova' in format or format == 'raw-xz': - newname = self.imgname + '.' + format.replace('-', '.') - elif format == 'docker': - newname = self.imgname + '.' + 'tar.gz' -diff --git a/cli/koji b/cli/koji -index 8722f01..9451963 100755 ---- a/cli/koji -+++ b/cli/koji -@@ -5130,7 +5130,7 @@ def handle_spin_appliance(options, session, args): - def handle_image_build(options, session, args): - """Create a disk image given an install tree""" - formats = ('vmdk', 'qcow', 'qcow2', 'vdi', 'rhevm-ova', 'vsphere-ova', -- 'docker') -+ 'docker', 'raw-xz') - usage = _("usage: %prog image-build [options] " + - " [...]") - usage += _("\n %prog image-build --config FILE") --- -2.0.4 - diff --git a/0003-upload-the-tdl-priority-to-building.patch b/0003-upload-the-tdl-priority-to-building.patch deleted file mode 100644 index 70e2dd2..0000000 --- a/0003-upload-the-tdl-priority-to-building.patch +++ /dev/null @@ -1,54 +0,0 @@ -From b566eba6f83b151fcc058906a0630f4d9e303490 Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Wed, 16 Apr 2014 11:18:53 -0400 -Subject: [PATCH 3/8] upload the tdl priority to building - ---- - builder/kojid | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/builder/kojid b/builder/kojid -index cee7637..32400c6 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2813,13 +2813,7 @@ class BaseImageTask(OzImageTask): - lxml = self.fixImageXML('raw', imgname, - 'libvirt-%s-%s.xml' % ('raw', arch), - base.base_image.parameters['libvirt_xml']) -- tdl_path = os.path.join(self.workdir, 'tdl-%s.xml' % arch) -- tdl = open(tdl_path, 'w') -- tdl.write(base.base_image.template) -- tdl.close() -- self.uploadFile(tdl_path) - images['raw'] = {'image': base.base_image.data, 'libvirt': lxml, -- 'tdl': os.path.basename(tdl_path), - 'icicle': base.base_image.icicle} - - # target-image type images -@@ -2889,6 +2883,12 @@ class BaseImageTask(OzImageTask): - self.logger.debug('IF config object: %s' % config) - ApplicationConfiguration(configuration=config) - -+ tdl_path = os.path.join(self.workdir, 'tdl-%s.xml' % arch) -+ tdl = open(tdl_path, 'w') -+ tdl.write(template) -+ tdl.close() -+ self.uploadFile(tdl_path) -+ - # ImageFactory picks a port to the guest VM using a rolling integer. - # This is a problem for concurrency, so we override the port it picks - # here using the task ID. (not a perfect solution but good enough: -@@ -2900,9 +2900,9 @@ class BaseImageTask(OzImageTask): - - # invoke the image builds - images = self.do_images(arch, template, ozlog, imgname) -+ images['raw']['tdl'] = os.path.basename(tdl_path), - - # structure the results to pass back to the hub: -- tdl_path = images['raw']['tdl'] - imgdata = { - 'arch': arch, - 'task_id': self.id, --- -2.0.4 - diff --git a/0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch b/0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch deleted file mode 100644 index b3a279c..0000000 --- a/0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7a1d6c4cd42f6efe8a3833a77a4475b6cfe9da43 Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Wed, 16 Apr 2014 12:00:33 -0400 -Subject: [PATCH 4/8] define bld_info before the try in case of an earlier - exception - ---- - builder/kojid | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/builder/kojid b/builder/kojid -index 32400c6..fa5daca 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -1824,6 +1824,7 @@ class BuildBaseImageTask(BuildImageTask): - raise koji.ApplianceError, 'ImageFactory functions not available' - - # build image(s) -+ bld_info = None - try: - release = opts.get('release') - if not release: -@@ -1832,7 +1833,6 @@ class BuildBaseImageTask(BuildImageTask): - raise koji.ApplianceError('The Version may not have a hyphen') - if '-' in release: - raise koji.ApplianceError('The Release may not have a hyphen') -- bld_info = None - if not opts.get('scratch'): - bld_info = self.initImageBuild(name, version, release, - target_info, opts) --- -2.0.4 - diff --git a/0005-put-ova-options-in-its-own-section.patch b/0005-put-ova-options-in-its-own-section.patch deleted file mode 100644 index 64f9e78..0000000 --- a/0005-put-ova-options-in-its-own-section.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 20bb3e15265499d129cb85b6cd41a8724e037082 Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Wed, 16 Apr 2014 14:00:17 -0400 -Subject: [PATCH 5/8] put ova options in its own section - ---- - cli/koji | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/cli/koji b/cli/koji -index 088c505..504b4ba 100755 ---- a/cli/koji -+++ b/cli/koji -@@ -5074,14 +5074,17 @@ def handle_image_build(options, session, args): - if config.has_option(section, arg): - setattr(task_options, arg, config.get(section, arg).split(',')) - config.remove_option(section, arg) -- # ova_option is newline separated, handle that -- if config.has_option(section, 'ova_option'): -- task_options.ova_option = \ -- config.get(section, 'ova_option').splitlines() -- config.remove_option(section, 'ova_option') - # handle everything else - for k, v in config.items(section): - setattr(task_options, k, v) -+ -+ # ova-options belong in their own section -+ section = 'ova-options' -+ if config.has_section(section): -+ task_options.ova_option = [] -+ for k, v in config.items(section): -+ task_options.ova_option.append('%s=%s' % (k, v)) -+ - else: - if len(args) < 5: - parser.error(_("At least five arguments are required: a name, " + --- -2.0.4 - diff --git a/0006-use-offline-icicle-generation.patch b/0006-use-offline-icicle-generation.patch deleted file mode 100644 index 10377e4..0000000 --- a/0006-use-offline-icicle-generation.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 61c1737652544150fe962921b9dfd3708e1d256e Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Thu, 17 Apr 2014 18:59:41 -0400 -Subject: [PATCH 6/8] use offline icicle generation - ---- - builder/kojid | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/builder/kojid b/builder/kojid -index fa5daca..4712cc5 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2787,7 +2787,8 @@ class BaseImageTask(OzImageTask): - tlog.setLevel(logging.DEBUG) - tlog.addHandler(fhandler) - images = {} -- params = {'install_script': str(self.ks.handler)} #ks contents -+ params = {'install_script': str(self.ks.handler), -+ 'offline_icicle': True} - random.seed() # necessary to ensure a unique mac address - try: - base = bd.builder_for_base_image(template, parameters=params) --- -2.0.4 - diff --git a/0007-include-multilib-packages-in-repos.patch b/0007-include-multilib-packages-in-repos.patch deleted file mode 100644 index 0603ff7..0000000 --- a/0007-include-multilib-packages-in-repos.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 794abb71b1cd5662354475e2beafbab0f287b409 Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Thu, 17 Apr 2014 19:00:08 -0400 -Subject: [PATCH 7/8] include multilib packages in repos - ---- - builder/mergerepos | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/builder/mergerepos b/builder/mergerepos -index b873ccd..fecbc4b 100755 ---- a/builder/mergerepos -+++ b/builder/mergerepos -@@ -48,6 +48,12 @@ EXPAND_ARCHES = { - 'sh4': ['sh4a'] - } - -+MULTILIB_ARCHES = { -+ 'x86_64': 'i386', -+ 'ppc64': 'ppc', -+ 's390x': 's390' -+ } -+ - def parse_args(args): - """Parse our opts/args""" - usage = """ -@@ -78,6 +84,14 @@ def parse_args(args): - if EXPAND_ARCHES.has_key(arch): - opts.arches.extend(EXPAND_ARCHES[arch]) - -+ # support multilib repos -+ for arch in opts.arches[:]: -+ multilib_arch = MULTILIB_ARCHES.get(arch) -+ if multilib_arch: -+ opts.arches.append(multilib_arch) -+ if multilib_arch in EXPAND_ARCHES: -+ opts.arches.extend(EXPAND_ARCHES[multilib_arch]) -+ - # always include noarch - if not 'noarch' in opts.arches: - opts.arches.append('noarch') --- -2.0.4 - diff --git a/0008-bump-install-timeout-to-2-hours.patch b/0008-bump-install-timeout-to-2-hours.patch deleted file mode 100644 index c4387cd..0000000 --- a/0008-bump-install-timeout-to-2-hours.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1fbbf825ab7962e68d0059ab86b0955312997035 Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Thu, 8 May 2014 11:34:51 -0400 -Subject: [PATCH 8/8] bump install timeout to 2 hours - ---- - builder/kojid | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/builder/kojid b/builder/kojid -index 4712cc5..90ff2bd 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2608,7 +2608,7 @@ class OzImageTask(BaseTaskHandler): - 'imgdir': os.path.join(self.workdir, 'scratch_images'), - 'tmpdir': os.path.join(self.workdir, 'oz-tmp'), - 'verbose' : True, -- 'timeout': 3600, -+ 'timeout': 7200, - 'output': 'log', - 'raw': False, - 'debug': True, --- -2.0.4 - diff --git a/compress-docker.patch b/compress-docker.patch deleted file mode 100644 index d57f715..0000000 --- a/compress-docker.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 073bdb69e73e8943f3fb031f56b3d3ca66412edc Mon Sep 17 00:00:00 2001 -From: Jay Greguske -Date: Tue, 15 Apr 2014 14:45:40 -0400 -Subject: compress docker tarball properly - - -diff --git a/builder/kojid b/builder/kojid -index 1691a54..cee7637 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2824,7 +2824,8 @@ class BaseImageTask(OzImageTask): - - # target-image type images - if 'docker' in self.formats: -- targ = do_target_image(base.base_image.identifier, 'docker') -+ targ = do_target_image(base.base_image.identifier, 'docker', -+ ova_opts={'compress': 'gzip'}) - images['docker'] = {'image': targ.target_image.data} - - ova_opts = {} --- -cgit v0.10.2 - - diff --git a/koji.spec b/koji.spec index 7ef3e63..cb217a8 100644 --- a/koji.spec +++ b/koji.spec @@ -2,27 +2,13 @@ Name: koji Version: 1.9.0 -Release: 9%{?dist} +Release: 10%{?dist}.gitcd45e886 License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System URL: https://fedorahosted.org/koji Patch0: fedora-config.patch -Patch1: 0001-move-workdir-from-tmp-koji-to-var-tmp-koji.patch -Patch2: 0001-fix-distro-behavior-for-rhel-5.patch -Patch3: 0002-compress-docker-tarball-properly.patch -Patch4: 0003-upload-the-tdl-priority-to-building.patch -Patch5: 0004-define-bld_info-before-the-try-in-case-of-an-earlier.patch -Patch6: 0005-put-ova-options-in-its-own-section.patch -Patch7: 0006-use-offline-icicle-generation.patch -Patch8: 0007-include-multilib-packages-in-repos.patch -Patch9: 0008-bump-install-timeout-to-2-hours.patch -Patch10: 0001-refactor-image-build-handlers-in-kojid.patch -Patch11: 0002-refactor-do_images.patch -Patch12: 0003-add-raw-xz-option.patch -Patch13: 0001-correctly-call-pykickstarts-makeVersion.patch -Patch14: 0001-use-TLSv1.-https-bugzilla.redhat.com-show_bug.cgi-id.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -136,20 +122,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b .orig -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 %build @@ -253,6 +225,9 @@ if [ $1 = 0 ]; then fi %changelog +* Tue Jan 27 2015 Dennis Gilmore - 1.9.0-10.gitcd45e886 +- update to git tarball + * Thu Dec 11 2014 Dennis Gilmore - 1.9.0-9 - add upstream patch switching to TLS1 from sslv3 diff --git a/sources b/sources index 5c7d3c4..708542e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0ce900022f67324858551622f9f75c73 koji-1.9.0.tar.bz2 +b6596198479fbf4923ea428b013cb1d1 koji-1.9.0.tar.bz2 From c63d3f5815c461cc7aa0989970441eec1cc2fd24 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 27 Jan 2015 23:11:22 -0600 Subject: [PATCH 054/202] make sure the runroot plugin config is packaged --- koji.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/koji.spec b/koji.spec index cb217a8..badd177 100644 --- a/koji.spec +++ b/koji.spec @@ -153,6 +153,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{_sysconfdir}/koji-hub/plugins/ %config(noreplace) %{_sysconfdir}/koji-hub/plugins/messagebus.conf %config(noreplace) %{_sysconfdir}/koji-hub/plugins/rpm2maven.conf +%config(noreplace) %{_sysconfdir}/koji-hub/plugins/runroot.conf %files utils %defattr(-,root,root) From b9bf59abb54a71e9d1f63f81aa350c3b4120a639 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 23 Apr 2015 21:50:09 -0500 Subject: [PATCH 055/202] update to latest git --- koji.spec | 10 ++++++++-- sources | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/koji.spec b/koji.spec index badd177..1f17681 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.9.0 -Release: 10%{?dist}.gitcd45e886 +Release: 11%{?dist}.20150423git52a0188 License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -136,7 +136,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_bindir}/* %{python_sitelib}/%{name} -%config(noreplace) %{_sysconfdir}/koji.conf +%config(noreplace) %{i_sysconfdir}/koji.conf +%dir %{_sysconfdir}/koji.conf.d %doc docs Authors COPYING LGPL %files hub @@ -145,6 +146,7 @@ rm -rf $RPM_BUILD_ROOT %{_libexecdir}/koji-hub/ %config(noreplace) %{_sysconfdir}/httpd/conf.d/kojihub.conf %config(noreplace) %{_sysconfdir}/koji-hub/hub.conf +%dir %{_sysconfdir}/koji-hub/hub.conf.d %files hub-plugins %defattr(-,root,root) @@ -174,6 +176,7 @@ rm -rf $RPM_BUILD_ROOT %{_sysconfdir}/kojiweb %config(noreplace) %{_sysconfdir}/httpd/conf.d/kojiweb.conf %config(noreplace) %{_sysconfdir}/kojiweb/web.conf +i%dir %{_sysconfdir}/kojiweb/web.conf.d %files builder %defattr(-,root,root) @@ -226,6 +229,9 @@ if [ $1 = 0 ]; then fi %changelog +* Thu Apr 23 2015 Dennis Gilmore - 1.9.0-11.20150423git52a0188 +- update to latest git + * Tue Jan 27 2015 Dennis Gilmore - 1.9.0-10.gitcd45e886 - update to git tarball diff --git a/sources b/sources index 708542e..6a5ef08 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b6596198479fbf4923ea428b013cb1d1 koji-1.9.0.tar.bz2 +2b4eaf2034d7244e29da2d3fd0d05cb5 koji-1.9.0.tar.bz2 From 145ea76262c428666b1fd07796687fb79add7d93 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 23 Apr 2015 21:59:35 -0500 Subject: [PATCH 056/202] fixup typo --- koji.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 1f17681..076afb4 100644 --- a/koji.spec +++ b/koji.spec @@ -176,7 +176,7 @@ rm -rf $RPM_BUILD_ROOT %{_sysconfdir}/kojiweb %config(noreplace) %{_sysconfdir}/httpd/conf.d/kojiweb.conf %config(noreplace) %{_sysconfdir}/kojiweb/web.conf -i%dir %{_sysconfdir}/kojiweb/web.conf.d +%dir %{_sysconfdir}/kojiweb/web.conf.d %files builder %defattr(-,root,root) From e5b36871bbb3f33a6b0f74fc372f18dd7080f51c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 23 Apr 2015 22:03:19 -0500 Subject: [PATCH 057/202] fix up extra typo --- koji.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 076afb4..f68bd2d 100644 --- a/koji.spec +++ b/koji.spec @@ -136,7 +136,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_bindir}/* %{python_sitelib}/%{name} -%config(noreplace) %{i_sysconfdir}/koji.conf +%config(noreplace) %{_sysconfdir}/koji.conf %dir %{_sysconfdir}/koji.conf.d %doc docs Authors COPYING LGPL From c45317bf768b7468ff4dc9ab2755e1d7ef7cddec Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 13:33:09 +0000 Subject: [PATCH 058/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index f68bd2d..ac0a91f 100644 --- a/koji.spec +++ b/koji.spec @@ -2,7 +2,7 @@ Name: koji Version: 1.9.0 -Release: 11%{?dist}.20150423git52a0188 +Release: 12%{?dist}.20150423git52a0188 License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -229,6 +229,9 @@ if [ $1 = 0 ]; then fi %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 1.9.0-12.20150423git52a0188 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu Apr 23 2015 Dennis Gilmore - 1.9.0-11.20150423git52a0188 - update to latest git From 7f8d61dcefdf44293f0aaacaa09fa34337c0f516 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 6 Jul 2015 15:03:35 -0500 Subject: [PATCH 059/202] update the git snapshot to latest head - enable systemd units for f23 up Signed-off-by: Dennis Gilmore --- koji.spec | 144 ++++++++++++++++++++++++++++++++++++++++++++---------- sources | 2 +- 2 files changed, 118 insertions(+), 28 deletions(-) diff --git a/koji.spec b/koji.spec index ac0a91f..676c945 100644 --- a/koji.spec +++ b/koji.spec @@ -1,8 +1,15 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%if 0%{?fedora} >= 23 || 0%{?redhat} >= 7 +%global use_systemd 1 +%else +%global use_systemd 0 +%global install_opt TYPE=sysv +%endif + Name: koji Version: 1.9.0 -Release: 12%{?dist}.20150423git52a0188 +Release: 13%{?dist}.20150607gitf426fdb License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -11,13 +18,16 @@ URL: https://fedorahosted.org/koji Patch0: fedora-config.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: python-krbV >= 1.0.13 Requires: rpm-python Requires: pyOpenSSL Requires: python-urlgrabber BuildRequires: python +%if %{use_systemd} +BuildRequires: systemd +BuildRequires: pkgconfig +%endif %description Koji is a system for building and tracking RPMS. The base package @@ -39,8 +49,14 @@ koji-hub is the XMLRPC interface to the koji database %package hub-plugins Summary: Koji hub plugins Group: Applications/Internet +License: LGPLv2 Requires: %{name} = %{version}-%{release} Requires: %{name}-hub = %{version}-%{release} +Requires: python-qpid >= 0.7 +%if 0%{?rhel} == 5 +Requires: python-ssl +%endif +Requires: cpio %description hub-plugins Plugins to the koji XMLRPC interface @@ -52,26 +68,28 @@ License: LGPLv2 and GPLv2+ #mergerepos (from createrepo) is GPLv2+ Requires: %{name} = %{version}-%{release} Requires: mock >= 0.9.14 +Requires(pre): /usr/sbin/useradd +%if %{use_systemd} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%else Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service -Requires(pre): /usr/sbin/useradd +%endif Requires: /usr/bin/cvs Requires: /usr/bin/svn Requires: /usr/bin/git -Requires: rpm-build -Requires: redhat-rpm-config -Requires: pykickstart -Requires: pycdio Requires: python-cheetah -%if 0%{?fedora} || 0%{?rhel} > 5 -Requires: createrepo >= 0.9.6 -%endif %if 0%{?rhel} == 5 -Requires: python-createrepo >= 0.9.6 +Requires: createrepo >= 0.4.11-2 Requires: python-hashlib -Requires: createrepo +Requires: python-createrepo +%endif +%if 0%{?fedora} >= 9 +Requires: createrepo >= 0.9.2 %endif %description builder @@ -83,10 +101,16 @@ Summary: Koji virtual machine management daemon Group: Applications/System License: LGPLv2 Requires: %{name} = %{version}-%{release} +%if %{use_systemd} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%else Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service +%endif Requires: libvirt-python Requires: libxml2-python Requires: /usr/bin/virt-clone @@ -99,8 +123,14 @@ virtual machine. This package is not required for most installations. %package utils Summary: Koji Utilities Group: Applications/Internet +License: LGPLv2 Requires: postgresql-python Requires: %{name} = %{version}-%{release} +%if %{use_systemd} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%endif %description utils Utilities for the Koji system @@ -108,6 +138,7 @@ Utilities for the Koji system %package web Summary: Koji Web UI Group: Applications/Internet +License: LGPLv2 Requires: httpd Requires: mod_wsgi Requires: mod_auth_kerb @@ -121,13 +152,13 @@ koji-web is a web UI to the Koji system. %prep %setup -q -%patch0 -p1 -b .orig +%patch0 -p1 -b orig %build %install rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install +make DESTDIR=$RPM_BUILD_ROOT %{?install_opt} install %clean rm -rf $RPM_BUILD_ROOT @@ -143,8 +174,10 @@ rm -rf $RPM_BUILD_ROOT %files hub %defattr(-,root,root) %{_datadir}/koji-hub -%{_libexecdir}/koji-hub/ +%dir %{_libexecdir}/koji-hub +%{_libexecdir}/koji-hub/rpmdiff %config(noreplace) %{_sysconfdir}/httpd/conf.d/kojihub.conf +%dir %{_sysconfdir}/koji-hub %config(noreplace) %{_sysconfdir}/koji-hub/hub.conf %dir %{_sysconfdir}/koji-hub/hub.conf.d @@ -152,64 +185,103 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %dir %{_prefix}/lib/koji-hub-plugins %{_prefix}/lib/koji-hub-plugins/*.py* -%dir %{_sysconfdir}/koji-hub/plugins/ -%config(noreplace) %{_sysconfdir}/koji-hub/plugins/messagebus.conf -%config(noreplace) %{_sysconfdir}/koji-hub/plugins/rpm2maven.conf -%config(noreplace) %{_sysconfdir}/koji-hub/plugins/runroot.conf +%dir %{_sysconfdir}/koji-hub/plugins +%{_sysconfdir}/koji-hub/plugins/*.conf %files utils %defattr(-,root,root) %{_sbindir}/kojira -%{_sbindir}/koji-gc -%{_sbindir}/koji-shadow +%if %{use_systemd} +%{_unitdir}/kojira.service +%else %{_initrddir}/kojira %config(noreplace) %{_sysconfdir}/sysconfig/kojira +%endif %dir %{_sysconfdir}/kojira %config(noreplace) %{_sysconfdir}/kojira/kojira.conf +%{_sbindir}/koji-gc %dir %{_sysconfdir}/koji-gc %config(noreplace) %{_sysconfdir}/koji-gc/koji-gc.conf +%{_sbindir}/koji-shadow +%dir %{_sysconfdir}/koji-shadow %config(noreplace) %{_sysconfdir}/koji-shadow/koji-shadow.conf %files web %defattr(-,root,root) %{_datadir}/koji-web -%{_sysconfdir}/kojiweb -%config(noreplace) %{_sysconfdir}/httpd/conf.d/kojiweb.conf +%dir %{_sysconfdir}/kojiweb %config(noreplace) %{_sysconfdir}/kojiweb/web.conf +%config(noreplace) %{_sysconfdir}/httpd/conf.d/kojiweb.conf %dir %{_sysconfdir}/kojiweb/web.conf.d %files builder %defattr(-,root,root) %{_sbindir}/kojid +%dir %{_libexecdir}/kojid +%{_libexecdir}/kojid/mergerepos +%if %{use_systemd} +%{_unitdir}/kojid.service +%else %{_initrddir}/kojid -%{_libexecdir}/kojid/ %config(noreplace) %{_sysconfdir}/sysconfig/kojid +%endif %dir %{_sysconfdir}/kojid %config(noreplace) %{_sysconfdir}/kojid/kojid.conf -%attr(-,kojibuilder,kojibuilder) /etc/mock/koji +%attr(-,kojibuilder,kojibuilder) %{_sysconfdir}/mock/koji %pre builder /usr/sbin/useradd -r -s /bin/bash -G mock -d /builddir -M kojibuilder 2>/dev/null ||: +%if %{use_systemd} + +%post builder +%systemd_post kojid.service + +%preun builder +%systemd_preun kojid.service + +%postun builder +%systemd_postun kojid.service + +%else + %post builder /sbin/chkconfig --add kojid -/sbin/service kojid condrestart &> /dev/null || : %preun builder if [ $1 = 0 ]; then /sbin/service kojid stop &> /dev/null /sbin/chkconfig --del kojid fi +%endif %files vm %defattr(-,root,root) %{_sbindir}/kojivmd -%{_datadir}/kojivmd +#dir %{_datadir}/kojivmd +%{_datadir}/kojivmd/kojikamid +%if %{use_systemd} +%{_unitdir}/kojivmd.service +%else %{_initrddir}/kojivmd %config(noreplace) %{_sysconfdir}/sysconfig/kojivmd +%endif %dir %{_sysconfdir}/kojivmd %config(noreplace) %{_sysconfdir}/kojivmd/kojivmd.conf +%if %{use_systemd} + +%post vm +%systemd_post kojivmd.service + +%preun vm +%systemd_preun kojivmd.service + +%postun vm +%systemd_postun kojivmd.service + +%else + %post vm /sbin/chkconfig --add kojivmd @@ -218,7 +290,20 @@ if [ $1 = 0 ]; then /sbin/service kojivmd stop &> /dev/null /sbin/chkconfig --del kojivmd fi +%endif + +%if %{use_systemd} + +%post utils +%systemd_post kojira.service + +%preun utils +%systemd_preun kojira.service +%postun utils +%systemd_postun kojira.service + +%else %post utils /sbin/chkconfig --add kojira /sbin/service kojira condrestart &> /dev/null || : @@ -227,8 +312,13 @@ if [ $1 = 0 ]; then /sbin/service kojira stop &> /dev/null || : /sbin/chkconfig --del kojira fi +%endif %changelog +* Mon Jul 06 2015 Dennis Gilmore - 1.9.0-13.20150607gitf426fdb +- update the git snapshot to latest head +- enable systemd units for f23 up + * Wed Jun 17 2015 Fedora Release Engineering - 1.9.0-12.20150423git52a0188 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 6a5ef08..99d0c71 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2b4eaf2034d7244e29da2d3fd0d05cb5 koji-1.9.0.tar.bz2 +26b97027c154ed0fdd8eae04e0933833 koji-1.9.0.tar.bz2 From b009416d58c505dfaef984d659d9b0bd628d1b55 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 16 Jul 2015 16:32:01 -0500 Subject: [PATCH 060/202] update to 1.10.0 release Signed-off-by: Dennis Gilmore --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 726f49a..8887952 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ koji-1.4.0.tar.bz2 /koji-1.7.1.tar.bz2 /koji-1.8.0.tar.bz2 /koji-1.9.0.tar.bz2 +/koji-1.10.0.tar.bz2 diff --git a/koji.spec b/koji.spec index 676c945..62cdd47 100644 --- a/koji.spec +++ b/koji.spec @@ -8,8 +8,8 @@ %endif Name: koji -Version: 1.9.0 -Release: 13%{?dist}.20150607gitf426fdb +Version: 1.10.0 +Release: 1%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -315,6 +315,9 @@ fi %endif %changelog +* Thu Jul 16 2015 Dennis Gilmore - 1.10.0=1 +- update to 1.10.0 release + * Mon Jul 06 2015 Dennis Gilmore - 1.9.0-13.20150607gitf426fdb - update the git snapshot to latest head - enable systemd units for f23 up diff --git a/sources b/sources index 99d0c71..61a2a0e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -26b97027c154ed0fdd8eae04e0933833 koji-1.9.0.tar.bz2 +c947bbdfc507858b03ed6496ab403e41 koji-1.10.0.tar.bz2 From f6bb05f57d4158df6454831b70f6054a6299a5f4 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 24 Sep 2015 18:14:56 +0200 Subject: [PATCH 061/202] Backport two patches to fix ClientSession SSL errors --- ...l-when-detect-cert-expiry-exceptions.patch | 49 +++++++++++++++++++ 0001-Better-catch-SSL-errors.patch | 45 +++++++++++++++++ koji.spec | 10 +++- 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch create mode 100644 0001-Better-catch-SSL-errors.patch diff --git a/0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch b/0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch new file mode 100644 index 0000000..e0e410f --- /dev/null +++ b/0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch @@ -0,0 +1,49 @@ +From 9103bda257e235b26bdbeb9198299cbc13a0d515 Mon Sep 17 00:00:00 2001 +From: Ralph Bean +Date: Sat, 15 Aug 2015 14:35:03 -0400 +Subject: [PATCH] Be more careful when detect cert-expiry exceptions. + +We ran into this in the Fedora koji instance today after an upgrade last night. +The inline comments explain the reasoning +--- + koji/__init__.py | 23 ++++++++++++++++++++++- + 1 file changed, 22 insertions(+), 1 deletion(-) + +diff --git a/koji/__init__.py b/koji/__init__.py +index 81064c3..f45ff70 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -1943,8 +1943,29 @@ class ClientSession(object): + except Exception, e: + self._close_connection() + if isinstance(e, OpenSSL.SSL.Error): ++ # pyOpenSSL doesn't use different exception ++ # subclasses, we have to actually parse the args + for arg in e.args: +- for _, _, ssl_reason in arg: ++ # First, check to see if 'arg' is iterable because ++ # it can be anything.. ++ try: ++ iter(arg) ++ except TypeError: ++ continue ++ ++ # We do all this so that we can detect cert expiry ++ # so we can avoid retrying those over and over. ++ for items in arg: ++ try: ++ iter(items) ++ except TypeError: ++ continue ++ ++ if len(items) != 3: ++ continue ++ ++ _, _, ssl_reason = items ++ + if ('certificate revoked' in ssl_reason or + 'certificate expired' in ssl_reason): + # There's no point in retrying for this +-- +2.5.0 + diff --git a/0001-Better-catch-SSL-errors.patch b/0001-Better-catch-SSL-errors.patch new file mode 100644 index 0000000..c85b4d7 --- /dev/null +++ b/0001-Better-catch-SSL-errors.patch @@ -0,0 +1,45 @@ +From ab0b2e465d0f8ad930f28eb3a49850afb57250c2 Mon Sep 17 00:00:00 2001 +From: Mathieu Bridon +Date: Thu, 23 Jul 2015 10:19:23 +0200 +Subject: [PATCH] Better catch SSL errors + +Commit 4de27c52de80596d256b059a67d10c7ed5e61238 made Koji to not retry +on SSL errors. + +However, it turns out that some SSL errors are transient, and Koji +should still retry for them. + +This commit changes that, so that we are more specific about which SSL +errors should be fatal: expired or revoked certificates. + +https://bugzilla.redhat.com/show_bug.cgi?id=1207178 +--- + koji/__init__.py | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/koji/__init__.py b/koji/__init__.py +index fadbada..e7a66f2 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -1940,11 +1940,15 @@ class ClientSession(object): + except (SystemExit, KeyboardInterrupt): + #(depending on the python version, these may or may not be subclasses of Exception) + raise +- except OpenSSL.SSL.Error as e: +- # There's no point in retrying this +- raise + except Exception, e: + self._close_connection() ++ if isinstance(e, OpenSSL.SSL.Error): ++ for arg in e.args: ++ for _, _, ssl_reason in arg: ++ if ('certificate revoked' in ssl_reason or ++ 'certificate expired' in ssl_reason): ++ # There's no point in retrying for this ++ raise + if not self.logged_in: + #in the past, non-logged-in sessions did not retry. For compatibility purposes + #this behavior is governed by the anon_retry opt. +-- +2.5.0 + diff --git a/koji.spec b/koji.spec index 62cdd47..2307d9f 100644 --- a/koji.spec +++ b/koji.spec @@ -9,13 +9,16 @@ Name: koji Version: 1.10.0 -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: https://fedorahosted.org/koji Patch0: fedora-config.patch +# Backported upstream patches +Patch1: 0001-Better-catch-SSL-errors.patch +Patch2: 0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildArch: noarch @@ -153,6 +156,8 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b orig +%patch1 -p1 +%patch2 -p1 %build @@ -315,6 +320,9 @@ fi %endif %changelog +* Thu Sep 24 2015 Kalev Lember - 1.10.0-2 +- Backport two patches to fix ClientSession SSL errors + * Thu Jul 16 2015 Dennis Gilmore - 1.10.0=1 - update to 1.10.0 release From e4df500e21c8708eaab8a1b64f64a213b45dc873 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 17 Nov 2015 21:56:58 -0600 Subject: [PATCH 062/202] 1.10.1 release Signed-off-by: Dennis Gilmore --- .gitignore | 1 + ...l-when-detect-cert-expiry-exceptions.patch | 49 ------------------- 0001-Better-catch-SSL-errors.patch | 45 ----------------- koji.spec | 18 +++---- sources | 2 +- 5 files changed, 11 insertions(+), 104 deletions(-) delete mode 100644 0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch delete mode 100644 0001-Better-catch-SSL-errors.patch diff --git a/.gitignore b/.gitignore index 8887952..b52e9f4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ koji-1.4.0.tar.bz2 /koji-1.8.0.tar.bz2 /koji-1.9.0.tar.bz2 /koji-1.10.0.tar.bz2 +/koji-1.10.1.tar.bz2 diff --git a/0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch b/0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch deleted file mode 100644 index e0e410f..0000000 --- a/0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9103bda257e235b26bdbeb9198299cbc13a0d515 Mon Sep 17 00:00:00 2001 -From: Ralph Bean -Date: Sat, 15 Aug 2015 14:35:03 -0400 -Subject: [PATCH] Be more careful when detect cert-expiry exceptions. - -We ran into this in the Fedora koji instance today after an upgrade last night. -The inline comments explain the reasoning ---- - koji/__init__.py | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -diff --git a/koji/__init__.py b/koji/__init__.py -index 81064c3..f45ff70 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -1943,8 +1943,29 @@ class ClientSession(object): - except Exception, e: - self._close_connection() - if isinstance(e, OpenSSL.SSL.Error): -+ # pyOpenSSL doesn't use different exception -+ # subclasses, we have to actually parse the args - for arg in e.args: -- for _, _, ssl_reason in arg: -+ # First, check to see if 'arg' is iterable because -+ # it can be anything.. -+ try: -+ iter(arg) -+ except TypeError: -+ continue -+ -+ # We do all this so that we can detect cert expiry -+ # so we can avoid retrying those over and over. -+ for items in arg: -+ try: -+ iter(items) -+ except TypeError: -+ continue -+ -+ if len(items) != 3: -+ continue -+ -+ _, _, ssl_reason = items -+ - if ('certificate revoked' in ssl_reason or - 'certificate expired' in ssl_reason): - # There's no point in retrying for this --- -2.5.0 - diff --git a/0001-Better-catch-SSL-errors.patch b/0001-Better-catch-SSL-errors.patch deleted file mode 100644 index c85b4d7..0000000 --- a/0001-Better-catch-SSL-errors.patch +++ /dev/null @@ -1,45 +0,0 @@ -From ab0b2e465d0f8ad930f28eb3a49850afb57250c2 Mon Sep 17 00:00:00 2001 -From: Mathieu Bridon -Date: Thu, 23 Jul 2015 10:19:23 +0200 -Subject: [PATCH] Better catch SSL errors - -Commit 4de27c52de80596d256b059a67d10c7ed5e61238 made Koji to not retry -on SSL errors. - -However, it turns out that some SSL errors are transient, and Koji -should still retry for them. - -This commit changes that, so that we are more specific about which SSL -errors should be fatal: expired or revoked certificates. - -https://bugzilla.redhat.com/show_bug.cgi?id=1207178 ---- - koji/__init__.py | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/koji/__init__.py b/koji/__init__.py -index fadbada..e7a66f2 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -1940,11 +1940,15 @@ class ClientSession(object): - except (SystemExit, KeyboardInterrupt): - #(depending on the python version, these may or may not be subclasses of Exception) - raise -- except OpenSSL.SSL.Error as e: -- # There's no point in retrying this -- raise - except Exception, e: - self._close_connection() -+ if isinstance(e, OpenSSL.SSL.Error): -+ for arg in e.args: -+ for _, _, ssl_reason in arg: -+ if ('certificate revoked' in ssl_reason or -+ 'certificate expired' in ssl_reason): -+ # There's no point in retrying for this -+ raise - if not self.logged_in: - #in the past, non-logged-in sessions did not retry. For compatibility purposes - #this behavior is governed by the anon_retry opt. --- -2.5.0 - diff --git a/koji.spec b/koji.spec index 2307d9f..00860d4 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%if 0%{?fedora} >= 23 || 0%{?redhat} >= 7 +%if 0%{?fedora} >= 23 || 0%{?rhel} >= 7 %global use_systemd 1 %else %global use_systemd 0 @@ -8,17 +8,14 @@ %endif Name: koji -Version: 1.10.0 -Release: 2%{?dist} +Version: 1.10.1 +Release: 1%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System URL: https://fedorahosted.org/koji Patch0: fedora-config.patch -# Backported upstream patches -Patch1: 0001-Better-catch-SSL-errors.patch -Patch2: 0001-Be-more-careful-when-detect-cert-expiry-exceptions.patch Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 BuildArch: noarch @@ -26,6 +23,7 @@ Requires: python-krbV >= 1.0.13 Requires: rpm-python Requires: pyOpenSSL Requires: python-urlgrabber +Requires: yum BuildRequires: python %if %{use_systemd} BuildRequires: systemd @@ -91,7 +89,7 @@ Requires: createrepo >= 0.4.11-2 Requires: python-hashlib Requires: python-createrepo %endif -%if 0%{?fedora} >= 9 +%if 0%{?fedora} >= 9 or 0%{?rhel} >= 5 Requires: createrepo >= 0.9.2 %endif @@ -156,8 +154,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b orig -%patch1 -p1 -%patch2 -p1 %build @@ -320,6 +316,10 @@ fi %endif %changelog +* Tue Nov 17 2015 Dennis Gilmore - 1.10.1-1 +- update to 1.10.1 +- Requires yum in the cli rhbz#1230888 + * Thu Sep 24 2015 Kalev Lember - 1.10.0-2 - Backport two patches to fix ClientSession SSL errors diff --git a/sources b/sources index 61a2a0e..a6b234c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c947bbdfc507858b03ed6496ab403e41 koji-1.10.0.tar.bz2 +55768668dc963512801540957ac1d084 koji-1.10.1.tar.bz2 From f54a8ca73695df6204a61831af4cbddf28420549 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 17 Nov 2015 21:58:22 -0600 Subject: [PATCH 063/202] fix up or syntax Signed-off-by: Dennis Gilmore --- koji.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 00860d4..5230291 100644 --- a/koji.spec +++ b/koji.spec @@ -89,7 +89,7 @@ Requires: createrepo >= 0.4.11-2 Requires: python-hashlib Requires: python-createrepo %endif -%if 0%{?fedora} >= 9 or 0%{?rhel} >= 5 +%if 0%{?fedora} >= 9 || 0%{?rhel} >= 5 Requires: createrepo >= 0.9.2 %endif From af2a5cc9a59ce0b62e630d71f9b6db5c3a68e2ba Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 4 Feb 2016 02:20:08 +0000 Subject: [PATCH 064/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 5230291..7f99860 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.10.1 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -316,6 +316,9 @@ fi %endif %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 1.10.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Tue Nov 17 2015 Dennis Gilmore - 1.10.1-1 - update to 1.10.1 - Requires yum in the cli rhbz#1230888 From 79aa943c3d1d01b61bdd9096e8412c7662ac00f5 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 1 Mar 2016 16:59:02 -0600 Subject: [PATCH 065/202] update to git e8201aac8294e6125a73504886b0800041b58868 - https://pagure.io/fork/ausil/koji/branch/fedora-infra Signed-off-by: Dennis Gilmore --- fedora-config.patch | 20 +++++++++++--------- koji.spec | 10 +++++++--- sources | 2 +- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/fedora-config.patch b/fedora-config.patch index 538aed9..04af105 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,6 +1,7 @@ ---- koji-1.7.0/cli/koji.conf.orig 2012-05-31 14:05:43.000000000 -0500 -+++ koji-1.7.0/cli/koji.conf 2012-06-01 10:50:12.000000000 -0500 -@@ -3,13 +3,13 @@ +diff -uNr koji-1.10.1.orig/cli/koji.conf koji-1.10.1/cli/koji.conf +--- koji-1.10.1.orig/cli/koji.conf 2016-03-01 16:43:15.000000000 -0600 ++++ koji-1.10.1/cli/koji.conf 2016-03-01 16:57:55.875274789 -0600 +@@ -3,26 +3,23 @@ ;configuration for koji cli tool ;url of XMLRPC server @@ -17,18 +18,19 @@ ;path to the koji top directory ;topdir = /mnt/koji -@@ -22,10 +22,11 @@ + +-;configuration for Kerberos authentication +- +-;the service name of the principal being used by the hub +-;krbservice = host ++anon_retry = true + ;configuration for SSL authentication ;client certificate -;cert = ~/.koji/client.crt +cert = ~/.fedora.cert - ;certificate of the CA that issued the client certificate --;ca = ~/.koji/clientca.crt -+ca = ~/.fedora-server-ca.cert - ;certificate of the CA that issued the HTTP server certificate -;serverca = ~/.koji/serverca.crt +serverca = ~/.fedora-server-ca.cert -+ diff --git a/koji.spec b/koji.spec index 7f99860..fdc32d1 100644 --- a/koji.spec +++ b/koji.spec @@ -9,15 +9,15 @@ Name: koji Version: 1.10.1 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System -URL: https://fedorahosted.org/koji +URL: https://pagure.io/fork/ausil/koji/branch/fedora-infra Patch0: fedora-config.patch -Source: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2 +Source: koji-%{version}.tar.bz2 BuildArch: noarch Requires: python-krbV >= 1.0.13 Requires: rpm-python @@ -316,6 +316,10 @@ fi %endif %changelog +* Tue Mar 01 2016 Dennis Gilmore - 1.10.1-3 +- update to git e8201aac8294e6125a73504886b0800041b58868 +- https://pagure.io/fork/ausil/koji/branch/fedora-infra + * Thu Feb 04 2016 Fedora Release Engineering - 1.10.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index a6b234c..999ad30 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -55768668dc963512801540957ac1d084 koji-1.10.1.tar.bz2 +ca713835d5465eff1d3ab2e4847a702d koji-1.10.1.tar.bz2 From ab48e7103cd1feee40c85232475b8319b7f21e5b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 3 Mar 2016 18:17:43 -0600 Subject: [PATCH 066/202] add a patch to install teh runroot builder plugin in the correct place Signed-off-by: Dennis Gilmore --- ...he-builder-runroot-plugin-and-config.patch | 46 +++++++++++++++++++ koji.spec | 11 ++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 0001-install-the-builder-runroot-plugin-and-config.patch diff --git a/0001-install-the-builder-runroot-plugin-and-config.patch b/0001-install-the-builder-runroot-plugin-and-config.patch new file mode 100644 index 0000000..9083346 --- /dev/null +++ b/0001-install-the-builder-runroot-plugin-and-config.patch @@ -0,0 +1,46 @@ +From 565818a5adc55389d14ed2096f82ebce8c8fc2de Mon Sep 17 00:00:00 2001 +From: Dennis Gilmore +Date: Thu, 3 Mar 2016 18:03:18 -0600 +Subject: [PATCH] install the builder runroot plugin and config + +make the builder plugin directory +install the runroot.py plugin there +install the runroot.conf file in /etc/kojid/ + +Signed-off-by: Dennis Gilmore +--- + plugins/Makefile | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/plugins/Makefile b/plugins/Makefile +index 0bbf748..2e8b519 100644 +--- a/plugins/Makefile ++++ b/plugins/Makefile +@@ -1,8 +1,12 @@ + PYTHON=python + PLUGINDIR = /usr/lib/koji-hub-plugins ++BUILDERPLUGINDIR = /usr/lib/koji-builder-plugins + FILES = $(wildcard *.py) ++BUILDERFILES = runroot.py + CONFDIR = /etc/koji-hub/plugins ++BUILDERCONFDIR = /etc/kojid + CONFFILES = $(wildcard *.conf) ++BUILDERCONFFILES = runroot.conf + + _default: + @echo "nothing to make. try make install" +@@ -18,7 +22,11 @@ install: + fi + + mkdir -p $(DESTDIR)/$(PLUGINDIR) ++ mkdir -p $(DESTDIR)/$(BUILDERPLUGINDIR) + install -p -m 644 $(FILES) $(DESTDIR)/$(PLUGINDIR) ++ install -p -m 644 $(BUILDERFILES) $(DESTDIR)/$(BUILDERPLUGINDIR) + $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(PLUGINDIR)', 1, '$(PLUGINDIR)', 1)" ++ $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(BUILDERPLUGINDIR)', 1, '$(BUILDERPLUGINDIR)', 1)" + mkdir -p $(DESTDIR)/$(CONFDIR) + install -p -m 644 $(CONFFILES) $(DESTDIR)/$(CONFDIR) ++ install -p -m 644 $(BUILDERCONFFILES) $(DESTDIR)/$(BUILDERCONFDIR) +-- +2.5.0 + diff --git a/koji.spec b/koji.spec index fdc32d1..8d80f77 100644 --- a/koji.spec +++ b/koji.spec @@ -9,13 +9,14 @@ Name: koji Version: 1.10.1 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System URL: https://pagure.io/fork/ausil/koji/branch/fedora-infra Patch0: fedora-config.patch +Patch1: 0001-install-the-builder-runroot-plugin-and-config.patch Source: koji-%{version}.tar.bz2 BuildArch: noarch @@ -154,6 +155,7 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b orig +%patch1 -p1 -b runroot %build @@ -220,6 +222,9 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/kojid %dir %{_libexecdir}/kojid %{_libexecdir}/kojid/mergerepos +%defattr(-,root,root) +%dir %{_prefix}/lib/koji-builder-plugins +%{_prefix}/lib/koji-builder-plugins/*.py* %if %{use_systemd} %{_unitdir}/kojid.service %else @@ -228,6 +233,7 @@ rm -rf $RPM_BUILD_ROOT %endif %dir %{_sysconfdir}/kojid %config(noreplace) %{_sysconfdir}/kojid/kojid.conf +%config(noreplace) %{_sysconfdir}/kojid/runroot.conf %attr(-,kojibuilder,kojibuilder) %{_sysconfdir}/mock/koji %pre builder @@ -316,6 +322,9 @@ fi %endif %changelog +* Thu Mar 03 2016 Dennis Gilmore - 1.10.1-4 +- add a patch to install teh runroot builder plugin in the correct place + * Tue Mar 01 2016 Dennis Gilmore - 1.10.1-3 - update to git e8201aac8294e6125a73504886b0800041b58868 - https://pagure.io/fork/ausil/koji/branch/fedora-infra From dcd6f55ca95aed1228d05b594c9bb2ee10d77ac4 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 6 Apr 2016 15:53:38 -0500 Subject: [PATCH 067/202] enable dns in runroots - add koji signed repo support - Run plugin callbacks when image builds finish Signed-off-by: Dennis Gilmore --- ...he-builder-runroot-plugin-and-config.patch | 46 ------------------- koji.spec | 11 +++-- sources | 2 +- 3 files changed, 8 insertions(+), 51 deletions(-) delete mode 100644 0001-install-the-builder-runroot-plugin-and-config.patch diff --git a/0001-install-the-builder-runroot-plugin-and-config.patch b/0001-install-the-builder-runroot-plugin-and-config.patch deleted file mode 100644 index 9083346..0000000 --- a/0001-install-the-builder-runroot-plugin-and-config.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 565818a5adc55389d14ed2096f82ebce8c8fc2de Mon Sep 17 00:00:00 2001 -From: Dennis Gilmore -Date: Thu, 3 Mar 2016 18:03:18 -0600 -Subject: [PATCH] install the builder runroot plugin and config - -make the builder plugin directory -install the runroot.py plugin there -install the runroot.conf file in /etc/kojid/ - -Signed-off-by: Dennis Gilmore ---- - plugins/Makefile | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/plugins/Makefile b/plugins/Makefile -index 0bbf748..2e8b519 100644 ---- a/plugins/Makefile -+++ b/plugins/Makefile -@@ -1,8 +1,12 @@ - PYTHON=python - PLUGINDIR = /usr/lib/koji-hub-plugins -+BUILDERPLUGINDIR = /usr/lib/koji-builder-plugins - FILES = $(wildcard *.py) -+BUILDERFILES = runroot.py - CONFDIR = /etc/koji-hub/plugins -+BUILDERCONFDIR = /etc/kojid - CONFFILES = $(wildcard *.conf) -+BUILDERCONFFILES = runroot.conf - - _default: - @echo "nothing to make. try make install" -@@ -18,7 +22,11 @@ install: - fi - - mkdir -p $(DESTDIR)/$(PLUGINDIR) -+ mkdir -p $(DESTDIR)/$(BUILDERPLUGINDIR) - install -p -m 644 $(FILES) $(DESTDIR)/$(PLUGINDIR) -+ install -p -m 644 $(BUILDERFILES) $(DESTDIR)/$(BUILDERPLUGINDIR) - $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(PLUGINDIR)', 1, '$(PLUGINDIR)', 1)" -+ $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(BUILDERPLUGINDIR)', 1, '$(BUILDERPLUGINDIR)', 1)" - mkdir -p $(DESTDIR)/$(CONFDIR) - install -p -m 644 $(CONFFILES) $(DESTDIR)/$(CONFDIR) -+ install -p -m 644 $(BUILDERCONFFILES) $(DESTDIR)/$(BUILDERCONFDIR) --- -2.5.0 - diff --git a/koji.spec b/koji.spec index 8d80f77..e5d17c9 100644 --- a/koji.spec +++ b/koji.spec @@ -9,14 +9,13 @@ Name: koji Version: 1.10.1 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System URL: https://pagure.io/fork/ausil/koji/branch/fedora-infra Patch0: fedora-config.patch -Patch1: 0001-install-the-builder-runroot-plugin-and-config.patch Source: koji-%{version}.tar.bz2 BuildArch: noarch @@ -155,7 +154,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b orig -%patch1 -p1 -b runroot %build @@ -322,8 +320,13 @@ fi %endif %changelog +* Wed Apr 06 2016 Dennis Gilmore - 1.10.1-5 +- enable dns in runroots +- add koji signed repo support +- Run plugin callbacks when image builds finish + * Thu Mar 03 2016 Dennis Gilmore - 1.10.1-4 -- add a patch to install teh runroot builder plugin in the correct place +- add a patch to install the runroot builder plugin in the correct place * Tue Mar 01 2016 Dennis Gilmore - 1.10.1-3 - update to git e8201aac8294e6125a73504886b0800041b58868 diff --git a/sources b/sources index 999ad30..7dead30 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ca713835d5465eff1d3ab2e4847a702d koji-1.10.1.tar.bz2 +1f29a44987df841df20d4286853c2a92 koji-1.10.1.tar.bz2 From 4a6cde6732da4d6f7d6e26623e3110b7af773cb1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 6 Apr 2016 17:11:35 -0500 Subject: [PATCH 068/202] add --product to livemedia-creator calls rhbz#1315110 Signed-off-by: Dennis Gilmore --- koji.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index e5d17c9..341c9a5 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.10.1 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -320,6 +320,9 @@ fi %endif %changelog +* Wed Apr 06 2016 Dennis Gilmore - 1.10.1-6 +- add --product to livemedia-creator calls rhbz#1315110 + * Wed Apr 06 2016 Dennis Gilmore - 1.10.1-5 - enable dns in runroots - add koji signed repo support diff --git a/sources b/sources index 7dead30..158a182 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1f29a44987df841df20d4286853c2a92 koji-1.10.1.tar.bz2 +655a4c1451f45f7ad569beb468410b9f koji-1.10.1.tar.bz2 From eeaf5f4d0f9e6a350dbffca27360ba2b8b856f8b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 7 Apr 2016 11:22:24 -0500 Subject: [PATCH 069/202] product had to be --project - add missing Requires for koji-builder on python2-multilib Signed-off-by: Dennis Gilmore --- koji.spec | 7 ++++++- sources | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 341c9a5..0081014 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.10.1 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -69,6 +69,7 @@ License: LGPLv2 and GPLv2+ #mergerepos (from createrepo) is GPLv2+ Requires: %{name} = %{version}-%{release} Requires: mock >= 0.9.14 +Requires: python2-multilib Requires(pre): /usr/sbin/useradd %if %{use_systemd} Requires(post): systemd @@ -320,6 +321,10 @@ fi %endif %changelog +* Thu Apr 07 2016 Dennis Gilmore - 1.10.1-7 +- --product had to be --project +- add missing Requires for koji-builder on python2-multilib + * Wed Apr 06 2016 Dennis Gilmore - 1.10.1-6 - add --product to livemedia-creator calls rhbz#1315110 diff --git a/sources b/sources index 158a182..97abf9e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -655a4c1451f45f7ad569beb468410b9f koji-1.10.1.tar.bz2 +01cc855246dd52dc56f2c4744db8a43f koji-1.10.1.tar.bz2 From d398a7b2368979d9da0d68360bb8e464ae37dbad Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 8 Apr 2016 10:09:31 -0500 Subject: [PATCH 070/202] do not remove the - for project on livemedia - fix the sending of messages on image completion Signed-off-by: Dennis Gilmore --- koji.spec | 6 +++++- sources | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 0081014..319112d 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.10.1 -Release: 7%{?dist} +Release: 8%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -321,6 +321,10 @@ fi %endif %changelog +* Fri Apr 08 2016 Dennis Gilmore - 1.10.1-8 +- do not remove the - for project on livemedia +- fix the sending of messages on image completion + * Thu Apr 07 2016 Dennis Gilmore - 1.10.1-7 - --product had to be --project - add missing Requires for koji-builder on python2-multilib diff --git a/sources b/sources index 97abf9e..9826c5e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -01cc855246dd52dc56f2c4744db8a43f koji-1.10.1.tar.bz2 +d48320d8cdcf67b8cbd6ef8af95d5d0e koji-1.10.1.tar.bz2 From 1f0e62e71c69c874e588a239dff90a737e9da0ae Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 24 May 2016 21:38:30 -0500 Subject: [PATCH 071/202] update to git master upstream, add lmc cosmetic fixes - add patch to disable login in koji-web Signed-off-by: Dennis Gilmore --- koji.spec | 7 ++++++- sources | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 319112d..c5fac0c 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.10.1 -Release: 8%{?dist} +Release: 9%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -85,6 +85,7 @@ Requires: /usr/bin/cvs Requires: /usr/bin/svn Requires: /usr/bin/git Requires: python-cheetah +Requires: squashfs-tools %if 0%{?rhel} == 5 Requires: createrepo >= 0.4.11-2 Requires: python-hashlib @@ -321,6 +322,10 @@ fi %endif %changelog +* Tue May 24 2016 Dennis Gilmore - 1.10.1-9 +- update to git master upstream, add lmc cosmetic fixes +- add patch to disable login in koji-web + * Fri Apr 08 2016 Dennis Gilmore - 1.10.1-8 - do not remove the - for project on livemedia - fix the sending of messages on image completion diff --git a/sources b/sources index 9826c5e..8457676 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d48320d8cdcf67b8cbd6ef8af95d5d0e koji-1.10.1.tar.bz2 +b510184795567585a1cf3ef98e586b9c koji-1.10.1.tar.bz2 From c21ae3594c99601f8ac5b71e2e242a89631635ec Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 24 May 2016 21:58:45 -0500 Subject: [PATCH 072/202] fix up for moved files and missing BR Signed-off-by: Dennis Gilmore --- koji.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index c5fac0c..6041a0b 100644 --- a/koji.spec +++ b/koji.spec @@ -25,6 +25,7 @@ Requires: pyOpenSSL Requires: python-urlgrabber Requires: yum BuildRequires: python +BuildRequires: python-sphinx %if %{use_systemd} BuildRequires: systemd BuildRequires: pkgconfig @@ -232,8 +233,9 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/sysconfig/kojid %endif %dir %{_sysconfdir}/kojid +%dir %{_sysconfdir}/kojid/plugins %config(noreplace) %{_sysconfdir}/kojid/kojid.conf -%config(noreplace) %{_sysconfdir}/kojid/runroot.conf +%config(noreplace) %{_sysconfdir}/kojid/plugins/runroot.conf %attr(-,kojibuilder,kojibuilder) %{_sysconfdir}/mock/koji %pre builder From e02952910809f058b4713679b904a5b9cc3d1950 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 26 May 2016 15:46:51 -0500 Subject: [PATCH 073/202] add patch to enable dns in runroot chroots Signed-off-by: Dennis Gilmore --- ...le-dns-to-work-in-runroot-buildroots.patch | 29 +++++++++++++++++++ koji.spec | 7 ++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0001-enable-dns-to-work-in-runroot-buildroots.patch diff --git a/0001-enable-dns-to-work-in-runroot-buildroots.patch b/0001-enable-dns-to-work-in-runroot-buildroots.patch new file mode 100644 index 0000000..e2152c7 --- /dev/null +++ b/0001-enable-dns-to-work-in-runroot-buildroots.patch @@ -0,0 +1,29 @@ +From 6e224af9a8610f37898859d25efa7188e9f008e0 Mon Sep 17 00:00:00 2001 +From: Dennis Gilmore +Date: Wed, 6 Apr 2016 15:00:13 -0500 +Subject: [PATCH] enable dns to work in runroot buildroots + +Signed-off-by: Dennis Gilmore +--- + plugins/builder/runroot.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/builder/runroot.py b/plugins/builder/runroot.py +index b303890..7bf40e4 100644 +--- a/plugins/builder/runroot.py ++++ b/plugins/builder/runroot.py +@@ -152,9 +152,9 @@ class RunRootTask(tasks.BaseTaskHandler): + parent=self.id) + repo_info = self.wait(task_id)[task_id] + if compat_mode: +- broot = BuildRoot(root, br_arch, self.id, repo_id=repo_info['id']) ++ broot = BuildRoot(root, br_arch, self.id, repo_id=repo_info['id'], setup_dns=True) + else: +- broot = BuildRoot(self.session, self.options, root, br_arch, self.id, repo_id=repo_info['id']) ++ broot = BuildRoot(self.session, self.options, root, br_arch, self.id, repo_id=repo_info['id'], setup_dns=True) + broot.workdir = self.workdir + broot.init() + rootdir = broot.rootdir() +-- +2.7.4 + diff --git a/koji.spec b/koji.spec index 6041a0b..de3ef89 100644 --- a/koji.spec +++ b/koji.spec @@ -9,13 +9,14 @@ Name: koji Version: 1.10.1 -Release: 9%{?dist} +Release: 10%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System URL: https://pagure.io/fork/ausil/koji/branch/fedora-infra Patch0: fedora-config.patch +Patch1: 0001-enable-dns-to-work-in-runroot-buildroots.patch Source: koji-%{version}.tar.bz2 BuildArch: noarch @@ -157,6 +158,7 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b orig +%patch1 -p1 %build @@ -324,6 +326,9 @@ fi %endif %changelog +* Thu May 26 2016 Dennis Gilmore - 1.10.1-10 +- add patch to enable dns in runroot chroots + * Tue May 24 2016 Dennis Gilmore - 1.10.1-9 - update to git master upstream, add lmc cosmetic fixes - add patch to disable login in koji-web From d48b6786e251aa84d9effdcd07c69610153d4224 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 19 Jul 2016 07:33:17 +0000 Subject: [PATCH 074/202] - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index de3ef89..118b387 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.10.1 -Release: 10%{?dist} +Release: 11%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -326,6 +326,9 @@ fi %endif %changelog +* Tue Jul 19 2016 Fedora Release Engineering - 1.10.1-11 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + * Thu May 26 2016 Dennis Gilmore - 1.10.1-10 - add patch to enable dns in runroot chroots From a5cf8a42c2fdec186477497bea0c5dfbee94b0f1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 23 Aug 2016 13:33:31 -0500 Subject: [PATCH 075/202] add patch to disable bind mounting into image tasks chroots Signed-off-by: Dennis Gilmore --- 138.patch | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ koji.spec | 7 ++++++- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 138.patch diff --git a/138.patch b/138.patch new file mode 100644 index 0000000..ce35bb5 --- /dev/null +++ b/138.patch @@ -0,0 +1,58 @@ +From d70f068cc1e138b3bb58766728424c190fcd77b5 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Aug 23 2016 04:50:22 +0000 +Subject: don't bind-mount /dev for LiveMediaTask (RHBZ #1315541) + + +This is an alternative to https://pagure.io/koji/pull-request/137 +which keeps the /dev bind mount for ApplianceTask and LiveCDTask, +only dropping it for LiveMediaTask. It seems from the test we +ran that appliance-creator may still need it, at least for the +present - some of the createAppliance tasks seemed to hang their +builders. + +--- + +diff --git a/builder/kojid b/builder/kojid +index 05438d2..26ae8f2 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2483,6 +2483,9 @@ class BuildLiveMediaTask(BuildImageTask): + # Other chroot-based image handlers should inherit this. + class ImageTask(BaseTaskHandler): + Methods = [] ++ # default to bind mounting /dev, but allow subclasses to change ++ # this ++ bind_opts = {'dirs' : {'/dev' : '/dev',}} + + def makeImgBuildRoot(self, buildtag, repoinfo, arch, inst_group): + """ +@@ -2497,14 +2500,11 @@ class ImageTask(BaseTaskHandler): + @returns: a buildroot object + """ + +- # Here we configure mock to bind mount a set of /dev directories +- bind_opts = {'dirs' : {'/dev' : '/dev',}} +- if os.path.exists('/selinux'): +- bind_opts['dirs']['/selinux'] = '/selinux' + rootopts = {'install_group': inst_group, + 'setup_dns': True, +- 'repo_id': repoinfo['id'], +- 'bind_opts' : bind_opts} ++ 'repo_id': repoinfo['id']} ++ if self.bind_opts: ++ rootopts['bind_opts'] = self.bind_opts + + broot = BuildRoot(self.session, self.options, buildtag, arch, self.id, **rootopts) + broot.workdir = self.workdir +@@ -2932,6 +2932,9 @@ class LiveMediaTask(ImageTask): + + Methods = ['createLiveMedia'] + _taskWeight = 1.5 ++ # For livemedia-creator we do not want to bind mount /dev, see ++ # https://bugzilla.redhat.com/show_bug.cgi?id=1315541 ++ bind_opts = {} + + def genISOManifest(self, image, manifile): + """ + diff --git a/koji.spec b/koji.spec index 118b387..a810790 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.10.1 -Release: 11%{?dist} +Release: 12%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -17,6 +17,7 @@ Group: Applications/System URL: https://pagure.io/fork/ausil/koji/branch/fedora-infra Patch0: fedora-config.patch Patch1: 0001-enable-dns-to-work-in-runroot-buildroots.patch +Patch2: 138.patch Source: koji-%{version}.tar.bz2 BuildArch: noarch @@ -159,6 +160,7 @@ koji-web is a web UI to the Koji system. %setup -q %patch0 -p1 -b orig %patch1 -p1 +%patch2 -p1 %build @@ -326,6 +328,9 @@ fi %endif %changelog +* Tue Aug 23 2016 Dennis Gilmore - 1.10.1-12 +- add patch to disable bind mounting into image tasks chroots + * Tue Jul 19 2016 Fedora Release Engineering - 1.10.1-11 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages From 156b735749daff14eca0b35f288cd66be2d0276d Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 28 Sep 2016 16:38:41 -0500 Subject: [PATCH 076/202] Patch new-chroot functionality into runroot plugin --- koji-1.10.1-new-chroot.patch | 91 ++++++++++++++++++++++++++++++++++++ koji.spec | 11 +++-- 2 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 koji-1.10.1-new-chroot.patch diff --git a/koji-1.10.1-new-chroot.patch b/koji-1.10.1-new-chroot.patch new file mode 100644 index 0000000..1f0e871 --- /dev/null +++ b/koji-1.10.1-new-chroot.patch @@ -0,0 +1,91 @@ +From 45b94423d4669547c3142bd38a1dff182101f15d Mon Sep 17 00:00:00 2001 +From: Ian McLeod +Date: Sep 28 2016 04:19:51 +0000 +Subject: [PATCH 1/2] A stab at --new-chroot support for rhe runroot plugin + + +--- + +diff --git a/cli/koji b/cli/koji +index 4b5a23d..e33d1e4 100755 +--- a/cli/koji ++++ b/cli/koji +@@ -6853,6 +6853,8 @@ def handle_runroot(options, session, args): + help=_("Print the ID of the runroot task")) + parser.add_option("--use-shell", action="store_true", default=False, + help=_("Run command through a shell, otherwise uses exec")) ++ parser.add_option("--new-chroot", action="store_true", default=False, ++ help=_("Run command with the --new-chroot (systemd-nspawn) option to mock")) + parser.add_option("--repo-id", type="int", help=_("ID of the repo to use")) + + (opts, args) = parser.parse_args(args) +@@ -6873,6 +6875,7 @@ def handle_runroot(options, session, args): + packages=opts.package, mounts=opts.mount, + repo_id=opts.repo_id, + skip_setarch=opts.skip_setarch, ++ new_chroot=opts.new_chroot, + weight=opts.weight) + except koji.GenericError, e: + if 'Invalid method' in str(e): +diff --git a/plugins/builder/runroot.py b/plugins/builder/runroot.py +index 7bf40e4..83f1898 100644 +--- a/plugins/builder/runroot.py ++++ b/plugins/builder/runroot.py +@@ -92,7 +92,7 @@ class RunRootTask(tasks.BaseTaskHandler): + if not path.startswith('/'): + raise koji.GenericError("bad config: all paths (default_mounts, safe_roots, path_subs) needs to be absolute: %s" % path) + +- def handler(self, root, arch, command, keep=False, packages=[], mounts=[], repo_id=None, skip_setarch=False, weight=None, upload_logs=None): ++ def handler(self, root, arch, command, keep=False, packages=[], mounts=[], repo_id=None, skip_setarch=False, weight=None, upload_logs=None, new_chroot=False): + """Create a buildroot and run a command (as root) inside of it + + Command may be a string or a list. +@@ -188,6 +188,8 @@ class RunRootTask(tasks.BaseTaskHandler): + self.do_mounts(rootdir, [self._get_path_params(x) for x in self.config['default_mounts']]) + self.do_extra_mounts(rootdir, mounts) + mock_cmd = ['chroot'] ++ if new_chroot: ++ mock_cmd.append('--new-chroot') + if skip_setarch: + #we can't really skip it, but we can set it to the current one instead of of the chroot one + myarch = platform.uname()[5] + +From 852f2500d45fa1aebbc2c0f2c568b026a3bf1ca5 Mon Sep 17 00:00:00 2001 +From: Ian McLeod +Date: Sep 28 2016 18:23:42 +0000 +Subject: [PATCH 2/2] Slight improvement to new-chroot to make the cli change less likely to confuse older builders + + +--- + +diff --git a/cli/koji b/cli/koji +index e33d1e4..30e4f98 100755 +--- a/cli/koji ++++ b/cli/koji +@@ -6870,13 +6870,18 @@ def handle_runroot(options, session, args): + else: + command = args[2:] + try: +- task_id = session.runroot(tag, arch, command, +- channel=opts.channel_override, +- packages=opts.package, mounts=opts.mount, +- repo_id=opts.repo_id, +- skip_setarch=opts.skip_setarch, +- new_chroot=opts.new_chroot, +- weight=opts.weight) ++ kwargs = { 'channel': opts.channel_override, ++ 'packages': opts.package, ++ 'mounts': opts.mount, ++ 'repo_id': opts.repo_id, ++ 'skip_setarch': opts.skip_setarch, ++ 'weight': opts.weight } ++ # Only pass this kwarg if it is true - this prevents confusing older ++ # builders with a different function signature ++ if opts.new_chroot: ++ kwargs['new_chroot'] = True ++ ++ task_id = session.runroot(tag, arch, command, **kwargs) + except koji.GenericError, e: + if 'Invalid method' in str(e): + print "* The runroot plugin appears to not be installed on the", + diff --git a/koji.spec b/koji.spec index a810790..1167988 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.10.1 -Release: 12%{?dist} +Release: 13%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -18,6 +18,7 @@ URL: https://pagure.io/fork/ausil/koji/branch/fedora-infra Patch0: fedora-config.patch Patch1: 0001-enable-dns-to-work-in-runroot-buildroots.patch Patch2: 138.patch +Patch3: koji-1.10.1-new-chroot.patch Source: koji-%{version}.tar.bz2 BuildArch: noarch @@ -161,6 +162,7 @@ koji-web is a web UI to the Koji system. %patch0 -p1 -b orig %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -328,6 +330,9 @@ fi %endif %changelog +* Wed Sep 28 2016 Adam Miller - 1.10.1-13 +- Patch new-chroot functionality into runroot plugin + * Tue Aug 23 2016 Dennis Gilmore - 1.10.1-12 - add patch to disable bind mounting into image tasks chroots @@ -450,7 +455,7 @@ fi * Fri Jun 01 2012 Dennis Gilmore - 1.7.0-1 - update to 1.7.0 many bugfixes and improvements -- now uses mod_wsgi +- now uses mod_wsgi * Fri Jan 13 2012 Fedora Release Engineering - 1.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild @@ -514,7 +519,7 @@ fi * Mon Aug 25 2008 Dennis Gilmore - 1.2.6-1 - update to 1.2.6 -- make sure we have to correct version of createrepo on Fedora 8 +- make sure we have to correct version of createrepo on Fedora 8 * Tue Aug 5 2008 Tom "spot" Callaway 1.2.5-2 - fix conditional (line 5) From be89d2541eefc45ce770d47e08e380dac4999cea Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 9 Dec 2016 08:37:49 -0600 Subject: [PATCH 077/202] update to 1.11.0 - setup fedora config for kerberos and flag day Signed-off-by: Dennis Gilmore --- .gitignore | 1 + ...le-dns-to-work-in-runroot-buildroots.patch | 29 ------ 138.patch | 58 ------------ fedora-config.patch | 30 +++--- koji-1.10.1-new-chroot.patch | 91 ------------------- koji.spec | 32 ++++--- sources | 2 +- 7 files changed, 36 insertions(+), 207 deletions(-) delete mode 100644 0001-enable-dns-to-work-in-runroot-buildroots.patch delete mode 100644 138.patch delete mode 100644 koji-1.10.1-new-chroot.patch diff --git a/.gitignore b/.gitignore index b52e9f4..1f87e88 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ koji-1.4.0.tar.bz2 /koji-1.9.0.tar.bz2 /koji-1.10.0.tar.bz2 /koji-1.10.1.tar.bz2 +/koji-1.11.0.tar.bz2 diff --git a/0001-enable-dns-to-work-in-runroot-buildroots.patch b/0001-enable-dns-to-work-in-runroot-buildroots.patch deleted file mode 100644 index e2152c7..0000000 --- a/0001-enable-dns-to-work-in-runroot-buildroots.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6e224af9a8610f37898859d25efa7188e9f008e0 Mon Sep 17 00:00:00 2001 -From: Dennis Gilmore -Date: Wed, 6 Apr 2016 15:00:13 -0500 -Subject: [PATCH] enable dns to work in runroot buildroots - -Signed-off-by: Dennis Gilmore ---- - plugins/builder/runroot.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/builder/runroot.py b/plugins/builder/runroot.py -index b303890..7bf40e4 100644 ---- a/plugins/builder/runroot.py -+++ b/plugins/builder/runroot.py -@@ -152,9 +152,9 @@ class RunRootTask(tasks.BaseTaskHandler): - parent=self.id) - repo_info = self.wait(task_id)[task_id] - if compat_mode: -- broot = BuildRoot(root, br_arch, self.id, repo_id=repo_info['id']) -+ broot = BuildRoot(root, br_arch, self.id, repo_id=repo_info['id'], setup_dns=True) - else: -- broot = BuildRoot(self.session, self.options, root, br_arch, self.id, repo_id=repo_info['id']) -+ broot = BuildRoot(self.session, self.options, root, br_arch, self.id, repo_id=repo_info['id'], setup_dns=True) - broot.workdir = self.workdir - broot.init() - rootdir = broot.rootdir() --- -2.7.4 - diff --git a/138.patch b/138.patch deleted file mode 100644 index ce35bb5..0000000 --- a/138.patch +++ /dev/null @@ -1,58 +0,0 @@ -From d70f068cc1e138b3bb58766728424c190fcd77b5 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Aug 23 2016 04:50:22 +0000 -Subject: don't bind-mount /dev for LiveMediaTask (RHBZ #1315541) - - -This is an alternative to https://pagure.io/koji/pull-request/137 -which keeps the /dev bind mount for ApplianceTask and LiveCDTask, -only dropping it for LiveMediaTask. It seems from the test we -ran that appliance-creator may still need it, at least for the -present - some of the createAppliance tasks seemed to hang their -builders. - ---- - -diff --git a/builder/kojid b/builder/kojid -index 05438d2..26ae8f2 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2483,6 +2483,9 @@ class BuildLiveMediaTask(BuildImageTask): - # Other chroot-based image handlers should inherit this. - class ImageTask(BaseTaskHandler): - Methods = [] -+ # default to bind mounting /dev, but allow subclasses to change -+ # this -+ bind_opts = {'dirs' : {'/dev' : '/dev',}} - - def makeImgBuildRoot(self, buildtag, repoinfo, arch, inst_group): - """ -@@ -2497,14 +2500,11 @@ class ImageTask(BaseTaskHandler): - @returns: a buildroot object - """ - -- # Here we configure mock to bind mount a set of /dev directories -- bind_opts = {'dirs' : {'/dev' : '/dev',}} -- if os.path.exists('/selinux'): -- bind_opts['dirs']['/selinux'] = '/selinux' - rootopts = {'install_group': inst_group, - 'setup_dns': True, -- 'repo_id': repoinfo['id'], -- 'bind_opts' : bind_opts} -+ 'repo_id': repoinfo['id']} -+ if self.bind_opts: -+ rootopts['bind_opts'] = self.bind_opts - - broot = BuildRoot(self.session, self.options, buildtag, arch, self.id, **rootopts) - broot.workdir = self.workdir -@@ -2932,6 +2932,9 @@ class LiveMediaTask(ImageTask): - - Methods = ['createLiveMedia'] - _taskWeight = 1.5 -+ # For livemedia-creator we do not want to bind mount /dev, see -+ # https://bugzilla.redhat.com/show_bug.cgi?id=1315541 -+ bind_opts = {} - - def genISOManifest(self, image, manifile): - """ - diff --git a/fedora-config.patch b/fedora-config.patch index 04af105..025c0c7 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,16 +1,15 @@ -diff -uNr koji-1.10.1.orig/cli/koji.conf koji-1.10.1/cli/koji.conf ---- koji-1.10.1.orig/cli/koji.conf 2016-03-01 16:43:15.000000000 -0600 -+++ koji-1.10.1/cli/koji.conf 2016-03-01 16:57:55.875274789 -0600 -@@ -3,26 +3,23 @@ +--- koji-1.11.0-orig/cli/koji.conf 2016-12-08 22:22:14.000000000 -0600 ++++ koji-1.11.0/cli/koji.conf 2016-12-09 08:29:10.066764435 -0600 +@@ -3,26 +3,17 @@ ;configuration for koji cli tool ;url of XMLRPC server -;server = http://hub.example.com/kojihub -+server = http://koji.fedoraproject.org/kojihub ++server = https://koji.fedoraproject.org/kojihub ;url of web interface -;weburl = http://www.example.com/koji -+weburl = http://koji.fedoraproject.org/koji ++weburl = https://koji.fedoraproject.org/koji ;url of package download site -;pkgurl = http://www.example.com/packages @@ -20,17 +19,16 @@ diff -uNr koji-1.10.1.orig/cli/koji.conf koji-1.10.1/cli/koji.conf ;topdir = /mnt/koji -;configuration for Kerberos authentication -- ++authtype = kerberos ++krb_rdns = false + -;the service name of the principal being used by the hub -;krbservice = host -+anon_retry = true - - ;configuration for SSL authentication - - ;client certificate +- +-;configuration for SSL authentication +- +-;client certificate -;cert = ~/.koji/client.crt -+cert = ~/.fedora.cert - - ;certificate of the CA that issued the HTTP server certificate +- +-;certificate of the CA that issued the HTTP server certificate -;serverca = ~/.koji/serverca.crt -+serverca = ~/.fedora-server-ca.cert diff --git a/koji-1.10.1-new-chroot.patch b/koji-1.10.1-new-chroot.patch deleted file mode 100644 index 1f0e871..0000000 --- a/koji-1.10.1-new-chroot.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 45b94423d4669547c3142bd38a1dff182101f15d Mon Sep 17 00:00:00 2001 -From: Ian McLeod -Date: Sep 28 2016 04:19:51 +0000 -Subject: [PATCH 1/2] A stab at --new-chroot support for rhe runroot plugin - - ---- - -diff --git a/cli/koji b/cli/koji -index 4b5a23d..e33d1e4 100755 ---- a/cli/koji -+++ b/cli/koji -@@ -6853,6 +6853,8 @@ def handle_runroot(options, session, args): - help=_("Print the ID of the runroot task")) - parser.add_option("--use-shell", action="store_true", default=False, - help=_("Run command through a shell, otherwise uses exec")) -+ parser.add_option("--new-chroot", action="store_true", default=False, -+ help=_("Run command with the --new-chroot (systemd-nspawn) option to mock")) - parser.add_option("--repo-id", type="int", help=_("ID of the repo to use")) - - (opts, args) = parser.parse_args(args) -@@ -6873,6 +6875,7 @@ def handle_runroot(options, session, args): - packages=opts.package, mounts=opts.mount, - repo_id=opts.repo_id, - skip_setarch=opts.skip_setarch, -+ new_chroot=opts.new_chroot, - weight=opts.weight) - except koji.GenericError, e: - if 'Invalid method' in str(e): -diff --git a/plugins/builder/runroot.py b/plugins/builder/runroot.py -index 7bf40e4..83f1898 100644 ---- a/plugins/builder/runroot.py -+++ b/plugins/builder/runroot.py -@@ -92,7 +92,7 @@ class RunRootTask(tasks.BaseTaskHandler): - if not path.startswith('/'): - raise koji.GenericError("bad config: all paths (default_mounts, safe_roots, path_subs) needs to be absolute: %s" % path) - -- def handler(self, root, arch, command, keep=False, packages=[], mounts=[], repo_id=None, skip_setarch=False, weight=None, upload_logs=None): -+ def handler(self, root, arch, command, keep=False, packages=[], mounts=[], repo_id=None, skip_setarch=False, weight=None, upload_logs=None, new_chroot=False): - """Create a buildroot and run a command (as root) inside of it - - Command may be a string or a list. -@@ -188,6 +188,8 @@ class RunRootTask(tasks.BaseTaskHandler): - self.do_mounts(rootdir, [self._get_path_params(x) for x in self.config['default_mounts']]) - self.do_extra_mounts(rootdir, mounts) - mock_cmd = ['chroot'] -+ if new_chroot: -+ mock_cmd.append('--new-chroot') - if skip_setarch: - #we can't really skip it, but we can set it to the current one instead of of the chroot one - myarch = platform.uname()[5] - -From 852f2500d45fa1aebbc2c0f2c568b026a3bf1ca5 Mon Sep 17 00:00:00 2001 -From: Ian McLeod -Date: Sep 28 2016 18:23:42 +0000 -Subject: [PATCH 2/2] Slight improvement to new-chroot to make the cli change less likely to confuse older builders - - ---- - -diff --git a/cli/koji b/cli/koji -index e33d1e4..30e4f98 100755 ---- a/cli/koji -+++ b/cli/koji -@@ -6870,13 +6870,18 @@ def handle_runroot(options, session, args): - else: - command = args[2:] - try: -- task_id = session.runroot(tag, arch, command, -- channel=opts.channel_override, -- packages=opts.package, mounts=opts.mount, -- repo_id=opts.repo_id, -- skip_setarch=opts.skip_setarch, -- new_chroot=opts.new_chroot, -- weight=opts.weight) -+ kwargs = { 'channel': opts.channel_override, -+ 'packages': opts.package, -+ 'mounts': opts.mount, -+ 'repo_id': opts.repo_id, -+ 'skip_setarch': opts.skip_setarch, -+ 'weight': opts.weight } -+ # Only pass this kwarg if it is true - this prevents confusing older -+ # builders with a different function signature -+ if opts.new_chroot: -+ kwargs['new_chroot'] = True -+ -+ task_id = session.runroot(tag, arch, command, **kwargs) - except koji.GenericError, e: - if 'Invalid method' in str(e): - print "* The runroot plugin appears to not be installed on the", - diff --git a/koji.spec b/koji.spec index 1167988..f7dcd14 100644 --- a/koji.spec +++ b/koji.spec @@ -8,31 +8,33 @@ %endif Name: koji -Version: 1.10.1 -Release: 13%{?dist} +Version: 1.11.0 +Release: 1%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System URL: https://pagure.io/fork/ausil/koji/branch/fedora-infra Patch0: fedora-config.patch -Patch1: 0001-enable-dns-to-work-in-runroot-buildroots.patch -Patch2: 138.patch -Patch3: koji-1.10.1-new-chroot.patch Source: koji-%{version}.tar.bz2 BuildArch: noarch Requires: python-krbV >= 1.0.13 Requires: rpm-python Requires: pyOpenSSL +Requires: python-requests +Requires: python-requests-kerberos Requires: python-urlgrabber -Requires: yum +Requires: python-dateutil BuildRequires: python BuildRequires: python-sphinx %if %{use_systemd} BuildRequires: systemd BuildRequires: pkgconfig %endif +%if 0%{?fedora} || 0%{?rhel} >= 7 +Requires: python-libcomps +%endif %description Koji is a system for building and tracking RPMS. The base package @@ -46,6 +48,9 @@ License: LGPLv2 and GPLv2 Requires: httpd Requires: mod_wsgi Requires: postgresql-python +%if 0%{?rhel} == 5 +Requires: python-simplejson +%endif Requires: %{name} = %{version}-%{release} %description hub @@ -58,6 +63,9 @@ License: LGPLv2 Requires: %{name} = %{version}-%{release} Requires: %{name}-hub = %{version}-%{release} Requires: python-qpid >= 0.7 +%if 0%{?rhel} >= 6 +Requires: python-qpid-proton +%endif %if 0%{?rhel} == 5 Requires: python-ssl %endif @@ -73,8 +81,8 @@ License: LGPLv2 and GPLv2+ #mergerepos (from createrepo) is GPLv2+ Requires: %{name} = %{version}-%{release} Requires: mock >= 0.9.14 -Requires: python2-multilib Requires(pre): /usr/sbin/useradd +Requires: squashfs-tools %if %{use_systemd} Requires(post): systemd Requires(preun): systemd @@ -89,13 +97,12 @@ Requires: /usr/bin/cvs Requires: /usr/bin/svn Requires: /usr/bin/git Requires: python-cheetah -Requires: squashfs-tools %if 0%{?rhel} == 5 Requires: createrepo >= 0.4.11-2 Requires: python-hashlib Requires: python-createrepo %endif -%if 0%{?fedora} >= 9 || 0%{?rhel} >= 5 +%if 0%{?fedora} >= 9 || 0%{?rhel} > 5 Requires: createrepo >= 0.9.2 %endif @@ -160,9 +167,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b orig -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build @@ -330,6 +334,10 @@ fi %endif %changelog +* Fri Dec 09 2016 Dennis Gilmore - 1.11.0-1 +- update to 1.11.0 +- setup fedora config for kerberos and flag day + * Wed Sep 28 2016 Adam Miller - 1.10.1-13 - Patch new-chroot functionality into runroot plugin diff --git a/sources b/sources index 8457676..e65b9f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b510184795567585a1cf3ef98e586b9c koji-1.10.1.tar.bz2 +6365645cb73e014f084475fab62876df koji-1.11.0.tar.bz2 From d970b360f1ab748717838d387937ef81e226b576 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Fri, 6 Jan 2017 23:44:40 +0100 Subject: [PATCH 078/202] Update upstream URLs Add upstream koji-gc kerberos patches Use Source0 --- koji-pr246-kojigc-krb_rds-support.patch | 69 +++++++++++++++++++++++++ koji-pr248-kojigc-keytab-support.patch | 24 +++++++++ koji.spec | 17 ++++-- 3 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 koji-pr246-kojigc-krb_rds-support.patch create mode 100644 koji-pr248-kojigc-keytab-support.patch diff --git a/koji-pr246-kojigc-krb_rds-support.patch b/koji-pr246-kojigc-krb_rds-support.patch new file mode 100644 index 0000000..fcf2fbf --- /dev/null +++ b/koji-pr246-kojigc-krb_rds-support.patch @@ -0,0 +1,69 @@ +From 9a21b78ff5d03f82edb20644684f78fe69aa97d9 Mon Sep 17 00:00:00 2001 +From: Till Maas +Date: Dec 17 2016 16:03:25 +0000 +Subject: [PATCH 1/2] Revert "default krb_rdns to True" + + +This reverts commit 02128ee5777b560619314cc0220e1ed7ca16b28c. + +The second column in cfgmap is an alias and "True" is not a valid alias. +It was mistaken in the reverted commit as a default value, which it is +not. Reverting this commit should fix the following traceback that +koji-gc in Fedora currenty raises: + +Traceback (most recent call last): +File "/usr/sbin/koji-gc", line 901, in +options, args = get_options() +File "/usr/sbin/koji-gc", line 159, in get_options +if config.has_option(*alias): +TypeError: has_option() argument after * must be a sequence, not bool + +--- + +diff --git a/util/koji-gc b/util/koji-gc +index b43f8aa..bf534ed 100755 +--- a/util/koji-gc ++++ b/util/koji-gc +@@ -131,7 +131,7 @@ def get_options(): + ['keytab', None, 'string'], + ['principal', None, 'string'], + ['krbservice', None, 'string'], +- ['krb_rdns', True, 'boolean'], ++ ['krb_rdns', None, 'boolean'], + ['runas', None, 'string'], + ['user', None, 'string'], + ['password', None, 'string'], + +From 1cc9e3052142421ff97e92defed393775ad56441 Mon Sep 17 00:00:00 2001 +From: Till Maas +Date: Dec 18 2016 09:35:22 +0000 +Subject: [PATCH 2/2] koji-gc: Set default value for krb_rdns to False + + +In Fedora infra krb_rdns needs to be set to False. This matches +https://pagure.io/koji/pull-request/244 + +--- + +diff --git a/util/koji-gc b/util/koji-gc +index bf534ed..9cb2144 100755 +--- a/util/koji-gc ++++ b/util/koji-gc +@@ -52,6 +52,8 @@ def get_options(): + parser.add_option("--principal", help=_("specify a Kerberos principal to use")) + parser.add_option("--krbservice", default="host", + help=_("the service name of the principal being used by the hub")) ++ parser.add_option("--krb-rdns", action="store_true", default=False, ++ help=_("get reverse dns FQDN for krb target")) + parser.add_option("--runas", metavar="USER", + help=_("run as the specified user (requires special privileges)")) + parser.add_option("--user", help=_("specify user")) +@@ -111,6 +113,7 @@ def get_options(): + (options, args) = parser.parse_args() + + defaults = parser.get_default_values() ++ + config = ConfigParser.ConfigParser() + cf = getattr(options, 'config_file', None) + if cf: + diff --git a/koji-pr248-kojigc-keytab-support.patch b/koji-pr248-kojigc-keytab-support.patch new file mode 100644 index 0000000..44691e1 --- /dev/null +++ b/koji-pr248-kojigc-keytab-support.patch @@ -0,0 +1,24 @@ +From db1eb36c1b74de65ddf479859a437eab1823727b Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Dec 17 2016 18:27:49 +0000 +Subject: Make koji-gc also work with principal and keytab + + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/util/koji-gc b/util/koji-gc +index b43f8aa..74f1de7 100755 +--- a/util/koji-gc ++++ b/util/koji-gc +@@ -352,7 +352,7 @@ def activate_session(session): + elif options.user: + #authenticate using user/password + session.login() +- elif has_krb_creds(): ++ elif has_krb_creds() or (options.keytab and options.principal): + try: + if options.keytab and options.principal: + session.krb_login(principal=options.principal, keytab=options.keytab, proxyuser=options.runas) + diff --git a/koji.spec b/koji.spec index f7dcd14..24050a8 100644 --- a/koji.spec +++ b/koji.spec @@ -9,15 +9,19 @@ Name: koji Version: 1.11.0 -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: https://pagure.io/fork/ausil/koji/branch/fedora-infra +URL: https://pagure.io/koji/ +Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 Patch0: fedora-config.patch +# https://pagure.io/koji/pull-request/246 +# https://pagure.io/koji/pull-request/248 +Patch1: koji-pr246-kojigc-krb_rds-support.patch +Patch2: koji-pr248-kojigc-keytab-support.patch -Source: koji-%{version}.tar.bz2 BuildArch: noarch Requires: python-krbV >= 1.0.13 Requires: rpm-python @@ -167,6 +171,8 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b orig +%patch1 -p1 -b .246 +%patch2 -p1 -b .248 %build @@ -334,6 +340,11 @@ fi %endif %changelog +* Fri Jan 06 2017 Till Maas - 1.11.0-2 +- Update upstream URLs +- Add upstream koji-gc kerberos patches +- Use Source0 + * Fri Dec 09 2016 Dennis Gilmore - 1.11.0-1 - update to 1.11.0 - setup fedora config for kerberos and flag day From a7cd98052cff7f7ca13acf55826cb96cc2ffab18 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Sat, 7 Jan 2017 10:36:14 +0100 Subject: [PATCH 079/202] Add patches for proxy IP forwarding --- ...3-CheckClientIP-and-TrustForwardedIP.patch | 137 ++++++++++++++++++ koji.spec | 10 +- 2 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 koji-pr243-CheckClientIP-and-TrustForwardedIP.patch diff --git a/koji-pr243-CheckClientIP-and-TrustForwardedIP.patch b/koji-pr243-CheckClientIP-and-TrustForwardedIP.patch new file mode 100644 index 0000000..a10fdd6 --- /dev/null +++ b/koji-pr243-CheckClientIP-and-TrustForwardedIP.patch @@ -0,0 +1,137 @@ +From b7bbd1e835ef7c21809173902fd78375f0aec072 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Dec 14 2016 18:34:16 +0000 +Subject: [PATCH 1/2] new hub CheckClientIP option + + +--- + +diff --git a/hub/kojixmlrpc.py b/hub/kojixmlrpc.py +index 295a197..47c1284 100644 +--- a/hub/kojixmlrpc.py ++++ b/hub/kojixmlrpc.py +@@ -430,6 +430,8 @@ def load_config(environ): + ['DNUsernameComponent', 'string', 'CN'], + ['ProxyDNs', 'string', ''], + ++ ['CheckClientIP', 'boolean', True], ++ + ['LoginCreatesUser', 'boolean', True], + ['KojiWebURL', 'string', 'http://localhost.localdomain/koji'], + ['EmailDomain', 'string', None], +diff --git a/koji/auth.py b/koji/auth.py +index ef2f338..ef7635f 100644 +--- a/koji/auth.py ++++ b/koji/auth.py +@@ -72,11 +72,7 @@ class Session(object): + self.message = 'no session args' + return + args = cgi.parse_qs(args, strict_parsing=True) +- if hostip is None: +- hostip = context.environ['REMOTE_ADDR'] +- #XXX - REMOTE_ADDR not promised by wsgi spec +- if hostip == '127.0.0.1': +- hostip = socket.gethostbyname(socket.gethostname()) ++ hostip = self.get_remote_ip(override=hostip) + try: + id = long(args['session-id'][0]) + key = args['session-key'][0] +@@ -239,6 +235,18 @@ class Session(object): + raise koji.AuthLockError, self.lockerror + return True + ++ def get_remote_ip(self, override=None): ++ if not context.opts['CheckClientIP']: ++ return '-' ++ elif override is not None: ++ return override ++ else: ++ hostip = context.environ['REMOTE_ADDR'] ++ #XXX - REMOTE_ADDR not promised by wsgi spec ++ if hostip == '127.0.0.1': ++ hostip = socket.gethostbyname(socket.gethostname()) ++ return hostip ++ + def checkLoginAllowed(self, user_id): + """Verify that the user is allowed to login""" + cursor = context.cnx.cursor() +@@ -260,12 +268,7 @@ class Session(object): + raise koji.AuthError, 'invalid username or password' + if self.logged_in: + raise koji.GenericError, "Already logged in" +- hostip = opts.get('hostip') +- if hostip is None: +- hostip = context.environ['REMOTE_ADDR'] +- #XXX - REMOTE_ADDR not promised by wsgi spec +- if hostip == '127.0.0.1': +- hostip = socket.gethostbyname(socket.gethostname()) ++ hostip = self.get_remote_ip(override=opts.get('hostip')) + + # check passwd + c = context.cnx.cursor() +@@ -332,10 +335,7 @@ class Session(object): + + self.checkLoginAllowed(user_id) + +- hostip = context.environ['REMOTE_ADDR'] +- #XXX - REMOTE_ADDR not promised by wsgi spec +- if hostip == '127.0.0.1': +- hostip = socket.gethostbyname(socket.gethostname()) ++ hostip = self.get_remote_ip() + + sinfo = self.createSession(user_id, hostip, koji.AUTHTYPE_KERB) + +@@ -412,10 +412,7 @@ class Session(object): + + self.checkLoginAllowed(user_id) + +- hostip = context.environ['REMOTE_ADDR'] +- #XXX - REMOTE_ADDR not promised by wsgi spec +- if hostip == '127.0.0.1': +- hostip = socket.gethostbyname(socket.gethostname()) ++ hostip = self.get_remote_ip() + + sinfo = self.createSession(user_id, hostip, authtype) + return sinfo + +From 09af8f548665fab35174f731bf51bab0c4c65063 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Dec 14 2016 19:15:19 +0000 +Subject: [PATCH 2/2] hub option: TrustForwardedIP + + +An option to trust the X_FORWARDED_FOR header (defaults to false) when +determining client ip address + +--- + +diff --git a/hub/kojixmlrpc.py b/hub/kojixmlrpc.py +index 47c1284..2572e13 100644 +--- a/hub/kojixmlrpc.py ++++ b/hub/kojixmlrpc.py +@@ -431,6 +431,7 @@ def load_config(environ): + ['ProxyDNs', 'string', ''], + + ['CheckClientIP', 'boolean', True], ++ ['TrustForwardedIP', 'boolean', False], + + ['LoginCreatesUser', 'boolean', True], + ['KojiWebURL', 'string', 'http://localhost.localdomain/koji'], +diff --git a/koji/auth.py b/koji/auth.py +index ef7635f..0cf2ffd 100644 +--- a/koji/auth.py ++++ b/koji/auth.py +@@ -241,7 +241,11 @@ class Session(object): + elif override is not None: + return override + else: +- hostip = context.environ['REMOTE_ADDR'] ++ if (context.opts['TrustForwardedIP'] ++ and 'HTTP_X_FORWARDED_FOR' in context.environ): ++ hostip = context.environ['HTTP_X_FORWARDED_FOR'].split(',')[-1].strip() ++ else: ++ hostip = context.environ['REMOTE_ADDR'] + #XXX - REMOTE_ADDR not promised by wsgi spec + if hostip == '127.0.0.1': + hostip = socket.gethostbyname(socket.gethostname()) + diff --git a/koji.spec b/koji.spec index 24050a8..4b21345 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.11.0 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools @@ -18,9 +18,11 @@ URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 Patch0: fedora-config.patch # https://pagure.io/koji/pull-request/246 -# https://pagure.io/koji/pull-request/248 Patch1: koji-pr246-kojigc-krb_rds-support.patch +# https://pagure.io/koji/pull-request/248 Patch2: koji-pr248-kojigc-keytab-support.patch +# https://pagure.io/koji/pull-request/243 +Patch3: koji-pr243-CheckClientIP-and-TrustForwardedIP.patch BuildArch: noarch Requires: python-krbV >= 1.0.13 @@ -173,6 +175,7 @@ koji-web is a web UI to the Koji system. %patch0 -p1 -b orig %patch1 -p1 -b .246 %patch2 -p1 -b .248 +%patch3 -p1 -b .243 %build @@ -340,6 +343,9 @@ fi %endif %changelog +* Sat Jan 07 2017 Till Maas - 1.11.0-3 +- Add patches for proxy IP forwarding + * Fri Jan 06 2017 Till Maas - 1.11.0-2 - Update upstream URLs - Add upstream koji-gc kerberos patches From 2b4b9af01d43ea35f33d93ecaf7547548d00eb96 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Sun, 8 Jan 2017 12:42:24 +0100 Subject: [PATCH 080/202] Add patch for keytab kerberos client config Move non upstreamable Fedora patch to the end to ease rebasing to future upstream release Move license comment before license tag --- fedora-config.patch | 19 +++++---- koji-pr239-principal-keytab-cli-config.patch | 41 ++++++++++++++++++++ koji.spec | 18 +++++++-- 3 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 koji-pr239-principal-keytab-cli-config.patch diff --git a/fedora-config.patch b/fedora-config.patch index 025c0c7..bf8d0c5 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,6 +1,7 @@ ---- koji-1.11.0-orig/cli/koji.conf 2016-12-08 22:22:14.000000000 -0600 -+++ koji-1.11.0/cli/koji.conf 2016-12-09 08:29:10.066764435 -0600 -@@ -3,26 +3,17 @@ +diff -up koji-1.11.0/cli/koji.conf.clientconf koji-1.11.0/cli/koji.conf +--- koji-1.11.0/cli/koji.conf.clientconf 2017-01-08 12:35:51.681832856 +0100 ++++ koji-1.11.0/cli/koji.conf 2017-01-08 12:37:14.388829788 +0100 +@@ -3,18 +3,20 @@ ;configuration for koji cli tool ;url of XMLRPC server @@ -18,12 +19,16 @@ ;path to the koji top directory ;topdir = /mnt/koji --;configuration for Kerberos authentication + ;configuration for Kerberos authentication +authtype = kerberos +krb_rdns = false - --;the service name of the principal being used by the hub --;krbservice = host + + ;the service name of the principal being used by the hub + ;krbservice = host +@@ -24,11 +26,3 @@ + + ;the keytab to auth as for automated clients + ;keytab = /etc/krb5.keytab - -;configuration for SSL authentication - diff --git a/koji-pr239-principal-keytab-cli-config.patch b/koji-pr239-principal-keytab-cli-config.patch new file mode 100644 index 0000000..bc6e5e5 --- /dev/null +++ b/koji-pr239-principal-keytab-cli-config.patch @@ -0,0 +1,41 @@ +From c056a2ff45a0e256aa27e1ca2b86ed4284bcaa52 Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Dec 15 2016 01:58:50 +0000 +Subject: Allow principal and keytab in cli config + + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/cli/koji.conf b/cli/koji.conf +index 4294603..ae77e4e 100644 +--- a/cli/koji.conf ++++ b/cli/koji.conf +@@ -19,6 +19,12 @@ + ;the service name of the principal being used by the hub + ;krbservice = host + ++;the principal to auth as for automated clients ++;principal = client@EXAMPLE.COM ++ ++;the keytab to auth as for automated clients ++;keytab = /etc/krb5.keytab ++ + ;configuration for SSL authentication + + ;client certificate +diff --git a/koji/__init__.py b/koji/__init__.py +index 144c2c5..9b3c75d 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -1584,6 +1584,8 @@ def read_config(profile_name, user_config=None): + 'poll_interval': 6, + 'krbservice': 'host', + 'krb_rdns': True, ++ 'principal': None, ++ 'keytab': None, + 'cert': None, + 'ca': '', # FIXME: remove in next major release + 'serverca': None, + diff --git a/koji.spec b/koji.spec index 4b21345..98694b2 100644 --- a/koji.spec +++ b/koji.spec @@ -9,20 +9,23 @@ Name: koji Version: 1.11.0 -Release: 3%{?dist} -License: LGPLv2 and GPLv2+ +Release: 4%{?dist} # koji.ssl libs (from plague) are GPLv2+ +License: LGPLv2 and GPLv2+ Summary: Build system tools Group: Applications/System URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -Patch0: fedora-config.patch # https://pagure.io/koji/pull-request/246 Patch1: koji-pr246-kojigc-krb_rds-support.patch # https://pagure.io/koji/pull-request/248 Patch2: koji-pr248-kojigc-keytab-support.patch # https://pagure.io/koji/pull-request/243 Patch3: koji-pr243-CheckClientIP-and-TrustForwardedIP.patch +# https://pagure.io/koji/pull-request/239 +Patch4: koji-pr239-principal-keytab-cli-config.patch +# Not upstreamable +Patch100: fedora-config.patch BuildArch: noarch Requires: python-krbV >= 1.0.13 @@ -172,10 +175,11 @@ koji-web is a web UI to the Koji system. %prep %setup -q -%patch0 -p1 -b orig %patch1 -p1 -b .246 %patch2 -p1 -b .248 %patch3 -p1 -b .243 +%patch4 -p1 -b .239 +%patch100 -p1 -b .fedoraconfig %build @@ -343,6 +347,12 @@ fi %endif %changelog +* Sun Jan 08 2017 Till Maas - 1.11.0-4 +- Add patch for keytab kerberos client config +- Move non upstreamable Fedora patch to the end to ease rebasing to future + upstream release +- Move license comment before license tag + * Sat Jan 07 2017 Till Maas - 1.11.0-3 - Add patches for proxy IP forwarding From 36ee1ad98e78b079a4a375c6e0a5141859164ac9 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Sun, 8 Jan 2017 16:16:55 +0100 Subject: [PATCH 081/202] Do not apply faulty CheckClientIP patch --- koji.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 98694b2..7ad4232 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.11.0 -Release: 4%{?dist} +Release: 5%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -177,7 +177,8 @@ koji-web is a web UI to the Koji system. %setup -q %patch1 -p1 -b .246 %patch2 -p1 -b .248 -%patch3 -p1 -b .243 +# This seems to break the koji hub currently, thefore do not apply it +#patch3 -p1 -b .243 %patch4 -p1 -b .239 %patch100 -p1 -b .fedoraconfig @@ -347,6 +348,9 @@ fi %endif %changelog +* Sun Jan 08 2017 Till Maas - 1.11.0-5 +- Do not apply faulty CheckClientIP patch + * Sun Jan 08 2017 Till Maas - 1.11.0-4 - Add patch for keytab kerberos client config - Move non upstreamable Fedora patch to the end to ease rebasing to future From 1f2884e4ed5999d5e747b00c7decccfcdc534229 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 17:55:30 +0000 Subject: [PATCH 082/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 7ad4232..7b7a80c 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.11.0 -Release: 5%{?dist} +Release: 6%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -348,6 +348,9 @@ fi %endif %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.11.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Sun Jan 08 2017 Till Maas - 1.11.0-5 - Do not apply faulty CheckClientIP patch From 4174069f98129ab1631d4a1384a805c438c43f59 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 18 Apr 2017 15:02:47 -0500 Subject: [PATCH 083/202] update to upstream 1.12.0 remove rhel 5 conditionals as its no longer supported in epel Signed-off-by: Dennis Gilmore --- .gitignore | 1 + fedora-config.patch | 11 +- koji-pr239-principal-keytab-cli-config.patch | 41 ------ ...3-CheckClientIP-and-TrustForwardedIP.patch | 137 ------------------ koji-pr246-kojigc-krb_rds-support.patch | 69 --------- koji-pr248-kojigc-keytab-support.patch | 24 --- koji.spec | 48 ++---- sources | 2 +- 8 files changed, 20 insertions(+), 313 deletions(-) delete mode 100644 koji-pr239-principal-keytab-cli-config.patch delete mode 100644 koji-pr243-CheckClientIP-and-TrustForwardedIP.patch delete mode 100644 koji-pr246-kojigc-krb_rds-support.patch delete mode 100644 koji-pr248-kojigc-keytab-support.patch diff --git a/.gitignore b/.gitignore index 1f87e88..535a6b2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ koji-1.4.0.tar.bz2 /koji-1.10.0.tar.bz2 /koji-1.10.1.tar.bz2 /koji-1.11.0.tar.bz2 +/koji-1.12.0.tar.bz2 diff --git a/fedora-config.patch b/fedora-config.patch index bf8d0c5..4260bed 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,6 +1,5 @@ -diff -up koji-1.11.0/cli/koji.conf.clientconf koji-1.11.0/cli/koji.conf ---- koji-1.11.0/cli/koji.conf.clientconf 2017-01-08 12:35:51.681832856 +0100 -+++ koji-1.11.0/cli/koji.conf 2017-01-08 12:37:14.388829788 +0100 +--- koji-1.12.0/cli/koji.conf.orig 2017-04-18 14:35:15.879593521 -0500 ++++ koji-1.12.0/cli/koji.conf 2017-04-18 14:37:45.818233378 -0500 @@ -3,18 +3,20 @@ ;configuration for koji cli tool @@ -25,11 +24,10 @@ diff -up koji-1.11.0/cli/koji.conf.clientconf koji-1.11.0/cli/koji.conf ;the service name of the principal being used by the hub ;krbservice = host -@@ -24,11 +26,3 @@ - +@@ -25,10 +27,4 @@ ;the keytab to auth as for automated clients ;keytab = /etc/krb5.keytab -- + -;configuration for SSL authentication - -;client certificate @@ -37,3 +35,4 @@ diff -up koji-1.11.0/cli/koji.conf.clientconf koji-1.11.0/cli/koji.conf - -;certificate of the CA that issued the HTTP server certificate -;serverca = ~/.koji/serverca.crt ++use_fast_upload = yes diff --git a/koji-pr239-principal-keytab-cli-config.patch b/koji-pr239-principal-keytab-cli-config.patch deleted file mode 100644 index bc6e5e5..0000000 --- a/koji-pr239-principal-keytab-cli-config.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c056a2ff45a0e256aa27e1ca2b86ed4284bcaa52 Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: Dec 15 2016 01:58:50 +0000 -Subject: Allow principal and keytab in cli config - - -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/cli/koji.conf b/cli/koji.conf -index 4294603..ae77e4e 100644 ---- a/cli/koji.conf -+++ b/cli/koji.conf -@@ -19,6 +19,12 @@ - ;the service name of the principal being used by the hub - ;krbservice = host - -+;the principal to auth as for automated clients -+;principal = client@EXAMPLE.COM -+ -+;the keytab to auth as for automated clients -+;keytab = /etc/krb5.keytab -+ - ;configuration for SSL authentication - - ;client certificate -diff --git a/koji/__init__.py b/koji/__init__.py -index 144c2c5..9b3c75d 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -1584,6 +1584,8 @@ def read_config(profile_name, user_config=None): - 'poll_interval': 6, - 'krbservice': 'host', - 'krb_rdns': True, -+ 'principal': None, -+ 'keytab': None, - 'cert': None, - 'ca': '', # FIXME: remove in next major release - 'serverca': None, - diff --git a/koji-pr243-CheckClientIP-and-TrustForwardedIP.patch b/koji-pr243-CheckClientIP-and-TrustForwardedIP.patch deleted file mode 100644 index a10fdd6..0000000 --- a/koji-pr243-CheckClientIP-and-TrustForwardedIP.patch +++ /dev/null @@ -1,137 +0,0 @@ -From b7bbd1e835ef7c21809173902fd78375f0aec072 Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: Dec 14 2016 18:34:16 +0000 -Subject: [PATCH 1/2] new hub CheckClientIP option - - ---- - -diff --git a/hub/kojixmlrpc.py b/hub/kojixmlrpc.py -index 295a197..47c1284 100644 ---- a/hub/kojixmlrpc.py -+++ b/hub/kojixmlrpc.py -@@ -430,6 +430,8 @@ def load_config(environ): - ['DNUsernameComponent', 'string', 'CN'], - ['ProxyDNs', 'string', ''], - -+ ['CheckClientIP', 'boolean', True], -+ - ['LoginCreatesUser', 'boolean', True], - ['KojiWebURL', 'string', 'http://localhost.localdomain/koji'], - ['EmailDomain', 'string', None], -diff --git a/koji/auth.py b/koji/auth.py -index ef2f338..ef7635f 100644 ---- a/koji/auth.py -+++ b/koji/auth.py -@@ -72,11 +72,7 @@ class Session(object): - self.message = 'no session args' - return - args = cgi.parse_qs(args, strict_parsing=True) -- if hostip is None: -- hostip = context.environ['REMOTE_ADDR'] -- #XXX - REMOTE_ADDR not promised by wsgi spec -- if hostip == '127.0.0.1': -- hostip = socket.gethostbyname(socket.gethostname()) -+ hostip = self.get_remote_ip(override=hostip) - try: - id = long(args['session-id'][0]) - key = args['session-key'][0] -@@ -239,6 +235,18 @@ class Session(object): - raise koji.AuthLockError, self.lockerror - return True - -+ def get_remote_ip(self, override=None): -+ if not context.opts['CheckClientIP']: -+ return '-' -+ elif override is not None: -+ return override -+ else: -+ hostip = context.environ['REMOTE_ADDR'] -+ #XXX - REMOTE_ADDR not promised by wsgi spec -+ if hostip == '127.0.0.1': -+ hostip = socket.gethostbyname(socket.gethostname()) -+ return hostip -+ - def checkLoginAllowed(self, user_id): - """Verify that the user is allowed to login""" - cursor = context.cnx.cursor() -@@ -260,12 +268,7 @@ class Session(object): - raise koji.AuthError, 'invalid username or password' - if self.logged_in: - raise koji.GenericError, "Already logged in" -- hostip = opts.get('hostip') -- if hostip is None: -- hostip = context.environ['REMOTE_ADDR'] -- #XXX - REMOTE_ADDR not promised by wsgi spec -- if hostip == '127.0.0.1': -- hostip = socket.gethostbyname(socket.gethostname()) -+ hostip = self.get_remote_ip(override=opts.get('hostip')) - - # check passwd - c = context.cnx.cursor() -@@ -332,10 +335,7 @@ class Session(object): - - self.checkLoginAllowed(user_id) - -- hostip = context.environ['REMOTE_ADDR'] -- #XXX - REMOTE_ADDR not promised by wsgi spec -- if hostip == '127.0.0.1': -- hostip = socket.gethostbyname(socket.gethostname()) -+ hostip = self.get_remote_ip() - - sinfo = self.createSession(user_id, hostip, koji.AUTHTYPE_KERB) - -@@ -412,10 +412,7 @@ class Session(object): - - self.checkLoginAllowed(user_id) - -- hostip = context.environ['REMOTE_ADDR'] -- #XXX - REMOTE_ADDR not promised by wsgi spec -- if hostip == '127.0.0.1': -- hostip = socket.gethostbyname(socket.gethostname()) -+ hostip = self.get_remote_ip() - - sinfo = self.createSession(user_id, hostip, authtype) - return sinfo - -From 09af8f548665fab35174f731bf51bab0c4c65063 Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: Dec 14 2016 19:15:19 +0000 -Subject: [PATCH 2/2] hub option: TrustForwardedIP - - -An option to trust the X_FORWARDED_FOR header (defaults to false) when -determining client ip address - ---- - -diff --git a/hub/kojixmlrpc.py b/hub/kojixmlrpc.py -index 47c1284..2572e13 100644 ---- a/hub/kojixmlrpc.py -+++ b/hub/kojixmlrpc.py -@@ -431,6 +431,7 @@ def load_config(environ): - ['ProxyDNs', 'string', ''], - - ['CheckClientIP', 'boolean', True], -+ ['TrustForwardedIP', 'boolean', False], - - ['LoginCreatesUser', 'boolean', True], - ['KojiWebURL', 'string', 'http://localhost.localdomain/koji'], -diff --git a/koji/auth.py b/koji/auth.py -index ef7635f..0cf2ffd 100644 ---- a/koji/auth.py -+++ b/koji/auth.py -@@ -241,7 +241,11 @@ class Session(object): - elif override is not None: - return override - else: -- hostip = context.environ['REMOTE_ADDR'] -+ if (context.opts['TrustForwardedIP'] -+ and 'HTTP_X_FORWARDED_FOR' in context.environ): -+ hostip = context.environ['HTTP_X_FORWARDED_FOR'].split(',')[-1].strip() -+ else: -+ hostip = context.environ['REMOTE_ADDR'] - #XXX - REMOTE_ADDR not promised by wsgi spec - if hostip == '127.0.0.1': - hostip = socket.gethostbyname(socket.gethostname()) - diff --git a/koji-pr246-kojigc-krb_rds-support.patch b/koji-pr246-kojigc-krb_rds-support.patch deleted file mode 100644 index fcf2fbf..0000000 --- a/koji-pr246-kojigc-krb_rds-support.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 9a21b78ff5d03f82edb20644684f78fe69aa97d9 Mon Sep 17 00:00:00 2001 -From: Till Maas -Date: Dec 17 2016 16:03:25 +0000 -Subject: [PATCH 1/2] Revert "default krb_rdns to True" - - -This reverts commit 02128ee5777b560619314cc0220e1ed7ca16b28c. - -The second column in cfgmap is an alias and "True" is not a valid alias. -It was mistaken in the reverted commit as a default value, which it is -not. Reverting this commit should fix the following traceback that -koji-gc in Fedora currenty raises: - -Traceback (most recent call last): -File "/usr/sbin/koji-gc", line 901, in -options, args = get_options() -File "/usr/sbin/koji-gc", line 159, in get_options -if config.has_option(*alias): -TypeError: has_option() argument after * must be a sequence, not bool - ---- - -diff --git a/util/koji-gc b/util/koji-gc -index b43f8aa..bf534ed 100755 ---- a/util/koji-gc -+++ b/util/koji-gc -@@ -131,7 +131,7 @@ def get_options(): - ['keytab', None, 'string'], - ['principal', None, 'string'], - ['krbservice', None, 'string'], -- ['krb_rdns', True, 'boolean'], -+ ['krb_rdns', None, 'boolean'], - ['runas', None, 'string'], - ['user', None, 'string'], - ['password', None, 'string'], - -From 1cc9e3052142421ff97e92defed393775ad56441 Mon Sep 17 00:00:00 2001 -From: Till Maas -Date: Dec 18 2016 09:35:22 +0000 -Subject: [PATCH 2/2] koji-gc: Set default value for krb_rdns to False - - -In Fedora infra krb_rdns needs to be set to False. This matches -https://pagure.io/koji/pull-request/244 - ---- - -diff --git a/util/koji-gc b/util/koji-gc -index bf534ed..9cb2144 100755 ---- a/util/koji-gc -+++ b/util/koji-gc -@@ -52,6 +52,8 @@ def get_options(): - parser.add_option("--principal", help=_("specify a Kerberos principal to use")) - parser.add_option("--krbservice", default="host", - help=_("the service name of the principal being used by the hub")) -+ parser.add_option("--krb-rdns", action="store_true", default=False, -+ help=_("get reverse dns FQDN for krb target")) - parser.add_option("--runas", metavar="USER", - help=_("run as the specified user (requires special privileges)")) - parser.add_option("--user", help=_("specify user")) -@@ -111,6 +113,7 @@ def get_options(): - (options, args) = parser.parse_args() - - defaults = parser.get_default_values() -+ - config = ConfigParser.ConfigParser() - cf = getattr(options, 'config_file', None) - if cf: - diff --git a/koji-pr248-kojigc-keytab-support.patch b/koji-pr248-kojigc-keytab-support.patch deleted file mode 100644 index 44691e1..0000000 --- a/koji-pr248-kojigc-keytab-support.patch +++ /dev/null @@ -1,24 +0,0 @@ -From db1eb36c1b74de65ddf479859a437eab1823727b Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: Dec 17 2016 18:27:49 +0000 -Subject: Make koji-gc also work with principal and keytab - - -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/util/koji-gc b/util/koji-gc -index b43f8aa..74f1de7 100755 ---- a/util/koji-gc -+++ b/util/koji-gc -@@ -352,7 +352,7 @@ def activate_session(session): - elif options.user: - #authenticate using user/password - session.login() -- elif has_krb_creds(): -+ elif has_krb_creds() or (options.keytab and options.principal): - try: - if options.keytab and options.principal: - session.krb_login(principal=options.principal, keytab=options.keytab, proxyuser=options.runas) - diff --git a/koji.spec b/koji.spec index 7b7a80c..03cd43f 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from %distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%if 0%{?fedora} >= 23 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 %global use_systemd 1 %else %global use_systemd 0 @@ -8,22 +8,15 @@ %endif Name: koji -Version: 1.11.0 -Release: 6%{?dist} +Version: 1.12.0 +Release: 1%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools Group: Applications/System URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# https://pagure.io/koji/pull-request/246 -Patch1: koji-pr246-kojigc-krb_rds-support.patch -# https://pagure.io/koji/pull-request/248 -Patch2: koji-pr248-kojigc-keytab-support.patch -# https://pagure.io/koji/pull-request/243 -Patch3: koji-pr243-CheckClientIP-and-TrustForwardedIP.patch -# https://pagure.io/koji/pull-request/239 -Patch4: koji-pr239-principal-keytab-cli-config.patch + # Not upstreamable Patch100: fedora-config.patch @@ -56,10 +49,7 @@ License: LGPLv2 and GPLv2 # rpmdiff lib (from rpmlint) is GPLv2 (only) Requires: httpd Requires: mod_wsgi -Requires: postgresql-python -%if 0%{?rhel} == 5 -Requires: python-simplejson -%endif +Requires: python-psycopg2 Requires: %{name} = %{version}-%{release} %description hub @@ -72,12 +62,7 @@ License: LGPLv2 Requires: %{name} = %{version}-%{release} Requires: %{name}-hub = %{version}-%{release} Requires: python-qpid >= 0.7 -%if 0%{?rhel} >= 6 Requires: python-qpid-proton -%endif -%if 0%{?rhel} == 5 -Requires: python-ssl -%endif Requires: cpio %description hub-plugins @@ -92,6 +77,7 @@ Requires: %{name} = %{version}-%{release} Requires: mock >= 0.9.14 Requires(pre): /usr/sbin/useradd Requires: squashfs-tools +Requires: python2-multilib %if %{use_systemd} Requires(post): systemd Requires(preun): systemd @@ -106,14 +92,7 @@ Requires: /usr/bin/cvs Requires: /usr/bin/svn Requires: /usr/bin/git Requires: python-cheetah -%if 0%{?rhel} == 5 -Requires: createrepo >= 0.4.11-2 -Requires: python-hashlib -Requires: python-createrepo -%endif -%if 0%{?fedora} >= 9 || 0%{?rhel} > 5 Requires: createrepo >= 0.9.2 -%endif %description builder koji-builder is the daemon that runs on build machines and executes @@ -147,7 +126,7 @@ virtual machine. This package is not required for most installations. Summary: Koji Utilities Group: Applications/Internet License: LGPLv2 -Requires: postgresql-python +Requires: python-psycopg2 Requires: %{name} = %{version}-%{release} %if %{use_systemd} Requires(post): systemd @@ -165,7 +144,7 @@ License: LGPLv2 Requires: httpd Requires: mod_wsgi Requires: mod_auth_kerb -Requires: postgresql-python +Requires: python-psycopg2 Requires: python-cheetah Requires: %{name} = %{version}-%{release} Requires: python-krbV >= 1.0.13 @@ -175,11 +154,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q -%patch1 -p1 -b .246 -%patch2 -p1 -b .248 -# This seems to break the koji hub currently, thefore do not apply it -#patch3 -p1 -b .243 -%patch4 -p1 -b .239 %patch100 -p1 -b .fedoraconfig %build @@ -348,6 +322,10 @@ fi %endif %changelog +* Tue Apr 18 2017 Dennis Gilmore - 1.12.0-1 +- update to upstream 1.12.0 +- remove rhel 5 conditionals as its no longer supported in epel + * Fri Feb 10 2017 Fedora Release Engineering - 1.11.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index e65b9f4..199c8ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6365645cb73e014f084475fab62876df koji-1.11.0.tar.bz2 +SHA512 (koji-1.12.0.tar.bz2) = 8898de9715c3d7bf828817eacfae55166d654ec8e561f3b1406b9208072af2ca277aeaf9e753d82938a4170aa261bf3d5f7c868142cbe9668e2e149c7f747cc8 From 74be95c3f2e9fc05bfd9e8c938eaf491592f0c35 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 18 Apr 2017 15:10:34 -0500 Subject: [PATCH 084/202] add missing builder plugin config file /etc/kojid/plugins/save_failed_tree.conf was not listed in the builder files, add it and mark as config no replace. use /etc instead of %{_sysconfdir} as its shorter and a bit clearer Signed-off-by: Dennis Gilmore --- koji.spec | 57 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/koji.spec b/koji.spec index 03cd43f..ce04481 100644 --- a/koji.spec +++ b/koji.spec @@ -169,8 +169,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_bindir}/* %{python_sitelib}/%{name} -%config(noreplace) %{_sysconfdir}/koji.conf -%dir %{_sysconfdir}/koji.conf.d +%config(noreplace) /etc/koji.conf +%dir /etc/koji.conf.d %doc docs Authors COPYING LGPL %files hub @@ -178,17 +178,17 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/koji-hub %dir %{_libexecdir}/koji-hub %{_libexecdir}/koji-hub/rpmdiff -%config(noreplace) %{_sysconfdir}/httpd/conf.d/kojihub.conf -%dir %{_sysconfdir}/koji-hub -%config(noreplace) %{_sysconfdir}/koji-hub/hub.conf -%dir %{_sysconfdir}/koji-hub/hub.conf.d +%config(noreplace) /etc/httpd/conf.d/kojihub.conf +%dir /etc/koji-hub +%config(noreplace) /etc/koji-hub/hub.conf +%dir /etc/koji-hub/hub.conf.d %files hub-plugins %defattr(-,root,root) %dir %{_prefix}/lib/koji-hub-plugins %{_prefix}/lib/koji-hub-plugins/*.py* -%dir %{_sysconfdir}/koji-hub/plugins -%{_sysconfdir}/koji-hub/plugins/*.conf +%dir /etc/koji-hub/plugins +/etc/koji-hub/plugins/*.conf %files utils %defattr(-,root,root) @@ -197,24 +197,24 @@ rm -rf $RPM_BUILD_ROOT %{_unitdir}/kojira.service %else %{_initrddir}/kojira -%config(noreplace) %{_sysconfdir}/sysconfig/kojira +%config(noreplace) /etc/sysconfig/kojira %endif -%dir %{_sysconfdir}/kojira -%config(noreplace) %{_sysconfdir}/kojira/kojira.conf +%dir /etc/kojira +%config(noreplace) /etc/kojira/kojira.conf %{_sbindir}/koji-gc -%dir %{_sysconfdir}/koji-gc -%config(noreplace) %{_sysconfdir}/koji-gc/koji-gc.conf +%dir /etc/koji-gc +%config(noreplace) /etc/koji-gc/koji-gc.conf %{_sbindir}/koji-shadow -%dir %{_sysconfdir}/koji-shadow -%config(noreplace) %{_sysconfdir}/koji-shadow/koji-shadow.conf +%dir /etc/koji-shadow +%config(noreplace) /etc/koji-shadow/koji-shadow.conf %files web %defattr(-,root,root) %{_datadir}/koji-web -%dir %{_sysconfdir}/kojiweb -%config(noreplace) %{_sysconfdir}/kojiweb/web.conf -%config(noreplace) %{_sysconfdir}/httpd/conf.d/kojiweb.conf -%dir %{_sysconfdir}/kojiweb/web.conf.d +%dir /etc/kojiweb +%config(noreplace) /etc/kojiweb/web.conf +%config(noreplace) /etc/httpd/conf.d/kojiweb.conf +%dir /etc/kojiweb/web.conf.d %files builder %defattr(-,root,root) @@ -228,13 +228,14 @@ rm -rf $RPM_BUILD_ROOT %{_unitdir}/kojid.service %else %{_initrddir}/kojid -%config(noreplace) %{_sysconfdir}/sysconfig/kojid +%config(noreplace) /etc/sysconfig/kojid %endif -%dir %{_sysconfdir}/kojid -%dir %{_sysconfdir}/kojid/plugins -%config(noreplace) %{_sysconfdir}/kojid/kojid.conf -%config(noreplace) %{_sysconfdir}/kojid/plugins/runroot.conf -%attr(-,kojibuilder,kojibuilder) %{_sysconfdir}/mock/koji +%dir /etc/kojid +%dir /etc/kojid/plugins +%config(noreplace) /etc/kojid/kojid.conf +%config(noreplace) /etc/kojid/plugins/runroot.conf +%config(noreplace) /etc/kojid/plugins/save_failed_tree.conf +%attr(-,kojibuilder,kojibuilder) /etc/mock/koji %pre builder /usr/sbin/useradd -r -s /bin/bash -G mock -d /builddir -M kojibuilder 2>/dev/null ||: @@ -271,10 +272,10 @@ fi %{_unitdir}/kojivmd.service %else %{_initrddir}/kojivmd -%config(noreplace) %{_sysconfdir}/sysconfig/kojivmd +%config(noreplace) /etc/sysconfig/kojivmd %endif -%dir %{_sysconfdir}/kojivmd -%config(noreplace) %{_sysconfdir}/kojivmd/kojivmd.conf +%dir /etc/kojivmd +%config(noreplace) /etc/kojivmd/kojivmd.conf %if %{use_systemd} From 59c351908e19f583e45094916786ce897366d4ed Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 19 Apr 2017 15:27:02 -0500 Subject: [PATCH 085/202] add patch so that kojid starts without ssl auth configured Signed-off-by: Dennis Gilmore --- ...o-start-when-not-using-ssl-cert-auth.patch | 36 +++++++++++++++++++ koji.spec | 7 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch diff --git a/0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch b/0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch new file mode 100644 index 0000000..08d2ddc --- /dev/null +++ b/0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch @@ -0,0 +1,36 @@ +From 952465a544a0243b6112a10bfcfdffb1ad081fab Mon Sep 17 00:00:00 2001 +From: Dennis Gilmore +Date: Wed, 19 Apr 2017 14:51:19 -0500 +Subject: [PATCH] allow kojid to start when not using ssl cert auth + +kojid in koji 1.12.0 fails to start when not using ssl cert auth +Traceback (most recent call last): + File "/usr/sbin/kojid", line 5627, in + if os.path.isfile(options.cert): + File "/usr/lib64/python2.7/genericpath.py", line 37, in isfile + st = os.stat(path) + TypeError: coercing to Unicode: need string or buffer, NoneType found +if you do not have a cert option defined we should move on. so add +to the if statement a check that the option is actually defined + +Signed-off-by: Dennis Gilmore +--- + builder/kojid | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builder/kojid b/builder/kojid +index 6f3837a..dd46d4a 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -5624,7 +5624,7 @@ if __name__ == "__main__": + #start a session and login + session_opts = koji.grab_session_options(options) + session = koji.ClientSession(options.server, session_opts) +- if os.path.isfile(options.cert): ++ if options.cert and os.path.isfile(options.cert): + try: + # authenticate using SSL client certificates + session.ssl_login(options.cert, None, +-- +2.12.2 + diff --git a/koji.spec b/koji.spec index ce04481..482c315 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.12.0 -Release: 1%{?dist} +Release: 2%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -17,6 +17,7 @@ Group: Applications/System URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +Patch1: 0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch # Not upstreamable Patch100: fedora-config.patch @@ -154,6 +155,7 @@ koji-web is a web UI to the Koji system. %prep %setup -q +%patch1 -p1 -b %patch100 -p1 -b .fedoraconfig %build @@ -323,6 +325,9 @@ fi %endif %changelog +* Wed Apr 19 2017 Dennis Gilmore - 1.12.0-2 +- add patch so that kojid starts without ssl auth configured + * Tue Apr 18 2017 Dennis Gilmore - 1.12.0-1 - update to upstream 1.12.0 - remove rhel 5 conditionals as its no longer supported in epel From d0802633f2a4a90f56cd53f8792d929a9a130935 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 19 Apr 2017 15:31:04 -0500 Subject: [PATCH 086/202] remove extra -b from %%patch Signed-off-by: Dennis Gilmore --- koji.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 482c315..799397a 100644 --- a/koji.spec +++ b/koji.spec @@ -155,7 +155,7 @@ koji-web is a web UI to the Koji system. %prep %setup -q -%patch1 -p1 -b +%patch1 -p1 %patch100 -p1 -b .fedoraconfig %build From 3142586035691a8ec6c64b7c305653260fdb4653 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 23 May 2017 13:26:22 -0500 Subject: [PATCH 087/202] add some upstreamed patches needed to fix some things in fedora Signed-off-by: Dennis Gilmore --- ...afaeeb1c54ccfb86e20b1f35c0215635536a.patch | 58 +++++++++++++++++++ ...029d037a673e013211445cc6ac892c6ed11e.patch | 22 +++++++ ...e2c6b01f27f7a23546c64d775a1befd722e4.patch | 32 ++++++++++ koji.spec | 15 ++++- 4 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch create mode 100644 5bcf029d037a673e013211445cc6ac892c6ed11e.patch create mode 100644 7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch diff --git a/5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch b/5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch new file mode 100644 index 0000000..b96cb28 --- /dev/null +++ b/5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch @@ -0,0 +1,58 @@ +From 5a23afaeeb1c54ccfb86e20b1f35c0215635536a Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: May 04 2017 14:02:58 +0000 +Subject: Make proxyuser consistent between ssl and krb + + +Currently, krb would expect a krb principal where ssl expects a username. +This makes krb use the username, but also accept the krb_principal for +backwards compatibility. + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/koji/auth.py b/koji/auth.py +index 3cba331..105f998 100644 +--- a/koji/auth.py ++++ b/koji/auth.py +@@ -328,10 +328,14 @@ class Session(object): + login_principal = cprinc.name + user_id = self.getUserIdFromKerberos(login_principal) + if not user_id: +- if context.opts.get('LoginCreatesUser'): +- user_id = self.createUserFromKerberos(login_principal) +- else: +- raise koji.AuthError('Unknown Kerberos principal: %s' % login_principal) ++ user_id = self.getUserId(login_principal) ++ if not user_id: ++ # Only do autocreate if we also couldn't find by username AND the proxyuser ++ # looks like a krb5 principal ++ if context.opts.get('LoginCreatesUser') and '@' in login_principal: ++ user_id = self.createUserFromKerberos(login_principal) ++ else: ++ raise koji.AuthError('Unknown Kerberos principal: %s' % login_principal) + + self.checkLoginAllowed(user_id) + +@@ -575,6 +579,19 @@ class Session(object): + #for compatibility + return self.host_id + ++ def getUserId(self, username): ++ """Return the user ID associated with a particular username. If no user ++ with the given username if found, return None.""" ++ c = context.cnx.cursor() ++ q = """SELECT id FROM users WHERE name = %(username)s""" ++ c.execute(q, locals()) ++ r = c.fetchone() ++ c.close() ++ if r: ++ return r[0] ++ else: ++ return None ++ + def getUserIdFromKerberos(self, krb_principal): + """Return the user ID associated with a particular Kerberos principal. + If no user with the given princpal if found, return None.""" + diff --git a/5bcf029d037a673e013211445cc6ac892c6ed11e.patch b/5bcf029d037a673e013211445cc6ac892c6ed11e.patch new file mode 100644 index 0000000..2fb5b49 --- /dev/null +++ b/5bcf029d037a673e013211445cc6ac892c6ed11e.patch @@ -0,0 +1,22 @@ +From 5bcf029d037a673e013211445cc6ac892c6ed11e Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: May 19 2017 10:47:51 +0000 +Subject: don't inspect results for failed createImage tasks + + +--- + +diff --git a/builder/kojid b/builder/kojid +index 1a10483..235cbeb 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -2228,6 +2228,8 @@ class BuildBaseImageTask(BuildImageTask): + if 'kickstart' in opts: + saw_ks = False + for arch in results.keys(): ++ if arch in ignored_arches: ++ continue + ks = os.path.basename(opts.get('kickstart')) + if ks in results[arch]['files']: + if saw_ks: + diff --git a/7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch b/7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch new file mode 100644 index 0000000..6533fbf --- /dev/null +++ b/7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch @@ -0,0 +1,32 @@ +From 7ec0e2c6b01f27f7a23546c64d775a1befd722e4 Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: May 04 2017 14:02:58 +0000 +Subject: Make sslLogin use getUserId + + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/koji/auth.py b/koji/auth.py +index 105f998..6044590 100644 +--- a/koji/auth.py ++++ b/koji/auth.py +@@ -401,14 +401,8 @@ class Session(object): + else: + raise koji.AuthError('%s is not authorized to login other users' % client_dn) + +- cursor = context.cnx.cursor() +- query = """SELECT id FROM users +- WHERE name = %(username)s""" +- cursor.execute(query, locals()) +- result = cursor.fetchone() +- if result: +- user_id = result[0] +- else: ++ user_id = self.getUserId(username) ++ if not user_id: + if context.opts.get('LoginCreatesUser'): + user_id = self.createUser(username) + else: + diff --git a/koji.spec b/koji.spec index 799397a..6779255 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.12.0 -Release: 2%{?dist} +Release: 3%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -18,6 +18,13 @@ URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 Patch1: 0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch +# https://pagure.io/koji/c/5a23afaeeb1c54ccfb86e20b1f35c0215635536a?branch=master +Patch2: 5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch +# https://pagure.io/koji/c/7ec0e2c6b01f27f7a23546c64d775a1befd722e4?branch=master +Patch3: 7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch +# https://pagure.io/koji/c/5bcf029d037a673e013211445cc6ac892c6ed11e?branch=master +Patch4: 5bcf029d037a673e013211445cc6ac892c6ed11e.patch + # Not upstreamable Patch100: fedora-config.patch @@ -156,6 +163,9 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -325,6 +335,9 @@ fi %endif %changelog +* Tue May 23 2017 Dennis Gilmore - 1.12.0-3 +- add some upstreamed patches needed to fix some things in fedora + * Wed Apr 19 2017 Dennis Gilmore - 1.12.0-2 - add patch so that kojid starts without ssl auth configured From a4905168c107e5c4c79d1ef9b4ff2e7b0a877c05 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sat, 3 Jun 2017 20:17:21 +0200 Subject: [PATCH 088/202] Add patch from PR #403 Signed-off-by: Patrick Uiterwijk --- 403.patch | 226 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ koji.spec | 8 +- 2 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 403.patch diff --git a/403.patch b/403.patch new file mode 100644 index 0000000..a0a56ea --- /dev/null +++ b/403.patch @@ -0,0 +1,226 @@ +From 2ed39c5e95a16fbc5d6c3fed7c7d7ff54d973e4c Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: May 12 2017 07:52:42 +0000 +Subject: [PATCH 1/5] remove non-printable characters in fixEncoding + + +Some real-world changelogs contains non-printable characters or invalid +unicode ones. xmlrpc fails on such strings, so we sanitize changelog +strings before passing it to client. + +Related: https://pagure.io/koji/issue/349 + +--- + +diff --git a/hub/kojihub.py b/hub/kojihub.py +index 8c344f1..e7ad99f 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -9376,7 +9376,8 @@ class RootExports(object): + else: + results.append({'date': cldate, 'date_ts': cltime, 'author': clname, 'text': cltext}) + +- return _applyQueryOpts(results, queryOpts) ++ results = _applyQueryOpts(results, queryOpts) ++ return koji.fixEncodingRecurse(results) + + def cancelBuild(self, buildID): + """Cancel the build with the given buildID +diff --git a/koji/__init__.py b/koji/__init__.py +index 7bafee7..f3cc50f 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -2894,7 +2894,12 @@ def _taskLabel(taskInfo): + else: + return '%s (%s)' % (method, arch) + +-def fixEncoding(value, fallback='iso8859-15'): ++NONPRINTABLE = ''.join([chr(x) for x in range(10) + range(11, 13) + range(14, 32) + [127]]) ++def removeNonprintable(value): ++ # expects raw-encoded string, not unicode ++ return value.translate(None, NONPRINTABLE) ++ ++def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=True): + """ + Convert value to a 'str' object encoded as UTF-8. + If value is not valid UTF-8 to begin with, assume it is +@@ -2906,18 +2911,22 @@ def fixEncoding(value, fallback='iso8859-15'): + if isinstance(value, unicode): + # value is already unicode, so just convert it + # to a utf8-encoded str +- return value.encode('utf8') ++ s = value.encode('utf8') + else: + # value is a str, but may be encoded in utf8 or some + # other non-ascii charset. Try to verify it's utf8, and if not, + # decode it using the fallback encoding. + try: +- return value.decode('utf8').encode('utf8') ++ s = value.decode('utf8').encode('utf8') + except UnicodeDecodeError: +- return value.decode(fallback).encode('utf8') ++ s = value.decode(fallback).encode('utf8') ++ if remove_nonprintable: ++ return removeNonprintable(s) ++ else: ++ return s + + +-def fixEncodingRecurse(value, fallback='iso8859-15'): ++def fixEncodingRecurse(value, fallback='iso8859-15', remove_nonprintable=True): + """Recursively fix string encoding in an object + + Similar behavior to fixEncoding, but recursive +@@ -2934,15 +2943,22 @@ def fixEncodingRecurse(value, fallback='iso8859-15'): + ret[k] = v + return ret + elif isinstance(value, unicode): +- return value.encode('utf8') ++ if remove_nonprintable: ++ return removeNonprintable(value.encode('utf8')) ++ else: ++ return value.encode('utf8') + elif isinstance(value, str): + # value is a str, but may be encoded in utf8 or some + # other non-ascii charset. Try to verify it's utf8, and if not, + # decode it using the fallback encoding. + try: +- return value.decode('utf8').encode('utf8') +- except UnicodeDecodeError, err: +- return value.decode(fallback).encode('utf8') ++ s = value.decode('utf8').encode('utf8') ++ except UnicodeDecodeError: ++ s = value.decode(fallback).encode('utf8') ++ if remove_nonprintable: ++ return removeNonprintable(s) ++ else: ++ return s + else: + return value + + +From 6a1ea7d1dcd297d47da7d81e88474c3b2ac11e47 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: May 12 2017 07:52:42 +0000 +Subject: [PATCH 2/5] less restrictive filter + + +--- + +diff --git a/koji/__init__.py b/koji/__init__.py +index f3cc50f..d35db93 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -2894,10 +2894,11 @@ def _taskLabel(taskInfo): + else: + return '%s (%s)' % (method, arch) + +-NONPRINTABLE = ''.join([chr(x) for x in range(10) + range(11, 13) + range(14, 32) + [127]]) ++CONTROL_CHARS = [chr(i) for i in range(32)] ++NONPRINTABLE_CHARS = ''.join([c for c in CONTROL_CHARS if c not in '\r\n\t']) + def removeNonprintable(value): + # expects raw-encoded string, not unicode +- return value.translate(None, NONPRINTABLE) ++ return value.translate(None, NONPRINTABLE_CHARS) + + def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=True): + """ + +From a7b4389b81cb66816d4d93e0a4af0685dae01a83 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: May 12 2017 07:52:42 +0000 +Subject: [PATCH 3/5] don't remove nonprintable characters by default + + +--- + +diff --git a/hub/kojihub.py b/hub/kojihub.py +index e7ad99f..3258f03 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -9377,7 +9377,7 @@ class RootExports(object): + results.append({'date': cldate, 'date_ts': cltime, 'author': clname, 'text': cltext}) + + results = _applyQueryOpts(results, queryOpts) +- return koji.fixEncodingRecurse(results) ++ return koji.fixEncodingRecurse(results, remove_nonprintable=True) + + def cancelBuild(self, buildID): + """Cancel the build with the given buildID +diff --git a/koji/__init__.py b/koji/__init__.py +index d35db93..fc6456f 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -2900,7 +2900,7 @@ def removeNonprintable(value): + # expects raw-encoded string, not unicode + return value.translate(None, NONPRINTABLE_CHARS) + +-def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=True): ++def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=False): + """ + Convert value to a 'str' object encoded as UTF-8. + If value is not valid UTF-8 to begin with, assume it is +@@ -2927,7 +2927,7 @@ def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=True): + return s + + +-def fixEncodingRecurse(value, fallback='iso8859-15', remove_nonprintable=True): ++def fixEncodingRecurse(value, fallback='iso8859-15', remove_nonprintable=False): + """Recursively fix string encoding in an object + + Similar behavior to fixEncoding, but recursive + +From 356c026367c4ac24de940cacb48eabc117b485bc Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: May 12 2017 07:52:42 +0000 +Subject: [PATCH 4/5] propagate parameters recursively + + +--- + +diff --git a/koji/__init__.py b/koji/__init__.py +index fc6456f..84aceb0 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -2933,14 +2933,14 @@ def fixEncodingRecurse(value, fallback='iso8859-15', remove_nonprintable=False): + Similar behavior to fixEncoding, but recursive + """ + if isinstance(value, tuple): +- return tuple([fixEncodingRecurse(x) for x in value]) ++ return tuple([fixEncodingRecurse(x, fallback=fallback, remove_nonprintable=remove_nonprintable) for x in value]) + elif isinstance(value, list): +- return list([fixEncodingRecurse(x) for x in value]) ++ return list([fixEncodingRecurse(x, fallback=fallback, remove_nonprintable=remove_nonprintable) for x in value]) + elif isinstance(value, dict): + ret = {} + for k in value: +- v = fixEncodingRecurse(value[k]) +- k = fixEncodingRecurse(k) ++ v = fixEncodingRecurse(value[k], fallback=fallback, remove_nonprintable=remove_nonprintable) ++ k = fixEncodingRecurse(k, fallback=fallback, remove_nonprintable=remove_nonprintable) + ret[k] = v + return ret + elif isinstance(value, unicode): + +From 4d37db92502dd8098ebcb77ba28fc5fc71214f55 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: May 12 2017 07:58:03 +0000 +Subject: [PATCH 5/5] remove non-printable characters from getRPMHeaders result + + +--- + +diff --git a/hub/kojihub.py b/hub/kojihub.py +index 3258f03..e3afce1 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -9885,7 +9885,7 @@ class RootExports(object): + headers = koji.get_header_fields(rpm_path, headers) + for key, value in headers.items(): + if isinstance(value, basestring): +- headers[key] = koji.fixEncoding(value) ++ headers[key] = koji.fixEncoding(value, remove_nonprintable=True) + return headers + + queryRPMSigs = staticmethod(query_rpm_sigs) + diff --git a/koji.spec b/koji.spec index 6779255..fb25534 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.12.0 -Release: 3%{?dist} +Release: 4%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -24,6 +24,8 @@ Patch2: 5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch Patch3: 7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch # https://pagure.io/koji/c/5bcf029d037a673e013211445cc6ac892c6ed11e?branch=master Patch4: 5bcf029d037a673e013211445cc6ac892c6ed11e.patch +# https://pagure.io/koji/pull-request/403.patch +Patch5: 403.patch # Not upstreamable Patch100: fedora-config.patch @@ -166,6 +168,7 @@ koji-web is a web UI to the Koji system. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -335,6 +338,9 @@ fi %endif %changelog +* Sat Jun 03 2017 Patrick Uiterwijk - 1.12.0-4 +- Add upstreamed patch for #349 + * Tue May 23 2017 Dennis Gilmore - 1.12.0-3 - add some upstreamed patches needed to fix some things in fedora From 59e7c097f68dde14764fbae9e1e7f30841c11f4e Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sun, 4 Jun 2017 01:24:37 +0200 Subject: [PATCH 089/202] Add one last patch to fix the issue Signed-off-by: Patrick Uiterwijk --- 449.patch | 30 ++++++++++++++++++++++++++++++ koji.spec | 8 +++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 449.patch diff --git a/449.patch b/449.patch new file mode 100644 index 0000000..272ac54 --- /dev/null +++ b/449.patch @@ -0,0 +1,30 @@ +From 8c53aa3933cf51abd326ba5bc5811d04cf19488a Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Jun 03 2017 23:17:44 +0000 +Subject: Make sure to fix encoding all RPM Headers + + +The fix in #403 left some RPM Headers unfixed, most notably changelog* (because those are lists). +This patch makes use of fixEncodingRecurse to make sure all heades get encoded correctly. + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/hub/kojihub.py b/hub/kojihub.py +index 947f60d..d300038 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -9883,10 +9883,7 @@ class RootExports(object): + raise koji.GenericError('either rpmID or taskID and filepath must be specified') + + headers = koji.get_header_fields(rpm_path, headers) +- for key, value in headers.items(): +- if isinstance(value, six.string_types): +- headers[key] = koji.fixEncoding(value, remove_nonprintable=True) +- return headers ++ return koji.fixEncodingRecurse(headers, remove_nonprintable=True) + + queryRPMSigs = staticmethod(query_rpm_sigs) + + diff --git a/koji.spec b/koji.spec index fb25534..4571dac 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.12.0 -Release: 4%{?dist} +Release: 5%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -26,6 +26,8 @@ Patch3: 7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch Patch4: 5bcf029d037a673e013211445cc6ac892c6ed11e.patch # https://pagure.io/koji/pull-request/403.patch Patch5: 403.patch +# https://pagure.io/koji/pull-request/449.patch +Patch6: 449.patch # Not upstreamable Patch100: fedora-config.patch @@ -169,6 +171,7 @@ koji-web is a web UI to the Koji system. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -338,6 +341,9 @@ fi %endif %changelog +* Sat Jun 03 2017 Patrick Uiterwijk - 1.12.0-5 +- Add patch for completing #349 fix + * Sat Jun 03 2017 Patrick Uiterwijk - 1.12.0-4 - Add upstreamed patch for #349 From 060c8eea21a9c7bb23657fb09ced0595d90c91a9 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sun, 4 Jun 2017 01:28:45 +0200 Subject: [PATCH 090/202] Backport patch Signed-off-by: Patrick Uiterwijk --- 449.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/449.patch b/449.patch index 272ac54..26e550d 100644 --- a/449.patch +++ b/449.patch @@ -12,15 +12,15 @@ Signed-off-by: Patrick Uiterwijk --- diff --git a/hub/kojihub.py b/hub/kojihub.py -index 947f60d..d300038 100644 +index 05dfb27..6257f20 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py -@@ -9883,10 +9883,7 @@ class RootExports(object): +@@ -9878,10 +9878,7 @@ class RootExports(object): raise koji.GenericError('either rpmID or taskID and filepath must be specified') headers = koji.get_header_fields(rpm_path, headers) - for key, value in headers.items(): -- if isinstance(value, six.string_types): +- if isinstance(value, basestring): - headers[key] = koji.fixEncoding(value, remove_nonprintable=True) - return headers + return koji.fixEncodingRecurse(headers, remove_nonprintable=True) From ea2a52e86a570305493caf249b88e790b5fb7a16 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 14 Jun 2017 14:58:51 -0500 Subject: [PATCH 091/202] change koji-web requires from mod_auth_kerb to mod_auth_gssapi Signed-off-by: Dennis Gilmore --- koji.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 4571dac..e8e3361 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.12.0 -Release: 5%{?dist} +Release: 6%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -155,7 +155,7 @@ Group: Applications/Internet License: LGPLv2 Requires: httpd Requires: mod_wsgi -Requires: mod_auth_kerb +Requires: mod_auth_gssapi Requires: python-psycopg2 Requires: python-cheetah Requires: %{name} = %{version}-%{release} @@ -341,6 +341,9 @@ fi %endif %changelog +* Wed Jun 14 2017 Dennis Gilmore - 1.12.0-6 +- change koji-web requires from mod_auth_kerb to mod_auth_gssapi + * Sat Jun 03 2017 Patrick Uiterwijk - 1.12.0-5 - Add patch for completing #349 fix From 734acdb982d847fbc3837abedac1973fc85a3116 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 3 Jul 2017 12:47:46 -0500 Subject: [PATCH 092/202] update to upstream 1.13.0 remove old changelog entries Signed-off-by: Dennis Gilmore --- .gitignore | 1 + ...o-start-when-not-using-ssl-cert-auth.patch | 36 -- 403.patch | 226 -------- 449.patch | 30 -- ...afaeeb1c54ccfb86e20b1f35c0215635536a.patch | 58 --- ...029d037a673e013211445cc6ac892c6ed11e.patch | 22 - ...e2c6b01f27f7a23546c64d775a1befd722e4.patch | 32 -- fedora-config.patch | 20 +- koji.spec | 488 +++++------------- sources | 2 +- 10 files changed, 140 insertions(+), 775 deletions(-) delete mode 100644 0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch delete mode 100644 403.patch delete mode 100644 449.patch delete mode 100644 5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch delete mode 100644 5bcf029d037a673e013211445cc6ac892c6ed11e.patch delete mode 100644 7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch diff --git a/.gitignore b/.gitignore index 535a6b2..1092685 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ koji-1.4.0.tar.bz2 /koji-1.10.1.tar.bz2 /koji-1.11.0.tar.bz2 /koji-1.12.0.tar.bz2 +/koji-1.13.0.tar.bz2 diff --git a/0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch b/0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch deleted file mode 100644 index 08d2ddc..0000000 --- a/0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 952465a544a0243b6112a10bfcfdffb1ad081fab Mon Sep 17 00:00:00 2001 -From: Dennis Gilmore -Date: Wed, 19 Apr 2017 14:51:19 -0500 -Subject: [PATCH] allow kojid to start when not using ssl cert auth - -kojid in koji 1.12.0 fails to start when not using ssl cert auth -Traceback (most recent call last): - File "/usr/sbin/kojid", line 5627, in - if os.path.isfile(options.cert): - File "/usr/lib64/python2.7/genericpath.py", line 37, in isfile - st = os.stat(path) - TypeError: coercing to Unicode: need string or buffer, NoneType found -if you do not have a cert option defined we should move on. so add -to the if statement a check that the option is actually defined - -Signed-off-by: Dennis Gilmore ---- - builder/kojid | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/builder/kojid b/builder/kojid -index 6f3837a..dd46d4a 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -5624,7 +5624,7 @@ if __name__ == "__main__": - #start a session and login - session_opts = koji.grab_session_options(options) - session = koji.ClientSession(options.server, session_opts) -- if os.path.isfile(options.cert): -+ if options.cert and os.path.isfile(options.cert): - try: - # authenticate using SSL client certificates - session.ssl_login(options.cert, None, --- -2.12.2 - diff --git a/403.patch b/403.patch deleted file mode 100644 index a0a56ea..0000000 --- a/403.patch +++ /dev/null @@ -1,226 +0,0 @@ -From 2ed39c5e95a16fbc5d6c3fed7c7d7ff54d973e4c Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: May 12 2017 07:52:42 +0000 -Subject: [PATCH 1/5] remove non-printable characters in fixEncoding - - -Some real-world changelogs contains non-printable characters or invalid -unicode ones. xmlrpc fails on such strings, so we sanitize changelog -strings before passing it to client. - -Related: https://pagure.io/koji/issue/349 - ---- - -diff --git a/hub/kojihub.py b/hub/kojihub.py -index 8c344f1..e7ad99f 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -9376,7 +9376,8 @@ class RootExports(object): - else: - results.append({'date': cldate, 'date_ts': cltime, 'author': clname, 'text': cltext}) - -- return _applyQueryOpts(results, queryOpts) -+ results = _applyQueryOpts(results, queryOpts) -+ return koji.fixEncodingRecurse(results) - - def cancelBuild(self, buildID): - """Cancel the build with the given buildID -diff --git a/koji/__init__.py b/koji/__init__.py -index 7bafee7..f3cc50f 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -2894,7 +2894,12 @@ def _taskLabel(taskInfo): - else: - return '%s (%s)' % (method, arch) - --def fixEncoding(value, fallback='iso8859-15'): -+NONPRINTABLE = ''.join([chr(x) for x in range(10) + range(11, 13) + range(14, 32) + [127]]) -+def removeNonprintable(value): -+ # expects raw-encoded string, not unicode -+ return value.translate(None, NONPRINTABLE) -+ -+def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=True): - """ - Convert value to a 'str' object encoded as UTF-8. - If value is not valid UTF-8 to begin with, assume it is -@@ -2906,18 +2911,22 @@ def fixEncoding(value, fallback='iso8859-15'): - if isinstance(value, unicode): - # value is already unicode, so just convert it - # to a utf8-encoded str -- return value.encode('utf8') -+ s = value.encode('utf8') - else: - # value is a str, but may be encoded in utf8 or some - # other non-ascii charset. Try to verify it's utf8, and if not, - # decode it using the fallback encoding. - try: -- return value.decode('utf8').encode('utf8') -+ s = value.decode('utf8').encode('utf8') - except UnicodeDecodeError: -- return value.decode(fallback).encode('utf8') -+ s = value.decode(fallback).encode('utf8') -+ if remove_nonprintable: -+ return removeNonprintable(s) -+ else: -+ return s - - --def fixEncodingRecurse(value, fallback='iso8859-15'): -+def fixEncodingRecurse(value, fallback='iso8859-15', remove_nonprintable=True): - """Recursively fix string encoding in an object - - Similar behavior to fixEncoding, but recursive -@@ -2934,15 +2943,22 @@ def fixEncodingRecurse(value, fallback='iso8859-15'): - ret[k] = v - return ret - elif isinstance(value, unicode): -- return value.encode('utf8') -+ if remove_nonprintable: -+ return removeNonprintable(value.encode('utf8')) -+ else: -+ return value.encode('utf8') - elif isinstance(value, str): - # value is a str, but may be encoded in utf8 or some - # other non-ascii charset. Try to verify it's utf8, and if not, - # decode it using the fallback encoding. - try: -- return value.decode('utf8').encode('utf8') -- except UnicodeDecodeError, err: -- return value.decode(fallback).encode('utf8') -+ s = value.decode('utf8').encode('utf8') -+ except UnicodeDecodeError: -+ s = value.decode(fallback).encode('utf8') -+ if remove_nonprintable: -+ return removeNonprintable(s) -+ else: -+ return s - else: - return value - - -From 6a1ea7d1dcd297d47da7d81e88474c3b2ac11e47 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: May 12 2017 07:52:42 +0000 -Subject: [PATCH 2/5] less restrictive filter - - ---- - -diff --git a/koji/__init__.py b/koji/__init__.py -index f3cc50f..d35db93 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -2894,10 +2894,11 @@ def _taskLabel(taskInfo): - else: - return '%s (%s)' % (method, arch) - --NONPRINTABLE = ''.join([chr(x) for x in range(10) + range(11, 13) + range(14, 32) + [127]]) -+CONTROL_CHARS = [chr(i) for i in range(32)] -+NONPRINTABLE_CHARS = ''.join([c for c in CONTROL_CHARS if c not in '\r\n\t']) - def removeNonprintable(value): - # expects raw-encoded string, not unicode -- return value.translate(None, NONPRINTABLE) -+ return value.translate(None, NONPRINTABLE_CHARS) - - def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=True): - """ - -From a7b4389b81cb66816d4d93e0a4af0685dae01a83 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: May 12 2017 07:52:42 +0000 -Subject: [PATCH 3/5] don't remove nonprintable characters by default - - ---- - -diff --git a/hub/kojihub.py b/hub/kojihub.py -index e7ad99f..3258f03 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -9377,7 +9377,7 @@ class RootExports(object): - results.append({'date': cldate, 'date_ts': cltime, 'author': clname, 'text': cltext}) - - results = _applyQueryOpts(results, queryOpts) -- return koji.fixEncodingRecurse(results) -+ return koji.fixEncodingRecurse(results, remove_nonprintable=True) - - def cancelBuild(self, buildID): - """Cancel the build with the given buildID -diff --git a/koji/__init__.py b/koji/__init__.py -index d35db93..fc6456f 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -2900,7 +2900,7 @@ def removeNonprintable(value): - # expects raw-encoded string, not unicode - return value.translate(None, NONPRINTABLE_CHARS) - --def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=True): -+def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=False): - """ - Convert value to a 'str' object encoded as UTF-8. - If value is not valid UTF-8 to begin with, assume it is -@@ -2927,7 +2927,7 @@ def fixEncoding(value, fallback='iso8859-15', remove_nonprintable=True): - return s - - --def fixEncodingRecurse(value, fallback='iso8859-15', remove_nonprintable=True): -+def fixEncodingRecurse(value, fallback='iso8859-15', remove_nonprintable=False): - """Recursively fix string encoding in an object - - Similar behavior to fixEncoding, but recursive - -From 356c026367c4ac24de940cacb48eabc117b485bc Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: May 12 2017 07:52:42 +0000 -Subject: [PATCH 4/5] propagate parameters recursively - - ---- - -diff --git a/koji/__init__.py b/koji/__init__.py -index fc6456f..84aceb0 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -2933,14 +2933,14 @@ def fixEncodingRecurse(value, fallback='iso8859-15', remove_nonprintable=False): - Similar behavior to fixEncoding, but recursive - """ - if isinstance(value, tuple): -- return tuple([fixEncodingRecurse(x) for x in value]) -+ return tuple([fixEncodingRecurse(x, fallback=fallback, remove_nonprintable=remove_nonprintable) for x in value]) - elif isinstance(value, list): -- return list([fixEncodingRecurse(x) for x in value]) -+ return list([fixEncodingRecurse(x, fallback=fallback, remove_nonprintable=remove_nonprintable) for x in value]) - elif isinstance(value, dict): - ret = {} - for k in value: -- v = fixEncodingRecurse(value[k]) -- k = fixEncodingRecurse(k) -+ v = fixEncodingRecurse(value[k], fallback=fallback, remove_nonprintable=remove_nonprintable) -+ k = fixEncodingRecurse(k, fallback=fallback, remove_nonprintable=remove_nonprintable) - ret[k] = v - return ret - elif isinstance(value, unicode): - -From 4d37db92502dd8098ebcb77ba28fc5fc71214f55 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: May 12 2017 07:58:03 +0000 -Subject: [PATCH 5/5] remove non-printable characters from getRPMHeaders result - - ---- - -diff --git a/hub/kojihub.py b/hub/kojihub.py -index 3258f03..e3afce1 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -9885,7 +9885,7 @@ class RootExports(object): - headers = koji.get_header_fields(rpm_path, headers) - for key, value in headers.items(): - if isinstance(value, basestring): -- headers[key] = koji.fixEncoding(value) -+ headers[key] = koji.fixEncoding(value, remove_nonprintable=True) - return headers - - queryRPMSigs = staticmethod(query_rpm_sigs) - diff --git a/449.patch b/449.patch deleted file mode 100644 index 26e550d..0000000 --- a/449.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 8c53aa3933cf51abd326ba5bc5811d04cf19488a Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: Jun 03 2017 23:17:44 +0000 -Subject: Make sure to fix encoding all RPM Headers - - -The fix in #403 left some RPM Headers unfixed, most notably changelog* (because those are lists). -This patch makes use of fixEncodingRecurse to make sure all heades get encoded correctly. - -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/hub/kojihub.py b/hub/kojihub.py -index 05dfb27..6257f20 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -9878,10 +9878,7 @@ class RootExports(object): - raise koji.GenericError('either rpmID or taskID and filepath must be specified') - - headers = koji.get_header_fields(rpm_path, headers) -- for key, value in headers.items(): -- if isinstance(value, basestring): -- headers[key] = koji.fixEncoding(value, remove_nonprintable=True) -- return headers -+ return koji.fixEncodingRecurse(headers, remove_nonprintable=True) - - queryRPMSigs = staticmethod(query_rpm_sigs) - - diff --git a/5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch b/5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch deleted file mode 100644 index b96cb28..0000000 --- a/5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 5a23afaeeb1c54ccfb86e20b1f35c0215635536a Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: May 04 2017 14:02:58 +0000 -Subject: Make proxyuser consistent between ssl and krb - - -Currently, krb would expect a krb principal where ssl expects a username. -This makes krb use the username, but also accept the krb_principal for -backwards compatibility. - -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/koji/auth.py b/koji/auth.py -index 3cba331..105f998 100644 ---- a/koji/auth.py -+++ b/koji/auth.py -@@ -328,10 +328,14 @@ class Session(object): - login_principal = cprinc.name - user_id = self.getUserIdFromKerberos(login_principal) - if not user_id: -- if context.opts.get('LoginCreatesUser'): -- user_id = self.createUserFromKerberos(login_principal) -- else: -- raise koji.AuthError('Unknown Kerberos principal: %s' % login_principal) -+ user_id = self.getUserId(login_principal) -+ if not user_id: -+ # Only do autocreate if we also couldn't find by username AND the proxyuser -+ # looks like a krb5 principal -+ if context.opts.get('LoginCreatesUser') and '@' in login_principal: -+ user_id = self.createUserFromKerberos(login_principal) -+ else: -+ raise koji.AuthError('Unknown Kerberos principal: %s' % login_principal) - - self.checkLoginAllowed(user_id) - -@@ -575,6 +579,19 @@ class Session(object): - #for compatibility - return self.host_id - -+ def getUserId(self, username): -+ """Return the user ID associated with a particular username. If no user -+ with the given username if found, return None.""" -+ c = context.cnx.cursor() -+ q = """SELECT id FROM users WHERE name = %(username)s""" -+ c.execute(q, locals()) -+ r = c.fetchone() -+ c.close() -+ if r: -+ return r[0] -+ else: -+ return None -+ - def getUserIdFromKerberos(self, krb_principal): - """Return the user ID associated with a particular Kerberos principal. - If no user with the given princpal if found, return None.""" - diff --git a/5bcf029d037a673e013211445cc6ac892c6ed11e.patch b/5bcf029d037a673e013211445cc6ac892c6ed11e.patch deleted file mode 100644 index 2fb5b49..0000000 --- a/5bcf029d037a673e013211445cc6ac892c6ed11e.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 5bcf029d037a673e013211445cc6ac892c6ed11e Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: May 19 2017 10:47:51 +0000 -Subject: don't inspect results for failed createImage tasks - - ---- - -diff --git a/builder/kojid b/builder/kojid -index 1a10483..235cbeb 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -2228,6 +2228,8 @@ class BuildBaseImageTask(BuildImageTask): - if 'kickstart' in opts: - saw_ks = False - for arch in results.keys(): -+ if arch in ignored_arches: -+ continue - ks = os.path.basename(opts.get('kickstart')) - if ks in results[arch]['files']: - if saw_ks: - diff --git a/7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch b/7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch deleted file mode 100644 index 6533fbf..0000000 --- a/7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7ec0e2c6b01f27f7a23546c64d775a1befd722e4 Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: May 04 2017 14:02:58 +0000 -Subject: Make sslLogin use getUserId - - -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/koji/auth.py b/koji/auth.py -index 105f998..6044590 100644 ---- a/koji/auth.py -+++ b/koji/auth.py -@@ -401,14 +401,8 @@ class Session(object): - else: - raise koji.AuthError('%s is not authorized to login other users' % client_dn) - -- cursor = context.cnx.cursor() -- query = """SELECT id FROM users -- WHERE name = %(username)s""" -- cursor.execute(query, locals()) -- result = cursor.fetchone() -- if result: -- user_id = result[0] -- else: -+ user_id = self.getUserId(username) -+ if not user_id: - if context.opts.get('LoginCreatesUser'): - user_id = self.createUser(username) - else: - diff --git a/fedora-config.patch b/fedora-config.patch index 4260bed..ec80300 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,6 +1,6 @@ ---- koji-1.12.0/cli/koji.conf.orig 2017-04-18 14:35:15.879593521 -0500 -+++ koji-1.12.0/cli/koji.conf 2017-04-18 14:37:45.818233378 -0500 -@@ -3,18 +3,20 @@ +--- koji-1.13.0/cli/koji.conf.fedoraconfig 2017-06-30 14:00:26.000000000 -0500 ++++ koji-1.13.0/cli/koji.conf 2017-07-03 12:41:55.615758878 -0500 +@@ -3,18 +3,23 @@ ;configuration for koji cli tool ;url of XMLRPC server @@ -18,16 +18,19 @@ ;path to the koji top directory ;topdir = /mnt/koji ++; use the fast upload feature of koji by default ++use_fast_upload = yes ++ ;configuration for Kerberos authentication +authtype = kerberos +krb_rdns = false ;the service name of the principal being used by the hub ;krbservice = host -@@ -25,10 +27,4 @@ +@@ -25,13 +30,6 @@ ;the keytab to auth as for automated clients ;keytab = /etc/krb5.keytab - + -;configuration for SSL authentication - -;client certificate @@ -35,4 +38,9 @@ - -;certificate of the CA that issued the HTTP server certificate -;serverca = ~/.koji/serverca.crt -+use_fast_upload = yes +- +-;enabled plugins for CLI, runroot and save_failed_tree are available +-;plugins = ++;enabled plugins for CLI, runroot is enabled by deafult for fedora ++;save_failed_tree is available ++plugins = runroot diff --git a/koji.spec b/koji.spec index e8e3361..a0ddc4f 100644 --- a/koji.spec +++ b/koji.spec @@ -1,4 +1,21 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from %distutils.sysconfig import get_python_lib; print(get_python_lib())")} +# Enable Python 3 builds for Fedora + EPEL >5 +# NOTE: do **NOT** change 'epel' to 'rhel' here, as this spec is also +%if 0%{?fedora} || 0%{?epel} > 5 +%bcond_without python3 +# If the definition isn't available for python3_pkgversion, define it +%{?!python3_pkgversion:%global python3_pkgversion 3} +%else +%bcond_with python3 +%endif + +# Compatibility with RHEL. These macros have been added to EPEL but +# not yet to RHEL proper. +# https://bugzilla.redhat.com/show_bug.cgi?id=1307190 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} +%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} %if 0%{?fedora} || 0%{?rhel} >= 7 %global use_systemd 1 @@ -8,8 +25,8 @@ %endif Name: koji -Version: 1.12.0 -Release: 6%{?dist} +Version: 1.13.0 +Release: 1%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -17,43 +34,85 @@ Group: Applications/System URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -Patch1: 0001-allow-kojid-to-start-when-not-using-ssl-cert-auth.patch -# https://pagure.io/koji/c/5a23afaeeb1c54ccfb86e20b1f35c0215635536a?branch=master -Patch2: 5a23afaeeb1c54ccfb86e20b1f35c0215635536a.patch -# https://pagure.io/koji/c/7ec0e2c6b01f27f7a23546c64d775a1befd722e4?branch=master -Patch3: 7ec0e2c6b01f27f7a23546c64d775a1befd722e4.patch -# https://pagure.io/koji/c/5bcf029d037a673e013211445cc6ac892c6ed11e?branch=master -Patch4: 5bcf029d037a673e013211445cc6ac892c6ed11e.patch -# https://pagure.io/koji/pull-request/403.patch -Patch5: 403.patch -# https://pagure.io/koji/pull-request/449.patch -Patch6: 449.patch - # Not upstreamable Patch100: fedora-config.patch BuildArch: noarch -Requires: python-krbV >= 1.0.13 -Requires: rpm-python -Requires: pyOpenSSL -Requires: python-requests -Requires: python-requests-kerberos -Requires: python-urlgrabber -Requires: python-dateutil +%if 0%{with python3} +Requires: python3-%{name} = %{version}-%{release} +Requires: python3-pycurl +Requires: python3-libcomps +%else +Requires: python2-%{name} = %{version}-%{release} +Requires: python2-pycurl +%if 0%{?fedora} || 0%{?rhel} >= 7 +Requires: python2-libcomps +%endif +%endif BuildRequires: python BuildRequires: python-sphinx %if %{use_systemd} BuildRequires: systemd BuildRequires: pkgconfig %endif -%if 0%{?fedora} || 0%{?rhel} >= 7 -Requires: python-libcomps -%endif %description Koji is a system for building and tracking RPMS. The base package contains shared libraries and the command-line interface. +%package -n python2-%{name} +Summary: Build system tools python library +%{?python_provide:%python_provide python2-%{name}} +BuildRequires: python2-devel +Requires: python-krbV >= 1.0.13 +Requires: rpm-python +Requires: pyOpenSSL +Requires: python-requests +Requires: python-requests-kerberos +Requires: python-dateutil +Requires: python-six + +%description -n python2-%{name} +Koji is a system for building and tracking RPMS. The base package +contains shared libraries and the command-line interface. + +%if 0%{with python3} +%package -n python3-%{name} +Summary: Build system tools python library +%{?python_provide:%python_provide python3-%{name}} +BuildRequires: python3-devel +Requires: python3-rpm +Requires: python3-pyOpenSSL +Requires: python3-requests +Requires: python3-requests-kerberos +Requires: python3-dateutil +Requires: python3-six + +%description -n python3-%{name} +Koji is a system for building and tracking RPMS. The base package +contains shared libraries and the command-line interface. +%endif + +%package -n python2-%{name}-cli-plugins +Summary: Koji client plugins +Group: Applications/Internet +License: LGPLv2 +Requires: %{name} = %{version}-%{release} + +%description -n python2-%{name}-cli-plugins +Plugins to the koji command-line interface + +%if 0%{with python3} +%package -n python3-%{name}-cli-plugins +Summary: Koji client plugins +Group: Applications/Internet +License: LGPLv2 +Requires: %{name} = %{version}-%{release} + +%description -n python3-%{name}-cli-plugins +Plugins to the koji command-line interface +%endif + %package hub Summary: Koji XMLRPC interface Group: Applications/Internet @@ -166,12 +225,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -179,6 +232,16 @@ koji-web is a web UI to the Koji system. %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT %{?install_opt} install +%if 0%{with python3} +cd koji +make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install +cd ../cli +make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install +cd ../plugins +make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install +# alter python interpreter in koji CLI +sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/bin/koji +%endif %clean rm -rf $RPM_BUILD_ROOT @@ -186,11 +249,37 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_bindir}/* -%{python_sitelib}/%{name} %config(noreplace) /etc/koji.conf %dir /etc/koji.conf.d %doc docs Authors COPYING LGPL +%files -n python2-%{name} +%defattr(-,root,root) +%{python2_sitelib}/%{name} +%{python2_sitelib}/koji_cli + +%if 0%{with python3} +%files -n python%{python3_pkgversion}-koji +%{python3_sitelib}/%{name} +%{python3_sitelib}/koji_cli +%endif + +%files -n python2-%{name}-cli-plugins +%defattr(-,root,root) +%{python2_sitelib}/koji_cli_plugins +# we don't have config files for default plugins yet +#%%dir %{_sysconfdir}/koji/plugins +#%%config(noreplace) %{_sysconfdir}/koji/plugins/*.conf + +%if 0%{with python3} +%files -n python%{python3_pkgversion}-%{name}-cli-plugins +%defattr(-,root,root) +%{python3_sitelib}/koji_cli_plugins +# we don't have config files for default plugins yet +#%%dir %{_sysconfdir}/koji/plugins +#%%config(noreplace) %{_sysconfdir}/koji/plugins/*.conf +%endif + %files hub %defattr(-,root,root) %{_datadir}/koji-hub @@ -341,335 +430,6 @@ fi %endif %changelog -* Wed Jun 14 2017 Dennis Gilmore - 1.12.0-6 -- change koji-web requires from mod_auth_kerb to mod_auth_gssapi - -* Sat Jun 03 2017 Patrick Uiterwijk - 1.12.0-5 -- Add patch for completing #349 fix - -* Sat Jun 03 2017 Patrick Uiterwijk - 1.12.0-4 -- Add upstreamed patch for #349 - -* Tue May 23 2017 Dennis Gilmore - 1.12.0-3 -- add some upstreamed patches needed to fix some things in fedora - -* Wed Apr 19 2017 Dennis Gilmore - 1.12.0-2 -- add patch so that kojid starts without ssl auth configured - -* Tue Apr 18 2017 Dennis Gilmore - 1.12.0-1 -- update to upstream 1.12.0 -- remove rhel 5 conditionals as its no longer supported in epel - -* Fri Feb 10 2017 Fedora Release Engineering - 1.11.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Sun Jan 08 2017 Till Maas - 1.11.0-5 -- Do not apply faulty CheckClientIP patch - -* Sun Jan 08 2017 Till Maas - 1.11.0-4 -- Add patch for keytab kerberos client config -- Move non upstreamable Fedora patch to the end to ease rebasing to future - upstream release -- Move license comment before license tag - -* Sat Jan 07 2017 Till Maas - 1.11.0-3 -- Add patches for proxy IP forwarding - -* Fri Jan 06 2017 Till Maas - 1.11.0-2 -- Update upstream URLs -- Add upstream koji-gc kerberos patches -- Use Source0 - -* Fri Dec 09 2016 Dennis Gilmore - 1.11.0-1 -- update to 1.11.0 -- setup fedora config for kerberos and flag day - -* Wed Sep 28 2016 Adam Miller - 1.10.1-13 -- Patch new-chroot functionality into runroot plugin - -* Tue Aug 23 2016 Dennis Gilmore - 1.10.1-12 -- add patch to disable bind mounting into image tasks chroots - -* Tue Jul 19 2016 Fedora Release Engineering - 1.10.1-11 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Thu May 26 2016 Dennis Gilmore - 1.10.1-10 -- add patch to enable dns in runroot chroots - -* Tue May 24 2016 Dennis Gilmore - 1.10.1-9 -- update to git master upstream, add lmc cosmetic fixes -- add patch to disable login in koji-web - -* Fri Apr 08 2016 Dennis Gilmore - 1.10.1-8 -- do not remove the - for project on livemedia -- fix the sending of messages on image completion - -* Thu Apr 07 2016 Dennis Gilmore - 1.10.1-7 -- --product had to be --project -- add missing Requires for koji-builder on python2-multilib - -* Wed Apr 06 2016 Dennis Gilmore - 1.10.1-6 -- add --product to livemedia-creator calls rhbz#1315110 - -* Wed Apr 06 2016 Dennis Gilmore - 1.10.1-5 -- enable dns in runroots -- add koji signed repo support -- Run plugin callbacks when image builds finish - -* Thu Mar 03 2016 Dennis Gilmore - 1.10.1-4 -- add a patch to install the runroot builder plugin in the correct place - -* Tue Mar 01 2016 Dennis Gilmore - 1.10.1-3 -- update to git e8201aac8294e6125a73504886b0800041b58868 -- https://pagure.io/fork/ausil/koji/branch/fedora-infra - -* Thu Feb 04 2016 Fedora Release Engineering - 1.10.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Nov 17 2015 Dennis Gilmore - 1.10.1-1 -- update to 1.10.1 -- Requires yum in the cli rhbz#1230888 - -* Thu Sep 24 2015 Kalev Lember - 1.10.0-2 -- Backport two patches to fix ClientSession SSL errors - -* Thu Jul 16 2015 Dennis Gilmore - 1.10.0=1 -- update to 1.10.0 release - -* Mon Jul 06 2015 Dennis Gilmore - 1.9.0-13.20150607gitf426fdb -- update the git snapshot to latest head -- enable systemd units for f23 up - -* Wed Jun 17 2015 Fedora Release Engineering - 1.9.0-12.20150423git52a0188 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Apr 23 2015 Dennis Gilmore - 1.9.0-11.20150423git52a0188 -- update to latest git - -* Tue Jan 27 2015 Dennis Gilmore - 1.9.0-10.gitcd45e886 -- update to git tarball - -* Thu Dec 11 2014 Dennis Gilmore - 1.9.0-9 -- add upstream patch switching to TLS1 from sslv3 - -* Tue Sep 30 2014 Dennis Gilmore - 1.9.0-8 -- don't exclude koji-vm from ppc and ppc64 - -* Fri Sep 26 2014 Till Maas - 1.9.0-7 -- Use https for kojipkgs -- Update URL - -* Mon Aug 04 2014 Dennis Gilmore - 1.9.0-6 -- add patch to fix kickstart parsing - -* Mon Aug 04 2014 Dennis Gilmore - 1.9.0-5 -- add upstream patches for better docker support - -* Tue Jul 29 2014 Dennis Gilmore - 1.9.0-4 -- add upstream patch to compress docker images - -* Thu Jun 12 2014 Dennis Gilmore - 1.9.0-3 -- add patch to move builder workdir to /var/tmp -- add support for making raw.xz images - -* Sun Jun 08 2014 Fedora Release Engineering - 1.9.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Mon Mar 24 2014 Dennis Gilmore - 1.9.0-1 -- update to upstream 1.9.0 - -* Wed Jul 31 2013 Dennis Gilmore - 1.8.0-2 -- update from git snapshot - -* Mon Apr 01 2013 Dennis Gilmore - 1.8.0-1 -- update to upstream 1.8.0 - -* Thu Feb 14 2013 Fedora Release Engineering - 1.7.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Sun Jan 20 2013 Dennis Gilmore - 1.7.1-2 -- revert "avoid baseurl option in createrepo" patch -- fix integer overflow issue in checkUpload handler - -* Wed Nov 21 2012 Dennis Gilmore - 1.7.1-1 -- update to upstream 1.7.1 release - -* Sat Sep 01 2012 Dennis Gilmore - 1.7.0-7 -- add patch to mount all of /dev on appliances and lives - -* Fri Aug 31 2012 Dennis Gilmore - 1.7.0-4 -- add patch to only make /dev/urandom if it doesnt exist -- add upstream patch for taginfo fixes with older servers - -* Thu Jul 19 2012 Fedora Release Engineering - 1.7.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue Jun 05 2012 Dennis Gilmore - 1.7.0-2 -- use topurl not pkgurl in the fedora config - -* Fri Jun 01 2012 Dennis Gilmore - 1.7.0-1 -- update to 1.7.0 many bugfixes and improvements -- now uses mod_wsgi - -* Fri Jan 13 2012 Fedora Release Engineering - 1.6.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Feb 07 2011 Fedora Release Engineering - 1.6.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Fri Dec 17 2010 Dennis Gilmore - 1.6.0-1 -- update to 1.6.0 - -* Wed Dec 01 2010 Dennis Gilmore - 1.5.0-1 -- update to 1.5.0 - -* Tue Aug 3 2010 David Malcolm - 1.4.0-4 -- fix python 2.7 incompatibilities (rhbz 619276) - -* Wed Jul 21 2010 David Malcolm - 1.4.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Sat Jul 10 2010 Dennis Gilmore - 1.4.0-2 -- add missing Requires: python-cheetah from koji-builder - -* Fri Jul 09 2010 Dennis Gilmore - 1.4.0-1 -- update to 1.4.0 -- Merge mead branch: support for building jars with Maven * -- support for building appliance images * -- soft dependencies for LiveCD/Appliance features -- smarter prioritization of repo regenerations -- package list policy to determine if package list changes are allowed -- channel policy to determine which channel a task is placed in -- edit host data via webui -- description and comment fields for hosts * -- cleaner log entries for kojihub -- track user data in versioned tables * -- allow setting retry parameters for the cli -- track start time for tasks * -- allow packages built from the same srpm to span multiple external repos -- make the command used to fetch sources configuable per repo -- kojira: remove unexpected directories -- let kojid to decide if it can handle a noarch task -- avoid extraneous ssl handshakes -- schema changes to support starred items - -* Fri Nov 20 2009 Dennis Gilmore - 1.3.2-1 -- update to 1.3.2 - -* Fri Jul 24 2009 Fedora Release Engineering - 1.3.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Feb 25 2009 Fedora Release Engineering - 1.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Fri Feb 20 2009 Dennis Gilmore - 1.3.1-1 -- update to 1.3.1 - -* Wed Feb 18 2009 Dennis Gilmore - 1.3.0-1 -- update to 1.3.0 - -* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 1.2.6-2 -- Rebuild for Python 2.6 - -* Mon Aug 25 2008 Dennis Gilmore - 1.2.6-1 -- update to 1.2.6 -- make sure we have to correct version of createrepo on Fedora 8 - -* Tue Aug 5 2008 Tom "spot" Callaway 1.2.5-2 -- fix conditional (line 5) -- fix license tag - -* Fri Jan 25 2008 jkeating 1.2.5-1 -- Put createrepo arguments in correct order - -* Thu Jan 24 2008 jkeating 1.2.4-1 -- Use the --skip-stat flag in createrepo calls. -- canonicalize tag arches before using them (dgilmore) -- fix return value of delete_build -- Revert to getfile urls if the task is not successful in emails -- Pass --target instead of --arch to mock. -- ignore trashcan tag in prune-signed-copies command -- add the "allowed_scms" kojid parameter -- allow filtering builds by the person who built them - -* Fri Dec 14 2007 jkeating 1.2.3-1 -- New upstream release with lots of updates, bugfixes, and enhancements. - -* Tue Jun 5 2007 Mike Bonnet - 1.2.2-1 -- only allow admins to perform non-scratch builds from srpm -- bug fixes to the cmd-line and web UIs - -* Thu May 31 2007 Mike Bonnet - 1.2.1-1 -- don't allow ExclusiveArch to expand the archlist (bz#239359) -- add a summary line stating whether the task succeeded or failed to the end of the "watch-task" output -- add a search box to the header of every page in the web UI -- new koji download-build command (patch provided by Dan Berrange) - -* Tue May 15 2007 Mike Bonnet - 1.2.0-1 -- change version numbering to a 3-token scheme -- install the koji favicon - -* Mon May 14 2007 Mike Bonnet - 1.1-5 -- cleanup koji-utils Requires -- fix encoding and formatting in email notifications -- expand archlist based on ExclusiveArch/BuildArchs -- allow import of rpms without srpms -- commit before linking in prepRepo to release db locks -- remove exec bit from kojid logs and uploaded files (patch by Enrico Scholz) - -* Tue May 1 2007 Mike Bonnet - 1.1-4 -- remove spurious Requires: from the koji-utils package - -* Tue May 1 2007 Mike Bonnet - 1.1-3 -- fix typo in BuildNotificationTask (patch provided by Michael Schwendt) -- add the --changelog param to the buildinfo command -- always send email notifications to the package builder and package owner -- improvements to the web UI - -* Tue Apr 17 2007 Mike Bonnet - 1.1-2 -- re-enable use of the --update flag to createrepo - -* Mon Apr 09 2007 Jesse Keating 1.1-1 -- make the output listPackages() consistent regardless of with_dups -- prevent large batches of repo deletes from holding up regens -- allow sorting the host list by arches - -* Mon Apr 02 2007 Jesse Keating 1.0-1 -- Release 1.0! - -* Wed Mar 28 2007 Mike Bonnet - 0.9.7-4 -- set SSL connection timeout to 12 hours - -* Wed Mar 28 2007 Mike Bonnet - 0.9.7-3 -- avoid SSL renegotiation -- improve log file handling in kojid -- bug fixes in command-line and web UI - -* Sun Mar 25 2007 Mike Bonnet - 0.9.7-2 -- enable http access to packages in kojid -- add Requires: pyOpenSSL -- building srpms from CVS now works with the Extras CVS structure -- fixes to the chain-build command -- bug fixes in the XML-RPC and web interfaces - -* Tue Mar 20 2007 Jesse Keating - 0.9.7-1 -- Package up the needed ssl files - -* Tue Mar 20 2007 Jesse Keating - 0.9.6-1 -- 0.9.6 release, mostly ssl auth stuff -- use named directories for config stuff -- remove -3 requires on creatrepo, don't need that specific anymore - -* Tue Feb 20 2007 Jesse Keating - 0.9.5-8 -- Add Authors COPYING LGPL to the docs of the main package - -* Tue Feb 20 2007 Jesse Keating - 0.9.5-7 -- Move web files from /var/www to /usr/share -- Use -p in install calls -- Add rpm-python to requires for koji - -* Mon Feb 19 2007 Jesse Keating - 0.9.5-6 -- Clean up spec for package review - -* Sun Feb 04 2007 Mike McLean - 0.9.5-1 -- project renamed to koji +* Mon Jul 03 2017 Dennis Gilmore - 1.13.0-1 +- update to upstream 1.13.0 +- remove old changelog entries diff --git a/sources b/sources index 199c8ab..77eb754 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.12.0.tar.bz2) = 8898de9715c3d7bf828817eacfae55166d654ec8e561f3b1406b9208072af2ca277aeaf9e753d82938a4170aa261bf3d5f7c868142cbe9668e2e149c7f747cc8 +SHA512 (koji-1.13.0.tar.bz2) = be275566d48ebbcec1446bc6e49fae4be3694dd6afe233a35f787fb98e9763048f2452fedfb6b7de43e593a3617e7e65ab934d518cb1bd85cd806f9a650c81f1 From 85eb829f09307d176cc9f7eaf560379b6157f3ca Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 8 Jul 2017 14:35:31 -0500 Subject: [PATCH 093/202] disable python3 on epel Signed-off-by: Dennis Gilmore --- koji.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index a0ddc4f..b21af68 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ # Enable Python 3 builds for Fedora + EPEL >5 # NOTE: do **NOT** change 'epel' to 'rhel' here, as this spec is also -%if 0%{?fedora} || 0%{?epel} > 5 +%if 0%{?fedora} %bcond_without python3 # If the definition isn't available for python3_pkgversion, define it %{?!python3_pkgversion:%global python3_pkgversion 3} From 1fe786e9e35d878e5169279b53a6aa2935283a66 Mon Sep 17 00:00:00 2001 From: Randy Barlow Date: Tue, 11 Jul 2017 14:48:46 -0400 Subject: [PATCH 094/202] Require python2-koji on Fedora <= 26. Signed-off-by: Randy Barlow --- koji.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index b21af68..c29eb4c 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.13.0 -Release: 1%{?dist} +Release: 2%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -56,6 +56,14 @@ BuildRequires: systemd BuildRequires: pkgconfig %endif +# For backwards compatibility, we want to Require: python2-koji for Fedora <= 26 so dependent +# packages have some time to switch their Requires lines to python2-koji instead of Koji. +%if 0%{?fedora} && 0%{?fedora} <= 26 +Requires: python2-%{name} = %{version}-%{release} +Requires: python2-pycurl +Requires: python2-libcomps +%endif + %description Koji is a system for building and tracking RPMS. The base package contains shared libraries and the command-line interface. @@ -430,6 +438,9 @@ fi %endif %changelog +* Tue Jul 11 2017 Randy Barlow - 1.13.0-2 +- Require python2-koji on Fedora <= 26. + * Mon Jul 03 2017 Dennis Gilmore - 1.13.0-1 - update to upstream 1.13.0 - remove old changelog entries From 50d78114ac4e180dc190f47e9812462b4722269d Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 12 Jul 2017 23:06:29 +0200 Subject: [PATCH 095/202] Remove the 2 postfix for pycurl and libcomps on RHEL Signed-off-by: Patrick Uiterwijk --- koji.spec | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/koji.spec b/koji.spec index c29eb4c..72e358e 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.13.0 -Release: 2%{?dist} +Release: 3%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -44,9 +44,15 @@ Requires: python3-pycurl Requires: python3-libcomps %else Requires: python2-%{name} = %{version}-%{release} -Requires: python2-pycurl -%if 0%{?fedora} || 0%{?rhel} >= 7 +%if 0%{?fedora} Requires: python2-libcomps +Requires: python2-pycurl +%endif +%if 0%{?rhel} +Requires: python-pycurl +%endif +%if 0%{?rhel} >= 7 +Requires: python-libcomps %endif %endif BuildRequires: python @@ -438,6 +444,9 @@ fi %endif %changelog +* Wed Jul 12 2017 Patrick Uiterwijk - 1.13.0-3 +- Remove the 2 postfix for pycurl and libcomps on RHEL + * Tue Jul 11 2017 Randy Barlow - 1.13.0-2 - Require python2-koji on Fedora <= 26. From 4c4f2daccfd51351325aea5ce5f68cb908eb4368 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 17:54:48 +0000 Subject: [PATCH 096/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 72e358e..2f0cf48 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.13.0 -Release: 3%{?dist} +Release: 4%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -444,6 +444,9 @@ fi %endif %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.13.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Wed Jul 12 2017 Patrick Uiterwijk - 1.13.0-3 - Remove the 2 postfix for pycurl and libcomps on RHEL From 11067e5bfe66f3f1c0397b50cfabc0dc5fd067a0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 26 Sep 2017 08:15:58 -0500 Subject: [PATCH 097/202] update to upstream 1.14.0 Signed-off-by: Dennis Gilmore --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1092685..ed9d911 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ koji-1.4.0.tar.bz2 /koji-1.11.0.tar.bz2 /koji-1.12.0.tar.bz2 /koji-1.13.0.tar.bz2 +/koji-1.14.0.tar.bz2 diff --git a/koji.spec b/koji.spec index 2f0cf48..07f92f7 100644 --- a/koji.spec +++ b/koji.spec @@ -25,8 +25,8 @@ %endif Name: koji -Version: 1.13.0 -Release: 4%{?dist} +Version: 1.14.0 +Release: 1%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -444,6 +444,9 @@ fi %endif %changelog +* Tue Sep 26 2017 Dennis Gilmore - 1.14.0-1 +- update to upstream 1.14.0 + * Wed Jul 26 2017 Fedora Release Engineering - 1.13.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild diff --git a/sources b/sources index 77eb754..116070d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.13.0.tar.bz2) = be275566d48ebbcec1446bc6e49fae4be3694dd6afe233a35f787fb98e9763048f2452fedfb6b7de43e593a3617e7e65ab934d518cb1bd85cd806f9a650c81f1 +SHA512 (koji-1.14.0.tar.bz2) = 76df705e490ba4be3efbe8a0236ee9904cd15c9ae1b8a8045f09d1fa811f5c7a5bd9987f676e7e776c1da092bb5a3be173837edb6dc0b6141c77b445b76349e9 From 7fdba43b4440e71142ebaa4ca282fa5219cb87d4 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Mon, 4 Dec 2017 17:42:57 +0000 Subject: [PATCH 098/202] Backport patches for py3 keytab and exit code Signed-off-by: Patrick Uiterwijk --- 5574ad7.patch | 38 ++++++++++++++++++++++++++ 708.patch | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ 73ebc0c.patch | 27 +++++++++++++++++++ koji.spec | 14 +++++++++- 4 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 5574ad7.patch create mode 100644 708.patch create mode 100644 73ebc0c.patch diff --git a/5574ad7.patch b/5574ad7.patch new file mode 100644 index 0000000..db29d32 --- /dev/null +++ b/5574ad7.patch @@ -0,0 +1,38 @@ +From 5574ad78171c9e9e56f9c565aeb95bd8c6f2d107 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Nov 22 2017 05:24:28 +0000 +Subject: PR#703: cli: make return code of watch_task to always ignore sub-task failure + + +Merges #703 +https://pagure.io/koji/pull-request/703 + +Fixes: #696 +https://pagure.io/koji/issue/696 +koji 1.14.0 returns exit status 1 on jobs with only optional failures + +--- + +diff --git a/cli/koji_cli/lib.py b/cli/koji_cli/lib.py +index 4135308..761dff2 100644 +--- a/cli/koji_cli/lib.py ++++ b/cli/koji_cli/lib.py +@@ -285,7 +285,7 @@ def watch_tasks(session, tasklist, quiet=False, poll_interval=60): + try: + tasks = {} + for task_id in tasklist: +- tasks[task_id] = TaskWatcher(task_id,session,quiet=quiet) ++ tasks[task_id] = TaskWatcher(task_id, session, quiet=quiet) + while True: + all_done = True + for task_id, task in list(tasks.items()): +@@ -297,7 +297,7 @@ def watch_tasks(session, tasklist, quiet=False, poll_interval=60): + # task is done and state just changed + if not quiet: + display_tasklist_status(tasks) +- if not task.is_success(): ++ if task.level == 0 and not task.is_success(): + rv = 1 + for child in session.getTaskChildren(task_id): + child_id = child['id'] + diff --git a/708.patch b/708.patch new file mode 100644 index 0000000..666af5e --- /dev/null +++ b/708.patch @@ -0,0 +1,75 @@ +diff -rup koji-1.14.0.orig/koji/__init__.py koji-1.14.0/koji/__init__.py +--- koji-1.14.0.orig/koji/__init__.py 2017-09-25 19:37:51.000000000 +0000 ++++ koji-1.14.0/koji/__init__.py 2017-12-04 17:44:04.774853630 +0000 +@@ -23,6 +23,7 @@ + + + from __future__ import absolute_import ++import copy + import sys + from six.moves import range + from six.moves import zip +@@ -2116,16 +2117,15 @@ class ClientSession(object): + principal. The principal must be in the "ProxyPrincipals" list on + the server side.""" + +- if principal is None and keytab is None and ccache is None: +- try: +- # Silently try GSSAPI first +- if self.gssapi_login(proxyuser=proxyuser): +- return True +- except: +- if krbV: +- pass +- else: +- raise ++ try: ++ # Silently try GSSAPI first ++ if self.gssapi_login(principal, keytab, ccache, proxyuser=proxyuser): ++ return True ++ except: ++ if krbV: ++ pass ++ else: ++ raise + + if not krbV: + raise PythonImportError( +@@ -2203,7 +2203,7 @@ class ClientSession(object): + + return '%s/%s@%s' % (service, servername, realm) + +- def gssapi_login(self, proxyuser=None): ++ def gssapi_login(self, principal=None, keytab=None, ccache=None, proxyuser=None): + if not HTTPKerberosAuth: + raise PythonImportError( + "Please install python-requests-kerberos to use GSSAPI." +@@ -2220,10 +2220,18 @@ class ClientSession(object): + + # 60 second timeout during login + sinfo = None ++ old_env = copy.copy(os.environ) + old_opts = self.opts + self.opts = old_opts.copy() + self.opts['timeout'] = 60 +- self.opts['auth'] = HTTPKerberosAuth() ++ kwargs = {} ++ if keytab: ++ os.environ['KRB5_CLIENT_KTNAME'] = keytab ++ if ccache: ++ os.environ['KRB5CCNAME'] = ccache ++ if principal: ++ kwargs['principal'] = principal ++ self.opts['auth'] = HTTPKerberosAuth(**kwargs) + try: + try: + # Depending on the server configuration, we might not be able to +@@ -2235,6 +2243,7 @@ class ClientSession(object): + self.baseurl = old_baseurl + finally: + self.opts = old_opts ++ os.environ = old_env + if not sinfo: + raise AuthError('unable to obtain a session') + +Only in koji-1.14.0/koji: __init__.py.orig diff --git a/73ebc0c.patch b/73ebc0c.patch new file mode 100644 index 0000000..2d443e3 --- /dev/null +++ b/73ebc0c.patch @@ -0,0 +1,27 @@ +From 73ebc0c98fb7766f2ddddc41f0a2ab662ba5c467 Mon Sep 17 00:00:00 2001 +From: Yuming Zhu +Date: Nov 22 2017 05:24:24 +0000 +Subject: cli: make return code of watch_task to always ignore sub-task failure + + +fixes: #696 + +--- + +diff --git a/cli/koji_cli/lib.py b/cli/koji_cli/lib.py +index 4135308..e7aa686 100644 +--- a/cli/koji_cli/lib.py ++++ b/cli/koji_cli/lib.py +@@ -218,9 +218,11 @@ class TaskWatcher(object): + state = koji.TASK_STATES[self.info['state']] + return (state in ['CLOSED','CANCELED','FAILED']) + +- def is_success(self): ++ def is_success(self, ignore_child=True): + if self.info is None: + return False ++ if ignore_child and self.level != 0: ++ return True + state = koji.TASK_STATES[self.info['state']] + return (state == 'CLOSED') + diff --git a/koji.spec b/koji.spec index 07f92f7..d266ac7 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.14.0 -Release: 1%{?dist} +Release: 2%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -34,6 +34,11 @@ Group: Applications/System URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +# Backported patches +Patch0: https://pagure.io/koji/pull-request/708.patch +Patch1: https://pagure.io/koji/c/5574ad7.patch +Patch2: https://pagure.io/koji/c/73ebc0c.patch + # Not upstreamable Patch100: fedora-config.patch @@ -239,6 +244,9 @@ koji-web is a web UI to the Koji system. %prep %setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -444,6 +452,10 @@ fi %endif %changelog +* Mon Dec 04 2017 Patrick Uiterwijk - 1.14.0-2 +- Backport py3 keytab patch (PR#708) +- Backport patches for exit code (issue#696) + * Tue Sep 26 2017 Dennis Gilmore - 1.14.0-1 - update to upstream 1.14.0 From 13b191d2a9567563d2b65a579907a918f044cb26 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Thu, 7 Dec 2017 02:14:06 +0000 Subject: [PATCH 099/202] Backport py3 runroot encoding patch (PR#735) Signed-off-by: Patrick Uiterwijk --- 735.patch | 28 ++++++++++++++++++++++++++++ koji.spec | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 735.patch diff --git a/735.patch b/735.patch new file mode 100644 index 0000000..d2c448b --- /dev/null +++ b/735.patch @@ -0,0 +1,28 @@ +From 323926afbf4d1337e1bcdfc07e7d8e64f6289bf1 Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Dec 07 2017 01:55:04 +0000 +Subject: Fix encoding issue in runroot with python3 + + +This will make sure that the log from the server is correctly decoded, since +sys.stdout only accepts strings, not raw bytes, which is what downloadTaskOutput +returns. + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/plugins/cli/runroot.py b/plugins/cli/runroot.py +index f8d4b50..dc5d737 100644 +--- a/plugins/cli/runroot.py ++++ b/plugins/cli/runroot.py +@@ -90,7 +90,7 @@ def handle_runroot(options, session, args): + if 'runroot.log' in output: + for volume in output['runroot.log']: + log = session.downloadTaskOutput(task_id, 'runroot.log', volume=volume) +- sys.stdout.write(log) ++ sys.stdout.write(log.decode('utf8')) + info = session.getTaskInfo(task_id) + if info is None: + sys.exit(1) + diff --git a/koji.spec b/koji.spec index d266ac7..87354ed 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.14.0 -Release: 2%{?dist} +Release: 3%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -38,6 +38,7 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 Patch0: https://pagure.io/koji/pull-request/708.patch Patch1: https://pagure.io/koji/c/5574ad7.patch Patch2: https://pagure.io/koji/c/73ebc0c.patch +Patch3: https://pagure.io/koji/pull-request/735.patch # Not upstreamable Patch100: fedora-config.patch @@ -247,6 +248,7 @@ koji-web is a web UI to the Koji system. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -452,6 +454,9 @@ fi %endif %changelog +* Thu Dec 07 2017 Patrick Uiterwijk - 1.14.0-3 +- Backport py3 runroot encoding patch (PR#735) + * Mon Dec 04 2017 Patrick Uiterwijk - 1.14.0-2 - Backport py3 keytab patch (PR#708) - Backport patches for exit code (issue#696) From 1175772991cf8776f59aca4cae74b04bb8cd4fae Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Mon, 22 Jan 2018 10:01:48 -0800 Subject: [PATCH 100/202] Update conditional --- koji.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 87354ed..99c53df 100644 --- a/koji.spec +++ b/koji.spec @@ -1,6 +1,6 @@ # Enable Python 3 builds for Fedora + EPEL >5 # NOTE: do **NOT** change 'epel' to 'rhel' here, as this spec is also -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} > 7 %bcond_without python3 # If the definition isn't available for python3_pkgversion, define it %{?!python3_pkgversion:%global python3_pkgversion 3} @@ -26,7 +26,7 @@ Name: koji Version: 1.14.0 -Release: 3%{?dist} +Release: 4%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -454,6 +454,9 @@ fi %endif %changelog +* Mon Jan 22 2018 Troy Dawson - 1.14.0-4 +- Update conditional + * Thu Dec 07 2017 Patrick Uiterwijk - 1.14.0-3 - Backport py3 runroot encoding patch (PR#735) From 13c3161ee049a176b836db0055410d30754acad1 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sat, 27 Jan 2018 10:51:32 +0100 Subject: [PATCH 101/202] Rebase to koji 1.15.0 Signed-off-by: Patrick Uiterwijk --- .gitignore | 1 + 5574ad7.patch | 38 ----------------------- 708.patch | 75 --------------------------------------------- 73ebc0c.patch | 27 ---------------- fedora-config.patch | 11 ++++--- koji.spec | 15 ++++----- sources | 2 +- 7 files changed, 14 insertions(+), 155 deletions(-) delete mode 100644 5574ad7.patch delete mode 100644 708.patch delete mode 100644 73ebc0c.patch diff --git a/.gitignore b/.gitignore index ed9d911..aad62ff 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ koji-1.4.0.tar.bz2 /koji-1.12.0.tar.bz2 /koji-1.13.0.tar.bz2 /koji-1.14.0.tar.bz2 +/koji-1.15.0.tar.bz2 diff --git a/5574ad7.patch b/5574ad7.patch deleted file mode 100644 index db29d32..0000000 --- a/5574ad7.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5574ad78171c9e9e56f9c565aeb95bd8c6f2d107 Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: Nov 22 2017 05:24:28 +0000 -Subject: PR#703: cli: make return code of watch_task to always ignore sub-task failure - - -Merges #703 -https://pagure.io/koji/pull-request/703 - -Fixes: #696 -https://pagure.io/koji/issue/696 -koji 1.14.0 returns exit status 1 on jobs with only optional failures - ---- - -diff --git a/cli/koji_cli/lib.py b/cli/koji_cli/lib.py -index 4135308..761dff2 100644 ---- a/cli/koji_cli/lib.py -+++ b/cli/koji_cli/lib.py -@@ -285,7 +285,7 @@ def watch_tasks(session, tasklist, quiet=False, poll_interval=60): - try: - tasks = {} - for task_id in tasklist: -- tasks[task_id] = TaskWatcher(task_id,session,quiet=quiet) -+ tasks[task_id] = TaskWatcher(task_id, session, quiet=quiet) - while True: - all_done = True - for task_id, task in list(tasks.items()): -@@ -297,7 +297,7 @@ def watch_tasks(session, tasklist, quiet=False, poll_interval=60): - # task is done and state just changed - if not quiet: - display_tasklist_status(tasks) -- if not task.is_success(): -+ if task.level == 0 and not task.is_success(): - rv = 1 - for child in session.getTaskChildren(task_id): - child_id = child['id'] - diff --git a/708.patch b/708.patch deleted file mode 100644 index 666af5e..0000000 --- a/708.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff -rup koji-1.14.0.orig/koji/__init__.py koji-1.14.0/koji/__init__.py ---- koji-1.14.0.orig/koji/__init__.py 2017-09-25 19:37:51.000000000 +0000 -+++ koji-1.14.0/koji/__init__.py 2017-12-04 17:44:04.774853630 +0000 -@@ -23,6 +23,7 @@ - - - from __future__ import absolute_import -+import copy - import sys - from six.moves import range - from six.moves import zip -@@ -2116,16 +2117,15 @@ class ClientSession(object): - principal. The principal must be in the "ProxyPrincipals" list on - the server side.""" - -- if principal is None and keytab is None and ccache is None: -- try: -- # Silently try GSSAPI first -- if self.gssapi_login(proxyuser=proxyuser): -- return True -- except: -- if krbV: -- pass -- else: -- raise -+ try: -+ # Silently try GSSAPI first -+ if self.gssapi_login(principal, keytab, ccache, proxyuser=proxyuser): -+ return True -+ except: -+ if krbV: -+ pass -+ else: -+ raise - - if not krbV: - raise PythonImportError( -@@ -2203,7 +2203,7 @@ class ClientSession(object): - - return '%s/%s@%s' % (service, servername, realm) - -- def gssapi_login(self, proxyuser=None): -+ def gssapi_login(self, principal=None, keytab=None, ccache=None, proxyuser=None): - if not HTTPKerberosAuth: - raise PythonImportError( - "Please install python-requests-kerberos to use GSSAPI." -@@ -2220,10 +2220,18 @@ class ClientSession(object): - - # 60 second timeout during login - sinfo = None -+ old_env = copy.copy(os.environ) - old_opts = self.opts - self.opts = old_opts.copy() - self.opts['timeout'] = 60 -- self.opts['auth'] = HTTPKerberosAuth() -+ kwargs = {} -+ if keytab: -+ os.environ['KRB5_CLIENT_KTNAME'] = keytab -+ if ccache: -+ os.environ['KRB5CCNAME'] = ccache -+ if principal: -+ kwargs['principal'] = principal -+ self.opts['auth'] = HTTPKerberosAuth(**kwargs) - try: - try: - # Depending on the server configuration, we might not be able to -@@ -2235,6 +2243,7 @@ class ClientSession(object): - self.baseurl = old_baseurl - finally: - self.opts = old_opts -+ os.environ = old_env - if not sinfo: - raise AuthError('unable to obtain a session') - -Only in koji-1.14.0/koji: __init__.py.orig diff --git a/73ebc0c.patch b/73ebc0c.patch deleted file mode 100644 index 2d443e3..0000000 --- a/73ebc0c.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 73ebc0c98fb7766f2ddddc41f0a2ab662ba5c467 Mon Sep 17 00:00:00 2001 -From: Yuming Zhu -Date: Nov 22 2017 05:24:24 +0000 -Subject: cli: make return code of watch_task to always ignore sub-task failure - - -fixes: #696 - ---- - -diff --git a/cli/koji_cli/lib.py b/cli/koji_cli/lib.py -index 4135308..e7aa686 100644 ---- a/cli/koji_cli/lib.py -+++ b/cli/koji_cli/lib.py -@@ -218,9 +218,11 @@ class TaskWatcher(object): - state = koji.TASK_STATES[self.info['state']] - return (state in ['CLOSED','CANCELED','FAILED']) - -- def is_success(self): -+ def is_success(self, ignore_child=True): - if self.info is None: - return False -+ if ignore_child and self.level != 0: -+ return True - state = koji.TASK_STATES[self.info['state']] - return (state == 'CLOSED') - diff --git a/fedora-config.patch b/fedora-config.patch index ec80300..c141278 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,5 +1,6 @@ ---- koji-1.13.0/cli/koji.conf.fedoraconfig 2017-06-30 14:00:26.000000000 -0500 -+++ koji-1.13.0/cli/koji.conf 2017-07-03 12:41:55.615758878 -0500 +diff -rup koji-1.15.0.orig/cli/koji.conf koji-1.15.0/cli/koji.conf +--- koji-1.15.0.orig/cli/koji.conf 2018-01-27 10:44:39.111029362 +0100 ++++ koji-1.15.0/cli/koji.conf 2018-01-27 10:46:33.713817186 +0100 @@ -3,18 +3,23 @@ ;configuration for koji cli tool @@ -27,9 +28,9 @@ ;the service name of the principal being used by the hub ;krbservice = host -@@ -25,13 +30,6 @@ - ;the keytab to auth as for automated clients - ;keytab = /etc/krb5.keytab +@@ -29,13 +34,6 @@ + ;krb_canon_host = no + -;configuration for SSL authentication - diff --git a/koji.spec b/koji.spec index 99c53df..db1f2df 100644 --- a/koji.spec +++ b/koji.spec @@ -25,8 +25,8 @@ %endif Name: koji -Version: 1.14.0 -Release: 4%{?dist} +Version: 1.15.0 +Release: 1%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -35,10 +35,7 @@ URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Backported patches -Patch0: https://pagure.io/koji/pull-request/708.patch -Patch1: https://pagure.io/koji/c/5574ad7.patch -Patch2: https://pagure.io/koji/c/73ebc0c.patch -Patch3: https://pagure.io/koji/pull-request/735.patch +Patch0: https://pagure.io/koji/pull-request/735.patch # Not upstreamable Patch100: fedora-config.patch @@ -246,9 +243,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -454,6 +448,9 @@ fi %endif %changelog +* Sat Jan 27 2018 Patrick Uiterwijk - 1.15.0-1 +- Rebase to koji 1.15.0 + * Mon Jan 22 2018 Troy Dawson - 1.14.0-4 - Update conditional diff --git a/sources b/sources index 116070d..654ef8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.14.0.tar.bz2) = 76df705e490ba4be3efbe8a0236ee9904cd15c9ae1b8a8045f09d1fa811f5c7a5bd9987f676e7e776c1da092bb5a3be173837edb6dc0b6141c77b445b76349e9 +SHA512 (koji-1.15.0.tar.bz2) = 680f76328900c2519745e392b576cc33cce3349bc3428001c8db1ff068bf9fdf071e0096ece837729fba86cd79708553dc6b6b7334316b3e02f1c3089164d418 From 0c7cee5656470a0b23f7b77e196c0f29c7bd3298 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 20:21:22 +0000 Subject: [PATCH 102/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index db1f2df..daa8c77 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.15.0 -Release: 1%{?dist} +Release: 2%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -448,6 +448,9 @@ fi %endif %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 1.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Jan 27 2018 Patrick Uiterwijk - 1.15.0-1 - Rebase to koji 1.15.0 From 4d97612dd189ad6766f4354886073f47bf4b95d9 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Mon, 12 Feb 2018 16:50:35 -0500 Subject: [PATCH 103/202] Make hub, builder, etc, require python2-koji not koji --- koji.spec | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/koji.spec b/koji.spec index daa8c77..cca0c37 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.15.0 -Release: 2%{?dist} +Release: 3%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -138,7 +138,7 @@ License: LGPLv2 and GPLv2 Requires: httpd Requires: mod_wsgi Requires: python-psycopg2 -Requires: %{name} = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} %description hub koji-hub is the XMLRPC interface to the koji database @@ -147,7 +147,6 @@ koji-hub is the XMLRPC interface to the koji database Summary: Koji hub plugins Group: Applications/Internet License: LGPLv2 -Requires: %{name} = %{version}-%{release} Requires: %{name}-hub = %{version}-%{release} Requires: python-qpid >= 0.7 Requires: python-qpid-proton @@ -161,7 +160,7 @@ Summary: Koji RPM builder daemon Group: Applications/System License: LGPLv2 and GPLv2+ #mergerepos (from createrepo) is GPLv2+ -Requires: %{name} = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} Requires: mock >= 0.9.14 Requires(pre): /usr/sbin/useradd Requires: squashfs-tools @@ -190,7 +189,7 @@ tasks that come through the Koji system. Summary: Koji virtual machine management daemon Group: Applications/System License: LGPLv2 -Requires: %{name} = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} %if %{use_systemd} Requires(post): systemd Requires(preun): systemd @@ -215,7 +214,7 @@ Summary: Koji Utilities Group: Applications/Internet License: LGPLv2 Requires: python-psycopg2 -Requires: %{name} = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} %if %{use_systemd} Requires(post): systemd Requires(preun): systemd @@ -234,7 +233,7 @@ Requires: mod_wsgi Requires: mod_auth_gssapi Requires: python-psycopg2 Requires: python-cheetah -Requires: %{name} = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} Requires: python-krbV >= 1.0.13 %description web @@ -448,6 +447,9 @@ fi %endif %changelog +* Mon Feb 12 2018 Owen Taylor - 1.15.0-3 +- Make hub, builder, etc, require python2-koji not koji + * Wed Feb 07 2018 Fedora Release Engineering - 1.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 1352cef7c3dbd2f34eb354215ce118d25e4cfb43 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Feb 2018 08:10:51 +0100 Subject: [PATCH 104/202] Remove %clean section None of currently supported distributions need that. Last one was EL5 which is EOL for a while. Signed-off-by: Igor Gnatenko --- koji.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/koji.spec b/koji.spec index cca0c37..c88faeb 100644 --- a/koji.spec +++ b/koji.spec @@ -260,9 +260,6 @@ make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/bin/koji %endif -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(-,root,root) %{_bindir}/* From cf88a30bc0fa23e0cb1b824a9edde701be7769cc Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Fri, 16 Feb 2018 23:47:16 +0100 Subject: [PATCH 105/202] Backport 794 PR and escape macros Signed-off-by: Patrick Uiterwijk --- 794.patch | 354 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ koji.spec | 18 ++- 2 files changed, 366 insertions(+), 6 deletions(-) create mode 100644 794.patch diff --git a/794.patch b/794.patch new file mode 100644 index 0000000..9864e9d --- /dev/null +++ b/794.patch @@ -0,0 +1,354 @@ +From b975594ce4ec1df300eccc261bedbd607e2c2aa0 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Feb 01 2018 15:12:52 +0000 +Subject: [PATCH 1/4] recheck for duplicate external rpm on insertion errors + + +fixes: https://pagure.io/koji/issue/788 + +--- + +diff --git a/hub/kojihub.py b/hub/kojihub.py +index 7e664af..4500acd 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -5730,7 +5730,7 @@ def add_external_rpm(rpminfo, external_repo, strict=True): + + # [!] Calling function should perform access checks + +- #sanity check rpminfo ++ # sanity check rpminfo + dtypes = ( + ('name', basestring), + ('version', basestring), +@@ -5746,37 +5746,47 @@ def add_external_rpm(rpminfo, external_repo, strict=True): + if not isinstance(rpminfo[field], allowed): + #this will catch unwanted NULLs + raise koji.GenericError("Invalid value for %s: %r" % (field, rpminfo[field])) +- #TODO: more sanity checks for payloadhash ++ # strip extra fields ++ rpminfo = dslice(rpminfo, [x[0] for x in dtypes]) ++ # TODO: more sanity checks for payloadhash + +- #Check to see if we have it +- data = rpminfo.copy() +- data['location'] = external_repo +- previous = get_rpm(data, strict=False) ++ def check_dup(): ++ # Check to see if we have it ++ data = rpminfo.copy() ++ data['location'] = external_repo ++ previous = get_rpm(data, strict=False) ++ if previous: ++ disp = "%(name)s-%(version)s-%(release)s.%(arch)s@%(external_repo_name)s" % previous ++ if strict: ++ raise koji.GenericError("external rpm already exists: %s" % disp) ++ elif data['payloadhash'] != previous['payloadhash']: ++ raise koji.GenericError("hash changed for external rpm: %s (%s -> %s)" \ ++ % (disp, previous['payloadhash'], data['payloadhash'])) ++ else: ++ return previous ++ ++ previous = check_dup() + if previous: +- disp = "%(name)s-%(version)s-%(release)s.%(arch)s@%(external_repo_name)s" % previous +- if strict: +- raise koji.GenericError("external rpm already exists: %s" % disp) +- elif data['payloadhash'] != previous['payloadhash']: +- raise koji.GenericError("hash changed for external rpm: %s (%s -> %s)" \ +- % (disp, previous['payloadhash'], data['payloadhash'])) +- else: +- return previous ++ return previous + +- #add rpminfo entry +- rpminfo['external_repo_id'] = get_external_repo_id(external_repo, strict=True) +- rpminfo['id'] = _singleValue("""SELECT nextval('rpminfo_id_seq')""") +- q = """INSERT INTO rpminfo (id, build_id, buildroot_id, +- name, version, release, epoch, arch, +- external_repo_id, +- payloadhash, size, buildtime) +- VALUES (%(id)i, NULL, NULL, +- %(name)s, %(version)s, %(release)s, %(epoch)s, %(arch)s, +- %(external_repo_id)i, +- %(payloadhash)s, %(size)i, %(buildtime)i) +- """ +- _dml(q, rpminfo) ++ # add rpminfo entry ++ data = rpminfo.copy() ++ data['external_repo_id'] = get_external_repo_id(external_repo, strict=True) ++ data['id'] = nextval('rpminfo_id_seq') ++ data['build_id'] = None ++ data['buildroot_id'] = None ++ insert = InsertProcessor('rpminfo', data=data) ++ try: ++ insert.execute() ++ except Exception: ++ # check for dup again to work around a race ++ # see: https://pagure.io/koji/issue/788 ++ previous = check_dup() ++ if previous: ++ return previous ++ raise + +- return get_rpm(rpminfo['id']) ++ return get_rpm(data['id']) + + def import_build_log(fn, buildinfo, subdir=None): + """Move a logfile related to a build to the right place""" + +From 6dd0cb86ce5aa07d7fb199ea55e35cdec9d3d49d Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Feb 04 2018 13:01:27 +0000 +Subject: [PATCH 2/4] use a savepoint + + +--- + +diff --git a/hub/kojihub.py b/hub/kojihub.py +index 4500acd..3da3def 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -5776,11 +5776,13 @@ def add_external_rpm(rpminfo, external_repo, strict=True): + data['build_id'] = None + data['buildroot_id'] = None + insert = InsertProcessor('rpminfo', data=data) ++ savepoint = Savepoint('pre_insert') + try: + insert.execute() + except Exception: +- # check for dup again to work around a race ++ # if this failed, it likely duplicates one just inserted + # see: https://pagure.io/koji/issue/788 ++ savepoint.rollback() + previous = check_dup() + if previous: + return previous +@@ -7395,6 +7397,16 @@ def nextval(sequence): + return _singleValue("SELECT nextval(%(sequence)s)", data, strict=True) + + ++class Savepoint(object): ++ ++ def __init__(self, name): ++ self.name = name ++ _dml("SAVEPOINT %s" % name, {}) ++ ++ def rollback(self): ++ _dml("ROLLBACK TO SAVEPOINT %s" % self.name, {}) ++ ++ + def parse_json(value, desc=None, errstr=None): + if value is None: + return value + +From 3c5c9f74d446ee6bca15cadceaf3c21b2f26be7c Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Feb 04 2018 15:08:00 +0000 +Subject: [PATCH 3/4] unit test for add_external_rpm + + +--- + +diff --git a/tests/test_hub/test_add_external_rpm.py b/tests/test_hub/test_add_external_rpm.py +new file mode 100644 +index 0000000..7aa928b +--- /dev/null ++++ b/tests/test_hub/test_add_external_rpm.py +@@ -0,0 +1,158 @@ ++import mock ++import unittest ++ ++import koji ++import kojihub ++ ++ ++IP = kojihub.InsertProcessor ++ ++ ++class FakeException(Exception): ++ pass ++ ++ ++class TestAddExternalRPM(unittest.TestCase): ++ ++ def setUp(self): ++ self.get_rpm = mock.patch('kojihub.get_rpm').start() ++ self.get_external_repo_id = mock.patch('kojihub.get_external_repo_id').start() ++ self.nextval = mock.patch('kojihub.nextval').start() ++ self.Savepoint = mock.patch('kojihub.Savepoint').start() ++ self.InsertProcessor = mock.patch('kojihub.InsertProcessor', ++ side_effect=self.getInsert).start() ++ self.inserts = [] ++ self.insert_execute = mock.MagicMock() ++ ++ self.rpminfo = { ++ 'name': 'NAME', ++ 'version': 'VERSION', ++ 'release': 'RELEASE', ++ 'epoch': None, ++ 'arch': 'noarch', ++ 'payloadhash': 'fakehash', ++ 'size': 42, ++ 'buildtime': 0, ++ } ++ self.repo = 'myrepo' ++ ++ def tearDown(self): ++ mock.patch.stopall() ++ ++ def getInsert(self, *args, **kwargs): ++ insert = IP(*args, **kwargs) ++ insert.execute = self.insert_execute ++ self.inserts.append(insert) ++ return insert ++ ++ def test_add_ext_rpm(self): ++ self.get_rpm.return_value = None ++ self.get_external_repo_id.return_value = mock.sentinel.repo_id ++ self.nextval.return_value = mock.sentinel.rpm_id ++ ++ # call it ++ kojihub.add_external_rpm(self.rpminfo, self.repo) ++ ++ self.assertEqual(len(self.inserts), 1) ++ insert = self.inserts[0] ++ self.assertEqual(insert.data['external_repo_id'], mock.sentinel.repo_id) ++ self.assertEqual(insert.data['id'], mock.sentinel.rpm_id) ++ self.assertEqual(insert.table, 'rpminfo') ++ ++ def test_add_ext_rpm_bad_data(self): ++ rpminfo = self.rpminfo.copy() ++ del rpminfo['size'] ++ ++ with self.assertRaises(koji.GenericError): ++ kojihub.add_external_rpm(rpminfo, self.repo) ++ ++ self.get_rpm.assert_not_called() ++ self.nextval.assert_not_called() ++ self.assertEqual(len(self.inserts), 0) ++ ++ rpminfo = self.rpminfo.copy() ++ rpminfo['size'] = ['invalid type'] ++ ++ with self.assertRaises(koji.GenericError): ++ kojihub.add_external_rpm(rpminfo, self.repo) ++ ++ self.get_rpm.assert_not_called() ++ self.nextval.assert_not_called() ++ self.assertEqual(len(self.inserts), 0) ++ ++ def test_add_ext_rpm_dup(self): ++ prev = self.rpminfo.copy() ++ prev['external_repo_id'] = mock.sentinel.repo_id ++ prev['external_repo_name'] = self.repo ++ self.get_rpm.return_value = prev ++ self.get_external_repo_id.return_value = mock.sentinel.repo_id ++ ++ # call it (default is strict) ++ with self.assertRaises(koji.GenericError): ++ kojihub.add_external_rpm(self.rpminfo, self.repo) ++ ++ self.assertEqual(len(self.inserts), 0) ++ self.nextval.assert_not_called() ++ ++ # call it without strict ++ ret = kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) ++ ++ self.assertEqual(ret, self.get_rpm.return_value) ++ self.assertEqual(len(self.inserts), 0) ++ self.nextval.assert_not_called() ++ ++ # different hash ++ prev['payloadhash'] = 'different hash' ++ with self.assertRaises(koji.GenericError): ++ kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) ++ ++ self.assertEqual(len(self.inserts), 0) ++ self.nextval.assert_not_called() ++ ++ def test_add_ext_rpm_dup_late(self): ++ prev = self.rpminfo.copy() ++ prev['external_repo_id'] = mock.sentinel.repo_id ++ prev['external_repo_name'] = self.repo ++ self.get_rpm.side_effect = [None, prev] ++ self.get_external_repo_id.return_value = mock.sentinel.repo_id ++ self.insert_execute.side_effect = FakeException('insert failed') ++ ++ # call it (default is strict) ++ with self.assertRaises(koji.GenericError): ++ kojihub.add_external_rpm(self.rpminfo, self.repo) ++ ++ self.assertEqual(len(self.inserts), 1) ++ self.nextval.assert_called_once() ++ ++ # call it without strict ++ self.inserts[:] = [] ++ self.nextval.reset_mock() ++ self.get_rpm.side_effect = [None, prev] ++ ret = kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) ++ ++ self.assertEqual(ret, prev) ++ self.assertEqual(len(self.inserts), 1) ++ self.nextval.assert_called_once() ++ ++ # different hash ++ self.inserts[:] = [] ++ self.nextval.reset_mock() ++ self.get_rpm.side_effect = [None, prev] ++ prev['payloadhash'] = 'different hash' ++ with self.assertRaises(koji.GenericError): ++ kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) ++ ++ self.assertEqual(len(self.inserts), 1) ++ self.nextval.assert_called_once() ++ ++ # no dup after failed insert ++ self.inserts[:] = [] ++ self.nextval.reset_mock() ++ self.get_rpm.side_effect = [None, None] ++ with self.assertRaises(FakeException): ++ kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) ++ ++ self.assertEqual(len(self.inserts), 1) ++ self.nextval.assert_called_once() ++ ++ + +From a7e866cf8a39f56e694372cfd9d6099f7bc5be0d Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Feb 04 2018 15:15:40 +0000 +Subject: [PATCH 4/4] unit test for Savepoint + + +--- + +diff --git a/tests/test_hub/test_savepoint.py b/tests/test_hub/test_savepoint.py +new file mode 100644 +index 0000000..279729e +--- /dev/null ++++ b/tests/test_hub/test_savepoint.py +@@ -0,0 +1,22 @@ ++import mock ++import unittest ++ ++import kojihub ++ ++ ++class TestSavepoint(unittest.TestCase): ++ ++ def setUp(self): ++ self.dml = mock.patch('kojihub._dml').start() ++ ++ def tearDown(self): ++ mock.patch.stopall() ++ ++ def test_savepoint(self): ++ sp = kojihub.Savepoint('some_name') ++ self.assertEqual(sp.name, 'some_name') ++ self.dml.assert_called_once_with('SAVEPOINT some_name', {}) ++ ++ self.dml.reset_mock() ++ sp.rollback() ++ self.dml.assert_called_once_with('ROLLBACK TO SAVEPOINT some_name', {}) + diff --git a/koji.spec b/koji.spec index c88faeb..a4cafa7 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.15.0 -Release: 3%{?dist} +Release: 4%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -36,6 +36,7 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Backported patches Patch0: https://pagure.io/koji/pull-request/735.patch +Patch1: https://pagure.io/koji/pull-request/794.patch # Not upstreamable Patch100: fedora-config.patch @@ -242,6 +243,7 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 +%patch1 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -282,16 +284,16 @@ sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/b %defattr(-,root,root) %{python2_sitelib}/koji_cli_plugins # we don't have config files for default plugins yet -#%%dir %{_sysconfdir}/koji/plugins -#%%config(noreplace) %{_sysconfdir}/koji/plugins/*.conf +#%%dir %%{_sysconfdir}/koji/plugins +#%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf %if 0%{with python3} %files -n python%{python3_pkgversion}-%{name}-cli-plugins %defattr(-,root,root) %{python3_sitelib}/koji_cli_plugins # we don't have config files for default plugins yet -#%%dir %{_sysconfdir}/koji/plugins -#%%config(noreplace) %{_sysconfdir}/koji/plugins/*.conf +#%%dir %%{_sysconfdir}/koji/plugins +#%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf %endif %files hub @@ -387,7 +389,7 @@ fi %files vm %defattr(-,root,root) %{_sbindir}/kojivmd -#dir %{_datadir}/kojivmd +#dir %%{_datadir}/kojivmd %{_datadir}/kojivmd/kojikamid %if %{use_systemd} %{_unitdir}/kojivmd.service @@ -444,6 +446,10 @@ fi %endif %changelog +* Fri Feb 16 2018 Patrick Uiterwijk - 1.15.0-4 +- Backport patch from PR#794 +- Fix macro escaping in comments + * Mon Feb 12 2018 Owen Taylor - 1.15.0-3 - Make hub, builder, etc, require python2-koji not koji From 8beddd74181369496458060f41d67ef4d3da629a Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sun, 18 Feb 2018 12:36:33 +0100 Subject: [PATCH 106/202] Add workaround patch for bug #808 Signed-off-by: Patrick Uiterwijk --- koji-fix808.patch | 15 +++++++++++++++ koji.spec | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 koji-fix808.patch diff --git a/koji-fix808.patch b/koji-fix808.patch new file mode 100644 index 0000000..c659a38 --- /dev/null +++ b/koji-fix808.patch @@ -0,0 +1,15 @@ +diff -rup koji-1.15.0.orig/builder/kojid koji-1.15.0/builder/kojid +--- koji-1.15.0.orig/builder/kojid 2018-02-18 12:34:29.680250204 +0100 ++++ koji-1.15.0/builder/kojid 2018-02-18 12:35:33.857177069 +0100 +@@ -736,7 +736,10 @@ class BuildRoot(object): + # mock 1.4+ /tmp is tmpfs mounted on each run, different + # directory is needed for persistency + # 'within' is equivalent to broot.path_without_to_within(broot.tmpdir()) +- base = "/builddir/tmp" ++ # ++ # *Note by puiterwijk*: This directory is "thebuilddir" rather than "Builddir" ++ # as it's in upstream koji to avoid upstream bug #808 ++ base = "/thebuilddir/tmp" + if within: + return base + else: diff --git a/koji.spec b/koji.spec index a4cafa7..3ae463f 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.15.0 -Release: 4%{?dist} +Release: 5%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -37,6 +37,7 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Backported patches Patch0: https://pagure.io/koji/pull-request/735.patch Patch1: https://pagure.io/koji/pull-request/794.patch +Patch2: koji-fix808.patch # Not upstreamable Patch100: fedora-config.patch @@ -244,6 +245,7 @@ koji-web is a web UI to the Koji system. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -446,6 +448,9 @@ fi %endif %changelog +* Sun Feb 18 2018 Patrick Uiterwijk - 1.15.0-5 +- Add workaround patch for bug #808 + * Fri Feb 16 2018 Patrick Uiterwijk - 1.15.0-4 - Backport patch from PR#794 - Fix macro escaping in comments From 3b86654ed959b7958476fd6cad5cac561cc84127 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Tue, 20 Feb 2018 10:13:57 +0100 Subject: [PATCH 107/202] Backport PR #796 Signed-off-by: Patrick Uiterwijk --- 796.patch | 28 ++++++++++++++++++++++++++++ koji.spec | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 796.patch diff --git a/796.patch b/796.patch new file mode 100644 index 0000000..7a88b55 --- /dev/null +++ b/796.patch @@ -0,0 +1,28 @@ +From e45c909235825f22e2ac7da63a4d6454399224e3 Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Feb 20 2018 09:10:11 +0000 +Subject: Fix comparison with Enum value + + +The CHECKSUM_TYPES[...] call returns the index in the Enum field, not a string, +which meant that the comparison would never work. + +Reported-by: Clement Verna +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/hub/kojihub.py b/hub/kojihub.py +index eb9b67d..f910595 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -5581,7 +5581,7 @@ class CG_Importer(object): + (filesize, fileinfo['filename'], fileinfo['filesize'])) + + # checksum +- if koji.CHECKSUM_TYPES[fileinfo['checksum_type']] != 'md5': ++ if fileinfo['checksum_type'] != 'md5': + # XXX + # until we change the way we handle checksums, we have to limit this to md5 + raise koji.GenericError("Unsupported checksum type: %(checksum_type)s" % fileinfo) + diff --git a/koji.spec b/koji.spec index 3ae463f..dd49657 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.15.0 -Release: 5%{?dist} +Release: 6%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -38,6 +38,7 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 Patch0: https://pagure.io/koji/pull-request/735.patch Patch1: https://pagure.io/koji/pull-request/794.patch Patch2: koji-fix808.patch +Patch3: https://pagure.io/koji/pull-request/796.patch # Not upstreamable Patch100: fedora-config.patch @@ -246,6 +247,7 @@ koji-web is a web UI to the Koji system. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -448,6 +450,9 @@ fi %endif %changelog +* Tue Feb 20 2018 Patrick Uiterwijk - 1.15.0-6 +- Backport PR #796 + * Sun Feb 18 2018 Patrick Uiterwijk - 1.15.0-5 - Add workaround patch for bug #808 From f1d1d624696c0d46a630703f535e693ea37c0bec Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 16 Mar 2018 12:11:00 -0700 Subject: [PATCH 108/202] Backport PR #841 to allow configurable timeout for oz --- 841.patch | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ koji.spec | 7 ++++++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 841.patch diff --git a/841.patch b/841.patch new file mode 100644 index 0000000..a13e2a1 --- /dev/null +++ b/841.patch @@ -0,0 +1,60 @@ +diff -Nur koji-1.15.0.orig/builder/kojid koji-1.15.0/builder/kojid +--- koji-1.15.0.orig/builder/kojid 2018-03-16 11:56:22.542475550 -0700 ++++ koji-1.15.0/builder/kojid 2018-03-16 11:58:57.281149897 -0700 +@@ -3491,8 +3491,8 @@ + #IF specific + 'imgdir': os.path.join(self.workdir, 'scratch_images'), + 'tmpdir': os.path.join(self.workdir, 'oz-tmp'), +- 'verbose' : True, +- 'timeout': 7200, ++ 'verbose': True, ++ 'timeout': self.options.oz_install_timeout, + 'output': 'log', + 'raw': False, + 'debug': True, +@@ -5652,6 +5652,7 @@ + 'resolver-status.properties *.lastUpdated', + 'failed_buildroot_lifetime' : 3600 * 4, + 'rpmbuild_timeout' : 3600 * 24, ++ 'oz_install_timeout': None, + 'cert': None, + 'ca': '', # FIXME: Unused, remove in next major release + 'serverca': None} +@@ -5659,7 +5660,7 @@ + for name, value in config.items('kojid'): + if name in ['sleeptime', 'maxjobs', 'minspace', 'retry_interval', + 'max_retries', 'offline_retry_interval', 'failed_buildroot_lifetime', +- 'timeout', 'rpmbuild_timeout',]: ++ 'timeout', 'rpmbuild_timeout', 'oz_install_timeout',]: + try: + defaults[name] = int(value) + except ValueError: +diff -Nur koji-1.15.0.orig/builder/kojid.conf koji-1.15.0/builder/kojid.conf +--- koji-1.15.0.orig/builder/kojid.conf 2017-12-18 14:10:22.000000000 -0800 ++++ koji-1.15.0/builder/kojid.conf 2018-03-16 11:59:35.122314808 -0700 +@@ -35,6 +35,10 @@ + ; Timeout for build duration (24 hours) + ; rpmbuild_timeout=86400 + ++; Install timeout(seconds) for image build ++; if it's unset, use the number in /etc/oz/oz.cfg, supported since oz-0.16.0 ++; oz_install_timeout=7200 ++ + ; The URL for the xmlrpc server + server=http://hub.example.com/kojihub + +diff -Nur koji-1.15.0.orig/docs/source/image_build.rst koji-1.15.0/docs/source/image_build.rst +--- koji-1.15.0.orig/docs/source/image_build.rst 2017-12-18 14:10:22.000000000 -0800 ++++ koji-1.15.0/docs/source/image_build.rst 2018-03-16 12:00:26.644539341 -0700 +@@ -660,6 +660,11 @@ + #. python-psphere => 0.5 + #. VMDKStream => 0.2 + #. pykickstart ++#. Edit ``/etc/kojid/kojid.conf``, and set an second value, eg: 7200 for ++ ``oz_install_timeout``. It's a timeout waiting guest installing. If it's ++ not specified, oz will use its default value. Since ``oz-0.16.0`` it can be ++ configured in ``/etc/oz/oz.cfg`` as ``install`` in the ``[timeouts]`` ++ section. + #. Edit ``/etc/oz/oz.cfg``, and set the memory value in the ``[libvirt]`` + section to at least 2048. Set ``safe_generation`` under ``[icicle]`` to yes. + #. Run: ``mkdir -p ~root/.psphere/templates``, and then copy the following diff --git a/koji.spec b/koji.spec index dd49657..572b297 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.15.0 -Release: 6%{?dist} +Release: 7%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -39,6 +39,7 @@ Patch0: https://pagure.io/koji/pull-request/735.patch Patch1: https://pagure.io/koji/pull-request/794.patch Patch2: koji-fix808.patch Patch3: https://pagure.io/koji/pull-request/796.patch +Patch4: https://pagure.io/koji/pull-request/841.patch # Not upstreamable Patch100: fedora-config.patch @@ -248,6 +249,7 @@ koji-web is a web UI to the Koji system. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -450,6 +452,9 @@ fi %endif %changelog +* Fri Mar 16 2018 Kevin Fenzi - 1.15.0-7 +- Backport PR #841 to allow configurable timeout for oz + * Tue Feb 20 2018 Patrick Uiterwijk - 1.15.0-6 - Backport PR #796 From 6f0a88203e24e9cab099bd620ec26fcaa0048826 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 4 Apr 2018 00:17:54 +0200 Subject: [PATCH 109/202] Rebase to koji 1.15.1 Signed-off-by: Patrick Uiterwijk --- 796.patch | 28 ---------------------------- koji-fix808.patch | 15 --------------- koji.spec | 14 +++++++------- 3 files changed, 7 insertions(+), 50 deletions(-) delete mode 100644 796.patch delete mode 100644 koji-fix808.patch diff --git a/796.patch b/796.patch deleted file mode 100644 index 7a88b55..0000000 --- a/796.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e45c909235825f22e2ac7da63a4d6454399224e3 Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: Feb 20 2018 09:10:11 +0000 -Subject: Fix comparison with Enum value - - -The CHECKSUM_TYPES[...] call returns the index in the Enum field, not a string, -which meant that the comparison would never work. - -Reported-by: Clement Verna -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/hub/kojihub.py b/hub/kojihub.py -index eb9b67d..f910595 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -5581,7 +5581,7 @@ class CG_Importer(object): - (filesize, fileinfo['filename'], fileinfo['filesize'])) - - # checksum -- if koji.CHECKSUM_TYPES[fileinfo['checksum_type']] != 'md5': -+ if fileinfo['checksum_type'] != 'md5': - # XXX - # until we change the way we handle checksums, we have to limit this to md5 - raise koji.GenericError("Unsupported checksum type: %(checksum_type)s" % fileinfo) - diff --git a/koji-fix808.patch b/koji-fix808.patch deleted file mode 100644 index c659a38..0000000 --- a/koji-fix808.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -rup koji-1.15.0.orig/builder/kojid koji-1.15.0/builder/kojid ---- koji-1.15.0.orig/builder/kojid 2018-02-18 12:34:29.680250204 +0100 -+++ koji-1.15.0/builder/kojid 2018-02-18 12:35:33.857177069 +0100 -@@ -736,7 +736,10 @@ class BuildRoot(object): - # mock 1.4+ /tmp is tmpfs mounted on each run, different - # directory is needed for persistency - # 'within' is equivalent to broot.path_without_to_within(broot.tmpdir()) -- base = "/builddir/tmp" -+ # -+ # *Note by puiterwijk*: This directory is "thebuilddir" rather than "Builddir" -+ # as it's in upstream koji to avoid upstream bug #808 -+ base = "/thebuilddir/tmp" - if within: - return base - else: diff --git a/koji.spec b/koji.spec index 572b297..60d4995 100644 --- a/koji.spec +++ b/koji.spec @@ -25,8 +25,8 @@ %endif Name: koji -Version: 1.15.0 -Release: 7%{?dist} +Version: 1.15.1 +Release: 1%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -37,9 +37,7 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Backported patches Patch0: https://pagure.io/koji/pull-request/735.patch Patch1: https://pagure.io/koji/pull-request/794.patch -Patch2: koji-fix808.patch -Patch3: https://pagure.io/koji/pull-request/796.patch -Patch4: https://pagure.io/koji/pull-request/841.patch +Patch2: https://pagure.io/koji/pull-request/841.patch # Not upstreamable Patch100: fedora-config.patch @@ -248,8 +246,6 @@ koji-web is a web UI to the Koji system. %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -452,6 +448,10 @@ fi %endif %changelog +* Tue Apr 03 2018 Patrick Uiterwijk - 1.15.1-1 +- Rebase to 1.15.1 +- Fixes CVE-2018-1002150 + * Fri Mar 16 2018 Kevin Fenzi - 1.15.0-7 - Backport PR #841 to allow configurable timeout for oz From 849633957a42d3a0b2adb571d8163d29aafde72b Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 4 Apr 2018 16:04:22 +0200 Subject: [PATCH 110/202] Upload tarball Signed-off-by: Patrick Uiterwijk --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index aad62ff..a3c822c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ koji-1.4.0.tar.bz2 /koji-1.13.0.tar.bz2 /koji-1.14.0.tar.bz2 /koji-1.15.0.tar.bz2 +/koji-1.15.1.tar.bz2 diff --git a/sources b/sources index 654ef8a..dffda0e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.15.0.tar.bz2) = 680f76328900c2519745e392b576cc33cce3349bc3428001c8db1ff068bf9fdf071e0096ece837729fba86cd79708553dc6b6b7334316b3e02f1c3089164d418 +SHA512 (koji-1.15.1.tar.bz2) = 324e9ce4efed9b51eddbe05e159edf3a419b02e7b9eb60fab312f4662402f68c9743afd65417c759187addd5701b018870a322613be20aeeaf82720426765766 From 1c88fee861dcca5cf2778f72ba61f1d8df6df326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 18 Jun 2018 17:47:05 +0200 Subject: [PATCH 111/202] Rebuilt for Python 3.7 --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 60d4995..ef4d960 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.15.1 -Release: 1%{?dist} +Release: 2%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -448,6 +448,9 @@ fi %endif %changelog +* Mon Jun 18 2018 Miro Hrončok - 1.15.1-2 +- Rebuilt for Python 3.7 + * Tue Apr 03 2018 Patrick Uiterwijk - 1.15.1-1 - Rebase to 1.15.1 - Fixes CVE-2018-1002150 From ee84b5fee03c2281b8c5191d3118d4841b289536 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Tue, 10 Jul 2018 01:32:15 -0500 Subject: [PATCH 112/202] Remove needless use of %defattr --- koji.spec | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/koji.spec b/koji.spec index ef4d960..04f2611 100644 --- a/koji.spec +++ b/koji.spec @@ -265,14 +265,12 @@ sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/b %endif %files -%defattr(-,root,root) %{_bindir}/* %config(noreplace) /etc/koji.conf %dir /etc/koji.conf.d %doc docs Authors COPYING LGPL %files -n python2-%{name} -%defattr(-,root,root) %{python2_sitelib}/%{name} %{python2_sitelib}/koji_cli @@ -283,7 +281,6 @@ sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/b %endif %files -n python2-%{name}-cli-plugins -%defattr(-,root,root) %{python2_sitelib}/koji_cli_plugins # we don't have config files for default plugins yet #%%dir %%{_sysconfdir}/koji/plugins @@ -291,7 +288,6 @@ sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/b %if 0%{with python3} %files -n python%{python3_pkgversion}-%{name}-cli-plugins -%defattr(-,root,root) %{python3_sitelib}/koji_cli_plugins # we don't have config files for default plugins yet #%%dir %%{_sysconfdir}/koji/plugins @@ -299,7 +295,6 @@ sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/b %endif %files hub -%defattr(-,root,root) %{_datadir}/koji-hub %dir %{_libexecdir}/koji-hub %{_libexecdir}/koji-hub/rpmdiff @@ -309,14 +304,12 @@ sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/b %dir /etc/koji-hub/hub.conf.d %files hub-plugins -%defattr(-,root,root) %dir %{_prefix}/lib/koji-hub-plugins %{_prefix}/lib/koji-hub-plugins/*.py* %dir /etc/koji-hub/plugins /etc/koji-hub/plugins/*.conf %files utils -%defattr(-,root,root) %{_sbindir}/kojira %if %{use_systemd} %{_unitdir}/kojira.service @@ -334,7 +327,6 @@ sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/b %config(noreplace) /etc/koji-shadow/koji-shadow.conf %files web -%defattr(-,root,root) %{_datadir}/koji-web %dir /etc/kojiweb %config(noreplace) /etc/kojiweb/web.conf @@ -342,7 +334,6 @@ sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/b %dir /etc/kojiweb/web.conf.d %files builder -%defattr(-,root,root) %{_sbindir}/kojid %dir %{_libexecdir}/kojid %{_libexecdir}/kojid/mergerepos @@ -389,7 +380,6 @@ fi %endif %files vm -%defattr(-,root,root) %{_sbindir}/kojivmd #dir %%{_datadir}/kojivmd %{_datadir}/kojivmd/kojikamid From 6bd49b1e748b390609818d98ac883021307812eb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 07:20:10 +0000 Subject: [PATCH 113/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 04f2611..d456d68 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.15.1 -Release: 2%{?dist} +Release: 3%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -438,6 +438,9 @@ fi %endif %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.15.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Mon Jun 18 2018 Miro Hrončok - 1.15.1-2 - Rebuilt for Python 3.7 From d3b03356cb0ec2d7f28a39b6b1582c1170aa4244 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 1 Aug 2018 10:37:41 -0700 Subject: [PATCH 114/202] Update to 1.16.0 --- .gitignore | 1 + 735.patch | 28 ----- 794.patch | 354 ----------------------------------------------------- 841.patch | 60 --------- koji.spec | 16 +-- sources | 2 +- 6 files changed, 7 insertions(+), 454 deletions(-) delete mode 100644 735.patch delete mode 100644 794.patch delete mode 100644 841.patch diff --git a/.gitignore b/.gitignore index a3c822c..218a8c9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ koji-1.4.0.tar.bz2 /koji-1.14.0.tar.bz2 /koji-1.15.0.tar.bz2 /koji-1.15.1.tar.bz2 +/koji-1.16.0.tar.bz2 diff --git a/735.patch b/735.patch deleted file mode 100644 index d2c448b..0000000 --- a/735.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 323926afbf4d1337e1bcdfc07e7d8e64f6289bf1 Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: Dec 07 2017 01:55:04 +0000 -Subject: Fix encoding issue in runroot with python3 - - -This will make sure that the log from the server is correctly decoded, since -sys.stdout only accepts strings, not raw bytes, which is what downloadTaskOutput -returns. - -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/plugins/cli/runroot.py b/plugins/cli/runroot.py -index f8d4b50..dc5d737 100644 ---- a/plugins/cli/runroot.py -+++ b/plugins/cli/runroot.py -@@ -90,7 +90,7 @@ def handle_runroot(options, session, args): - if 'runroot.log' in output: - for volume in output['runroot.log']: - log = session.downloadTaskOutput(task_id, 'runroot.log', volume=volume) -- sys.stdout.write(log) -+ sys.stdout.write(log.decode('utf8')) - info = session.getTaskInfo(task_id) - if info is None: - sys.exit(1) - diff --git a/794.patch b/794.patch deleted file mode 100644 index 9864e9d..0000000 --- a/794.patch +++ /dev/null @@ -1,354 +0,0 @@ -From b975594ce4ec1df300eccc261bedbd607e2c2aa0 Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: Feb 01 2018 15:12:52 +0000 -Subject: [PATCH 1/4] recheck for duplicate external rpm on insertion errors - - -fixes: https://pagure.io/koji/issue/788 - ---- - -diff --git a/hub/kojihub.py b/hub/kojihub.py -index 7e664af..4500acd 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -5730,7 +5730,7 @@ def add_external_rpm(rpminfo, external_repo, strict=True): - - # [!] Calling function should perform access checks - -- #sanity check rpminfo -+ # sanity check rpminfo - dtypes = ( - ('name', basestring), - ('version', basestring), -@@ -5746,37 +5746,47 @@ def add_external_rpm(rpminfo, external_repo, strict=True): - if not isinstance(rpminfo[field], allowed): - #this will catch unwanted NULLs - raise koji.GenericError("Invalid value for %s: %r" % (field, rpminfo[field])) -- #TODO: more sanity checks for payloadhash -+ # strip extra fields -+ rpminfo = dslice(rpminfo, [x[0] for x in dtypes]) -+ # TODO: more sanity checks for payloadhash - -- #Check to see if we have it -- data = rpminfo.copy() -- data['location'] = external_repo -- previous = get_rpm(data, strict=False) -+ def check_dup(): -+ # Check to see if we have it -+ data = rpminfo.copy() -+ data['location'] = external_repo -+ previous = get_rpm(data, strict=False) -+ if previous: -+ disp = "%(name)s-%(version)s-%(release)s.%(arch)s@%(external_repo_name)s" % previous -+ if strict: -+ raise koji.GenericError("external rpm already exists: %s" % disp) -+ elif data['payloadhash'] != previous['payloadhash']: -+ raise koji.GenericError("hash changed for external rpm: %s (%s -> %s)" \ -+ % (disp, previous['payloadhash'], data['payloadhash'])) -+ else: -+ return previous -+ -+ previous = check_dup() - if previous: -- disp = "%(name)s-%(version)s-%(release)s.%(arch)s@%(external_repo_name)s" % previous -- if strict: -- raise koji.GenericError("external rpm already exists: %s" % disp) -- elif data['payloadhash'] != previous['payloadhash']: -- raise koji.GenericError("hash changed for external rpm: %s (%s -> %s)" \ -- % (disp, previous['payloadhash'], data['payloadhash'])) -- else: -- return previous -+ return previous - -- #add rpminfo entry -- rpminfo['external_repo_id'] = get_external_repo_id(external_repo, strict=True) -- rpminfo['id'] = _singleValue("""SELECT nextval('rpminfo_id_seq')""") -- q = """INSERT INTO rpminfo (id, build_id, buildroot_id, -- name, version, release, epoch, arch, -- external_repo_id, -- payloadhash, size, buildtime) -- VALUES (%(id)i, NULL, NULL, -- %(name)s, %(version)s, %(release)s, %(epoch)s, %(arch)s, -- %(external_repo_id)i, -- %(payloadhash)s, %(size)i, %(buildtime)i) -- """ -- _dml(q, rpminfo) -+ # add rpminfo entry -+ data = rpminfo.copy() -+ data['external_repo_id'] = get_external_repo_id(external_repo, strict=True) -+ data['id'] = nextval('rpminfo_id_seq') -+ data['build_id'] = None -+ data['buildroot_id'] = None -+ insert = InsertProcessor('rpminfo', data=data) -+ try: -+ insert.execute() -+ except Exception: -+ # check for dup again to work around a race -+ # see: https://pagure.io/koji/issue/788 -+ previous = check_dup() -+ if previous: -+ return previous -+ raise - -- return get_rpm(rpminfo['id']) -+ return get_rpm(data['id']) - - def import_build_log(fn, buildinfo, subdir=None): - """Move a logfile related to a build to the right place""" - -From 6dd0cb86ce5aa07d7fb199ea55e35cdec9d3d49d Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: Feb 04 2018 13:01:27 +0000 -Subject: [PATCH 2/4] use a savepoint - - ---- - -diff --git a/hub/kojihub.py b/hub/kojihub.py -index 4500acd..3da3def 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -5776,11 +5776,13 @@ def add_external_rpm(rpminfo, external_repo, strict=True): - data['build_id'] = None - data['buildroot_id'] = None - insert = InsertProcessor('rpminfo', data=data) -+ savepoint = Savepoint('pre_insert') - try: - insert.execute() - except Exception: -- # check for dup again to work around a race -+ # if this failed, it likely duplicates one just inserted - # see: https://pagure.io/koji/issue/788 -+ savepoint.rollback() - previous = check_dup() - if previous: - return previous -@@ -7395,6 +7397,16 @@ def nextval(sequence): - return _singleValue("SELECT nextval(%(sequence)s)", data, strict=True) - - -+class Savepoint(object): -+ -+ def __init__(self, name): -+ self.name = name -+ _dml("SAVEPOINT %s" % name, {}) -+ -+ def rollback(self): -+ _dml("ROLLBACK TO SAVEPOINT %s" % self.name, {}) -+ -+ - def parse_json(value, desc=None, errstr=None): - if value is None: - return value - -From 3c5c9f74d446ee6bca15cadceaf3c21b2f26be7c Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: Feb 04 2018 15:08:00 +0000 -Subject: [PATCH 3/4] unit test for add_external_rpm - - ---- - -diff --git a/tests/test_hub/test_add_external_rpm.py b/tests/test_hub/test_add_external_rpm.py -new file mode 100644 -index 0000000..7aa928b ---- /dev/null -+++ b/tests/test_hub/test_add_external_rpm.py -@@ -0,0 +1,158 @@ -+import mock -+import unittest -+ -+import koji -+import kojihub -+ -+ -+IP = kojihub.InsertProcessor -+ -+ -+class FakeException(Exception): -+ pass -+ -+ -+class TestAddExternalRPM(unittest.TestCase): -+ -+ def setUp(self): -+ self.get_rpm = mock.patch('kojihub.get_rpm').start() -+ self.get_external_repo_id = mock.patch('kojihub.get_external_repo_id').start() -+ self.nextval = mock.patch('kojihub.nextval').start() -+ self.Savepoint = mock.patch('kojihub.Savepoint').start() -+ self.InsertProcessor = mock.patch('kojihub.InsertProcessor', -+ side_effect=self.getInsert).start() -+ self.inserts = [] -+ self.insert_execute = mock.MagicMock() -+ -+ self.rpminfo = { -+ 'name': 'NAME', -+ 'version': 'VERSION', -+ 'release': 'RELEASE', -+ 'epoch': None, -+ 'arch': 'noarch', -+ 'payloadhash': 'fakehash', -+ 'size': 42, -+ 'buildtime': 0, -+ } -+ self.repo = 'myrepo' -+ -+ def tearDown(self): -+ mock.patch.stopall() -+ -+ def getInsert(self, *args, **kwargs): -+ insert = IP(*args, **kwargs) -+ insert.execute = self.insert_execute -+ self.inserts.append(insert) -+ return insert -+ -+ def test_add_ext_rpm(self): -+ self.get_rpm.return_value = None -+ self.get_external_repo_id.return_value = mock.sentinel.repo_id -+ self.nextval.return_value = mock.sentinel.rpm_id -+ -+ # call it -+ kojihub.add_external_rpm(self.rpminfo, self.repo) -+ -+ self.assertEqual(len(self.inserts), 1) -+ insert = self.inserts[0] -+ self.assertEqual(insert.data['external_repo_id'], mock.sentinel.repo_id) -+ self.assertEqual(insert.data['id'], mock.sentinel.rpm_id) -+ self.assertEqual(insert.table, 'rpminfo') -+ -+ def test_add_ext_rpm_bad_data(self): -+ rpminfo = self.rpminfo.copy() -+ del rpminfo['size'] -+ -+ with self.assertRaises(koji.GenericError): -+ kojihub.add_external_rpm(rpminfo, self.repo) -+ -+ self.get_rpm.assert_not_called() -+ self.nextval.assert_not_called() -+ self.assertEqual(len(self.inserts), 0) -+ -+ rpminfo = self.rpminfo.copy() -+ rpminfo['size'] = ['invalid type'] -+ -+ with self.assertRaises(koji.GenericError): -+ kojihub.add_external_rpm(rpminfo, self.repo) -+ -+ self.get_rpm.assert_not_called() -+ self.nextval.assert_not_called() -+ self.assertEqual(len(self.inserts), 0) -+ -+ def test_add_ext_rpm_dup(self): -+ prev = self.rpminfo.copy() -+ prev['external_repo_id'] = mock.sentinel.repo_id -+ prev['external_repo_name'] = self.repo -+ self.get_rpm.return_value = prev -+ self.get_external_repo_id.return_value = mock.sentinel.repo_id -+ -+ # call it (default is strict) -+ with self.assertRaises(koji.GenericError): -+ kojihub.add_external_rpm(self.rpminfo, self.repo) -+ -+ self.assertEqual(len(self.inserts), 0) -+ self.nextval.assert_not_called() -+ -+ # call it without strict -+ ret = kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) -+ -+ self.assertEqual(ret, self.get_rpm.return_value) -+ self.assertEqual(len(self.inserts), 0) -+ self.nextval.assert_not_called() -+ -+ # different hash -+ prev['payloadhash'] = 'different hash' -+ with self.assertRaises(koji.GenericError): -+ kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) -+ -+ self.assertEqual(len(self.inserts), 0) -+ self.nextval.assert_not_called() -+ -+ def test_add_ext_rpm_dup_late(self): -+ prev = self.rpminfo.copy() -+ prev['external_repo_id'] = mock.sentinel.repo_id -+ prev['external_repo_name'] = self.repo -+ self.get_rpm.side_effect = [None, prev] -+ self.get_external_repo_id.return_value = mock.sentinel.repo_id -+ self.insert_execute.side_effect = FakeException('insert failed') -+ -+ # call it (default is strict) -+ with self.assertRaises(koji.GenericError): -+ kojihub.add_external_rpm(self.rpminfo, self.repo) -+ -+ self.assertEqual(len(self.inserts), 1) -+ self.nextval.assert_called_once() -+ -+ # call it without strict -+ self.inserts[:] = [] -+ self.nextval.reset_mock() -+ self.get_rpm.side_effect = [None, prev] -+ ret = kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) -+ -+ self.assertEqual(ret, prev) -+ self.assertEqual(len(self.inserts), 1) -+ self.nextval.assert_called_once() -+ -+ # different hash -+ self.inserts[:] = [] -+ self.nextval.reset_mock() -+ self.get_rpm.side_effect = [None, prev] -+ prev['payloadhash'] = 'different hash' -+ with self.assertRaises(koji.GenericError): -+ kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) -+ -+ self.assertEqual(len(self.inserts), 1) -+ self.nextval.assert_called_once() -+ -+ # no dup after failed insert -+ self.inserts[:] = [] -+ self.nextval.reset_mock() -+ self.get_rpm.side_effect = [None, None] -+ with self.assertRaises(FakeException): -+ kojihub.add_external_rpm(self.rpminfo, self.repo, strict=False) -+ -+ self.assertEqual(len(self.inserts), 1) -+ self.nextval.assert_called_once() -+ -+ - -From a7e866cf8a39f56e694372cfd9d6099f7bc5be0d Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: Feb 04 2018 15:15:40 +0000 -Subject: [PATCH 4/4] unit test for Savepoint - - ---- - -diff --git a/tests/test_hub/test_savepoint.py b/tests/test_hub/test_savepoint.py -new file mode 100644 -index 0000000..279729e ---- /dev/null -+++ b/tests/test_hub/test_savepoint.py -@@ -0,0 +1,22 @@ -+import mock -+import unittest -+ -+import kojihub -+ -+ -+class TestSavepoint(unittest.TestCase): -+ -+ def setUp(self): -+ self.dml = mock.patch('kojihub._dml').start() -+ -+ def tearDown(self): -+ mock.patch.stopall() -+ -+ def test_savepoint(self): -+ sp = kojihub.Savepoint('some_name') -+ self.assertEqual(sp.name, 'some_name') -+ self.dml.assert_called_once_with('SAVEPOINT some_name', {}) -+ -+ self.dml.reset_mock() -+ sp.rollback() -+ self.dml.assert_called_once_with('ROLLBACK TO SAVEPOINT some_name', {}) - diff --git a/841.patch b/841.patch deleted file mode 100644 index a13e2a1..0000000 --- a/841.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -Nur koji-1.15.0.orig/builder/kojid koji-1.15.0/builder/kojid ---- koji-1.15.0.orig/builder/kojid 2018-03-16 11:56:22.542475550 -0700 -+++ koji-1.15.0/builder/kojid 2018-03-16 11:58:57.281149897 -0700 -@@ -3491,8 +3491,8 @@ - #IF specific - 'imgdir': os.path.join(self.workdir, 'scratch_images'), - 'tmpdir': os.path.join(self.workdir, 'oz-tmp'), -- 'verbose' : True, -- 'timeout': 7200, -+ 'verbose': True, -+ 'timeout': self.options.oz_install_timeout, - 'output': 'log', - 'raw': False, - 'debug': True, -@@ -5652,6 +5652,7 @@ - 'resolver-status.properties *.lastUpdated', - 'failed_buildroot_lifetime' : 3600 * 4, - 'rpmbuild_timeout' : 3600 * 24, -+ 'oz_install_timeout': None, - 'cert': None, - 'ca': '', # FIXME: Unused, remove in next major release - 'serverca': None} -@@ -5659,7 +5660,7 @@ - for name, value in config.items('kojid'): - if name in ['sleeptime', 'maxjobs', 'minspace', 'retry_interval', - 'max_retries', 'offline_retry_interval', 'failed_buildroot_lifetime', -- 'timeout', 'rpmbuild_timeout',]: -+ 'timeout', 'rpmbuild_timeout', 'oz_install_timeout',]: - try: - defaults[name] = int(value) - except ValueError: -diff -Nur koji-1.15.0.orig/builder/kojid.conf koji-1.15.0/builder/kojid.conf ---- koji-1.15.0.orig/builder/kojid.conf 2017-12-18 14:10:22.000000000 -0800 -+++ koji-1.15.0/builder/kojid.conf 2018-03-16 11:59:35.122314808 -0700 -@@ -35,6 +35,10 @@ - ; Timeout for build duration (24 hours) - ; rpmbuild_timeout=86400 - -+; Install timeout(seconds) for image build -+; if it's unset, use the number in /etc/oz/oz.cfg, supported since oz-0.16.0 -+; oz_install_timeout=7200 -+ - ; The URL for the xmlrpc server - server=http://hub.example.com/kojihub - -diff -Nur koji-1.15.0.orig/docs/source/image_build.rst koji-1.15.0/docs/source/image_build.rst ---- koji-1.15.0.orig/docs/source/image_build.rst 2017-12-18 14:10:22.000000000 -0800 -+++ koji-1.15.0/docs/source/image_build.rst 2018-03-16 12:00:26.644539341 -0700 -@@ -660,6 +660,11 @@ - #. python-psphere => 0.5 - #. VMDKStream => 0.2 - #. pykickstart -+#. Edit ``/etc/kojid/kojid.conf``, and set an second value, eg: 7200 for -+ ``oz_install_timeout``. It's a timeout waiting guest installing. If it's -+ not specified, oz will use its default value. Since ``oz-0.16.0`` it can be -+ configured in ``/etc/oz/oz.cfg`` as ``install`` in the ``[timeouts]`` -+ section. - #. Edit ``/etc/oz/oz.cfg``, and set the memory value in the ``[libvirt]`` - section to at least 2048. Set ``safe_generation`` under ``[icicle]`` to yes. - #. Run: ``mkdir -p ~root/.psphere/templates``, and then copy the following diff --git a/koji.spec b/koji.spec index d456d68..e6ab4f5 100644 --- a/koji.spec +++ b/koji.spec @@ -25,8 +25,8 @@ %endif Name: koji -Version: 1.15.1 -Release: 3%{?dist} +Version: 1.16.0 +Release: 1%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -34,11 +34,6 @@ Group: Applications/System URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# Backported patches -Patch0: https://pagure.io/koji/pull-request/735.patch -Patch1: https://pagure.io/koji/pull-request/794.patch -Patch2: https://pagure.io/koji/pull-request/841.patch - # Not upstreamable Patch100: fedora-config.patch @@ -243,9 +238,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -297,7 +289,6 @@ sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/b %files hub %{_datadir}/koji-hub %dir %{_libexecdir}/koji-hub -%{_libexecdir}/koji-hub/rpmdiff %config(noreplace) /etc/httpd/conf.d/kojihub.conf %dir /etc/koji-hub %config(noreplace) /etc/koji-hub/hub.conf @@ -438,6 +429,9 @@ fi %endif %changelog +* Tue Jul 31 2018 Kevin Fenzi - 1.16.0-1 +- Update to 1.16.0 + * Fri Jul 13 2018 Fedora Release Engineering - 1.15.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index dffda0e..d46e6de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.15.1.tar.bz2) = 324e9ce4efed9b51eddbe05e159edf3a419b02e7b9eb60fab312f4662402f68c9743afd65417c759187addd5701b018870a322613be20aeeaf82720426765766 +SHA512 (koji-1.16.0.tar.bz2) = c1a0f8cf76949b597ee6207b74d91b3e70f150155f89953f710256ed898fb8ad4c4d5f347f2b1d8219ddf9e66195fb713e05d345048291f848cd26a406100426 From f8d9a74f0a0ac9e2727dd809b47a379527168fc6 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 13 Sep 2018 15:51:27 -0700 Subject: [PATCH 115/202] Update to 1.16.1 --- .gitignore | 1 + koji.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 218a8c9..80849aa 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ koji-1.4.0.tar.bz2 /koji-1.15.0.tar.bz2 /koji-1.15.1.tar.bz2 /koji-1.16.0.tar.bz2 +/koji-1.16.1.tar.bz2 diff --git a/koji.spec b/koji.spec index e6ab4f5..2b00cc1 100644 --- a/koji.spec +++ b/koji.spec @@ -25,7 +25,7 @@ %endif Name: koji -Version: 1.16.0 +Version: 1.16.1 Release: 1%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ @@ -429,6 +429,9 @@ fi %endif %changelog +* Thu Sep 13 2018 Kevin Fenzi - 1.16.1-1 +- Update to 1.16.1 + * Tue Jul 31 2018 Kevin Fenzi - 1.16.0-1 - Update to 1.16.0 diff --git a/sources b/sources index d46e6de..808e0cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.16.0.tar.bz2) = c1a0f8cf76949b597ee6207b74d91b3e70f150155f89953f710256ed898fb8ad4c4d5f347f2b1d8219ddf9e66195fb713e05d345048291f848cd26a406100426 +SHA512 (koji-1.16.1.tar.bz2) = 90d0ad83625776bd8f544e653bfcf5e78b0472794d58035105b120a9e5192b98dffcb43198efc705993b50d8ef8bc2e2e3a2f6bddcd746e987200b27b19e890c From 1848799a8b1600284d6a79cb415c199720f3235c Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 14 Sep 2018 10:18:28 -0700 Subject: [PATCH 116/202] Fix bad sed that caused python32 dep. --- koji.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 2b00cc1..d743072 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.16.1 -Release: 1%{?dist} +Release: 2%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -253,7 +253,7 @@ make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install cd ../plugins make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install # alter python interpreter in koji CLI -sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/bin/koji +sed -i 's/\#\!\/usr\/bin\/python2/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/bin/koji %endif %files @@ -429,6 +429,9 @@ fi %endif %changelog +* Fri Sep 14 2018 Kevin Fenzi - 1.16.1-2 +- Fix bad sed that caused python32 dep. + * Thu Sep 13 2018 Kevin Fenzi - 1.16.1-1 - Update to 1.16.1 From 26a0b3e85a0dc6047008881eb731f41971606de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 15 Nov 2018 12:53:55 +0100 Subject: [PATCH 117/202] https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 --- koji.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koji.spec b/koji.spec index d743072..0d68dda 100644 --- a/koji.spec +++ b/koji.spec @@ -1,3 +1,7 @@ +# This package depends on automagic byte compilation +# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 +%global _python_bytecompile_extra 1 + # Enable Python 3 builds for Fedora + EPEL >5 # NOTE: do **NOT** change 'epel' to 'rhel' here, as this spec is also %if 0%{?fedora} || 0%{?rhel} > 7 From 5e917f1b83f598bb2fe986414848d51d64a845eb Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 9 Jan 2019 09:22:40 -0800 Subject: [PATCH 118/202] Backport PR #1203 to fix Python 3 connection bug (#1192) --- ...r-for-Python-3.3-change-to-socket.er.patch | 87 +++++++++++++++++++ koji.spec | 12 ++- 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch diff --git a/0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch b/0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch new file mode 100644 index 0000000..f4479f4 --- /dev/null +++ b/0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch @@ -0,0 +1,87 @@ +From d20928c9d90e95147c6627c0dc3de31920e658b7 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Tue, 8 Jan 2019 11:20:26 -0800 +Subject: [PATCH] Fix `is_conn_error()` for Python 3.3+ change to + `socket.error` + +In Python 3.3+, `socket.error` is no longer a distinct exception. +It is - as the docs say - "A deprecated alias of OSError". This +means that this check: + +`isinstance(e, socket.error)` + +is effectively equivalent to: + +`isinstance(e, OSError)` + +This is a problem, because `requests.exceptions.ConnectionError` +(another exception type we handle later in `is_conn_error()`) is +a subclass of `OSError` - so on Python 3 we never actually reach +the block that's intended to handle that exception type. We hit +the `isinstance(e, socket.error)` block at the start instead, and +of course the exception doesn't have an `errno` attribute, so we +just return `False` at that point. + +There are a few different ways we could fix this; this commit +does it by ditching the `isinstance` checks, and dropping the +shortcut `return False` bailout from the early block. We'll still +ultimately return `False` unless the error is actually one of the +other types we handle; it just costs a couple more `isinstance` +checks. + +I don't think replacing the `isinstance socket.error` checks is +really necessary at all. We can just check for an `errno` attr, +and if there is one and it's one of the values we check for... +that seems safe enough to treat as a connection error. + +This also changes the second check to be a check of `e2`, not +`e` - I'm *fairly* sure this is what's actually intended, and +the current code was a copy-paste error. + +Fixes: #1192 + +Signed-off-by: Adam Williamson +--- + koji/__init__.py | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/koji/__init__.py b/koji/__init__.py +index aba10ec1..c4fd4756 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -1978,11 +1978,13 @@ def is_cert_error(e): + + def is_conn_error(e): + """Determine if an error seems to be from a dropped connection""" +- if isinstance(e, socket.error): +- if getattr(e, 'errno', None) in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): +- return True +- # else +- return False ++ # This is intended for the case where e is a socket error. ++ # as `socket.error` is just an alias for `OSError` in Python 3 ++ # there is no value to an `isinstance` check here; let's just ++ # assume that if the exception has an 'errno' and it's one of ++ # these values, this is a connection error. ++ if getattr(e, 'errno', None) in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): ++ return True + if isinstance(e, six.moves.http_client.BadStatusLine): + return True + try: +@@ -1994,10 +1996,9 @@ def is_conn_error(e): + e3 = getattr(e2, 'args', [None, None])[1] + if isinstance(e3, six.moves.http_client.BadStatusLine): + return True +- if isinstance(e2, socket.error): +- # same check as unwrapped socket error +- if getattr(e, 'errno', None) in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): +- return True ++ # same check as unwrapped socket error ++ if getattr(e2, 'errno', None) in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): ++ return True + except (TypeError, AttributeError): + pass + # otherwise +-- +2.20.1 + diff --git a/koji.spec b/koji.spec index 0d68dda..48aad7c 100644 --- a/koji.spec +++ b/koji.spec @@ -30,7 +30,7 @@ Name: koji Version: 1.16.1 -Release: 2%{?dist} +Release: 3%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -38,6 +38,12 @@ Group: Applications/System URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +# Fix is_conn_error bug which commonly caused operations that wait a +# long time to fail out prematurely on Python 3 +# https://pagure.io/koji/issue/1192 +# https://pagure.io/koji/pull-request/1203 +Patch0: 0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch + # Not upstreamable Patch100: fedora-config.patch @@ -242,6 +248,7 @@ koji-web is a web UI to the Koji system. %prep %setup -q +%patch0 -p1 -b .connerror %patch100 -p1 -b .fedoraconfig %build @@ -433,6 +440,9 @@ fi %endif %changelog +* Wed Jan 09 2019 Adam Williamson - 1.16.1-3 +- Backport fix for Python 3 connection failure bug (#1192, PR #1203) + * Fri Sep 14 2018 Kevin Fenzi - 1.16.1-2 - Fix bad sed that caused python32 dep. From 9c2e3e122d09a69f815cd6e4b4fb54cb20c7719e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:50 +0100 Subject: [PATCH 119/202] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- koji.spec | 9 --------- 1 file changed, 9 deletions(-) diff --git a/koji.spec b/koji.spec index 48aad7c..d026b71 100644 --- a/koji.spec +++ b/koji.spec @@ -34,7 +34,6 @@ Release: 3%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools -Group: Applications/System URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 @@ -119,7 +118,6 @@ contains shared libraries and the command-line interface. %package -n python2-%{name}-cli-plugins Summary: Koji client plugins -Group: Applications/Internet License: LGPLv2 Requires: %{name} = %{version}-%{release} @@ -129,7 +127,6 @@ Plugins to the koji command-line interface %if 0%{with python3} %package -n python3-%{name}-cli-plugins Summary: Koji client plugins -Group: Applications/Internet License: LGPLv2 Requires: %{name} = %{version}-%{release} @@ -139,7 +136,6 @@ Plugins to the koji command-line interface %package hub Summary: Koji XMLRPC interface -Group: Applications/Internet License: LGPLv2 and GPLv2 # rpmdiff lib (from rpmlint) is GPLv2 (only) Requires: httpd @@ -152,7 +148,6 @@ koji-hub is the XMLRPC interface to the koji database %package hub-plugins Summary: Koji hub plugins -Group: Applications/Internet License: LGPLv2 Requires: %{name}-hub = %{version}-%{release} Requires: python-qpid >= 0.7 @@ -164,7 +159,6 @@ Plugins to the koji XMLRPC interface %package builder Summary: Koji RPM builder daemon -Group: Applications/System License: LGPLv2 and GPLv2+ #mergerepos (from createrepo) is GPLv2+ Requires: python2-%{name} = %{version}-%{release} @@ -194,7 +188,6 @@ tasks that come through the Koji system. %package vm Summary: Koji virtual machine management daemon -Group: Applications/System License: LGPLv2 Requires: python2-%{name} = %{version}-%{release} %if %{use_systemd} @@ -218,7 +211,6 @@ virtual machine. This package is not required for most installations. %package utils Summary: Koji Utilities -Group: Applications/Internet License: LGPLv2 Requires: python-psycopg2 Requires: python2-%{name} = %{version}-%{release} @@ -233,7 +225,6 @@ Utilities for the Koji system %package web Summary: Koji Web UI -Group: Applications/Internet License: LGPLv2 Requires: httpd Requires: mod_wsgi From c45b6fed2325e8f8c72a97e6cdf37b135d699b06 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 05:55:12 +0000 Subject: [PATCH 120/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index d026b71..c2fefef 100644 --- a/koji.spec +++ b/koji.spec @@ -30,7 +30,7 @@ Name: koji Version: 1.16.1 -Release: 3%{?dist} +Release: 4%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -431,6 +431,9 @@ fi %endif %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 1.16.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Jan 09 2019 Adam Williamson - 1.16.1-3 - Backport fix for Python 3 connection failure bug (#1192, PR #1203) From f07ec036a44a970902bd6ffe4c1b00b309be59d9 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Thu, 21 Feb 2019 15:39:27 +0100 Subject: [PATCH 121/202] Rebase to 1.16.2 for CVE-2018-1002161 Signed-off-by: Patrick Uiterwijk --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 80849aa..583a548 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ koji-1.4.0.tar.bz2 /koji-1.15.1.tar.bz2 /koji-1.16.0.tar.bz2 /koji-1.16.1.tar.bz2 +/koji-1.16.2.tar.bz2 diff --git a/koji.spec b/koji.spec index c2fefef..91f37de 100644 --- a/koji.spec +++ b/koji.spec @@ -29,8 +29,8 @@ %endif Name: koji -Version: 1.16.1 -Release: 4%{?dist} +Version: 1.16.2 +Release: 1%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -431,6 +431,9 @@ fi %endif %changelog +* Thu Feb 21 2019 Patrick Uiterwijk - 1.16.2-1 +- Rebase to 1.16.2 for CVE-2018-1002161 + * Fri Feb 01 2019 Fedora Release Engineering - 1.16.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 808e0cd..a1c170f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.16.1.tar.bz2) = 90d0ad83625776bd8f544e653bfcf5e78b0472794d58035105b120a9e5192b98dffcb43198efc705993b50d8ef8bc2e2e3a2f6bddcd746e987200b27b19e890c +SHA512 (koji-1.16.2.tar.bz2) = 197cf4e9163393b33b954d466a14ba7ea2107754c824f4c40d833603492870f079264093b6b966c111feb0d139ca9378e90e279bca41614e07ab184747f95205 From b972d16a89b5c723e56c69bea3b6486572889551 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Thu, 7 Mar 2019 12:19:42 +0100 Subject: [PATCH 122/202] Rebase to 1.17.0 Signed-off-by: Patrick Uiterwijk --- .gitignore | 1 + fedora-config.patch | 25 +++++++++++++++++++++---- koji.spec | 24 +++++++++++++++--------- sources | 2 +- 4 files changed, 38 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 583a548..04f93f2 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ koji-1.4.0.tar.bz2 /koji-1.16.0.tar.bz2 /koji-1.16.1.tar.bz2 /koji-1.16.2.tar.bz2 +/koji-1.17.0.tar.bz2 diff --git a/fedora-config.patch b/fedora-config.patch index c141278..21a3398 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,6 +1,17 @@ -diff -rup koji-1.15.0.orig/cli/koji.conf koji-1.15.0/cli/koji.conf ---- koji-1.15.0.orig/cli/koji.conf 2018-01-27 10:44:39.111029362 +0100 -+++ koji-1.15.0/cli/koji.conf 2018-01-27 10:46:33.713817186 +0100 +From 47d9f103194e65611a472db42eff03eabe423739 Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Thu, 7 Mar 2019 12:22:12 +0100 +Subject: [PATCH] Apply Fedora instance configuration + +Signed-off-by: Patrick Uiterwijk +--- + cli/koji.conf | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) + +diff --git a/cli/koji.conf b/cli/koji.conf +index addd4e3..4fcb2ae 100644 +--- a/cli/koji.conf ++++ b/cli/koji.conf @@ -3,18 +3,23 @@ ;configuration for koji cli tool @@ -28,7 +39,7 @@ diff -rup koji-1.15.0.orig/cli/koji.conf koji-1.15.0/cli/koji.conf ;the service name of the principal being used by the hub ;krbservice = host -@@ -29,13 +34,6 @@ +@@ -29,16 +34,9 @@ ;krb_canon_host = no @@ -45,3 +56,9 @@ diff -rup koji-1.15.0.orig/cli/koji.conf koji-1.15.0/cli/koji.conf +;enabled plugins for CLI, runroot is enabled by deafult for fedora +;save_failed_tree is available +plugins = runroot + + ;timeout of XMLRPC requests by seconds, default: 60 * 60 * 12 = 43200 + ;timeout = 43200 +-- +2.20.1 + diff --git a/koji.spec b/koji.spec index 91f37de..496fdb3 100644 --- a/koji.spec +++ b/koji.spec @@ -29,7 +29,7 @@ %endif Name: koji -Version: 1.16.2 +Version: 1.17.0 Release: 1%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ @@ -37,12 +37,6 @@ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# Fix is_conn_error bug which commonly caused operations that wait a -# long time to fail out prematurely on Python 3 -# https://pagure.io/koji/issue/1192 -# https://pagure.io/koji/pull-request/1203 -Patch0: 0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch - # Not upstreamable Patch100: fedora-config.patch @@ -239,7 +233,6 @@ koji-web is a web UI to the Koji system. %prep %setup -q -%patch0 -p1 -b .connerror %patch100 -p1 -b .fedoraconfig %build @@ -257,6 +250,10 @@ make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install # alter python interpreter in koji CLI sed -i 's/\#\!\/usr\/bin\/python2/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/bin/koji %endif +%if 0%{?fedora} <= 29 +# This changed in 1.17.0, make sure that existing installs do not break +ln -s /usr/share/koji-hub %RPM_BUILD_ROOT/usr/libexec/koji-hub +%endif %files %{_bindir}/* @@ -290,7 +287,11 @@ sed -i 's/\#\!\/usr\/bin\/python2/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/ %files hub %{_datadir}/koji-hub -%dir %{_libexecdir}/koji-hub +%if 0%{?fedora} <= 29 +# Compatibility symlink +%{_libexecdir}/koji-hub +%endif +%dir %{_datarootdir}/koji-hub %config(noreplace) /etc/httpd/conf.d/kojihub.conf %dir /etc/koji-hub %config(noreplace) /etc/koji-hub/hub.conf @@ -299,6 +300,7 @@ sed -i 's/\#\!\/usr\/bin\/python2/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/ %files hub-plugins %dir %{_prefix}/lib/koji-hub-plugins %{_prefix}/lib/koji-hub-plugins/*.py* +%{_prefix}/lib/koji-hub-plugins/__pycache__/ %dir /etc/koji-hub/plugins /etc/koji-hub/plugins/*.conf @@ -333,6 +335,7 @@ sed -i 's/\#\!\/usr\/bin\/python2/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/ %defattr(-,root,root) %dir %{_prefix}/lib/koji-builder-plugins %{_prefix}/lib/koji-builder-plugins/*.py* +%{_prefix}/lib/koji-builder-plugins/__pycache__/ %if %{use_systemd} %{_unitdir}/kojid.service %else @@ -431,6 +434,9 @@ fi %endif %changelog +* Thu Mar 07 2019 Patrick Uiterwijk - 1.17.0-1 +- Rebase to 1.17.0 + * Thu Feb 21 2019 Patrick Uiterwijk - 1.16.2-1 - Rebase to 1.16.2 for CVE-2018-1002161 diff --git a/sources b/sources index a1c170f..12d49b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.16.2.tar.bz2) = 197cf4e9163393b33b954d466a14ba7ea2107754c824f4c40d833603492870f079264093b6b966c111feb0d139ca9378e90e279bca41614e07ab184747f95205 +SHA512 (koji-1.17.0.tar.bz2) = 6f5da6d10ca3d2c01aa9251d5fa01221a89eb80a24b6b933197f359d9bc348d8e2f8b18d66d886454bdf89e8269a6a9652c44f1858b1c75d6540e32898e76f89 From 12a63677fec346ffbb84ca647fa61b07f0fd1d21 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Thu, 7 Mar 2019 09:05:21 -0500 Subject: [PATCH 123/202] - Enable Python 3 for Fedora 30+ and EL8+ - Sync packaging changes from upstream --- ...r-for-Python-3.3-change-to-socket.er.patch | 87 ---- fedora-config.patch | 15 +- koji.spec | 456 ++++++++++++++---- 3 files changed, 363 insertions(+), 195 deletions(-) delete mode 100644 0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch diff --git a/0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch b/0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch deleted file mode 100644 index f4479f4..0000000 --- a/0001-Fix-is_conn_error-for-Python-3.3-change-to-socket.er.patch +++ /dev/null @@ -1,87 +0,0 @@ -From d20928c9d90e95147c6627c0dc3de31920e658b7 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Tue, 8 Jan 2019 11:20:26 -0800 -Subject: [PATCH] Fix `is_conn_error()` for Python 3.3+ change to - `socket.error` - -In Python 3.3+, `socket.error` is no longer a distinct exception. -It is - as the docs say - "A deprecated alias of OSError". This -means that this check: - -`isinstance(e, socket.error)` - -is effectively equivalent to: - -`isinstance(e, OSError)` - -This is a problem, because `requests.exceptions.ConnectionError` -(another exception type we handle later in `is_conn_error()`) is -a subclass of `OSError` - so on Python 3 we never actually reach -the block that's intended to handle that exception type. We hit -the `isinstance(e, socket.error)` block at the start instead, and -of course the exception doesn't have an `errno` attribute, so we -just return `False` at that point. - -There are a few different ways we could fix this; this commit -does it by ditching the `isinstance` checks, and dropping the -shortcut `return False` bailout from the early block. We'll still -ultimately return `False` unless the error is actually one of the -other types we handle; it just costs a couple more `isinstance` -checks. - -I don't think replacing the `isinstance socket.error` checks is -really necessary at all. We can just check for an `errno` attr, -and if there is one and it's one of the values we check for... -that seems safe enough to treat as a connection error. - -This also changes the second check to be a check of `e2`, not -`e` - I'm *fairly* sure this is what's actually intended, and -the current code was a copy-paste error. - -Fixes: #1192 - -Signed-off-by: Adam Williamson ---- - koji/__init__.py | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -diff --git a/koji/__init__.py b/koji/__init__.py -index aba10ec1..c4fd4756 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -1978,11 +1978,13 @@ def is_cert_error(e): - - def is_conn_error(e): - """Determine if an error seems to be from a dropped connection""" -- if isinstance(e, socket.error): -- if getattr(e, 'errno', None) in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): -- return True -- # else -- return False -+ # This is intended for the case where e is a socket error. -+ # as `socket.error` is just an alias for `OSError` in Python 3 -+ # there is no value to an `isinstance` check here; let's just -+ # assume that if the exception has an 'errno' and it's one of -+ # these values, this is a connection error. -+ if getattr(e, 'errno', None) in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): -+ return True - if isinstance(e, six.moves.http_client.BadStatusLine): - return True - try: -@@ -1994,10 +1996,9 @@ def is_conn_error(e): - e3 = getattr(e2, 'args', [None, None])[1] - if isinstance(e3, six.moves.http_client.BadStatusLine): - return True -- if isinstance(e2, socket.error): -- # same check as unwrapped socket error -- if getattr(e, 'errno', None) in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): -- return True -+ # same check as unwrapped socket error -+ if getattr(e2, 'errno', None) in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): -+ return True - except (TypeError, AttributeError): - pass - # otherwise --- -2.20.1 - diff --git a/fedora-config.patch b/fedora-config.patch index 21a3398..f3efff9 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,15 +1,15 @@ -From 47d9f103194e65611a472db42eff03eabe423739 Mon Sep 17 00:00:00 2001 +From e28b662b29f688954a8ebe772e21cb7025ba47b6 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Thu, 7 Mar 2019 12:22:12 +0100 Subject: [PATCH] Apply Fedora instance configuration Signed-off-by: Patrick Uiterwijk --- - cli/koji.conf | 24 +++++++++++------------- - 1 file changed, 11 insertions(+), 13 deletions(-) + cli/koji.conf | 25 +++++++++++-------------- + 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/cli/koji.conf b/cli/koji.conf -index addd4e3..4fcb2ae 100644 +index addd4e3..3588c19 100644 --- a/cli/koji.conf +++ b/cli/koji.conf @@ -3,18 +3,23 @@ @@ -39,10 +39,11 @@ index addd4e3..4fcb2ae 100644 ;the service name of the principal being used by the hub ;krbservice = host -@@ -29,16 +34,9 @@ +@@ -28,17 +33,9 @@ + ;enable to lookup dns canonical hostname for krb auth ;krb_canon_host = no - +- -;configuration for SSL authentication - -;client certificate @@ -53,7 +54,7 @@ index addd4e3..4fcb2ae 100644 - -;enabled plugins for CLI, runroot and save_failed_tree are available -;plugins = -+;enabled plugins for CLI, runroot is enabled by deafult for fedora ++;enabled plugins for CLI, runroot is enabled by default for fedora +;save_failed_tree is available +plugins = runroot diff --git a/koji.spec b/koji.spec index 496fdb3..7dc78ae 100644 --- a/koji.spec +++ b/koji.spec @@ -1,15 +1,60 @@ -# This package depends on automagic byte compilation +# This package depends on selective manual byte compilation # https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 -%global _python_bytecompile_extra 1 +%global _python_bytecompile_extra 0 -# Enable Python 3 builds for Fedora + EPEL >5 -# NOTE: do **NOT** change 'epel' to 'rhel' here, as this spec is also -%if 0%{?fedora} || 0%{?rhel} > 7 +%bcond_without python2 %bcond_without python3 -# If the definition isn't available for python3_pkgversion, define it -%{?!python3_pkgversion:%global python3_pkgversion 3} + +# We can build varying amounts of Koji for python2 and python3 based on +# the py[23]_support macro values. Valid values are: +# undefined or 0 -- do not build +# 1 -- build just the cli and lib +# 2 -- build everything we can +# For executable scripts, py3 wins if we build it +# The following rules tweak these settings based on options and environment + +# Default to building both fully +%define py2_support 2 +%define py3_support 2 + +%if 0%{?rhel} >= 8 +# and no python2 on rhel8+ +%define py2_support 0 %else -%bcond_with python3 +%if 0%{?rhel} +# No python3 for older rhel +%define py3_support 0 +%endif +%endif + +%if 0%{?fedora} >= 33 +# no py2 after F33 +%define py2_support 0 +%define py3_support 2 +%else +%if 0%{?fedora} >= 30 +%define py2_support 1 +%define py3_support 2 +%else +%if 0%{?fedora} +# match what the older Fedoras already have +%define py2_support 2 +%define py3_support 1 +%endif +%endif +%endif + +# Lastly enforce the bcond parameters +%if %{without python2} +%define py2_support 0 +%endif +%if %{without python3} +%define py3_support 0 +%endif + +%if ! %{py2_support} +# use python3 +%define __python %{__python3} %endif # Compatibility with RHEL. These macros have been added to EPEL but @@ -21,17 +66,20 @@ %{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} %{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} -%if 0%{?fedora} || 0%{?rhel} >= 7 -%global use_systemd 1 -%else +# If the definition isn't available for python3_pkgversion, define it +%{?!python3_pkgversion:%global python3_pkgversion 3} + +%if 0%{?rhel} && 0%{?rhel} < 7 %global use_systemd 0 %global install_opt TYPE=sysv +%else +%global use_systemd 1 %endif Name: koji Version: 1.17.0 -Release: 1%{?dist} -# koji.ssl libs (from plague) are GPLv2+ +Release: 2%{?dist} +# the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ @@ -41,125 +89,192 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 Patch100: fedora-config.patch BuildArch: noarch -%if 0%{with python3} -Requires: python3-%{name} = %{version}-%{release} -Requires: python3-pycurl -Requires: python3-libcomps +%if 0%{py3_support} +Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} +Requires: python%{python3_pkgversion}-libcomps %else Requires: python2-%{name} = %{version}-%{release} -%if 0%{?fedora} -Requires: python2-libcomps -Requires: python2-pycurl -%endif -%if 0%{?rhel} -Requires: python-pycurl -%endif -%if 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 Requires: python-libcomps %endif %endif -BuildRequires: python -BuildRequires: python-sphinx %if %{use_systemd} BuildRequires: systemd BuildRequires: pkgconfig %endif -# For backwards compatibility, we want to Require: python2-koji for Fedora <= 26 so dependent -# packages have some time to switch their Requires lines to python2-koji instead of Koji. -%if 0%{?fedora} && 0%{?fedora} <= 26 -Requires: python2-%{name} = %{version}-%{release} -Requires: python2-pycurl -Requires: python2-libcomps -%endif - %description Koji is a system for building and tracking RPMS. The base package contains shared libraries and the command-line interface. +%if 0%{py2_support} %package -n python2-%{name} Summary: Build system tools python library %{?python_provide:%python_provide python2-%{name}} -BuildRequires: python2-devel -Requires: python-krbV >= 1.0.13 +BuildRequires: python-devel +%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8 +Requires: python2-rpm +%else Requires: rpm-python +%endif Requires: pyOpenSSL Requires: python-requests +%if 0%{?fedora} >= 23 || 0%{?rhel} >= 7 Requires: python-requests-kerberos +%else +Requires: python-krbV >= 1.0.13 +%endif Requires: python-dateutil Requires: python-six %description -n python2-%{name} -Koji is a system for building and tracking RPMS. The base package -contains shared libraries and the command-line interface. +desc +%endif -%if 0%{with python3} -%package -n python3-%{name} +%if 0%{py3_support} +%package -n python%{python3_pkgversion}-%{name} Summary: Build system tools python library -%{?python_provide:%python_provide python3-%{name}} -BuildRequires: python3-devel -Requires: python3-rpm -Requires: python3-pyOpenSSL -Requires: python3-requests -Requires: python3-requests-kerberos -Requires: python3-dateutil -Requires: python3-six - -%description -n python3-%{name} -Koji is a system for building and tracking RPMS. The base package -contains shared libraries and the command-line interface. +%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} +BuildRequires: python%{python3_pkgversion}-devel +%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8 +Requires: python%{python3_pkgversion}-rpm +%else +Requires: rpm-python%{python3_pkgversion} +%endif +Requires: python%{python3_pkgversion}-pyOpenSSL +Requires: python%{python3_pkgversion}-requests +Requires: python%{python3_pkgversion}-requests-kerberos +Requires: python%{python3_pkgversion}-dateutil +Requires: python%{python3_pkgversion}-six + +%description -n python%{python3_pkgversion}-%{name} +desc %endif +%if 0%{py2_support} %package -n python2-%{name}-cli-plugins Summary: Koji client plugins License: LGPLv2 -Requires: %{name} = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} %description -n python2-%{name}-cli-plugins Plugins to the koji command-line interface +%endif -%if 0%{with python3} -%package -n python3-%{name}-cli-plugins +%if 0%{py3_support} +%package -n python%{python3_pkgversion}-%{name}-cli-plugins Summary: Koji client plugins License: LGPLv2 -Requires: %{name} = %{version}-%{release} +Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} -%description -n python3-%{name}-cli-plugins +%description -n python%{python3_pkgversion}-%{name}-cli-plugins Plugins to the koji command-line interface %endif %package hub Summary: Koji XMLRPC interface +License: LGPLv2 +Requires: %{name} = %{version}-%{release} +Requires: %{name}-hub-code +%if 0%{?fedora} || 0%{?rhel} > 7 +Suggests: python%{python3_pkgversion}-%{name}-hub +Suggests: python%{python3_pkgversion}-%{name}-hub-plugins +%endif + +%description hub +koji-hub is the XMLRPC interface to the koji database + +%if 0%{py2_support} > 1 +%package -n python2-%{name}-hub +Summary: Koji XMLRPC interface License: LGPLv2 and GPLv2 # rpmdiff lib (from rpmlint) is GPLv2 (only) Requires: httpd Requires: mod_wsgi +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 +Requires: mod_auth_gssapi +%endif Requires: python-psycopg2 Requires: python2-%{name} = %{version}-%{release} +# py2 xor py3 +Provides: %{name}-hub-code = %{version}-%{release} -%description hub +%description -n python2-%{name}-hub +koji-hub is the XMLRPC interface to the koji database +%endif + +%if 0%{py3_support} > 1 +%package -n python%{python3_pkgversion}-%{name}-hub +Summary: Koji XMLRPC interface +License: LGPLv2 and GPLv2 +# rpmdiff lib (from rpmlint) is GPLv2 (only) +Requires: httpd +Requires: python%{python3_pkgversion}-mod_wsgi +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 +Requires: mod_auth_gssapi +%endif +Requires: python%{python3_pkgversion}-psycopg2 +Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} +# py2 xor py3 +Provides: %{name}-hub-code = %{version}-%{release} + +%description -n python%{python3_pkgversion}-%{name}-hub koji-hub is the XMLRPC interface to the koji database +%endif %package hub-plugins Summary: Koji hub plugins License: LGPLv2 -Requires: %{name}-hub = %{version}-%{release} -Requires: python-qpid >= 0.7 -Requires: python-qpid-proton -Requires: cpio +Requires: %{name}-hub-plugins-code = %{version}-%{release} +%if 0%{?fedora} || 0%{?rhel} > 7 +Suggests: python%{python3_pkgversion}-%{name}-hub-plugins +%endif %description hub-plugins Plugins to the koji XMLRPC interface +%if 0%{py2_support} > 1 +%package -n python2-%{name}-hub-plugins +Summary: Koji hub plugins +License: LGPLv2 +Requires: python2-%{name}-hub = %{version}-%{release} +Requires: python2-qpid-proton +Requires: cpio +Provides: %{name}-hub-plugins-code = %{version}-%{release} + +%description -n python2-%{name}-hub-plugins +Plugins to the koji XMLRPC interface +%endif + +%if 0%{py3_support} > 1 +%package -n python%{python3_pkgversion}-%{name}-hub-plugins +Summary: Koji hub plugins +License: LGPLv2 +Requires: python%{python3_pkgversion}-%{name}-hub = %{version}-%{release} +Requires: python%{python3_pkgversion}-qpid-proton +Requires: cpio +Provides: %{name}-hub-plugins-code = %{version}-%{release} + +%description -n python%{python3_pkgversion}-%{name}-hub-plugins +Plugins to the koji XMLRPC interface +%endif + +%package builder-plugins +Summary: Koji builder plugins +License: LGPLv2 +Requires: %{name} = %{version}-%{release} +Requires: %{name}-builder = %{version}-%{release} + +%description builder-plugins +Plugins for the koji build daemon + %package builder Summary: Koji RPM builder daemon License: LGPLv2 and GPLv2+ #mergerepos (from createrepo) is GPLv2+ -Requires: python2-%{name} = %{version}-%{release} Requires: mock >= 0.9.14 Requires(pre): /usr/sbin/useradd Requires: squashfs-tools -Requires: python2-multilib %if %{use_systemd} Requires(post): systemd Requires(preun): systemd @@ -173,8 +288,17 @@ Requires(preun): /sbin/service Requires: /usr/bin/cvs Requires: /usr/bin/svn Requires: /usr/bin/git -Requires: python-cheetah Requires: createrepo >= 0.9.2 +%if 0%{py3_support} > 1 +Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} +Requires: python%{python3_pkgversion}-librepo +Requires: python%{python3_pkgversion}-multilib +Requires: python%{python3_pkgversion}-cheetah +%else +Requires: python2-%{name} = %{version}-%{release} +Requires: python2-multilib +Requires: python-cheetah +%endif %description builder koji-builder is the daemon that runs on build machines and executes @@ -183,7 +307,7 @@ tasks that come through the Koji system. %package vm Summary: Koji virtual machine management daemon License: LGPLv2 -Requires: python2-%{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %if %{use_systemd} Requires(post): systemd Requires(preun): systemd @@ -194,8 +318,13 @@ Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service %endif +%if 0%{py3_support} > 1 +Requires: python%{python3_pkgversion}-libvirt +Requires: python%{python3_pkgversion}-libxml2 +%else Requires: libvirt-python Requires: libxml2-python +%endif Requires: /usr/bin/virt-clone Requires: qemu-img @@ -206,8 +335,12 @@ virtual machine. This package is not required for most installations. %package utils Summary: Koji Utilities License: LGPLv2 +Requires: %{name} = %{version}-%{release} +%if 0%{py3_support} > 1 +Requires: python%{python3_pkgversion}-psycopg2 +%else Requires: python-psycopg2 -Requires: python2-%{name} = %{version}-%{release} +%endif %if %{use_systemd} Requires(post): systemd Requires(preun): systemd @@ -220,64 +353,157 @@ Utilities for the Koji system %package web Summary: Koji Web UI License: LGPLv2 +Requires: %{name} = %{version}-%{release} +Requires: %{name}-web-code = %{version}-%{release} +%if 0%{?fedora} || 0%{?rhel} > 7 +Suggests: python%{python3_pkgversion}-%{name}-web +%endif + +%description web +koji-web is a web UI to the Koji system. + +%if 0%{py2_support} > 1 +%package -n python2-%{name}-web +Summary: Koji Web UI +License: LGPLv2 +%{?python_provide:%python_provide python2-%{name}-web} Requires: httpd Requires: mod_wsgi +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 Requires: mod_auth_gssapi +%else +Requires: mod_auth_kerb +Requires: python-krbV >= 1.0.13 +%endif Requires: python-psycopg2 Requires: python-cheetah Requires: python2-%{name} = %{version}-%{release} -Requires: python-krbV >= 1.0.13 +Provides: %{name}-web-code = %{version}-%{release} -%description web +%description -n python2-%{name}-web koji-web is a web UI to the Koji system. +%endif + +%if 0%{py3_support} > 1 +%package -n python%{python3_pkgversion}-%{name}-web +Summary: Koji Web UI +License: LGPLv2 +%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}-web} +Requires: httpd +Requires: python%{python3_pkgversion}-mod_wsgi +Requires: mod_auth_gssapi +Requires: python%{python3_pkgversion}-psycopg2 +Requires: python%{python3_pkgversion}-cheetah +Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} +Provides: %{name}-web-code = %{version}-%{release} + +%description -n python%{python3_pkgversion}-%{name}-web +koji-web is a web UI to the Koji system. +%endif %prep %setup -q + %patch100 -p1 -b .fedoraconfig + %build +# Nothing to build + %install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT %{?install_opt} install -%if 0%{with python3} -cd koji -make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install -cd ../cli -make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install -cd ../plugins -make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install +%if 0%{py2_support} < 2 && 0%{py3_support} < 2 +echo "At least one python must be built with full support" +exit 1 +%endif + +# python2 build +%if 0%{py2_support} > 1 +make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python2} %{?install_opt} install +%else +%if 0%{py2_support} +for d in koji cli plugins ; do + pushd $d + make DESTDIR=$RPM_BUILD_ROOT KOJI_MINIMAL=1 PYTHON=%{__python2} %{?install_opt} install + popd +done +%endif +%endif + + +# python3 build +%if 0%{py3_support} > 1 +make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install # alter python interpreter in koji CLI -sed -i 's/\#\!\/usr\/bin\/python2/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/bin/koji +scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow + %{_sbindir}/koji-gc %{_sbindir}/kojivmd' +for fn in $scripts ; do + sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn +done +%else +%if 0%{py3_support} +# minimal +for d in koji cli plugins ; do + pushd $d + make DESTDIR=$RPM_BUILD_ROOT KOJI_MINIMAL=1 PYTHON=%{__python3} %{?install_opt} install + popd +done +# alter python interpreter in koji CLI +sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT/usr/bin/koji +%endif %endif %if 0%{?fedora} <= 29 # This changed in 1.17.0, make sure that existing installs do not break ln -s /usr/share/koji-hub %RPM_BUILD_ROOT/usr/libexec/koji-hub %endif +%if 0%{?fedora} >= 28 +# handle extra byte compilation +extra_dirs=' + %{_prefix}/lib/koji-builder-plugins + %{_prefix}/koji-hub-plugins + %{_datadir}/koji-hub + %{_datadir}/koji-web/lib/kojiweb + %{_datadir}/koji-web/scripts' +%if 0%{py2_support} > 1 +for fn in $extra_dirs ; do + %py_byte_compile %{__python2} %{buildroot}$fn +done +%endif +%if 0%{py3_support} > 1 +for fn in $extra_dirs ; do + %py_byte_compile %{__python3} %{buildroot}$fn +done +%endif +%endif + %files %{_bindir}/* %config(noreplace) /etc/koji.conf %dir /etc/koji.conf.d %doc docs Authors COPYING LGPL +%if 0%{py2_support} %files -n python2-%{name} %{python2_sitelib}/%{name} %{python2_sitelib}/koji_cli +%endif -%if 0%{with python3} +%if 0%{py3_support} %files -n python%{python3_pkgversion}-koji %{python3_sitelib}/%{name} %{python3_sitelib}/koji_cli %endif +%if 0%{py2_support} %files -n python2-%{name}-cli-plugins %{python2_sitelib}/koji_cli_plugins # we don't have config files for default plugins yet #%%dir %%{_sysconfdir}/koji/plugins #%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf +%endif -%if 0%{with python3} +%if 0%{py3_support} %files -n python%{python3_pkgversion}-%{name}-cli-plugins %{python3_sitelib}/koji_cli_plugins # we don't have config files for default plugins yet @@ -286,23 +512,45 @@ ln -s /usr/share/koji-hub %RPM_BUILD_ROOT/usr/libexec/koji-hub %endif %files hub -%{_datadir}/koji-hub -%if 0%{?fedora} <= 29 -# Compatibility symlink -%{_libexecdir}/koji-hub -%endif -%dir %{_datarootdir}/koji-hub %config(noreplace) /etc/httpd/conf.d/kojihub.conf %dir /etc/koji-hub %config(noreplace) /etc/koji-hub/hub.conf %dir /etc/koji-hub/hub.conf.d +%if 0%{py2_support} > 1 +%files -n python2-%{name}-hub +%{_datadir}/koji-hub/*.py* +%endif + +%if 0%{py3_support} > 1 +%files -n python%{python3_pkgversion}-%{name}-hub +%{_datadir}/koji-hub/*.py +%{_datadir}/koji-hub/__pycache__ +%endif + %files hub-plugins -%dir %{_prefix}/lib/koji-hub-plugins -%{_prefix}/lib/koji-hub-plugins/*.py* -%{_prefix}/lib/koji-hub-plugins/__pycache__/ %dir /etc/koji-hub/plugins -/etc/koji-hub/plugins/*.conf +%config(noreplace) /etc/koji-hub/plugins/*.conf + +%if 0%{py2_support} > 1 +%files -n python2-%{name}-hub-plugins +%{_prefix}/lib/koji-hub-plugins/*.py* +%endif + +%if 0%{py3_support} > 1 +%files -n python%{python3_pkgversion}-%{name}-hub-plugins +%{_prefix}/lib/koji-hub-plugins/*.py +%{_prefix}/lib/koji-hub-plugins/__pycache__ +%endif + +%files builder-plugins +%dir /etc/kojid/plugins +%config(noreplace) /etc/kojid/plugins/*.conf +%dir %{_prefix}/lib/koji-builder-plugins +%{_prefix}/lib/koji-builder-plugins/*.py* +%if 0%{py3_support} > 1 +%{_prefix}/lib/koji-builder-plugins/__pycache__ +%endif %files utils %{_sbindir}/kojira @@ -322,20 +570,25 @@ ln -s /usr/share/koji-hub %RPM_BUILD_ROOT/usr/libexec/koji-hub %config(noreplace) /etc/koji-shadow/koji-shadow.conf %files web -%{_datadir}/koji-web %dir /etc/kojiweb %config(noreplace) /etc/kojiweb/web.conf %config(noreplace) /etc/httpd/conf.d/kojiweb.conf %dir /etc/kojiweb/web.conf.d +%if 0%{py2_support} > 1 +%files -n python2-%{name}-web +%{_datadir}/koji-web +%endif + +%if 0%{py3_support} > 1 +%files -n python%{python3_pkgversion}-%{name}-web +%{_datadir}/koji-web +%endif + %files builder %{_sbindir}/kojid %dir %{_libexecdir}/kojid %{_libexecdir}/kojid/mergerepos -%defattr(-,root,root) -%dir %{_prefix}/lib/koji-builder-plugins -%{_prefix}/lib/koji-builder-plugins/*.py* -%{_prefix}/lib/koji-builder-plugins/__pycache__/ %if %{use_systemd} %{_unitdir}/kojid.service %else @@ -343,10 +596,7 @@ ln -s /usr/share/koji-hub %RPM_BUILD_ROOT/usr/libexec/koji-hub %config(noreplace) /etc/sysconfig/kojid %endif %dir /etc/kojid -%dir /etc/kojid/plugins %config(noreplace) /etc/kojid/kojid.conf -%config(noreplace) /etc/kojid/plugins/runroot.conf -%config(noreplace) /etc/kojid/plugins/save_failed_tree.conf %attr(-,kojibuilder,kojibuilder) /etc/mock/koji %pre builder @@ -409,7 +659,6 @@ if [ $1 = 0 ]; then /sbin/service kojivmd stop &> /dev/null /sbin/chkconfig --del kojivmd fi -%endif %if %{use_systemd} @@ -432,8 +681,13 @@ if [ $1 = 0 ]; then /sbin/chkconfig --del kojira fi %endif +%endif %changelog +* Thu Mar 07 2019 Neal Gompa - 1.17.0-2 +- Enable Python 3 for Fedora 30+ and EL8+ +- Sync packaging changes from upstream + * Thu Mar 07 2019 Patrick Uiterwijk - 1.17.0-1 - Rebase to 1.17.0 From 27b47e9603a9b1edece47b06fb1078f3c20caeda Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 10 Mar 2019 11:29:25 -0400 Subject: [PATCH 124/202] Remove remnants of unused /usr/libexec/koji-hub --- koji.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/koji.spec b/koji.spec index 7dc78ae..c4c7cad 100644 --- a/koji.spec +++ b/koji.spec @@ -78,7 +78,7 @@ Name: koji Version: 1.17.0 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -452,10 +452,6 @@ done sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT/usr/bin/koji %endif %endif -%if 0%{?fedora} <= 29 -# This changed in 1.17.0, make sure that existing installs do not break -ln -s /usr/share/koji-hub %RPM_BUILD_ROOT/usr/libexec/koji-hub -%endif %if 0%{?fedora} >= 28 # handle extra byte compilation @@ -684,6 +680,9 @@ fi %endif %changelog +* Sun Mar 10 2019 Neal Gompa - 1.17.0-3 +- Remove remnants of unused /usr/libexec/koji-hub + * Thu Mar 07 2019 Neal Gompa - 1.17.0-2 - Enable Python 3 for Fedora 30+ and EL8+ - Sync packaging changes from upstream From 03d3c69b46c270dd65859f68cc8486c8dae58e8b Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 10 Mar 2019 11:51:10 -0400 Subject: [PATCH 125/202] Add patch proposed upstream to use createrepo_c by default to drop yum dependency --- koji-PR1278-use-createrepo_c-by-default.patch | 37 +++++++++++++++++++ koji.spec | 14 ++++++- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 koji-PR1278-use-createrepo_c-by-default.patch diff --git a/koji-PR1278-use-createrepo_c-by-default.patch b/koji-PR1278-use-createrepo_c-by-default.patch new file mode 100644 index 0000000..8940256 --- /dev/null +++ b/koji-PR1278-use-createrepo_c-by-default.patch @@ -0,0 +1,37 @@ +From 781a09a9750a18b77208e58eaa960b1b0d3f7dac Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Feb 25 2019 13:50:30 +0000 +Subject: createrepo_c is used by default now + + +Fixes: https://pagure.io/koji/issue/716 + +--- + +diff --git a/builder/kojid b/builder/kojid +index e7c87f9..5e97615 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -5975,7 +5975,7 @@ def get_options(): + 'timeout': None, + 'no_ssl_verify': False, + 'use_fast_upload': True, +- 'use_createrepo_c': False, ++ 'use_createrepo_c': True, + 'createrepo_skip_stat': True, + 'createrepo_update': True, + 'pkgurl': None, +diff --git a/builder/kojid.conf b/builder/kojid.conf +index 7bc235d..b9f0851 100644 +--- a/builder/kojid.conf ++++ b/builder/kojid.conf +@@ -50,7 +50,7 @@ server=http://hub.example.com/kojihub + topurl=http://hub.example.com/kojifiles + + ; use createrepo_c rather than createrepo +-; use_createrepo_c=False ++; use_createrepo_c=True + + ; A space-separated list of tuples from which kojid is allowed to checkout. + ; The format of those tuples is: + diff --git a/koji.spec b/koji.spec index c4c7cad..8e80424 100644 --- a/koji.spec +++ b/koji.spec @@ -78,13 +78,18 @@ Name: koji Version: 1.17.0 -Release: 3%{?dist} +Release: 4%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +# Patches proposed upstream +## Use createrepo_c by default now (we already do this in Fedora infra anyway) +## From: https://pagure.io/koji/pull-request/1278 +Patch10: koji-PR1278-use-createrepo_c-by-default.patch + # Not upstreamable Patch100: fedora-config.patch @@ -288,7 +293,7 @@ Requires(preun): /sbin/service Requires: /usr/bin/cvs Requires: /usr/bin/svn Requires: /usr/bin/git -Requires: createrepo >= 0.9.2 +Requires: createrepo_c >= 0.10.0 %if 0%{py3_support} > 1 Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} Requires: python%{python3_pkgversion}-librepo @@ -404,6 +409,8 @@ koji-web is a web UI to the Koji system. %prep %setup -q +%patch10 -p1 -b .createrepo_c + %patch100 -p1 -b .fedoraconfig @@ -680,6 +687,9 @@ fi %endif %changelog +* Sun Mar 10 2019 Neal Gompa - 1.17.0-4 +- Add patch proposed upstream to use createrepo_c by default to drop yum dependency + * Sun Mar 10 2019 Neal Gompa - 1.17.0-3 - Remove remnants of unused /usr/libexec/koji-hub From 5b3fde9978ec3652514e22d5bde0318871b51864 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 11 Mar 2019 10:18:11 -0400 Subject: [PATCH 126/202] Switch kojid back to Python 2 so that imgfac doesn't get disabled --- koji.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/koji.spec b/koji.spec index 8e80424..0814db7 100644 --- a/koji.spec +++ b/koji.spec @@ -44,6 +44,9 @@ %endif %endif +# Until imgfac is ported, keep kojid at py2 +%bcond_without py2_kojid + # Lastly enforce the bcond parameters %if %{without python2} %define py2_support 0 @@ -78,7 +81,7 @@ Name: koji Version: 1.17.0 -Release: 4%{?dist} +Release: 5%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -294,7 +297,7 @@ Requires: /usr/bin/cvs Requires: /usr/bin/svn Requires: /usr/bin/git Requires: createrepo_c >= 0.10.0 -%if 0%{py3_support} > 1 +%if 0%{py3_support} > 1 && (! %{with py2_kojid}) Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} Requires: python%{python3_pkgversion}-librepo Requires: python%{python3_pkgversion}-multilib @@ -442,7 +445,7 @@ done %if 0%{py3_support} > 1 make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install # alter python interpreter in koji CLI -scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow +scripts='%{_bindir}/koji %{!?with_py2_kojid:%{_sbindir}/kojid} %{_sbindir}/kojira %{_sbindir}/koji-shadow %{_sbindir}/koji-gc %{_sbindir}/kojivmd' for fn in $scripts ; do sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn @@ -687,6 +690,9 @@ fi %endif %changelog +* Mon Mar 11 2019 Neal Gompa - 1.17.0-5 +- Switch kojid back to Python 2 so that imgfac doesn't get disabled + * Sun Mar 10 2019 Neal Gompa - 1.17.0-4 - Add patch proposed upstream to use createrepo_c by default to drop yum dependency From c350e2ec0451e25c6775f0f32259080d01a05843 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" Date: Wed, 13 Mar 2019 00:42:14 +0100 Subject: [PATCH 127/202] Build requirement on python-devel -> python2-devel --- koji.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 0814db7..b6d3e61 100644 --- a/koji.spec +++ b/koji.spec @@ -119,7 +119,7 @@ contains shared libraries and the command-line interface. %package -n python2-%{name} Summary: Build system tools python library %{?python_provide:%python_provide python2-%{name}} -BuildRequires: python-devel +BuildRequires: python2-devel %if 0%{?fedora} >= 25 || 0%{?rhel} >= 8 Requires: python2-rpm %else From c4bba768d42ef0a9c1e58c05421c9256668b0ddf Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 28 May 2019 12:08:02 -0700 Subject: [PATCH 128/202] - Switch kojid back to python3 as imagefactory and oz have moved. - Backport patch to download only repomd.xml instead of all repodata. - Backport patch to allow 'bare' repo merging for modularity. - Backport patch to allow for seperate srpm repos in buildroot repos. Signed-off-by: Kevin Fenzi --- 1273.patch | 224 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1398.patch | 30 +++++++ 1411.patch | 61 +++++++++++++++ koji.spec | 31 ++++++-- 4 files changed, 338 insertions(+), 8 deletions(-) create mode 100644 1273.patch create mode 100644 1398.patch create mode 100644 1411.patch diff --git a/1273.patch b/1273.patch new file mode 100644 index 0000000..7c46251 --- /dev/null +++ b/1273.patch @@ -0,0 +1,224 @@ +From 3590ab0a355adaf63c7a5f068f7a6ac0eb5e8b05 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Feb 21 2019 12:42:18 +0000 +Subject: Allow generating separate src repo for build repos + + +Fixes #1266 + +--- + +diff --git a/builder/kojid b/builder/kojid +index 27fe523..0fffb89 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -4990,13 +4990,15 @@ class NewRepoTask(BaseTaskHandler): + Methods = ['newRepo'] + _taskWeight = 0.1 + +- def handler(self, tag, event=None, src=False, debuginfo=False): ++ def handler(self, tag, event=None, src=False, debuginfo=False, separate_src=False): + tinfo = self.session.getTag(tag, strict=True, event=event) + kwargs = {} + if event is not None: + kwargs['event'] = event + if src: + kwargs['with_src'] = True ++ if separate_src: ++ kwargs['with_separate_src'] = True + if debuginfo: + kwargs['with_debuginfo'] = True + repo_id, event_id = self.session.host.repoInit(tinfo['id'], **kwargs) +diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py +index a2b2b2b..1a2ace6 100644 +--- a/cli/koji_cli/commands.py ++++ b/cli/koji_cli/commands.py +@@ -7011,7 +7011,8 @@ def handle_regen_repo(options, session, args): + parser.add_option("--target", action="store_true", help=_("Interpret the argument as a build target name")) + parser.add_option("--nowait", action="store_true", help=_("Don't wait on for regen to finish")) + parser.add_option("--debuginfo", action="store_true", help=_("Include debuginfo rpms in repo")) +- parser.add_option("--source", "--src", action="store_true", help=_("Include source rpms in the repo")) ++ parser.add_option("--source", "--src", action="store_true", help=_("Include source rpms in each of repos")) ++ parser.add_option("--separate-source", "--separate-src", action="store_true", help=_("Include source rpms in separate src repo")) + (suboptions, args) = parser.parse_args(args) + if len(args) == 0: + parser.error(_("A tag name must be specified")) +@@ -7047,6 +7048,8 @@ def handle_regen_repo(options, session, args): + repo_opts['debuginfo'] = True + if suboptions.source: + repo_opts['src'] = True ++ if suboptions.separate_source: ++ repo_opts['separate_src'] = True + task_id = session.newRepo(tag, **repo_opts) + print("Regenerating repo for tag: %s" % tag) + print("Created task: %d" % task_id) +diff --git a/hub/kojihub.py b/hub/kojihub.py +index 46b8f3e..9844861 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -2345,7 +2345,7 @@ def maven_tag_archives(tag_id, event_id=None, inherit=True): + yield archive + return _iter_archives() + +-def repo_init(tag, with_src=False, with_debuginfo=False, event=None): ++def repo_init(tag, with_src=False, with_debuginfo=False, event=None, with_separate_src=False): + """Create a new repo entry in the INIT state, return full repo data + + Returns a dictionary containing +@@ -2355,9 +2355,11 @@ def repo_init(tag, with_src=False, with_debuginfo=False, event=None): + state = koji.REPO_INIT + tinfo = get_tag(tag, strict=True, event=event) + koji.plugin.run_callbacks('preRepoInit', tag=tinfo, with_src=with_src, with_debuginfo=with_debuginfo, +- event=event, repo_id=None) ++ event=event, repo_id=None, with_separate_src=with_separate_src) + tag_id = tinfo['id'] + repo_arches = {} ++ if with_separate_src: ++ repo_arches['src'] = 1 + if tinfo['arches']: + for arch in tinfo['arches'].split(): + arch = koji.canonArch(arch) +@@ -2420,6 +2422,8 @@ def repo_init(tag, with_src=False, with_debuginfo=False, event=None): + if with_src: + for repoarch in repo_arches: + pkglist[repoarch].write(relpath) ++ if with_separate_src: ++ pkglist[arch].write(relpath) + elif arch == 'noarch': + for repoarch in repo_arches: + pkglist[repoarch].write(relpath) +@@ -2474,7 +2478,7 @@ def repo_init(tag, with_src=False, with_debuginfo=False, event=None): + _write_maven_repo_metadata(artifact_dir, artifacts) + + koji.plugin.run_callbacks('postRepoInit', tag=tinfo, with_src=with_src, with_debuginfo=with_debuginfo, +- event=event, repo_id=repo_id) ++ event=event, repo_id=repo_id, with_separate_src=with_separate_src) + return [repo_id, event_id] + + def _write_maven_repo_metadata(destdir, artifacts): +@@ -2519,7 +2523,8 @@ def dist_repo_init(tag, keys, task_opts): + # note: we need to match args from the other preRepoInit callback + koji.plugin.run_callbacks('preRepoInit', tag=tinfo, with_src=False, + with_debuginfo=False, event=event, repo_id=None, +- dist=True, keys=keys, arches=arches, task_opts=task_opts) ++ dist=True, keys=keys, arches=arches, task_opts=task_opts, ++ with_separate_src=False) + if not event: + event = get_event() + repo_id = nextval('repo_id_seq') +@@ -2540,7 +2545,7 @@ def dist_repo_init(tag, keys, task_opts): + koji.plugin.run_callbacks('postRepoInit', tag=tinfo, with_src=False, + with_debuginfo=False, event=event, repo_id=repo_id, + dist=True, keys=keys, arches=arches, task_opts=task_opts, +- repodir=repodir) ++ repodir=repodir, with_reparate_src=False) + return repo_id, event + + +@@ -10521,7 +10526,7 @@ class RootExports(object): + task_opts['event'] = event_id + return make_task('distRepo', [tag, repo_id, keys, task_opts], priority=15, channel='createrepo') + +- def newRepo(self, tag, event=None, src=False, debuginfo=False): ++ def newRepo(self, tag, event=None, src=False, debuginfo=False, separate_src=False): + """Create a newRepo task. returns task id""" + if context.session.hasPerm('regen-repo'): + pass +@@ -10532,6 +10537,8 @@ class RootExports(object): + opts['event'] = event + if src: + opts['src'] = True ++ if separate_src: ++ opts['separate_src'] = True + if debuginfo: + opts['debuginfo'] = True + args = koji.encode_args(tag, **opts) +@@ -12699,11 +12706,11 @@ class HostExports(object): + + return br.updateArchiveList(archives, project) + +- def repoInit(self, tag, with_src=False, with_debuginfo=False, event=None): ++ def repoInit(self, tag, with_src=False, with_debuginfo=False, event=None, with_separate_src=False): + """Initialize a new repo for tag""" + host = Host() + host.verify() +- return repo_init(tag, with_src=with_src, with_debuginfo=with_debuginfo, event=event) ++ return repo_init(tag, with_src=with_src, with_debuginfo=with_debuginfo, event=event, with_separate_src=with_separate_src) + + def repoAddRPM(self, repo_id, path): + """Add an uploaded rpm to a repo""" +diff --git a/koji/tasks.py b/koji/tasks.py +index ba4cd31..90656b8 100644 +--- a/koji/tasks.py ++++ b/koji/tasks.py +@@ -200,7 +200,7 @@ LEGACY_SIGNATURES = { + [['builds', 'target', 'opts'], None, None, (None,)], + ], + 'newRepo' : [ +- [['tag', 'event', 'src', 'debuginfo'], None, None, (None, False, False)], ++ [['tag', 'event', 'src', 'debuginfo', 'separate_src'], None, None, (None, False, False, False)], + ], + 'createImage' : [ + [['name', 'version', 'release', 'arch', 'target_info', 'build_tag', 'repo_info', 'inst_tree', 'opts'], None, None, (None,)], +diff --git a/tests/test_cli/test_regen_repo.py b/tests/test_cli/test_regen_repo.py +index 43eff0b..90f16b1 100644 +--- a/tests/test_cli/test_regen_repo.py ++++ b/tests/test_cli/test_regen_repo.py +@@ -168,11 +168,13 @@ class TestRegenRepo(utils.CliTestCase): + (Specify the --help global option for a list of other help options) + + Options: +- -h, --help show this help message and exit +- --target Interpret the argument as a build target name +- --nowait Don't wait on for regen to finish +- --debuginfo Include debuginfo rpms in repo +- --source, --src Include source rpms in the repo ++ -h, --help show this help message and exit ++ --target Interpret the argument as a build target name ++ --nowait Don't wait on for regen to finish ++ --debuginfo Include debuginfo rpms in repo ++ --source, --src Include source rpms in each of repos ++ --separate-source, --separate-src ++ Include source rpms in separate src repo + """ % self.progname) + + +diff --git a/util/kojira b/util/kojira +index 8e68cfd..a93d966 100755 +--- a/util/kojira ++++ b/util/kojira +@@ -671,6 +671,7 @@ class RepoManager(object): + + debuginfo_pat = self.options.debuginfo_tags.split() + src_pat = self.options.source_tags.split() ++ separate_src_pat = self.options.separate_source_tags.split() + order = sorted(self.needed_tags.values(), key=lambda t: t['score']) + for tag in order: + if running_tasks >= self.options.max_repo_tasks: +@@ -699,6 +700,8 @@ class RepoManager(object): + taskopts['debuginfo'] = True + if koji.util.multi_fnmatch(tagname, src_pat): + taskopts['src'] = True ++ if koji.util.multi_fnmatch(tagname, separate_src_pat): ++ taskopts['separate_src'] = True + maven = tag['taginfo']['maven_support'] + if maven: + if running_tasks_maven >= self.options.max_repo_tasks_maven: +@@ -836,6 +839,7 @@ def get_options(): + defaults = {'with_src': False, + 'debuginfo_tags': '', + 'source_tags': '', ++ 'separate_source_tags': '', + 'ignore_tags': '', + 'verbose': False, + 'debug': False, +@@ -876,7 +880,7 @@ def get_options(): + 'recent_tasks_lifetime') + str_opts = ('topdir', 'server', 'user', 'password', 'logfile', 'principal', 'keytab', 'krbservice', + 'cert', 'ca', 'serverca', 'debuginfo_tags', +- 'source_tags', 'ignore_tags') # FIXME: remove ca here ++ 'source_tags', 'separate_source_tags', 'ignore_tags') # FIXME: remove ca here + bool_opts = ('with_src','verbose','debug','ignore_stray_repos', 'offline_retry', + 'krb_rdns', 'krb_canon_host', 'no_ssl_verify') + for name in config.options(section): + diff --git a/1398.patch b/1398.patch new file mode 100644 index 0000000..6fbcbaa --- /dev/null +++ b/1398.patch @@ -0,0 +1,30 @@ +From a66b4ddfb4399cdc03ccc6f66acd634c692ee88f Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Apr 17 2019 05:38:03 +0000 +Subject: kojid: Download only 'repomd.xml' + + +We have pretty slow connection from s390x koji which helped to uncover +this part. Kojid downloads all files from repomd.xml (incl. filelists) +which is really big. What we really want is just find location of +'origin' (used later in the code). + +Signed-off-by: Igor Gnatenko + +--- + +diff --git a/builder/kojid b/builder/kojid +index 75f8a7d..5110d04 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -739,6 +739,9 @@ class BuildRoot(object): + h.setopt(librepo.LRO_REPOTYPE, librepo.LR_YUMREPO) + h.setopt(librepo.LRO_URLS, [repo_url]) + h.setopt(librepo.LRO_DESTDIR, tmpdir) ++ # We are using this just to find out location of 'origin', ++ # we don't even need to download it since we use openRemoteFile ++ h.setopt(librepo.LRO_YUMDLIST, []) + h.perform(r) + pkgorigins = r.getinfo(librepo.LRR_YUM_REPOMD)['origin']['location_href'] + koji.util.rmtree(tmpdir) + diff --git a/1411.patch b/1411.patch new file mode 100644 index 0000000..2957c4e --- /dev/null +++ b/1411.patch @@ -0,0 +1,61 @@ +From 3c5ddb8dab9a5736f03b6d60593adc9170304af3 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: May 03 2019 14:57:43 +0000 +Subject: [PATCH 1/2] handle bare merge mode + + +Fixes https://pagure.io/koji/issue/1404 + +--- + +diff --git a/builder/kojid b/builder/kojid +index 5110d04..e176266 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -5186,6 +5186,10 @@ class CreaterepoTask(BaseTaskHandler): + cmd = ['/usr/libexec/kojid/mergerepos', + '--mode', 'simple', + '--tempdir', self.workdir] ++ elif merge_mode == 'bare': ++ # "bare" merge mode for repos with modular metadata ++ # forces use of mergerepo_c ++ cmd = ['/usr/bin/mergerepo_c', '--pkgorigins'] + elif self.options.use_createrepo_c: + cmd = ['/usr/bin/mergerepo_c', '--koji'] + else: +diff --git a/koji/__init__.py b/koji/__init__.py +index 6e667ce..9c7101c 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -236,7 +236,7 @@ REPO_EXPIRED = REPO_STATES['EXPIRED'] + REPO_DELETED = REPO_STATES['DELETED'] + REPO_PROBLEM = REPO_STATES['PROBLEM'] + +-REPO_MERGE_MODES = set(['koji', 'simple']) ++REPO_MERGE_MODES = set(['koji', 'simple', 'dumb']) + + # buildroot states + BR_STATES = Enum(( + +From 0da20019456c386aa44589c3f0529926fb426541 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: May 03 2019 16:54:54 +0000 +Subject: [PATCH 2/2] fix mode name + + +--- + +diff --git a/koji/__init__.py b/koji/__init__.py +index 9c7101c..0b9b5bc 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -236,7 +236,7 @@ REPO_EXPIRED = REPO_STATES['EXPIRED'] + REPO_DELETED = REPO_STATES['DELETED'] + REPO_PROBLEM = REPO_STATES['PROBLEM'] + +-REPO_MERGE_MODES = set(['koji', 'simple', 'dumb']) ++REPO_MERGE_MODES = set(['koji', 'simple', 'bare']) + + # buildroot states + BR_STATES = Enum(( + diff --git a/koji.spec b/koji.spec index b6d3e61..f537d24 100644 --- a/koji.spec +++ b/koji.spec @@ -44,9 +44,6 @@ %endif %endif -# Until imgfac is ported, keep kojid at py2 -%bcond_without py2_kojid - # Lastly enforce the bcond parameters %if %{without python2} %define py2_support 0 @@ -81,7 +78,7 @@ Name: koji Version: 1.17.0 -Release: 5%{?dist} +Release: 6%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -93,6 +90,15 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 ## From: https://pagure.io/koji/pull-request/1278 Patch10: koji-PR1278-use-createrepo_c-by-default.patch +# Download only the repomd.xml instead of all the repodata +Patch11: https://pagure.io/koji/pull-request/1398.patch + +# Allow generating seperate srpm repos in buildroot repos +Patch12: https://pagure.io/koji/pull-request/1273.patch + +# Handle 'bare' merge mode for repos +Patch13: https://pagure.io/koji/pull-request/1411.patch + # Not upstreamable Patch100: fedora-config.patch @@ -297,7 +303,7 @@ Requires: /usr/bin/cvs Requires: /usr/bin/svn Requires: /usr/bin/git Requires: createrepo_c >= 0.10.0 -%if 0%{py3_support} > 1 && (! %{with py2_kojid}) +%if 0%{py3_support} > 1 Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} Requires: python%{python3_pkgversion}-librepo Requires: python%{python3_pkgversion}-multilib @@ -412,9 +418,12 @@ koji-web is a web UI to the Koji system. %prep %setup -q -%patch10 -p1 -b .createrepo_c +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 -%patch100 -p1 -b .fedoraconfig +%patch100 -p1 %build @@ -445,7 +454,7 @@ done %if 0%{py3_support} > 1 make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install # alter python interpreter in koji CLI -scripts='%{_bindir}/koji %{!?with_py2_kojid:%{_sbindir}/kojid} %{_sbindir}/kojira %{_sbindir}/koji-shadow +scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow %{_sbindir}/koji-gc %{_sbindir}/kojivmd' for fn in $scripts ; do sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn @@ -690,6 +699,12 @@ fi %endif %changelog +* Tue May 28 2019 Kevin Fenzi - 1.17.0-6 +- Switch kojid back to python3 as imagefactory and oz have moved. +- Backport patch to download only repomd.xml instead of all repodata. +- Backport patch to allow 'bare' repo merging for modularity. +- Backport patch to allow for seperate srpm repos in buildroot repos. + * Mon Mar 11 2019 Neal Gompa - 1.17.0-5 - Switch kojid back to Python 2 so that imgfac doesn't get disabled From 880d6b5cd64f0b53eec3980507520419d9ea3142 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 30 May 2019 13:48:02 -0700 Subject: [PATCH 129/202] Add patch to fix koji kerberos auth with python3. Drop internal mergerepos so we can go all python3. Fixes bug #1715257 --- 1468.patch | 36 +++++++ ...bc3dd8ed0679159aceb902409600b21f803c.patch | 96 +++++++++++++++++++ koji.spec | 44 ++++++--- 3 files changed, 164 insertions(+), 12 deletions(-) create mode 100644 1468.patch create mode 100644 9828bc3dd8ed0679159aceb902409600b21f803c.patch diff --git a/1468.patch b/1468.patch new file mode 100644 index 0000000..74c1f7a --- /dev/null +++ b/1468.patch @@ -0,0 +1,36 @@ +From 403f0f8a44c8ee0fd44326ae4d11bafe79e1809a Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: May 29 2019 15:31:52 +0000 +Subject: Allow builder to attempt krb if gssapi is available + + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/builder/kojid b/builder/kojid +index be1cb26..91d4d69 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -69,6 +69,11 @@ except ImportError: # pragma: no cover + krbV = None + + try: ++ import requests_kerberos ++except ImportError: # pragma: no cover ++ requests_kerberos = None ++ ++try: + import librepo + import io + except ImportError: +@@ -6137,7 +6142,7 @@ if __name__ == "__main__": + quit("Error: Unable to log in. Bad credentials?") + except six.moves.xmlrpc_client.ProtocolError: + quit("Error: Unable to connect to server %s" % (options.server)) +- elif krbV: ++ elif krbV or requests_kerberos: + krb_principal = options.krb_principal + if krb_principal is None: + krb_principal = options.host_principal_format % socket.getfqdn() + diff --git a/9828bc3dd8ed0679159aceb902409600b21f803c.patch b/9828bc3dd8ed0679159aceb902409600b21f803c.patch new file mode 100644 index 0000000..8c0afe6 --- /dev/null +++ b/9828bc3dd8ed0679159aceb902409600b21f803c.patch @@ -0,0 +1,96 @@ +From 9828bc3dd8ed0679159aceb902409600b21f803c Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: May 30 2019 18:45:46 +0000 +Subject: Expose 'dynamic_buildrequires' mock setting + + +We need it in order to enable this feature in rawhide and any module +builds which depend on rpm:4.15 (by request in modulemd). + +Signed-off-by: Igor Gnatenko + +--- + +diff --git a/0001-Expose-dynamic_buildrequires-mock-setting.patch b/0001-Expose-dynamic_buildrequires-mock-setting.patch +new file mode 100644 +index 0000000..914b5a4 +--- /dev/null ++++ b/0001-Expose-dynamic_buildrequires-mock-setting.patch +@@ -0,0 +1,77 @@ ++From cdecc416ec4cc5a5f29d0ff16318f68b562fcfd0 Mon Sep 17 00:00:00 2001 ++From: Igor Gnatenko ++Date: Wed, 29 May 2019 08:13:01 +0200 ++Subject: [PATCH] Expose 'dynamic_buildrequires' mock setting ++ ++Signed-off-by: Igor Gnatenko ++--- ++ builder/kojid | 2 ++ ++ docs/source/using_the_koji_build_system.rst | 2 ++ ++ koji/__init__.py | 2 ++ ++ tests/test_cli/test_add_tag.py | 4 +++- ++ 4 files changed, 9 insertions(+), 1 deletion(-) ++ ++diff --git a/builder/kojid b/builder/kojid ++index d6714258..5fc64638 100755 ++--- a/builder/kojid +++++ b/builder/kojid ++@@ -272,6 +272,8 @@ class BuildRoot(object): ++ opts['target_arch'] = self.target_arch ++ if 'mock.package_manager' in self.config['extra']: ++ opts['package_manager'] = self.config['extra']['mock.package_manager'] +++ if 'mock.dynamic_buildrequires' in self.config['extra']: +++ opts['dynamic_buildrequires'] = self.config['extra']['mock.dynamic_buildrequires'] ++ if self.internal_dev_setup is not None: ++ opts['internal_dev_setup'] = bool(self.internal_dev_setup) ++ output = koji.genMockConfig(self.name, self.br_arch, managed=True, **opts) ++diff --git a/docs/source/using_the_koji_build_system.rst b/docs/source/using_the_koji_build_system.rst ++index c3d5981b..d4664527 100644 ++--- a/docs/source/using_the_koji_build_system.rst +++++ b/docs/source/using_the_koji_build_system.rst ++@@ -456,6 +456,8 @@ environment follows: ++ * `mock.new_chroot` - 0/1 value. If it is set, `--new-chroot` or ++ `--old-chroot` option is appended to any mock call. If it is not set, ++ mock's default behavior is used. +++* `mock.dynamic_buildrequires` - 0/1 value. If this is set, it will override +++ mock's default setting of `dynamic_buildrequires`. ++ ++ Using Koji to control tasks ++ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ++diff --git a/koji/__init__.py b/koji/__init__.py ++index 64ab90d6..e105f7ee 100644 ++--- a/koji/__init__.py +++++ b/koji/__init__.py ++@@ -1458,6 +1458,8 @@ def genMockConfig(name, arch, managed=False, repoid=None, tag_name=None, **opts) ++ } ++ if opts.get('package_manager'): ++ config_opts['package_manager'] = opts['package_manager'] +++ if 'dynamic_buildrequires' in opts: +++ config_opts['dynamic_buildrequires'] = opts['dynamic_buildrequires'] ++ ++ # bind_opts are used to mount parts (or all of) /dev if needed. ++ # See kojid::LiveCDTask for a look at this option in action. ++diff --git a/tests/test_cli/test_add_tag.py b/tests/test_cli/test_add_tag.py ++index 422b9245..47112c51 100644 ++--- a/tests/test_cli/test_add_tag.py +++++ b/tests/test_cli/test_add_tag.py ++@@ -56,7 +56,8 @@ class TestAddTag(utils.CliTestCase): ++ '--maven-support', '--include-all'] ++ # extra fields, ++ arguments += ['--extra', 'mock.package_manager=dnf', ++- '--extra', 'mock.new_chroot=0'] +++ '--extra', 'mock.new_chroot=0', +++ '--extra', 'mock.dynamic_buildrequires=1'] ++ ++ opts = { ++ 'parent': 'parent', ++@@ -67,6 +68,7 @@ class TestAddTag(utils.CliTestCase): ++ { ++ 'mock.package_manager': 'dnf', ++ 'mock.new_chroot': 0, +++ 'mock.dynamic_buildrequires': 1, ++ } ++ } ++ ++-- ++2.22.0.rc1 ++ diff --git a/koji.spec b/koji.spec index f537d24..bf99ff2 100644 --- a/koji.spec +++ b/koji.spec @@ -27,12 +27,13 @@ %endif %endif -%if 0%{?fedora} >= 33 -# no py2 after F33 +%if 0%{?fedora} > 30 +# no py2 after F31 %define py2_support 0 %define py3_support 2 %else -%if 0%{?fedora} >= 30 +# Keep some minimal python2 in f30 for now +%if 0%{?fedora} = 30 %define py2_support 1 %define py3_support 2 %else @@ -78,7 +79,7 @@ Name: koji Version: 1.17.0 -Release: 6%{?dist} +Release: 7%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -99,6 +100,14 @@ Patch12: https://pagure.io/koji/pull-request/1273.patch # Handle 'bare' merge mode for repos Patch13: https://pagure.io/koji/pull-request/1411.patch +# Expose dynamic_buildrequires mock setting +# Upstream: https://pagure.io/koji/pull-request/1466.patch +# Rebased for 1.17.0 in https://src.fedoraproject.org/rpms/koji/pull-request/6 +Patch14: https://src.fedoraproject.org/rpms/koji/c/9828bc3dd8ed0679159aceb902409600b21f803c.patch + +# Patch to fix kerberos auth in kojid with python3 +Patch15: https://pagure.io/koji/pull-request/1468.patch + # Not upstreamable Patch100: fedora-config.patch @@ -284,8 +293,12 @@ Plugins for the koji build daemon %package builder Summary: Koji RPM builder daemon +%if 0%{py3_support} > 1 +License: LGPLv2 +%else License: LGPLv2 and GPLv2+ #mergerepos (from createrepo) is GPLv2+ +%endif Requires: mock >= 0.9.14 Requires(pre): /usr/sbin/useradd Requires: squashfs-tools @@ -416,14 +429,7 @@ koji-web is a web UI to the Koji system. %endif %prep -%setup -q - -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 - -%patch100 -p1 +%autosetup -p1 %build @@ -492,6 +498,11 @@ done %endif %endif +%if 0%{py2_support} < 1 +# With no python2 support, remove/do not ship internal mergerepos +rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos +%endif + %files %{_bindir}/* %config(noreplace) /etc/koji.conf @@ -602,8 +613,10 @@ done %files builder %{_sbindir}/kojid +%if 0%{py2_support} > 1 %dir %{_libexecdir}/kojid %{_libexecdir}/kojid/mergerepos +%endif %if %{use_systemd} %{_unitdir}/kojid.service %else @@ -699,6 +712,13 @@ fi %endif %changelog +* Thu May 30 2019 Kevin Fenzi - 1.17.0-7 +- Add patch to fix koji kerberos auth with python3. +- Drop internal mergerepos so we can go all python3. Fixes bug #1715257 + +* Wed May 29 2019 Igor Gnatenko - 1.17.0-7 +- Expose dynamic_buildrequires mock setting + * Tue May 28 2019 Kevin Fenzi - 1.17.0-6 - Switch kojid back to python3 as imagefactory and oz have moved. - Backport patch to download only repomd.xml instead of all repodata. From 628e998e732e83d7c1f956d33a5851c58189ef57 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 30 May 2019 13:50:28 -0700 Subject: [PATCH 130/202] Fix bad conditional. Signed-off-by: Kevin Fenzi --- koji.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index bf99ff2..980b497 100644 --- a/koji.spec +++ b/koji.spec @@ -33,7 +33,7 @@ %define py3_support 2 %else # Keep some minimal python2 in f30 for now -%if 0%{?fedora} = 30 +%if 0%{?fedora} == 30 %define py2_support 1 %define py3_support 2 %else From dceb6648581ecc9f6bc35a2ef370522a2a26d21e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 11:59:54 +0000 Subject: [PATCH 131/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 980b497..419d6eb 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.17.0 -Release: 7%{?dist} +Release: 8%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -712,6 +712,9 @@ fi %endif %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 1.17.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu May 30 2019 Kevin Fenzi - 1.17.0-7 - Add patch to fix koji kerberos auth with python3. - Drop internal mergerepos so we can go all python3. Fixes bug #1715257 From 648230526ff1f230a9376e6f2450d57fedb6a5e1 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 16 Aug 2019 10:15:27 -0700 Subject: [PATCH 132/202] Update to 1.18.0. --- .gitignore | 1 + 1273.patch | 224 ------------------ 1398.patch | 30 --- 1411.patch | 61 ----- 1468.patch | 36 --- 1576.patch | 34 +++ 1613.patch | 76 ++++++ ...bc3dd8ed0679159aceb902409600b21f803c.patch | 96 -------- fedora-config.patch | 62 ++--- koji-PR1278-use-createrepo_c-by-default.patch | 37 --- koji.spec | 32 +-- sources | 2 +- 12 files changed, 145 insertions(+), 546 deletions(-) delete mode 100644 1273.patch delete mode 100644 1398.patch delete mode 100644 1411.patch delete mode 100644 1468.patch create mode 100644 1576.patch create mode 100644 1613.patch delete mode 100644 9828bc3dd8ed0679159aceb902409600b21f803c.patch delete mode 100644 koji-PR1278-use-createrepo_c-by-default.patch diff --git a/.gitignore b/.gitignore index 04f93f2..b8e8a9a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ koji-1.4.0.tar.bz2 /koji-1.16.1.tar.bz2 /koji-1.16.2.tar.bz2 /koji-1.17.0.tar.bz2 +/koji-1.18.0.tar.bz2 diff --git a/1273.patch b/1273.patch deleted file mode 100644 index 7c46251..0000000 --- a/1273.patch +++ /dev/null @@ -1,224 +0,0 @@ -From 3590ab0a355adaf63c7a5f068f7a6ac0eb5e8b05 Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Feb 21 2019 12:42:18 +0000 -Subject: Allow generating separate src repo for build repos - - -Fixes #1266 - ---- - -diff --git a/builder/kojid b/builder/kojid -index 27fe523..0fffb89 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -4990,13 +4990,15 @@ class NewRepoTask(BaseTaskHandler): - Methods = ['newRepo'] - _taskWeight = 0.1 - -- def handler(self, tag, event=None, src=False, debuginfo=False): -+ def handler(self, tag, event=None, src=False, debuginfo=False, separate_src=False): - tinfo = self.session.getTag(tag, strict=True, event=event) - kwargs = {} - if event is not None: - kwargs['event'] = event - if src: - kwargs['with_src'] = True -+ if separate_src: -+ kwargs['with_separate_src'] = True - if debuginfo: - kwargs['with_debuginfo'] = True - repo_id, event_id = self.session.host.repoInit(tinfo['id'], **kwargs) -diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py -index a2b2b2b..1a2ace6 100644 ---- a/cli/koji_cli/commands.py -+++ b/cli/koji_cli/commands.py -@@ -7011,7 +7011,8 @@ def handle_regen_repo(options, session, args): - parser.add_option("--target", action="store_true", help=_("Interpret the argument as a build target name")) - parser.add_option("--nowait", action="store_true", help=_("Don't wait on for regen to finish")) - parser.add_option("--debuginfo", action="store_true", help=_("Include debuginfo rpms in repo")) -- parser.add_option("--source", "--src", action="store_true", help=_("Include source rpms in the repo")) -+ parser.add_option("--source", "--src", action="store_true", help=_("Include source rpms in each of repos")) -+ parser.add_option("--separate-source", "--separate-src", action="store_true", help=_("Include source rpms in separate src repo")) - (suboptions, args) = parser.parse_args(args) - if len(args) == 0: - parser.error(_("A tag name must be specified")) -@@ -7047,6 +7048,8 @@ def handle_regen_repo(options, session, args): - repo_opts['debuginfo'] = True - if suboptions.source: - repo_opts['src'] = True -+ if suboptions.separate_source: -+ repo_opts['separate_src'] = True - task_id = session.newRepo(tag, **repo_opts) - print("Regenerating repo for tag: %s" % tag) - print("Created task: %d" % task_id) -diff --git a/hub/kojihub.py b/hub/kojihub.py -index 46b8f3e..9844861 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -2345,7 +2345,7 @@ def maven_tag_archives(tag_id, event_id=None, inherit=True): - yield archive - return _iter_archives() - --def repo_init(tag, with_src=False, with_debuginfo=False, event=None): -+def repo_init(tag, with_src=False, with_debuginfo=False, event=None, with_separate_src=False): - """Create a new repo entry in the INIT state, return full repo data - - Returns a dictionary containing -@@ -2355,9 +2355,11 @@ def repo_init(tag, with_src=False, with_debuginfo=False, event=None): - state = koji.REPO_INIT - tinfo = get_tag(tag, strict=True, event=event) - koji.plugin.run_callbacks('preRepoInit', tag=tinfo, with_src=with_src, with_debuginfo=with_debuginfo, -- event=event, repo_id=None) -+ event=event, repo_id=None, with_separate_src=with_separate_src) - tag_id = tinfo['id'] - repo_arches = {} -+ if with_separate_src: -+ repo_arches['src'] = 1 - if tinfo['arches']: - for arch in tinfo['arches'].split(): - arch = koji.canonArch(arch) -@@ -2420,6 +2422,8 @@ def repo_init(tag, with_src=False, with_debuginfo=False, event=None): - if with_src: - for repoarch in repo_arches: - pkglist[repoarch].write(relpath) -+ if with_separate_src: -+ pkglist[arch].write(relpath) - elif arch == 'noarch': - for repoarch in repo_arches: - pkglist[repoarch].write(relpath) -@@ -2474,7 +2478,7 @@ def repo_init(tag, with_src=False, with_debuginfo=False, event=None): - _write_maven_repo_metadata(artifact_dir, artifacts) - - koji.plugin.run_callbacks('postRepoInit', tag=tinfo, with_src=with_src, with_debuginfo=with_debuginfo, -- event=event, repo_id=repo_id) -+ event=event, repo_id=repo_id, with_separate_src=with_separate_src) - return [repo_id, event_id] - - def _write_maven_repo_metadata(destdir, artifacts): -@@ -2519,7 +2523,8 @@ def dist_repo_init(tag, keys, task_opts): - # note: we need to match args from the other preRepoInit callback - koji.plugin.run_callbacks('preRepoInit', tag=tinfo, with_src=False, - with_debuginfo=False, event=event, repo_id=None, -- dist=True, keys=keys, arches=arches, task_opts=task_opts) -+ dist=True, keys=keys, arches=arches, task_opts=task_opts, -+ with_separate_src=False) - if not event: - event = get_event() - repo_id = nextval('repo_id_seq') -@@ -2540,7 +2545,7 @@ def dist_repo_init(tag, keys, task_opts): - koji.plugin.run_callbacks('postRepoInit', tag=tinfo, with_src=False, - with_debuginfo=False, event=event, repo_id=repo_id, - dist=True, keys=keys, arches=arches, task_opts=task_opts, -- repodir=repodir) -+ repodir=repodir, with_reparate_src=False) - return repo_id, event - - -@@ -10521,7 +10526,7 @@ class RootExports(object): - task_opts['event'] = event_id - return make_task('distRepo', [tag, repo_id, keys, task_opts], priority=15, channel='createrepo') - -- def newRepo(self, tag, event=None, src=False, debuginfo=False): -+ def newRepo(self, tag, event=None, src=False, debuginfo=False, separate_src=False): - """Create a newRepo task. returns task id""" - if context.session.hasPerm('regen-repo'): - pass -@@ -10532,6 +10537,8 @@ class RootExports(object): - opts['event'] = event - if src: - opts['src'] = True -+ if separate_src: -+ opts['separate_src'] = True - if debuginfo: - opts['debuginfo'] = True - args = koji.encode_args(tag, **opts) -@@ -12699,11 +12706,11 @@ class HostExports(object): - - return br.updateArchiveList(archives, project) - -- def repoInit(self, tag, with_src=False, with_debuginfo=False, event=None): -+ def repoInit(self, tag, with_src=False, with_debuginfo=False, event=None, with_separate_src=False): - """Initialize a new repo for tag""" - host = Host() - host.verify() -- return repo_init(tag, with_src=with_src, with_debuginfo=with_debuginfo, event=event) -+ return repo_init(tag, with_src=with_src, with_debuginfo=with_debuginfo, event=event, with_separate_src=with_separate_src) - - def repoAddRPM(self, repo_id, path): - """Add an uploaded rpm to a repo""" -diff --git a/koji/tasks.py b/koji/tasks.py -index ba4cd31..90656b8 100644 ---- a/koji/tasks.py -+++ b/koji/tasks.py -@@ -200,7 +200,7 @@ LEGACY_SIGNATURES = { - [['builds', 'target', 'opts'], None, None, (None,)], - ], - 'newRepo' : [ -- [['tag', 'event', 'src', 'debuginfo'], None, None, (None, False, False)], -+ [['tag', 'event', 'src', 'debuginfo', 'separate_src'], None, None, (None, False, False, False)], - ], - 'createImage' : [ - [['name', 'version', 'release', 'arch', 'target_info', 'build_tag', 'repo_info', 'inst_tree', 'opts'], None, None, (None,)], -diff --git a/tests/test_cli/test_regen_repo.py b/tests/test_cli/test_regen_repo.py -index 43eff0b..90f16b1 100644 ---- a/tests/test_cli/test_regen_repo.py -+++ b/tests/test_cli/test_regen_repo.py -@@ -168,11 +168,13 @@ class TestRegenRepo(utils.CliTestCase): - (Specify the --help global option for a list of other help options) - - Options: -- -h, --help show this help message and exit -- --target Interpret the argument as a build target name -- --nowait Don't wait on for regen to finish -- --debuginfo Include debuginfo rpms in repo -- --source, --src Include source rpms in the repo -+ -h, --help show this help message and exit -+ --target Interpret the argument as a build target name -+ --nowait Don't wait on for regen to finish -+ --debuginfo Include debuginfo rpms in repo -+ --source, --src Include source rpms in each of repos -+ --separate-source, --separate-src -+ Include source rpms in separate src repo - """ % self.progname) - - -diff --git a/util/kojira b/util/kojira -index 8e68cfd..a93d966 100755 ---- a/util/kojira -+++ b/util/kojira -@@ -671,6 +671,7 @@ class RepoManager(object): - - debuginfo_pat = self.options.debuginfo_tags.split() - src_pat = self.options.source_tags.split() -+ separate_src_pat = self.options.separate_source_tags.split() - order = sorted(self.needed_tags.values(), key=lambda t: t['score']) - for tag in order: - if running_tasks >= self.options.max_repo_tasks: -@@ -699,6 +700,8 @@ class RepoManager(object): - taskopts['debuginfo'] = True - if koji.util.multi_fnmatch(tagname, src_pat): - taskopts['src'] = True -+ if koji.util.multi_fnmatch(tagname, separate_src_pat): -+ taskopts['separate_src'] = True - maven = tag['taginfo']['maven_support'] - if maven: - if running_tasks_maven >= self.options.max_repo_tasks_maven: -@@ -836,6 +839,7 @@ def get_options(): - defaults = {'with_src': False, - 'debuginfo_tags': '', - 'source_tags': '', -+ 'separate_source_tags': '', - 'ignore_tags': '', - 'verbose': False, - 'debug': False, -@@ -876,7 +880,7 @@ def get_options(): - 'recent_tasks_lifetime') - str_opts = ('topdir', 'server', 'user', 'password', 'logfile', 'principal', 'keytab', 'krbservice', - 'cert', 'ca', 'serverca', 'debuginfo_tags', -- 'source_tags', 'ignore_tags') # FIXME: remove ca here -+ 'source_tags', 'separate_source_tags', 'ignore_tags') # FIXME: remove ca here - bool_opts = ('with_src','verbose','debug','ignore_stray_repos', 'offline_retry', - 'krb_rdns', 'krb_canon_host', 'no_ssl_verify') - for name in config.options(section): - diff --git a/1398.patch b/1398.patch deleted file mode 100644 index 6fbcbaa..0000000 --- a/1398.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a66b4ddfb4399cdc03ccc6f66acd634c692ee88f Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Apr 17 2019 05:38:03 +0000 -Subject: kojid: Download only 'repomd.xml' - - -We have pretty slow connection from s390x koji which helped to uncover -this part. Kojid downloads all files from repomd.xml (incl. filelists) -which is really big. What we really want is just find location of -'origin' (used later in the code). - -Signed-off-by: Igor Gnatenko - ---- - -diff --git a/builder/kojid b/builder/kojid -index 75f8a7d..5110d04 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -739,6 +739,9 @@ class BuildRoot(object): - h.setopt(librepo.LRO_REPOTYPE, librepo.LR_YUMREPO) - h.setopt(librepo.LRO_URLS, [repo_url]) - h.setopt(librepo.LRO_DESTDIR, tmpdir) -+ # We are using this just to find out location of 'origin', -+ # we don't even need to download it since we use openRemoteFile -+ h.setopt(librepo.LRO_YUMDLIST, []) - h.perform(r) - pkgorigins = r.getinfo(librepo.LRR_YUM_REPOMD)['origin']['location_href'] - koji.util.rmtree(tmpdir) - diff --git a/1411.patch b/1411.patch deleted file mode 100644 index 2957c4e..0000000 --- a/1411.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 3c5ddb8dab9a5736f03b6d60593adc9170304af3 Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: May 03 2019 14:57:43 +0000 -Subject: [PATCH 1/2] handle bare merge mode - - -Fixes https://pagure.io/koji/issue/1404 - ---- - -diff --git a/builder/kojid b/builder/kojid -index 5110d04..e176266 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -5186,6 +5186,10 @@ class CreaterepoTask(BaseTaskHandler): - cmd = ['/usr/libexec/kojid/mergerepos', - '--mode', 'simple', - '--tempdir', self.workdir] -+ elif merge_mode == 'bare': -+ # "bare" merge mode for repos with modular metadata -+ # forces use of mergerepo_c -+ cmd = ['/usr/bin/mergerepo_c', '--pkgorigins'] - elif self.options.use_createrepo_c: - cmd = ['/usr/bin/mergerepo_c', '--koji'] - else: -diff --git a/koji/__init__.py b/koji/__init__.py -index 6e667ce..9c7101c 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -236,7 +236,7 @@ REPO_EXPIRED = REPO_STATES['EXPIRED'] - REPO_DELETED = REPO_STATES['DELETED'] - REPO_PROBLEM = REPO_STATES['PROBLEM'] - --REPO_MERGE_MODES = set(['koji', 'simple']) -+REPO_MERGE_MODES = set(['koji', 'simple', 'dumb']) - - # buildroot states - BR_STATES = Enum(( - -From 0da20019456c386aa44589c3f0529926fb426541 Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: May 03 2019 16:54:54 +0000 -Subject: [PATCH 2/2] fix mode name - - ---- - -diff --git a/koji/__init__.py b/koji/__init__.py -index 9c7101c..0b9b5bc 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -236,7 +236,7 @@ REPO_EXPIRED = REPO_STATES['EXPIRED'] - REPO_DELETED = REPO_STATES['DELETED'] - REPO_PROBLEM = REPO_STATES['PROBLEM'] - --REPO_MERGE_MODES = set(['koji', 'simple', 'dumb']) -+REPO_MERGE_MODES = set(['koji', 'simple', 'bare']) - - # buildroot states - BR_STATES = Enum(( - diff --git a/1468.patch b/1468.patch deleted file mode 100644 index 74c1f7a..0000000 --- a/1468.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 403f0f8a44c8ee0fd44326ae4d11bafe79e1809a Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: May 29 2019 15:31:52 +0000 -Subject: Allow builder to attempt krb if gssapi is available - - -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/builder/kojid b/builder/kojid -index be1cb26..91d4d69 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -69,6 +69,11 @@ except ImportError: # pragma: no cover - krbV = None - - try: -+ import requests_kerberos -+except ImportError: # pragma: no cover -+ requests_kerberos = None -+ -+try: - import librepo - import io - except ImportError: -@@ -6137,7 +6142,7 @@ if __name__ == "__main__": - quit("Error: Unable to log in. Bad credentials?") - except six.moves.xmlrpc_client.ProtocolError: - quit("Error: Unable to connect to server %s" % (options.server)) -- elif krbV: -+ elif krbV or requests_kerberos: - krb_principal = options.krb_principal - if krb_principal is None: - krb_principal = options.host_principal_format % socket.getfqdn() - diff --git a/1576.patch b/1576.patch new file mode 100644 index 0000000..7439d01 --- /dev/null +++ b/1576.patch @@ -0,0 +1,34 @@ +From ad0da60a380499e7b1ed8ca84ce606b183f79e39 Mon Sep 17 00:00:00 2001 +From: Kevin Fenzi +Date: Jul 19 2019 23:27:30 +0000 +Subject: builder/kojid: revert using only 2 processors for xz compression and lower preset to 6 + + +In c360c791ec24b567a16553dca38b24645dd80a36 we changed xz to use only +2 cpus for compression. That commit notes that xz threads are really +memory hungry. However, preset -9 is many times as memory hungry as +preset -6. If we switch to preset 6, xz compressed artifacts will be +a little bit larger, but will compress (and decompress!) a lot larger. +This is obviously a trade off, but I think lowering the preset and +using more cpus will be a better tradeoff. + +This commit moves xz to preset 6 and using all cpus the builder has. + +Signed-off-by: Kevin Fenzi + +--- + +diff --git a/builder/kojid b/builder/kojid +index 3f84887..09a48a9 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -3989,7 +3989,7 @@ class BaseImageTask(OzImageTask): + 'xz-cp-%s-%s.log' % (format, self.arch)) + log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), + logerror=1) +- cmd = ['/usr/bin/xz', '-z9T2', rawimg] ++ cmd = ['/usr/bin/xz', '-z6T0', rawimg] + conlog = os.path.join(self.workdir, + 'xz-%s-%s.log' % (format, self.arch)) + log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), + diff --git a/1613.patch b/1613.patch new file mode 100644 index 0000000..29eecef --- /dev/null +++ b/1613.patch @@ -0,0 +1,76 @@ +From 88e92b61a4a4eacf5ccd14566ecfa473d6719a8f Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Aug 13 2019 11:35:14 +0000 +Subject: [PATCH 1/2] Allow builder to attempt krb if gssapi is available + + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/builder/kojid b/builder/kojid +index 142a440..86af4e5 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -69,6 +69,11 @@ except ImportError: # pragma: no cover + krbV = None + + try: ++ import requests_kerberos ++except ImportError: # pragma: no cover ++ requests_kerberos = None ++ ++try: + import librepo + import io + except ImportError: +@@ -6264,7 +6269,7 @@ if __name__ == "__main__": + quit("Error: Unable to log in. Bad credentials?") + except six.moves.xmlrpc_client.ProtocolError: + quit("Error: Unable to connect to server %s" % (options.server)) +- elif krbV: ++ elif krbV or requests_kerberos: + krb_principal = options.krb_principal + if krb_principal is None: + krb_principal = options.host_principal_format % socket.getfqdn() + +From 8b76e0d1af3b4e6d1faf04cbc9142c277c2cd613 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Aug 13 2019 11:53:16 +0000 +Subject: [PATCH 2/2] fix krbV error handling + + +Fixes: https://pagure.io/koji/issue/1575 + +--- + +diff --git a/builder/kojid b/builder/kojid +index 86af4e5..73c2bf7 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -65,11 +65,13 @@ from koji.util import parseStatus, isSuccess, dslice, dslice_ex, to_list + + try: + import krbV ++ Krb5Error = krbV.Krb5Error + except ImportError: # pragma: no cover + krbV = None + + try: + import requests_kerberos ++ Krb5Error = requests_kerberos.exceptions.RequestException + except ImportError: # pragma: no cover + requests_kerberos = None + +@@ -6277,8 +6279,8 @@ if __name__ == "__main__": + session.krb_login(principal=krb_principal, + keytab=options.keytab, + ccache=options.ccache) +- except krbV.Krb5Error as e: +- quit("Kerberos authentication failed: '%s' (%s)" % (e.args[1], e.args[0])) ++ except Krb5Error as e: ++ quit("Kerberos authentication failed: %s" % e.args) + except socket.error as e: + quit("Could not connect to Kerberos authentication service: '%s'" % e.args[1]) + else: + diff --git a/9828bc3dd8ed0679159aceb902409600b21f803c.patch b/9828bc3dd8ed0679159aceb902409600b21f803c.patch deleted file mode 100644 index 8c0afe6..0000000 --- a/9828bc3dd8ed0679159aceb902409600b21f803c.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9828bc3dd8ed0679159aceb902409600b21f803c Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: May 30 2019 18:45:46 +0000 -Subject: Expose 'dynamic_buildrequires' mock setting - - -We need it in order to enable this feature in rawhide and any module -builds which depend on rpm:4.15 (by request in modulemd). - -Signed-off-by: Igor Gnatenko - ---- - -diff --git a/0001-Expose-dynamic_buildrequires-mock-setting.patch b/0001-Expose-dynamic_buildrequires-mock-setting.patch -new file mode 100644 -index 0000000..914b5a4 ---- /dev/null -+++ b/0001-Expose-dynamic_buildrequires-mock-setting.patch -@@ -0,0 +1,77 @@ -+From cdecc416ec4cc5a5f29d0ff16318f68b562fcfd0 Mon Sep 17 00:00:00 2001 -+From: Igor Gnatenko -+Date: Wed, 29 May 2019 08:13:01 +0200 -+Subject: [PATCH] Expose 'dynamic_buildrequires' mock setting -+ -+Signed-off-by: Igor Gnatenko -+--- -+ builder/kojid | 2 ++ -+ docs/source/using_the_koji_build_system.rst | 2 ++ -+ koji/__init__.py | 2 ++ -+ tests/test_cli/test_add_tag.py | 4 +++- -+ 4 files changed, 9 insertions(+), 1 deletion(-) -+ -+diff --git a/builder/kojid b/builder/kojid -+index d6714258..5fc64638 100755 -+--- a/builder/kojid -++++ b/builder/kojid -+@@ -272,6 +272,8 @@ class BuildRoot(object): -+ opts['target_arch'] = self.target_arch -+ if 'mock.package_manager' in self.config['extra']: -+ opts['package_manager'] = self.config['extra']['mock.package_manager'] -++ if 'mock.dynamic_buildrequires' in self.config['extra']: -++ opts['dynamic_buildrequires'] = self.config['extra']['mock.dynamic_buildrequires'] -+ if self.internal_dev_setup is not None: -+ opts['internal_dev_setup'] = bool(self.internal_dev_setup) -+ output = koji.genMockConfig(self.name, self.br_arch, managed=True, **opts) -+diff --git a/docs/source/using_the_koji_build_system.rst b/docs/source/using_the_koji_build_system.rst -+index c3d5981b..d4664527 100644 -+--- a/docs/source/using_the_koji_build_system.rst -++++ b/docs/source/using_the_koji_build_system.rst -+@@ -456,6 +456,8 @@ environment follows: -+ * `mock.new_chroot` - 0/1 value. If it is set, `--new-chroot` or -+ `--old-chroot` option is appended to any mock call. If it is not set, -+ mock's default behavior is used. -++* `mock.dynamic_buildrequires` - 0/1 value. If this is set, it will override -++ mock's default setting of `dynamic_buildrequires`. -+ -+ Using Koji to control tasks -+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -+diff --git a/koji/__init__.py b/koji/__init__.py -+index 64ab90d6..e105f7ee 100644 -+--- a/koji/__init__.py -++++ b/koji/__init__.py -+@@ -1458,6 +1458,8 @@ def genMockConfig(name, arch, managed=False, repoid=None, tag_name=None, **opts) -+ } -+ if opts.get('package_manager'): -+ config_opts['package_manager'] = opts['package_manager'] -++ if 'dynamic_buildrequires' in opts: -++ config_opts['dynamic_buildrequires'] = opts['dynamic_buildrequires'] -+ -+ # bind_opts are used to mount parts (or all of) /dev if needed. -+ # See kojid::LiveCDTask for a look at this option in action. -+diff --git a/tests/test_cli/test_add_tag.py b/tests/test_cli/test_add_tag.py -+index 422b9245..47112c51 100644 -+--- a/tests/test_cli/test_add_tag.py -++++ b/tests/test_cli/test_add_tag.py -+@@ -56,7 +56,8 @@ class TestAddTag(utils.CliTestCase): -+ '--maven-support', '--include-all'] -+ # extra fields, -+ arguments += ['--extra', 'mock.package_manager=dnf', -+- '--extra', 'mock.new_chroot=0'] -++ '--extra', 'mock.new_chroot=0', -++ '--extra', 'mock.dynamic_buildrequires=1'] -+ -+ opts = { -+ 'parent': 'parent', -+@@ -67,6 +68,7 @@ class TestAddTag(utils.CliTestCase): -+ { -+ 'mock.package_manager': 'dnf', -+ 'mock.new_chroot': 0, -++ 'mock.dynamic_buildrequires': 1, -+ } -+ } -+ -+-- -+2.22.0.rc1 -+ diff --git a/fedora-config.patch b/fedora-config.patch index f3efff9..775b0e3 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,65 +1,49 @@ -From e28b662b29f688954a8ebe772e21cb7025ba47b6 Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: Thu, 7 Mar 2019 12:22:12 +0100 -Subject: [PATCH] Apply Fedora instance configuration - -Signed-off-by: Patrick Uiterwijk ---- - cli/koji.conf | 25 +++++++++++-------------- - 1 file changed, 11 insertions(+), 14 deletions(-) - -diff --git a/cli/koji.conf b/cli/koji.conf -index addd4e3..3588c19 100644 ---- a/cli/koji.conf -+++ b/cli/koji.conf -@@ -3,18 +3,23 @@ - ;configuration for koji cli tool +diff -Nur koji-1.18.0.orig/cli/koji.conf koji-1.18.0/cli/koji.conf +--- koji-1.18.0.orig/cli/koji.conf 2019-08-09 11:07:07.000000000 -0700 ++++ koji-1.18.0/cli/koji.conf 2019-08-16 08:14:51.834690613 -0700 +@@ -4,17 +4,22 @@ ;url of XMLRPC server --;server = http://hub.example.com/kojihub + ;server = http://hub.example.com/kojihub +server = https://koji.fedoraproject.org/kojihub ;url of web interface --;weburl = http://www.example.com/koji + ;weburl = http://www.example.com/koji +weburl = https://koji.fedoraproject.org/koji ;url of package download site --;pkgurl = http://www.example.com/packages -+topurl = https://kojipkgs.fedoraproject.org/ + ;pkgurl = http://www.example.com/packages ++pkgurl = https://kojipkgs.fedoraproject.org/ ;path to the koji top directory ;topdir = /mnt/koji -+; use the fast upload feature of koji by default -+use_fast_upload = yes -+ ;configuration for Kerberos authentication +authtype = kerberos +krb_rdns = false ;the service name of the principal being used by the hub ;krbservice = host -@@ -28,17 +33,9 @@ +@@ -28,7 +33,6 @@ ;enable to lookup dns canonical hostname for krb auth ;krb_canon_host = no - --;configuration for SSL authentication -- --;client certificate --;cert = ~/.koji/client.crt -- --;certificate of the CA that issued the HTTP server certificate --;serverca = ~/.koji/serverca.crt -- --;enabled plugins for CLI, runroot and save_failed_tree are available --;plugins = -+;enabled plugins for CLI, runroot is enabled by default for fedora -+;save_failed_tree is available + ;configuration for SSL authentication + + ;client certificate +@@ -45,9 +49,14 @@ + ;[not_implemented_yet] + ;enabled plugins for CLI, runroot and save_failed_tree are available + ;plugins = ++; runroot plugin is enabled by default in fedora +plugins = runroot ;timeout of XMLRPC requests by seconds, default: 60 * 60 * 12 = 43200 ;timeout = 43200 --- -2.20.1 - + + ;timeout of GSSAPI/SSL authentication by seconds, default: 60 + ;auth_timeout = 60 ++ ++; use the fast upload feature of koji by default ++use_fast_upload = yes diff --git a/koji-PR1278-use-createrepo_c-by-default.patch b/koji-PR1278-use-createrepo_c-by-default.patch deleted file mode 100644 index 8940256..0000000 --- a/koji-PR1278-use-createrepo_c-by-default.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 781a09a9750a18b77208e58eaa960b1b0d3f7dac Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Feb 25 2019 13:50:30 +0000 -Subject: createrepo_c is used by default now - - -Fixes: https://pagure.io/koji/issue/716 - ---- - -diff --git a/builder/kojid b/builder/kojid -index e7c87f9..5e97615 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -5975,7 +5975,7 @@ def get_options(): - 'timeout': None, - 'no_ssl_verify': False, - 'use_fast_upload': True, -- 'use_createrepo_c': False, -+ 'use_createrepo_c': True, - 'createrepo_skip_stat': True, - 'createrepo_update': True, - 'pkgurl': None, -diff --git a/builder/kojid.conf b/builder/kojid.conf -index 7bc235d..b9f0851 100644 ---- a/builder/kojid.conf -+++ b/builder/kojid.conf -@@ -50,7 +50,7 @@ server=http://hub.example.com/kojihub - topurl=http://hub.example.com/kojifiles - - ; use createrepo_c rather than createrepo --; use_createrepo_c=False -+; use_createrepo_c=True - - ; A space-separated list of tuples from which kojid is allowed to checkout. - ; The format of those tuples is: - diff --git a/koji.spec b/koji.spec index 419d6eb..4db9b7b 100644 --- a/koji.spec +++ b/koji.spec @@ -78,35 +78,20 @@ %endif Name: koji -Version: 1.17.0 -Release: 8%{?dist} +Version: 1.18.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# Patches proposed upstream -## Use createrepo_c by default now (we already do this in Fedora infra anyway) -## From: https://pagure.io/koji/pull-request/1278 -Patch10: koji-PR1278-use-createrepo_c-by-default.patch +# Patches already upstream +# Already merged patch to fix kojid kerberos auth +Patch1: https://pagure.io/koji/pull-request/1613.patch -# Download only the repomd.xml instead of all the repodata -Patch11: https://pagure.io/koji/pull-request/1398.patch - -# Allow generating seperate srpm repos in buildroot repos -Patch12: https://pagure.io/koji/pull-request/1273.patch - -# Handle 'bare' merge mode for repos -Patch13: https://pagure.io/koji/pull-request/1411.patch - -# Expose dynamic_buildrequires mock setting -# Upstream: https://pagure.io/koji/pull-request/1466.patch -# Rebased for 1.17.0 in https://src.fedoraproject.org/rpms/koji/pull-request/6 -Patch14: https://src.fedoraproject.org/rpms/koji/c/9828bc3dd8ed0679159aceb902409600b21f803c.patch - -# Patch to fix kerberos auth in kojid with python3 -Patch15: https://pagure.io/koji/pull-request/1468.patch +# Adjust xz params to favor speed +Patch15: https://pagure.io/koji/pull-request/1576.patch # Not upstreamable Patch100: fedora-config.patch @@ -712,6 +697,9 @@ fi %endif %changelog +* Fri Aug 16 2019 Kevin Fenzi - 1.18.0-1 +- Update to 1.18.0. + * Thu Jul 25 2019 Fedora Release Engineering - 1.17.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 12d49b9..9c7e1c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.17.0.tar.bz2) = 6f5da6d10ca3d2c01aa9251d5fa01221a89eb80a24b6b933197f359d9bc348d8e2f8b18d66d886454bdf89e8269a6a9652c44f1858b1c75d6540e32898e76f89 +SHA512 (koji-1.18.0.tar.bz2) = 6229ddde6b0d792d3a8d71ab5cdf7cbed525d64c58b41e779ceac56ae0608ca2eac1346e86ba2e0ce5d64126cc57a50e6ab89253b2c1862ed6f5ca02e1591f6d From 603cb8ae7ce351169901c4d0295f7c9a6ce9be61 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 16 Aug 2019 11:21:52 -0700 Subject: [PATCH 133/202] Fix mergerepos conditional for f30. --- koji.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 4db9b7b..843f1f5 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.18.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -483,7 +483,7 @@ done %endif %endif -%if 0%{py2_support} < 1 +%if 0%{py2_support} < 2 # With no python2 support, remove/do not ship internal mergerepos rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos %endif @@ -697,6 +697,9 @@ fi %endif %changelog +* Fri Aug 16 2019 Kevin Fenzi - 1.18.0-2 +- Fix mergerepos conditional for f30. + * Fri Aug 16 2019 Kevin Fenzi - 1.18.0-1 - Update to 1.18.0. From d47b319c627c7f1e920fa823cf27702a747cb184 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 16 Aug 2019 14:22:19 -0700 Subject: [PATCH 134/202] Fix pkgsurl/topurl default mistake. --- fedora-config.patch | 2 +- koji.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fedora-config.patch b/fedora-config.patch index 775b0e3..ccf0275 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -13,7 +13,7 @@ diff -Nur koji-1.18.0.orig/cli/koji.conf koji-1.18.0/cli/koji.conf ;url of package download site ;pkgurl = http://www.example.com/packages -+pkgurl = https://kojipkgs.fedoraproject.org/ ++topurl = https://kojipkgs.fedoraproject.org/ ;path to the koji top directory ;topdir = /mnt/koji diff --git a/koji.spec b/koji.spec index 843f1f5..3ccb849 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.18.0 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -697,6 +697,9 @@ fi %endif %changelog +* Fri Aug 16 2019 Kevin Fenzi - 1.18.0-3 +- Fix pkgsurl/topurl default mistake. + * Fri Aug 16 2019 Kevin Fenzi - 1.18.0-2 - Fix mergerepos conditional for f30. From 3ea8d7c8ccdf6129ae889fa29748df8235d90f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 17 Aug 2019 17:16:20 +0200 Subject: [PATCH 135/202] Rebuilt for Python 3.8 --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 3ccb849..aaad9c9 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.18.0 -Release: 3%{?dist} +Release: 4%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -697,6 +697,9 @@ fi %endif %changelog +* Sat Aug 17 2019 Miro Hrončok - 1.18.0-4 +- Rebuilt for Python 3.8 + * Fri Aug 16 2019 Kevin Fenzi - 1.18.0-3 - Fix pkgsurl/topurl default mistake. From 918daeb2aa3aacc1ea35a81af9a4ebbb3c6727ed Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 17 Sep 2019 15:33:07 -0700 Subject: [PATCH 136/202] Add provides for python3 subpackage. Fixes bug #1750391 --- koji.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index aaad9c9..7659eb1 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.18.0 -Release: 4%{?dist} +Release: 5%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -154,6 +154,9 @@ Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-requests-kerberos Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-six +# Since we don't have metadata here, provide the 'normal' python provides manually. +Provides: python%{python3_version}dist(%{name}) = %{version} +Provides: python%{python3_version_nodots}dist(%{name}) = %{version} %description -n python%{python3_pkgversion}-%{name} desc @@ -697,6 +700,9 @@ fi %endif %changelog +* Tue Sep 17 2019 Kevin Fenzi - 1.18.0-5 +- Add provides for python3 subpackage. Fixes bug #1750391 + * Sat Aug 17 2019 Miro Hrončok - 1.18.0-4 - Rebuilt for Python 3.8 From 65256d98c45262e211e1a794ced83406496de00b Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Wed, 18 Sep 2019 10:12:09 +0200 Subject: [PATCH 137/202] Fix macro added in previous change. --- koji.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index 7659eb1..eadd0c1 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.18.0 -Release: 5%{?dist} +Release: 6%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -156,7 +156,7 @@ Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-six # Since we don't have metadata here, provide the 'normal' python provides manually. Provides: python%{python3_version}dist(%{name}) = %{version} -Provides: python%{python3_version_nodots}dist(%{name}) = %{version} +Provides: python%{python3_pkgversion}dist(%{name}) = %{version} %description -n python%{python3_pkgversion}-%{name} desc @@ -700,6 +700,9 @@ fi %endif %changelog +* Wed Sep 18 2019 Jiri Popelka - 1.18.0-6 +- Fix macro added in previous change. + * Tue Sep 17 2019 Kevin Fenzi - 1.18.0-5 - Add provides for python3 subpackage. Fixes bug #1750391 From ec19005cd4766997ae9436813b05c0c2c2b61619 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 9 Oct 2019 14:19:47 +0200 Subject: [PATCH 138/202] Rebase to koji 1.18.1 for CVE-2019-17109 Signed-off-by: Patrick Uiterwijk --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b8e8a9a..91d64fa 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ koji-1.4.0.tar.bz2 /koji-1.16.2.tar.bz2 /koji-1.17.0.tar.bz2 /koji-1.18.0.tar.bz2 +/koji-1.18.1.tar.bz2 diff --git a/koji.spec b/koji.spec index eadd0c1..8bf5a47 100644 --- a/koji.spec +++ b/koji.spec @@ -78,8 +78,8 @@ %endif Name: koji -Version: 1.18.0 -Release: 6%{?dist} +Version: 1.18.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -700,6 +700,9 @@ fi %endif %changelog +* Wed Oct 09 2019 Patrick Uiterwijk - 1.18.1-1 +- Rebase to 1.18.1 for CVE-2019-17109 + * Wed Sep 18 2019 Jiri Popelka - 1.18.0-6 - Fix macro added in previous change. diff --git a/sources b/sources index 9c7e1c4..7b21f84 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.18.0.tar.bz2) = 6229ddde6b0d792d3a8d71ab5cdf7cbed525d64c58b41e779ceac56ae0608ca2eac1346e86ba2e0ce5d64126cc57a50e6ab89253b2c1862ed6f5ca02e1591f6d +SHA512 (koji-1.18.1.tar.bz2) = db8743cbd10434ec460b97af3e747495f46b3a1e4704957fb1c53a4c15ddbde31845e8eee1b97fcb7e5c030c6c7df510b5d8af960c62d4a0ad7752d6658ee0de From f25cb7cee813957953643fe16e3f6404bec1c453 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Fri, 1 Nov 2019 10:48:56 -0400 Subject: [PATCH 139/202] Rebase to 1.19.0 Signed-off-by: Mohan Boddu --- .gitignore | 1 + koji.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 91d64fa..7040e7e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ koji-1.4.0.tar.bz2 /koji-1.17.0.tar.bz2 /koji-1.18.0.tar.bz2 /koji-1.18.1.tar.bz2 +/koji-1.19.0.tar.bz2 diff --git a/koji.spec b/koji.spec index 8bf5a47..8c21e7e 100644 --- a/koji.spec +++ b/koji.spec @@ -78,7 +78,7 @@ %endif Name: koji -Version: 1.18.1 +Version: 1.19.0 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -700,6 +700,9 @@ fi %endif %changelog +* Fri Nov 01 2019 Mohan Boddu - 1.19.0-1 +- Rebase to 1.19.0 + * Wed Oct 09 2019 Patrick Uiterwijk - 1.18.1-1 - Rebase to 1.18.1 for CVE-2019-17109 diff --git a/sources b/sources index 7b21f84..a46ce91 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.18.1.tar.bz2) = db8743cbd10434ec460b97af3e747495f46b3a1e4704957fb1c53a4c15ddbde31845e8eee1b97fcb7e5c030c6c7df510b5d8af960c62d4a0ad7752d6658ee0de +SHA512 (koji-1.19.0.tar.bz2) = 34a2a6c48a47bb7ef284fd816c37737fba28636342dea887ee1014716228042c8ab15830af01f71150ef561783cbee339abc04bf45beeb36c5e5588b074d5832 From bb9b233e56faade3ca7154e76b4d549bd4717910 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Fri, 1 Nov 2019 11:01:08 -0400 Subject: [PATCH 140/202] Removing 1613.patch file and from spec Now its part of koji 1.19.0 release https://docs.pagure.org/koji/release_notes_1.19/#builder-changes Signed-off-by: Mohan Boddu --- 1613.patch | 76 ------------------------------------------------------ koji.spec | 3 +-- 2 files changed, 1 insertion(+), 78 deletions(-) delete mode 100644 1613.patch diff --git a/1613.patch b/1613.patch deleted file mode 100644 index 29eecef..0000000 --- a/1613.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 88e92b61a4a4eacf5ccd14566ecfa473d6719a8f Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: Aug 13 2019 11:35:14 +0000 -Subject: [PATCH 1/2] Allow builder to attempt krb if gssapi is available - - -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/builder/kojid b/builder/kojid -index 142a440..86af4e5 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -69,6 +69,11 @@ except ImportError: # pragma: no cover - krbV = None - - try: -+ import requests_kerberos -+except ImportError: # pragma: no cover -+ requests_kerberos = None -+ -+try: - import librepo - import io - except ImportError: -@@ -6264,7 +6269,7 @@ if __name__ == "__main__": - quit("Error: Unable to log in. Bad credentials?") - except six.moves.xmlrpc_client.ProtocolError: - quit("Error: Unable to connect to server %s" % (options.server)) -- elif krbV: -+ elif krbV or requests_kerberos: - krb_principal = options.krb_principal - if krb_principal is None: - krb_principal = options.host_principal_format % socket.getfqdn() - -From 8b76e0d1af3b4e6d1faf04cbc9142c277c2cd613 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Aug 13 2019 11:53:16 +0000 -Subject: [PATCH 2/2] fix krbV error handling - - -Fixes: https://pagure.io/koji/issue/1575 - ---- - -diff --git a/builder/kojid b/builder/kojid -index 86af4e5..73c2bf7 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -65,11 +65,13 @@ from koji.util import parseStatus, isSuccess, dslice, dslice_ex, to_list - - try: - import krbV -+ Krb5Error = krbV.Krb5Error - except ImportError: # pragma: no cover - krbV = None - - try: - import requests_kerberos -+ Krb5Error = requests_kerberos.exceptions.RequestException - except ImportError: # pragma: no cover - requests_kerberos = None - -@@ -6277,8 +6279,8 @@ if __name__ == "__main__": - session.krb_login(principal=krb_principal, - keytab=options.keytab, - ccache=options.ccache) -- except krbV.Krb5Error as e: -- quit("Kerberos authentication failed: '%s' (%s)" % (e.args[1], e.args[0])) -+ except Krb5Error as e: -+ quit("Kerberos authentication failed: %s" % e.args) - except socket.error as e: - quit("Could not connect to Kerberos authentication service: '%s'" % e.args[1]) - else: - diff --git a/koji.spec b/koji.spec index 8c21e7e..7959fa4 100644 --- a/koji.spec +++ b/koji.spec @@ -87,8 +87,6 @@ URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Patches already upstream -# Already merged patch to fix kojid kerberos auth -Patch1: https://pagure.io/koji/pull-request/1613.patch # Adjust xz params to favor speed Patch15: https://pagure.io/koji/pull-request/1576.patch @@ -702,6 +700,7 @@ fi %changelog * Fri Nov 01 2019 Mohan Boddu - 1.19.0-1 - Rebase to 1.19.0 +- Removing downstream patch 1613 * Wed Oct 09 2019 Patrick Uiterwijk - 1.18.1-1 - Rebase to 1.18.1 for CVE-2019-17109 From 07894c357677444be496283976687ab4d2945b28 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 1 Nov 2019 15:32:26 -0700 Subject: [PATCH 141/202] Clean up config and spec Signed-off-by: Kevin Fenzi --- fedora-config.patch | 18 +++++------------- koji.spec | 8 +++++++- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/fedora-config.patch b/fedora-config.patch index ccf0275..44b87d7 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,6 +1,6 @@ -diff -Nur koji-1.18.0.orig/cli/koji.conf koji-1.18.0/cli/koji.conf ---- koji-1.18.0.orig/cli/koji.conf 2019-08-09 11:07:07.000000000 -0700 -+++ koji-1.18.0/cli/koji.conf 2019-08-16 08:14:51.834690613 -0700 +diff -Nur koji-1.19.0.orig/cli/koji.conf koji-1.19.0/cli/koji.conf +--- koji-1.19.0.orig/cli/koji.conf 2019-10-30 11:50:10.000000000 -0700 ++++ koji-1.19.0/cli/koji.conf 2019-10-31 18:28:37.518983298 -0700 @@ -4,17 +4,22 @@ ;url of XMLRPC server @@ -13,10 +13,10 @@ diff -Nur koji-1.18.0.orig/cli/koji.conf koji-1.18.0/cli/koji.conf ;url of package download site ;pkgurl = http://www.example.com/packages -+topurl = https://kojipkgs.fedoraproject.org/ ;path to the koji top directory ;topdir = /mnt/koji ++topurl = https://kojipkgs.fedoraproject.org/ ;configuration for Kerberos authentication +authtype = kerberos @@ -24,15 +24,7 @@ diff -Nur koji-1.18.0.orig/cli/koji.conf koji-1.18.0/cli/koji.conf ;the service name of the principal being used by the hub ;krbservice = host -@@ -28,7 +33,6 @@ - ;enable to lookup dns canonical hostname for krb auth - ;krb_canon_host = no - -- - ;configuration for SSL authentication - - ;client certificate -@@ -45,9 +49,14 @@ +@@ -48,9 +53,14 @@ ;[not_implemented_yet] ;enabled plugins for CLI, runroot and save_failed_tree are available ;plugins = diff --git a/koji.spec b/koji.spec index 7959fa4..7ad52ba 100644 --- a/koji.spec +++ b/koji.spec @@ -447,7 +447,7 @@ done make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install # alter python interpreter in koji CLI scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow - %{_sbindir}/koji-gc %{_sbindir}/kojivmd' + %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db' for fn in $scripts ; do sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn done @@ -528,6 +528,11 @@ rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos %dir /etc/koji-hub %config(noreplace) /etc/koji-hub/hub.conf %dir /etc/koji-hub/hub.conf.d +%{_sbindir}/koji-sweep-db +%if %{use_systemd} +%{_unitdir}/koji-sweep-db.service +%{_unitdir}/koji-sweep-db.timer +%endif %if 0%{py2_support} > 1 %files -n python2-%{name}-hub @@ -577,6 +582,7 @@ rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos %{_sbindir}/koji-gc %dir /etc/koji-gc %config(noreplace) /etc/koji-gc/koji-gc.conf +%config(noreplace) /etc/koji-gc/email.tpl %{_sbindir}/koji-shadow %dir /etc/koji-shadow %config(noreplace) /etc/koji-shadow/koji-shadow.conf From 0ff9fe9daeaa67d93b7ad4f6e329addf5a304c91 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 8 Nov 2019 16:16:11 -0800 Subject: [PATCH 142/202] Update to 1.19.1 --- .gitignore | 1 + koji.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7040e7e..016fe84 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ koji-1.4.0.tar.bz2 /koji-1.18.0.tar.bz2 /koji-1.18.1.tar.bz2 /koji-1.19.0.tar.bz2 +/koji-1.19.1.tar.bz2 diff --git a/koji.spec b/koji.spec index 7ad52ba..d3862a9 100644 --- a/koji.spec +++ b/koji.spec @@ -78,7 +78,7 @@ %endif Name: koji -Version: 1.19.0 +Version: 1.19.1 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -704,6 +704,9 @@ fi %endif %changelog +* Fri Nov 08 2019 Kevin Fenzi - 1.19.1-1 +- Update to 1.19.1 + * Fri Nov 01 2019 Mohan Boddu - 1.19.0-1 - Rebase to 1.19.0 - Removing downstream patch 1613 diff --git a/sources b/sources index a46ce91..d0e7901 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.19.0.tar.bz2) = 34a2a6c48a47bb7ef284fd816c37737fba28636342dea887ee1014716228042c8ab15830af01f71150ef561783cbee339abc04bf45beeb36c5e5588b074d5832 +SHA512 (koji-1.19.1.tar.bz2) = 893f4cb69341de62ff5716df0717208980011a2552d396a96736932d7dd76d40ce8ef02a8d9bc7214b8d6e52218a689e9400dfdbaf162b5aa67e60c101c177e6 From 58de821abae29bd44edd1287273f9ccc4ba05af3 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 27 Nov 2019 15:47:27 -0800 Subject: [PATCH 143/202] Add Requires to koji builder on python3-pycdio/pycdio. Fixes bug #1775536 --- koji.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index d3862a9..88acfc2 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.19.1 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -307,10 +307,12 @@ Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} Requires: python%{python3_pkgversion}-librepo Requires: python%{python3_pkgversion}-multilib Requires: python%{python3_pkgversion}-cheetah +Requires: python%{python3_pkgversion}-pycdio %else Requires: python2-%{name} = %{version}-%{release} Requires: python2-multilib Requires: python-cheetah +Requires: pycdio %endif %description builder @@ -704,6 +706,9 @@ fi %endif %changelog +* Wed Nov 27 2019 Kevin Fenzi - 1.19.1-2 +- Add Requires to koji builder on python3-pycdio/pycdio. Fixes bug #1775536 + * Fri Nov 08 2019 Kevin Fenzi - 1.19.1-1 - Update to 1.19.1 From 12274913e09730b99f72a7f1abec54fb72d74fd2 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 20 Jan 2020 09:49:48 -0800 Subject: [PATCH 144/202] Update to 1.20.0. --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 016fe84..36e4f12 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ koji-1.4.0.tar.bz2 /koji-1.18.1.tar.bz2 /koji-1.19.0.tar.bz2 /koji-1.19.1.tar.bz2 +/koji-1.20.0.tar.bz2 diff --git a/koji.spec b/koji.spec index 88acfc2..750a9fc 100644 --- a/koji.spec +++ b/koji.spec @@ -78,8 +78,8 @@ %endif Name: koji -Version: 1.19.1 -Release: 2%{?dist} +Version: 1.20.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -706,6 +706,9 @@ fi %endif %changelog +* Mon Jan 20 2020 Kevin Fenzi - 1.20.0-1 +- Update to 1.20.0. + * Wed Nov 27 2019 Kevin Fenzi - 1.19.1-2 - Add Requires to koji builder on python3-pycdio/pycdio. Fixes bug #1775536 diff --git a/sources b/sources index d0e7901..e0aee8c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.19.1.tar.bz2) = 893f4cb69341de62ff5716df0717208980011a2552d396a96736932d7dd76d40ce8ef02a8d9bc7214b8d6e52218a689e9400dfdbaf162b5aa67e60c101c177e6 +SHA512 (koji-1.20.0.tar.bz2) = 1704d83cc8bba9e8fceac7bb35fa81b049370a74e212d3ba35b26d9d9c9712c7a65846b811a987ec83cbeee17700564662c28a990118627aef788178c07758a3 From 527f3271ee062ec0a6f80113556c4a6f025d6474 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 07:44:12 +0000 Subject: [PATCH 145/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 750a9fc..a7757bd 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.20.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -706,6 +706,9 @@ fi %endif %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 1.20.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Mon Jan 20 2020 Kevin Fenzi - 1.20.0-1 - Update to 1.20.0. From 2e3b46d214f540cff12f7a3ef16670dac6a44c5f Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 6 Mar 2020 10:14:04 -0800 Subject: [PATCH 146/202] Update to 1.20.1 --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 36e4f12..832d190 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ koji-1.4.0.tar.bz2 /koji-1.19.0.tar.bz2 /koji-1.19.1.tar.bz2 /koji-1.20.0.tar.bz2 +/koji-1.20.1.tar.bz2 diff --git a/koji.spec b/koji.spec index a7757bd..ad2e251 100644 --- a/koji.spec +++ b/koji.spec @@ -78,8 +78,8 @@ %endif Name: koji -Version: 1.20.0 -Release: 2%{?dist} +Version: 1.20.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -706,6 +706,9 @@ fi %endif %changelog +* Fri Mar 06 2020 Kevin Fenzi - 1.20.1-1 +- Update to 1.20.1 + * Wed Jan 29 2020 Fedora Release Engineering - 1.20.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index e0aee8c..26775cb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.20.0.tar.bz2) = 1704d83cc8bba9e8fceac7bb35fa81b049370a74e212d3ba35b26d9d9c9712c7a65846b811a987ec83cbeee17700564662c28a990118627aef788178c07758a3 +SHA512 (koji-1.20.1.tar.bz2) = 0c100d4a5b7101bdb839a2946f2623936a83e5108c7e34536769ebbed127e98727b4005a7a75d075b27fb6fe818d9ae8b3b699a3135a166663de195e1890c873 From c6daa97c0fb140ad4b92f4789398b2f6c73c3470 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 21 Apr 2020 10:14:30 -0700 Subject: [PATCH 147/202] Update to 1.21.1. Fixes bug #1826406 --- .gitignore | 1 + koji.spec | 9 +++++---- sources | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 832d190..d767b9a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ koji-1.4.0.tar.bz2 /koji-1.19.1.tar.bz2 /koji-1.20.0.tar.bz2 /koji-1.20.1.tar.bz2 +/koji-1.21.0.tar.bz2 diff --git a/koji.spec b/koji.spec index ad2e251..5f8d8cf 100644 --- a/koji.spec +++ b/koji.spec @@ -78,7 +78,7 @@ %endif Name: koji -Version: 1.20.1 +Version: 1.21.0 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -88,9 +88,6 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Patches already upstream -# Adjust xz params to favor speed -Patch15: https://pagure.io/koji/pull-request/1576.patch - # Not upstreamable Patch100: fedora-config.patch @@ -587,6 +584,7 @@ rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos %config(noreplace) /etc/koji-gc/email.tpl %{_sbindir}/koji-shadow %dir /etc/koji-shadow +%{_sbindir}/koji-sidetag-cleanup %config(noreplace) /etc/koji-shadow/koji-shadow.conf %files web @@ -706,6 +704,9 @@ fi %endif %changelog +* Tue Apr 21 2020 Kevin Fenzi - 1.21.0-1 +- Update to 1.21.1. Fixes bug #1826406 + * Fri Mar 06 2020 Kevin Fenzi - 1.20.1-1 - Update to 1.20.1 diff --git a/sources b/sources index 26775cb..8ea6253 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.20.1.tar.bz2) = 0c100d4a5b7101bdb839a2946f2623936a83e5108c7e34536769ebbed127e98727b4005a7a75d075b27fb6fe818d9ae8b3b699a3135a166663de195e1890c873 +SHA512 (koji-1.21.0.tar.bz2) = ab7a839a668312800d6a3a838bde9664585f9ef9de67f906f3c28f08698f16235e6570dd6aebe1f549c28342bb1c4c6ce8eb7f7f11e7a688f3e00ed9b45bca56 From c611e19cd53bac44a32d53fad71b73a603652ce5 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 30 Apr 2020 11:52:56 -0700 Subject: [PATCH 148/202] Add patch to fix issue with admins not being able to force tagging. Fixes https://pagure.io/koji/issue/2202 upstream. --- 2203.patch | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ koji.spec | 9 +++++++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 2203.patch diff --git a/2203.patch b/2203.patch new file mode 100644 index 0000000..bd6e110 --- /dev/null +++ b/2203.patch @@ -0,0 +1,67 @@ +From ce86d84c87709ea6efa4bbc16fabe593de5b4a66 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Apr 28 2020 08:10:24 +0000 +Subject: [PATCH 1/2] hub: admin can't force tag now + + +Fixes: https://pagure.io/koji/issue/2202 + +--- + +diff --git a/hub/kojihub.py b/hub/kojihub.py +index 960c0c6..9ec9bb8 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -9760,7 +9760,7 @@ def check_policy(name, data, default='deny', strict=False, force=False): + access: True if the policy result is allow, false otherwise + reason: reason for the access + If strict is True, will raise ActionNotAllowed if the action is not 'allow' +- If force is True, policy will pass, but action will be logged ++ If force is True, policy will pass (under admin), but action will be logged + """ + ruleset = context.policy.get(name) + if not ruleset: +@@ -9791,12 +9791,14 @@ def check_policy(name, data, default='deny', strict=False, force=False): + if result != 'deny': + reason = 'error in policy' + logger.error("Invalid action in policy %s, rule: %s", name, lastrule) +- if force and context.session.hasPerm('admin'): +- msg = "Policy %s overriden by force: %s" % (name, context.session.user_data["name"]) +- if reason: +- msg += ": %s" % reason +- logger.info(msg) +- return True, "overriden by force" ++ if force: ++ user = policy_get_user(data) ++ if 'admin' in koji.auth.get_user_perms(user['id']): ++ msg = "Policy %s overriden by force: %s" % (name, user["name"]) ++ if reason: ++ msg += ": %s" % reason ++ logger.info(msg) ++ return True, "overriden by force" + if not strict: + return False, reason + err_str = "policy violation (%s)" % name + +From 8da87dfd42d63d9252117b331223b4a70f517ac6 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Apr 28 2020 14:08:21 +0000 +Subject: [PATCH 2/2] don't traceback on missing user + + +--- + +diff --git a/hub/kojihub.py b/hub/kojihub.py +index 9ec9bb8..92fb389 100644 +--- a/hub/kojihub.py ++++ b/hub/kojihub.py +@@ -9793,7 +9793,7 @@ def check_policy(name, data, default='deny', strict=False, force=False): + logger.error("Invalid action in policy %s, rule: %s", name, lastrule) + if force: + user = policy_get_user(data) +- if 'admin' in koji.auth.get_user_perms(user['id']): ++ if user and 'admin' in koji.auth.get_user_perms(user['id']): + msg = "Policy %s overriden by force: %s" % (name, user["name"]) + if reason: + msg += ": %s" % reason + diff --git a/koji.spec b/koji.spec index 5f8d8cf..f2ede78 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.21.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -87,6 +87,9 @@ URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Patches already upstream +# Patch to allow admin to force tag packages again +# https://pagure.io/koji/issue/2202 +Patch1: https://pagure.io/koji/pull-request/2203.patch # Not upstreamable Patch100: fedora-config.patch @@ -704,6 +707,10 @@ fi %endif %changelog +* Thu Apr 30 2020 Kevin Fenzi - 1.21.0-2 +- Add patch to fix issue with admins not being able to force tagging. +- Fixes https://pagure.io/koji/issue/2202 upstream. + * Tue Apr 21 2020 Kevin Fenzi - 1.21.0-1 - Update to 1.21.1. Fixes bug #1826406 From 348e8d55799df8e6e48ad26ce14293b0dc76ecc5 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 30 Apr 2020 12:13:51 -0700 Subject: [PATCH 149/202] koji-sidetag-cleanup needs to be python2 on el6/python2 only places Signed-off-by: Kevin Fenzi --- koji.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koji.spec b/koji.spec index f2ede78..9cd33a5 100644 --- a/koji.spec +++ b/koji.spec @@ -433,6 +433,8 @@ exit 1 # python2 build %if 0%{py2_support} > 1 make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python2} %{?install_opt} install +# koji-sidetag-cleanup has a python3 shbang, fix for python2 +sed -i 's|#!/usr/bin/python3|#!/usr/bin/python2|' $RPM_BUILD_ROOT/usr/sbin/koji-sidetag-cleanup %else %if 0%{py2_support} for d in koji cli plugins ; do From e4a079255455ea9f45e8a36c96225cc58ea1f4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 24 May 2020 08:23:26 +0200 Subject: [PATCH 150/202] Rebuilt for Python 3.9 --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 9cd33a5..c760845 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.21.0 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -709,6 +709,9 @@ fi %endif %changelog +* Sun May 24 2020 Miro Hrončok - 1.21.0-3 +- Rebuilt for Python 3.9 + * Thu Apr 30 2020 Kevin Fenzi - 1.21.0-2 - Add patch to fix issue with admins not being able to force tagging. - Fixes https://pagure.io/koji/issue/2202 upstream. From cf99b3d9c63fcfc9b51cef5c0c6bb459b9e0b603 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 12 Jun 2020 12:15:04 -0700 Subject: [PATCH 151/202] Update to 1.21.1. (really this time!) --- .gitignore | 1 + 1576.patch | 34 --------------------------- 2203.patch | 67 ------------------------------------------------------ koji.spec | 14 ++++++------ sources | 2 +- 5 files changed, 9 insertions(+), 109 deletions(-) delete mode 100644 1576.patch delete mode 100644 2203.patch diff --git a/.gitignore b/.gitignore index d767b9a..7d4defd 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ koji-1.4.0.tar.bz2 /koji-1.20.0.tar.bz2 /koji-1.20.1.tar.bz2 /koji-1.21.0.tar.bz2 +/koji-1.21.1.tar.bz2 diff --git a/1576.patch b/1576.patch deleted file mode 100644 index 7439d01..0000000 --- a/1576.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ad0da60a380499e7b1ed8ca84ce606b183f79e39 Mon Sep 17 00:00:00 2001 -From: Kevin Fenzi -Date: Jul 19 2019 23:27:30 +0000 -Subject: builder/kojid: revert using only 2 processors for xz compression and lower preset to 6 - - -In c360c791ec24b567a16553dca38b24645dd80a36 we changed xz to use only -2 cpus for compression. That commit notes that xz threads are really -memory hungry. However, preset -9 is many times as memory hungry as -preset -6. If we switch to preset 6, xz compressed artifacts will be -a little bit larger, but will compress (and decompress!) a lot larger. -This is obviously a trade off, but I think lowering the preset and -using more cpus will be a better tradeoff. - -This commit moves xz to preset 6 and using all cpus the builder has. - -Signed-off-by: Kevin Fenzi - ---- - -diff --git a/builder/kojid b/builder/kojid -index 3f84887..09a48a9 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -3989,7 +3989,7 @@ class BaseImageTask(OzImageTask): - 'xz-cp-%s-%s.log' % (format, self.arch)) - log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), - logerror=1) -- cmd = ['/usr/bin/xz', '-z9T2', rawimg] -+ cmd = ['/usr/bin/xz', '-z6T0', rawimg] - conlog = os.path.join(self.workdir, - 'xz-%s-%s.log' % (format, self.arch)) - log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), - diff --git a/2203.patch b/2203.patch deleted file mode 100644 index bd6e110..0000000 --- a/2203.patch +++ /dev/null @@ -1,67 +0,0 @@ -From ce86d84c87709ea6efa4bbc16fabe593de5b4a66 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Apr 28 2020 08:10:24 +0000 -Subject: [PATCH 1/2] hub: admin can't force tag now - - -Fixes: https://pagure.io/koji/issue/2202 - ---- - -diff --git a/hub/kojihub.py b/hub/kojihub.py -index 960c0c6..9ec9bb8 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -9760,7 +9760,7 @@ def check_policy(name, data, default='deny', strict=False, force=False): - access: True if the policy result is allow, false otherwise - reason: reason for the access - If strict is True, will raise ActionNotAllowed if the action is not 'allow' -- If force is True, policy will pass, but action will be logged -+ If force is True, policy will pass (under admin), but action will be logged - """ - ruleset = context.policy.get(name) - if not ruleset: -@@ -9791,12 +9791,14 @@ def check_policy(name, data, default='deny', strict=False, force=False): - if result != 'deny': - reason = 'error in policy' - logger.error("Invalid action in policy %s, rule: %s", name, lastrule) -- if force and context.session.hasPerm('admin'): -- msg = "Policy %s overriden by force: %s" % (name, context.session.user_data["name"]) -- if reason: -- msg += ": %s" % reason -- logger.info(msg) -- return True, "overriden by force" -+ if force: -+ user = policy_get_user(data) -+ if 'admin' in koji.auth.get_user_perms(user['id']): -+ msg = "Policy %s overriden by force: %s" % (name, user["name"]) -+ if reason: -+ msg += ": %s" % reason -+ logger.info(msg) -+ return True, "overriden by force" - if not strict: - return False, reason - err_str = "policy violation (%s)" % name - -From 8da87dfd42d63d9252117b331223b4a70f517ac6 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Apr 28 2020 14:08:21 +0000 -Subject: [PATCH 2/2] don't traceback on missing user - - ---- - -diff --git a/hub/kojihub.py b/hub/kojihub.py -index 9ec9bb8..92fb389 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -9793,7 +9793,7 @@ def check_policy(name, data, default='deny', strict=False, force=False): - logger.error("Invalid action in policy %s, rule: %s", name, lastrule) - if force: - user = policy_get_user(data) -- if 'admin' in koji.auth.get_user_perms(user['id']): -+ if user and 'admin' in koji.auth.get_user_perms(user['id']): - msg = "Policy %s overriden by force: %s" % (name, user["name"]) - if reason: - msg += ": %s" % reason - diff --git a/koji.spec b/koji.spec index c760845..ffb08d6 100644 --- a/koji.spec +++ b/koji.spec @@ -78,8 +78,8 @@ %endif Name: koji -Version: 1.21.0 -Release: 3%{?dist} +Version: 1.21.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -87,9 +87,6 @@ URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Patches already upstream -# Patch to allow admin to force tag packages again -# https://pagure.io/koji/issue/2202 -Patch1: https://pagure.io/koji/pull-request/2203.patch # Not upstreamable Patch100: fedora-config.patch @@ -709,6 +706,9 @@ fi %endif %changelog +* Fri Jun 12 2020 Kevin Fenzi - 1.21.1-1 +- Update to 1.21.1. (really this time!) + * Sun May 24 2020 Miro Hrončok - 1.21.0-3 - Rebuilt for Python 3.9 @@ -717,10 +717,10 @@ fi - Fixes https://pagure.io/koji/issue/2202 upstream. * Tue Apr 21 2020 Kevin Fenzi - 1.21.0-1 -- Update to 1.21.1. Fixes bug #1826406 +- Update to 1.21.0. Fixes bug #1826406 * Fri Mar 06 2020 Kevin Fenzi - 1.20.1-1 -- Update to 1.20.1 +- Update to 1.20.0 * Wed Jan 29 2020 Fedora Release Engineering - 1.20.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 8ea6253..0fc41d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.21.0.tar.bz2) = ab7a839a668312800d6a3a838bde9664585f9ef9de67f906f3c28f08698f16235e6570dd6aebe1f549c28342bb1c4c6ce8eb7f7f11e7a688f3e00ed9b45bca56 +SHA512 (koji-1.21.1.tar.bz2) = d4ff6355acf383e5e55bacc42d22b9071c7fc3236e4d7817c4dadc5fda6516719b92a0269571803090746e9556dbb15f5f92a425452677e01ee2a9a7c53583bf From b8d22a4d9afacc9fabc60e09977b43a19a0e5ed9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 03:34:50 +0000 Subject: [PATCH 152/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index ffb08d6..e4e8864 100644 --- a/koji.spec +++ b/koji.spec @@ -79,7 +79,7 @@ Name: koji Version: 1.21.1 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -706,6 +706,9 @@ fi %endif %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.21.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jun 12 2020 Kevin Fenzi - 1.21.1-1 - Update to 1.21.1. (really this time!) From 542909e396dd38aa6ed71303fad2c40c654f4a63 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sun, 2 Aug 2020 12:19:41 -0700 Subject: [PATCH 153/202] Update to 1.22.0. Remove python2 suppport, move to python3 on everything except epel6/7 --- .gitignore | 1 + koji.spec | 389 ++--------------------------------------------------- sources | 2 +- 3 files changed, 14 insertions(+), 378 deletions(-) diff --git a/.gitignore b/.gitignore index 7d4defd..f491e48 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ koji-1.4.0.tar.bz2 /koji-1.20.1.tar.bz2 /koji-1.21.0.tar.bz2 /koji-1.21.1.tar.bz2 +/koji-1.22.0.tar.bz2 diff --git a/koji.spec b/koji.spec index e4e8864..c378234 100644 --- a/koji.spec +++ b/koji.spec @@ -2,84 +2,14 @@ # https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 %global _python_bytecompile_extra 0 -%bcond_without python2 -%bcond_without python3 - -# We can build varying amounts of Koji for python2 and python3 based on -# the py[23]_support macro values. Valid values are: -# undefined or 0 -- do not build -# 1 -- build just the cli and lib -# 2 -- build everything we can -# For executable scripts, py3 wins if we build it -# The following rules tweak these settings based on options and environment - -# Default to building both fully -%define py2_support 2 -%define py3_support 2 - -%if 0%{?rhel} >= 8 -# and no python2 on rhel8+ -%define py2_support 0 -%else -%if 0%{?rhel} -# No python3 for older rhel -%define py3_support 0 -%endif -%endif - -%if 0%{?fedora} > 30 -# no py2 after F31 -%define py2_support 0 -%define py3_support 2 -%else -# Keep some minimal python2 in f30 for now -%if 0%{?fedora} == 30 -%define py2_support 1 -%define py3_support 2 -%else -%if 0%{?fedora} -# match what the older Fedoras already have -%define py2_support 2 -%define py3_support 1 -%endif -%endif -%endif - -# Lastly enforce the bcond parameters -%if %{without python2} -%define py2_support 0 -%endif -%if %{without python3} -%define py3_support 0 -%endif - -%if ! %{py2_support} -# use python3 %define __python %{__python3} -%endif - -# Compatibility with RHEL. These macros have been added to EPEL but -# not yet to RHEL proper. -# https://bugzilla.redhat.com/show_bug.cgi?id=1307190 -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} -%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} # If the definition isn't available for python3_pkgversion, define it %{?!python3_pkgversion:%global python3_pkgversion 3} -%if 0%{?rhel} && 0%{?rhel} < 7 -%global use_systemd 0 -%global install_opt TYPE=sysv -%else -%global use_systemd 1 -%endif - Name: koji -Version: 1.21.1 -Release: 2%{?dist} +Version: 1.22.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -92,61 +22,24 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 Patch100: fedora-config.patch BuildArch: noarch -%if 0%{py3_support} Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} Requires: python%{python3_pkgversion}-libcomps -%else -Requires: python2-%{name} = %{version}-%{release} -%if 0%{?fedora} || 0%{?rhel} >= 7 Requires: python-libcomps -%endif -%endif -%if %{use_systemd} BuildRequires: systemd BuildRequires: pkgconfig -%endif %description Koji is a system for building and tracking RPMS. The base package contains shared libraries and the command-line interface. -%if 0%{py2_support} -%package -n python2-%{name} -Summary: Build system tools python library -%{?python_provide:%python_provide python2-%{name}} -BuildRequires: python2-devel -%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8 -Requires: python2-rpm -%else -Requires: rpm-python -%endif -Requires: pyOpenSSL -Requires: python-requests -%if 0%{?fedora} >= 23 || 0%{?rhel} >= 7 -Requires: python-requests-kerberos -%else -Requires: python-krbV >= 1.0.13 -%endif -Requires: python-dateutil -Requires: python-six - -%description -n python2-%{name} -desc -%endif - -%if 0%{py3_support} %package -n python%{python3_pkgversion}-%{name} Summary: Build system tools python library %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} BuildRequires: python%{python3_pkgversion}-devel -%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8 Requires: python%{python3_pkgversion}-rpm -%else -Requires: rpm-python%{python3_pkgversion} -%endif Requires: python%{python3_pkgversion}-pyOpenSSL Requires: python%{python3_pkgversion}-requests -Requires: python%{python3_pkgversion}-requests-kerberos +Requires: python%{python3_pkgversion}-requests-gssapi Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-six # Since we don't have metadata here, provide the 'normal' python provides manually. @@ -154,20 +47,9 @@ Provides: python%{python3_version}dist(%{name}) = %{version} Provides: python%{python3_pkgversion}dist(%{name}) = %{version} %description -n python%{python3_pkgversion}-%{name} -desc -%endif +Koji is a system for building and tracking RPMS. +This subpackage provides python functions and libraries. -%if 0%{py2_support} -%package -n python2-%{name}-cli-plugins -Summary: Koji client plugins -License: LGPLv2 -Requires: python2-%{name} = %{version}-%{release} - -%description -n python2-%{name}-cli-plugins -Plugins to the koji command-line interface -%endif - -%if 0%{py3_support} %package -n python%{python3_pkgversion}-%{name}-cli-plugins Summary: Koji client plugins License: LGPLv2 @@ -175,7 +57,6 @@ Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} %description -n python%{python3_pkgversion}-%{name}-cli-plugins Plugins to the koji command-line interface -%endif %package hub Summary: Koji XMLRPC interface @@ -190,43 +71,19 @@ Suggests: python%{python3_pkgversion}-%{name}-hub-plugins %description hub koji-hub is the XMLRPC interface to the koji database -%if 0%{py2_support} > 1 -%package -n python2-%{name}-hub -Summary: Koji XMLRPC interface -License: LGPLv2 and GPLv2 -# rpmdiff lib (from rpmlint) is GPLv2 (only) -Requires: httpd -Requires: mod_wsgi -%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 -Requires: mod_auth_gssapi -%endif -Requires: python-psycopg2 -Requires: python2-%{name} = %{version}-%{release} -# py2 xor py3 -Provides: %{name}-hub-code = %{version}-%{release} - -%description -n python2-%{name}-hub -koji-hub is the XMLRPC interface to the koji database -%endif - -%if 0%{py3_support} > 1 %package -n python%{python3_pkgversion}-%{name}-hub Summary: Koji XMLRPC interface License: LGPLv2 and GPLv2 # rpmdiff lib (from rpmlint) is GPLv2 (only) Requires: httpd Requires: python%{python3_pkgversion}-mod_wsgi -%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 Requires: mod_auth_gssapi -%endif Requires: python%{python3_pkgversion}-psycopg2 Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} -# py2 xor py3 Provides: %{name}-hub-code = %{version}-%{release} %description -n python%{python3_pkgversion}-%{name}-hub koji-hub is the XMLRPC interface to the koji database -%endif %package hub-plugins Summary: Koji hub plugins @@ -239,20 +96,6 @@ Suggests: python%{python3_pkgversion}-%{name}-hub-plugins %description hub-plugins Plugins to the koji XMLRPC interface -%if 0%{py2_support} > 1 -%package -n python2-%{name}-hub-plugins -Summary: Koji hub plugins -License: LGPLv2 -Requires: python2-%{name}-hub = %{version}-%{release} -Requires: python2-qpid-proton -Requires: cpio -Provides: %{name}-hub-plugins-code = %{version}-%{release} - -%description -n python2-%{name}-hub-plugins -Plugins to the koji XMLRPC interface -%endif - -%if 0%{py3_support} > 1 %package -n python%{python3_pkgversion}-%{name}-hub-plugins Summary: Koji hub plugins License: LGPLv2 @@ -263,7 +106,6 @@ Provides: %{name}-hub-plugins-code = %{version}-%{release} %description -n python%{python3_pkgversion}-%{name}-hub-plugins Plugins to the koji XMLRPC interface -%endif %package builder-plugins Summary: Koji builder plugins @@ -276,41 +118,22 @@ Plugins for the koji build daemon %package builder Summary: Koji RPM builder daemon -%if 0%{py3_support} > 1 License: LGPLv2 -%else -License: LGPLv2 and GPLv2+ -#mergerepos (from createrepo) is GPLv2+ -%endif Requires: mock >= 0.9.14 Requires(pre): /usr/sbin/useradd Requires: squashfs-tools -%if %{use_systemd} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -%else -Requires(post): /sbin/chkconfig -Requires(post): /sbin/service -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service -%endif Requires: /usr/bin/cvs Requires: /usr/bin/svn Requires: /usr/bin/git Requires: createrepo_c >= 0.10.0 -%if 0%{py3_support} > 1 Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} Requires: python%{python3_pkgversion}-librepo Requires: python%{python3_pkgversion}-multilib Requires: python%{python3_pkgversion}-cheetah Requires: python%{python3_pkgversion}-pycdio -%else -Requires: python2-%{name} = %{version}-%{release} -Requires: python2-multilib -Requires: python-cheetah -Requires: pycdio -%endif %description builder koji-builder is the daemon that runs on build machines and executes @@ -320,23 +143,11 @@ tasks that come through the Koji system. Summary: Koji virtual machine management daemon License: LGPLv2 Requires: %{name} = %{version}-%{release} -%if %{use_systemd} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -%else -Requires(post): /sbin/chkconfig -Requires(post): /sbin/service -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service -%endif -%if 0%{py3_support} > 1 Requires: python%{python3_pkgversion}-libvirt Requires: python%{python3_pkgversion}-libxml2 -%else -Requires: libvirt-python -Requires: libxml2-python -%endif Requires: /usr/bin/virt-clone Requires: qemu-img @@ -348,16 +159,10 @@ virtual machine. This package is not required for most installations. Summary: Koji Utilities License: LGPLv2 Requires: %{name} = %{version}-%{release} -%if 0%{py3_support} > 1 Requires: python%{python3_pkgversion}-psycopg2 -%else -Requires: python-psycopg2 -%endif -%if %{use_systemd} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -%endif %description utils Utilities for the Koji system @@ -374,29 +179,6 @@ Suggests: python%{python3_pkgversion}-%{name}-web %description web koji-web is a web UI to the Koji system. -%if 0%{py2_support} > 1 -%package -n python2-%{name}-web -Summary: Koji Web UI -License: LGPLv2 -%{?python_provide:%python_provide python2-%{name}-web} -Requires: httpd -Requires: mod_wsgi -%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 -Requires: mod_auth_gssapi -%else -Requires: mod_auth_kerb -Requires: python-krbV >= 1.0.13 -%endif -Requires: python-psycopg2 -Requires: python-cheetah -Requires: python2-%{name} = %{version}-%{release} -Provides: %{name}-web-code = %{version}-%{release} - -%description -n python2-%{name}-web -koji-web is a web UI to the Koji system. -%endif - -%if 0%{py3_support} > 1 %package -n python%{python3_pkgversion}-%{name}-web Summary: Koji Web UI License: LGPLv2 @@ -411,7 +193,6 @@ Provides: %{name}-web-code = %{version}-%{release} %description -n python%{python3_pkgversion}-%{name}-web koji-web is a web UI to the Koji system. -%endif %prep %autosetup -p1 @@ -422,50 +203,14 @@ koji-web is a web UI to the Koji system. %install -%if 0%{py2_support} < 2 && 0%{py3_support} < 2 -echo "At least one python must be built with full support" -exit 1 -%endif - -# python2 build -%if 0%{py2_support} > 1 -make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python2} %{?install_opt} install -# koji-sidetag-cleanup has a python3 shbang, fix for python2 -sed -i 's|#!/usr/bin/python3|#!/usr/bin/python2|' $RPM_BUILD_ROOT/usr/sbin/koji-sidetag-cleanup -%else -%if 0%{py2_support} -for d in koji cli plugins ; do - pushd $d - make DESTDIR=$RPM_BUILD_ROOT KOJI_MINIMAL=1 PYTHON=%{__python2} %{?install_opt} install - popd -done -%endif -%endif - - -# python3 build -%if 0%{py3_support} > 1 make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install # alter python interpreter in koji CLI scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow - %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db' + %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db %{_sbindir}/koji-sidetag-cleanup' for fn in $scripts ; do sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn done -%else -%if 0%{py3_support} -# minimal -for d in koji cli plugins ; do - pushd $d - make DESTDIR=$RPM_BUILD_ROOT KOJI_MINIMAL=1 PYTHON=%{__python3} %{?install_opt} install - popd -done -# alter python interpreter in koji CLI -sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT/usr/bin/koji -%endif -%endif -%if 0%{?fedora} >= 28 # handle extra byte compilation extra_dirs=' %{_prefix}/lib/koji-builder-plugins @@ -473,22 +218,9 @@ extra_dirs=' %{_datadir}/koji-hub %{_datadir}/koji-web/lib/kojiweb %{_datadir}/koji-web/scripts' -%if 0%{py2_support} > 1 -for fn in $extra_dirs ; do - %py_byte_compile %{__python2} %{buildroot}$fn -done -%endif -%if 0%{py3_support} > 1 for fn in $extra_dirs ; do %py_byte_compile %{__python3} %{buildroot}$fn done -%endif -%endif - -%if 0%{py2_support} < 2 -# With no python2 support, remove/do not ship internal mergerepos -rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos -%endif %files %{_bindir}/* @@ -496,33 +228,15 @@ rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos %dir /etc/koji.conf.d %doc docs Authors COPYING LGPL -%if 0%{py2_support} -%files -n python2-%{name} -%{python2_sitelib}/%{name} -%{python2_sitelib}/koji_cli -%endif - -%if 0%{py3_support} %files -n python%{python3_pkgversion}-koji %{python3_sitelib}/%{name} %{python3_sitelib}/koji_cli -%endif -%if 0%{py2_support} -%files -n python2-%{name}-cli-plugins -%{python2_sitelib}/koji_cli_plugins -# we don't have config files for default plugins yet -#%%dir %%{_sysconfdir}/koji/plugins -#%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf -%endif - -%if 0%{py3_support} %files -n python%{python3_pkgversion}-%{name}-cli-plugins %{python3_sitelib}/koji_cli_plugins # we don't have config files for default plugins yet #%%dir %%{_sysconfdir}/koji/plugins #%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf -%endif %files hub %config(noreplace) /etc/httpd/conf.d/kojihub.conf @@ -530,54 +244,33 @@ rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos %config(noreplace) /etc/koji-hub/hub.conf %dir /etc/koji-hub/hub.conf.d %{_sbindir}/koji-sweep-db -%if %{use_systemd} %{_unitdir}/koji-sweep-db.service %{_unitdir}/koji-sweep-db.timer -%endif - -%if 0%{py2_support} > 1 -%files -n python2-%{name}-hub -%{_datadir}/koji-hub/*.py* -%endif -%if 0%{py3_support} > 1 %files -n python%{python3_pkgversion}-%{name}-hub %{_datadir}/koji-hub/*.py %{_datadir}/koji-hub/__pycache__ -%endif %files hub-plugins %dir /etc/koji-hub/plugins %config(noreplace) /etc/koji-hub/plugins/*.conf -%if 0%{py2_support} > 1 -%files -n python2-%{name}-hub-plugins -%{_prefix}/lib/koji-hub-plugins/*.py* -%endif - -%if 0%{py3_support} > 1 %files -n python%{python3_pkgversion}-%{name}-hub-plugins %{_prefix}/lib/koji-hub-plugins/*.py %{_prefix}/lib/koji-hub-plugins/__pycache__ -%endif %files builder-plugins %dir /etc/kojid/plugins %config(noreplace) /etc/kojid/plugins/*.conf %dir %{_prefix}/lib/koji-builder-plugins %{_prefix}/lib/koji-builder-plugins/*.py* -%if 0%{py3_support} > 1 %{_prefix}/lib/koji-builder-plugins/__pycache__ -%endif %files utils %{_sbindir}/kojira -%if %{use_systemd} +%{_unitdir}/koji-gc.service +%{_unitdir}/koji-gc.timer %{_unitdir}/kojira.service -%else -%{_initrddir}/kojira -%config(noreplace) /etc/sysconfig/kojira -%endif %dir /etc/kojira %config(noreplace) /etc/kojira/kojira.conf %{_sbindir}/koji-gc @@ -595,28 +288,12 @@ rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos %config(noreplace) /etc/httpd/conf.d/kojiweb.conf %dir /etc/kojiweb/web.conf.d -%if 0%{py2_support} > 1 -%files -n python2-%{name}-web -%{_datadir}/koji-web -%endif - -%if 0%{py3_support} > 1 %files -n python%{python3_pkgversion}-%{name}-web %{_datadir}/koji-web -%endif %files builder %{_sbindir}/kojid -%if 0%{py2_support} > 1 -%dir %{_libexecdir}/kojid -%{_libexecdir}/kojid/mergerepos -%endif -%if %{use_systemd} %{_unitdir}/kojid.service -%else -%{_initrddir}/kojid -%config(noreplace) /etc/sysconfig/kojid -%endif %dir /etc/kojid %config(noreplace) /etc/kojid/kojid.conf %attr(-,kojibuilder,kojibuilder) /etc/mock/koji @@ -624,8 +301,6 @@ rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos %pre builder /usr/sbin/useradd -r -s /bin/bash -G mock -d /builddir -M kojibuilder 2>/dev/null ||: -%if %{use_systemd} - %post builder %systemd_post kojid.service @@ -635,33 +310,14 @@ rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos %postun builder %systemd_postun kojid.service -%else - -%post builder -/sbin/chkconfig --add kojid - -%preun builder -if [ $1 = 0 ]; then - /sbin/service kojid stop &> /dev/null - /sbin/chkconfig --del kojid -fi -%endif - %files vm %{_sbindir}/kojivmd #dir %%{_datadir}/kojivmd %{_datadir}/kojivmd/kojikamid -%if %{use_systemd} %{_unitdir}/kojivmd.service -%else -%{_initrddir}/kojivmd -%config(noreplace) /etc/sysconfig/kojivmd -%endif %dir /etc/kojivmd %config(noreplace) /etc/kojivmd/kojivmd.conf -%if %{use_systemd} - %post vm %systemd_post kojivmd.service @@ -671,19 +327,6 @@ fi %postun vm %systemd_postun kojivmd.service -%else - -%post vm -/sbin/chkconfig --add kojivmd - -%preun vm -if [ $1 = 0 ]; then - /sbin/service kojivmd stop &> /dev/null - /sbin/chkconfig --del kojivmd -fi - -%if %{use_systemd} - %post utils %systemd_post kojira.service @@ -693,19 +336,11 @@ fi %postun utils %systemd_postun kojira.service -%else -%post utils -/sbin/chkconfig --add kojira -/sbin/service kojira condrestart &> /dev/null || : -%preun utils -if [ $1 = 0 ]; then - /sbin/service kojira stop &> /dev/null || : - /sbin/chkconfig --del kojira -fi -%endif -%endif - %changelog +* Sun Aug 02 2020 Kevin Fenzi - 1.22.0-1 +- Update to 1.22.0. +- Remove python2 suppport, move to python3 on everything except epel6/7 + * Tue Jul 28 2020 Fedora Release Engineering - 1.21.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 0fc41d1..fd9ed95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.21.1.tar.bz2) = d4ff6355acf383e5e55bacc42d22b9071c7fc3236e4d7817c4dadc5fda6516719b92a0269571803090746e9556dbb15f5f92a425452677e01ee2a9a7c53583bf +SHA512 (koji-1.22.0.tar.bz2) = 546c17e5e4051ef1cc7cb49080514fdc354c7204aea3cdeca9666d6f472b5185f817bb0518227e97fcc9a622cd06b930926f01807fdae2cf17270e9cb84cb212 From ce36236096d2649bf010a8c35a3185d89fb48c85 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sun, 2 Aug 2020 12:30:42 -0700 Subject: [PATCH 154/202] Rebase fedora-config.patch Signed-off-by: Kevin Fenzi --- fedora-config.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fedora-config.patch b/fedora-config.patch index 44b87d7..e719706 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,6 +1,6 @@ -diff -Nur koji-1.19.0.orig/cli/koji.conf koji-1.19.0/cli/koji.conf ---- koji-1.19.0.orig/cli/koji.conf 2019-10-30 11:50:10.000000000 -0700 -+++ koji-1.19.0/cli/koji.conf 2019-10-31 18:28:37.518983298 -0700 +diff --color -Nur koji-1.22.0.orig/cli/koji.conf koji-1.22.0/cli/koji.conf +--- koji-1.22.0.orig/cli/koji.conf 2020-07-28 01:17:32.000000000 -0700 ++++ koji-1.22.0/cli/koji.conf 2020-08-02 12:30:01.798455037 -0700 @@ -4,17 +4,22 @@ ;url of XMLRPC server @@ -22,9 +22,9 @@ diff -Nur koji-1.19.0.orig/cli/koji.conf koji-1.19.0/cli/koji.conf +authtype = kerberos +krb_rdns = false - ;the service name of the principal being used by the hub - ;krbservice = host -@@ -48,9 +53,14 @@ + ;the principal to auth as for automated clients + ;principal = client@EXAMPLE.COM +@@ -39,9 +44,14 @@ ;[not_implemented_yet] ;enabled plugins for CLI, runroot and save_failed_tree are available ;plugins = From 1e3519e63464209cb9de63a8f9a962a70f0484bf Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 12 Aug 2020 10:08:35 -0700 Subject: [PATCH 155/202] Change Requires to python3-libcomps, the epel8 one doesn't provide python-libcomps --- koji.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/koji.spec b/koji.spec index c378234..c2a9a68 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.22.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -24,7 +24,7 @@ Patch100: fedora-config.patch BuildArch: noarch Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} Requires: python%{python3_pkgversion}-libcomps -Requires: python-libcomps +Requires: python3-libcomps BuildRequires: systemd BuildRequires: pkgconfig @@ -337,6 +337,9 @@ done %systemd_postun kojira.service %changelog +* Wed Aug 12 2020 Kevin Fenzi - 1.22.0-2 +- Change Requires to python3-libcomps, the epel8 one doesn't provide python-libcomps + * Sun Aug 02 2020 Kevin Fenzi - 1.22.0-1 - Update to 1.22.0. - Remove python2 suppport, move to python3 on everything except epel6/7 From aa86fe9afc71ce88b5e024eb0e60de261a1742e5 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 8 Sep 2020 11:37:39 -0700 Subject: [PATCH 156/202] Update to 1.22.1. Fixes 1876427 --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f491e48..6e6c00e 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ koji-1.4.0.tar.bz2 /koji-1.21.0.tar.bz2 /koji-1.21.1.tar.bz2 /koji-1.22.0.tar.bz2 +/koji-1.22.1.tar.bz2 diff --git a/koji.spec b/koji.spec index c2a9a68..8f96cf1 100644 --- a/koji.spec +++ b/koji.spec @@ -8,8 +8,8 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.22.0 -Release: 2%{?dist} +Version: 1.22.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -337,6 +337,9 @@ done %systemd_postun kojira.service %changelog +* Mon Sep 07 2020 Kevin Fenzi - 1.22.1-1 +- Update to 1.22.1. Fixes 1876427 + * Wed Aug 12 2020 Kevin Fenzi - 1.22.0-2 - Change Requires to python3-libcomps, the epel8 one doesn't provide python-libcomps diff --git a/sources b/sources index fd9ed95..f4efdfc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.22.0.tar.bz2) = 546c17e5e4051ef1cc7cb49080514fdc354c7204aea3cdeca9666d6f472b5185f817bb0518227e97fcc9a622cd06b930926f01807fdae2cf17270e9cb84cb212 +SHA512 (koji-1.22.1.tar.bz2) = 83c086b7bae73a06442921fa1547f5cb501b5bc523016334000eb571c15caa62d69c117c724d7c182672b0f649cf999be943203d84003bd6ff271118828db78f From a5cecee608df5badef14115480b5a34e63a4922e Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 22 Oct 2020 15:25:09 -0700 Subject: [PATCH 157/202] Update to 1.23.0. Fixes bug #1890435 --- .gitignore | 1 + koji.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6e6c00e..2a29778 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ koji-1.4.0.tar.bz2 /koji-1.21.1.tar.bz2 /koji-1.22.0.tar.bz2 /koji-1.22.1.tar.bz2 +/koji-1.23.0.tar.bz2 diff --git a/koji.spec b/koji.spec index 8f96cf1..43dc234 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.22.1 +Version: 1.23.0 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -337,6 +337,9 @@ done %systemd_postun kojira.service %changelog +* Thu Oct 22 2020 Kevin Fenzi - 1.23.0-1 +- Update to 1.23.0. Fixes bug #1890435 + * Mon Sep 07 2020 Kevin Fenzi - 1.22.1-1 - Update to 1.22.1. Fixes 1876427 diff --git a/sources b/sources index f4efdfc..aac8cc4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.22.1.tar.bz2) = 83c086b7bae73a06442921fa1547f5cb501b5bc523016334000eb571c15caa62d69c117c724d7c182672b0f649cf999be943203d84003bd6ff271118828db78f +SHA512 (koji-1.23.0.tar.bz2) = e248e786b7f698da6a60b5fd38514b1bd650ff3009d835452a7e6eb5c9abf77cef6346792ab094be1dd5b965299de0d91eee9c712125d99f5a2546b038ca6095 From 411499aabaa1466581ab1dbc9c53475a52a9257f Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 23 Oct 2020 13:38:18 -0700 Subject: [PATCH 158/202] Fix subpackages that are now sitearch instead of sitelib. Signed-off-by: Kevin Fenzi --- koji.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koji.spec b/koji.spec index 43dc234..7f39f63 100644 --- a/koji.spec +++ b/koji.spec @@ -229,11 +229,11 @@ done %doc docs Authors COPYING LGPL %files -n python%{python3_pkgversion}-koji -%{python3_sitelib}/%{name} -%{python3_sitelib}/koji_cli +%{python3_sitearch}/%{name} +%{python3_sitearch}/koji_cli %files -n python%{python3_pkgversion}-%{name}-cli-plugins -%{python3_sitelib}/koji_cli_plugins +%{python3_sitearch}/koji_cli_plugins # we don't have config files for default plugins yet #%%dir %%{_sysconfdir}/koji/plugins #%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf From 45ed9369f5a54b9e8a4ff7bfa4288a93631193c2 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 30 Nov 2020 19:14:29 -0800 Subject: [PATCH 159/202] Fix 32 bit arm install issue. Fixes bug #1894261 --- 2579.patch | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++ koji.spec | 12 +++-- 2 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 2579.patch diff --git a/2579.patch b/2579.patch new file mode 100644 index 0000000..e4df9f1 --- /dev/null +++ b/2579.patch @@ -0,0 +1,140 @@ +From 66ba134859f268d36af6bfedf8e851959b06dd2d Mon Sep 17 00:00:00 2001 +From: Michal Privoznik +Date: Nov 27 2020 09:00:52 +0000 +Subject: Install into /usr/lib rather than /usr/lib64/ + + +In koji-1.22.0-129-g0ef3c751 I've changed the way how +site-packages directory is obtained. What I did not realize back +then is there can be multilib systems which will not search for +packages in /usr/lib64. But 64bit systems do look into /usr/lib. +Therefore, let's pick the location where both systems work. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1894261 +Fixes: #2578 +https://pagure.io/koji/issue/2578 +Signed-off-by: Michal Privoznik + +--- + +diff --git a/cli/Makefile b/cli/Makefile +index ddaeba3..122a23f 100644 +--- a/cli/Makefile ++++ b/cli/Makefile +@@ -1,7 +1,7 @@ + SUBDIRS=koji_cli + + PACKAGE = $(shell basename `pwd`) +-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) ++PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) + + FILES = koji + +diff --git a/cli/koji_cli/Makefile b/cli/koji_cli/Makefile +index fd66929..62b8b53 100644 +--- a/cli/koji_cli/Makefile ++++ b/cli/koji_cli/Makefile +@@ -1,7 +1,7 @@ + PYFILES = $(wildcard *.py) + + PACKAGE = $(shell basename `pwd`) +-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) ++PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) + + _default: + @echo "nothing to make. try make install" +diff --git a/hub/Makefile b/hub/Makefile +index 6881f63..a44e1c4 100644 +--- a/hub/Makefile ++++ b/hub/Makefile +@@ -1,6 +1,6 @@ + PACKAGE = $(shell basename `pwd`) + PYFILES = $(wildcard *.py) +-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) ++PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) + + SERVERDIR = /usr/share/koji-hub + PYFILES = $(wildcard *.py) +diff --git a/koji.spec b/koji.spec +index 78d1863..7e0b6e7 100644 +--- a/koji.spec ++++ b/koji.spec +@@ -62,7 +62,7 @@ + # not yet to RHEL proper. + # https://bugzilla.redhat.com/show_bug.cgi?id=1307190 + %{!?__python2: %global __python2 /usr/bin/python2} +-%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} ++%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} + %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} + %{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} + %{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} +@@ -451,19 +451,19 @@ rm -rf $RPM_BUILD_ROOT + + %if 0%{py2_support} + %files -n python2-%{name} +-%{python2_sitearch}/%{name} +-%{python2_sitearch}/koji_cli ++%{python2_sitelib}/%{name} ++%{python2_sitelib}/koji_cli + %endif + + %if 0%{py3_support} + %files -n python%{python3_pkgversion}-koji +-%{python3_sitearch}/%{name} +-%{python3_sitearch}/koji_cli ++%{python3_sitelib}/%{name} ++%{python3_sitelib}/koji_cli + %endif + + %if 0%{py2_support} + %files -n python2-%{name}-cli-plugins +-%{python2_sitearch}/koji_cli_plugins ++%{python2_sitelib}/koji_cli_plugins + # we don't have config files for default plugins yet + #%%dir %%{_sysconfdir}/koji/plugins + #%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf +@@ -471,7 +471,7 @@ rm -rf $RPM_BUILD_ROOT + + %if 0%{py3_support} + %files -n python%{python3_pkgversion}-%{name}-cli-plugins +-%{python3_sitearch}/koji_cli_plugins ++%{python3_sitelib}/koji_cli_plugins + # we don't have config files for default plugins yet + #%%dir %%{_sysconfdir}/koji/plugins + #%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf +diff --git a/koji/Makefile b/koji/Makefile +index 2b6f3d4..0064cdd 100644 +--- a/koji/Makefile ++++ b/koji/Makefile +@@ -2,7 +2,7 @@ PACKAGE = $(shell basename `pwd`) + PYFILES = $(wildcard *.py) + PYSCRIPTS = + SUBDIRS = +-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) ++PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) + + _default: + @echo "nothing to make. try make install" +diff --git a/plugins/Makefile b/plugins/Makefile +index 10f71e2..6ea1d2a 100644 +--- a/plugins/Makefile ++++ b/plugins/Makefile +@@ -1,4 +1,4 @@ +-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) ++PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) + + CLIPLUGINDIR = $(PKGDIR)/koji_cli_plugins + HUBPLUGINDIR = /usr/lib/koji-hub-plugins +diff --git a/www/lib/kojiweb/Makefile b/www/lib/kojiweb/Makefile +index 8ea3759..5fa67c0 100644 +--- a/www/lib/kojiweb/Makefile ++++ b/www/lib/kojiweb/Makefile +@@ -1,6 +1,6 @@ + PACKAGE = $(shell basename `pwd`) + PYFILES = $(wildcard *.py) +-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) ++PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) + + SERVERDIR = /kojiweb + FILES = $(wildcard *.py *.chtml) + diff --git a/koji.spec b/koji.spec index 7f39f63..4c94246 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.23.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -17,6 +17,7 @@ URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Patches already upstream +Patch1: https://pagure.io/koji/pull-request/2579.patch # Not upstreamable Patch100: fedora-config.patch @@ -229,11 +230,11 @@ done %doc docs Authors COPYING LGPL %files -n python%{python3_pkgversion}-koji -%{python3_sitearch}/%{name} -%{python3_sitearch}/koji_cli +%{python3_sitelib}/%{name} +%{python3_sitelib}/koji_cli %files -n python%{python3_pkgversion}-%{name}-cli-plugins -%{python3_sitearch}/koji_cli_plugins +%{python3_sitelib}/koji_cli_plugins # we don't have config files for default plugins yet #%%dir %%{_sysconfdir}/koji/plugins #%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf @@ -337,6 +338,9 @@ done %systemd_postun kojira.service %changelog +* Mon Nov 30 2020 Kevin Fenzi - 1.23.0-2 +- Fix 32 bit arm install issue. Fixes bug #1894261 + * Thu Oct 22 2020 Kevin Fenzi - 1.23.0-1 - Update to 1.23.0. Fixes bug #1890435 From 05e377d823de2838b28b2d1527e2e282b1cc68ad Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 4 Jan 2021 22:49:49 +0000 Subject: [PATCH 160/202] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- koji.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/koji.spec b/koji.spec index 4c94246..e7a719d 100644 --- a/koji.spec +++ b/koji.spec @@ -37,6 +37,7 @@ contains shared libraries and the command-line interface. Summary: Build system tools python library %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: make Requires: python%{python3_pkgversion}-rpm Requires: python%{python3_pkgversion}-pyOpenSSL Requires: python%{python3_pkgversion}-requests From 42c9f507be4a9fe423be5ae818fb8d284ffccf5e Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 17 Jan 2021 09:34:19 +0100 Subject: [PATCH 161/202] Fixup compatibility of kojid with koji-hub 1.21 Signed-off-by: Igor Raits --- 2649.patch | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ koji.spec | 6 +++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 2649.patch diff --git a/2649.patch b/2649.patch new file mode 100644 index 0000000..536e8e0 --- /dev/null +++ b/2649.patch @@ -0,0 +1,51 @@ +From 7675881c5481d7157c64c6a2a008fac7fbf5c495 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Jan 15 2021 11:56:31 +0000 +Subject: [PATCH 1/2] kojid: backward compatible hub call + + +Fixes: https://pagure.io/koji/issue/2648 + +--- + +diff --git a/builder/kojid b/builder/kojid +index 7f4557a..ca33a00 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -1328,7 +1328,12 @@ class BuildArchTask(BaseBuildTask): + weight is scaled from a minimum of 1.5 to a maximum of 6, based on + the average duration of a build of this package. + """ +- avg = self.session.getAverageBuildDuration(name, age=6) ++ try: ++ avg = self.session.getAverageBuildDuration(name, age=6) ++ except ParameterError: ++ # for hub < 1.23 ++ avg = self.session.getAverageBuildDuration(name) ++ + if not avg: + return + if avg < 0: + +From a53aa56b87a569ccb8eb3173f7eddfe86b2dfea2 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Jan 15 2021 15:23:44 +0000 +Subject: [PATCH 2/2] typo + + +--- + +diff --git a/builder/kojid b/builder/kojid +index ca33a00..b503405 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -1330,7 +1330,7 @@ class BuildArchTask(BaseBuildTask): + """ + try: + avg = self.session.getAverageBuildDuration(name, age=6) +- except ParameterError: ++ except koji.ParameterError: + # for hub < 1.23 + avg = self.session.getAverageBuildDuration(name) + + diff --git a/koji.spec b/koji.spec index e7a719d..169a3ae 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.23.0 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -18,6 +18,7 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Patches already upstream Patch1: https://pagure.io/koji/pull-request/2579.patch +Patch2: https://pagure.io/koji/pull-request/2649.patch # Not upstreamable Patch100: fedora-config.patch @@ -339,6 +340,9 @@ done %systemd_postun kojira.service %changelog +* Sun Jan 17 2021 Igor Raits - 1.23.0-3 +- Fixup compatibility of kojid with koji-hub 1.21 + * Mon Nov 30 2020 Kevin Fenzi - 1.23.0-2 - Fix 32 bit arm install issue. Fixes bug #1894261 From f8d22b86b0bb645f90c4dda89a406bbaaa457e11 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 16:01:31 +0000 Subject: [PATCH 162/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 169a3ae..5383856 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.23.0 -Release: 3%{?dist} +Release: 4%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -340,6 +340,9 @@ done %systemd_postun kojira.service %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 1.23.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sun Jan 17 2021 Igor Raits - 1.23.0-3 - Fixup compatibility of kojid with koji-hub 1.21 From 0782ee11d60547ff688e1ef52f41b0f4e5bf646f Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 28 Jan 2021 14:26:08 -0800 Subject: [PATCH 163/202] Update to 1.23.1. Fixes rhbz#1917340 --- .gitignore | 1 + 2579.patch | 140 ----------------------------------------------------- 2649.patch | 51 ------------------- koji.spec | 11 ++--- sources | 2 +- 5 files changed, 7 insertions(+), 198 deletions(-) delete mode 100644 2579.patch delete mode 100644 2649.patch diff --git a/.gitignore b/.gitignore index 2a29778..0c3134d 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ koji-1.4.0.tar.bz2 /koji-1.22.0.tar.bz2 /koji-1.22.1.tar.bz2 /koji-1.23.0.tar.bz2 +/koji-1.23.1.tar.bz2 diff --git a/2579.patch b/2579.patch deleted file mode 100644 index e4df9f1..0000000 --- a/2579.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 66ba134859f268d36af6bfedf8e851959b06dd2d Mon Sep 17 00:00:00 2001 -From: Michal Privoznik -Date: Nov 27 2020 09:00:52 +0000 -Subject: Install into /usr/lib rather than /usr/lib64/ - - -In koji-1.22.0-129-g0ef3c751 I've changed the way how -site-packages directory is obtained. What I did not realize back -then is there can be multilib systems which will not search for -packages in /usr/lib64. But 64bit systems do look into /usr/lib. -Therefore, let's pick the location where both systems work. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1894261 -Fixes: #2578 -https://pagure.io/koji/issue/2578 -Signed-off-by: Michal Privoznik - ---- - -diff --git a/cli/Makefile b/cli/Makefile -index ddaeba3..122a23f 100644 ---- a/cli/Makefile -+++ b/cli/Makefile -@@ -1,7 +1,7 @@ - SUBDIRS=koji_cli - - PACKAGE = $(shell basename `pwd`) --PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) -+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) - - FILES = koji - -diff --git a/cli/koji_cli/Makefile b/cli/koji_cli/Makefile -index fd66929..62b8b53 100644 ---- a/cli/koji_cli/Makefile -+++ b/cli/koji_cli/Makefile -@@ -1,7 +1,7 @@ - PYFILES = $(wildcard *.py) - - PACKAGE = $(shell basename `pwd`) --PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) -+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) - - _default: - @echo "nothing to make. try make install" -diff --git a/hub/Makefile b/hub/Makefile -index 6881f63..a44e1c4 100644 ---- a/hub/Makefile -+++ b/hub/Makefile -@@ -1,6 +1,6 @@ - PACKAGE = $(shell basename `pwd`) - PYFILES = $(wildcard *.py) --PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) -+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) - - SERVERDIR = /usr/share/koji-hub - PYFILES = $(wildcard *.py) -diff --git a/koji.spec b/koji.spec -index 78d1863..7e0b6e7 100644 ---- a/koji.spec -+++ b/koji.spec -@@ -62,7 +62,7 @@ - # not yet to RHEL proper. - # https://bugzilla.redhat.com/show_bug.cgi?id=1307190 - %{!?__python2: %global __python2 /usr/bin/python2} --%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} - %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} - %{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} - %{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} -@@ -451,19 +451,19 @@ rm -rf $RPM_BUILD_ROOT - - %if 0%{py2_support} - %files -n python2-%{name} --%{python2_sitearch}/%{name} --%{python2_sitearch}/koji_cli -+%{python2_sitelib}/%{name} -+%{python2_sitelib}/koji_cli - %endif - - %if 0%{py3_support} - %files -n python%{python3_pkgversion}-koji --%{python3_sitearch}/%{name} --%{python3_sitearch}/koji_cli -+%{python3_sitelib}/%{name} -+%{python3_sitelib}/koji_cli - %endif - - %if 0%{py2_support} - %files -n python2-%{name}-cli-plugins --%{python2_sitearch}/koji_cli_plugins -+%{python2_sitelib}/koji_cli_plugins - # we don't have config files for default plugins yet - #%%dir %%{_sysconfdir}/koji/plugins - #%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf -@@ -471,7 +471,7 @@ rm -rf $RPM_BUILD_ROOT - - %if 0%{py3_support} - %files -n python%{python3_pkgversion}-%{name}-cli-plugins --%{python3_sitearch}/koji_cli_plugins -+%{python3_sitelib}/koji_cli_plugins - # we don't have config files for default plugins yet - #%%dir %%{_sysconfdir}/koji/plugins - #%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf -diff --git a/koji/Makefile b/koji/Makefile -index 2b6f3d4..0064cdd 100644 ---- a/koji/Makefile -+++ b/koji/Makefile -@@ -2,7 +2,7 @@ PACKAGE = $(shell basename `pwd`) - PYFILES = $(wildcard *.py) - PYSCRIPTS = - SUBDIRS = --PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) -+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) - - _default: - @echo "nothing to make. try make install" -diff --git a/plugins/Makefile b/plugins/Makefile -index 10f71e2..6ea1d2a 100644 ---- a/plugins/Makefile -+++ b/plugins/Makefile -@@ -1,4 +1,4 @@ --PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) -+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) - - CLIPLUGINDIR = $(PKGDIR)/koji_cli_plugins - HUBPLUGINDIR = /usr/lib/koji-hub-plugins -diff --git a/www/lib/kojiweb/Makefile b/www/lib/kojiweb/Makefile -index 8ea3759..5fa67c0 100644 ---- a/www/lib/kojiweb/Makefile -+++ b/www/lib/kojiweb/Makefile -@@ -1,6 +1,6 @@ - PACKAGE = $(shell basename `pwd`) - PYFILES = $(wildcard *.py) --PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE) -+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE) - - SERVERDIR = /kojiweb - FILES = $(wildcard *.py *.chtml) - diff --git a/2649.patch b/2649.patch deleted file mode 100644 index 536e8e0..0000000 --- a/2649.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 7675881c5481d7157c64c6a2a008fac7fbf5c495 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Jan 15 2021 11:56:31 +0000 -Subject: [PATCH 1/2] kojid: backward compatible hub call - - -Fixes: https://pagure.io/koji/issue/2648 - ---- - -diff --git a/builder/kojid b/builder/kojid -index 7f4557a..ca33a00 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -1328,7 +1328,12 @@ class BuildArchTask(BaseBuildTask): - weight is scaled from a minimum of 1.5 to a maximum of 6, based on - the average duration of a build of this package. - """ -- avg = self.session.getAverageBuildDuration(name, age=6) -+ try: -+ avg = self.session.getAverageBuildDuration(name, age=6) -+ except ParameterError: -+ # for hub < 1.23 -+ avg = self.session.getAverageBuildDuration(name) -+ - if not avg: - return - if avg < 0: - -From a53aa56b87a569ccb8eb3173f7eddfe86b2dfea2 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Jan 15 2021 15:23:44 +0000 -Subject: [PATCH 2/2] typo - - ---- - -diff --git a/builder/kojid b/builder/kojid -index ca33a00..b503405 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -1330,7 +1330,7 @@ class BuildArchTask(BaseBuildTask): - """ - try: - avg = self.session.getAverageBuildDuration(name, age=6) -- except ParameterError: -+ except koji.ParameterError: - # for hub < 1.23 - avg = self.session.getAverageBuildDuration(name) - - diff --git a/koji.spec b/koji.spec index 5383856..d866a0d 100644 --- a/koji.spec +++ b/koji.spec @@ -8,18 +8,14 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.23.0 -Release: 4%{?dist} +Version: 1.23.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# Patches already upstream -Patch1: https://pagure.io/koji/pull-request/2579.patch -Patch2: https://pagure.io/koji/pull-request/2649.patch - # Not upstreamable Patch100: fedora-config.patch @@ -340,6 +336,9 @@ done %systemd_postun kojira.service %changelog +* Thu Jan 28 2021 Kevin Fenzi - 1.23.1-1 +- Update to 1.23.1. Fixes rhbz#1917340 + * Tue Jan 26 2021 Fedora Release Engineering - 1.23.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index aac8cc4..f329f94 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.23.0.tar.bz2) = e248e786b7f698da6a60b5fd38514b1bd650ff3009d835452a7e6eb5c9abf77cef6346792ab094be1dd5b965299de0d91eee9c712125d99f5a2546b038ca6095 +SHA512 (koji-1.23.1.tar.bz2) = ccc9bf93e14e26f575f9b4e3a236e04506331e0391c5f11f710ef29f77a1160a59e740b8d2373f6814f434d451cd62a620d88cf362f5cec9e5c485e3552b2a19 From 05b2cc576651906ad93ecf35c75e2cdbcbc48f76 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 18 Feb 2021 14:02:35 -0800 Subject: [PATCH 164/202] Update to 1.24.0. Fixes rhbz#1930032 --- .gitignore | 1 + koji.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0c3134d..1aed85d 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ koji-1.4.0.tar.bz2 /koji-1.22.1.tar.bz2 /koji-1.23.0.tar.bz2 /koji-1.23.1.tar.bz2 +/koji-1.24.0.tar.bz2 diff --git a/koji.spec b/koji.spec index d866a0d..f311a5c 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.23.1 +Version: 1.24.0 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -336,6 +336,9 @@ done %systemd_postun kojira.service %changelog +* Thu Feb 18 2021 Kevin Fenzi - 1.24.0-1 +- Update to 1.24.0. Fixes rhbz#1930032 + * Thu Jan 28 2021 Kevin Fenzi - 1.23.1-1 - Update to 1.23.1. Fixes rhbz#1917340 diff --git a/sources b/sources index f329f94..8d9a25e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.23.1.tar.bz2) = ccc9bf93e14e26f575f9b4e3a236e04506331e0391c5f11f710ef29f77a1160a59e740b8d2373f6814f434d451cd62a620d88cf362f5cec9e5c485e3552b2a19 +SHA512 (koji-1.24.0.tar.bz2) = 42453ec35b2ce8e040d5f3bff1fce751c8d4505073e7e5fdfafb1a26cf4fccac75a78a26ef536fb3e81e43a96cd82acfd17b6a4e26d1243368697071786409bd From 4c825cb174a8cd6752ba46f4a0632da38600b444 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 13 Apr 2021 17:49:47 -0700 Subject: [PATCH 165/202] Update to 1.24.1. Fixes rhbz#1948545 --- .gitignore | 1 + ...a1eda8d178e033fb68ee8cd01df95e2c1452.patch | 28 +++++++++++++++++++ koji.spec | 9 ++++-- sources | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch diff --git a/.gitignore b/.gitignore index 1aed85d..838e5bb 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ koji-1.4.0.tar.bz2 /koji-1.23.0.tar.bz2 /koji-1.23.1.tar.bz2 /koji-1.24.0.tar.bz2 +/koji-1.24.1.tar.bz2 diff --git a/482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch b/482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch new file mode 100644 index 0000000..54838d8 --- /dev/null +++ b/482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch @@ -0,0 +1,28 @@ +From 482ea1eda8d178e033fb68ee8cd01df95e2c1452 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Apr 06 2021 11:38:13 +0000 +Subject: PR#2799: kojid.conf: fix linewrapped comment + + +Merges #2799 +https://pagure.io/koji/pull-request/2799 + +Fixes: #2800 +https://pagure.io/koji/issue/2800 + kojid.conf: fix linewrapped comment + +--- + +diff --git a/builder/kojid.conf b/builder/kojid.conf +index bc4b297..1ce0f18 100644 +--- a/builder/kojid.conf ++++ b/builder/kojid.conf +@@ -136,6 +136,5 @@ from_addr=Koji Build System + ;none of these is enabled by default + ;plugin = + +-;path where builder plugins are located, there could be multiple paths delimited +-by : ++;path where builder plugins are located, there could be multiple paths delimited by : + ;pluginpath = /usr/lib/koji-builder-plugins + diff --git a/koji.spec b/koji.spec index f311a5c..d8bc907 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.24.0 +Version: 1.24.1 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -16,6 +16,9 @@ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +# already upstream patch to fix a line wrap problem in kojid.conf +Patch1: https://pagure.io/koji/c/482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch + # Not upstreamable Patch100: fedora-config.patch @@ -36,7 +39,6 @@ Summary: Build system tools python library BuildRequires: python%{python3_pkgversion}-devel BuildRequires: make Requires: python%{python3_pkgversion}-rpm -Requires: python%{python3_pkgversion}-pyOpenSSL Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-requests-gssapi Requires: python%{python3_pkgversion}-dateutil @@ -336,6 +338,9 @@ done %systemd_postun kojira.service %changelog +* Tue Apr 13 2021 Kevin Fenzi - 1.24.1-1 +- Update to 1.24.1. Fixes rhbz#1948545 + * Thu Feb 18 2021 Kevin Fenzi - 1.24.0-1 - Update to 1.24.0. Fixes rhbz#1930032 diff --git a/sources b/sources index 8d9a25e..a0a3006 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.24.0.tar.bz2) = 42453ec35b2ce8e040d5f3bff1fce751c8d4505073e7e5fdfafb1a26cf4fccac75a78a26ef536fb3e81e43a96cd82acfd17b6a4e26d1243368697071786409bd +SHA512 (koji-1.24.1.tar.bz2) = a22bf26e261afad5778b252d71dfe1c59bee014e7c85028a1db6a2616cc6d8b54651b6a36e34fe55360ed554d74dfd906316c1f04eef8e7bbde752b72675d6b4 From fc701422a5426d3bab7b960f696da5eaf05bd9ad Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Mon, 19 Apr 2021 13:18:31 +0200 Subject: [PATCH 166/202] BuildRequire setuptools explicitly See https://fedoraproject.org/wiki/Changes/Reduce_dependencies_on_python3-setuptools --- koji.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/koji.spec b/koji.spec index d8bc907..c4e65a2 100644 --- a/koji.spec +++ b/koji.spec @@ -37,6 +37,7 @@ contains shared libraries and the command-line interface. Summary: Build system tools python library %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: make Requires: python%{python3_pkgversion}-rpm Requires: python%{python3_pkgversion}-requests From a04a71b6c405d454311d1cab838062df46872d13 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 20 May 2021 16:11:42 -0700 Subject: [PATCH 167/202] Update to 1.25.0. Fixes rhbz#1962636 --- .gitignore | 1 + ...a1eda8d178e033fb68ee8cd01df95e2c1452.patch | 28 ------------------- koji.spec | 8 +++--- sources | 2 +- 4 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch diff --git a/.gitignore b/.gitignore index 838e5bb..50ca8ad 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ koji-1.4.0.tar.bz2 /koji-1.23.1.tar.bz2 /koji-1.24.0.tar.bz2 /koji-1.24.1.tar.bz2 +/koji-1.25.0.tar.bz2 diff --git a/482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch b/482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch deleted file mode 100644 index 54838d8..0000000 --- a/482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 482ea1eda8d178e033fb68ee8cd01df95e2c1452 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Apr 06 2021 11:38:13 +0000 -Subject: PR#2799: kojid.conf: fix linewrapped comment - - -Merges #2799 -https://pagure.io/koji/pull-request/2799 - -Fixes: #2800 -https://pagure.io/koji/issue/2800 - kojid.conf: fix linewrapped comment - ---- - -diff --git a/builder/kojid.conf b/builder/kojid.conf -index bc4b297..1ce0f18 100644 ---- a/builder/kojid.conf -+++ b/builder/kojid.conf -@@ -136,6 +136,5 @@ from_addr=Koji Build System - ;none of these is enabled by default - ;plugin = - --;path where builder plugins are located, there could be multiple paths delimited --by : -+;path where builder plugins are located, there could be multiple paths delimited by : - ;pluginpath = /usr/lib/koji-builder-plugins - diff --git a/koji.spec b/koji.spec index c4e65a2..70c8352 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.24.1 +Version: 1.25.0 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -16,9 +16,6 @@ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# already upstream patch to fix a line wrap problem in kojid.conf -Patch1: https://pagure.io/koji/c/482ea1eda8d178e033fb68ee8cd01df95e2c1452.patch - # Not upstreamable Patch100: fedora-config.patch @@ -339,6 +336,9 @@ done %systemd_postun kojira.service %changelog +* Thu May 20 2021 Kevin Fenzi - 1.25.0-1 +- Update to 1.25.0. Fixes rhbz#1962636 + * Tue Apr 13 2021 Kevin Fenzi - 1.24.1-1 - Update to 1.24.1. Fixes rhbz#1948545 diff --git a/sources b/sources index a0a3006..0275da1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.24.1.tar.bz2) = a22bf26e261afad5778b252d71dfe1c59bee014e7c85028a1db6a2616cc6d8b54651b6a36e34fe55360ed554d74dfd906316c1f04eef8e7bbde752b72675d6b4 +SHA512 (koji-1.25.0.tar.bz2) = db654b5ee8c4922c93aed6298c1967d4a01520197d1b7e052b3fbd8531deb881b08d18f804e0b54c495d8a5aa49bc574c4b41b56818ec867b40335cc9383b21c From 5768ee4553e534d7b88f857864b92c9a57dacf4d Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 10:58:33 +0200 Subject: [PATCH 168/202] Rebuilt for Python 3.10 --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 70c8352..69f40cb 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.25.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -336,6 +336,9 @@ done %systemd_postun kojira.service %changelog +* Fri Jun 04 2021 Python Maint - 1.25.0-2 +- Rebuilt for Python 3.10 + * Thu May 20 2021 Kevin Fenzi - 1.25.0-1 - Update to 1.25.0. Fixes rhbz#1962636 From 9ccfaff35caf03fba649bf4ab62378364ad9234c Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Tue, 15 Jun 2021 19:25:59 +0200 Subject: [PATCH 169/202] Python egginfo. Fixes rhbz#1968618 --- koji.spec | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/koji.spec b/koji.spec index 69f40cb..4643d42 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.25.0 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -25,6 +25,7 @@ Requires: python%{python3_pkgversion}-libcomps Requires: python3-libcomps BuildRequires: systemd BuildRequires: pkgconfig +BuildRequires: sed %description Koji is a system for building and tracking RPMS. The base package @@ -36,6 +37,8 @@ Summary: Build system tools python library BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: make +BuildRequires: python3-pip +BuildRequires: python3-wheel Requires: python%{python3_pkgversion}-rpm Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-requests-gssapi @@ -195,17 +198,27 @@ koji-web is a web UI to the Koji system. %prep %autosetup -p1 - +# we'll be packaging these separately and don't want them registered +# to the wheel we will produce. +sed -e '/util\/koji/g' -e '/koji_cli_plugins/g' -i setup.py %build -# Nothing to build - +%py3_build_wheel %install -make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install +%py3_install_wheel %{name}-%{version}-py3-none-any.whl +mkdir -p %{buildroot}/etc/koji.conf.d +cp cli/koji.conf %{buildroot}/etc/koji.conf +for D in hub builder plugins util www vm ; do + pushd $D + make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install + popd +done + # alter python interpreter in koji CLI scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow - %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db %{_sbindir}/koji-sidetag-cleanup' + %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db + %{_sbindir}/koji-sidetag-cleanup' for fn in $scripts ; do sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn done @@ -229,6 +242,7 @@ done %files -n python%{python3_pkgversion}-koji %{python3_sitelib}/%{name} +%{python3_sitelib}/%{name}-%{version}.*-info %{python3_sitelib}/koji_cli %files -n python%{python3_pkgversion}-%{name}-cli-plugins @@ -336,6 +350,9 @@ done %systemd_postun kojira.service %changelog +* Tue Jun 15 2021 Jiri Popelka - 1.25.0-3 +- Python egginfo. Fixes rhbz#1968618 + * Fri Jun 04 2021 Python Maint - 1.25.0-2 - Rebuilt for Python 3.10 From 1240172210441c618eeafb10961ff404b694331d Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 1 Jul 2021 16:29:20 -0700 Subject: [PATCH 170/202] Update to 1.25.1. Fixes rhbz#1978116 --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 50ca8ad..06397a7 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ koji-1.4.0.tar.bz2 /koji-1.24.0.tar.bz2 /koji-1.24.1.tar.bz2 /koji-1.25.0.tar.bz2 +/koji-1.25.1.tar.bz2 diff --git a/koji.spec b/koji.spec index 4643d42..125f0d3 100644 --- a/koji.spec +++ b/koji.spec @@ -8,8 +8,8 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.25.0 -Release: 3%{?dist} +Version: 1.25.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -350,6 +350,9 @@ done %systemd_postun kojira.service %changelog +* Thu Jul 01 2021 Kevin Fenzi - 1.25.1-1 +- Update to 1.25.1. Fixes rhbz#1978116 + * Tue Jun 15 2021 Jiri Popelka - 1.25.0-3 - Python egginfo. Fixes rhbz#1968618 diff --git a/sources b/sources index 0275da1..471513a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.25.0.tar.bz2) = db654b5ee8c4922c93aed6298c1967d4a01520197d1b7e052b3fbd8531deb881b08d18f804e0b54c495d8a5aa49bc574c4b41b56818ec867b40335cc9383b21c +SHA512 (koji-1.25.1.tar.bz2) = f64811f3dd9f27307c39cda0d6c20cb1513c03340db8ff54917a4fdf7a66b39a7d14ba41fd974c037ead4c0d49cb3a95c162f20b66ebd7f84563c0ef748d6961 From 52ed9eab641ca8f33347144d2795a2df26c1a8d9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 10:17:21 +0000 Subject: [PATCH 171/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 125f0d3..dc81c2c 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.25.1 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -350,6 +350,9 @@ done %systemd_postun kojira.service %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 1.25.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jul 01 2021 Kevin Fenzi - 1.25.1-1 - Update to 1.25.1. Fixes rhbz#1978116 From ff19c03359cc8b9ec683534d7d75d88418c540a6 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 25 Aug 2021 12:10:51 -0700 Subject: [PATCH 172/202] Update to 1.26.0. Fixes rhbz#1996614 --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 06397a7..393ed0f 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ koji-1.4.0.tar.bz2 /koji-1.24.1.tar.bz2 /koji-1.25.0.tar.bz2 /koji-1.25.1.tar.bz2 +/koji-1.26.0.tar.bz2 diff --git a/koji.spec b/koji.spec index dc81c2c..d0b6ad0 100644 --- a/koji.spec +++ b/koji.spec @@ -8,8 +8,8 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.25.1 -Release: 2%{?dist} +Version: 1.26.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -350,6 +350,9 @@ done %systemd_postun kojira.service %changelog +* Wed Aug 25 2021 Kevin Fenzi - 1.26.0-1 +- Update to 1.26.0. Fixes rhbz#1996614 + * Thu Jul 22 2021 Fedora Release Engineering - 1.25.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 471513a..4c53397 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.25.1.tar.bz2) = f64811f3dd9f27307c39cda0d6c20cb1513c03340db8ff54917a4fdf7a66b39a7d14ba41fd974c037ead4c0d49cb3a95c162f20b66ebd7f84563c0ef748d6961 +SHA512 (koji-1.26.0.tar.bz2) = 4de9cf04351681fbdaea83f0825af3bbf5640e0bd29d25b8cb32ca782944b5918e21d3300dddb4a69fa3f9f8b0e1b497a24b9b43f59179a268488f9400ceef19 From f8707b9f852d72df4e5d9cde6e38b04dc335fcbd Mon Sep 17 00:00:00 2001 From: Carl George Date: Thu, 9 Sep 2021 22:33:49 -0500 Subject: [PATCH 173/202] Remove duplicate dist provides that are now automatic Thanks to #10, we now have proper egginfo for python3-koji. That means that python3dist/python3.Xdist provides are automatically added, making the explicit provides in the spec file redundant. https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Machine-readable-provides --- koji.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/koji.spec b/koji.spec index d0b6ad0..8727aba 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.26.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -44,9 +44,6 @@ Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-requests-gssapi Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-six -# Since we don't have metadata here, provide the 'normal' python provides manually. -Provides: python%{python3_version}dist(%{name}) = %{version} -Provides: python%{python3_pkgversion}dist(%{name}) = %{version} %description -n python%{python3_pkgversion}-%{name} Koji is a system for building and tracking RPMS. @@ -350,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Fri Sep 10 2021 Carl George - 1.26.0-2 +- Remove duplicate dist provides that are now automatic + * Wed Aug 25 2021 Kevin Fenzi - 1.26.0-1 - Update to 1.26.0. Fixes rhbz#1996614 From 203c9d632b61d3f78be3c0f600254bd46ccf960f Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sun, 10 Oct 2021 11:00:55 -0700 Subject: [PATCH 174/202] Update to 1.26.1. Fixes rhbz#2011804 --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 393ed0f..89ec17c 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ koji-1.4.0.tar.bz2 /koji-1.25.0.tar.bz2 /koji-1.25.1.tar.bz2 /koji-1.26.0.tar.bz2 +/koji-1.26.1.tar.bz2 diff --git a/koji.spec b/koji.spec index 8727aba..c5f59fa 100644 --- a/koji.spec +++ b/koji.spec @@ -8,8 +8,8 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.26.0 -Release: 2%{?dist} +Version: 1.26.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Sun Oct 10 2021 Kevin Fenzi - 1.26.1-1 +- Update to 1.26.1. Fixes rhbz#2011804 + * Fri Sep 10 2021 Carl George - 1.26.0-2 - Remove duplicate dist provides that are now automatic diff --git a/sources b/sources index 4c53397..f31db20 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.26.0.tar.bz2) = 4de9cf04351681fbdaea83f0825af3bbf5640e0bd29d25b8cb32ca782944b5918e21d3300dddb4a69fa3f9f8b0e1b497a24b9b43f59179a268488f9400ceef19 +SHA512 (koji-1.26.1.tar.bz2) = 873b6b90d58d91193fa2bbbdcb5f1e7917a21ed41683d18b791bb16d275cfdab2d95758577fe6a4c13f79f52bcd28be53bfee57048d2ce6e84e13b35c9610c19 From 1c2e230299835bb3561dcc84d954e09878bd1903 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 18 Nov 2021 13:43:58 -0800 Subject: [PATCH 175/202] Update to 1.27.0. Fixes rhbz#2024552 --- .gitignore | 1 + fedora-config.patch | 27 +++++++++++++++------------ koji.spec | 5 ++++- sources | 2 +- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 89ec17c..afd47c6 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ koji-1.4.0.tar.bz2 /koji-1.25.1.tar.bz2 /koji-1.26.0.tar.bz2 /koji-1.26.1.tar.bz2 +/koji-1.27.0.tar.bz2 diff --git a/fedora-config.patch b/fedora-config.patch index e719706..b5388ad 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,7 +1,7 @@ -diff --color -Nur koji-1.22.0.orig/cli/koji.conf koji-1.22.0/cli/koji.conf ---- koji-1.22.0.orig/cli/koji.conf 2020-07-28 01:17:32.000000000 -0700 -+++ koji-1.22.0/cli/koji.conf 2020-08-02 12:30:01.798455037 -0700 -@@ -4,17 +4,22 @@ +diff --color -Nur koji-1.27.0.orig/cli/koji.conf koji-1.27.0/cli/koji.conf +--- koji-1.27.0.orig/cli/koji.conf 2021-11-18 02:28:38.000000000 -0800 ++++ koji-1.27.0/cli/koji.conf 2021-11-18 13:33:55.468796788 -0800 +@@ -4,12 +4,15 @@ ;url of XMLRPC server ;server = http://hub.example.com/kojihub @@ -13,18 +13,20 @@ diff --color -Nur koji-1.22.0.orig/cli/koji.conf koji-1.22.0/cli/koji.conf ;url of package download site ;pkgurl = http://www.example.com/packages ++pkgurl = https://kojipkgs.fedoraproject.org/packages ;path to the koji top directory ;topdir = /mnt/koji -+topurl = https://kojipkgs.fedoraproject.org/ +@@ -22,6 +25,8 @@ + ;the keytab to auth as for automated clients + ;keytab = /etc/krb5.keytab - ;configuration for Kerberos authentication ++; fedora uses kerberos auth +authtype = kerberos -+krb_rdns = false - ;the principal to auth as for automated clients - ;principal = client@EXAMPLE.COM -@@ -39,9 +44,14 @@ + ;configuration for SSL authentication + +@@ -39,6 +44,8 @@ ;[not_implemented_yet] ;enabled plugins for CLI, runroot and save_failed_tree are available ;plugins = @@ -33,9 +35,10 @@ diff --color -Nur koji-1.22.0.orig/cli/koji.conf koji-1.22.0/cli/koji.conf ;timeout of XMLRPC requests by seconds, default: 60 * 60 * 12 = 43200 ;timeout = 43200 +@@ -48,3 +55,6 @@ - ;timeout of GSSAPI/SSL authentication by seconds, default: 60 - ;auth_timeout = 60 + ;enforcing CLI authentication even for anonymous calls + ;force_auth = False + +; use the fast upload feature of koji by default +use_fast_upload = yes diff --git a/koji.spec b/koji.spec index c5f59fa..0b73606 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.26.1 +Version: 1.27.0 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Thu Nov 18 2021 Kevin Fenzi - 1.27.0-1 +- Update to 1.27.0. Fixes rhbz#2024552 + * Sun Oct 10 2021 Kevin Fenzi - 1.26.1-1 - Update to 1.26.1. Fixes rhbz#2011804 diff --git a/sources b/sources index f31db20..14a0aa6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.26.1.tar.bz2) = 873b6b90d58d91193fa2bbbdcb5f1e7917a21ed41683d18b791bb16d275cfdab2d95758577fe6a4c13f79f52bcd28be53bfee57048d2ce6e84e13b35c9610c19 +SHA512 (koji-1.27.0.tar.bz2) = dcb7047baa0b2cc9f22cab02b4c5de2fadcb0a7d27d5e85053752d22c72aefa3bc6f7f7509d4e93f62553e9ec150307720bd9a76844787a72cdf305b9a391aa3 From 494c45d4be0a61c7147bdaa514d6c1597104d50c Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 18 Nov 2021 16:51:36 -0800 Subject: [PATCH 176/202] Fix rebasing issue in koji.conf --- fedora-config.patch | 2 +- koji.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fedora-config.patch b/fedora-config.patch index b5388ad..2974812 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -13,7 +13,7 @@ diff --color -Nur koji-1.27.0.orig/cli/koji.conf koji-1.27.0/cli/koji.conf ;url of package download site ;pkgurl = http://www.example.com/packages -+pkgurl = https://kojipkgs.fedoraproject.org/packages ++topurl = https://kojipkgs.fedoraproject.org/packages ;path to the koji top directory ;topdir = /mnt/koji diff --git a/koji.spec b/koji.spec index 0b73606..011b5d3 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.27.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Thu Nov 18 2021 Kevin Fenzi - 1.27.0-2 +- Fix rebasing issue in koji.conf + * Thu Nov 18 2021 Kevin Fenzi - 1.27.0-1 - Update to 1.27.0. Fixes rhbz#2024552 From 10cb341b43afa574c8a1e51fb73e0f8dbcf3769b Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 23 Nov 2021 12:05:29 +0100 Subject: [PATCH 177/202] Correct topurl in fedora-config.patch. Fixes rhbz#2025562 --- fedora-config.patch | 2 +- koji.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fedora-config.patch b/fedora-config.patch index 2974812..d27a84a 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -13,7 +13,7 @@ diff --color -Nur koji-1.27.0.orig/cli/koji.conf koji-1.27.0/cli/koji.conf ;url of package download site ;pkgurl = http://www.example.com/packages -+topurl = https://kojipkgs.fedoraproject.org/packages ++topurl = https://kojipkgs.fedoraproject.org ;path to the koji top directory ;topdir = /mnt/koji diff --git a/koji.spec b/koji.spec index 011b5d3..8ace409 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.27.0 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Tue Nov 23 2021 Mikolaj Izdebski - 1.27.0-3 +- Correct topurl in fedora-config.patch. Fixes rhbz#2025562 + * Thu Nov 18 2021 Kevin Fenzi - 1.27.0-2 - Fix rebasing issue in koji.conf From bb2dd0e2a2df074ac59a641faedb01faf896a0b2 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 13 Jan 2022 16:59:46 -0800 Subject: [PATCH 178/202] Update to 1.27.1. Fixes rhbz#2040251 --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index afd47c6..843642a 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ koji-1.4.0.tar.bz2 /koji-1.26.0.tar.bz2 /koji-1.26.1.tar.bz2 /koji-1.27.0.tar.bz2 +/koji-1.27.1.tar.bz2 diff --git a/koji.spec b/koji.spec index 8ace409..7311804 100644 --- a/koji.spec +++ b/koji.spec @@ -8,8 +8,8 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.27.0 -Release: 3%{?dist} +Version: 1.27.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Thu Jan 13 2022 Kevin Fenzi - 1.27.1-1 +- Update to 1.27.1. Fixes rhbz#2040251 + * Tue Nov 23 2021 Mikolaj Izdebski - 1.27.0-3 - Correct topurl in fedora-config.patch. Fixes rhbz#2025562 diff --git a/sources b/sources index 14a0aa6..552f04a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.27.0.tar.bz2) = dcb7047baa0b2cc9f22cab02b4c5de2fadcb0a7d27d5e85053752d22c72aefa3bc6f7f7509d4e93f62553e9ec150307720bd9a76844787a72cdf305b9a391aa3 +SHA512 (koji-1.27.1.tar.bz2) = 959ed9a946324d4233ba56284d9c0839c2c64ea297c6b5f9d37ce52978b6af57b178e581ca6a8dca30726fd37f4c6a97bebc99667d81cd8820d387ecb40f8757 From 4b31ebbb355a080126a84da191e536c1fc5bc07d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 15:03:29 +0000 Subject: [PATCH 179/202] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 7311804..b206a07 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.27.1 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 1.27.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jan 13 2022 Kevin Fenzi - 1.27.1-1 - Update to 1.27.1. Fixes rhbz#2040251 From ae2b095f822652afa5c7bf51e9a3699ef9b9ab8e Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 21 Feb 2022 13:19:59 -0800 Subject: [PATCH 180/202] Update to 1.28.0. Fixes rhbz#2056503 --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 843642a..54478c8 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ koji-1.4.0.tar.bz2 /koji-1.26.1.tar.bz2 /koji-1.27.0.tar.bz2 /koji-1.27.1.tar.bz2 +/koji-1.28.0.tar.bz2 diff --git a/koji.spec b/koji.spec index b206a07..51a71d7 100644 --- a/koji.spec +++ b/koji.spec @@ -8,8 +8,8 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.27.1 -Release: 2%{?dist} +Version: 1.28.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Mon Feb 21 2022 Kevin Fenzi - 1.28.0-1 +- Update to 1.28.0. Fixes rhbz#2056503 + * Thu Jan 20 2022 Fedora Release Engineering - 1.27.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 552f04a..47ce599 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.27.1.tar.bz2) = 959ed9a946324d4233ba56284d9c0839c2c64ea297c6b5f9d37ce52978b6af57b178e581ca6a8dca30726fd37f4c6a97bebc99667d81cd8820d387ecb40f8757 +SHA512 (koji-1.28.0.tar.bz2) = 094414a174f0a9a28cfad8a0ca7962a27f7b6218f4a8342ad33d270cd16339aa4ed5394801349e22d8679f6c83c13981c39bcd75c93a41789662e18f7526cad9 From 5dd5ed6c4aa5354c3d912fd8a8165ff53b6ba5b6 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 7 Apr 2022 13:34:30 -0700 Subject: [PATCH 181/202] Update to 1.28.1. Fixes rhbz#2072899 --- .gitignore | 1 + koji.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 54478c8..e4125d8 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ koji-1.4.0.tar.bz2 /koji-1.27.0.tar.bz2 /koji-1.27.1.tar.bz2 /koji-1.28.0.tar.bz2 +/koji-1.28.1.tar.bz2 diff --git a/koji.spec b/koji.spec index 51a71d7..461c5fb 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.28.0 +Version: 1.28.1 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Thu Apr 07 2022 Kevin Fenzi - 1.28.1-1 +- Update to 1.28.1. Fixes rhbz#2072899 + * Mon Feb 21 2022 Kevin Fenzi - 1.28.0-1 - Update to 1.28.0. Fixes rhbz#2056503 diff --git a/sources b/sources index 47ce599..fbe5fa1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.28.0.tar.bz2) = 094414a174f0a9a28cfad8a0ca7962a27f7b6218f4a8342ad33d270cd16339aa4ed5394801349e22d8679f6c83c13981c39bcd75c93a41789662e18f7526cad9 +SHA512 (koji-1.28.1.tar.bz2) = b53434647ae665ee2e5008be0447172895f876680470d91d5ae09e91719548e8412ad4dade040269cc72d1afaa07e1a847c2e1a637716c6bf5b09638408c879d From 2854a436999f1caa29e24fe98567e6c3e17ee6f8 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 27 May 2022 17:27:13 -0700 Subject: [PATCH 182/202] Update to 1.29.0. Fixes rhbz#2090641 --- .gitignore | 1 + koji.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e4125d8..f03229a 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ koji-1.4.0.tar.bz2 /koji-1.27.1.tar.bz2 /koji-1.28.0.tar.bz2 /koji-1.28.1.tar.bz2 +/koji-1.29.0.tar.bz2 diff --git a/koji.spec b/koji.spec index 461c5fb..85c0d18 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.28.1 +Version: 1.29.0 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Fri May 27 2022 Kevin Fenzi - 1.29.0-1 +- Update to 1.29.0. Fixes rhbz#2090641 + * Thu Apr 07 2022 Kevin Fenzi - 1.28.1-1 - Update to 1.28.1. Fixes rhbz#2072899 diff --git a/sources b/sources index fbe5fa1..bb03cab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.28.1.tar.bz2) = b53434647ae665ee2e5008be0447172895f876680470d91d5ae09e91719548e8412ad4dade040269cc72d1afaa07e1a847c2e1a637716c6bf5b09638408c879d +SHA512 (koji-1.29.0.tar.bz2) = 03ed7bdeb6f9948444e761008c269d45828a7cabdc19aede743cacdd8729f218955d69ee545b764ccf0e2c9e700e0d3e69cd73b011c8a9da75ebb17f69ebdcb3 From e76a9f0560e1c6f344f1f44d1fc3171c595d7241 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 15:07:56 +0200 Subject: [PATCH 183/202] Rebuilt for Python 3.11 --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 85c0d18..9471e55 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.29.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Mon Jun 13 2022 Python Maint - 1.29.0-2 +- Rebuilt for Python 3.11 + * Fri May 27 2022 Kevin Fenzi - 1.29.0-1 - Update to 1.29.0. Fixes rhbz#2090641 From 3e2bf997b29535d284606e2d14b6b15db644a9b9 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 12 Jul 2022 12:49:06 -0700 Subject: [PATCH 184/202] Update to 1.29.1. Fiex rhbz#2106294 --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f03229a..7d8bb53 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ koji-1.4.0.tar.bz2 /koji-1.28.0.tar.bz2 /koji-1.28.1.tar.bz2 /koji-1.29.0.tar.bz2 +/koji-1.29.1.tar.bz2 diff --git a/koji.spec b/koji.spec index 9471e55..e1cfaec 100644 --- a/koji.spec +++ b/koji.spec @@ -8,8 +8,8 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.29.0 -Release: 2%{?dist} +Version: 1.29.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -347,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Tue Jul 12 2022 Kevin Fenzi - 1.29.1-1 +- Update to 1.29.1. Fiex rhbz#2106294 + * Mon Jun 13 2022 Python Maint - 1.29.0-2 - Rebuilt for Python 3.11 diff --git a/sources b/sources index bb03cab..2ed3911 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.29.0.tar.bz2) = 03ed7bdeb6f9948444e761008c269d45828a7cabdc19aede743cacdd8729f218955d69ee545b764ccf0e2c9e700e0d3e69cd73b011c8a9da75ebb17f69ebdcb3 +SHA512 (koji-1.29.1.tar.bz2) = 4822149f6ff80d7a153f02e9ca3e9e4f56652e944b932d13fd76dfe2fc703890a92c8edc835216dee0a313bad60a0468f66418ae60e703eda3a6f14d0e9f83c1 From c7150a1e44a6f8fbe3e3fce40e733b794ff802b9 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 20 Jul 2022 16:21:10 -0700 Subject: [PATCH 185/202] Backport MR #3445 to fix a koji crash in image builds --- ...checkImageState-if-there-s-no-image..patch | 36 +++++++++++++++++++ koji.spec | 10 +++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch diff --git a/0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch b/0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch new file mode 100644 index 0000000..04dffc4 --- /dev/null +++ b/0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch @@ -0,0 +1,36 @@ +From 74c34cec10efe19fc591fc0cdc4d2132e31e8b2d Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Wed, 20 Jul 2022 16:04:08 -0700 +Subject: [PATCH] Don't crash in _checkImageState if there's no image.os_plugin + +We've seen some tasks lately where Koji crashed trying to do +`image.os_plugin.abort()`, e.g.: + +https://koji.fedoraproject.org/koji/taskinfo?taskID=89750587 +https://koji.fedoraproject.org/koji/taskinfo?taskID=89671944 + +The fix seems fairly simple: only try and abort if os_plugin +actually exists. + +Signed-off-by: Adam Williamson +--- + builder/kojid | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/builder/kojid b/builder/kojid +index e7ba1888..de6859dd 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -4164,7 +4164,8 @@ class BaseImageTask(OzImageTask): + if scrnshot: + ext = scrnshot[-3:] + self.uploadFile(scrnshot, remoteName='screenshot.%s' % ext) +- image.os_plugin.abort() # forcibly tear down the VM ++ if image.os_plugin: ++ image.os_plugin.abort() # forcibly tear down the VM + # TODO abort when a task is CANCELLED + if not self.session.checkUpload('', os.path.basename(self.ozlog)): + self.tlog.removeHandler(self.fhandler) +-- +2.37.1 + diff --git a/koji.spec b/koji.spec index e1cfaec..4f08c47 100644 --- a/koji.spec +++ b/koji.spec @@ -9,13 +9,18 @@ Name: koji Version: 1.29.1 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +# https://pagure.io/koji/pull-request/3445 +# Don't crash on image build failure path if an imagefactory thing +# isn't there +Patch0: 0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch + # Not upstreamable Patch100: fedora-config.patch @@ -347,6 +352,9 @@ done %systemd_postun kojira.service %changelog +* Wed Jul 20 2022 Adam Williamson - 1.29.1-2 +- Backport MR #3445 to fix a koji crash in image builds + * Tue Jul 12 2022 Kevin Fenzi - 1.29.1-1 - Update to 1.29.1. Fiex rhbz#2106294 From 91ab5c7b4541846087efa591f5f7d56839bcf7e0 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 9 Aug 2022 12:02:54 -0700 Subject: [PATCH 186/202] Backport PR #3458 to fix download-task arch filtering (#2116674) --- ...lter-in-download-task-to-handle-noar.patch | 55 +++++++++++++++++++ koji.spec | 11 +++- 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch diff --git a/0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch b/0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch new file mode 100644 index 0000000..ceac6d3 --- /dev/null +++ b/0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch @@ -0,0 +1,55 @@ +From 5a44f904747cd7defb79ee44750ad45707445729 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Tue, 9 Aug 2022 11:00:10 -0700 +Subject: [PATCH] Fix task arch filter in download-task to handle noarch etc. + +In 6713d1651d73b1b9d5dec37d0c5e0d85fa41a3c5 , filtering by task +arch was added to `download-task` when `--arch` is passed - +previously, it didn't bother filtering the tasks themselves by +arch, only any files they produce. + +This introduces some problems. The most obvious one is that the +'task arch' for noarch package builds is not 'noarch' but +'whatever the arch of the builder is' - e.g. for task +90635802 , which is a noarch build, the arch is 's390x'. + +Another problem would be with i386 vs. i686: for builds that +produce i686 RPMs, the task arch is i386. So in order to get +i686 packages, you'd have to pass `--arch=i386 --arch=i686". + +Fortunately, the task "label" seems tailor-made to solve these +problems: when it's a noarch build, the label is "noarch", and +when it's an i386/i686 build, the label is "i686". So by just +including the task if its arch *or* its label is in the arches +passed on the command line, we resolve both those problems, and +hopefully any other similar ones. + +Another option here would be just to ditch the arch filter and +go back to considering all tasks and only filtering files, but +this seems more efficient if it's safe in all cases. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2116674 +Signed-off-by: Adam Williamson +--- + cli/koji_cli/commands.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py +index 9e2cc1b3..0249497b 100644 +--- a/cli/koji_cli/commands.py ++++ b/cli/koji_cli/commands.py +@@ -6950,9 +6950,9 @@ def anon_handle_download_task(options, session, args): + build_methods_list = ['buildArch', 'build'] + rpm_file_types = ['rpm', 'src.rpm'] + for task in list_tasks: +- taskarch = task['arch'] ++ taskarches = (task['arch'], task['label']) + task_id = str(task['id']) +- if len(suboptions.arches) == 0 or taskarch in suboptions.arches: ++ if len(suboptions.arches) == 0 or any(tarch in suboptions.arches for tarch in taskarches): + files = list_task_output_all_volumes(session, task["id"]) + for filename in files: + if filename.endswith('src.rpm'): +-- +2.37.1 + diff --git a/koji.spec b/koji.spec index 4f08c47..87f7c6d 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.29.1 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -20,6 +20,10 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # Don't crash on image build failure path if an imagefactory thing # isn't there Patch0: 0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2116674 +# https://pagure.io/koji/pull-request/3458 +# Fix arch filtering in `koji download-task` +Patch1: 0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch # Not upstreamable Patch100: fedora-config.patch @@ -352,8 +356,11 @@ done %systemd_postun kojira.service %changelog +* Tue Aug 09 2022 Adam Williamson - 1.29.1-3 +- Backport PR #3458 to fix download-task arch filtering. fixes rhbz#2116674 + * Wed Jul 20 2022 Adam Williamson - 1.29.1-2 -- Backport MR #3445 to fix a koji crash in image builds +- Backport PR #3445 to fix a koji crash in image builds * Tue Jul 12 2022 Kevin Fenzi - 1.29.1-1 - Update to 1.29.1. Fiex rhbz#2106294 From fe7d6a38f5ae1c9c169475a08006d7252046f4e6 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 10 Aug 2022 10:19:13 -0700 Subject: [PATCH 187/202] Replace PR #3458 with PR #3459 (preferred by upstream) --- ...lter-in-download-task-to-handle-noar.patch | 55 -- 3459.patch | 479 ++++++++++++++++++ koji.spec | 9 +- 3 files changed, 485 insertions(+), 58 deletions(-) delete mode 100644 0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch create mode 100644 3459.patch diff --git a/0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch b/0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch deleted file mode 100644 index ceac6d3..0000000 --- a/0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5a44f904747cd7defb79ee44750ad45707445729 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Tue, 9 Aug 2022 11:00:10 -0700 -Subject: [PATCH] Fix task arch filter in download-task to handle noarch etc. - -In 6713d1651d73b1b9d5dec37d0c5e0d85fa41a3c5 , filtering by task -arch was added to `download-task` when `--arch` is passed - -previously, it didn't bother filtering the tasks themselves by -arch, only any files they produce. - -This introduces some problems. The most obvious one is that the -'task arch' for noarch package builds is not 'noarch' but -'whatever the arch of the builder is' - e.g. for task -90635802 , which is a noarch build, the arch is 's390x'. - -Another problem would be with i386 vs. i686: for builds that -produce i686 RPMs, the task arch is i386. So in order to get -i686 packages, you'd have to pass `--arch=i386 --arch=i686". - -Fortunately, the task "label" seems tailor-made to solve these -problems: when it's a noarch build, the label is "noarch", and -when it's an i386/i686 build, the label is "i686". So by just -including the task if its arch *or* its label is in the arches -passed on the command line, we resolve both those problems, and -hopefully any other similar ones. - -Another option here would be just to ditch the arch filter and -go back to considering all tasks and only filtering files, but -this seems more efficient if it's safe in all cases. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2116674 -Signed-off-by: Adam Williamson ---- - cli/koji_cli/commands.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py -index 9e2cc1b3..0249497b 100644 ---- a/cli/koji_cli/commands.py -+++ b/cli/koji_cli/commands.py -@@ -6950,9 +6950,9 @@ def anon_handle_download_task(options, session, args): - build_methods_list = ['buildArch', 'build'] - rpm_file_types = ['rpm', 'src.rpm'] - for task in list_tasks: -- taskarch = task['arch'] -+ taskarches = (task['arch'], task['label']) - task_id = str(task['id']) -- if len(suboptions.arches) == 0 or taskarch in suboptions.arches: -+ if len(suboptions.arches) == 0 or any(tarch in suboptions.arches for tarch in taskarches): - files = list_task_output_all_volumes(session, task["id"]) - for filename in files: - if filename.endswith('src.rpm'): --- -2.37.1 - diff --git a/3459.patch b/3459.patch new file mode 100644 index 0000000..b522581 --- /dev/null +++ b/3459.patch @@ -0,0 +1,479 @@ +From 9f498f1cf3339f3f41d1bb80df2ada4e391624b3 Mon Sep 17 00:00:00 2001 +From: Jana Cupova +Date: Aug 10 2022 05:38:00 +0000 +Subject: Fix arch in download-task + + +Fixes: https://pagure.io/koji/issue/3456 + +--- + +diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py +index 9e2cc1b..c2b2d97 100644 +--- a/cli/koji_cli/commands.py ++++ b/cli/koji_cli/commands.py +@@ -6952,50 +6952,49 @@ def anon_handle_download_task(options, session, args): + for task in list_tasks: + taskarch = task['arch'] + task_id = str(task['id']) +- if len(suboptions.arches) == 0 or taskarch in suboptions.arches: +- files = list_task_output_all_volumes(session, task["id"]) +- for filename in files: +- if filename.endswith('src.rpm'): +- filetype = 'src.rpm' +- else: +- filetype = filename.rsplit('.', 1)[1] +- if suboptions.all and not (task['method'] in build_methods_list and +- filetype in rpm_file_types): +- if filetype != 'log': +- for volume in files[filename]: +- if suboptions.dirpertask: +- new_filename = '%s/%s' % (task_id, filename) +- else: +- if taskarch not in filename and filetype != 'src.rpm': +- part_filename = filename[:-len('.%s' % filetype)] +- new_filename = "%s.%s.%s" % (part_filename, +- taskarch, filetype) +- else: +- new_filename = filename +- downloads.append((task, filename, volume, new_filename, task_id)) +- elif task['method'] in build_methods_list: +- if filetype in rpm_file_types: +- filearch = filename.split(".")[-2] +- for volume in files[filename]: +- if len(suboptions.arches) == 0 or filearch in suboptions.arches: +- if suboptions.dirpertask: +- new_filename = '%s/%s' % (task_id, filename) +- else: +- new_filename = filename +- downloads.append((task, filename, volume, new_filename, +- task_id)) +- +- if filetype == 'log' and suboptions.logs: ++ files = list_task_output_all_volumes(session, task["id"]) ++ for filename in files: ++ if filename.endswith('src.rpm'): ++ filetype = 'src.rpm' ++ else: ++ filetype = filename.rsplit('.', 1)[1] ++ if suboptions.all and not (task['method'] in build_methods_list and ++ filetype in rpm_file_types): ++ if filetype != 'log': + for volume in files[filename]: + if suboptions.dirpertask: + new_filename = '%s/%s' % (task_id, filename) + else: +- if taskarch not in filename: +- part_filename = filename[:-len('.log')] +- new_filename = "%s.%s.log" % (part_filename, taskarch) ++ if taskarch not in filename and filetype != 'src.rpm': ++ part_filename = filename[:-len('.%s' % filetype)] ++ new_filename = "%s.%s.%s" % (part_filename, ++ taskarch, filetype) + else: + new_filename = filename + downloads.append((task, filename, volume, new_filename, task_id)) ++ elif task['method'] in build_methods_list: ++ if filetype in rpm_file_types: ++ filearch = filename.split(".")[-2] ++ for volume in files[filename]: ++ if len(suboptions.arches) == 0 or filearch in suboptions.arches: ++ if suboptions.dirpertask: ++ new_filename = '%s/%s' % (task_id, filename) ++ else: ++ new_filename = filename ++ downloads.append((task, filename, volume, new_filename, ++ task_id)) ++ ++ if filetype == 'log' and suboptions.logs: ++ for volume in files[filename]: ++ if suboptions.dirpertask: ++ new_filename = '%s/%s' % (task_id, filename) ++ else: ++ if taskarch not in filename: ++ part_filename = filename[:-len('.log')] ++ new_filename = "%s.%s.log" % (part_filename, taskarch) ++ else: ++ new_filename = filename ++ downloads.append((task, filename, volume, new_filename, task_id)) + + if len(downloads) == 0: + print("No files for download found.") +diff --git a/tests/test_cli/test_download_task.py b/tests/test_cli/test_download_task.py +index c35d4a6..3c455e3 100644 +--- a/tests/test_cli/test_download_task.py ++++ b/tests/test_cli/test_download_task.py +@@ -120,26 +120,29 @@ Default behavior without --all option downloads .rpm files only for build and bu + def test_handle_download_task_parent(self): + args = [str(self.parent_task_id), '--arch=noarch,x86_64'] + self.session.getTaskInfo.return_value = self.parent_task_info +- self.session.getTaskChildren.return_value = [{'id': 22222, +- 'method': 'buildArch', +- 'arch': 'noarch', +- 'state': 2}, +- {'id': 33333, +- 'method': 'buildArch', +- 'arch': 'x86_64', +- 'state': 2}, +- {'id': 44444, +- 'method': 'buildArch', +- 'arch': 's390', +- 'state': 2}, +- {'id': 55555, +- 'method': 'tagBuild', +- 'arch': 'noarch', +- 'state': 2} +- ] ++ self.session.getTaskChildren.return_value = [ ++ {'id': 22222, ++ 'method': 'buildArch', ++ 'arch': 'noarch', ++ 'state': 2}, ++ {'id': 33333, ++ 'method': 'buildArch', ++ 'arch': 'x86_64', ++ 'state': 2}, ++ {'id': 44444, ++ 'method': 'buildArch', ++ 'arch': 's390', ++ 'state': 2}, ++ {'id': 55555, ++ 'method': 'tagBuild', ++ 'arch': 'noarch', ++ 'state': 2} ++ ] + self.list_task_output_all_volumes.side_effect = [ ++ {}, + {'somerpm.src.rpm': ['DEFAULT', 'vol1']}, + {'somerpm.x86_64.rpm': ['DEFAULT', 'vol2']}, ++ {'somerpm.s390.rpm': ['DEFAULT']}, + {'somerpm.noarch.rpm': ['vol3'], + 'somelog.log': ['DEFAULT', 'vol1']}, + ] +@@ -156,8 +159,10 @@ Default behavior without --all option downloads .rpm files only for build and bu + self.session.getTaskInfo.assert_called_once_with(self.parent_task_id) + self.session.getTaskChildren.assert_called_once_with(self.parent_task_id) + self.assertEqual(self.list_task_output_all_volumes.mock_calls, [ ++ call(self.session, 123333), + call(self.session, 22222), + call(self.session, 33333), ++ call(self.session, 44444), + call(self.session, 55555)]) + self.assertListEqual(self.download_file.mock_calls, [ + call('https://topurl/work/tasks/3333/33333/somerpm.x86_64.rpm', +@@ -169,10 +174,11 @@ Default behavior without --all option downloads .rpm files only for build and bu + def test_handle_download_task_log(self): + args = [str(self.parent_task_id), '--log'] + self.session.getTaskInfo.return_value = self.parent_task_info +- self.session.getTaskChildren.return_value = [{'id': 22222, +- 'method': 'buildArch', +- 'arch': 'noarch', +- 'state': 2}] ++ self.session.getTaskChildren.return_value = [ ++ {'id': 22222, ++ 'method': 'buildArch', ++ 'arch': 'noarch', ++ 'state': 2}] + self.list_task_output_all_volumes.side_effect = [{}, { + 'somerpm.src.rpm': ['DEFAULT', 'vol1'], + 'somerpm.x86_64.rpm': ['DEFAULT', 'vol2'], +@@ -229,15 +235,17 @@ Default behavior without --all option downloads .rpm files only for build and bu + self.ensure_connection.assert_called_once_with(self.session, self.options) + self.session.getTaskInfo.assert_called_once_with(self.parent_task_id) + self.session.getTaskChildren.assert_called_once_with(self.parent_task_id) +- self.list_task_output_all_volumes.assert_not_called() ++ self.list_task_output_all_volumes.assert_called_once_with( ++ self.session, self.parent_task_id) + self.download_file.assert_not_called() + + def test_handle_download_parent_not_finished(self): + args = [str(self.parent_task_id)] +- self.session.getTaskInfo.return_value = {'id': self.parent_task_id, +- 'method': 'buildArch', +- 'arch': 'taskarch', +- 'state': 3} ++ self.session.getTaskInfo.return_value = { ++ 'id': self.parent_task_id, ++ 'method': 'buildArch', ++ 'arch': 'taskarch', ++ 'state': 3} + self.list_task_output_all_volumes.return_value = { + 'somerpm.src.rpm': ['DEFAULT', 'vol1'], + 'somerpm.x86_64.rpm': ['DEFAULT', 'vol2'], +@@ -265,10 +273,11 @@ Default behavior without --all option downloads .rpm files only for build and bu + def test_handle_download_child_not_finished(self): + args = [str(self.parent_task_id)] + self.session.getTaskInfo.return_value = self.parent_task_info +- self.session.getTaskChildren.return_value = [{'id': 22222, +- 'method': 'buildArch', +- 'arch': 'noarch', +- 'state': 3}] ++ self.session.getTaskChildren.return_value = [{ ++ 'id': 22222, ++ 'method': 'buildArch', ++ 'arch': 'noarch', ++ 'state': 3}] + self.list_task_output_all_volumes.side_effect = [ + {'somerpm.src.rpm': ['DEFAULT', 'vol1']}, + {'somenextrpm.src.rpm': ['DEFAULT', 'vol1']}] +@@ -374,26 +383,29 @@ Options: + def test_handle_download_task_parent_dirpertask(self): + args = [str(self.parent_task_id), '--arch=noarch,x86_64', '--dirpertask', '--log'] + self.session.getTaskInfo.return_value = self.parent_task_info +- self.session.getTaskChildren.return_value = [{'id': 22222, +- 'method': 'buildArch', +- 'arch': 'noarch', +- 'state': 2}, +- {'id': 33333, +- 'method': 'buildArch', +- 'arch': 'x86_64', +- 'state': 2}, +- {'id': 44444, +- 'method': 'buildArch', +- 'arch': 's390', +- 'state': 2}, +- {'id': 55555, +- 'method': 'tagBuild', +- 'arch': 'noarch', +- 'state': 2} +- ] ++ self.session.getTaskChildren.return_value = [ ++ {'id': 22222, ++ 'method': 'buildArch', ++ 'arch': 'noarch', ++ 'state': 2}, ++ {'id': 33333, ++ 'method': 'buildArch', ++ 'arch': 'x86_64', ++ 'state': 2}, ++ {'id': 44444, ++ 'method': 'buildArch', ++ 'arch': 's390', ++ 'state': 2}, ++ {'id': 55555, ++ 'method': 'tagBuild', ++ 'arch': 'noarch', ++ 'state': 2} ++ ] + self.list_task_output_all_volumes.side_effect = [ ++ {}, + {'somerpm.src.rpm': ['DEFAULT', 'vol1'], 'somerpm.noarch.rpm': ['DEFAULT']}, + {'somerpm.x86_64.rpm': ['DEFAULT', 'vol2']}, ++ {'somerpm.s390.rpm': ['DEFAULT']}, + {'somerpm.noarch.rpm': ['vol3'], + 'somelog.log': ['DEFAULT', 'vol1']}, + ] +@@ -410,8 +422,10 @@ Options: + self.session.getTaskInfo.assert_called_once_with(self.parent_task_id) + self.session.getTaskChildren.assert_called_once_with(self.parent_task_id) + self.assertEqual(self.list_task_output_all_volumes.mock_calls, [ ++ call(self.session, 123333), + call(self.session, 22222), + call(self.session, 33333), ++ call(self.session, 44444), + call(self.session, 55555)]) + self.assertListEqual(self.download_file.mock_calls, [ + call('https://topurl/work/tasks/2222/22222/somerpm.noarch.rpm', +@@ -430,26 +444,29 @@ Options: + def test_handle_download_task_parent_all(self): + args = [str(self.parent_task_id), '--arch=noarch,x86_64', '--all'] + self.session.getTaskInfo.return_value = self.parent_task_info +- self.session.getTaskChildren.return_value = [{'id': 22222, +- 'method': 'buildArch', +- 'arch': 'noarch', +- 'state': 2}, +- {'id': 33333, +- 'method': 'buildArch', +- 'arch': 'x86_64', +- 'state': 2}, +- {'id': 44444, +- 'method': 'buildArch', +- 'arch': 's390', +- 'state': 2}, +- {'id': 55555, +- 'method': 'tagBuild', +- 'arch': 'noarch', +- 'state': 2} +- ] ++ self.session.getTaskChildren.return_value = [ ++ {'id': 22222, ++ 'method': 'buildArch', ++ 'arch': 'noarch', ++ 'state': 2}, ++ {'id': 33333, ++ 'method': 'buildArch', ++ 'arch': 'x86_64', ++ 'state': 2}, ++ {'id': 44444, ++ 'method': 'buildArch', ++ 'arch': 's390', ++ 'state': 2}, ++ {'id': 55555, ++ 'method': 'tagBuild', ++ 'arch': 'noarch', ++ 'state': 2} ++ ] + self.list_task_output_all_volumes.side_effect = [ ++ {}, + {'somerpm.src.rpm': ['DEFAULT', 'vol1']}, + {'somerpm.json': ['DEFAULT', 'vol2']}, ++ {'somerpm.s390.rpm': ['DEFAULT']}, + {'somerpm.noarch.rpm': ['vol3'], + 'somelog.log': ['DEFAULT', 'vol1']}, + ] +@@ -466,8 +483,10 @@ Options: + self.session.getTaskInfo.assert_called_once_with(self.parent_task_id) + self.session.getTaskChildren.assert_called_once_with(self.parent_task_id) + self.assertEqual(self.list_task_output_all_volumes.mock_calls, [ ++ call(self.session, 123333), + call(self.session, 22222), + call(self.session, 33333), ++ call(self.session, 44444), + call(self.session, 55555)]) + self.assertListEqual(self.download_file.mock_calls, [ + call('https://topurl/work/tasks/3333/33333/somerpm.json', +@@ -504,23 +523,24 @@ Options: + def test_handle_download_task_parent_dirpertask_all(self): + args = [str(self.parent_task_id), '--dirpertask', '--all'] + self.session.getTaskInfo.return_value = self.parent_task_info +- self.session.getTaskChildren.return_value = [{'id': 22222, +- 'method': 'buildArch', +- 'arch': 'noarch', +- 'state': 2}, +- {'id': 33333, +- 'method': 'buildArch', +- 'arch': 'x86_64', +- 'state': 2}, +- {'id': 44444, +- 'method': 'buildArch', +- 'arch': 's390', +- 'state': 2}, +- {'id': 55555, +- 'method': 'tagBuild', +- 'arch': 'noarch', +- 'state': 2} +- ] ++ self.session.getTaskChildren.return_value = [ ++ {'id': 22222, ++ 'method': 'buildArch', ++ 'arch': 'noarch', ++ 'state': 2}, ++ {'id': 33333, ++ 'method': 'buildArch', ++ 'arch': 'x86_64', ++ 'state': 2}, ++ {'id': 44444, ++ 'method': 'buildArch', ++ 'arch': 's390', ++ 'state': 2}, ++ {'id': 55555, ++ 'method': 'tagBuild', ++ 'arch': 'noarch', ++ 'state': 2} ++ ] + self.list_task_output_all_volumes.side_effect = [ + {}, + {'somerpm.src.rpm': ['DEFAULT', 'vol1'], 'somerpm.noarch.rpm': ['DEFAULT']}, +@@ -568,11 +588,12 @@ Options: + def test_handle_download_task_log_with_arch(self): + args = [str(self.parent_task_id), '--arch=noarch', '--log'] + self.session.getTaskInfo.return_value = self.parent_task_info +- self.session.getTaskChildren.return_value = [{'id': 22222, +- 'method': 'buildArch', +- 'arch': 'noarch', +- 'state': 2}] +- self.list_task_output_all_volumes.side_effect = [{ ++ self.session.getTaskChildren.return_value = [ ++ {'id': 22222, ++ 'method': 'buildArch', ++ 'arch': 'noarch', ++ 'state': 2}] ++ self.list_task_output_all_volumes.side_effect = [{}, { + 'somerpm.src.rpm': ['DEFAULT', 'vol1'], + 'somerpm.x86_64.rpm': ['DEFAULT', 'vol2'], + 'somerpm.noarch.rpm': ['vol3'], +@@ -604,23 +625,24 @@ Options: + def test_handle_download_task_all_log(self): + args = [str(self.parent_task_id), '--all', '--log'] + self.session.getTaskInfo.return_value = self.parent_task_info +- self.session.getTaskChildren.return_value = [{'id': 22222, +- 'method': 'buildArch', +- 'arch': 'noarch', +- 'state': 2}, +- {'id': 33333, +- 'method': 'buildArch', +- 'arch': 'x86_64', +- 'state': 2}, +- {'id': 44444, +- 'method': 'buildArch', +- 'arch': 's390', +- 'state': 2}, +- {'id': 55555, +- 'method': 'tagBuild', +- 'arch': 'noarch', +- 'state': 2} +- ] ++ self.session.getTaskChildren.return_value = [ ++ {'id': 22222, ++ 'method': 'buildArch', ++ 'arch': 'noarch', ++ 'state': 2}, ++ {'id': 33333, ++ 'method': 'buildArch', ++ 'arch': 'x86_64', ++ 'state': 2}, ++ {'id': 44444, ++ 'method': 'buildArch', ++ 'arch': 's390', ++ 'state': 2}, ++ {'id': 55555, ++ 'method': 'tagBuild', ++ 'arch': 'noarch', ++ 'state': 2} ++ ] + self.list_task_output_all_volumes.side_effect = [ + {}, + {'somerpm.src.rpm': ['DEFAULT', 'vol1'], 'somerpm.noarch.rpm': ['DEFAULT']}, +@@ -671,23 +693,24 @@ Options: + def test_handle_download_task_parent_dirpertask_all_conflict_names(self): + args = [str(self.parent_task_id), '--all'] + self.session.getTaskInfo.return_value = self.parent_task_info +- self.session.getTaskChildren.return_value = [{'id': 22222, +- 'method': 'buildArch', +- 'arch': 'noarch', +- 'state': 2}, +- {'id': 33333, +- 'method': 'buildArch', +- 'arch': 'x86_64', +- 'state': 2}, +- {'id': 44444, +- 'method': 'buildArch', +- 'arch': 's390', +- 'state': 2}, +- {'id': 55555, +- 'method': 'tagBuild', +- 'arch': 'noarch', +- 'state': 2} +- ] ++ self.session.getTaskChildren.return_value = [ ++ {'id': 22222, ++ 'method': 'buildArch', ++ 'arch': 'noarch', ++ 'state': 2}, ++ {'id': 33333, ++ 'method': 'buildArch', ++ 'arch': 'x86_64', ++ 'state': 2}, ++ {'id': 44444, ++ 'method': 'buildArch', ++ 'arch': 's390', ++ 'state': 2}, ++ {'id': 55555, ++ 'method': 'tagBuild', ++ 'arch': 'noarch', ++ 'state': 2} ++ ] + self.list_task_output_all_volumes.side_effect = [ + {}, + {'somerpm.src.rpm': ['DEFAULT', 'vol1'], 'somerpm.noarch.rpm': ['DEFAULT']}, + diff --git a/koji.spec b/koji.spec index 87f7c6d..6555819 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.29.1 -Release: 3%{?dist} +Release: 4%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -21,9 +21,9 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 # isn't there Patch0: 0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch # https://bugzilla.redhat.com/show_bug.cgi?id=2116674 -# https://pagure.io/koji/pull-request/3458 +# https://pagure.io/koji/pull-request/3459 # Fix arch filtering in `koji download-task` -Patch1: 0001-Fix-task-arch-filter-in-download-task-to-handle-noar.patch +Patch1: 3459.patch # Not upstreamable Patch100: fedora-config.patch @@ -356,6 +356,9 @@ done %systemd_postun kojira.service %changelog +* Wed Aug 10 2022 Adam Williamson - 1.29.1-4 +- Replace PR #3458 with PR #3459 (preferred by upstream) + * Tue Aug 09 2022 Adam Williamson - 1.29.1-3 - Backport PR #3458 to fix download-task arch filtering. fixes rhbz#2116674 From d8319072fc93108223e96545be5e6001246a6a83 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 29 Aug 2022 13:11:26 -0700 Subject: [PATCH 188/202] Upgrade to 1.30.0 Signed-off-by: Kevin Fenzi --- .gitignore | 1 + ...checkImageState-if-there-s-no-image..patch | 36 -- 3459.patch | 479 ------------------ koji.spec | 16 +- sources | 2 +- 5 files changed, 7 insertions(+), 527 deletions(-) delete mode 100644 0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch delete mode 100644 3459.patch diff --git a/.gitignore b/.gitignore index 7d8bb53..549acae 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ koji-1.4.0.tar.bz2 /koji-1.28.1.tar.bz2 /koji-1.29.0.tar.bz2 /koji-1.29.1.tar.bz2 +/koji-1.30.0.tar.bz2 diff --git a/0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch b/0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch deleted file mode 100644 index 04dffc4..0000000 --- a/0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch +++ /dev/null @@ -1,36 +0,0 @@ -From 74c34cec10efe19fc591fc0cdc4d2132e31e8b2d Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Wed, 20 Jul 2022 16:04:08 -0700 -Subject: [PATCH] Don't crash in _checkImageState if there's no image.os_plugin - -We've seen some tasks lately where Koji crashed trying to do -`image.os_plugin.abort()`, e.g.: - -https://koji.fedoraproject.org/koji/taskinfo?taskID=89750587 -https://koji.fedoraproject.org/koji/taskinfo?taskID=89671944 - -The fix seems fairly simple: only try and abort if os_plugin -actually exists. - -Signed-off-by: Adam Williamson ---- - builder/kojid | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/builder/kojid b/builder/kojid -index e7ba1888..de6859dd 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -4164,7 +4164,8 @@ class BaseImageTask(OzImageTask): - if scrnshot: - ext = scrnshot[-3:] - self.uploadFile(scrnshot, remoteName='screenshot.%s' % ext) -- image.os_plugin.abort() # forcibly tear down the VM -+ if image.os_plugin: -+ image.os_plugin.abort() # forcibly tear down the VM - # TODO abort when a task is CANCELLED - if not self.session.checkUpload('', os.path.basename(self.ozlog)): - self.tlog.removeHandler(self.fhandler) --- -2.37.1 - diff --git a/3459.patch b/3459.patch deleted file mode 100644 index b522581..0000000 --- a/3459.patch +++ /dev/null @@ -1,479 +0,0 @@ -From 9f498f1cf3339f3f41d1bb80df2ada4e391624b3 Mon Sep 17 00:00:00 2001 -From: Jana Cupova -Date: Aug 10 2022 05:38:00 +0000 -Subject: Fix arch in download-task - - -Fixes: https://pagure.io/koji/issue/3456 - ---- - -diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py -index 9e2cc1b..c2b2d97 100644 ---- a/cli/koji_cli/commands.py -+++ b/cli/koji_cli/commands.py -@@ -6952,50 +6952,49 @@ def anon_handle_download_task(options, session, args): - for task in list_tasks: - taskarch = task['arch'] - task_id = str(task['id']) -- if len(suboptions.arches) == 0 or taskarch in suboptions.arches: -- files = list_task_output_all_volumes(session, task["id"]) -- for filename in files: -- if filename.endswith('src.rpm'): -- filetype = 'src.rpm' -- else: -- filetype = filename.rsplit('.', 1)[1] -- if suboptions.all and not (task['method'] in build_methods_list and -- filetype in rpm_file_types): -- if filetype != 'log': -- for volume in files[filename]: -- if suboptions.dirpertask: -- new_filename = '%s/%s' % (task_id, filename) -- else: -- if taskarch not in filename and filetype != 'src.rpm': -- part_filename = filename[:-len('.%s' % filetype)] -- new_filename = "%s.%s.%s" % (part_filename, -- taskarch, filetype) -- else: -- new_filename = filename -- downloads.append((task, filename, volume, new_filename, task_id)) -- elif task['method'] in build_methods_list: -- if filetype in rpm_file_types: -- filearch = filename.split(".")[-2] -- for volume in files[filename]: -- if len(suboptions.arches) == 0 or filearch in suboptions.arches: -- if suboptions.dirpertask: -- new_filename = '%s/%s' % (task_id, filename) -- else: -- new_filename = filename -- downloads.append((task, filename, volume, new_filename, -- task_id)) -- -- if filetype == 'log' and suboptions.logs: -+ files = list_task_output_all_volumes(session, task["id"]) -+ for filename in files: -+ if filename.endswith('src.rpm'): -+ filetype = 'src.rpm' -+ else: -+ filetype = filename.rsplit('.', 1)[1] -+ if suboptions.all and not (task['method'] in build_methods_list and -+ filetype in rpm_file_types): -+ if filetype != 'log': - for volume in files[filename]: - if suboptions.dirpertask: - new_filename = '%s/%s' % (task_id, filename) - else: -- if taskarch not in filename: -- part_filename = filename[:-len('.log')] -- new_filename = "%s.%s.log" % (part_filename, taskarch) -+ if taskarch not in filename and filetype != 'src.rpm': -+ part_filename = filename[:-len('.%s' % filetype)] -+ new_filename = "%s.%s.%s" % (part_filename, -+ taskarch, filetype) - else: - new_filename = filename - downloads.append((task, filename, volume, new_filename, task_id)) -+ elif task['method'] in build_methods_list: -+ if filetype in rpm_file_types: -+ filearch = filename.split(".")[-2] -+ for volume in files[filename]: -+ if len(suboptions.arches) == 0 or filearch in suboptions.arches: -+ if suboptions.dirpertask: -+ new_filename = '%s/%s' % (task_id, filename) -+ else: -+ new_filename = filename -+ downloads.append((task, filename, volume, new_filename, -+ task_id)) -+ -+ if filetype == 'log' and suboptions.logs: -+ for volume in files[filename]: -+ if suboptions.dirpertask: -+ new_filename = '%s/%s' % (task_id, filename) -+ else: -+ if taskarch not in filename: -+ part_filename = filename[:-len('.log')] -+ new_filename = "%s.%s.log" % (part_filename, taskarch) -+ else: -+ new_filename = filename -+ downloads.append((task, filename, volume, new_filename, task_id)) - - if len(downloads) == 0: - print("No files for download found.") -diff --git a/tests/test_cli/test_download_task.py b/tests/test_cli/test_download_task.py -index c35d4a6..3c455e3 100644 ---- a/tests/test_cli/test_download_task.py -+++ b/tests/test_cli/test_download_task.py -@@ -120,26 +120,29 @@ Default behavior without --all option downloads .rpm files only for build and bu - def test_handle_download_task_parent(self): - args = [str(self.parent_task_id), '--arch=noarch,x86_64'] - self.session.getTaskInfo.return_value = self.parent_task_info -- self.session.getTaskChildren.return_value = [{'id': 22222, -- 'method': 'buildArch', -- 'arch': 'noarch', -- 'state': 2}, -- {'id': 33333, -- 'method': 'buildArch', -- 'arch': 'x86_64', -- 'state': 2}, -- {'id': 44444, -- 'method': 'buildArch', -- 'arch': 's390', -- 'state': 2}, -- {'id': 55555, -- 'method': 'tagBuild', -- 'arch': 'noarch', -- 'state': 2} -- ] -+ self.session.getTaskChildren.return_value = [ -+ {'id': 22222, -+ 'method': 'buildArch', -+ 'arch': 'noarch', -+ 'state': 2}, -+ {'id': 33333, -+ 'method': 'buildArch', -+ 'arch': 'x86_64', -+ 'state': 2}, -+ {'id': 44444, -+ 'method': 'buildArch', -+ 'arch': 's390', -+ 'state': 2}, -+ {'id': 55555, -+ 'method': 'tagBuild', -+ 'arch': 'noarch', -+ 'state': 2} -+ ] - self.list_task_output_all_volumes.side_effect = [ -+ {}, - {'somerpm.src.rpm': ['DEFAULT', 'vol1']}, - {'somerpm.x86_64.rpm': ['DEFAULT', 'vol2']}, -+ {'somerpm.s390.rpm': ['DEFAULT']}, - {'somerpm.noarch.rpm': ['vol3'], - 'somelog.log': ['DEFAULT', 'vol1']}, - ] -@@ -156,8 +159,10 @@ Default behavior without --all option downloads .rpm files only for build and bu - self.session.getTaskInfo.assert_called_once_with(self.parent_task_id) - self.session.getTaskChildren.assert_called_once_with(self.parent_task_id) - self.assertEqual(self.list_task_output_all_volumes.mock_calls, [ -+ call(self.session, 123333), - call(self.session, 22222), - call(self.session, 33333), -+ call(self.session, 44444), - call(self.session, 55555)]) - self.assertListEqual(self.download_file.mock_calls, [ - call('https://topurl/work/tasks/3333/33333/somerpm.x86_64.rpm', -@@ -169,10 +174,11 @@ Default behavior without --all option downloads .rpm files only for build and bu - def test_handle_download_task_log(self): - args = [str(self.parent_task_id), '--log'] - self.session.getTaskInfo.return_value = self.parent_task_info -- self.session.getTaskChildren.return_value = [{'id': 22222, -- 'method': 'buildArch', -- 'arch': 'noarch', -- 'state': 2}] -+ self.session.getTaskChildren.return_value = [ -+ {'id': 22222, -+ 'method': 'buildArch', -+ 'arch': 'noarch', -+ 'state': 2}] - self.list_task_output_all_volumes.side_effect = [{}, { - 'somerpm.src.rpm': ['DEFAULT', 'vol1'], - 'somerpm.x86_64.rpm': ['DEFAULT', 'vol2'], -@@ -229,15 +235,17 @@ Default behavior without --all option downloads .rpm files only for build and bu - self.ensure_connection.assert_called_once_with(self.session, self.options) - self.session.getTaskInfo.assert_called_once_with(self.parent_task_id) - self.session.getTaskChildren.assert_called_once_with(self.parent_task_id) -- self.list_task_output_all_volumes.assert_not_called() -+ self.list_task_output_all_volumes.assert_called_once_with( -+ self.session, self.parent_task_id) - self.download_file.assert_not_called() - - def test_handle_download_parent_not_finished(self): - args = [str(self.parent_task_id)] -- self.session.getTaskInfo.return_value = {'id': self.parent_task_id, -- 'method': 'buildArch', -- 'arch': 'taskarch', -- 'state': 3} -+ self.session.getTaskInfo.return_value = { -+ 'id': self.parent_task_id, -+ 'method': 'buildArch', -+ 'arch': 'taskarch', -+ 'state': 3} - self.list_task_output_all_volumes.return_value = { - 'somerpm.src.rpm': ['DEFAULT', 'vol1'], - 'somerpm.x86_64.rpm': ['DEFAULT', 'vol2'], -@@ -265,10 +273,11 @@ Default behavior without --all option downloads .rpm files only for build and bu - def test_handle_download_child_not_finished(self): - args = [str(self.parent_task_id)] - self.session.getTaskInfo.return_value = self.parent_task_info -- self.session.getTaskChildren.return_value = [{'id': 22222, -- 'method': 'buildArch', -- 'arch': 'noarch', -- 'state': 3}] -+ self.session.getTaskChildren.return_value = [{ -+ 'id': 22222, -+ 'method': 'buildArch', -+ 'arch': 'noarch', -+ 'state': 3}] - self.list_task_output_all_volumes.side_effect = [ - {'somerpm.src.rpm': ['DEFAULT', 'vol1']}, - {'somenextrpm.src.rpm': ['DEFAULT', 'vol1']}] -@@ -374,26 +383,29 @@ Options: - def test_handle_download_task_parent_dirpertask(self): - args = [str(self.parent_task_id), '--arch=noarch,x86_64', '--dirpertask', '--log'] - self.session.getTaskInfo.return_value = self.parent_task_info -- self.session.getTaskChildren.return_value = [{'id': 22222, -- 'method': 'buildArch', -- 'arch': 'noarch', -- 'state': 2}, -- {'id': 33333, -- 'method': 'buildArch', -- 'arch': 'x86_64', -- 'state': 2}, -- {'id': 44444, -- 'method': 'buildArch', -- 'arch': 's390', -- 'state': 2}, -- {'id': 55555, -- 'method': 'tagBuild', -- 'arch': 'noarch', -- 'state': 2} -- ] -+ self.session.getTaskChildren.return_value = [ -+ {'id': 22222, -+ 'method': 'buildArch', -+ 'arch': 'noarch', -+ 'state': 2}, -+ {'id': 33333, -+ 'method': 'buildArch', -+ 'arch': 'x86_64', -+ 'state': 2}, -+ {'id': 44444, -+ 'method': 'buildArch', -+ 'arch': 's390', -+ 'state': 2}, -+ {'id': 55555, -+ 'method': 'tagBuild', -+ 'arch': 'noarch', -+ 'state': 2} -+ ] - self.list_task_output_all_volumes.side_effect = [ -+ {}, - {'somerpm.src.rpm': ['DEFAULT', 'vol1'], 'somerpm.noarch.rpm': ['DEFAULT']}, - {'somerpm.x86_64.rpm': ['DEFAULT', 'vol2']}, -+ {'somerpm.s390.rpm': ['DEFAULT']}, - {'somerpm.noarch.rpm': ['vol3'], - 'somelog.log': ['DEFAULT', 'vol1']}, - ] -@@ -410,8 +422,10 @@ Options: - self.session.getTaskInfo.assert_called_once_with(self.parent_task_id) - self.session.getTaskChildren.assert_called_once_with(self.parent_task_id) - self.assertEqual(self.list_task_output_all_volumes.mock_calls, [ -+ call(self.session, 123333), - call(self.session, 22222), - call(self.session, 33333), -+ call(self.session, 44444), - call(self.session, 55555)]) - self.assertListEqual(self.download_file.mock_calls, [ - call('https://topurl/work/tasks/2222/22222/somerpm.noarch.rpm', -@@ -430,26 +444,29 @@ Options: - def test_handle_download_task_parent_all(self): - args = [str(self.parent_task_id), '--arch=noarch,x86_64', '--all'] - self.session.getTaskInfo.return_value = self.parent_task_info -- self.session.getTaskChildren.return_value = [{'id': 22222, -- 'method': 'buildArch', -- 'arch': 'noarch', -- 'state': 2}, -- {'id': 33333, -- 'method': 'buildArch', -- 'arch': 'x86_64', -- 'state': 2}, -- {'id': 44444, -- 'method': 'buildArch', -- 'arch': 's390', -- 'state': 2}, -- {'id': 55555, -- 'method': 'tagBuild', -- 'arch': 'noarch', -- 'state': 2} -- ] -+ self.session.getTaskChildren.return_value = [ -+ {'id': 22222, -+ 'method': 'buildArch', -+ 'arch': 'noarch', -+ 'state': 2}, -+ {'id': 33333, -+ 'method': 'buildArch', -+ 'arch': 'x86_64', -+ 'state': 2}, -+ {'id': 44444, -+ 'method': 'buildArch', -+ 'arch': 's390', -+ 'state': 2}, -+ {'id': 55555, -+ 'method': 'tagBuild', -+ 'arch': 'noarch', -+ 'state': 2} -+ ] - self.list_task_output_all_volumes.side_effect = [ -+ {}, - {'somerpm.src.rpm': ['DEFAULT', 'vol1']}, - {'somerpm.json': ['DEFAULT', 'vol2']}, -+ {'somerpm.s390.rpm': ['DEFAULT']}, - {'somerpm.noarch.rpm': ['vol3'], - 'somelog.log': ['DEFAULT', 'vol1']}, - ] -@@ -466,8 +483,10 @@ Options: - self.session.getTaskInfo.assert_called_once_with(self.parent_task_id) - self.session.getTaskChildren.assert_called_once_with(self.parent_task_id) - self.assertEqual(self.list_task_output_all_volumes.mock_calls, [ -+ call(self.session, 123333), - call(self.session, 22222), - call(self.session, 33333), -+ call(self.session, 44444), - call(self.session, 55555)]) - self.assertListEqual(self.download_file.mock_calls, [ - call('https://topurl/work/tasks/3333/33333/somerpm.json', -@@ -504,23 +523,24 @@ Options: - def test_handle_download_task_parent_dirpertask_all(self): - args = [str(self.parent_task_id), '--dirpertask', '--all'] - self.session.getTaskInfo.return_value = self.parent_task_info -- self.session.getTaskChildren.return_value = [{'id': 22222, -- 'method': 'buildArch', -- 'arch': 'noarch', -- 'state': 2}, -- {'id': 33333, -- 'method': 'buildArch', -- 'arch': 'x86_64', -- 'state': 2}, -- {'id': 44444, -- 'method': 'buildArch', -- 'arch': 's390', -- 'state': 2}, -- {'id': 55555, -- 'method': 'tagBuild', -- 'arch': 'noarch', -- 'state': 2} -- ] -+ self.session.getTaskChildren.return_value = [ -+ {'id': 22222, -+ 'method': 'buildArch', -+ 'arch': 'noarch', -+ 'state': 2}, -+ {'id': 33333, -+ 'method': 'buildArch', -+ 'arch': 'x86_64', -+ 'state': 2}, -+ {'id': 44444, -+ 'method': 'buildArch', -+ 'arch': 's390', -+ 'state': 2}, -+ {'id': 55555, -+ 'method': 'tagBuild', -+ 'arch': 'noarch', -+ 'state': 2} -+ ] - self.list_task_output_all_volumes.side_effect = [ - {}, - {'somerpm.src.rpm': ['DEFAULT', 'vol1'], 'somerpm.noarch.rpm': ['DEFAULT']}, -@@ -568,11 +588,12 @@ Options: - def test_handle_download_task_log_with_arch(self): - args = [str(self.parent_task_id), '--arch=noarch', '--log'] - self.session.getTaskInfo.return_value = self.parent_task_info -- self.session.getTaskChildren.return_value = [{'id': 22222, -- 'method': 'buildArch', -- 'arch': 'noarch', -- 'state': 2}] -- self.list_task_output_all_volumes.side_effect = [{ -+ self.session.getTaskChildren.return_value = [ -+ {'id': 22222, -+ 'method': 'buildArch', -+ 'arch': 'noarch', -+ 'state': 2}] -+ self.list_task_output_all_volumes.side_effect = [{}, { - 'somerpm.src.rpm': ['DEFAULT', 'vol1'], - 'somerpm.x86_64.rpm': ['DEFAULT', 'vol2'], - 'somerpm.noarch.rpm': ['vol3'], -@@ -604,23 +625,24 @@ Options: - def test_handle_download_task_all_log(self): - args = [str(self.parent_task_id), '--all', '--log'] - self.session.getTaskInfo.return_value = self.parent_task_info -- self.session.getTaskChildren.return_value = [{'id': 22222, -- 'method': 'buildArch', -- 'arch': 'noarch', -- 'state': 2}, -- {'id': 33333, -- 'method': 'buildArch', -- 'arch': 'x86_64', -- 'state': 2}, -- {'id': 44444, -- 'method': 'buildArch', -- 'arch': 's390', -- 'state': 2}, -- {'id': 55555, -- 'method': 'tagBuild', -- 'arch': 'noarch', -- 'state': 2} -- ] -+ self.session.getTaskChildren.return_value = [ -+ {'id': 22222, -+ 'method': 'buildArch', -+ 'arch': 'noarch', -+ 'state': 2}, -+ {'id': 33333, -+ 'method': 'buildArch', -+ 'arch': 'x86_64', -+ 'state': 2}, -+ {'id': 44444, -+ 'method': 'buildArch', -+ 'arch': 's390', -+ 'state': 2}, -+ {'id': 55555, -+ 'method': 'tagBuild', -+ 'arch': 'noarch', -+ 'state': 2} -+ ] - self.list_task_output_all_volumes.side_effect = [ - {}, - {'somerpm.src.rpm': ['DEFAULT', 'vol1'], 'somerpm.noarch.rpm': ['DEFAULT']}, -@@ -671,23 +693,24 @@ Options: - def test_handle_download_task_parent_dirpertask_all_conflict_names(self): - args = [str(self.parent_task_id), '--all'] - self.session.getTaskInfo.return_value = self.parent_task_info -- self.session.getTaskChildren.return_value = [{'id': 22222, -- 'method': 'buildArch', -- 'arch': 'noarch', -- 'state': 2}, -- {'id': 33333, -- 'method': 'buildArch', -- 'arch': 'x86_64', -- 'state': 2}, -- {'id': 44444, -- 'method': 'buildArch', -- 'arch': 's390', -- 'state': 2}, -- {'id': 55555, -- 'method': 'tagBuild', -- 'arch': 'noarch', -- 'state': 2} -- ] -+ self.session.getTaskChildren.return_value = [ -+ {'id': 22222, -+ 'method': 'buildArch', -+ 'arch': 'noarch', -+ 'state': 2}, -+ {'id': 33333, -+ 'method': 'buildArch', -+ 'arch': 'x86_64', -+ 'state': 2}, -+ {'id': 44444, -+ 'method': 'buildArch', -+ 'arch': 's390', -+ 'state': 2}, -+ {'id': 55555, -+ 'method': 'tagBuild', -+ 'arch': 'noarch', -+ 'state': 2} -+ ] - self.list_task_output_all_volumes.side_effect = [ - {}, - {'somerpm.src.rpm': ['DEFAULT', 'vol1'], 'somerpm.noarch.rpm': ['DEFAULT']}, - diff --git a/koji.spec b/koji.spec index 6555819..7e08a4f 100644 --- a/koji.spec +++ b/koji.spec @@ -8,23 +8,14 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.29.1 -Release: 4%{?dist} +Version: 1.30.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# https://pagure.io/koji/pull-request/3445 -# Don't crash on image build failure path if an imagefactory thing -# isn't there -Patch0: 0001-Don-t-crash-in-_checkImageState-if-there-s-no-image..patch -# https://bugzilla.redhat.com/show_bug.cgi?id=2116674 -# https://pagure.io/koji/pull-request/3459 -# Fix arch filtering in `koji download-task` -Patch1: 3459.patch - # Not upstreamable Patch100: fedora-config.patch @@ -356,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Mon Aug 29 2022 Kevin Fenzi - 1.30.0-1 +- Update to 1.30.0. Fixes rhbz#2122127 + * Wed Aug 10 2022 Adam Williamson - 1.29.1-4 - Replace PR #3458 with PR #3459 (preferred by upstream) diff --git a/sources b/sources index 2ed3911..e19cc68 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.29.1.tar.bz2) = 4822149f6ff80d7a153f02e9ca3e9e4f56652e944b932d13fd76dfe2fc703890a92c8edc835216dee0a313bad60a0468f66418ae60e703eda3a6f14d0e9f83c1 +SHA512 (koji-1.30.0.tar.bz2) = e428ed743415798dc0234c4eb1c6b231c53a87e456ae3c068e079fad28021c2e72b885e477547b252649d37c5a04b877b02e5c5cf2747f8b901a5bae12bc7def From c15b855e4e075e2d5ffa586c9ed7fc870796393f Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Thu, 22 Sep 2022 09:51:04 -0400 Subject: [PATCH 189/202] Backport fixes for kiwi-build command --- 3496.patch | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3498.patch | 23 +++++++++++++++++++++++ koji.spec | 11 ++++++++++- 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 3496.patch create mode 100644 3498.patch diff --git a/3496.patch b/3496.patch new file mode 100644 index 0000000..9246192 --- /dev/null +++ b/3496.patch @@ -0,0 +1,54 @@ +From ec7f9c2f6e26b74e6f41b3fe67998e9c2aa6dec0 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Sep 15 2022 07:08:50 +0000 +Subject: kiwi: handle include protocols + + +Related: https://pagure.io/koji/issue/3495 + +--- + +diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst +index 1a6994a..6654504 100644 +--- a/docs/source/plugins.rst ++++ b/docs/source/plugins.rst +@@ -282,6 +282,13 @@ option. Similarly to other image tasks, alternative architecture failures can be + ignored for successful build by ``--can-fail`` option. ``--arch`` can be used to + limit build tag architectures. + ++There are some limitation to used kiwi configuration: ++ ++ * ``include`` node can use only ``this://`` protocol. Other types like ``file://`` ++ or ``https://`` could reach out of the repo preventing reproducible build. ++ * All repositories from description (and included files) are removed and replaced ++ by buildroot repo and other repositories specified by ``--repo`` option. ++ + Driver Update Disks building + ============================ + +diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py +index 41ef82e..9148fc5 100644 +--- a/plugins/builder/kiwi.py ++++ b/plugins/builder/kiwi.py +@@ -4,6 +4,7 @@ import xml.dom.minidom + from fnmatch import fnmatch + + import koji ++import koji.util + from koji.tasks import ServerExit + from __main__ import BaseBuildTask, BuildImageTask, BuildRoot, SCM + +@@ -199,6 +200,12 @@ class KiwiCreateImageTask(BaseBuildTask): + # doing it recursively) + for inc_node in image.getElementsByTagName('include'): + path = inc_node.getAttribute('from') ++ if path.startswith('this://'): ++ path = koji.util.joinpath(desc_path, path[7:]) ++ else: ++ # we want to ignore other protocols, e.g. file://, https:// ++ # reachingoutside of repo ++ raise ValueError("Unhandled include protocol in include path: {path}.") + inc = xml.dom.minidom.parse(path) # nosec + # every included xml has image root element again + for node in inc.getElementsByTagName('image').childNodes: + diff --git a/3498.patch b/3498.patch new file mode 100644 index 0000000..eb2b4c9 --- /dev/null +++ b/3498.patch @@ -0,0 +1,23 @@ +From a8cbaf8195e8dcea4927cac5dde917592e313421 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Sep 13 2022 13:59:14 +0000 +Subject: kiwi: Explicitely use koji-generated description + + +Related: https://pagure.io/koji/issue/3497 + +--- + +diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py +index 41ef82e..2d2df67 100644 +--- a/plugins/builder/kiwi.py ++++ b/plugins/builder/kiwi.py +@@ -365,6 +365,7 @@ class KiwiCreateImageTask(BaseBuildTask): + cmd.extend([ + 'system', 'build', + '--description', os.path.join(os.path.basename(scmsrcdir), desc_path), ++ '--kiwi-file', desc, + '--target-dir', target_dir, + ]) + rv = broot.mock(['--cwd', broot.tmpdir(within=True), '--chroot', '--'] + cmd) + diff --git a/koji.spec b/koji.spec index 7e08a4f..5a36a75 100644 --- a/koji.spec +++ b/koji.spec @@ -9,13 +9,19 @@ Name: koji Version: 1.30.0 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +# Proposed upstream +## From: https://pagure.io/koji/pull-request/3496 +Patch1: 3496.patch +## From: https://pagure.io/koji/pull-request/3498 +Patch2: 3498.patch + # Not upstreamable Patch100: fedora-config.patch @@ -347,6 +353,9 @@ done %systemd_postun kojira.service %changelog +* Thu Sep 22 2022 Neal Gompa - 1.30.0-2 +- Backport fixes for kiwi-build command + * Mon Aug 29 2022 Kevin Fenzi - 1.30.0-1 - Update to 1.30.0. Fixes rhbz#2122127 From b66aea3c8dc20b5b280eef98dab9a0c45659ebd3 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 3 Oct 2022 17:44:34 +0200 Subject: [PATCH 190/202] Refresh kiwi-build patches to latest versions --- 3496.patch | 10 +++--- 3498.patch | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++---- koji.spec | 5 ++- 3 files changed, 95 insertions(+), 12 deletions(-) diff --git a/3496.patch b/3496.patch index 9246192..a3ddf26 100644 --- a/3496.patch +++ b/3496.patch @@ -1,6 +1,6 @@ -From ec7f9c2f6e26b74e6f41b3fe67998e9c2aa6dec0 Mon Sep 17 00:00:00 2001 +From d1d8f512c1f62412333acc983c382d44a18d7240 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek -Date: Sep 15 2022 07:08:50 +0000 +Date: Sep 29 2022 13:40:38 +0000 Subject: kiwi: handle include protocols @@ -27,7 +27,7 @@ index 1a6994a..6654504 100644 ============================ diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 41ef82e..9148fc5 100644 +index 41ef82e..ee1216c 100644 --- a/plugins/builder/kiwi.py +++ b/plugins/builder/kiwi.py @@ -4,6 +4,7 @@ import xml.dom.minidom @@ -45,9 +45,9 @@ index 41ef82e..9148fc5 100644 + if path.startswith('this://'): + path = koji.util.joinpath(desc_path, path[7:]) + else: -+ # we want to ignore other protocols, e.g. file://, https:// ++ # we want to reject other protocols, e.g. file://, https:// + # reachingoutside of repo -+ raise ValueError("Unhandled include protocol in include path: {path}.") ++ raise koji.GenericError(f"Unhandled include protocol in include path: {path}.") inc = xml.dom.minidom.parse(path) # nosec # every included xml has image root element again for node in inc.getElementsByTagName('image').childNodes: diff --git a/3498.patch b/3498.patch index eb2b4c9..983d76d 100644 --- a/3498.patch +++ b/3498.patch @@ -1,6 +1,6 @@ -From a8cbaf8195e8dcea4927cac5dde917592e313421 Mon Sep 17 00:00:00 2001 +From 0570e46fb00c4a3c841468f33a8d1f7c352a1fe1 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek -Date: Sep 13 2022 13:59:14 +0000 +Date: Oct 03 2022 09:39:03 +0000 Subject: kiwi: Explicitely use koji-generated description @@ -9,14 +9,94 @@ Related: https://pagure.io/koji/issue/3497 --- diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 41ef82e..2d2df67 100644 +index ee1216c..42aa707 100644 --- a/plugins/builder/kiwi.py +++ b/plugins/builder/kiwi.py -@@ -365,6 +365,7 @@ class KiwiCreateImageTask(BaseBuildTask): +@@ -1,4 +1,3 @@ +-import glob + import os + import xml.dom.minidom + from fnmatch import fnmatch +@@ -13,15 +12,17 @@ class KiwiBuildTask(BuildImageTask): + Methods = ['kiwiBuild'] + _taskWeight = 4.0 + +- def get_nvrp(self, desc_path): +- kiwi_files = glob.glob('%s/*.kiwi' % desc_path) +- if len(kiwi_files) != 1: +- raise koji.GenericError("Repo must contain only one .kiwi file.") +- +- cfg = kiwi_files[0] +- +- newxml = xml.dom.minidom.parse(cfg) # nosec +- image = newxml.getElementsByTagName('image')[0] ++ def get_nvrp(self, cfg): ++ try: ++ newxml = xml.dom.minidom.parse(cfg) # nosec ++ except Exception: ++ raise koji.GenericError( ++ f"Kiwi description {os.path.basename(cfg)} can't be parsed as XML.") ++ try: ++ image = newxml.getElementsByTagName('image')[0] ++ except IndexError: ++ raise koji.GenericError( ++ f"Kiwi description {os.path.basename(cfg)} doesn't contain tag.") + + name = image.getAttribute('name') + version = None +@@ -186,13 +187,8 @@ class KiwiCreateImageTask(BaseBuildTask): + _taskWeight = 2.0 + + def prepareDescription(self, desc_path, name, version, repos, arch): +- kiwi_files = glob.glob('%s/*.kiwi' % desc_path) +- if len(kiwi_files) != 1: +- raise koji.GenericError("Repo must contain only one .kiwi file.") +- +- cfg = kiwi_files[0] +- +- newxml = xml.dom.minidom.parse(cfg) # nosec ++ # XML errors should have already been caught by parent task ++ newxml = xml.dom.minidom.parse(desc_path) # nosec + image = newxml.getElementsByTagName('image')[0] + + # apply includes - kiwi can include only top-level nodes, so we can simply +@@ -242,13 +238,13 @@ class KiwiCreateImageTask(BaseBuildTask): + types.append(type.getAttribute('image')) + + # write new file +- newcfg = f'{cfg[:-5]}.{arch}.kiwi' ++ newcfg = os.path.splitext(desc_path)[0] + f'.{arch}.kiwi' + with open(newcfg, 'wt') as f: + s = newxml.toprettyxml() + # toprettyxml adds too many whitespaces/newlines + s = '\n'.join([x for x in s.splitlines() if x.strip()]) + f.write(s) +- os.unlink(cfg) ++ os.unlink(desc_path) + + return newcfg, types + +@@ -353,10 +349,11 @@ class KiwiCreateImageTask(BaseBuildTask): + self.logger.debug('BASEURL: %s' % baseurl) + repos.append(baseurl) + ++ base_path = os.path.dirname(desc_path) + if opts.get('make_prep'): + cmd = ['make', 'prep'] + rv = broot.mock(['--cwd', os.path.join(broot.tmpdir(within=True), +- os.path.basename(scmsrcdir), desc_path), ++ os.path.basename(scmsrcdir), base_path), + '--chroot', '--'] + cmd) + if rv: + raise koji.GenericError("Preparation step failed") +@@ -370,8 +367,9 @@ class KiwiCreateImageTask(BaseBuildTask): + cmd.extend(['--profile', self.opts['profile']]) + target_dir = '/builddir/result/image' cmd.extend([ ++ '--kiwi-file', os.path.basename(desc), # global option for image/system commands 'system', 'build', - '--description', os.path.join(os.path.basename(scmsrcdir), desc_path), -+ '--kiwi-file', desc, +- '--description', os.path.join(os.path.basename(scmsrcdir), desc_path), ++ '--description', os.path.join(os.path.basename(scmsrcdir), base_path), '--target-dir', target_dir, ]) rv = broot.mock(['--cwd', broot.tmpdir(within=True), '--chroot', '--'] + cmd) diff --git a/koji.spec b/koji.spec index 5a36a75..b00d5db 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.30.0 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -353,6 +353,9 @@ done %systemd_postun kojira.service %changelog +* Mon Oct 03 2022 Neal Gompa - 1.30.0-3 +- Refresh kiwi-build patches to latest versions + * Thu Sep 22 2022 Neal Gompa - 1.30.0-2 - Backport fixes for kiwi-build command From 5e3c5b5b72a87bbc56915b619d42386d6b222ab4 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 12 Oct 2022 10:32:44 -0700 Subject: [PATCH 191/202] Update to 1.30.1. Fixed rhbz#2133004 --- .gitignore | 1 + 3496.patch | 54 ---------------------------- 3498.patch | 103 ----------------------------------------------------- koji.spec | 13 +++---- sources | 2 +- 5 files changed, 7 insertions(+), 166 deletions(-) delete mode 100644 3496.patch delete mode 100644 3498.patch diff --git a/.gitignore b/.gitignore index 549acae..42c4921 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ koji-1.4.0.tar.bz2 /koji-1.29.0.tar.bz2 /koji-1.29.1.tar.bz2 /koji-1.30.0.tar.bz2 +/koji-1.30.1.tar.bz2 diff --git a/3496.patch b/3496.patch deleted file mode 100644 index a3ddf26..0000000 --- a/3496.patch +++ /dev/null @@ -1,54 +0,0 @@ -From d1d8f512c1f62412333acc983c382d44a18d7240 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Sep 29 2022 13:40:38 +0000 -Subject: kiwi: handle include protocols - - -Related: https://pagure.io/koji/issue/3495 - ---- - -diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst -index 1a6994a..6654504 100644 ---- a/docs/source/plugins.rst -+++ b/docs/source/plugins.rst -@@ -282,6 +282,13 @@ option. Similarly to other image tasks, alternative architecture failures can be - ignored for successful build by ``--can-fail`` option. ``--arch`` can be used to - limit build tag architectures. - -+There are some limitation to used kiwi configuration: -+ -+ * ``include`` node can use only ``this://`` protocol. Other types like ``file://`` -+ or ``https://`` could reach out of the repo preventing reproducible build. -+ * All repositories from description (and included files) are removed and replaced -+ by buildroot repo and other repositories specified by ``--repo`` option. -+ - Driver Update Disks building - ============================ - -diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 41ef82e..ee1216c 100644 ---- a/plugins/builder/kiwi.py -+++ b/plugins/builder/kiwi.py -@@ -4,6 +4,7 @@ import xml.dom.minidom - from fnmatch import fnmatch - - import koji -+import koji.util - from koji.tasks import ServerExit - from __main__ import BaseBuildTask, BuildImageTask, BuildRoot, SCM - -@@ -199,6 +200,12 @@ class KiwiCreateImageTask(BaseBuildTask): - # doing it recursively) - for inc_node in image.getElementsByTagName('include'): - path = inc_node.getAttribute('from') -+ if path.startswith('this://'): -+ path = koji.util.joinpath(desc_path, path[7:]) -+ else: -+ # we want to reject other protocols, e.g. file://, https:// -+ # reachingoutside of repo -+ raise koji.GenericError(f"Unhandled include protocol in include path: {path}.") - inc = xml.dom.minidom.parse(path) # nosec - # every included xml has image root element again - for node in inc.getElementsByTagName('image').childNodes: - diff --git a/3498.patch b/3498.patch deleted file mode 100644 index 983d76d..0000000 --- a/3498.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 0570e46fb00c4a3c841468f33a8d1f7c352a1fe1 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Oct 03 2022 09:39:03 +0000 -Subject: kiwi: Explicitely use koji-generated description - - -Related: https://pagure.io/koji/issue/3497 - ---- - -diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index ee1216c..42aa707 100644 ---- a/plugins/builder/kiwi.py -+++ b/plugins/builder/kiwi.py -@@ -1,4 +1,3 @@ --import glob - import os - import xml.dom.minidom - from fnmatch import fnmatch -@@ -13,15 +12,17 @@ class KiwiBuildTask(BuildImageTask): - Methods = ['kiwiBuild'] - _taskWeight = 4.0 - -- def get_nvrp(self, desc_path): -- kiwi_files = glob.glob('%s/*.kiwi' % desc_path) -- if len(kiwi_files) != 1: -- raise koji.GenericError("Repo must contain only one .kiwi file.") -- -- cfg = kiwi_files[0] -- -- newxml = xml.dom.minidom.parse(cfg) # nosec -- image = newxml.getElementsByTagName('image')[0] -+ def get_nvrp(self, cfg): -+ try: -+ newxml = xml.dom.minidom.parse(cfg) # nosec -+ except Exception: -+ raise koji.GenericError( -+ f"Kiwi description {os.path.basename(cfg)} can't be parsed as XML.") -+ try: -+ image = newxml.getElementsByTagName('image')[0] -+ except IndexError: -+ raise koji.GenericError( -+ f"Kiwi description {os.path.basename(cfg)} doesn't contain tag.") - - name = image.getAttribute('name') - version = None -@@ -186,13 +187,8 @@ class KiwiCreateImageTask(BaseBuildTask): - _taskWeight = 2.0 - - def prepareDescription(self, desc_path, name, version, repos, arch): -- kiwi_files = glob.glob('%s/*.kiwi' % desc_path) -- if len(kiwi_files) != 1: -- raise koji.GenericError("Repo must contain only one .kiwi file.") -- -- cfg = kiwi_files[0] -- -- newxml = xml.dom.minidom.parse(cfg) # nosec -+ # XML errors should have already been caught by parent task -+ newxml = xml.dom.minidom.parse(desc_path) # nosec - image = newxml.getElementsByTagName('image')[0] - - # apply includes - kiwi can include only top-level nodes, so we can simply -@@ -242,13 +238,13 @@ class KiwiCreateImageTask(BaseBuildTask): - types.append(type.getAttribute('image')) - - # write new file -- newcfg = f'{cfg[:-5]}.{arch}.kiwi' -+ newcfg = os.path.splitext(desc_path)[0] + f'.{arch}.kiwi' - with open(newcfg, 'wt') as f: - s = newxml.toprettyxml() - # toprettyxml adds too many whitespaces/newlines - s = '\n'.join([x for x in s.splitlines() if x.strip()]) - f.write(s) -- os.unlink(cfg) -+ os.unlink(desc_path) - - return newcfg, types - -@@ -353,10 +349,11 @@ class KiwiCreateImageTask(BaseBuildTask): - self.logger.debug('BASEURL: %s' % baseurl) - repos.append(baseurl) - -+ base_path = os.path.dirname(desc_path) - if opts.get('make_prep'): - cmd = ['make', 'prep'] - rv = broot.mock(['--cwd', os.path.join(broot.tmpdir(within=True), -- os.path.basename(scmsrcdir), desc_path), -+ os.path.basename(scmsrcdir), base_path), - '--chroot', '--'] + cmd) - if rv: - raise koji.GenericError("Preparation step failed") -@@ -370,8 +367,9 @@ class KiwiCreateImageTask(BaseBuildTask): - cmd.extend(['--profile', self.opts['profile']]) - target_dir = '/builddir/result/image' - cmd.extend([ -+ '--kiwi-file', os.path.basename(desc), # global option for image/system commands - 'system', 'build', -- '--description', os.path.join(os.path.basename(scmsrcdir), desc_path), -+ '--description', os.path.join(os.path.basename(scmsrcdir), base_path), - '--target-dir', target_dir, - ]) - rv = broot.mock(['--cwd', broot.tmpdir(within=True), '--chroot', '--'] + cmd) - diff --git a/koji.spec b/koji.spec index b00d5db..c5521b2 100644 --- a/koji.spec +++ b/koji.spec @@ -8,20 +8,14 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.30.0 -Release: 3%{?dist} +Version: 1.30.1 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# Proposed upstream -## From: https://pagure.io/koji/pull-request/3496 -Patch1: 3496.patch -## From: https://pagure.io/koji/pull-request/3498 -Patch2: 3498.patch - # Not upstreamable Patch100: fedora-config.patch @@ -353,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Wed Oct 12 2022 Kevin Fenzi - 1.30.1-1 +- Update to 1.30.1. Fixed rhbz#2133004 + * Mon Oct 03 2022 Neal Gompa - 1.30.0-3 - Refresh kiwi-build patches to latest versions diff --git a/sources b/sources index e19cc68..6e850c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.30.0.tar.bz2) = e428ed743415798dc0234c4eb1c6b231c53a87e456ae3c068e079fad28021c2e72b885e477547b252649d37c5a04b877b02e5c5cf2747f8b901a5bae12bc7def +SHA512 (koji-1.30.1.tar.bz2) = d5b0ca21c8f09a6346273c449f643a93a1edaabea82ea6d19aeba057c1d770c980f28545f42cb6bb2f28e8e20784b7c7c65f4bf2ce4957138f86bbab7925ee4b From 6292e1b4de779d73f7c0ad7df63decd809f1bc38 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Tue, 25 Oct 2022 08:40:45 -0400 Subject: [PATCH 192/202] Backport more fixes for kiwibuild command for CBS --- 3555.patch | 35 ++++++++++++ 3558.patch | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++ koji.spec | 11 +++- 3 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 3555.patch create mode 100644 3558.patch diff --git a/3555.patch b/3555.patch new file mode 100644 index 0000000..797ef5d --- /dev/null +++ b/3555.patch @@ -0,0 +1,35 @@ +From 18bbb5b21d4da8120fb9f3193248dd6faa915222 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Oct 17 2022 12:39:48 +0000 +Subject: fix include path + + +Related: https://pagure.io/koji/issue/3553 + +--- + +diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py +index 42aa707..abb5511 100644 +--- a/plugins/builder/kiwi.py ++++ b/plugins/builder/kiwi.py +@@ -197,16 +197,17 @@ class KiwiCreateImageTask(BaseBuildTask): + for inc_node in image.getElementsByTagName('include'): + path = inc_node.getAttribute('from') + if path.startswith('this://'): +- path = koji.util.joinpath(desc_path, path[7:]) ++ path = koji.util.joinpath(os.path.dirname(desc_path), path[7:]) + else: + # we want to reject other protocols, e.g. file://, https:// + # reachingoutside of repo + raise koji.GenericError(f"Unhandled include protocol in include path: {path}.") + inc = xml.dom.minidom.parse(path) # nosec + # every included xml has image root element again +- for node in inc.getElementsByTagName('image').childNodes: ++ for node in list(inc.getElementsByTagName('image')[0].childNodes): + if node.nodeName != 'repository': + image.appendChild(node) ++ image.removeChild(inc_node) + + # remove remaining old repos + for old_repo in image.getElementsByTagName('repository'): + diff --git a/3558.patch b/3558.patch new file mode 100644 index 0000000..03fb1ab --- /dev/null +++ b/3558.patch @@ -0,0 +1,155 @@ +From e6a9553e9c5850c8c1b9361f84f2f9dbb426ef4c Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Oct 25 2022 10:25:49 +0000 +Subject: kiwi: propagate --type option + + +Related: https://pagure.io/koji/issue/3556 + +--- + +diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py +index 42aa707..7d6f6e7 100644 +--- a/plugins/builder/kiwi.py ++++ b/plugins/builder/kiwi.py +@@ -325,11 +325,11 @@ class KiwiCreateImageTask(BaseBuildTask): + 'user_id': self.taskinfo['owner'], + 'channel': self.session.getChannel(self.taskinfo['channel_id'], + strict=True)['name'], +- 'scratch': self.opts.get('scratch') ++ 'scratch': self.opts.get('scratch', False) + }) + logfile = os.path.join(self.workdir, 'checkout-%s.log' % arch) + self.run_callbacks('preSCMCheckout', scminfo=scm.get_info(), +- build_tag=build_tag, scratch=self.opts.get('scratch')) ++ build_tag=build_tag, scratch=self.opts.get('scratch', False)) + scmdir = broot.tmpdir() + koji.ensuredir(scmdir) + scmsrcdir = scm.checkout(scmdir, self.session, +@@ -337,7 +337,7 @@ class KiwiCreateImageTask(BaseBuildTask): + self.run_callbacks("postSCMCheckout", + scminfo=scm.get_info(), + build_tag=build_tag, +- scratch=self.opts.get('scratch'), ++ scratch=self.opts.get('scratch', False), + srcdir=scmsrcdir) + + # user repos +@@ -365,6 +365,8 @@ class KiwiCreateImageTask(BaseBuildTask): + cmd = ['kiwi-ng'] + if self.opts.get('profile'): + cmd.extend(['--profile', self.opts['profile']]) ++ if self.opts.get('type'): ++ cmd.extend(['--type', self.opts['type']]) + target_dir = '/builddir/result/image' + cmd.extend([ + '--kiwi-file', os.path.basename(desc), # global option for image/system commands +diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py +index 8786b13..07125d7 100644 +--- a/plugins/cli/kiwi.py ++++ b/plugins/cli/kiwi.py +@@ -27,6 +27,7 @@ def handle_kiwi_build(goptions, session, args): + help="Do not display progress of the upload") + parser.add_option("--kiwi-profile", action="store", default=None, + help="Select profile from description file") ++ parser.add_option("--type", help="Override default build type from description") + parser.add_option("--make-prep", action="store_true", default=False, + help="Run 'make prep' in checkout before starting the build") + parser.add_option("--can-fail", action="store", dest="optional_arches", +@@ -46,28 +47,33 @@ def handle_kiwi_build(goptions, session, args): + target, scm, path = args + + activate_session(session, goptions) +- + kwargs = { +- 'scratch': options.scratch, +- 'optional_arches': [canonArch(arch) +- for arch in options.optional_arches.split(',') +- if arch], +- 'profile': options.kiwi_profile, +- 'release': options.release, +- 'make_prep': options.make_prep, ++ 'arches': [], ++ 'target': target, ++ 'desc_url': scm, ++ 'desc_path': path, + } +- +- arches = [] ++ if options.scratch: ++ kwargs['scratch'] = True ++ if options.optional_arches: ++ kwargs['optional_arches'] = [ ++ canonArch(arch) ++ for arch in options.optional_arches.split(',') ++ if arch] ++ if options.kiwi_profile: ++ kwargs['profile'] = options.kiwi_profile, ++ if options.release: ++ kwargs['release'] = options.release ++ if options.make_prep: ++ kwargs['make_prep'] = True ++ if options.type: ++ kwargs['type'] = options.type + if options.arches: +- arches = [canonArch(arch) for arch in options.arches] ++ kwargs['arches'] = [canonArch(arch) for arch in options.arches] ++ if options.repo: ++ kwargs['repos'] = options.repo + +- task_id = session.kiwiBuild( +- target=target, +- arches=arches, +- desc_url=scm, +- desc_path=path, +- repos=options.repo, +- **kwargs) ++ task_id = session.kiwiBuild(**kwargs) + + if not goptions.quiet: + print("Created task: %d" % task_id) +diff --git a/plugins/hub/kiwi.py b/plugins/hub/kiwi.py +index 79da38a..17b8e8e 100644 +--- a/plugins/hub/kiwi.py ++++ b/plugins/hub/kiwi.py +@@ -16,7 +16,8 @@ koji.tasks.LEGACY_SIGNATURES['createKiwiImage'] = [ + + @export + def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile=None, +- scratch=False, priority=None, make_prep=False, repos=None, release=None): ++ scratch=False, priority=None, make_prep=False, repos=None, release=None, ++ type=None): + context.session.assertPerm('image') + for i in [desc_url, desc_path, profile, release]: + if i is not None: +@@ -42,14 +43,21 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile + 'only admins may create high-priority tasks') + taskOpts['priority'] = koji.PRIO_DEFAULT + priority + +- opts = { +- 'optional_arches': optional_arches, +- 'profile': profile, +- 'scratch': bool(scratch), +- 'release': release, +- 'repos': repos or [], +- 'make_prep': bool(make_prep), +- } ++ opts = {} ++ if scratch: ++ opts['scratch'] = True ++ if profile: ++ opts['profile'] = profile ++ if release: ++ opts['release'] = release ++ if optional_arches: ++ opts['optional_arches'] = optional_arches, ++ if repos: ++ opts['repos'] = repos ++ if make_prep: ++ opts['make_prep'] = True ++ if type: ++ opts['type'] = type + return kojihub.make_task('kiwiBuild', + [target, arches, desc_url, desc_path, opts], + **taskOpts) + diff --git a/koji.spec b/koji.spec index c5521b2..8bce502 100644 --- a/koji.spec +++ b/koji.spec @@ -9,13 +9,19 @@ Name: koji Version: 1.30.1 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +# Proposed upstream +## From: https://pagure.io/koji/pull-request/3555 +Patch1: 3555.patch +## From: https://pagure.io/koji/pull-request/3558 +Patch2: 3558.patch + # Not upstreamable Patch100: fedora-config.patch @@ -347,6 +353,9 @@ done %systemd_postun kojira.service %changelog +* Tue Oct 25 2022 Neal Gompa - 1.30.1-2 +- Backport more fixes for kiwibuild command for CBS + * Wed Oct 12 2022 Kevin Fenzi - 1.30.1-1 - Update to 1.30.1. Fixed rhbz#2133004 From b595c52dd18627e81559fc936c816b1a6f5325b7 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sat, 5 Nov 2022 22:53:19 +0100 Subject: [PATCH 193/202] Update kiwi patchset --- ...h => 0001-kiwi-propagate-type-option.patch | 21 +++-- 0002-fix-additional-commas.patch | 40 +++++++++ 0003-kiwi-don-t-bind-builders-s-dev.patch | 27 ++++++ 0004-allow-to-set-it-by-user.patch | 83 +++++++++++++++++++ 3555.patch => 0005-fix-include-path.patch | 15 ++-- ...r-error-for-wrong-include-xml-format.patch | 33 ++++++++ koji.spec | 18 ++-- 7 files changed, 217 insertions(+), 20 deletions(-) rename 3558.patch => 0001-kiwi-propagate-type-option.patch (91%) create mode 100644 0002-fix-additional-commas.patch create mode 100644 0003-kiwi-don-t-bind-builders-s-dev.patch create mode 100644 0004-allow-to-set-it-by-user.patch rename 3555.patch => 0005-fix-include-path.patch (79%) create mode 100644 0006-better-error-for-wrong-include-xml-format.patch diff --git a/3558.patch b/0001-kiwi-propagate-type-option.patch similarity index 91% rename from 3558.patch rename to 0001-kiwi-propagate-type-option.patch index 03fb1ab..68b1e65 100644 --- a/3558.patch +++ b/0001-kiwi-propagate-type-option.patch @@ -1,15 +1,18 @@ -From e6a9553e9c5850c8c1b9361f84f2f9dbb426ef4c Mon Sep 17 00:00:00 2001 +From 7fd19f2239004fcf4e8060a45b75acef255b2457 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek -Date: Oct 25 2022 10:25:49 +0000 -Subject: kiwi: propagate --type option - +Date: Tue, 18 Oct 2022 14:49:59 +0200 +Subject: [PATCH 1/6] kiwi: propagate --type option Related: https://pagure.io/koji/issue/3556 - +(cherry picked from commit 6083bace39ba891d6b5db5354de356f2704fa4a1) --- + plugins/builder/kiwi.py | 8 +++++--- + plugins/cli/kiwi.py | 42 +++++++++++++++++++++++------------------ + plugins/hub/kiwi.py | 26 ++++++++++++++++--------- + 3 files changed, 46 insertions(+), 30 deletions(-) diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 42aa707..7d6f6e7 100644 +index 42aa7071..7d6f6e7e 100644 --- a/plugins/builder/kiwi.py +++ b/plugins/builder/kiwi.py @@ -325,11 +325,11 @@ class KiwiCreateImageTask(BaseBuildTask): @@ -45,7 +48,7 @@ index 42aa707..7d6f6e7 100644 cmd.extend([ '--kiwi-file', os.path.basename(desc), # global option for image/system commands diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py -index 8786b13..07125d7 100644 +index 8786b135..07125d75 100644 --- a/plugins/cli/kiwi.py +++ b/plugins/cli/kiwi.py @@ -27,6 +27,7 @@ def handle_kiwi_build(goptions, session, args): @@ -109,7 +112,7 @@ index 8786b13..07125d7 100644 if not goptions.quiet: print("Created task: %d" % task_id) diff --git a/plugins/hub/kiwi.py b/plugins/hub/kiwi.py -index 79da38a..17b8e8e 100644 +index 79da38a9..17b8e8e4 100644 --- a/plugins/hub/kiwi.py +++ b/plugins/hub/kiwi.py @@ -16,7 +16,8 @@ koji.tasks.LEGACY_SIGNATURES['createKiwiImage'] = [ @@ -152,4 +155,6 @@ index 79da38a..17b8e8e 100644 return kojihub.make_task('kiwiBuild', [target, arches, desc_url, desc_path, opts], **taskOpts) +-- +2.38.1 diff --git a/0002-fix-additional-commas.patch b/0002-fix-additional-commas.patch new file mode 100644 index 0000000..9a0c4d9 --- /dev/null +++ b/0002-fix-additional-commas.patch @@ -0,0 +1,40 @@ +From 0ccf95b7aa3332585217d5da2ff7b255e9cd4b14 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Fri, 4 Nov 2022 10:06:48 +0100 +Subject: [PATCH 2/6] fix additional commas + +(cherry picked from commit 066e7427efca7a581cb1a63974dfdfec8194bd70) +--- + plugins/cli/kiwi.py | 2 +- + plugins/hub/kiwi.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py +index 07125d75..6e965c05 100644 +--- a/plugins/cli/kiwi.py ++++ b/plugins/cli/kiwi.py +@@ -61,7 +61,7 @@ def handle_kiwi_build(goptions, session, args): + for arch in options.optional_arches.split(',') + if arch] + if options.kiwi_profile: +- kwargs['profile'] = options.kiwi_profile, ++ kwargs['profile'] = options.kiwi_profile + if options.release: + kwargs['release'] = options.release + if options.make_prep: +diff --git a/plugins/hub/kiwi.py b/plugins/hub/kiwi.py +index 17b8e8e4..7b0c2f05 100644 +--- a/plugins/hub/kiwi.py ++++ b/plugins/hub/kiwi.py +@@ -51,7 +51,7 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile + if release: + opts['release'] = release + if optional_arches: +- opts['optional_arches'] = optional_arches, ++ opts['optional_arches'] = optional_arches + if repos: + opts['repos'] = repos + if make_prep: +-- +2.38.1 + diff --git a/0003-kiwi-don-t-bind-builders-s-dev.patch b/0003-kiwi-don-t-bind-builders-s-dev.patch new file mode 100644 index 0000000..0117eb8 --- /dev/null +++ b/0003-kiwi-don-t-bind-builders-s-dev.patch @@ -0,0 +1,27 @@ +From 39cfeea12a38df825e264ce3a71489f35d4b95c3 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Mon, 31 Oct 2022 13:09:19 +0100 +Subject: [PATCH 3/6] kiwi: don't bind builders's /dev + +Related: https://pagure.io/koji/issue/3567 +(cherry picked from commit 655cb9797fe85f8dc1244f233da2919abfa1548f) +--- + plugins/builder/kiwi.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py +index 7d6f6e7e..e220d515 100644 +--- a/plugins/builder/kiwi.py ++++ b/plugins/builder/kiwi.py +@@ -307,7 +307,7 @@ class KiwiCreateImageTask(BaseBuildTask): + repo_id=repo_info['id'], + install_group='kiwi-build', + setup_dns=True, +- bind_opts={'dirs': {'/dev': '/dev', }}) ++ bind_opts={'dirs': {}}) + broot.workdir = self.workdir + + # create the mock chroot +-- +2.38.1 + diff --git a/0004-allow-to-set-it-by-user.patch b/0004-allow-to-set-it-by-user.patch new file mode 100644 index 0000000..f2c5078 --- /dev/null +++ b/0004-allow-to-set-it-by-user.patch @@ -0,0 +1,83 @@ +From a08967bce60d50ec1d27741512dc96f6ed546594 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Fri, 4 Nov 2022 10:13:16 +0100 +Subject: [PATCH 4/6] allow to set it by user + +(cherry picked from commit 5dcf480a401581442ace9b17e9c2a06241885ae6) +--- + plugins/builder/kiwi.py | 6 +++++- + plugins/cli/kiwi.py | 4 ++++ + plugins/hub/kiwi.py | 4 +++- + 3 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py +index e220d515..b70a13a3 100644 +--- a/plugins/builder/kiwi.py ++++ b/plugins/builder/kiwi.py +@@ -300,6 +300,10 @@ class KiwiCreateImageTask(BaseBuildTask): + desc_url, desc_path, opts=None): + self.opts = opts + build_tag = target_info['build_tag'] ++ if opts.get('bind_dev'): ++ bind_opts = {'dirs': {'/dev': '/dev'}} ++ else: ++ bind_opts = None + broot = BuildRoot(self.session, self.options, + tag=build_tag, + arch=arch, +@@ -307,7 +311,7 @@ class KiwiCreateImageTask(BaseBuildTask): + repo_id=repo_info['id'], + install_group='kiwi-build', + setup_dns=True, +- bind_opts={'dirs': {}}) ++ bind_opts=bind_opts) + broot.workdir = self.workdir + + # create the mock chroot +diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py +index 6e965c05..61764efb 100644 +--- a/plugins/cli/kiwi.py ++++ b/plugins/cli/kiwi.py +@@ -30,6 +30,9 @@ def handle_kiwi_build(goptions, session, args): + parser.add_option("--type", help="Override default build type from description") + parser.add_option("--make-prep", action="store_true", default=False, + help="Run 'make prep' in checkout before starting the build") ++ parser.add_option("--bind-dev", action="store_true", default=False, ++ help="e.g. images using device-mapper needs /dev mounted in kiwi env, " ++ "while others can fail in such env.") + parser.add_option("--can-fail", action="store", dest="optional_arches", + metavar="ARCH1,ARCH2,...", default="", + help="List of archs which are not blocking for build " +@@ -52,6 +55,7 @@ def handle_kiwi_build(goptions, session, args): + 'target': target, + 'desc_url': scm, + 'desc_path': path, ++ 'bind_dev': options.bind_dev, + } + if options.scratch: + kwargs['scratch'] = True +diff --git a/plugins/hub/kiwi.py b/plugins/hub/kiwi.py +index 7b0c2f05..f83b209d 100644 +--- a/plugins/hub/kiwi.py ++++ b/plugins/hub/kiwi.py +@@ -17,7 +17,7 @@ koji.tasks.LEGACY_SIGNATURES['createKiwiImage'] = [ + @export + def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile=None, + scratch=False, priority=None, make_prep=False, repos=None, release=None, +- type=None): ++ type=None, bind_dev=False): + context.session.assertPerm('image') + for i in [desc_url, desc_path, profile, release]: + if i is not None: +@@ -52,6 +52,8 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile + opts['release'] = release + if optional_arches: + opts['optional_arches'] = optional_arches ++ if bind_dev: ++ opts['bind_dev'] = bind_dev + if repos: + opts['repos'] = repos + if make_prep: +-- +2.38.1 + diff --git a/3555.patch b/0005-fix-include-path.patch similarity index 79% rename from 3555.patch rename to 0005-fix-include-path.patch index 797ef5d..8dbbb21 100644 --- a/3555.patch +++ b/0005-fix-include-path.patch @@ -1,15 +1,16 @@ -From 18bbb5b21d4da8120fb9f3193248dd6faa915222 Mon Sep 17 00:00:00 2001 +From 3a4286be435f6e734c528ab3a649cfd7d44e1338 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek -Date: Oct 17 2022 12:39:48 +0000 -Subject: fix include path - +Date: Mon, 17 Oct 2022 12:26:55 +0200 +Subject: [PATCH 5/6] fix include path Related: https://pagure.io/koji/issue/3553 - +(cherry picked from commit b8b52884b5208dc7ea25881108b7da5eb3d9fc86) --- + plugins/builder/kiwi.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 42aa707..abb5511 100644 +index b70a13a3..4033b520 100644 --- a/plugins/builder/kiwi.py +++ b/plugins/builder/kiwi.py @@ -197,16 +197,17 @@ class KiwiCreateImageTask(BaseBuildTask): @@ -32,4 +33,6 @@ index 42aa707..abb5511 100644 # remove remaining old repos for old_repo in image.getElementsByTagName('repository'): +-- +2.38.1 diff --git a/0006-better-error-for-wrong-include-xml-format.patch b/0006-better-error-for-wrong-include-xml-format.patch new file mode 100644 index 0000000..539b3a8 --- /dev/null +++ b/0006-better-error-for-wrong-include-xml-format.patch @@ -0,0 +1,33 @@ +From c3b6e3d0bab224b1bf829c7e16a16a4fdfb1bf7a Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Thu, 10 Nov 2022 10:42:30 +0100 +Subject: [PATCH 6/6] better error for wrong include xml format + +(cherry picked from commit 8b1030f8635ba2688630adf951ac849197c19cd8) +--- + plugins/builder/kiwi.py | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py +index 4033b520..bc216c2e 100644 +--- a/plugins/builder/kiwi.py ++++ b/plugins/builder/kiwi.py +@@ -204,9 +204,12 @@ class KiwiCreateImageTask(BaseBuildTask): + raise koji.GenericError(f"Unhandled include protocol in include path: {path}.") + inc = xml.dom.minidom.parse(path) # nosec + # every included xml has image root element again +- for node in list(inc.getElementsByTagName('image')[0].childNodes): +- if node.nodeName != 'repository': +- image.appendChild(node) ++ try: ++ for node in list(inc.getElementsByTagName('image')[0].childNodes): ++ if node.nodeName != 'repository': ++ image.appendChild(node) ++ except IndexError: ++ raise koji.GenericError("Included file needs to contain tag.") + image.removeChild(inc_node) + + # remove remaining old repos +-- +2.38.1 + diff --git a/koji.spec b/koji.spec index 8bce502..a9fb61c 100644 --- a/koji.spec +++ b/koji.spec @@ -9,21 +9,24 @@ Name: koji Version: 1.30.1 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +# Backports +Patch0001: 0001-kiwi-propagate-type-option.patch +Patch0002: 0002-fix-additional-commas.patch +Patch0003: 0003-kiwi-don-t-bind-builders-s-dev.patch +Patch0004: 0004-allow-to-set-it-by-user.patch +Patch0005: 0005-fix-include-path.patch + # Proposed upstream -## From: https://pagure.io/koji/pull-request/3555 -Patch1: 3555.patch -## From: https://pagure.io/koji/pull-request/3558 -Patch2: 3558.patch # Not upstreamable -Patch100: fedora-config.patch +Patch1000: fedora-config.patch BuildArch: noarch Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} @@ -353,6 +356,9 @@ done %systemd_postun kojira.service %changelog +* Sat Nov 05 2022 Igor Raits - 1.30.1-3 +- Update kiwi patchset + * Tue Oct 25 2022 Neal Gompa - 1.30.1-2 - Backport more fixes for kiwibuild command for CBS From dd2a3cd647392597afff5cbb9c5c4e5dac85d379 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 21 Nov 2022 09:42:25 -0800 Subject: [PATCH 194/202] Update to 1.31.0. Fixes rhbz#2144498 --- .gitignore | 1 + 3555.patch | 35 ------------ 3558.patch | 155 ----------------------------------------------------- koji.spec | 13 ++--- sources | 2 +- 5 files changed, 7 insertions(+), 199 deletions(-) delete mode 100644 3555.patch delete mode 100644 3558.patch diff --git a/.gitignore b/.gitignore index 42c4921..db5fed2 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ koji-1.4.0.tar.bz2 /koji-1.29.1.tar.bz2 /koji-1.30.0.tar.bz2 /koji-1.30.1.tar.bz2 +/koji-1.31.0.tar.bz2 diff --git a/3555.patch b/3555.patch deleted file mode 100644 index 797ef5d..0000000 --- a/3555.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 18bbb5b21d4da8120fb9f3193248dd6faa915222 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Oct 17 2022 12:39:48 +0000 -Subject: fix include path - - -Related: https://pagure.io/koji/issue/3553 - ---- - -diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 42aa707..abb5511 100644 ---- a/plugins/builder/kiwi.py -+++ b/plugins/builder/kiwi.py -@@ -197,16 +197,17 @@ class KiwiCreateImageTask(BaseBuildTask): - for inc_node in image.getElementsByTagName('include'): - path = inc_node.getAttribute('from') - if path.startswith('this://'): -- path = koji.util.joinpath(desc_path, path[7:]) -+ path = koji.util.joinpath(os.path.dirname(desc_path), path[7:]) - else: - # we want to reject other protocols, e.g. file://, https:// - # reachingoutside of repo - raise koji.GenericError(f"Unhandled include protocol in include path: {path}.") - inc = xml.dom.minidom.parse(path) # nosec - # every included xml has image root element again -- for node in inc.getElementsByTagName('image').childNodes: -+ for node in list(inc.getElementsByTagName('image')[0].childNodes): - if node.nodeName != 'repository': - image.appendChild(node) -+ image.removeChild(inc_node) - - # remove remaining old repos - for old_repo in image.getElementsByTagName('repository'): - diff --git a/3558.patch b/3558.patch deleted file mode 100644 index 03fb1ab..0000000 --- a/3558.patch +++ /dev/null @@ -1,155 +0,0 @@ -From e6a9553e9c5850c8c1b9361f84f2f9dbb426ef4c Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Oct 25 2022 10:25:49 +0000 -Subject: kiwi: propagate --type option - - -Related: https://pagure.io/koji/issue/3556 - ---- - -diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 42aa707..7d6f6e7 100644 ---- a/plugins/builder/kiwi.py -+++ b/plugins/builder/kiwi.py -@@ -325,11 +325,11 @@ class KiwiCreateImageTask(BaseBuildTask): - 'user_id': self.taskinfo['owner'], - 'channel': self.session.getChannel(self.taskinfo['channel_id'], - strict=True)['name'], -- 'scratch': self.opts.get('scratch') -+ 'scratch': self.opts.get('scratch', False) - }) - logfile = os.path.join(self.workdir, 'checkout-%s.log' % arch) - self.run_callbacks('preSCMCheckout', scminfo=scm.get_info(), -- build_tag=build_tag, scratch=self.opts.get('scratch')) -+ build_tag=build_tag, scratch=self.opts.get('scratch', False)) - scmdir = broot.tmpdir() - koji.ensuredir(scmdir) - scmsrcdir = scm.checkout(scmdir, self.session, -@@ -337,7 +337,7 @@ class KiwiCreateImageTask(BaseBuildTask): - self.run_callbacks("postSCMCheckout", - scminfo=scm.get_info(), - build_tag=build_tag, -- scratch=self.opts.get('scratch'), -+ scratch=self.opts.get('scratch', False), - srcdir=scmsrcdir) - - # user repos -@@ -365,6 +365,8 @@ class KiwiCreateImageTask(BaseBuildTask): - cmd = ['kiwi-ng'] - if self.opts.get('profile'): - cmd.extend(['--profile', self.opts['profile']]) -+ if self.opts.get('type'): -+ cmd.extend(['--type', self.opts['type']]) - target_dir = '/builddir/result/image' - cmd.extend([ - '--kiwi-file', os.path.basename(desc), # global option for image/system commands -diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py -index 8786b13..07125d7 100644 ---- a/plugins/cli/kiwi.py -+++ b/plugins/cli/kiwi.py -@@ -27,6 +27,7 @@ def handle_kiwi_build(goptions, session, args): - help="Do not display progress of the upload") - parser.add_option("--kiwi-profile", action="store", default=None, - help="Select profile from description file") -+ parser.add_option("--type", help="Override default build type from description") - parser.add_option("--make-prep", action="store_true", default=False, - help="Run 'make prep' in checkout before starting the build") - parser.add_option("--can-fail", action="store", dest="optional_arches", -@@ -46,28 +47,33 @@ def handle_kiwi_build(goptions, session, args): - target, scm, path = args - - activate_session(session, goptions) -- - kwargs = { -- 'scratch': options.scratch, -- 'optional_arches': [canonArch(arch) -- for arch in options.optional_arches.split(',') -- if arch], -- 'profile': options.kiwi_profile, -- 'release': options.release, -- 'make_prep': options.make_prep, -+ 'arches': [], -+ 'target': target, -+ 'desc_url': scm, -+ 'desc_path': path, - } -- -- arches = [] -+ if options.scratch: -+ kwargs['scratch'] = True -+ if options.optional_arches: -+ kwargs['optional_arches'] = [ -+ canonArch(arch) -+ for arch in options.optional_arches.split(',') -+ if arch] -+ if options.kiwi_profile: -+ kwargs['profile'] = options.kiwi_profile, -+ if options.release: -+ kwargs['release'] = options.release -+ if options.make_prep: -+ kwargs['make_prep'] = True -+ if options.type: -+ kwargs['type'] = options.type - if options.arches: -- arches = [canonArch(arch) for arch in options.arches] -+ kwargs['arches'] = [canonArch(arch) for arch in options.arches] -+ if options.repo: -+ kwargs['repos'] = options.repo - -- task_id = session.kiwiBuild( -- target=target, -- arches=arches, -- desc_url=scm, -- desc_path=path, -- repos=options.repo, -- **kwargs) -+ task_id = session.kiwiBuild(**kwargs) - - if not goptions.quiet: - print("Created task: %d" % task_id) -diff --git a/plugins/hub/kiwi.py b/plugins/hub/kiwi.py -index 79da38a..17b8e8e 100644 ---- a/plugins/hub/kiwi.py -+++ b/plugins/hub/kiwi.py -@@ -16,7 +16,8 @@ koji.tasks.LEGACY_SIGNATURES['createKiwiImage'] = [ - - @export - def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile=None, -- scratch=False, priority=None, make_prep=False, repos=None, release=None): -+ scratch=False, priority=None, make_prep=False, repos=None, release=None, -+ type=None): - context.session.assertPerm('image') - for i in [desc_url, desc_path, profile, release]: - if i is not None: -@@ -42,14 +43,21 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile - 'only admins may create high-priority tasks') - taskOpts['priority'] = koji.PRIO_DEFAULT + priority - -- opts = { -- 'optional_arches': optional_arches, -- 'profile': profile, -- 'scratch': bool(scratch), -- 'release': release, -- 'repos': repos or [], -- 'make_prep': bool(make_prep), -- } -+ opts = {} -+ if scratch: -+ opts['scratch'] = True -+ if profile: -+ opts['profile'] = profile -+ if release: -+ opts['release'] = release -+ if optional_arches: -+ opts['optional_arches'] = optional_arches, -+ if repos: -+ opts['repos'] = repos -+ if make_prep: -+ opts['make_prep'] = True -+ if type: -+ opts['type'] = type - return kojihub.make_task('kiwiBuild', - [target, arches, desc_url, desc_path, opts], - **taskOpts) - diff --git a/koji.spec b/koji.spec index 8bce502..9f805ef 100644 --- a/koji.spec +++ b/koji.spec @@ -8,20 +8,14 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.30.1 -Release: 2%{?dist} +Version: 1.31.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# Proposed upstream -## From: https://pagure.io/koji/pull-request/3555 -Patch1: 3555.patch -## From: https://pagure.io/koji/pull-request/3558 -Patch2: 3558.patch - # Not upstreamable Patch100: fedora-config.patch @@ -353,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Mon Nov 21 2022 Kevin Fenzi - 1.31.0-1 +- Update to 1.31.0. Fixes rhbz#2144498 + * Tue Oct 25 2022 Neal Gompa - 1.30.1-2 - Backport more fixes for kiwibuild command for CBS diff --git a/sources b/sources index 6e850c3..f5a1c63 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.30.1.tar.bz2) = d5b0ca21c8f09a6346273c449f643a93a1edaabea82ea6d19aeba057c1d770c980f28545f42cb6bb2f28e8e20784b7c7c65f4bf2ce4957138f86bbab7925ee4b +SHA512 (koji-1.31.0.tar.bz2) = 8be8e72182f1c33dea7d308708f71a9c6bcfe896348c1ccc640a07a216070cb0951ee8dfc103897239a687dbd54c5544bc29cbb15ca09083852e3aa428f03887 From 7d7f8b27e13a9d2d6a5056c9bf98a4c7263ed343 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 21 Nov 2022 09:54:24 -0800 Subject: [PATCH 195/202] Update to 1.31.1. Fixes rhbz#2144498 --- .gitignore | 1 + 0001-kiwi-propagate-type-option.patch | 160 ------------------ 0002-fix-additional-commas.patch | 40 ----- 0003-kiwi-don-t-bind-builders-s-dev.patch | 27 --- 0004-allow-to-set-it-by-user.patch | 83 --------- 0005-fix-include-path.patch | 38 ----- ...r-error-for-wrong-include-xml-format.patch | 33 ---- koji.spec | 16 +- sources | 2 +- 9 files changed, 7 insertions(+), 393 deletions(-) delete mode 100644 0001-kiwi-propagate-type-option.patch delete mode 100644 0002-fix-additional-commas.patch delete mode 100644 0003-kiwi-don-t-bind-builders-s-dev.patch delete mode 100644 0004-allow-to-set-it-by-user.patch delete mode 100644 0005-fix-include-path.patch delete mode 100644 0006-better-error-for-wrong-include-xml-format.patch diff --git a/.gitignore b/.gitignore index 42c4921..db5fed2 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ koji-1.4.0.tar.bz2 /koji-1.29.1.tar.bz2 /koji-1.30.0.tar.bz2 /koji-1.30.1.tar.bz2 +/koji-1.31.0.tar.bz2 diff --git a/0001-kiwi-propagate-type-option.patch b/0001-kiwi-propagate-type-option.patch deleted file mode 100644 index 68b1e65..0000000 --- a/0001-kiwi-propagate-type-option.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 7fd19f2239004fcf4e8060a45b75acef255b2457 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Tue, 18 Oct 2022 14:49:59 +0200 -Subject: [PATCH 1/6] kiwi: propagate --type option - -Related: https://pagure.io/koji/issue/3556 -(cherry picked from commit 6083bace39ba891d6b5db5354de356f2704fa4a1) ---- - plugins/builder/kiwi.py | 8 +++++--- - plugins/cli/kiwi.py | 42 +++++++++++++++++++++++------------------ - plugins/hub/kiwi.py | 26 ++++++++++++++++--------- - 3 files changed, 46 insertions(+), 30 deletions(-) - -diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 42aa7071..7d6f6e7e 100644 ---- a/plugins/builder/kiwi.py -+++ b/plugins/builder/kiwi.py -@@ -325,11 +325,11 @@ class KiwiCreateImageTask(BaseBuildTask): - 'user_id': self.taskinfo['owner'], - 'channel': self.session.getChannel(self.taskinfo['channel_id'], - strict=True)['name'], -- 'scratch': self.opts.get('scratch') -+ 'scratch': self.opts.get('scratch', False) - }) - logfile = os.path.join(self.workdir, 'checkout-%s.log' % arch) - self.run_callbacks('preSCMCheckout', scminfo=scm.get_info(), -- build_tag=build_tag, scratch=self.opts.get('scratch')) -+ build_tag=build_tag, scratch=self.opts.get('scratch', False)) - scmdir = broot.tmpdir() - koji.ensuredir(scmdir) - scmsrcdir = scm.checkout(scmdir, self.session, -@@ -337,7 +337,7 @@ class KiwiCreateImageTask(BaseBuildTask): - self.run_callbacks("postSCMCheckout", - scminfo=scm.get_info(), - build_tag=build_tag, -- scratch=self.opts.get('scratch'), -+ scratch=self.opts.get('scratch', False), - srcdir=scmsrcdir) - - # user repos -@@ -365,6 +365,8 @@ class KiwiCreateImageTask(BaseBuildTask): - cmd = ['kiwi-ng'] - if self.opts.get('profile'): - cmd.extend(['--profile', self.opts['profile']]) -+ if self.opts.get('type'): -+ cmd.extend(['--type', self.opts['type']]) - target_dir = '/builddir/result/image' - cmd.extend([ - '--kiwi-file', os.path.basename(desc), # global option for image/system commands -diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py -index 8786b135..07125d75 100644 ---- a/plugins/cli/kiwi.py -+++ b/plugins/cli/kiwi.py -@@ -27,6 +27,7 @@ def handle_kiwi_build(goptions, session, args): - help="Do not display progress of the upload") - parser.add_option("--kiwi-profile", action="store", default=None, - help="Select profile from description file") -+ parser.add_option("--type", help="Override default build type from description") - parser.add_option("--make-prep", action="store_true", default=False, - help="Run 'make prep' in checkout before starting the build") - parser.add_option("--can-fail", action="store", dest="optional_arches", -@@ -46,28 +47,33 @@ def handle_kiwi_build(goptions, session, args): - target, scm, path = args - - activate_session(session, goptions) -- - kwargs = { -- 'scratch': options.scratch, -- 'optional_arches': [canonArch(arch) -- for arch in options.optional_arches.split(',') -- if arch], -- 'profile': options.kiwi_profile, -- 'release': options.release, -- 'make_prep': options.make_prep, -+ 'arches': [], -+ 'target': target, -+ 'desc_url': scm, -+ 'desc_path': path, - } -- -- arches = [] -+ if options.scratch: -+ kwargs['scratch'] = True -+ if options.optional_arches: -+ kwargs['optional_arches'] = [ -+ canonArch(arch) -+ for arch in options.optional_arches.split(',') -+ if arch] -+ if options.kiwi_profile: -+ kwargs['profile'] = options.kiwi_profile, -+ if options.release: -+ kwargs['release'] = options.release -+ if options.make_prep: -+ kwargs['make_prep'] = True -+ if options.type: -+ kwargs['type'] = options.type - if options.arches: -- arches = [canonArch(arch) for arch in options.arches] -+ kwargs['arches'] = [canonArch(arch) for arch in options.arches] -+ if options.repo: -+ kwargs['repos'] = options.repo - -- task_id = session.kiwiBuild( -- target=target, -- arches=arches, -- desc_url=scm, -- desc_path=path, -- repos=options.repo, -- **kwargs) -+ task_id = session.kiwiBuild(**kwargs) - - if not goptions.quiet: - print("Created task: %d" % task_id) -diff --git a/plugins/hub/kiwi.py b/plugins/hub/kiwi.py -index 79da38a9..17b8e8e4 100644 ---- a/plugins/hub/kiwi.py -+++ b/plugins/hub/kiwi.py -@@ -16,7 +16,8 @@ koji.tasks.LEGACY_SIGNATURES['createKiwiImage'] = [ - - @export - def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile=None, -- scratch=False, priority=None, make_prep=False, repos=None, release=None): -+ scratch=False, priority=None, make_prep=False, repos=None, release=None, -+ type=None): - context.session.assertPerm('image') - for i in [desc_url, desc_path, profile, release]: - if i is not None: -@@ -42,14 +43,21 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile - 'only admins may create high-priority tasks') - taskOpts['priority'] = koji.PRIO_DEFAULT + priority - -- opts = { -- 'optional_arches': optional_arches, -- 'profile': profile, -- 'scratch': bool(scratch), -- 'release': release, -- 'repos': repos or [], -- 'make_prep': bool(make_prep), -- } -+ opts = {} -+ if scratch: -+ opts['scratch'] = True -+ if profile: -+ opts['profile'] = profile -+ if release: -+ opts['release'] = release -+ if optional_arches: -+ opts['optional_arches'] = optional_arches, -+ if repos: -+ opts['repos'] = repos -+ if make_prep: -+ opts['make_prep'] = True -+ if type: -+ opts['type'] = type - return kojihub.make_task('kiwiBuild', - [target, arches, desc_url, desc_path, opts], - **taskOpts) --- -2.38.1 - diff --git a/0002-fix-additional-commas.patch b/0002-fix-additional-commas.patch deleted file mode 100644 index 9a0c4d9..0000000 --- a/0002-fix-additional-commas.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0ccf95b7aa3332585217d5da2ff7b255e9cd4b14 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Fri, 4 Nov 2022 10:06:48 +0100 -Subject: [PATCH 2/6] fix additional commas - -(cherry picked from commit 066e7427efca7a581cb1a63974dfdfec8194bd70) ---- - plugins/cli/kiwi.py | 2 +- - plugins/hub/kiwi.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py -index 07125d75..6e965c05 100644 ---- a/plugins/cli/kiwi.py -+++ b/plugins/cli/kiwi.py -@@ -61,7 +61,7 @@ def handle_kiwi_build(goptions, session, args): - for arch in options.optional_arches.split(',') - if arch] - if options.kiwi_profile: -- kwargs['profile'] = options.kiwi_profile, -+ kwargs['profile'] = options.kiwi_profile - if options.release: - kwargs['release'] = options.release - if options.make_prep: -diff --git a/plugins/hub/kiwi.py b/plugins/hub/kiwi.py -index 17b8e8e4..7b0c2f05 100644 ---- a/plugins/hub/kiwi.py -+++ b/plugins/hub/kiwi.py -@@ -51,7 +51,7 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile - if release: - opts['release'] = release - if optional_arches: -- opts['optional_arches'] = optional_arches, -+ opts['optional_arches'] = optional_arches - if repos: - opts['repos'] = repos - if make_prep: --- -2.38.1 - diff --git a/0003-kiwi-don-t-bind-builders-s-dev.patch b/0003-kiwi-don-t-bind-builders-s-dev.patch deleted file mode 100644 index 0117eb8..0000000 --- a/0003-kiwi-don-t-bind-builders-s-dev.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 39cfeea12a38df825e264ce3a71489f35d4b95c3 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Mon, 31 Oct 2022 13:09:19 +0100 -Subject: [PATCH 3/6] kiwi: don't bind builders's /dev - -Related: https://pagure.io/koji/issue/3567 -(cherry picked from commit 655cb9797fe85f8dc1244f233da2919abfa1548f) ---- - plugins/builder/kiwi.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 7d6f6e7e..e220d515 100644 ---- a/plugins/builder/kiwi.py -+++ b/plugins/builder/kiwi.py -@@ -307,7 +307,7 @@ class KiwiCreateImageTask(BaseBuildTask): - repo_id=repo_info['id'], - install_group='kiwi-build', - setup_dns=True, -- bind_opts={'dirs': {'/dev': '/dev', }}) -+ bind_opts={'dirs': {}}) - broot.workdir = self.workdir - - # create the mock chroot --- -2.38.1 - diff --git a/0004-allow-to-set-it-by-user.patch b/0004-allow-to-set-it-by-user.patch deleted file mode 100644 index f2c5078..0000000 --- a/0004-allow-to-set-it-by-user.patch +++ /dev/null @@ -1,83 +0,0 @@ -From a08967bce60d50ec1d27741512dc96f6ed546594 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Fri, 4 Nov 2022 10:13:16 +0100 -Subject: [PATCH 4/6] allow to set it by user - -(cherry picked from commit 5dcf480a401581442ace9b17e9c2a06241885ae6) ---- - plugins/builder/kiwi.py | 6 +++++- - plugins/cli/kiwi.py | 4 ++++ - plugins/hub/kiwi.py | 4 +++- - 3 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index e220d515..b70a13a3 100644 ---- a/plugins/builder/kiwi.py -+++ b/plugins/builder/kiwi.py -@@ -300,6 +300,10 @@ class KiwiCreateImageTask(BaseBuildTask): - desc_url, desc_path, opts=None): - self.opts = opts - build_tag = target_info['build_tag'] -+ if opts.get('bind_dev'): -+ bind_opts = {'dirs': {'/dev': '/dev'}} -+ else: -+ bind_opts = None - broot = BuildRoot(self.session, self.options, - tag=build_tag, - arch=arch, -@@ -307,7 +311,7 @@ class KiwiCreateImageTask(BaseBuildTask): - repo_id=repo_info['id'], - install_group='kiwi-build', - setup_dns=True, -- bind_opts={'dirs': {}}) -+ bind_opts=bind_opts) - broot.workdir = self.workdir - - # create the mock chroot -diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py -index 6e965c05..61764efb 100644 ---- a/plugins/cli/kiwi.py -+++ b/plugins/cli/kiwi.py -@@ -30,6 +30,9 @@ def handle_kiwi_build(goptions, session, args): - parser.add_option("--type", help="Override default build type from description") - parser.add_option("--make-prep", action="store_true", default=False, - help="Run 'make prep' in checkout before starting the build") -+ parser.add_option("--bind-dev", action="store_true", default=False, -+ help="e.g. images using device-mapper needs /dev mounted in kiwi env, " -+ "while others can fail in such env.") - parser.add_option("--can-fail", action="store", dest="optional_arches", - metavar="ARCH1,ARCH2,...", default="", - help="List of archs which are not blocking for build " -@@ -52,6 +55,7 @@ def handle_kiwi_build(goptions, session, args): - 'target': target, - 'desc_url': scm, - 'desc_path': path, -+ 'bind_dev': options.bind_dev, - } - if options.scratch: - kwargs['scratch'] = True -diff --git a/plugins/hub/kiwi.py b/plugins/hub/kiwi.py -index 7b0c2f05..f83b209d 100644 ---- a/plugins/hub/kiwi.py -+++ b/plugins/hub/kiwi.py -@@ -17,7 +17,7 @@ koji.tasks.LEGACY_SIGNATURES['createKiwiImage'] = [ - @export - def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile=None, - scratch=False, priority=None, make_prep=False, repos=None, release=None, -- type=None): -+ type=None, bind_dev=False): - context.session.assertPerm('image') - for i in [desc_url, desc_path, profile, release]: - if i is not None: -@@ -52,6 +52,8 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile - opts['release'] = release - if optional_arches: - opts['optional_arches'] = optional_arches -+ if bind_dev: -+ opts['bind_dev'] = bind_dev - if repos: - opts['repos'] = repos - if make_prep: --- -2.38.1 - diff --git a/0005-fix-include-path.patch b/0005-fix-include-path.patch deleted file mode 100644 index 8dbbb21..0000000 --- a/0005-fix-include-path.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 3a4286be435f6e734c528ab3a649cfd7d44e1338 Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Mon, 17 Oct 2022 12:26:55 +0200 -Subject: [PATCH 5/6] fix include path - -Related: https://pagure.io/koji/issue/3553 -(cherry picked from commit b8b52884b5208dc7ea25881108b7da5eb3d9fc86) ---- - plugins/builder/kiwi.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index b70a13a3..4033b520 100644 ---- a/plugins/builder/kiwi.py -+++ b/plugins/builder/kiwi.py -@@ -197,16 +197,17 @@ class KiwiCreateImageTask(BaseBuildTask): - for inc_node in image.getElementsByTagName('include'): - path = inc_node.getAttribute('from') - if path.startswith('this://'): -- path = koji.util.joinpath(desc_path, path[7:]) -+ path = koji.util.joinpath(os.path.dirname(desc_path), path[7:]) - else: - # we want to reject other protocols, e.g. file://, https:// - # reachingoutside of repo - raise koji.GenericError(f"Unhandled include protocol in include path: {path}.") - inc = xml.dom.minidom.parse(path) # nosec - # every included xml has image root element again -- for node in inc.getElementsByTagName('image').childNodes: -+ for node in list(inc.getElementsByTagName('image')[0].childNodes): - if node.nodeName != 'repository': - image.appendChild(node) -+ image.removeChild(inc_node) - - # remove remaining old repos - for old_repo in image.getElementsByTagName('repository'): --- -2.38.1 - diff --git a/0006-better-error-for-wrong-include-xml-format.patch b/0006-better-error-for-wrong-include-xml-format.patch deleted file mode 100644 index 539b3a8..0000000 --- a/0006-better-error-for-wrong-include-xml-format.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c3b6e3d0bab224b1bf829c7e16a16a4fdfb1bf7a Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Thu, 10 Nov 2022 10:42:30 +0100 -Subject: [PATCH 6/6] better error for wrong include xml format - -(cherry picked from commit 8b1030f8635ba2688630adf951ac849197c19cd8) ---- - plugins/builder/kiwi.py | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py -index 4033b520..bc216c2e 100644 ---- a/plugins/builder/kiwi.py -+++ b/plugins/builder/kiwi.py -@@ -204,9 +204,12 @@ class KiwiCreateImageTask(BaseBuildTask): - raise koji.GenericError(f"Unhandled include protocol in include path: {path}.") - inc = xml.dom.minidom.parse(path) # nosec - # every included xml has image root element again -- for node in list(inc.getElementsByTagName('image')[0].childNodes): -- if node.nodeName != 'repository': -- image.appendChild(node) -+ try: -+ for node in list(inc.getElementsByTagName('image')[0].childNodes): -+ if node.nodeName != 'repository': -+ image.appendChild(node) -+ except IndexError: -+ raise koji.GenericError("Included file needs to contain tag.") - image.removeChild(inc_node) - - # remove remaining old repos --- -2.38.1 - diff --git a/koji.spec b/koji.spec index a9fb61c..075484a 100644 --- a/koji.spec +++ b/koji.spec @@ -8,23 +8,14 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.30.1 -Release: 3%{?dist} +Version: 1.31.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# Backports -Patch0001: 0001-kiwi-propagate-type-option.patch -Patch0002: 0002-fix-additional-commas.patch -Patch0003: 0003-kiwi-don-t-bind-builders-s-dev.patch -Patch0004: 0004-allow-to-set-it-by-user.patch -Patch0005: 0005-fix-include-path.patch - -# Proposed upstream - # Not upstreamable Patch1000: fedora-config.patch @@ -356,6 +347,9 @@ done %systemd_postun kojira.service %changelog +* Mon Nov 21 2022 Kevin Fenzi - 1.31.0-1 +- Update to 1.31.1. Fixes rhbz#2144498 + * Sat Nov 05 2022 Igor Raits - 1.30.1-3 - Update kiwi patchset diff --git a/sources b/sources index 6e850c3..f5a1c63 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.30.1.tar.bz2) = d5b0ca21c8f09a6346273c449f643a93a1edaabea82ea6d19aeba057c1d770c980f28545f42cb6bb2f28e8e20784b7c7c65f4bf2ce4957138f86bbab7925ee4b +SHA512 (koji-1.31.0.tar.bz2) = 8be8e72182f1c33dea7d308708f71a9c6bcfe896348c1ccc640a07a216070cb0951ee8dfc103897239a687dbd54c5544bc29cbb15ca09083852e3aa428f03887 From 5d656fb4388b8f1342258d9bcebbf56d49b34c9f Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 13 Jan 2023 13:23:55 -0800 Subject: [PATCH 196/202] Update to 1.31.1. Fixes rhbz#2160428 --- .gitignore | 1 + koji.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index db5fed2..b4ca98e 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ koji-1.4.0.tar.bz2 /koji-1.30.0.tar.bz2 /koji-1.30.1.tar.bz2 /koji-1.31.0.tar.bz2 +/koji-1.31.1.tar.bz2 diff --git a/koji.spec b/koji.spec index 9f805ef..e715629 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.31.0 +Version: 1.31.1 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -206,7 +206,7 @@ sed -e '/util\/koji/g' -e '/koji_cli_plugins/g' -i setup.py %py3_install_wheel %{name}-%{version}-py3-none-any.whl mkdir -p %{buildroot}/etc/koji.conf.d cp cli/koji.conf %{buildroot}/etc/koji.conf -for D in hub builder plugins util www vm ; do +for D in kojihub builder plugins util www vm ; do pushd $D make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install popd @@ -260,6 +260,7 @@ done %files -n python%{python3_pkgversion}-%{name}-hub %{_datadir}/koji-hub/*.py %{_datadir}/koji-hub/__pycache__ +%{python3_sitelib}/kojihub %files hub-plugins %dir /etc/koji-hub/plugins @@ -347,6 +348,9 @@ done %systemd_postun kojira.service %changelog +* Thu Jan 12 2023 Kevin Fenzi - 1.31.1-1 +- Update to 1.31.1. Fixes rhbz#2160428 + * Mon Nov 21 2022 Kevin Fenzi - 1.31.0-1 - Update to 1.31.0. Fixes rhbz#2144498 diff --git a/sources b/sources index f5a1c63..05e846f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.31.0.tar.bz2) = 8be8e72182f1c33dea7d308708f71a9c6bcfe896348c1ccc640a07a216070cb0951ee8dfc103897239a687dbd54c5544bc29cbb15ca09083852e3aa428f03887 +SHA512 (koji-1.31.1.tar.bz2) = 9f1fe63ba212343e20b6ed22a37889b68cbce9e0371868d0b8d3a685ed0a5c183399523e60fd6f37a1ea993c035b14f855d0f10960186c63d53c9a1b2b2dc503 From 1ca3e31181fe79b6d3d665c5e5026890cd1f0612 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 15:01:38 +0000 Subject: [PATCH 197/202] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- koji.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index e715629..8db96a4 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.31.1 -Release: 1%{?dist} +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -348,6 +348,9 @@ done %systemd_postun kojira.service %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1.31.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jan 12 2023 Kevin Fenzi - 1.31.1-1 - Update to 1.31.1. Fixes rhbz#2160428 From e0336fe8123683c2ac573a2fc2f2cf0fc0300879 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 16 Feb 2023 10:33:17 -0800 Subject: [PATCH 198/202] Update to 1.32.0. Fixes rhbz#2170361 --- .gitignore | 1 + koji.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b4ca98e..bfe5818 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ koji-1.4.0.tar.bz2 /koji-1.30.1.tar.bz2 /koji-1.31.0.tar.bz2 /koji-1.31.1.tar.bz2 +/koji-1.32.0.tar.bz2 diff --git a/koji.spec b/koji.spec index 8db96a4..9660252 100644 --- a/koji.spec +++ b/koji.spec @@ -8,8 +8,8 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.31.1 -Release: 2%{?dist} +Version: 1.32.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -348,6 +348,9 @@ done %systemd_postun kojira.service %changelog +* Thu Feb 16 2023 Kevin Fenzi - 1.32.0-1 +- Update to 1.32.0. Fixes rhbz#2170361 + * Thu Jan 19 2023 Fedora Release Engineering - 1.31.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 05e846f..15cbfbe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.31.1.tar.bz2) = 9f1fe63ba212343e20b6ed22a37889b68cbce9e0371868d0b8d3a685ed0a5c183399523e60fd6f37a1ea993c035b14f855d0f10960186c63d53c9a1b2b2dc503 +SHA512 (koji-1.32.0.tar.bz2) = 14a31ebec8e65aa1f31f14baed63df9e1a47f760c3b5b97201853f06333cc03db74f634dae31108ce7dfee4b4f5ad7fade209311440dfbf69208a42a5898c034 From 61b9bdb0a2b5cd624be2bfbe2a0901348720d87a Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 4 Apr 2023 15:08:23 -0700 Subject: [PATCH 199/202] Update tp 1.32.1. Fixes rhbz#2184380 --- .gitignore | 1 + koji.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bfe5818..6fe3365 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ koji-1.4.0.tar.bz2 /koji-1.31.0.tar.bz2 /koji-1.31.1.tar.bz2 /koji-1.32.0.tar.bz2 +/koji-1.32.1.tar.bz2 diff --git a/koji.spec b/koji.spec index 9660252..8a58640 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.32.0 +Version: 1.32.1 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -348,6 +348,9 @@ done %systemd_postun kojira.service %changelog +* Tue Apr 04 2023 Kevin Fenzi - 1.32.1-1 +- Update tp 1.32.1. Fixes rhbz#2184380 + * Thu Feb 16 2023 Kevin Fenzi - 1.32.0-1 - Update to 1.32.0. Fixes rhbz#2170361 diff --git a/sources b/sources index 15cbfbe..51ea94f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.32.0.tar.bz2) = 14a31ebec8e65aa1f31f14baed63df9e1a47f760c3b5b97201853f06333cc03db74f634dae31108ce7dfee4b4f5ad7fade209311440dfbf69208a42a5898c034 +SHA512 (koji-1.32.1.tar.bz2) = b83a578e01c25e98f7f54b8d89970537cec963ae66495e34c00c3c5c554e5a3370fb76f611b52e5b28b2d99f6a7618e84ca1a1da5b86aaf3a4766fae3753862a From 2f63c449d4a2200a9729c9a43d652d21c67797d5 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 24 May 2023 16:03:19 -0700 Subject: [PATCH 200/202] Update to 1.33.0. Fixes rhbz#2209371 --- .gitignore | 1 + koji.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6fe3365..02a300b 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ koji-1.4.0.tar.bz2 /koji-1.31.1.tar.bz2 /koji-1.32.0.tar.bz2 /koji-1.32.1.tar.bz2 +/koji-1.33.0.tar.bz2 diff --git a/koji.spec b/koji.spec index 8a58640..3aa4c2b 100644 --- a/koji.spec +++ b/koji.spec @@ -8,7 +8,7 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.32.1 +Version: 1.33.0 Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ @@ -348,6 +348,9 @@ done %systemd_postun kojira.service %changelog +* Wed May 24 2023 Kevin Fenzi - 1.33.0-1 +- Update to 1.33.0. Fixes rhbz#2209371 + * Tue Apr 04 2023 Kevin Fenzi - 1.32.1-1 - Update tp 1.32.1. Fixes rhbz#2184380 diff --git a/sources b/sources index 51ea94f..f7db940 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.32.1.tar.bz2) = b83a578e01c25e98f7f54b8d89970537cec963ae66495e34c00c3c5c554e5a3370fb76f611b52e5b28b2d99f6a7618e84ca1a1da5b86aaf3a4766fae3753862a +SHA512 (koji-1.33.0.tar.bz2) = 63557ee2bd4581c32547f3f3ca513a77410415216494370d84436d10e527e828fbb70fe41d8f36d42e61085b0bed34f4bc97c51d27a6b680db52484635c15bf3 From 4bf436f2f8714d617d3c021f8447e53e867d2c21 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 30 Oct 2023 18:50:04 +0300 Subject: [PATCH 201/202] Remove unnecessary files --- sources | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sources diff --git a/sources b/sources deleted file mode 100644 index f7db940..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (koji-1.33.0.tar.bz2) = 63557ee2bd4581c32547f3f3ca513a77410415216494370d84436d10e527e828fbb70fe41d8f36d42e61085b0bed34f4bc97c51d27a6b680db52484635c15bf3 From bf1c33fd4d1c1a9cb3e1ef9afee52697ff75ba2b Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 20 Mar 2024 01:21:43 +0300 Subject: [PATCH 202/202] import koji-1.34.0-2.el9 --- .gitignore | 2 +- .koji.metadata | 2 +- ...961929a45ccae1d635b7e85a9d8826baf72d.patch | 29 +++ ...5927aeb3e3c052fc9208ca71133d9d097fc0.patch | 229 ++++++++++++++++++ ...18fa356f1aa2a1b5099e55e0af1c89ae4163.patch | 26 ++ SOURCES/3974.patch | 43 ++++ SOURCES/4013.patch | 52 ++++ SOURCES/4026.patch | 38 +++ SPECS/koji.spec | 50 +++- 9 files changed, 465 insertions(+), 6 deletions(-) create mode 100644 SOURCES/0251961929a45ccae1d635b7e85a9d8826baf72d.patch create mode 100644 SOURCES/1d515927aeb3e3c052fc9208ca71133d9d097fc0.patch create mode 100644 SOURCES/2a6e18fa356f1aa2a1b5099e55e0af1c89ae4163.patch create mode 100644 SOURCES/3974.patch create mode 100644 SOURCES/4013.patch create mode 100644 SOURCES/4026.patch diff --git a/.gitignore b/.gitignore index 68269f8..0f21b56 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/koji-1.33.0.tar.bz2 +SOURCES/koji-1.34.0.tar.bz2 diff --git a/.koji.metadata b/.koji.metadata index e721bdf..9228bfb 100644 --- a/.koji.metadata +++ b/.koji.metadata @@ -1 +1 @@ -bab50aad5ad51badf99ab1532af2e9be94b9c366 SOURCES/koji-1.33.0.tar.bz2 +5f67829ac737963d05fc5c337a42e5d6439d1004 SOURCES/koji-1.34.0.tar.bz2 diff --git a/SOURCES/0251961929a45ccae1d635b7e85a9d8826baf72d.patch b/SOURCES/0251961929a45ccae1d635b7e85a9d8826baf72d.patch new file mode 100644 index 0000000..c910262 --- /dev/null +++ b/SOURCES/0251961929a45ccae1d635b7e85a9d8826baf72d.patch @@ -0,0 +1,29 @@ +From 0251961929a45ccae1d635b7e85a9d8826baf72d Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Feb 07 2024 13:45:08 +0000 +Subject: PR#3989: Oz: don't hardcode the image size unit as 'G' + + +Merges #3989 +https://pagure.io/koji/pull-request/3989 + +Fixes: #3993 +https://pagure.io/koji/issue/3993 + Oz: don't hardcode the image size unit as 'G' + +--- + +diff --git a/builder/kojid b/builder/kojid +index fe35e47..b4536dd 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -4101,7 +4101,7 @@ class OzImageTask(BaseTaskHandler): + template += """ + %s OS + +- %sG ++ %s + + + """ % (name, self.opts.get('disk_size')) # noqa: E501 + diff --git a/SOURCES/1d515927aeb3e3c052fc9208ca71133d9d097fc0.patch b/SOURCES/1d515927aeb3e3c052fc9208ca71133d9d097fc0.patch new file mode 100644 index 0000000..9be3dcc --- /dev/null +++ b/SOURCES/1d515927aeb3e3c052fc9208ca71133d9d097fc0.patch @@ -0,0 +1,229 @@ +From 1d515927aeb3e3c052fc9208ca71133d9d097fc0 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Thu, 13 Apr 2023 11:12:40 +0200 +Subject: [PATCH] scmpolicy plugin + +--- + docs/source/defining_hub_policies.rst | 10 +++- + docs/source/plugins.rst | 30 ++++++++++- + koji/policy.py | 53 +++++++++++++++++++- + plugins/builder/scmpolicy.py | 72 +++++++++++++++++++++++++++ + 4 files changed, 162 insertions(+), 3 deletions(-) + create mode 100644 plugins/builder/scmpolicy.py + +diff --git a/docs/source/defining_hub_policies.rst b/docs/source/defining_hub_policies.rst +index a0b67eed..8f9cf2cd 100644 +--- a/docs/source/defining_hub_policies.rst ++++ b/docs/source/defining_hub_policies.rst +@@ -341,5 +341,13 @@ Available tests + * the user matched is the user performing the action + + ``match`` +- * matches a field in the data against glob patterns ++ * matches a field in the data against glob patterns + * true if any pattern matches ++ ++``match_any`` ++ * matches a field (of list/tuple/set type) in the data against glob patterns ++ * true if any field item matches all patterns ++ ++``match_all`` ++ * matches a field (of list/tuple/set type) in the data against glob patterns ++ * true if all field items match any pattern +diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst +index c370709a..d5b2d13f 100644 +--- a/docs/source/plugins.rst ++++ b/docs/source/plugins.rst +@@ -223,7 +223,7 @@ The ``[message]`` section sets parameters for how messages are formed. + Currently only one field is understood: + + * ``extra_limit`` -- the maximum allowed size for ``build.extra`` fields that +- appear in messages. If the ``build.extra`` field is longer (in terms of ++ appear in messages. If the ``build.extra`` field is longer (in terms of + json-encoded length), then it will be omitted. The default value is ``0`` + which means no limit. + +@@ -441,3 +441,31 @@ For example: + For each RPM in the tag, Koji will use the first signed copy that it finds. In other words, + Koji will try the first key (`45719a39`), and if Koji does not have the first key's signature + for that RPM, then it will try the second key (`9867c58f`), third key (`38ab71f4`), and so on. ++ ++Scm Policies ++============ ++ ++Basic filtering of allowed scms normally happens via standard ++``build_from_scm`` hub policy. Nevertheless, some relevant information can be ++only gathered after cloning the repo. Typical case is that admin would like to ++build content only from some set of allowed branches. If user specify the ++commit via hash, we don't have that information in moment of task creation. ++Just after cloning we can check existing branches and if the given commit is on ++some of the relevant ones. For this purpose there is special ++``postSCMCheckout`` plugin ``scmpolicy``. ++ ++Installation happens only on builder via editing ``/etc/kojid.conf`` by adding ++``plugin = scmpolicy`` there. Plugin itself is not configured but uses hub ++policy ``scm``. Policy data provided there are composed of two parts. First one ++are ``scm_*`` values which are same as in ``build_from_scm``. ++ ++.. code:: ++ ++ scm = ++ # allow scratch builds from any commits ++ bool scratch :: allow ++ # very safe scm, allow anything from there, but only to special target ++ match scm_host very.safe.git.org && buildtag testing-build-tag :: allow ++ match_all branches * !! deny Commit must be present on some branch ++ match_all branches private-* test-* :: deny Private/testing branches are not allowed ++ all :: allow +diff --git a/koji/policy.py b/koji/policy.py +index 729e02e5..8a570575 100644 +--- a/koji/policy.py ++++ b/koji/policy.py +@@ -25,7 +25,7 @@ import logging + import six + + import koji +-from koji.util import to_list ++from koji.util import to_list, multi_fnmatch + + + class BaseSimpleTest(object): +@@ -141,6 +141,57 @@ class MatchTest(BaseSimpleTest): + return False + + ++class MatchAnyTest(BaseSimpleTest): ++ """Matches any item of a list/tuple/set value in the data against glob patterns ++ ++ True if any of the expressions matches any item in the list/tuple/set, else False. ++ If the field doesn't exist or isn't a list/tuple/set, the test returns False ++ ++ Syntax: ++ find field pattern1 [pattern2 ...] ++ ++ """ ++ name = 'match_any' ++ field = None ++ ++ def run(self, data): ++ args = self.str.split()[1:] ++ self.field = args[0] ++ args = args[1:] ++ tgt = data.get(self.field) ++ if tgt and isinstance(tgt, (list, tuple, set)): ++ for i in tgt: ++ if i is not None and multi_fnmatch(str(i), args): ++ return True ++ return False ++ ++ ++class MatchAllTest(BaseSimpleTest): ++ """Matches all items of a list/tuple/set value in the data against glob patterns ++ ++ True if any of the expressions matches all items in the list/tuple/set, else False. ++ If the field doesn't exist or isn't a list/tuple/set, the test returns False ++ ++ Syntax: ++ match_all field pattern1 [pattern2 ...] ++ ++ """ ++ name = 'match_all' ++ field = None ++ ++ def run(self, data): ++ args = self.str.split()[1:] ++ self.field = args[0] ++ args = args[1:] ++ tgt = data.get(self.field) ++ if tgt and isinstance(tgt, (list, tuple, set)): ++ for i in tgt: ++ if i is None or not multi_fnmatch(str(i), args): ++ return False ++ return True ++ return False ++ ++ + class TargetTest(MatchTest): + """Matches target in the data against glob patterns + +diff --git a/plugins/builder/scmpolicy.py b/plugins/builder/scmpolicy.py +new file mode 100644 +index 00000000..f120e33b +--- /dev/null ++++ b/plugins/builder/scmpolicy.py +@@ -0,0 +1,72 @@ ++import logging ++import re ++import subprocess ++ ++import six ++ ++from koji import ActionNotAllowed, GenericError ++from koji.plugin import callback ++ ++ ++logger = logging.getLogger('koji.plugins.scmpolicy') ++ ++ ++@callback('postSCMCheckout') ++def assert_scm_policy(clb_type, *args, **kwargs): ++ taskinfo = kwargs['taskinfo'] ++ session = kwargs['session'] ++ build_tag = kwargs['build_tag'] ++ scminfo = kwargs['scminfo'] ++ srcdir = kwargs['srcdir'] ++ scratch = kwargs['scratch'] ++ ++ method = get_task_method(session, taskinfo) ++ ++ policy_data = { ++ 'build_tag': build_tag, ++ 'method': method, ++ 'scratch': scratch, ++ 'branches': get_branches(srcdir) ++ } ++ ++ # Merge scminfo into data with "scm_" prefix. And "scm*" are changed to "scm_*". ++ for k, v in six.iteritems(scminfo): ++ policy_data[re.sub(r'^(scm_?)?', 'scm_', k)] = v ++ ++ logger.info("Checking SCM policy for task %s", taskinfo['id']) ++ logger.debug("Policy data: %r", policy_data) ++ ++ # check the policy ++ try: ++ session.host.assertPolicy('scm', policy_data) ++ logger.info("SCM policy check for task %s: PASSED", taskinfo['id']) ++ except ActionNotAllowed: ++ logger.warning("SCM policy check for task %s: DENIED", taskinfo['id']) ++ raise ++ ++ ++def get_task_method(session, taskinfo): ++ """Get the Task method from taskinfo""" ++ method = None ++ if isinstance(taskinfo, six.integer_types): ++ taskinfo = session.getTaskInfo(taskinfo, strict=True) ++ if isinstance(taskinfo, dict): ++ method = taskinfo.get('method') ++ if method is None: ++ raise GenericError("Invalid taskinfo: %s" % taskinfo) ++ return method ++ ++ ++def get_branches(srcdir): ++ """Determine which remote branches contain the current checkout""" ++ cmd = ['git', 'branch', '-r', '--contains', 'HEAD'] ++ proc = subprocess.Popen(cmd, cwd=srcdir, stdout=subprocess.PIPE) ++ (out, _) = proc.communicate() ++ status = proc.wait() ++ if status != 0: ++ raise Exception('Error getting branches for git checkout') ++ ++ # cut off origin/ prefix ++ branches = [b.strip() for b in out.decode().split('\n') if 'origin/HEAD' not in b and b] ++ branches = [re.sub('^origin/', '', b) for b in branches] ++ return branches +-- +GitLab + diff --git a/SOURCES/2a6e18fa356f1aa2a1b5099e55e0af1c89ae4163.patch b/SOURCES/2a6e18fa356f1aa2a1b5099e55e0af1c89ae4163.patch new file mode 100644 index 0000000..71f07d5 --- /dev/null +++ b/SOURCES/2a6e18fa356f1aa2a1b5099e55e0af1c89ae4163.patch @@ -0,0 +1,26 @@ +From 2a6e18fa356f1aa2a1b5099e55e0af1c89ae4163 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Feb 05 2024 10:28:43 +0000 +Subject: typo in set_refusal + + +Fixes https://pagure.io/koji/issue/3997 + +--- + +diff --git a/kojihub/scheduler.py b/kojihub/scheduler.py +index 815b0f1..961ef39 100644 +--- a/kojihub/scheduler.py ++++ b/kojihub/scheduler.py +@@ -91,8 +91,8 @@ def get_tasks_for_host(hostID, retry=True): + + def set_refusal(hostID, taskID, soft=True, by_host=False, msg=''): + data = { +- 'task_id': kojihub.convert_value(hostID, cast=int), +- 'host_id': kojihub.convert_value(taskID, cast=int), ++ 'host_id': kojihub.convert_value(hostID, cast=int), ++ 'task_id': kojihub.convert_value(taskID, cast=int), + 'soft': kojihub.convert_value(soft, cast=bool), + 'by_host': kojihub.convert_value(by_host, cast=bool), + 'msg': kojihub.convert_value(msg, cast=str), + diff --git a/SOURCES/3974.patch b/SOURCES/3974.patch new file mode 100644 index 0000000..7096d54 --- /dev/null +++ b/SOURCES/3974.patch @@ -0,0 +1,43 @@ +From 36953540662aa39ff1b85218cefededfa4e529a9 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Jan 15 2024 12:48:16 +0000 +Subject: Use dnf5-compatible "group install" command + + + * yum knows only "yum groupinstall" + * dnf < 5 knows both + * dnf-5 only "dnf5 group install" + +It is reasonable to assume that dnf is used in most setups, so changing +default to "group install". If yum is specified *explicitly* via +tags's extra "mock.package_manager", "groupinstall" is used instead. + +Related: https://pagure.io/koji/issue/3971 + +--- + +diff --git a/koji/__init__.py b/koji/__init__.py +index 334b403..9b222cd 100644 +--- a/koji/__init__.py ++++ b/koji/__init__.py +@@ -1804,7 +1804,7 @@ def genMockConfig(name, arch, managed=False, repoid=None, tag_name=None, **opts) + 'target_arch': opts.get('target_arch', arch), + 'chroothome': '/builddir', + # Use the group data rather than a generated rpm +- 'chroot_setup_cmd': 'groupinstall %s' % opts.get('install_group', 'build'), ++ 'chroot_setup_cmd': 'group install %s' % opts.get('install_group', 'build'), + # don't encourage network access from the chroot + 'rpmbuild_networking': opts.get('use_host_resolv', False), + 'use_host_resolv': opts.get('use_host_resolv', False), +@@ -1817,6 +1817,10 @@ def genMockConfig(name, arch, managed=False, repoid=None, tag_name=None, **opts) + config_opts['forcearch'] = opts['forcearch'] + if opts.get('package_manager'): + config_opts['package_manager'] = opts['package_manager'] ++ if opts['package_manager'].endswith('yum'): ++ # backward compatibility with yum (doesn't have separate "group") ++ config_opts['chroot_setup_cmd'] = \ ++ 'groupinstall %s' % opts.get('install_group', 'build') + if opts.get('bootstrap_image'): + config_opts['use_bootstrap_image'] = True + config_opts['bootstrap_image'] = opts['bootstrap_image'] + diff --git a/SOURCES/4013.patch b/SOURCES/4013.patch new file mode 100644 index 0000000..9b3fae8 --- /dev/null +++ b/SOURCES/4013.patch @@ -0,0 +1,52 @@ +From bc8e6253f519eeb78fbc8740bba25e8a34490814 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Feb 14 2024 06:40:24 +0000 +Subject: let tag.extra override tag arches for noarch + + +--- + +diff --git a/builder/kojid b/builder/kojid +index b4536dd..8b81d66 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -1339,23 +1339,33 @@ class BuildTask(BaseTaskHandler): + exclusivearch = koji.get_header_field(h, 'exclusivearch') + excludearch = koji.get_header_field(h, 'excludearch') + +- if exclusivearch or excludearch: ++ buildconfig = self.session.getBuildConfig(build_tag, event=self.event_id) ++ noarch_arches = buildconfig.get('extra', {}).get('noarch_arches') ++ ++ if exclusivearch or excludearch or noarch_arches: + # if one of the tag arches is filtered out, then we can't use a + # noarch task +- buildconfig = self.session.getBuildConfig(build_tag, event=self.event_id) + arches = buildconfig['arches'] + tag_arches = [koji.canonArch(a) for a in arches.split()] + exclusivearch = [koji.canonArch(a) for a in exclusivearch] + excludearch = [koji.canonArch(a) for a in excludearch] +- archlist = list(tag_arches) ++ # tag.extra overrides tag arches for noarch ++ if noarch_arches: ++ archlist = [koji.canonArch(a) for a in noarch_arches.split()] ++ archlist = [a for a in archlist if a in tag_arches] ++ else: ++ archlist = list(tag_arches) + if exclusivearch: + archlist = [a for a in archlist if a in exclusivearch] + if excludearch: + archlist = [a for a in archlist if a not in excludearch] ++ self.logger.info('Filtering arches for noarch subtask. Choices: %r', archlist) + if not archlist: +- raise koji.BuildError("No valid arches were found. tag %r, " +- "exclusive %r, exclude %r" % (tag_arches, ++ raise koji.BuildError("No valid arches were found. tag %r, extra %r," ++ "exclusive %r, exclude %r" % (tag_arches, noarch_arches, + exclusivearch, excludearch)) ++ self.logger.debug('tag: %r, extra: %r, exclusive: %r, exclude: %r', ++ tag_arches, noarch_arches, exclusivearch, excludearch) + if set(archlist) != set(tag_arches): + return random.choice(archlist) + else: + diff --git a/SOURCES/4026.patch b/SOURCES/4026.patch new file mode 100644 index 0000000..edf0b36 --- /dev/null +++ b/SOURCES/4026.patch @@ -0,0 +1,38 @@ +From f453092d308605707ba1fb3fa314e05b515e7a25 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Feb 29 2024 10:45:55 +0000 +Subject: Better index for rpm lookup + + +Related: https://pagure.io/koji/issue/4022 + +--- + +diff --git a/schemas/schema-upgrade-1.34-1.35.sql b/schemas/schema-upgrade-1.34-1.35.sql +new file mode 100644 +index 0000000..3cc82bc +--- /dev/null ++++ b/schemas/schema-upgrade-1.34-1.35.sql +@@ -0,0 +1,9 @@ ++-- upgrade script to migrate the Koji database schema ++-- from version 1.33 to 1.34 ++ ++BEGIN; ++ ++CREATE INDEX CONCURRENTLY IF NOT EXISTS rpminfo_nvra ++ ON rpminfo(name,version,release,arch,external_repo_id); ++ ++COMMIT; +diff --git a/schemas/schema.sql b/schemas/schema.sql +index e5f3462..7e3298c 100644 +--- a/schemas/schema.sql ++++ b/schemas/schema.sql +@@ -752,6 +752,7 @@ CREATE TABLE rpminfo ( + CREATE INDEX rpminfo_build ON rpminfo(build_id); + CREATE UNIQUE INDEX rpminfo_unique_nvra_not_draft ON rpminfo(name,version,release,arch,external_repo_id) + WHERE draft IS NOT TRUE; ++CREATE INDEX rpminfo_nvra ON rpminfo(name,version,release,arch,external_repo_id); + -- index for default search method for rpms, PG11+ can benefit from new include method + DO $$ + DECLARE version integer; + diff --git a/SPECS/koji.spec b/SPECS/koji.spec index 059932a..56100e0 100644 --- a/SPECS/koji.spec +++ b/SPECS/koji.spec @@ -8,16 +8,31 @@ %{?!python3_pkgversion:%global python3_pkgversion 3} Name: koji -Version: 1.33.0 -Release: 1%{?dist} +Version: 1.34.0 +Release: 2%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 +# scm policy plugin - already upstreamed +Patch1: 1d515927aeb3e3c052fc9208ca71133d9d097fc0.patch # Not upstreamable -Patch1000: fedora-config.patch +Patch100: fedora-config.patch +# Use dnf5-compatible "group install" command +# This should work on yum/dnf-4/dnf5 +Patch102: https://pagure.io/koji/pull-request/3974.patch +# noarch builds only happen on some arches +# allows picking what arches will do noarch builds +Patch103: https://pagure.io/koji/pull-request/4013.patch +# oz size patch +# Drop passing a unit to oz so it can determine GiB vs GB +Patch104: https://pagure.io/koji/c/0251961929a45ccae1d635b7e85a9d8826baf72d.patch +# fix typo in refusal - already upstreamed +Patch105: https://pagure.io/koji/c/2a6e18fa356f1aa2a1b5099e55e0af1c89ae4163.patch +# Add index for rpminfo +Patch106: https://pagure.io/koji/pull-request/4026.patch BuildArch: noarch Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} @@ -44,6 +59,7 @@ Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-requests-gssapi Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-six +Requires: python%{python3_pkgversion}-defusedxml %description -n python%{python3_pkgversion}-%{name} Koji is a system for building and tracking RPMS. @@ -348,9 +364,35 @@ done %systemd_postun kojira.service %changelog -* Mon Oct 16 2023 Sergey Cherevko - 1.33.0-1 +* Mon Mar 18 2024 Kevin Fenzi - 1.34.0-2 +- Carry scm policy plugin for hub, it's already upstream +- Use dnf5 compatible 'group install' command +- Allow specifying with a tag value what arches noarch builds happen on. +- Fix image-build to not pass units to oz (to avoid GB/GiB issues) +- Fix a typo in scheduler (already upstreamed) +- Add back index for rpminfo table that was mistakenly dropped. + +* Thu Jan 25 2024 Kevin Fenzi - 1.34.0-1 +- Update to 1.34.0. Fixes rhbz#2260055 + +* Thu Jan 25 2024 Fedora Release Engineering - 1.33.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.33.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Oct 16 2023 Sergey Cherevko - 1.33.1-2 - Rebuilt for MSVSphere 9.2 +* Thu Jul 20 2023 Fedora Release Engineering - 1.33.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jul 14 2023 Kevin Fenzi - 1.33.1-1 +- Update to 1.31.1. Fixes rhbz#2222032 + +* Tue Jun 13 2023 Python Maint - 1.33.0-2 +- Rebuilt for Python 3.12 + * Wed May 24 2023 Kevin Fenzi - 1.33.0-1 - Update to 1.33.0. Fixes rhbz#2209371