ed2013b
Name:       odcs
0fbbf11
Version:    0.3.4
b999198
Release:    6%{?dist}
ed2013b
Summary:    The On Demand Compose Service
ed2013b
ed2013b
ed2013b
License:    MIT
ed2013b
URL:        https://pagure.io/odcs
ed2013b
Source0:    https://files.pythonhosted.org/packages/source/o/%{name}/%{name}-%{version}.tar.gz
ed2013b
Source1:    odcs-backend.service
ed2013b
# In Fedora, "pyldap" is only for python3, not for python2. Therefore we
ed2013b
# have to patch the requirements.txt to use python-ldap instead of pyldap.
ed2013b
# Both ldap bindings are compatible on Python code level.
ed2013b
Patch0:     odcs-pythonldap.patch
ed2013b
# Fedora related configuration for ODCS.
ed2013b
Patch1:     odcs-fedora-conf.patch
0fbbf11
Patch2:     https://pagure.io/odcs/pull-request/510.patch
0fbbf11
Patch3:     https://pagure.io/odcs/pull-request/511.patch
ed2013b
ed2013b
BuildArch:    noarch
ed2013b
ed2013b
BuildRequires:    help2man
f803e2c
BuildRequires:    python3-libmodulemd
0878ca2
BuildRequires:    gobject-introspection
0878ca2
BuildRequires:    systemd
0878ca2
BuildRequires:    python3-devel
44e50fa
BuildRequires:    python3-requests-kerberos
0878ca2
BuildRequires:    python3-fedora
0878ca2
BuildRequires:    python3-productmd
0878ca2
BuildRequires:    python3-funcsigs
0878ca2
BuildRequires:    python3-openidc-client
0878ca2
BuildRequires:    python3-setuptools
0878ca2
BuildRequires:    python3-flask-sqlalchemy
0878ca2
BuildRequires:    python3-flask-migrate
0878ca2
BuildRequires:    python3-nose
0878ca2
BuildRequires:    python3-mock
0878ca2
BuildRequires:    python3-tabulate
0878ca2
BuildRequires:    python3-six
0878ca2
BuildRequires:    python3-flask
0878ca2
BuildRequires:    python3-systemd
0878ca2
BuildRequires:    python3-defusedxml
0878ca2
BuildRequires:    python3-koji
0878ca2
BuildRequires:    python3-httplib2
0878ca2
BuildRequires:    python3-pyOpenSSL
0878ca2
BuildRequires:    python3-sqlalchemy
0878ca2
BuildRequires:    python3-ldap
0878ca2
BuildRequires:    python3-gobject-base
0878ca2
BuildRequires:    python3-flask-login
0878ca2
BuildRequires:    python3-munch
e41e374
BuildRequires:    python3-moksha-hub
6069afa
BuildRequires:    python3-psutil
78b27f1
BuildRequires:    python3-flufl-lock
404dc89
BuildRequires:    python3-celery
f3568f7
BuildRequires:    python3-kobo
28129c0
BuildRequires:    python3-prometheus_client
ed2013b
ed2013b
%{?systemd_requires}
ed2013b
ed2013b
Requires(pre): shadow-utils
ed2013b
Requires:    systemd
ed2013b
Requires:    pungi
44e50fa
Requires:    python3-requests-kerberos
e41e374
Requires:    python3-fedora
e41e374
Requires:    python3-funcsigs
e41e374
Requires:    python3-openidc-client
e41e374
Requires:    python3-productmd
c02d6ef
Requires:    hardlink
f803e2c
Requires:    python3-libmodulemd
cb47348
Requires:    gobject-introspection
e41e374
Requires:    python3-moksha-hub
6069afa
Requires:    python3-psutil
78b27f1
Requires:    python3-flufl-lock
404dc89
Requires:    python3-celery
80da83e
Requires:    python3-flask
80da83e
Requires:    python3-flask-login
80da83e
Requires:    python3-flask-sqlalchemy
80da83e
Requires:    python3-systemd
80da83e
Requires:    python3-ldap
80da83e
Requires:    python3-defusedxml
1deff14
Requires:    python3-flask-migrate
1deff14
Requires:    python3-fedora-messaging
a4c5d13
Requires:    fedora-messaging
f3568f7
Requires:    python3-kobo
28129c0
Requires:    python3-prometheus_client
ed2013b
ad1c0a9
Requires:    python3-odcs-common = %{version}-%{release}
6fdc146
ed2013b
ed2013b
%description
ed2013b
The On Demand Compose Service (ODCS) creates temporary composes using Pungi
ed2013b
tool and manages their lifetime. The composes can be requested by external
ed2013b
services or users using the REST API provided by Flask frontend.
ed2013b
0878ca2
%package -n python3-odcs-common
0878ca2
Summary:        ODCS subpackage providing code shared between server and client.
0878ca2
%{?python_provide:%python_provide python3-odcs-client}
0878ca2
0878ca2
Requires:       python3-six
0878ca2
0878ca2
%description -n python3-odcs-common
0878ca2
ODCS subpackage providing code shared between server and client.
0878ca2
0878ca2
%package -n python3-odcs-client
0878ca2
Summary:        ODCS client module
0878ca2
%{?python_provide:%python_provide python3-odcs-client}
0878ca2
0878ca2
Requires:       python3-six
0878ca2
Requires:       python3-requests
472bc89
Requires:       python3-requests-kerberos
0878ca2
Requires:       python3-odcs-common = %{version}-%{release}
0878ca2
0878ca2
%description -n python3-odcs-client
0878ca2
Client library for sending requests to On Demand Compose Service (ODCS).
ed2013b
bea3da5
%package -n odcs-client
bea3da5
Summary:        ODCS command line client
0878ca2
Requires:       python3-openidc-client
0878ca2
Requires:       python3-odcs-client = %{version}-%{release}
bea3da5
bea3da5
%description -n odcs-client
bea3da5
Command line client for sending requests to ODCS.
bea3da5
bea3da5
ed2013b
%prep
ed2013b
%setup -q
ed2013b
0878ca2
sed -i '/futures/d' common/requirements.txt
0878ca2
sed -i '/futures/d' client/requirements.txt
0878ca2
sed -i '/futures/d' server/requirements.txt
0878ca2
ed2013b
%patch0 -p1 -b .pyldap
ed2013b
%patch1 -p1
0fbbf11
%patch2 -p1
0fbbf11
%patch3 -p1
ed2013b
ed2013b
%build
0878ca2
%py3_build
ed2013b
ed2013b
ed2013b
%install
ad1c0a9
%py3_install
ed2013b
ad1c0a9
export PYTHONPATH=%{buildroot}%{python3_sitelib}
ed2013b
mkdir -p %{buildroot}%{_mandir}/man1
0fbbf11
for command in odcs-manager odcs-frontend odcs-gencert ; do
6fdc146
export ODCS_CONFIG_FILE=server/conf/config.py
ed2013b
help2man -N \
ed2013b
    --version-string=%{version} %{buildroot}%{_bindir}/$command  > \
