Blob Blame History Raw
Name:		module-build-service
Version:	1.1.0
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

BuildRequires:	python2-devel

BuildRequires:	python2-mock
BuildRequires:	python-vcrpy
BuildRequires:	fedmsg
BuildRequires:	git
BuildRequires:	help2man
BuildRequires:	kobo
BuildRequires:	kobo-rpmlib
BuildRequires:	koji
BuildRequires:	m2crypto
BuildRequires:	mock
BuildRequires:	pdc-client
BuildRequires:	pyOpenSSL
BuildRequires:	python-fedora
BuildRequires:	python-flask
BuildRequires:	python-flask-script
BuildRequires:	python-httplib2
BuildRequires:	python-m2ext
BuildRequires:	python-munch
BuildRequires:	python-six
BuildRequires:	python-sqlalchemy
BuildRequires:	python2-modulemd
BuildRequires:	rpm-build

%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires:	python-setuptools
BuildRequires:	python-flask-sqlalchemy
BuildRequires:	python-flask-migrate
BuildRequires:	python-nose
BuildRequires:	python-mock
%else
BuildRequires:	python2-setuptools
BuildRequires:	python2-flask-sqlalchemy
BuildRequires:	python2-flask-migrate
BuildRequires:	python2-nose
BuildRequires:	python2-mock
%endif

BuildRequires:	systemd
%{?systemd_requires}

Requires:	systemd
Requires:	fedmsg
Requires:	fedmsg-hub
Requires:	git
Requires:	kobo
Requires:	kobo-rpmlib
Requires:	koji
Requires:	m2crypto
Requires:	mock
Requires:	pdc-client
Requires:	pyOpenSSL
Requires:	python-fedora
Requires:	python-flask
Requires:	python-flask-script
Requires:	python-httplib2
Requires:	python-m2ext
Requires:	python-munch
Requires:	python-six
Requires:	python-sqlalchemy
Requires:	python2-modulemd
Requires:	rpm-build

%if 0%{?rhel} && 0%{?rhel} <= 7
Requires:	python-flask-sqlalchemy
Requires:	python-flask-migrate
%else
Requires:	python2-flask-sqlalchemy
Requires:	python2-flask-migrate
%endif


%description
The orchestrator 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

# Remove erroneous requirement
# https://pagure.io/fm-orchestrator/pull-request/288
sed -i '/vcrpy/d' requirements.txt
# https://pagure.io/fm-orchestrator/pull-request/289
sed -i '/systemd-python/d' requirements.txt

%build
%py2_build

%install
%py2_install
export PYTHONPATH=%{buildroot}%{python2_sitelib}
mkdir -p %{buildroot}/%{_mandir}/man1
for command in mbs-manager mbs-frontend mbs-gencert mbs-upgradedb ; do
help2man -N --version-string=%{version} %{buildroot}/%{_bindir}/$command > \
%{buildroot}/%{_mandir}/man1/$command.1
done

# Disable the test suite for now.
# https://pagure.io/fm-orchestrator/pull-request/290
#%check
#nosetests-2 -v

%files
%doc README.rst
%license LICENSE
%{python2_sitelib}/module_build_service*
%{_bindir}/mbs-*
%{_mandir}/man1/mbs-*.1*
%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}/fedmsg.d/mbs-logging.py
%config(noreplace) %{_sysconfdir}/fedmsg.d/module_build_service.py
%exclude %{_sysconfdir}/module-build-service/cacert.pem
%exclude %{_sysconfdir}/module-build-service/*.py[co]
%exclude %{_sysconfdir}/fedmsg.d/*.py[co]
%exclude %{python2_sitelib}/conf/
%exclude %{python2_sitelib}/tests/


%changelog
* 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.