Blob Blame History Raw
# Set this to 0 if you don't have access to EPEL packages while building
%global with_epel 1
Name:           module-build-service
Version:        1.5.2
Release:        1%{?dist}
Summary:        The Module Build Service for Modularity

Group:          Development/Tools
License:        MIT
URL:            https://pagure.io/fm-orchestrator
Source0:        https://files.pythonhosted.org/packages/source/m/%{name}/%{name}-%{version}.tar.gz

BuildArch:      noarch

%if 0%{?rhel}
ExclusiveArch:  %{ix86} x86_64 noarch
%endif

BuildRequires:  python2-devel

%if 0%{?with_epel}
BuildRequires:  python2-mock
BuildRequires:  python-vcrpy
BuildRequires:  fedmsg
BuildRequires:  git
BuildRequires:  help2man
BuildRequires:  kobo
BuildRequires:  kobo-rpmlib

BuildRequires:  m2crypto
BuildRequires:  mock
BuildRequires:  python2-pdc-client
BuildRequires:  python-fedora
BuildRequires:  python-flask-script
BuildRequires:  python-httplib2
BuildRequires:  python-m2ext
BuildRequires:  python-munch
BuildRequires:  python2-funcsigs
BuildRequires:  python2-modulemd >= 1.1.0
BuildRequires:  rpm-build
BuildRequires:  python-qpid
BuildRequires:  python-openidc-client
BuildRequires:  python-urlgrabber
BuildRequires:  python-ldap3
BuildRequires:  python-requests-kerberos

BuildRequires:  python2-koji
%endif

%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires:  python-setuptools
%if 0%{?with_epel}
BuildRequires:  python-flask-sqlalchemy
BuildRequires:  python-flask-migrate
BuildRequires:  python-nose
BuildRequires:  python-mock
BuildRequires:  python-tabulate
BuildRequires:  python-six
BuildRequires:  pyOpenSSL
BuildRequires:  python-sqlalchemy
BuildRequires:  python-futures
BuildRequires:  python-flask
BuildRequires:  systemd-python
BuildRequires:  python-dogpile-cache
BuildRequires:  python-backports-ssl_match_hostname
%endif
%else
BuildRequires:  python2-setuptools
%if 0%{?with_epel}
BuildRequires:  python2-flask-sqlalchemy
BuildRequires:  python2-flask-migrate
BuildRequires:  python2-nose
BuildRequires:  python2-mock
BuildRequires:  python2-tabulate
BuildRequires:  python2-six
BuildRequires:  python2-futures
BuildRequires:  python2-flask
BuildRequires:  python2-systemd
BuildRequires:  python2-dogpile-cache
%endif

%if 0%{?fedora} && 0%{?fedora} <= 25
BuildRequires:  pyOpenSSL
BuildRequires:  python-sqlalchemy
%else
%if 0%{?with_epel}
BuildRequires:  python2-pyOpenSSL
BuildRequires:  python2-sqlalchemy
%endif
%endif

%endif

BuildRequires:  systemd

Requires:       systemd
Requires:       fedmsg
Requires:       fedpkg
Requires:       git
Requires:       kobo
Requires:       kobo-rpmlib
Requires:       m2crypto
Requires:       mock
Requires:       python2-pdc-client
Requires:       pyOpenSSL
Requires:       python-fedora
Requires:       python-flask-script
Requires:       python-httplib2
Requires:       python-m2ext
Requires:       python-munch
Requires:       python2-funcsigs
Requires:       python2-modulemd >= 1.1.0
Requires:       rpm-build
Requires:       python-qpid
Requires:       python-openidc-client
Requires:       python-urlgrabber
Requires:       python-ldap3
Requires:       python-requests-kerberos

Requires:       python2-koji

# https://bugzilla.redhat.com/show_bug.cgi?id=1466792
Requires:       mock-scm

%if 0%{?rhel} && 0%{?rhel} <= 7
Requires:       python-flask-sqlalchemy
Requires:       python-flask-migrate
Requires:       python-mock
Requires:       python-six
Requires:       pyOpenSSL
Requires:       python-sqlalchemy
Requires:       python-futures
Requires:       python-flask
Requires:       systemd-python
Requires:       python-tabulate
Requires:       python-dogpile-cache
Requires:       python-backports-ssl_match_hostname
%else
Requires:       python2-flask-sqlalchemy
Requires:       python2-flask-migrate
Requires:       python2-mock
Requires:       python2-systemd
Requires:       python2-six
Requires:       python2-futures
Requires:       python2-flask
Requires:       python2-tabulate
Requires:       python2-dogpile-cache

%if 0%{?fedora} && 0%{?fedora} <= 25
Requires:       pyOpenSSL
Requires:       python-sqlalchemy
%else
Requires:       python2-pyOpenSSL
Requires:       python2-sqlalchemy
%endif

%endif


%description
The Module Build Service (MBS) coordinates module builds and is responsible
for a number of tasks:

- Providing an interface for module client-side tooling via which module build
  submission and build state queries are possible.
- Verifying the input data (modulemd, RPM SPEC files and others) is available
  and correct.
- Preparing the build environment in the supported build systems, such as koji.
- Scheduling and building of the module components and tracking the build
  state.
- Emitting bus messages about all state changes so that other infrastructure
  services can pick up the work.


%prep
%setup -q


# Simply remove an old .pyc file that was included in one release.
rm -f module_build_service/scheduler/consumer.pyc
# And this weird sqlite file that made it in...
rm -f module_build_service/.mbs_local_build.db

%build
%py2_build

%install
%py2_install

%if 0%{?with_epel}
export PYTHONPATH=%{buildroot}%{python2_sitelib}
mkdir -p %{buildroot}/%{_mandir}/man1
for command in mbs-manager mbs-frontend mbs-upgradedb ; do
MBS_CONFIG_FILE=conf/config.py %{buildroot}/%{_bindir}/$command --help || true
MBS_CONFIG_FILE=conf/config.py help2man -N --version-string=%{version} \
    %{buildroot}/%{_bindir}/$command > \
    %{buildroot}/%{_mandir}/man1/$command.1
done
%endif


%check
# https://pagure.io/fm-orchestrator/issue/664
#nosetests-%{python2_version} -v