ed2013b
    %{buildroot}%{_mandir}/man1/$command.1 || \
ed2013b
    %{buildroot}%{_bindir}/$command --help
7f9dbf5
ed2013b
done
ed2013b
ed2013b
install -d -m 0755 %{buildroot}%{_unitdir}
ed2013b
install -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/
ed2013b
ed2013b
install -d -m 0755 %{buildroot}%{_datadir}/odcs
6fdc146
install -p -m 0644 server/contrib/odcs.wsgi %{buildroot}%{_datadir}/odcs
ed2013b
0878ca2
ed2013b
%pre
ed2013b
getent group odcs >/dev/null || groupadd -r odcs
ed2013b
getent passwd odcs >/dev/null || \
ed2013b
    useradd -r -g odcs -s /sbin/nologin \
ed2013b
    -c "On Demand Compose Service user" odcs
ed2013b
exit 0
ed2013b
ed2013b
%post
ed2013b
%systemd_post odcs-backend.service
ed2013b
ed2013b
%preun
ed2013b
%systemd_preun odcs-backend.service
ed2013b
ed2013b
%postun
ed2013b
%systemd_postun_with_restart odcs-backend.service
ed2013b
ed2013b
%check
0878ca2
nosetests-%{python3_version} -v
ed2013b
bea3da5
%files -n odcs-client
bea3da5
%doc README.md
bea3da5
%license LICENSE
bea3da5
%{_bindir}/odcs
bea3da5
0878ca2
%files -n python3-odcs-common
0878ca2
%doc README.md
0878ca2
%license LICENSE
0878ca2
%dir %{python3_sitelib}/odcs/
0878ca2
%{python3_sitelib}/odcs/__init__.py*
0878ca2
%{python3_sitelib}/odcs/common/
0878ca2
%{python3_sitelib}/odcs-%{version}-py%{python3_version}.egg-info/
0878ca2
%exclude %{python3_sitelib}/odcs/__pycache__
0878ca2
0878ca2
%files -n python3-odcs-client
0878ca2
%doc README.md
0878ca2
%license LICENSE
0878ca2
%dir %{python3_sitelib}/odcs/
0878ca2
%{python3_sitelib}/odcs/client/
0878ca2
%exclude %{python3_sitelib}/odcs/__pycache__
0878ca2
ed2013b
%files
ed2013b
%doc README.md
ed2013b
%license LICENSE
ed2013b
%{_unitdir}/odcs-backend.service
ad1c0a9
%{python3_sitelib}/odcs/server
ed2013b
%{_bindir}/odcs-*
ed2013b
%{_mandir}/man1/odcs-*.1*
ed2013b
%{_datadir}/odcs
ed2013b
%dir %{_sysconfdir}/odcs
ed2013b
%config(noreplace) %{_sysconfdir}/odcs/config.py
4bb2170
%config(noreplace) %{_sysconfdir}/odcs/pungi.conf
bea3da5
%config(noreplace) %{_sysconfdir}/odcs/raw_config_wrapper.conf
ed2013b
%exclude %{_sysconfdir}/odcs/*.py[co]
e5e68b4
%exclude %{_sysconfdir}/odcs/__pycache__
ad1c0a9
%exclude %{python3_sitelib}/odcs/__pycache__
ed2013b
ed2013b
ed2013b
%changelog
b999198
* Tue Aug 17 2021 Lubomír Sedlář <lsedlar@redhat.com> - 0.3.4-6
b999198
- Rebuilt to sync changelog and release
b999198
b999198
* Tue Aug 17 2021 Lubomír Sedlář <lsedlar@redhat.com> - 0.3.4-5
0fbbf11
- New upstream release
0fbbf11
- Drop dependency on python-flask-script
0fbbf11
- Backport patch for client to talk to old servers
0fbbf11
f8b36a2
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.51-5
f8b36a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
f8b36a2
1eb58c5
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.2.51-4
1eb58c5
- Rebuilt for Python 3.10
1eb58c5
6929811
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.2.51-3
6929811
- Rebuilt for updated systemd-rpm-macros
6929811
  See https://pagure.io/fesco/issue/2583.
6929811
5ed0ff9
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.51-2
5ed0ff9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
5ed0ff9
44e50fa
* Wed Nov 18 2020 Lubomír Sedlář <lsedlar@redhat.com> - 0.2.51-1
44e50fa
- New upstream release
44e50fa
- Remove unused dependency on python3-pdc-client and instead pull in
44e50fa
  python3-requests-kerberos directly
44e50fa
c583135
* Tue Sep 08 2020 Lubomír Sedlář <lsedlar@redhat.com> - 0.2.50-1
c583135
- New upstream release
c583135
2ea9225
* Wed Aug 19 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.49-1
2ea9225
- new version
2ea9225
630301b
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.48-2
630301b
- Second attempt - Rebuilt for
630301b
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
630301b
70079e5
* Fri Jul 31 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.48-1
70079e5
- new version
70079e5
3302aea
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.46-3
3302aea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3302aea
5e705c5
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.2.46-2
5e705c5
- Rebuilt for Python 3.9
5e705c5
6bb382e
* Wed Apr 29 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.46-1
6bb382e
- new version
6bb382e
15f79ff
* Tue Apr 21 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.45-1
15f79ff
- new version
15f79ff
49c053e
* Mon Apr 20 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.44-1
49c053e
- new version
49c053e
4216496
* Wed Apr 01 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.42-1
4216496
- new version
4216496
e5e68b4
* Fri Mar 20 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.41-1
e5e68b4
- new version
e5e68b4
5f8b440
* Mon Mar 16 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.40-1
5f8b440
- new version
5f8b440
43cd496
* Wed Mar 04 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.39-1
43cd496
- new version
43cd496
8946603
* Tue Feb 25 2020 Jan Kaluza <jkaluza@redhat.com> - 0.2.38-1
8946603
- new version
8946603
a4c5d13
* Thu Oct 24 2019 Jan Kaluza <jkaluza@redhat.com> - 0.2.36-4
a4c5d13
- add fedora-messaging requirement.
a4c5d13
1deff14
* Wed Oct 23 2019 Jan Kaluza <jkaluza@redhat.com> - 0.2.36-3
1deff14
- backport patch to support fedora-messaging.
1deff14
80da83e
* Tue Oct 22 2019 Jan Kaluza <jkaluza@redhat.com> - 0.2.36-2
80da83e
- Add missing requires, backport patch to disable SNI when not needed.
80da83e
3aaf32f
* Thu Oct 17 2019 Jan Kaluza <jkaluza@redhat.com> - 0.2.36-1
3aaf32f
- new version
3aaf32f
5c4a86f
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.23-5
5c4a86f
- Rebuilt for Python 3.8.0rc1 (#1748018)
5c4a86f
9be187d
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.23-4
9be187d
- Rebuilt for Python 3.8
9be187d
571d929
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.23-3
571d929
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
571d929
f6d5199
* Sat Feb 16 2019 Jan Kaluza <jkaluza@redhat.com> - 0.2.23-2
f6d5199
- require python3-fedmsg instead of fedmsg-hub
f6d5199
11bfb43
* Fri Feb 15 2019 Jan Kaluza <jkaluza@redhat.com> - 0.2.23-1
11bfb43
- new version
11bfb43
25c2035
* Mon Feb 04 2019 Kalev Lember <klember@redhat.com> - 0.2.7-5
25c2035
- Update requires for python-gobject -> python2-gobject rename
25c2035
3715cf1
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.7-4
3715cf1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3715cf1
a0fb87f
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.7-3
a0fb87f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
a0fb87f
c72ad45
* Tue Jun 26 2018 Miro Hrončok <mhroncok@redhat.com> - 0.2.7-2
c72ad45
- Rebuilt for Python 3.7
c72ad45
8ef39a4
* Wed Jun 20 2018 Ralph Bean <rbean@redhat.com> - 0.2.7-1
8ef39a4
- new version
8ef39a4
56d03dd
* Wed Jun 20 2018 Ralph Bean <rbean@redhat.com> - 0.2.6.2-1
56d03dd
- new version
56d03dd
eb06388
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.2.6.1-3
eb06388
- Rebuilt for Python 3.7
eb06388
9bf788a
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.2.6.1-2
9bf788a
- Rebuilt for Python 3.7
9bf788a
3eab87e
* Fri Jun 15 2018 Ralph Bean <rbean@redhat.com> - 0.2.6.1-1
3eab87e
- new version
3eab87e
72e4b3a
* Thu Jun 14 2018 Ralph Bean <rbean@redhat.com> - 0.2.6-1
72e4b3a
- new version
72e4b3a
472bc89
* Wed Jun 06 2018 Ralph Bean <rbean@redhat.com> - 0.2.4-2
472bc89
- Add dep on python-requests-kerberos
472bc89
  https://pagure.io/odcs/issue/203
472bc89
e9aa524
* Mon Jun 04 2018 Jan Kaluza <jkaluza@redhat.com> - 0.2.4-1
e9aa524
- updated to new version 0.2.4
e9aa524
a050070
* Mon May 07 2018 Jan Kaluza <jkaluza@redhat.com> - 0.2.3-1
a050070
- updated to new version 0.2.3.
6301999
92e2d47
* Thu Apr 19 2018 Jan Kaluza <jkaluza@redhat.com> - 0.2.2-1
92e2d47
- updated to new version 0.2.2.
d12a0b4
0878ca2
* Mon Mar 12 2018 Ralph Bean <rbean@redhat.com> - 0.2.1-2
0878ca2
- Python3 subpackages.
0878ca2
cb47348
* Mon Mar 12 2018 Jan Kaluza <jkaluza@redhat.com> - 0.2.1-1
cb47348
- updated to new version 0.2.1.
cb47348
9cc9551
* Thu Mar 01 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.2.0-2
9cc9551
- Update Python 2 dependency declarations to new packaging standards
9cc9551
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
9cc9551
5289f63
* Mon Feb 26 2018 Jan Kaluza <jkaluza@redhat.com> - 0.2.0-1
5289f63
- updated to new version 0.2.0.
5289f63
2161b6c
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-3
2161b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2161b6c
0ba2555
* Mon Feb 05 2018 Jan Kaluza <jkaluza@redhat.com> - 0.1.7-2
0ba2555
- restart odcs-backend.service on failure.
0ba2555
bea3da5
* Mon Feb 05 2018 Jan Kaluza <jkaluza@redhat.com> - 0.1.7-1
bea3da5
- updated to new version 0.1.7.
bea3da5
1b72613
* Thu Jan 11 2018 Jan Kaluza <jkaluza@redhat.com> - 0.1.6-1
1b72613
- updated to new version 0.1.6.
1b72613
18e8ec0
* Tue Dec 12 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.5-5
18e8ec0
- do not remove pungi ODCS composes
18e8ec0
bc08ad6
* Mon Dec 11 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.5-4
bc08ad6
- fix Koji kerberos login with keytab
bc08ad6
fba5517
* Mon Dec 11 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.5-3
fba5517
- fix Koji kerberos login with keytab
fba5517
3152777
* Mon Dec 11 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.5-2
3152777
- fix traceback in unique_path.
3152777
64309b9
* Fri Dec 08 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.5-1
64309b9
- updated to new version 0.1.5
64309b9
d35c6f8
* Fri Nov 24 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.4-1
d35c6f8
- updated to new version 0.1.4.
d35c6f8
d35c6f8
* Fri Nov 24 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.3-1
d35c6f8
- updated to new version 0.1.3.
d35c6f8
883e91e
* Wed Nov 01 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.2-1
883e91e
- updated to new version 0.1.2.
883e91e
c02d6ef
* Mon Oct 30 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.1-3
c02d6ef
- Require:hardlink
c02d6ef
4bb2170
* Mon Oct 30 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.1-1
4bb2170
- updated to new version 0.1.1.
4bb2170
8ec79d4
* Thu Oct 12 2017 Jan Kaluza <jkaluza@redhat.com> - 0.1.0-2
8ec79d4
- use http instead of https for pulp .repo file
8ec79d4
1eca9b9
* Fri Oct 06 2017 Ralph Bean <rbean@redhat.com> - 0.1.0-1
1eca9b9
- new version
1eca9b9
6679196
* Thu Oct 05 2017 Ralph Bean <rbean@redhat.com> - 0.0.8-1
6679196
- new version
6679196
c2232e0
* Fri Sep 29 2017 Ralph Bean <rbean@redhat.com> - 0.0.7-1
c2232e0
- new version
c2232e0
44e3a86
* Tue Sep 26 2017 Ralph Bean <rbean@redhat.com> - 0.0.6-1
44e3a86
- new version
44e3a86
62bd21d
* Thu Sep 21 2017 Jan Kaluza <jkaluza@redhat.com> - 0.0.5-1
62bd21d
- new version
62bd21d
6fdc146
* Thu Aug 10 2017 Jan Kaluza <jkaluza@redhat.com> - 0.0.4-1
6fdc146
- new version
6fdc146
59db209
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.3-5
59db209
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
59db209
b781242
* Tue Jul 18 2017 Jan Kaluza <jkaluza@redhat.com> - 0.0.3-4
b781242
- fix reversed condition for python2-* dependencies
b781242
ed2013b
* Mon Jul 17 2017 Jan Kaluza <jkaluza@redhat.com> - 0.0.3-3
ed2013b
- Add python2- prefix to requirements when it makes sense
ed2013b
- Add -p to install command to preserve timestamp
ed2013b
- Fix macros formatting, use _datadir instead of /usr/share
ed2013b
ed2013b
* Tue Jul 11 2017 Jan Kaluza <jkaluza@redhat.com> - 0.0.3-2
ed2013b
- fix dependencies
ed2013b
ed2013b
* Thu Jun 29 2017 Jan Kaluza <jkaluza@redhat.com> - 0.0.3-1
ed2013b
- Initial version of spec file