85efc0
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
85efc0
5bf52b
%define baserelease 1
85efc0
#build with --define 'testbuild 1' to have a timestamp appended to release
5bf52b
%if "x%{?testbuild}" == "x1"
85efc0
%define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S)
85efc0
%else
85efc0
%define release %{baserelease}
85efc0
%endif
85efc0
Name: koji
5bf52b
Version: 1.2.6
85efc0
Release: %{release}%{?dist}
5bf52b
License: LGPLv2
85efc0
Summary: Build system tools
85efc0
Group: Applications/System
5bf52b
URL: http://fedorahosted.org/koji
a358de
Patch0: fedora-config.patch
5bf52b
Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{PACKAGE_VERSION}.tar.bz2
85efc0
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
85efc0
BuildArch: noarch
85efc0
Requires: python-krbV >= 1.0.13
85efc0
Requires: rpm-python
85efc0
Requires: pyOpenSSL
a358de
Requires: python-urlgrabber
85efc0
BuildRequires: python
85efc0
85efc0
%description
85efc0
Koji is a system for building and tracking RPMS.  The base package
85efc0
contains shared libraries and the command-line interface.
85efc0
85efc0
%package hub
85efc0
Summary: Koji XMLRPC interface
85efc0
Group: Applications/Internet
85efc0
Requires: httpd
85efc0
Requires: mod_python
85efc0
Requires: postgresql-python
85efc0
Requires: %{name} = %{version}-%{release}
85efc0
85efc0
%description hub
85efc0
koji-hub is the XMLRPC interface to the koji database
85efc0
85efc0
%package builder
85efc0
Summary: Koji RPM builder daemon
85efc0
Group: Applications/System
85efc0
Requires: %{name} = %{version}-%{release}
5bf52b
Requires: mock >= 0.8.7
85efc0
Requires(post): /sbin/chkconfig
85efc0
Requires(post): /sbin/service
85efc0
Requires(preun): /sbin/chkconfig
85efc0
Requires(preun): /sbin/service
85efc0
Requires(pre): /usr/sbin/useradd
5bf52b
Requires: /usr/bin/cvs
5bf52b
Requires: /usr/bin/svn
5bf52b
Requires: /usr/bin/git
85efc0
Requires: rpm-build
85efc0
Requires: redhat-rpm-config
5bf52b
%if 0%{?rhel} >= 5
5bf52b
Requires: createrepo >= 0.4.11-2
5bf52b
%endif
5bf52b
%if 0%{?fedora} >= 9
5bf52b
Requires: createrepo >= 0.9.2
5bf52b
%else
5bf52b
Requires: createrepo >= 0.4.11-2
5bf52b
%endif
85efc0
85efc0
%description builder
85efc0
koji-builder is the daemon that runs on build machines and executes
85efc0
tasks that come through the Koji system.
85efc0
85efc0
%package utils
85efc0
Summary: Koji Utilities
85efc0
Group: Applications/Internet
85efc0
Requires: postgresql-python
85efc0
Requires: %{name} = %{version}-%{release}
85efc0
85efc0
%description utils
85efc0
Utilities for the Koji system
85efc0
85efc0
%package web
85efc0
Summary: Koji Web UI
85efc0
Group: Applications/Internet
85efc0
Requires: httpd
85efc0
Requires: mod_python
85efc0
Requires: mod_auth_kerb
85efc0
Requires: postgresql-python
85efc0
Requires: python-cheetah
85efc0
Requires: %{name} = %{version}-%{release}
85efc0
Requires: python-krbV >= 1.0.13
85efc0
85efc0
%description web
85efc0
koji-web is a web UI to the Koji system.
85efc0
85efc0
%prep
85efc0
%setup -q
a358de
%patch0 -p1 -b .orig
85efc0
85efc0
%build
85efc0
85efc0
%install
85efc0
rm -rf $RPM_BUILD_ROOT
85efc0
make DESTDIR=$RPM_BUILD_ROOT install
85efc0
85efc0
%clean
85efc0
rm -rf $RPM_BUILD_ROOT
85efc0
85efc0
%files
85efc0
%defattr(-,root,root)
85efc0
%{_bindir}/*
85efc0
%{python_sitelib}/%{name}
85efc0
%config(noreplace) %{_sysconfdir}/koji.conf
85efc0
%doc docs Authors COPYING LGPL
85efc0
85efc0
%files hub
85efc0
%defattr(-,root,root)
85efc0
%{_datadir}/koji-hub
85efc0
%config(noreplace) /etc/httpd/conf.d/kojihub.conf
85efc0
85efc0
%files utils
85efc0
%defattr(-,root,root)
85efc0
%{_sbindir}/kojira
5bf52b
%{_sbindir}/koji-gc
85efc0
%{_initrddir}/kojira
85efc0
%config(noreplace) %{_sysconfdir}/sysconfig/kojira
5bf52b
%dir %{_sysconfdir}/kojira
85efc0
%config(noreplace) %{_sysconfdir}/kojira/kojira.conf
5bf52b
%dir %{_sysconfdir}/koji-gc
5bf52b
%config(noreplace) %{_sysconfdir}/koji-gc/koji-gc.conf
85efc0
85efc0
%files web
85efc0
%defattr(-,root,root)
85efc0
%{_datadir}/koji-web
85efc0
%{_sysconfdir}/kojiweb
85efc0
%config(noreplace) /etc/httpd/conf.d/kojiweb.conf
85efc0
85efc0
%files builder
85efc0
%defattr(-,root,root)
85efc0
%{_sbindir}/kojid
85efc0
%{_initrddir}/kojid
85efc0
%config(noreplace) %{_sysconfdir}/sysconfig/kojid
5bf52b
%dir %{_sysconfdir}/kojid
85efc0
%config(noreplace) %{_sysconfdir}/kojid/kojid.conf
85efc0
%attr(-,kojibuilder,kojibuilder) /etc/mock/koji
85efc0
85efc0
%pre builder
85efc0
/usr/sbin/useradd -r -s /bin/bash -G mock -d /builddir -M kojibuilder 2>/dev/null ||:
85efc0
85efc0
%post builder
85efc0
/sbin/chkconfig --add kojid
85efc0
/sbin/service kojid condrestart &> /dev/null || :
85efc0
85efc0
%preun builder
85efc0
if [ $1 = 0 ]; then
85efc0
  /sbin/service kojid stop &> /dev/null
85efc0
  /sbin/chkconfig --del kojid
85efc0
fi
85efc0
85efc0
%post utils
85efc0
/sbin/chkconfig --add kojira
85efc0
/sbin/service kojira condrestart &> /dev/null || :
85efc0
%preun utils
85efc0
if [ $1 = 0 ]; then
85efc0
  /sbin/service kojira stop &> /dev/null || :
85efc0
  /sbin/chkconfig --del kojira
85efc0
fi
85efc0
85efc0
%changelog
5bf52b
* Mon Aug 25 2008 Dennis Gilmore <dennis@ausil.us> - 1.2.6-1
5bf52b
- update to 1.2.6
5bf52b
- make sure we have to correct version of createrepo on Fedora 8 
5bf52b
5bf52b
* Tue Aug  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.2.5-2
5bf52b
- fix conditional (line 5)
5bf52b
- fix license tag
5bf52b
5bf52b
* Fri Jan 25 2008 jkeating <jkeating@redhat.com> 1.2.5-1
5bf52b
- Put createrepo arguments in correct order
5bf52b
5bf52b
* Thu Jan 24 2008 jkeating <jkeating@redhat.com> 1.2.4-1
5bf52b
- Use the --skip-stat flag in createrepo calls.
5bf52b
- canonicalize tag arches before using them (dgilmore)
5bf52b
- fix return value of delete_build
5bf52b
- Revert to getfile urls if the task is not successful in emails
5bf52b
- Pass --target instead of --arch to mock.
5bf52b
- ignore trashcan tag in prune-signed-copies command
5bf52b
- add the "allowed_scms" kojid parameter
5bf52b
- allow filtering builds by the person who built them
5bf52b
5bf52b
* Fri Dec 14 2007 jkeating <jkeating@redhat.com> 1.2.3-1
5bf52b
- New upstream release with lots of updates, bugfixes, and enhancements.
6b424c
a358de
* Tue Jun  5 2007 Mike Bonnet <mikeb@redhat.com> - 1.2.2-1
a358de
- only allow admins to perform non-scratch builds from srpm
a358de
- bug fixes to the cmd-line and web UIs
5bf52b
5bf52b
* Thu May 31 2007 Mike Bonnet <mikeb@redhat.com> - 1.2.1-1
a358de
- don't allow ExclusiveArch to expand the archlist (bz#239359)
a358de
- add a summary line stating whether the task succeeded or failed to the end of the "watch-task" output
a358de
- add a search box to the header of every page in the web UI
a358de
- new koji download-build command (patch provided by Dan Berrange)
6789f3
6789f3
* Tue May 15 2007 Mike Bonnet <mikeb@redhat.com> - 1.2.0-1
6789f3
- change version numbering to a 3-token scheme
6789f3
- install the koji favicon
6789f3
6789f3
* Mon May 14 2007 Mike Bonnet <mikeb@redhat.com> - 1.1-5
6789f3
- cleanup koji-utils Requires
6789f3
- fix encoding and formatting in email notifications
6789f3
- expand archlist based on ExclusiveArch/BuildArchs
6789f3
- allow import of rpms without srpms
6789f3
- commit before linking in prepRepo to release db locks
6789f3
- remove exec bit from kojid logs and uploaded files (patch by Enrico Scholz)
6789f3
6789f3
* Tue May  1 2007 Mike Bonnet <mikeb@redhat.com> - 1.1-4
6789f3
- remove spurious Requires: from the koji-utils package
6789f3
6789f3
* Tue May  1 2007 Mike Bonnet <mikeb@redhat.com> - 1.1-3
6789f3
- fix typo in BuildNotificationTask (patch provided by Michael Schwendt)
6789f3
- add the --changelog param to the buildinfo command
6789f3
- always send email notifications to the package builder and package owner
6789f3
- improvements to the web UI
6789f3
5bf52b
* Tue Apr 17 2007 Mike Bonnet <mikeb@redhat.com> - 1.1-2
5bf52b
- re-enable use of the --update flag to createrepo
5bf52b
30d8ef
* Mon Apr 09 2007 Jesse Keating <jkeating@redhat.com> 1.1-1
30d8ef
- make the output listPackages() consistent regardless of with_dups
30d8ef
- prevent large batches of repo deletes from holding up regens
30d8ef
- allow sorting the host list by arches
30d8ef
85efc0
* Mon Apr 02 2007 Jesse Keating <jkeating@redhat.com> 1.0-1
85efc0
- Release 1.0!
85efc0
85efc0
* Wed Mar 28 2007 Mike Bonnet <mikeb@redhat.com> - 0.9.7-4
85efc0
- set SSL connection timeout to 12 hours
85efc0
85efc0
* Wed Mar 28 2007 Mike Bonnet <mikeb@redhat.com> - 0.9.7-3
85efc0
- avoid SSL renegotiation
85efc0
- improve log file handling in kojid
85efc0
- bug fixes in command-line and web UI
85efc0
85efc0
* Sun Mar 25 2007 Mike Bonnet <mikeb@redhat.com> - 0.9.7-2
85efc0
- enable http access to packages in kojid
85efc0
- add Requires: pyOpenSSL
85efc0
- building srpms from CVS now works with the Extras CVS structure
85efc0
- fixes to the chain-build command
85efc0
- bug fixes in the XML-RPC and web interfaces
85efc0
85efc0
* Tue Mar 20 2007 Jesse Keating <jkeating@redhat.com> - 0.9.7-1
85efc0
- Package up the needed ssl files
85efc0
85efc0
* Tue Mar 20 2007 Jesse Keating <jkeating@redhat.com> - 0.9.6-1
85efc0
- 0.9.6 release, mostly ssl auth stuff
85efc0
- use named directories for config stuff
85efc0
- remove -3 requires on creatrepo, don't need that specific anymore
85efc0
85efc0
* Tue Feb 20 2007 Jesse Keating <jkeating@redhat.com> - 0.9.5-8
85efc0
- Add Authors COPYING LGPL to the docs of the main package
85efc0
85efc0
* Tue Feb 20 2007 Jesse Keating <jkeating@redhat.com> - 0.9.5-7
85efc0
- Move web files from /var/www to /usr/share
85efc0
- Use -p in install calls
85efc0
- Add rpm-python to requires for koji
85efc0
85efc0
* Mon Feb 19 2007 Jesse Keating <jkeating@redhat.com> - 0.9.5-6
85efc0
- Clean up spec for package review
85efc0
85efc0
* Sun Feb 04 2007 Mike McLean <mikem@redhat.com> - 0.9.5-1
85efc0
- project renamed to koji