Blame bodhi-server.spec

f6cf8dc
%global pypi_name bodhi-server
372d9ac
%global src_name bodhi_server
ed5229c
%global pypi_version 8.1.0
f6cf8dc
f6cf8dc
Name:           %{pypi_name}
f6cf8dc
Version:        %{pypi_version}
ed5229c
Release:        1%{?dist}
f6cf8dc
Summary:        Bodhi server
f6cf8dc
372d9ac
License:        GPL-2.0-or-later
f6cf8dc
URL:            https://github.com/fedora-infra/bodhi
372d9ac
Source0:        %{pypi_source bodhi_server}
f6cf8dc
BuildArch:      noarch
f6cf8dc
56faf26
# We must avoid using i686 builders, this should do the trick
56faf26
# see fedora-infra ticket #11163
56faf26
ExclusiveArch:  %{golang_arches_future}
56faf26
f6cf8dc
BuildRequires:  make
f6cf8dc
BuildRequires:  pyproject-rpm-macros
f6cf8dc
BuildRequires:  systemd-rpm-macros
f6cf8dc
BuildRequires:  python3-devel
f6cf8dc
BuildRequires:  python3-pytest
f6cf8dc
BuildRequires:  python3-pytest-cov
f6cf8dc
BuildRequires:  python3-pytest-mock
f6cf8dc
BuildRequires:  python3-sphinx
f6cf8dc
BuildRequires:  python3-responses
f6cf8dc
BuildRequires:  python3-webtest
f6cf8dc
BuildRequires:  python3-librepo
f6cf8dc
BuildRequires:  python3-createrepo_c
f6cf8dc
BuildRequires:  createrepo_c
f6cf8dc
BuildRequires:  skopeo
f6cf8dc
BuildRequires:  dnf
f6cf8dc
204bd16
Requires: bodhi-client >= 8.0.0
204bd16
Requires: python3-bodhi-messages >= 8.0.0
f6cf8dc
Requires: fedora-messaging
f6cf8dc
Requires: git
f6cf8dc
Requires: httpd
f6cf8dc
Requires: intltool
f6cf8dc
Requires: python3-librepo
f6cf8dc
Requires: python3-mod_wsgi
f6cf8dc
Debarshi Ray 783c5c1
%{?sysusers_requires_compat}
Debarshi Ray 783c5c1
f6cf8dc
Provides:  bundled(chrissimpkins-hack-fonts)
372d9ac
Provides:  bundled(fedora-bootstrap) = 2.0.2
372d9ac
Provides:  bundled(fontawesome-fonts-web) = 4.6.3
372d9ac
Provides:  bundled(js-chart) = 3.8.0
372d9ac
Provides:  bundled(js-jquery) = 3.6.0
372d9ac
Provides:  bundled(js-messenger) = 1.4.1
372d9ac
Provides:  bundled(js-moment) = 2.8.3
372d9ac
Provides:  bundled(js-selectize) = 0.15.2
f6cf8dc
Provides:  bundled(js-typeahead.js) = 1.1.1
f6cf8dc
Provides:  bundled(open-sans-fonts)
f6cf8dc
f6cf8dc
%py_provides python3-bodhi-server
f6cf8dc
f6cf8dc
%description
f6cf8dc
Bodhi is a modular framework that facilitates the process of publishing
f6cf8dc
updates for a software distribution.
f6cf8dc
f6cf8dc
f6cf8dc
%package -n bodhi-composer
f6cf8dc
Summary: Bodhi composer backend
f6cf8dc
f6cf8dc
Requires: %{py3_dist jinja2}
f6cf8dc
Requires: bodhi-server == %{version}-%{release}
f6cf8dc
Requires: pungi >= 4.1.20
204bd16
Requires: python3-createrepo_c >= 1.0.0
f6cf8dc
Requires: skopeo
f6cf8dc
f6cf8dc
%description -n bodhi-composer
f6cf8dc
The Bodhi composer is the component that publishes Bodhi artifacts to
f6cf8dc
repositories.
f6cf8dc
f6cf8dc
f6cf8dc
%prep
372d9ac
%autosetup -n %{src_name}-%{pypi_version}
f6cf8dc
# Remove bundled egg-info
f6cf8dc
rm -rf %{pypi_name}.egg-info
f6cf8dc
f6cf8dc
%generate_buildrequires
f6cf8dc
%pyproject_buildrequires
f6cf8dc
f6cf8dc
# https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation
f6cf8dc
cat > %{name}.sysusers << EOF
f6cf8dc
#Type Name   ID  GECOS           Home directory         Shell
f6cf8dc
u     bodhi  -   "Bodhi Server"  %{_datadir}/%{name}    /sbin/nologin
f6cf8dc
EOF
f6cf8dc
f6cf8dc
f6cf8dc
%build
f6cf8dc
%pyproject_wheel
f6cf8dc
make %{?_smp_mflags} -C docs man
f6cf8dc
f6cf8dc
%install
f6cf8dc
%pyproject_install
f6cf8dc
f6cf8dc
%{__mkdir_p} %{buildroot}/var/lib/bodhi
f6cf8dc
%{__mkdir_p} %{buildroot}/var/cache/bodhi
f6cf8dc
%{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.d
f6cf8dc
%{__mkdir_p} %{buildroot}%{_sysconfdir}/bodhi
f6cf8dc
%{__mkdir_p} %{buildroot}%{_datadir}/bodhi
f6cf8dc
%{__mkdir_p} -m 0755 %{buildroot}/%{_localstatedir}/log/bodhi
f6cf8dc
f6cf8dc
install -m 644 apache/bodhi.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/bodhi.conf
f6cf8dc
sed -i -s 's/BODHI_VERSION/%{version}/g' %{buildroot}%{_sysconfdir}/httpd/conf.d/bodhi.conf
f6cf8dc
install -m 640 production.ini %{buildroot}%{_sysconfdir}/bodhi/production.ini
f6cf8dc
install -m 640 alembic.ini %{buildroot}%{_sysconfdir}/bodhi/alembic.ini
f6cf8dc
install apache/bodhi.wsgi %{buildroot}%{_datadir}/bodhi/bodhi.wsgi
f6cf8dc
install -d %{buildroot}%{_mandir}/man1
f6cf8dc
install -pm0644 docs/_build/*.1 %{buildroot}%{_mandir}/man1/
f6cf8dc
f6cf8dc
install -p -D -m 0644 %{name}.sysusers %{buildroot}%{_sysusersdir}/%{name}.sysusers
f6cf8dc
f6cf8dc
%check
065719c
# For some reason the pytest fixture responsible to set the testing
065719c
# config file url doesn't work in Koji
065719c
export BODHI_CONFIG=$(pwd)/tests/testing.ini
1e0bc4b
204bd16
# sanity_checks tests rely on dnf command, but system's dnf cache is not accessible
204bd16
# within koji
1e0bc4b
%{pytest} -v -k 'not sanity_check and not TestSanityCheckRepodata'
f6cf8dc
f6cf8dc
%pre -n %{pypi_name}
f6cf8dc
%sysusers_create_compat %{name}.sysusers
f6cf8dc
f6cf8dc
f6cf8dc
%files -n %{pypi_name}
f6cf8dc
%doc README.rst bodhi/server/migrations/README.rst bodhi/server/static/vendor/fedora-bootstrap/README.rst
f6cf8dc
%{_bindir}/bodhi-approve-testing
f6cf8dc
%{_bindir}/bodhi-check-policies
f6cf8dc
%{_bindir}/bodhi-clean-old-composes
f6cf8dc
%{_bindir}/bodhi-expire-overrides
f6cf8dc
%{_bindir}/bodhi-push
f6cf8dc
%{_bindir}/bodhi-sar
f6cf8dc
%{_bindir}/bodhi-shell
f6cf8dc
%{_bindir}/bodhi-untag-branched
f6cf8dc
%{_bindir}/initialize_bodhi_db
f6cf8dc
%config(noreplace) %{_sysconfdir}/bodhi/alembic.ini
f6cf8dc
%config(noreplace) %{_sysconfdir}/httpd/conf.d/bodhi.conf
f6cf8dc
%dir %{_sysconfdir}/bodhi/
f6cf8dc
%{python3_sitelib}/bodhi
f6cf8dc
%{python3_sitelib}/bodhi_server-%{pypi_version}.dist-info
f6cf8dc
%{_mandir}/man1/bodhi-*.1*
f6cf8dc
%{_mandir}/man1/initialize_bodhi_db.1*
f6cf8dc
%{_sysusersdir}/%{name}.sysusers
f6cf8dc
%attr(-,bodhi,root) %{_datadir}/bodhi
f6cf8dc
%attr(-,bodhi,bodhi) %config(noreplace) %{_sysconfdir}/bodhi/*
f6cf8dc
%attr(0775,bodhi,bodhi) %{_localstatedir}/cache/bodhi
f6cf8dc
# These excluded files are in the bodhi-composer package so don't include them here.
f6cf8dc
%exclude %{python3_sitelib}/bodhi/server/tasks/composer.py
f6cf8dc
%exclude %{python3_sitelib}/bodhi/server/tasks/__pycache__/composer.*
f6cf8dc
%exclude %{python3_sitelib}/bodhi/server/metadata.py
f6cf8dc
%exclude %{python3_sitelib}/bodhi/server/__pycache__/metadata.*
f6cf8dc
f6cf8dc
%files -n bodhi-composer
f6cf8dc
%license COPYING
f6cf8dc
%doc README.rst
f6cf8dc
%pycached %{python3_sitelib}/bodhi/server/tasks/composer.py
f6cf8dc
%pycached %{python3_sitelib}/bodhi/server/metadata.py
f6cf8dc
f6cf8dc
%changelog
ed5229c
* Tue Apr 09 2024 Mattia Verga <mattia.verga@proton.me> - 8.1.0-1
ed5229c
- Update to 8.1.0
ed5229c
803c5a2
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.2-3
803c5a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
803c5a2
5717d15
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.2-2
5717d15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
5717d15
0995c88
* Thu Jan 11 2024 Mattia Verga <mattia.verga@proton.me> - 8.0.2-1
0995c88
- Update to 8.0.2
0995c88
cf14efa
* Sun Dec 24 2023 Mattia Verga <mattia.verga@proton.me> - 8.0.1-1
cf14efa
- Update to 8.0.1
cf14efa
204bd16
* Sat Dec 09 2023 Mattia Verga <mattia.verga@proton.me> - 8.0.0-1
204bd16
- Update to 8.0.0
204bd16
487abb0
* Tue Oct 03 2023 Mattia Verga <mattia.verga@proton.me> - 7.2.2-1
487abb0
- Update to 7.2.2
487abb0
af70a1c
* Sun Jul 30 2023 Mattia Verga <mattia.verga@proton.me> - 7.2.1-1
af70a1c
- Update to 7.2.1
af70a1c
0f66209
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.0-3
0f66209
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
0f66209
335ebbf
* Fri Jul 14 2023 Python Maint <python-maint@redhat.com> - 7.2.0-2
335ebbf
- Rebuilt for Python 3.12
335ebbf
a189af6
* Sun Apr 30 2023 Mattia Verga <mattia.verga@proton.me> - 7.2.0-1
a189af6
- Update to 7.2.0
a189af6
3b17aee
* Sat Mar 18 2023 Mattia Verga <mattia.verga@proton.me> - 7.1.1-1
3b17aee
- Update to 7.1.1
3b17aee
56faf26
* Sun Mar 12 2023 Mattia Verga <mattia.verga@proton.me> - 7.1.0-2
56faf26
- Do not use i686 koji builders
56faf26
4f61990
* Sat Mar 11 2023 Mattia Verga <mattia.verga@proton.me> - 7.1.0-1
4f61990
- Update to 7.1.0
4f61990
ff187df
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-2
ff187df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
ff187df
372d9ac
* Sat Jan 14 2023 Mattia Verga <mattia.verga@proton.me> - 7.0.1-1
372d9ac
- Update to 7.0.1
372d9ac
- Use SPDX identifier in license tag
372d9ac
1a9a97a
* Sat Jan 14 2023 Mattia Verga <mattia.verga@proton.me> - 6.0.1-6
1a9a97a
- Exclude broken tests in Koji
1a9a97a
d988e15
* Thu Jan 12 2023 Mattia Verga <mattia.verga@proton.me> - 6.0.1-5
d988e15
- Rebuilt for Pyramid 2.0
bde27da
- Relax some dependencies
d988e15
Debarshi Ray 783c5c1
* Mon Aug 22 2022 Debarshi Ray <rishi@fedoraproject.org> - 6.0.1-4
Debarshi Ray 783c5c1
- Use %%sysusers_requires_compat to match %%sysusers_create_compat
Debarshi Ray 783c5c1
41318de
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-3
41318de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
41318de
014c25e
* Mon Jun 27 2022 Aurelien Bompard <abompard@fedoraproject.org> - 6.0.1-2
014c25e
- Relax the dependency on bodhi-client and bodhi-messages: we only need
014c25e
  compatible versions.
014c25e
cdae97e
* Thu Jun 23 2022 Aurelien Bompard <abompard@fedoraproject.org> - 6.0.1-1
cdae97e
- Update to 6.0.1
cdae97e
4df9707
* Fri Jun 10 2022 Miro Hrončok <mhroncok@redhat.com> - 6.0.0-4
4df9707
- Relax the release of bodhi-messages and bodhi-client requirement
4df9707
- Fixes: rhbz#2095487
4df9707
cead665
* Fri Jun 10 2022 Aurelien Bompard <abompard@fedoraproject.org> - 6.0.0-3
cead665
- rebuilt
cead665
f6cf8dc
* Thu Jun 09 2022 Aurelien Bompard <abompard@fedoraproject.org> - 6.0.0-2
f6cf8dc
- Create the bodhi user and group in the RPM
f6cf8dc
f6cf8dc
* Thu Jun 09 2022 Aurelien Bompard <abompard@fedoraproject.org> - 6.0.0-1
f6cf8dc
- Update to 6.0.0.
f6cf8dc
f6cf8dc
* Wed Feb 23 2022 Ryan Lerch <rlerch@redhat.com> - 5.7.5-0
f6cf8dc
- Prepare the Bodhi client to be compatible with an OIDC-enabled server. PR#4391.
f6cf8dc
f6cf8dc
* Mon Jan 24 2022 Lenka Segura <lsegura@redhat.com> - 5.7.4-2
f6cf8dc
- rebuilt
f6cf8dc
f6cf8dc
* Sat Apr 24 2021 Kevin Fenzi <kevin@scrye.com> - 5.7.0-1
f6cf8dc
- Update to 5.7.0. Fixes rhbz#1949260
f6cf8dc
f6cf8dc
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.1-4
f6cf8dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
f6cf8dc
f6cf8dc
* Tue Dec 29 2020 Mattia Verga <mattia.verga@protonmail.com> - 5.6.1-3
f6cf8dc
- Re-enable docs build
f6cf8dc
- Re-enable tests
f6cf8dc
- Increase required test coverage to 98.
f6cf8dc
f6cf8dc
* Mon Nov 30 2020 Clément Verna <cverna@fedoraproject.org> - 5.6.1-1
f6cf8dc
- Update to 5.6.1
f6cf8dc
  https://github.com/fedora-infra/bodhi/releases/tag/5.6.1
f6cf8dc
- Remove Graphql from the server.
f6cf8dc
f6cf8dc
* Sun Sep 27 2020 Kevin Fenzi <kevin@scrye.com> - 5.5.0-1
f6cf8dc
- Update to 5.5.0. Fixes bug #1815307
f6cf8dc
f6cf8dc
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.2-4
f6cf8dc
- Second attempt - Rebuilt for
f6cf8dc
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f6cf8dc
f6cf8dc
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.2-3
f6cf8dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f6cf8dc
f6cf8dc
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 5.2.2-2
f6cf8dc
- Rebuilt for Python 3.9
f6cf8dc
f6cf8dc
* Wed Mar 25 2020 Clément Verna <cverna@fedoraproject.org> - 5.2.2-1
f6cf8dc
- Update to 5.2.2
f6cf8dc
  https://github.com/fedora-infra/bodhi/releases/tag/5.2.2
f6cf8dc
f6cf8dc
* Mon Mar 23 2020 Clément Verna <cverna@fedoraproject.org> - 5.2.1-1
f6cf8dc
- Update to 5.2.1
f6cf8dc
  https://github.com/fedora-infra/bodhi/releases/tag/5.2.1
f6cf8dc
f6cf8dc
* Thu Mar 19 2020 Clément Verna <cverna@fedoraproject.org> - 5.2.0-1
f6cf8dc
- Update to 5.2.0
f6cf8dc
  https://github.com/fedora-infra/bodhi/releases/tag/5.2.0
f6cf8dc
f6cf8dc
* Thu Jan 30 2020 Nils Philippsen <nils@redhat.com> - 5.1.1-1
f6cf8dc
- Update to 5.1.1.
f6cf8dc
  https://github.com/fedora-infra/bodhi/releases/tag/5.1.1
f6cf8dc
f6cf8dc
* Tue Jan 28 2020 Nils Philippsen <nils@redhat.com> - 5.1.0-3
f6cf8dc
- remove obsolete patch which caused the build to fail
f6cf8dc
- relax test coverage requirements
f6cf8dc
f6cf8dc
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-2
f6cf8dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild