Blame copr-dist-git.spec

3e88a66
Name:       copr-dist-git
clime 349baa1
Version:    0.18
3e88a66
Release:    1%{?dist}
3e88a66
Summary:    Copr services for Dist Git server
3e88a66
3e88a66
Group:      Applications/Productivity
3e88a66
License:    GPLv2+
3e88a66
URL:        https://fedorahosted.org/copr/
3e88a66
# Source is created by
3e88a66
# git clone https://git.fedorahosted.org/git/copr.git
3e88a66
# cd copr/dist-git
3e88a66
# tito build --tgz
3e88a66
Source0: %{name}-%{version}.tar.gz
3e88a66
3e88a66
BuildArch:  noarch
3e88a66
3e88a66
BuildRequires: systemd
3e88a66
BuildRequires: dist-git
3e88a66
BuildRequires: python-bunch
3e88a66
BuildRequires: python-requests
3e88a66
BuildRequires: pyrpkg
3e88a66
# check
3e88a66
BuildRequires: python-six
3e88a66
BuildRequires: python-netaddr
3e88a66
BuildRequires: python-dateutil
3e88a66
BuildRequires: pytest
3e88a66
BuildRequires: python-pytest-cov
3e88a66
BuildRequires: python-mock
3e88a66
BuildRequires: pytz
3e88a66
3e88a66
Requires: systemd
3e88a66
Requires: dist-git
3e88a66
Requires: python-bunch
3e88a66
Requires: python-requests
3e88a66
Requires: pyrpkg
3e88a66
Requires: mock-scm
3e88a66
Requires: tito
3e88a66
Requires: pyp2rpm
clime 349baa1
Requires: rubygem-gem2rpm >= 0.11.3
3e88a66
Requires: httpd
3e88a66
%{?fedora:Requires(post): policycoreutils-python-utils}
3e88a66
%{?rhel:Requires(post): policycoreutils-python}
3e88a66
3e88a66
%description
3e88a66
COPR is lightweight build system. It allows you to create new project in WebUI
3e88a66
and submit new builds and COPR will create yum repository from latest builds.
3e88a66
3e88a66
This package contains Copr services for Dist Git server.
3e88a66
3e88a66
3e88a66
%prep
3e88a66
%setup -q
3e88a66
3e88a66
3e88a66
%build
3e88a66
3e88a66
3e88a66
%install
3e88a66
3e88a66
install -d %{buildroot}%{_datadir}/copr/dist_git
3e88a66
install -d %{buildroot}%{_sysconfdir}/copr
3e88a66
install -d %{buildroot}%{_sysconfdir}/logrotate.d/
3e88a66
install -d %{buildroot}%{_sysconfdir}/httpd/conf.d/
3e88a66
install -d %{buildroot}%{_unitdir}
3e88a66
install -d %{buildroot}%{_var}/log/copr-dist-git
3e88a66
install -d %{buildroot}%{_sharedstatedir}/copr-dist-git
3e88a66
install -d %{buildroot}%{_bindir}/
3e88a66
3e88a66
cp -a dist_git/* %{buildroot}%{_datadir}/copr/dist_git
3e88a66
cp -a conf/copr-dist-git.conf.example %{buildroot}%{_sysconfdir}/copr/copr-dist-git.conf
3e88a66
cp -a conf/httpd/copr-dist-git.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/copr-dist-git.conf
3e88a66
cp -a copr-dist-git.service %{buildroot}%{_unitdir}/
3e88a66
cp -a run/* %{buildroot}%{_bindir}/
3e88a66
3e88a66
cp -a conf/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/copr-dist-git
3e88a66
3e88a66
# for ghost files
3e88a66
touch %{buildroot}%{_var}/log/copr-dist-git/main.log
3e88a66
3e88a66
%check
3e88a66
3e88a66
%if 0%{?fedora} >= 21
3e88a66
# too old `pytest` in epel repo
3e88a66
PYTHONPATH=.:$PYTHONPATH python -B -m pytest \
3e88a66
  -v --cov-report term-missing --cov ./dist_git ./tests/
3e88a66
%endif
3e88a66
3e88a66
%post
3e88a66
# change context to be readable by cgit
3e88a66
semanage fcontext -a -t httpd_sys_content_t '/var/lib/copr-dist-git(/.*)?'
3e88a66
restorecon -rv /var/lib/copr-dist-git
3e88a66
3e88a66
%files
3e88a66
%license LICENSE
3e88a66
3e88a66
%{_bindir}/*
3e88a66
%dir %{_datadir}/copr 
3e88a66
%{_datadir}/copr/*
3e88a66
%dir %{_sysconfdir}/copr
3e88a66
%config(noreplace) %attr(0640, root, copr-service) %{_sysconfdir}/copr/copr-dist-git.conf
3e88a66
%config(noreplace) %attr(0644, root, root) %{_sysconfdir}/httpd/conf.d/copr-dist-git.conf
3e88a66
3e88a66
%dir %attr(0755, copr-service, copr-service) %{_sharedstatedir}/copr-dist-git/
3e88a66
3e88a66
%{_unitdir}/copr-dist-git.service
3e88a66
3e88a66
%dir %{_sysconfdir}/logrotate.d
3e88a66
%config(noreplace) %{_sysconfdir}/logrotate.d/copr-dist-git
3e88a66
%attr(0755, copr-service, copr-service) %{_var}/log/copr-dist-git
3e88a66
%attr(0644, copr-service, copr-service) %{_var}/log/copr-dist-git/main.log
3e88a66
%ghost %{_var}/log/copr-dist-git/*.log
3e88a66
3e88a66
%changelog
clime 349baa1
* Thu May 26 2016 clime <clime@redhat.com> 0.18-1
clime 349baa1
- implemented building from rubygems
clime 349baa1
clime 349baa1
* Fri Apr 22 2016 Miroslav Suchý <msuchy@redhat.com> 0.17-1
clime 349baa1
- support for pyrpkg-1.43
clime 349baa1
- typo in method name
clime 349baa1
- use os.listdir instead of Popen
clime 349baa1
- sort imports
clime 349baa1
- more verbose logging of exception
clime 349baa1
clime 349baa1
* Tue Apr 12 2016 Miroslav Suchý <msuchy@redhat.com> 0.16-1
clime 349baa1
- clean up after dist-git import
clime 349baa1
- assure python_versions type for pypi builds
clime 349baa1
- 1322553 - checkout specific branch
clime 349baa1
3e88a66
* Fri Mar 18 2016 Miroslav Suchý <msuchy@redhat.com> 0.15-1
3e88a66
- own /etc/logrotate.d
3e88a66
- own /usr/share/copr
3e88a66
- trailing dot in description
3e88a66
3e88a66
* Mon Mar 14 2016 Jakub Kadlčík <jkadlcik@redhat.com> 0.14-1
3e88a66
- per task logging for users
3e88a66
- don't assume the SCM repo has the same name as the package
3e88a66
- added policycoreutils-python-utils dependency
3e88a66
- do shallow git clone for mock-scm
3e88a66
- support building from PyPI
3e88a66
3e88a66
* Fri Jan 29 2016 Miroslav Suchý <msuchy@redhat.com> 0.13-1
3e88a66
- [dist-git] error handling based on subprocess return codes instead of output
3e88a66
  to stderr (e.g. git outputs progress to stderr) + missing catch for
3e88a66
  GitException in do_import (results in better error messages in frontend, see
3e88a66
  bz#1295540)
3e88a66
3e88a66
* Mon Jan 25 2016 Miroslav Suchý <msuchy@redhat.com> 0.12-1
3e88a66
- pass --scm-option spec=foo to mock-scm (msuchy@redhat.com)
3e88a66
3e88a66
* Thu Jan 21 2016 clime <clime@redhat.com> 0.11-1
3e88a66
- tito added to requirements
3e88a66
3e88a66
* Sat Jan 16 2016 clime <clime@redhat.com> 0.10-1
3e88a66
- fixed do_import test
3e88a66
- workaround for BZ 1283101
3e88a66
3e88a66
* Mon Nov 16 2015 Miroslav Suchý <msuchy@redhat.com> 0.9-1
3e88a66
- make more abstract exceptions
3e88a66
- implement support for multiple Mock SCMs
3e88a66
- split SourceDownloader to multiple SourceProvider classes
3e88a66
- refactor duplicate code from GIT_AND_TITO and GIT_AND_MOCK
3e88a66
- require mock-scm
3e88a66
- implement mock support in dist-git
3e88a66
- do not check cert when downloading srpm
3e88a66
3e88a66
* Mon Nov 02 2015 Miroslav Suchý <msuchy@redhat.com> 0.8-1
3e88a66
- add Git and Tito errors
3e88a66
- tito support
3e88a66
- hotfix for resubmit button
3e88a66
3e88a66
* Tue Sep 15 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.7-1
3e88a66
- provide build failure details
3e88a66
- replace urllib.urlretrieve with requests.get to catch non-200 HTTP  status codes
3e88a66
3e88a66
* Fri Aug 14 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.6-1
3e88a66
- [dist-git][rhbz: #1253335] Running rpkg in the dedicated process.
3e88a66
3e88a66
* Wed Aug 05 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.5-1
3e88a66
- don't run tests during %check on epel
3e88a66
3e88a66
* Wed Aug 05 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.4-1
3e88a66
- additional BuildRequires to run tests
3e88a66
3e88a66
* Tue Aug 04 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.3-1
3e88a66
- fixed commit message to include package name and version
3e88a66
- added initial tests; renamed folder with sources to use underscore instead of dash
3e88a66
- mark build as failed for any error during import
3e88a66
- don't break on the post failure to frontend
3e88a66
- get pkg name + version during import
3e88a66
- Use /var/lib/copr-dist-git/ to store pkg listing.
3e88a66
- refresh cgit after import
3e88a66
3e88a66
* Thu Jul 23 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.2-1
3e88a66
- new package built with tito
3e88a66
3e88a66
* Thu Jun 25 2015 Adam Samalik <asamalik@redhat.com> 0.1
3e88a66
- basic package