%files
%doc README.rst
%license LICENSE
%{python2_sitelib}/module_build_service*
%{_bindir}/mbs-*
%dir %{_sysconfdir}/module-build-service
%config(noreplace) %{_sysconfdir}/module-build-service/config.py
%config(noreplace) %{_sysconfdir}/module-build-service/koji.conf
%config(noreplace) %{_sysconfdir}/module-build-service/copr.conf
%config(noreplace) %{_sysconfdir}/module-build-service/cacert.pem
%config(noreplace) %{_sysconfdir}/module-build-service/mock.cfg
%config(noreplace) %{_sysconfdir}/module-build-service/yum.conf
%config(noreplace) %{_sysconfdir}/fedmsg.d/mbs-scheduler.py
%config(noreplace) %{_sysconfdir}/fedmsg.d/mbs-logging.py
%config(noreplace) %{_sysconfdir}/fedmsg.d/module_build_service.py
%exclude %{_sysconfdir}/module-build-service/*.py[co]
%exclude %{_sysconfdir}/fedmsg.d/*.py[co]
%exclude %{python2_sitelib}/conf/
%exclude %{python2_sitelib}/tests/

%if 0%{?with_epel}
%{_mandir}/man1/mbs-*.1*
%endif


%changelog
* Tue Nov 28 2017 mprahl <mprahl@redhat.com> - 1.5.2-1
- new version

* Mon Nov 27 2017 mprahl <mprahl@redhat.com> - 1.5.1-1
- new version

* Fri Nov 17 2017 mprahl <mprahl@redhat.com> - 1.5.0-1
- new version

* Tue Nov 14 2017 mprahl <mprahl@redhat.com> - 1.4.7-1
- new version

* Tue Nov 14 2017 mprahl <mprahl@redhat.com> - 1.4.6-1
- new version

* Tue Nov 07 2017 mprahl <mprahl@redhat.com> - 1.4.5-2
- Support building without EPEL

* Mon Nov 06 2017 mprahl <mprahl@redhat.com> - 1.4.5-1
- new version

* Mon Nov 06 2017 mprahl <mprahl@redhat.com> - 1.4.4-1
- new version

* Thu Nov 2 2017 Matt Prahl <mprahl@redhat.com> - 1.4.3.1
- New version

* Thu Nov 2 2017 Matt Prahl <mprahl@redhat.com> - 1.4.2.1
- New version

* Thu Nov 2 2017 Matt Prahl <mprahl@redhat.com> - 1.4.1.1
- New version

* Thu Nov 2 2017 Matt Prahl <mprahl@redhat.com> - 1.4.0-2
- Remove the caching patch that was merged upstream
- Add a patch that fixes a typo in error messages

* Wed Nov 1 2017 Matt Prahl <mprahl@redhat.com> - 1.4.0-1
- New version

* Wed Oct 11 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.31-3
- Fix wrong attr for untagged builds.

* Wed Oct 11 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.31-2
- Fix bad performance while getting data from PDC for modules with many deps.

* Mon Oct 2 2017 Matt Prahl <mprahl@redhat.com> - 1.3.31-1
- New version

* Thu Sep 21 2017 Ralph Bean <rbean@redhat.com> - 1.3.30-2
- Re-enable ldap3 requirement now that it is available in epel7.
- Add new requirement on python-requests-kerberos.

* Thu Sep 21 2017 Ralph Bean <rbean@redhat.com> - 1.3.30-1
- new version

* Mon Sep 18 2017 Ralph Bean <rbean@redhat.com> - 1.3.29-1
- new version

* Fri Sep 15 2017 Ralph Bean <rbean@redhat.com> - 1.3.28-1
- new version

* Tue Sep 12 2017 Ralph Bean <rbean@redhat.com> - 1.3.27-3
- Remove the nobuild patch for EL7.

* Tue Sep 12 2017 Ralph Bean <rbean@redhat.com> - 1.3.27-2
- Merge epel7 spec branch into rawhide to consolidate streams.

* Tue Sep 12 2017 Ralph Bean <rbean@redhat.com> - 1.3.27-1
- new version

* Tue Sep 05 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.26-5
- Really apply patches

* Sun Sep 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.26-4
- Backport patches to fix skiptests behavior
- Cleanups / Fixes in spec

* Fri Aug 18 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.26-3
- add missing dependency on python2-dogpile-cache

* Thu Aug 17 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.26-2
- fix mbs-build issue with trailing slash in REST API url

* Thu Aug 17 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.26-1
- new version

* Mon Aug 07 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.25-8
- do not wait for kojira when generating module-build-macros repository

* Mon Aug 07 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.25-7
- upload modulemd.yaml to Koji as modulemd.txt

* Fri Aug 04 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.25-6
- fix tagging components when all of them are reused

* Fri Aug 04 2017 Ralph Bean <rbean@redhat.com> - 1.3.25-5
- upload content generator logs to Koji
- Require mock-scm for local builds.

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.25-4
- fix bug during build caused by not set SERVER_NAME in configuration file
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon Jul 17 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.25-3
- fix typo in spec file

* Mon Jul 17 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.25-2
- fix dependency on koji

* Mon Jul 17 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.25-1
- new version

* Tue Jul 11 2017 Ralph Bean <rbean@redhat.com> - 1.3.24-3
- Fix the runtime dep for pdc-client.

* Tue Jun 27 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.24-2
- Fix the pdc-client dependency

* Tue Jun 27 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.24-1
- new version

* Mon Jun 05 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.23-5
- Fix the components reuse if database returns them in different order

* Mon Jun 05 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.23-4
- Tag the untagged artifacts when returning their build_id

* Mon Jun 05 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.23-3
- correct the patch from previous commit

* Mon Jun 05 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.23-2
- fix bug when untagged builds couldn't be find in Koji

* Wed May 31 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.23-1
- new version

* Thu May 25 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.22-3
- Use the same spec file for both epel7 and fedora

* Tue May 16 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.22-2
- fix reusing all components

* Fri May 12 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.22-1
- new version

* Fri Apr 07 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.20-1
- new version

* Fri Apr 07 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.18-1
- new version

* Thu Apr 06 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.17-1
- new version

* Sat Mar 25 2017 Petr Šabata <contyk@redhat.com> - 1.3.16-2
- Adding a missing runtime dependency, fedpkg

* Thu Mar 23 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.16-1
- new version

* Thu Mar 23 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.15-1
- new version

* Wed Mar 22 2017 Ralph Bean <rbean@redhat.com> - 1.3.14-1
- new version

* Wed Mar 22 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.13-1
- 1.3.13

* Wed Mar 22 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.12-1
- 1.3.12

* Fri Mar 17 2017 Jan Kaluza <jkaluza@redhat.com> - 1.3.11-1
- 1.3.11 bump

* Fri Mar 17 2017 Petr Šabata <contyk@redhat.com> - 1.3.10-1
- 1.3.10 bump

* Thu Mar 16 2017 Ralph Bean <rbean@redhat.com> - 1.3.9-1
- new version

* Wed Mar 15 2017 Ralph Bean <rbean@redhat.com> - 1.3.8-1
- new version

* Tue Mar 14 2017 Ralph Bean <rbean@redhat.com> - 1.3.6-1
- new version

* Tue Mar 14 2017 Ralph Bean <rbean@redhat.com> - 1.3.5-1
- new version

* Mon Mar 13 2017 Ralph Bean <rbean@redhat.com> - 1.3.4-1
- new version

* Fri Mar 03 2017 Ralph Bean <rbean@redhat.com> - 1.3.3-1
- new version

* Fri Mar 03 2017 Petr Šabata <contyk@redhat.com> - 1.3.2-3
- MBS requires modulemd-1.1.0+ to work properly

* Thu Mar 02 2017 Ralph Bean <rbean@redhat.com> - 1.3.2-2
- Conditionalize arch for epel7 building.

* Thu Mar 02 2017 Ralph Bean <rbean@redhat.com> - 1.3.2-1
- new version

* Tue Feb 28 2017 Ralph Bean <rbean@redhat.com> - 1.3.1-2
- Disable the test suite in koji for now.

* Tue Feb 28 2017 Ralph Bean <rbean@redhat.com> - 1.3.1-1
- new version

* Wed Feb 15 2017 Ralph Bean <rbean@redhat.com> - 1.2.0-1
- new version

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb  1 2017 Filip Valder <fvalder@redhat.com> - 1.1.1-2
- New revision (deps & cleanups)

* Tue Jan 31 2017 Ralph Bean <rbean@redhat.com> - 1.1.1-1
- new version

* Tue Jan 24 2017 Ralph Bean <rbean@redhat.com> - 1.1.0-3
- Include fedmsg.d/mbs-scheduler.py by default.

* Wed Jan 18 2017 Ralph Bean <rbean@redhat.com> - 1.1.0-2
- Dep fixes (for EPEL7).

* Tue Jan 17 2017 Ralph Bean <rbean@redhat.com> - 1.1.0-1
- new version

* Wed Jan 11 2017 Ralph Bean <rbean@redhat.com> - 1.0.2-4
- Conditionalize some deps for EPEL7.

* Wed Jan 11 2017 Ralph Bean <rbean@redhat.com> - 1.0.2-3
- Sync spec file from upstream git.

* Thu Dec 15 2016 Matt Prahl <mprahl@redhat.com> - 1.0.2-2
- Replace systemd unit with fedmsg-hub
- Remove an old .pyc file that got included by accident.

* Wed Dec 14 2016 Ralph Bean <rbean@redhat.com> - 1.0.2-1
- Enable test suite in the check section.
- Add systemd scriptlets, per review feedback.

* Mon Dec 12 2016 Ralph Bean <rbean@redhat.com> - 1.0.1-1
- Cleanup in preparation for package review.

* Tue Dec 6 2016 Matt Prahl <mprahl@redhat.com> - 1.0.0-2
- Adds systemd unit.

* Fri Nov 25 2016 Filip Valder <fvalder@redhat.com> - 1.0.0-1
- Let's get this party started.