12a6367
# This package depends on selective manual byte compilation
26a0b3e
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
12a6367
%global _python_bytecompile_extra 0
26a0b3e
12a6367
%bcond_without python2
734acdb
%bcond_without python3
12a6367
12a6367
# We can build varying amounts of Koji for python2 and python3 based on
12a6367
# the py[23]_support macro values. Valid values are:
12a6367
#   undefined or 0 -- do not build
12a6367
#   1 -- build just the cli and lib
12a6367
#   2 -- build everything we can
12a6367
# For executable scripts, py3 wins if we build it
12a6367
# The following rules tweak these settings based on options and environment
12a6367
12a6367
# Default to building both fully
12a6367
%define py2_support 2
12a6367
%define py3_support 2
12a6367
12a6367
%if 0%{?rhel} >= 8
12a6367
# and no python2 on rhel8+
12a6367
%define py2_support 0
734acdb
%else
12a6367
%if 0%{?rhel}
12a6367
# No python3 for older rhel
12a6367
%define py3_support 0
12a6367
%endif
12a6367
%endif
12a6367
880d6b5
%if 0%{?fedora} > 30
880d6b5
# no py2 after F31
12a6367
%define py2_support 0
12a6367
%define py3_support 2
12a6367
%else
880d6b5
# Keep some minimal python2 in f30 for now
628e998
%if 0%{?fedora} == 30
12a6367
%define py2_support 1
12a6367
%define py3_support 2
12a6367
%else
12a6367
%if 0%{?fedora}
12a6367
# match what the older Fedoras already have
12a6367
%define py2_support 2
12a6367
%define py3_support 1
12a6367
%endif
12a6367
%endif
12a6367
%endif
12a6367
12a6367
# Lastly enforce the bcond parameters
12a6367
%if %{without python2}
12a6367
%define py2_support 0
12a6367
%endif
12a6367
%if %{without python3}
12a6367
%define py3_support 0
12a6367
%endif
12a6367
12a6367
%if ! %{py2_support}
12a6367
# use python3
12a6367
%define __python %{__python3}
734acdb
%endif
734acdb
734acdb
# Compatibility with RHEL. These macros have been added to EPEL but
734acdb
# not yet to RHEL proper.
734acdb
# https://bugzilla.redhat.com/show_bug.cgi?id=1307190
734acdb
%{!?__python2: %global __python2 /usr/bin/python2}
734acdb
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
734acdb
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
734acdb
%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}}
734acdb
%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}}
85efc06
12a6367
# If the definition isn't available for python3_pkgversion, define it
12a6367
%{?!python3_pkgversion:%global python3_pkgversion 3}
12a6367
12a6367
%if 0%{?rhel} && 0%{?rhel} < 7
7f8d61d
%global use_systemd 0
7f8d61d
%global install_opt TYPE=sysv
12a6367
%else
12a6367
%global use_systemd 1
7f8d61d
%endif
7f8d61d
85efc06
Name: koji
cf99b3d
Version: 1.21.1
cf99b3d
Release: 1%{?dist}
12a6367
# the included arch lib from yum's rpmUtils is GPLv2+
2b4b9af
License: LGPLv2 and GPLv2+
85efc06
Summary: Build system tools
d970b36
URL: https://pagure.io/koji/
d970b36
Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2
4174069
6482305
# Patches already upstream
03d3c69
2b4b9af
# Not upstreamable
2b4b9af
Patch100: fedora-config.patch
021dece
85efc06
BuildArch: noarch
12a6367
%if 0%{py3_support}
12a6367
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
12a6367
Requires: python%{python3_pkgversion}-libcomps
734acdb
%else
734acdb
Requires: python2-%{name} = %{version}-%{release}
12a6367
%if 0%{?fedora} || 0%{?rhel} >= 7
50d7811
Requires: python-libcomps
734acdb
%endif
734acdb
%endif
7f8d61d
%if %{use_systemd}
7f8d61d
BuildRequires: systemd
7f8d61d
BuildRequires: pkgconfig
7f8d61d
%endif
85efc06
85efc06
%description
85efc06
Koji is a system for building and tracking RPMS.  The base package
85efc06
contains shared libraries and the command-line interface.
85efc06
12a6367
%if 0%{py2_support}
734acdb
%package -n python2-%{name}
734acdb
Summary: Build system tools python library
734acdb
%{?python_provide:%python_provide python2-%{name}}
Jeroen van Meeuwen (Kolab Systems) c350e2e
BuildRequires: python2-devel
12a6367
%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8
12a6367
Requires: python2-rpm
12a6367
%else
734acdb
Requires: rpm-python
12a6367
%endif
734acdb
Requires: pyOpenSSL
734acdb
Requires: python-requests
12a6367
%if 0%{?fedora} >= 23 || 0%{?rhel} >= 7
734acdb
Requires: python-requests-kerberos
12a6367
%else
12a6367
Requires: python-krbV >= 1.0.13
12a6367
%endif
734acdb
Requires: python-dateutil
734acdb
Requires: python-six
734acdb
734acdb
%description -n python2-%{name}
12a6367
desc
12a6367
%endif
734acdb
12a6367
%if 0%{py3_support}
12a6367
%package -n python%{python3_pkgversion}-%{name}
734acdb
Summary: Build system tools python library
12a6367
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
12a6367
BuildRequires: python%{python3_pkgversion}-devel
12a6367
%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8
12a6367
Requires: python%{python3_pkgversion}-rpm
12a6367
%else
12a6367
Requires: rpm-python%{python3_pkgversion}
12a6367
%endif
12a6367
Requires: python%{python3_pkgversion}-pyOpenSSL
12a6367
Requires: python%{python3_pkgversion}-requests
12a6367
Requires: python%{python3_pkgversion}-requests-kerberos
12a6367
Requires: python%{python3_pkgversion}-dateutil
12a6367
Requires: python%{python3_pkgversion}-six
918daeb
# Since we don't have metadata here, provide the 'normal' python provides manually.
918daeb
Provides: python%{python3_version}dist(%{name}) = %{version}
65256d9
Provides: python%{python3_pkgversion}dist(%{name}) = %{version}
12a6367
12a6367
%description -n python%{python3_pkgversion}-%{name}
12a6367
desc
734acdb
%endif
734acdb
12a6367
%if 0%{py2_support}
734acdb
%package -n python2-%{name}-cli-plugins
734acdb
Summary: Koji client plugins
734acdb
License: LGPLv2
12a6367
Requires: python2-%{name} = %{version}-%{release}
734acdb
734acdb
%description -n python2-%{name}-cli-plugins
734acdb
Plugins to the koji command-line interface
12a6367
%endif
734acdb
12a6367
%if 0%{py3_support}
12a6367
%package -n python%{python3_pkgversion}-%{name}-cli-plugins
734acdb
Summary: Koji client plugins
734acdb
License: LGPLv2
12a6367
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
734acdb
12a6367
%description -n python%{python3_pkgversion}-%{name}-cli-plugins
734acdb
Plugins to the koji command-line interface
734acdb
%endif
734acdb
85efc06
%package hub
85efc06
Summary: Koji XMLRPC interface
12a6367
License: LGPLv2
12a6367
Requires: %{name} = %{version}-%{release}
12a6367
Requires: %{name}-hub-code
12a6367
%if 0%{?fedora} || 0%{?rhel} > 7
12a6367
Suggests: python%{python3_pkgversion}-%{name}-hub
12a6367
Suggests: python%{python3_pkgversion}-%{name}-hub-plugins
12a6367
%endif
12a6367
12a6367
%description hub
12a6367
koji-hub is the XMLRPC interface to the koji database
12a6367
12a6367
%if 0%{py2_support} > 1
12a6367
%package -n python2-%{name}-hub
12a6367
Summary: Koji XMLRPC interface
12b25f9
License: LGPLv2 and GPLv2
12b25f9
# rpmdiff lib (from rpmlint) is GPLv2 (only)
85efc06
Requires: httpd
bd91f98
Requires: mod_wsgi
12a6367
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
12a6367
Requires: mod_auth_gssapi
12a6367
%endif
4174069
Requires: python-psycopg2
Owen W. Taylor 4d97612
Requires: python2-%{name} = %{version}-%{release}
12a6367
# py2 xor py3
12a6367
Provides: %{name}-hub-code = %{version}-%{release}
85efc06
12a6367
%description -n python2-%{name}-hub
12a6367
koji-hub is the XMLRPC interface to the koji database
12a6367
%endif
12a6367
12a6367
%if 0%{py3_support} > 1
12a6367
%package -n python%{python3_pkgversion}-%{name}-hub
12a6367
Summary: Koji XMLRPC interface
12a6367
License: LGPLv2 and GPLv2
12a6367
# rpmdiff lib (from rpmlint) is GPLv2 (only)
12a6367
Requires: httpd
12a6367
Requires: python%{python3_pkgversion}-mod_wsgi
12a6367
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
12a6367
Requires: mod_auth_gssapi
12a6367
%endif
12a6367
Requires: python%{python3_pkgversion}-psycopg2
12a6367
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
12a6367
# py2 xor py3
12a6367
Provides: %{name}-hub-code = %{version}-%{release}
12a6367
12a6367
%description -n python%{python3_pkgversion}-%{name}-hub
85efc06
koji-hub is the XMLRPC interface to the koji database
12a6367
%endif
85efc06
12b25f9
%package hub-plugins
12b25f9
Summary: Koji hub plugins
7f8d61d
License: LGPLv2
12a6367
Requires: %{name}-hub-plugins-code = %{version}-%{release}
12a6367
%if 0%{?fedora} || 0%{?rhel} > 7
12a6367
Suggests: python%{python3_pkgversion}-%{name}-hub-plugins
12a6367
%endif
12b25f9
12b25f9
%description hub-plugins
12b25f9
Plugins to the koji XMLRPC interface
12b25f9
12a6367
%if 0%{py2_support} > 1
12a6367
%package -n python2-%{name}-hub-plugins
12a6367
Summary: Koji hub plugins
12a6367
License: LGPLv2
12a6367
Requires: python2-%{name}-hub = %{version}-%{release}
12a6367
Requires: python2-qpid-proton
12a6367
Requires: cpio
12a6367
Provides: %{name}-hub-plugins-code = %{version}-%{release}
12a6367
12a6367
%description -n python2-%{name}-hub-plugins
12a6367
Plugins to the koji XMLRPC interface
12a6367
%endif
12a6367
12a6367
%if 0%{py3_support} > 1
12a6367
%package -n python%{python3_pkgversion}-%{name}-hub-plugins
12a6367
Summary: Koji hub plugins
12a6367
License: LGPLv2
12a6367
Requires: python%{python3_pkgversion}-%{name}-hub = %{version}-%{release}
12a6367
Requires: python%{python3_pkgversion}-qpid-proton
12a6367
Requires: cpio
12a6367
Provides: %{name}-hub-plugins-code = %{version}-%{release}
12a6367
12a6367
%description -n python%{python3_pkgversion}-%{name}-hub-plugins
12a6367
Plugins to the koji XMLRPC interface
12a6367
%endif
12a6367
12a6367
%package builder-plugins
12a6367
Summary: Koji builder plugins
12a6367
License: LGPLv2
12a6367
Requires: %{name} = %{version}-%{release}
12a6367
Requires: %{name}-builder = %{version}-%{release}
12a6367
12a6367
%description builder-plugins
12a6367
Plugins for the koji build daemon
12a6367
85efc06
%package builder
85efc06
Summary: Koji RPM builder daemon
880d6b5
%if 0%{py3_support} > 1
880d6b5
License: LGPLv2
880d6b5
%else
b7bcf87
License: LGPLv2 and GPLv2+
b7bcf87
#mergerepos (from createrepo) is GPLv2+
880d6b5
%endif
0573e26
Requires: mock >= 0.9.14
7f8d61d
Requires(pre): /usr/sbin/useradd
be89d25
Requires: squashfs-tools
7f8d61d
%if %{use_systemd}
7f8d61d
Requires(post): systemd
7f8d61d
Requires(preun): systemd
7f8d61d
Requires(postun): systemd
7f8d61d
%else
85efc06
Requires(post): /sbin/chkconfig
85efc06
Requires(post): /sbin/service
85efc06
Requires(preun): /sbin/chkconfig
85efc06
Requires(preun): /sbin/service
7f8d61d
%endif
86272a6
Requires: /usr/bin/cvs
86272a6
Requires: /usr/bin/svn
86272a6
Requires: /usr/bin/git
03d3c69
Requires: createrepo_c >= 0.10.0
c4bba76
%if 0%{py3_support} > 1
12a6367
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
12a6367
Requires: python%{python3_pkgversion}-librepo
12a6367
Requires: python%{python3_pkgversion}-multilib
12a6367
Requires: python%{python3_pkgversion}-cheetah
58de821
Requires: python%{python3_pkgversion}-pycdio
12a6367
%else
12a6367
Requires: python2-%{name} = %{version}-%{release}
12a6367
Requires: python2-multilib
12a6367
Requires: python-cheetah
58de821
Requires: pycdio
12a6367
%endif
85efc06
85efc06
%description builder
85efc06
koji-builder is the daemon that runs on build machines and executes
85efc06
tasks that come through the Koji system.
85efc06
9645510
%package vm
9645510
Summary: Koji virtual machine management daemon
9645510
License: LGPLv2
12a6367
Requires: %{name} = %{version}-%{release}
7f8d61d
%if %{use_systemd}
7f8d61d
Requires(post): systemd
7f8d61d
Requires(preun): systemd
7f8d61d
Requires(postun): systemd
7f8d61d
%else
9645510
Requires(post): /sbin/chkconfig
9645510
Requires(post): /sbin/service
9645510
Requires(preun): /sbin/chkconfig
9645510
Requires(preun): /sbin/service
7f8d61d
%endif
12a6367
%if 0%{py3_support} > 1
12a6367
Requires: python%{python3_pkgversion}-libvirt
12a6367
Requires: python%{python3_pkgversion}-libxml2
12a6367
%else
9645510
Requires: libvirt-python
9645510
Requires: libxml2-python
12a6367
%endif
bf3a870
Requires: /usr/bin/virt-clone
9645510
Requires: qemu-img
9645510
9645510
%description vm
9645510
koji-vm contains a supplemental build daemon that executes certain tasks in a
9645510
virtual machine. This package is not required for most installations.
9645510
85efc06
%package utils
85efc06
Summary: Koji Utilities
7f8d61d
License: LGPLv2
12a6367
Requires: %{name} = %{version}-%{release}
12a6367
%if 0%{py3_support} > 1
12a6367
Requires: python%{python3_pkgversion}-psycopg2
12a6367
%else
4174069
Requires: python-psycopg2
12a6367
%endif
7f8d61d
%if %{use_systemd}
7f8d61d
Requires(post): systemd
7f8d61d
Requires(preun): systemd
7f8d61d
Requires(postun): systemd
7f8d61d
%endif
85efc06
85efc06
%description utils
85efc06
Utilities for the Koji system
85efc06
85efc06
%package web
85efc06
Summary: Koji Web UI
7f8d61d
License: LGPLv2
12a6367
Requires: %{name} = %{version}-%{release}
12a6367
Requires: %{name}-web-code = %{version}-%{release}
12a6367
%if 0%{?fedora} || 0%{?rhel} > 7
12a6367
Suggests: python%{python3_pkgversion}-%{name}-web
12a6367
%endif
12a6367
12a6367
%description web
12a6367
koji-web is a web UI to the Koji system.
12a6367
12a6367
%if 0%{py2_support} > 1
12a6367
%package -n python2-%{name}-web
12a6367
Summary: Koji Web UI
12a6367
License: LGPLv2
12a6367
%{?python_provide:%python_provide python2-%{name}-web}
85efc06
Requires: httpd
bd91f98
Requires: mod_wsgi
12a6367
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
ea2a52e
Requires: mod_auth_gssapi
12a6367
%else
12a6367
Requires: mod_auth_kerb
12a6367
Requires: python-krbV >= 1.0.13
12a6367
%endif
4174069
Requires: python-psycopg2
85efc06
Requires: python-cheetah
Owen W. Taylor 4d97612
Requires: python2-%{name} = %{version}-%{release}
12a6367
Provides: %{name}-web-code = %{version}-%{release}
85efc06
12a6367
%description -n python2-%{name}-web
85efc06
koji-web is a web UI to the Koji system.
12a6367
%endif
12a6367
12a6367
%if 0%{py3_support} > 1
12a6367
%package -n python%{python3_pkgversion}-%{name}-web
12a6367
Summary: Koji Web UI
12a6367
License: LGPLv2
12a6367
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}-web}
12a6367
Requires: httpd
12a6367
Requires: python%{python3_pkgversion}-mod_wsgi
12a6367
Requires: mod_auth_gssapi
12a6367
Requires: python%{python3_pkgversion}-psycopg2
12a6367
Requires: python%{python3_pkgversion}-cheetah
12a6367
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
12a6367
Provides: %{name}-web-code = %{version}-%{release}
12a6367
12a6367
%description -n python%{python3_pkgversion}-%{name}-web
12a6367
koji-web is a web UI to the Koji system.
12a6367
%endif
85efc06
85efc06
%prep
880d6b5
%autosetup -p1
85efc06
12a6367
85efc06
%build
12a6367
# Nothing to build
12a6367
85efc06
85efc06
%install
12a6367
%if 0%{py2_support} < 2  &&  0%{py3_support} < 2
12a6367
echo "At least one python must be built with full support"
12a6367
exit 1
12a6367
%endif
12a6367
12a6367
# python2 build
12a6367
%if 0%{py2_support} > 1
12a6367
make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python2} %{?install_opt} install
348e8d5
# koji-sidetag-cleanup has a python3 shbang, fix for python2
348e8d5
sed -i 's|#!/usr/bin/python3|#!/usr/bin/python2|' $RPM_BUILD_ROOT/usr/sbin/koji-sidetag-cleanup
12a6367
%else
12a6367
%if 0%{py2_support}
12a6367
for d in koji cli plugins ; do
12a6367
    pushd $d
