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