12a6367
    make DESTDIR=$RPM_BUILD_ROOT KOJI_MINIMAL=1 PYTHON=%{__python2} %{?install_opt} install
12a6367
    popd
12a6367
done
12a6367
%endif
12a6367
%endif
12a6367
12a6367
12a6367
# python3 build
12a6367
%if 0%{py3_support} > 1
12a6367
make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install
734acdb
# alter python interpreter in koji CLI
c4bba76
scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow
07894c3
         %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db'
12a6367
for fn in $scripts ; do
12a6367
    sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn
12a6367
done
12a6367
%else
12a6367
%if 0%{py3_support}
12a6367
# minimal
12a6367
for d in koji cli plugins ; do
12a6367
    pushd $d
12a6367
    make DESTDIR=$RPM_BUILD_ROOT KOJI_MINIMAL=1 PYTHON=%{__python3} %{?install_opt} install
12a6367
    popd
12a6367
done
12a6367
# alter python interpreter in koji CLI
12a6367
sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT/usr/bin/koji
12a6367
%endif
734acdb
%endif
85efc06
12a6367
%if 0%{?fedora} >= 28
12a6367
# handle extra byte compilation
12a6367
extra_dirs='
12a6367
    %{_prefix}/lib/koji-builder-plugins
12a6367
    %{_prefix}/koji-hub-plugins
12a6367
    %{_datadir}/koji-hub
12a6367
    %{_datadir}/koji-web/lib/kojiweb
12a6367
    %{_datadir}/koji-web/scripts'
12a6367
%if 0%{py2_support} > 1
12a6367
for fn in $extra_dirs ; do
12a6367
    %py_byte_compile %{__python2} %{buildroot}$fn
12a6367
done
12a6367
%endif
12a6367
%if 0%{py3_support} > 1
12a6367
for fn in $extra_dirs ; do
12a6367
    %py_byte_compile %{__python3} %{buildroot}$fn
12a6367
done
12a6367
%endif
12a6367
%endif
12a6367
603cb8a
%if 0%{py2_support} < 2
880d6b5
# With no python2 support, remove/do not ship internal mergerepos
880d6b5
rm -f %{buildroot}/%{_libexecdir}/kojid/mergerepos
880d6b5
%endif
880d6b5
85efc06
%files
85efc06
%{_bindir}/*
74be95c
%config(noreplace) /etc/koji.conf
74be95c
%dir /etc/koji.conf.d
85efc06
%doc docs Authors COPYING LGPL
85efc06
12a6367
%if 0%{py2_support}
734acdb
%files -n python2-%{name}
734acdb
%{python2_sitelib}/%{name}
734acdb
%{python2_sitelib}/koji_cli
12a6367
%endif
734acdb
12a6367
%if 0%{py3_support}
734acdb
%files -n python%{python3_pkgversion}-koji
734acdb
%{python3_sitelib}/%{name}
734acdb
%{python3_sitelib}/koji_cli
734acdb
%endif
734acdb
12a6367
%if 0%{py2_support}
734acdb
%files -n python2-%{name}-cli-plugins
734acdb
%{python2_sitelib}/koji_cli_plugins
734acdb
# we don't have config files for default plugins yet
cf88a30
#%%dir %%{_sysconfdir}/koji/plugins
cf88a30
#%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf
12a6367
%endif
734acdb
12a6367
%if 0%{py3_support}
734acdb
%files -n python%{python3_pkgversion}-%{name}-cli-plugins
734acdb
%{python3_sitelib}/koji_cli_plugins
734acdb
# we don't have config files for default plugins yet
cf88a30
#%%dir %%{_sysconfdir}/koji/plugins
cf88a30
#%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf
734acdb
%endif
734acdb
85efc06
%files hub
74be95c
%config(noreplace) /etc/httpd/conf.d/kojihub.conf
74be95c
%dir /etc/koji-hub
74be95c
%config(noreplace) /etc/koji-hub/hub.conf
74be95c
%dir /etc/koji-hub/hub.conf.d
07894c3
%{_sbindir}/koji-sweep-db
07894c3
%if %{use_systemd}
07894c3
%{_unitdir}/koji-sweep-db.service
07894c3
%{_unitdir}/koji-sweep-db.timer
07894c3
%endif
85efc06
12a6367
%if 0%{py2_support} > 1
12a6367
%files -n python2-%{name}-hub
12a6367
%{_datadir}/koji-hub/*.py*
12a6367
%endif
12a6367
12a6367
%if 0%{py3_support} > 1
12a6367
%files -n python%{python3_pkgversion}-%{name}-hub
12a6367
%{_datadir}/koji-hub/*.py
12a6367
%{_datadir}/koji-hub/__pycache__
12a6367
%endif
12a6367
12b25f9
%files hub-plugins
74be95c
%dir /etc/koji-hub/plugins
12a6367
%config(noreplace) /etc/koji-hub/plugins/*.conf
12a6367
12a6367
%if 0%{py2_support} > 1
12a6367
%files -n python2-%{name}-hub-plugins
12a6367
%{_prefix}/lib/koji-hub-plugins/*.py*
12a6367
%endif
12a6367
12a6367
%if 0%{py3_support} > 1
12a6367
%files -n python%{python3_pkgversion}-%{name}-hub-plugins
12a6367
%{_prefix}/lib/koji-hub-plugins/*.py
12a6367
%{_prefix}/lib/koji-hub-plugins/__pycache__
12a6367
%endif
12a6367
12a6367
%files builder-plugins
12a6367
%dir /etc/kojid/plugins
12a6367
%config(noreplace) /etc/kojid/plugins/*.conf
12a6367
%dir %{_prefix}/lib/koji-builder-plugins
12a6367
%{_prefix}/lib/koji-builder-plugins/*.py*
12a6367
%if 0%{py3_support} > 1
12a6367
%{_prefix}/lib/koji-builder-plugins/__pycache__
12a6367
%endif
12b25f9
85efc06
%files utils
85efc06
%{_sbindir}/kojira
7f8d61d
%if %{use_systemd}
7f8d61d
%{_unitdir}/kojira.service
7f8d61d
%else
85efc06
%{_initrddir}/kojira
74be95c
%config(noreplace) /etc/sysconfig/kojira
7f8d61d
%endif
74be95c
%dir /etc/kojira
74be95c
%config(noreplace) /etc/kojira/kojira.conf
7f8d61d
%{_sbindir}/koji-gc
74be95c
%dir /etc/koji-gc
74be95c
%config(noreplace) /etc/koji-gc/koji-gc.conf
07894c3
%config(noreplace) /etc/koji-gc/email.tpl
7f8d61d
%{_sbindir}/koji-shadow
74be95c
%dir /etc/koji-shadow
c6daa97
%{_sbindir}/koji-sidetag-cleanup
74be95c
%config(noreplace) /etc/koji-shadow/koji-shadow.conf
85efc06
85efc06
%files web
74be95c
%dir /etc/kojiweb
74be95c
%config(noreplace) /etc/kojiweb/web.conf
74be95c
%config(noreplace) /etc/httpd/conf.d/kojiweb.conf
74be95c
%dir /etc/kojiweb/web.conf.d
85efc06
12a6367
%if 0%{py2_support} > 1
12a6367
%files -n python2-%{name}-web
12a6367
%{_datadir}/koji-web
12a6367
%endif
12a6367
12a6367
%if 0%{py3_support} > 1
12a6367
%files -n python%{python3_pkgversion}-%{name}-web
12a6367
%{_datadir}/koji-web
12a6367
%endif
12a6367
85efc06
%files builder
85efc06
%{_sbindir}/kojid
880d6b5
%if 0%{py2_support} > 1
7f8d61d
%dir %{_libexecdir}/kojid
7f8d61d
%{_libexecdir}/kojid/mergerepos
880d6b5
%endif
7f8d61d
%if %{use_systemd}
7f8d61d
%{_unitdir}/kojid.service
7f8d61d
%else
85efc06
%{_initrddir}/kojid
74be95c
%config(noreplace) /etc/sysconfig/kojid
7f8d61d
%endif
74be95c
%dir /etc/kojid
74be95c
%config(noreplace) /etc/kojid/kojid.conf
74be95c
%attr(-,kojibuilder,kojibuilder) /etc/mock/koji
85efc06
85efc06
%pre builder
85efc06
/usr/sbin/useradd -r -s /bin/bash -G mock -d /builddir -M kojibuilder 2>/dev/null ||:
85efc06
7f8d61d
%if %{use_systemd}
7f8d61d
7f8d61d
%post builder
7f8d61d
%systemd_post kojid.service
7f8d61d
7f8d61d
%preun builder
7f8d61d
%systemd_preun kojid.service
7f8d61d
7f8d61d
%postun builder
7f8d61d
%systemd_postun kojid.service
7f8d61d
7f8d61d
%else
7f8d61d
85efc06
%post builder
85efc06
/sbin/chkconfig --add kojid
85efc06
85efc06
%preun builder
85efc06
if [ $1 = 0 ]; then
85efc06
  /sbin/service kojid stop &> /dev/null
85efc06
  /sbin/chkconfig --del kojid
85efc06
fi
7f8d61d
%endif
85efc06
9645510
%files vm
9645510
%{_sbindir}/kojivmd
cf88a30
#dir %%{_datadir}/kojivmd
7f8d61d
%{_datadir}/kojivmd/kojikamid
7f8d61d
%if %{use_systemd}
7f8d61d
%{_unitdir}/kojivmd.service
7f8d61d
%else
9645510
%{_initrddir}/kojivmd
74be95c
%config(noreplace) /etc/sysconfig/kojivmd
7f8d61d
%endif
74be95c
%dir /etc/kojivmd
74be95c
%config(noreplace) /etc/kojivmd/kojivmd.conf
9645510
7f8d61d
%if %{use_systemd}
7f8d61d
7f8d61d
%post vm
7f8d61d
%systemd_post kojivmd.service
7f8d61d
7f8d61d
%preun vm
7f8d61d
%systemd_preun kojivmd.service
7f8d61d
7f8d61d
%postun vm
7f8d61d
%systemd_postun kojivmd.service
7f8d61d
7f8d61d
%else
7f8d61d
9645510
%post vm
9645510
/sbin/chkconfig --add kojivmd
9645510
9645510
%preun vm
9645510
if [ $1 = 0 ]; then
9645510
  /sbin/service kojivmd stop &> /dev/null
9645510
  /sbin/chkconfig --del kojivmd
9645510
fi
7f8d61d
7f8d61d
%if %{use_systemd}
7f8d61d
7f8d61d
%post utils
7f8d61d
%systemd_post kojira.service
7f8d61d
7f8d61d
%preun utils
7f8d61d
%systemd_preun kojira.service
9645510
7f8d61d
%postun utils
7f8d61d
%systemd_postun kojira.service
7f8d61d
7f8d61d
%else
85efc06
%post utils
85efc06
/sbin/chkconfig --add kojira
85efc06
/sbin/service kojira condrestart &> /dev/null || :
85efc06
%preun utils
85efc06
if [ $1 = 0 ]; then
85efc06
  /sbin/service kojira stop &> /dev/null || :
85efc06
  /sbin/chkconfig --del kojira
85efc06
fi
7f8d61d
%endif
12a6367
%endif
85efc06
85efc06
%changelog
cf99b3d
* Fri Jun 12 2020 Kevin Fenzi <kevin@scrye.com> - 1.21.1-1
cf99b3d
- Update to 1.21.1. (really this time!)
cf99b3d
e4a0792
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 1.21.0-3
e4a0792
- Rebuilt for Python 3.9
e4a0792
c611e19
* Thu Apr 30 2020 Kevin Fenzi <kevin@scrye.com> - 1.21.0-2
c611e19
- Add patch to fix issue with admins not being able to force tagging. 
c611e19
- Fixes https://pagure.io/koji/issue/2202 upstream.
c611e19
c6daa97
* Tue Apr 21 2020 Kevin Fenzi <kevin@scrye.com> - 1.21.0-1
cf99b3d
- Update to 1.21.0. Fixes bug #1826406
c6daa97
2e3b46d
* Fri Mar 06 2020 Kevin Fenzi <kevin@scrye.com> - 1.20.1-1
cf99b3d
- Update to 1.20.0
2e3b46d
527f327
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.0-2
527f327
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
527f327
1227491
* Mon Jan 20 2020 Kevin Fenzi <kevin@scrye.com> - 1.20.0-1
1227491
- Update to 1.20.0.
1227491
58de821
* Wed Nov 27 2019 Kevin Fenzi <kevin@scrye.com> - 1.19.1-2
58de821
- Add Requires to koji builder on python3-pycdio/pycdio. Fixes bug #1775536
58de821
0ff9fe9
* Fri Nov 08 2019 Kevin Fenzi <kevin@scrye.com> - 1.19.1-1
0ff9fe9
- Update to 1.19.1
0ff9fe9
f25cb7c
* Fri Nov 01 2019 Mohan Boddu <mboddu@bhujji.com> - 1.19.0-1
f25cb7c
- Rebase to 1.19.0
bb9b233
- Removing downstream patch 1613
f25cb7c
ec19005
* Wed Oct 09 2019 Patrick Uiterwijk <patrick@puiterwijk.org> - 1.18.1-1
ec19005
- Rebase to 1.18.1 for CVE-2019-17109
ec19005
65256d9
* Wed Sep 18 2019 Jiri Popelka <jpopelka@redhat.com> - 1.18.0-6
65256d9
- Fix macro added in previous change.
65256d9
918daeb
* Tue Sep 17 2019 Kevin Fenzi <kevin@scrye.com> - 1.18.0-5
918daeb
- Add provides for python3 subpackage. Fixes bug #1750391
918daeb
3ea8d7c
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 1.18.0-4
3ea8d7c
- Rebuilt for Python 3.8
3ea8d7c
d47b319
* Fri Aug 16 2019 Kevin Fenzi <kevin@scrye.com> - 1.18.0-3
d47b319
- Fix pkgsurl/topurl default mistake.
d47b319
603cb8a
* Fri Aug 16 2019 Kevin Fenzi <kevin@scrye.com> - 1.18.0-2
603cb8a
- Fix mergerepos conditional for f30.
603cb8a
6482305
* Fri Aug 16 2019 Kevin Fenzi <kevin@scrye.com> - 1.18.0-1
6482305
- Update to 1.18.0.
6482305
dceb664
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.17.0-8
dceb664
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
dceb664
880d6b5
* Thu May 30 2019 Kevin Fenzi <kevin@scrye.com> - 1.17.0-7
880d6b5
- Add patch to fix koji kerberos auth with python3.
880d6b5
- Drop internal mergerepos so we can go all python3. Fixes bug #1715257
880d6b5
880d6b5
* Wed May 29 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.17.0-7
880d6b5
- Expose dynamic_buildrequires mock setting
880d6b5
c4bba76
* Tue May 28 2019 Kevin Fenzi <kevin@scrye.com> - 1.17.0-6
c4bba76
- Switch kojid back to python3 as imagefactory and oz have moved.
c4bba76
- Backport patch to download only repomd.xml instead of all repodata.
c4bba76
- Backport patch to allow 'bare' repo merging for modularity.
c4bba76
- Backport patch to allow for seperate srpm repos in buildroot repos.
c4bba76
5b3fde9
* Mon Mar 11 2019 Neal Gompa <ngompa13@gmail.com> - 1.17.0-5
5b3fde9
- Switch kojid back to Python 2 so that imgfac doesn't get disabled
5b3fde9
03d3c69
* Sun Mar 10 2019 Neal Gompa <ngompa13@gmail.com> - 1.17.0-4
03d3c69
- Add patch proposed upstream to use createrepo_c by default to drop yum dependency
03d3c69
27b47e9
* Sun Mar 10 2019 Neal Gompa <ngompa13@gmail.com> - 1.17.0-3
27b47e9
- Remove remnants of unused /usr/libexec/koji-hub
27b47e9
12a6367
* Thu Mar 07 2019 Neal Gompa <ngompa13@gmail.com> - 1.17.0-2
12a6367
- Enable Python 3 for Fedora 30+ and EL8+
12a6367
- Sync packaging changes from upstream
12a6367
b972d16
* Thu Mar 07 2019 Patrick Uiterwijk <puiterwijk@redhat.com> - 1.17.0-1
b972d16
- Rebase to 1.17.0
b972d16
f07ec03
* Thu Feb 21 2019 Patrick Uiterwijk <puiterwijk@redhat.com> - 1.16.2-1
f07ec03
- Rebase to 1.16.2 for CVE-2018-1002161
f07ec03
c45b6fe
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.1-4
c45b6fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
c45b6fe
5e917f1
* Wed Jan 09 2019 Adam Williamson <awilliam@redhat.com> - 1.16.1-3
5e917f1
- Backport fix for Python 3 connection failure bug (#1192, PR #1203)
5e917f1
1848799
* Fri Sep 14 2018 Kevin Fenzi <kevin@scrye.com> - 1.16.1-2
1848799
- Fix bad sed that caused python32 dep.
1848799
f8d9a74
* Thu Sep 13 2018 Kevin Fenzi <kevin@scrye.com> - 1.16.1-1
f8d9a74
- Update to 1.16.1
f8d9a74
d3b0335
* Tue Jul 31 2018 Kevin Fenzi <kevin@scrye.com> - 1.16.0-1
d3b0335
- Update to 1.16.0
d3b0335
6bd49b1
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.1-3
6bd49b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
6bd49b1
1c88fee
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.15.1-2
1c88fee
- Rebuilt for Python 3.7
1c88fee
6f0a882
* Tue Apr 03 2018 Patrick Uiterwijk <puiterwijk@redhat.com> - 1.15.1-1
6f0a882
- Rebase to 1.15.1
6f0a882
- Fixes CVE-2018-1002150
6f0a882
f1d1d62
* Fri Mar 16 2018 Kevin Fenzi <kevin@scrye.com> - 1.15.0-7
f1d1d62
- Backport PR #841 to allow configurable timeout for oz
f1d1d62
3b86654
* Tue Feb 20 2018 Patrick Uiterwijk <patrick@puiterwijk.org> - 1.15.0-6
3b86654
- Backport PR #796
3b86654
8beddd7
* Sun Feb 18 2018 Patrick Uiterwijk <patrick@puiterwijk.org> - 1.15.0-5
8beddd7
- Add  workaround patch for bug #808
8beddd7
cf88a30
* Fri Feb 16 2018 Patrick Uiterwijk <patrick@puiterwijk.org> - 1.15.0-4
cf88a30
- Backport patch from PR#794
cf88a30
- Fix macro escaping in comments
cf88a30
Owen W. Taylor 4d97612
* Mon Feb 12 2018 Owen Taylor <otaylor@redhat.com> - 1.15.0-3
Owen W. Taylor 4d97612
- Make hub, builder, etc, require python2-koji not koji
Owen W. Taylor 4d97612
0c7cee5
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2
0c7cee5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0c7cee5
13c3161
* Sat Jan 27 2018 Patrick Uiterwijk <patrick@puiterwijk.org> - 1.15.0-1
13c3161
- Rebase to koji 1.15.0
13c3161
1175772
* Mon Jan 22 2018 Troy Dawson <tdawson@redhat.com> - 1.14.0-4
1175772
- Update conditional
1175772
13b191d
* Thu Dec 07 2017 Patrick Uiterwijk <patrick@puiterwijk.org> - 1.14.0-3
13b191d
- Backport py3 runroot encoding patch (PR#735)
13b191d
7fdba43
* Mon Dec 04 2017 Patrick Uiterwijk <patrick@puiterwijk.org> - 1.14.0-2
7fdba43
- Backport py3 keytab patch (PR#708)
7fdba43
- Backport patches for exit code (issue#696)
7fdba43
Dennis Gilmore 11067e5
* Tue Sep 26 2017 Dennis Gilmore <dennis@ausil.us> - 1.14.0-1
Dennis Gilmore 11067e5
- update to upstream 1.14.0
Dennis Gilmore 11067e5
4c4f2da
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.0-4
4c4f2da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4c4f2da
50d7811
* Wed Jul 12 2017 Patrick Uiterwijk <puiterwijk@redhat.com> - 1.13.0-3
50d7811
- Remove the 2 postfix for pycurl and libcomps on RHEL
50d7811
1fe786e
* Tue Jul 11 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.13.0-2
1fe786e
- Require python2-koji on Fedora <= 26.
1fe786e
734acdb
* Mon Jul 03 2017 Dennis Gilmore <dennis@ausil.us> - 1.13.0-1
734acdb
- update to upstream 1.13.0
734acdb
- remove old  changelog entries