|
David Moreau-Simard |
11cbfda |
%global package_name ara
|
|
David Moreau-Simard |
11cbfda |
|
|
|
6443f78 |
%global common_desc \
|
|
|
6443f78 |
ARA Records Ansible playbook runs and makes the recorded data available and \
|
|
|
6443f78 |
intuitive for users and systems.
|
|
|
6443f78 |
|
|
David Moreau-Simard |
11cbfda |
Name: %{package_name}
|
|
|
6443f78 |
Version: 0.16.1
|
|
|
40c5b5f |
Release: 4%{?dist}
|
|
|
6443f78 |
Summary: ARA Records Ansible playbook runs
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
License: GPLv3
|
|
David Moreau-Simard |
11cbfda |
URL: https://git.openstack.org/cgit/openstack/ara
|
|
David Moreau-Simard |
11cbfda |
Source0: https://pypi.io/packages/source/a/%{package_name}/%{package_name}-%{version}.tar.gz
|
|
David Moreau-Simard |
11cbfda |
Source1: ara-server.service
|
|
David Moreau-Simard |
11cbfda |
Source2: ara.cfg
|
|
|
797ab35 |
Source3: logging-config.yaml
|
|
|
797ab35 |
Source4: ara.logrotate
|
|
David Moreau-Simard |
11cbfda |
BuildArch: noarch
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%{?systemd_requires}
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: systemd
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: git
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-%{package_name} = %{version}-%{release}
|
|
David Moreau-Simard |
11cbfda |
Requires: %{package_name}-common = %{version}-%{release}
|
|
David Moreau-Simard |
11cbfda |
|
|
|
797ab35 |
%description
|
|
|
6443f78 |
%{common_desc}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%package -n python3-%{package_name}
|
|
David Moreau-Simard |
11cbfda |
Summary: %{summary}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-devel
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-pbr
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-setuptools
|
|
David Moreau-Simard |
8f7c1dd |
# Test dependencies for check macro
|
|
|
797ab35 |
BuildRequires: ansible >= 2.4.0.0
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-cliff
|
|
|
6443f78 |
BuildRequires: python3-flask >= 0.12.4
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-flask-migrate
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-flask-script
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-frozen-flask
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-jinja2 >= 2.9
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-junit_xml
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-lxml
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-mock
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-oslo-serialization
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-oslo-utils
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-pyfakefs
|
|
|
358b3ba |
BuildRequires: python3-pygments >= 1.6
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-pytest
|
|
|
6443f78 |
BuildRequires: python3-six
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-sqlalchemy
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-subunit
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-XStatic
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-XStatic-Bootstrap-SCSS
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-XStatic-DataTables
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-XStatic-jQuery
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-XStatic-Patternfly
|
|
David Moreau-Simard |
11cbfda |
BuildRequires: python3-XStatic-Patternfly-Bootstrap-Treeview
|
|
David Moreau-Simard |
11cbfda |
|
|
|
797ab35 |
Requires: ansible >= 2.4.0.0
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-cliff
|
|
|
6443f78 |
Requires: python3-flask >= 0.12.4
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-flask-migrate
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-flask-script
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-frozen-flask
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-jinja2 >= 2.9
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-junit_xml
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-oslo-serialization
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-oslo-utils
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-pyfakefs
|
|
|
358b3ba |
Requires: python3-pygments >= 1.6
|
|
|
6443f78 |
Requires: python3-six
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-sqlalchemy
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-subunit
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-XStatic
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-XStatic-Bootstrap-SCSS
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-XStatic-DataTables
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-XStatic-jQuery
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-XStatic-Patternfly
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-XStatic-Patternfly-Bootstrap-Treeview
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%{?python_provide:%python_provide python3-%{package_name}}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%description -n python3-%{package_name}
|
|
|
6443f78 |
%{common_desc}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%package -n python3-%{package_name}-tests
|
|
David Moreau-Simard |
11cbfda |
Summary: Tests for %{package_name}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-%{package_name} = %{version}-%{release}
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-lxml
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-mock
|
|
David Moreau-Simard |
11cbfda |
Requires: python3-pytest
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%description -n python3-%{package_name}-tests
|
|
|
6443f78 |
%{common_desc}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
This package contains the test files.
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%package common
|
|
David Moreau-Simard |
11cbfda |
Summary: Common files for %{package_name}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
Requires(pre): shadow-utils
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%description common
|
|
|
6443f78 |
%{common_desc}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
This package contains the common files.
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%package doc
|
|
David Moreau-Simard |
11cbfda |
Summary: Documentation for %{package_name}
|
|
David Moreau-Simard |
11cbfda |
|
|
|
797ab35 |
BuildRequires: python3-sphinx
|
|
|
797ab35 |
BuildRequires: python3-sphinx_rtd_theme
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%description doc
|
|
|
6443f78 |
%{common_desc}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
This package contains the documentation.
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%prep
|
|
David Moreau-Simard |
11cbfda |
%autosetup -n %{package_name}-%{version} -S git
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
# Let RPM handle the requirements
|
|
David Moreau-Simard |
11cbfda |
rm -f {,test-}requirements.txt
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%build
|
|
David Moreau-Simard |
11cbfda |
%py3_build
|
|
David Moreau-Simard |
11cbfda |
# Disable warning detection as failures: https://review.openstack.org/#/c/491202/
|
|
David Moreau-Simard |
11cbfda |
# sphinx-build -W -b html doc/source doc/build/html
|
|
David Moreau-Simard |
11cbfda |
sphinx-build -b html doc/source doc/build/html
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%install
|
|
David Moreau-Simard |
11cbfda |
%py3_install
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
# Setup directories
|
|
David Moreau-Simard |
11cbfda |
install -d -m 755 %{buildroot}%{_sysconfdir}/%{package_name}
|
|
David Moreau-Simard |
11cbfda |
install -d -m 755 %{buildroot}%{_sharedstatedir}/%{package_name}
|
|
David Moreau-Simard |
11cbfda |
install -d -m 755 %{buildroot}%{_localstatedir}/log/%{package_name}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
# Setup systemd unit file
|
|
David Moreau-Simard |
11cbfda |
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{package_name}-server.service
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
# Setup default config
|
|
David Moreau-Simard |
11cbfda |
install -p -D -m 640 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{package_name}/%{package_name}.cfg
|
|
|
797ab35 |
install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{package_name}/logging-config.yaml
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
# Setup logrotate
|
|
|
797ab35 |
install -p -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/%{package_name}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%check
|
|
|
6443f78 |
# Run unit tests
|
|
David Moreau-Simard |
11cbfda |
%{__python3} -m pytest -v
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%pre common
|
|
David Moreau-Simard |
11cbfda |
getent group %{package_name} >/dev/null || groupadd -r %{package_name}
|
|
David Moreau-Simard |
11cbfda |
getent passwd %{package_name} >/dev/null || \
|
|
David Moreau-Simard |
11cbfda |
useradd -r -g %{package_name} -d %{_sharedstatedir}/%{package_name} \
|
|
David Moreau-Simard |
11cbfda |
-s /sbin/nologin -c "User for ARA" %{package_name}
|
|
David Moreau-Simard |
11cbfda |
exit 0
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%post
|
|
David Moreau-Simard |
11cbfda |
%systemd_post %{package_name}-server.service
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%preun
|
|
David Moreau-Simard |
11cbfda |
%systemd_preun %{package_name}-server.service
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%postun
|
|
David Moreau-Simard |
11cbfda |
%systemd_postun_with_restart %{package_name}-server.service
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%files
|
|
David Moreau-Simard |
11cbfda |
%doc README.rst
|
|
David Moreau-Simard |
11cbfda |
%license LICENSE
|
|
David Moreau-Simard |
11cbfda |
%{_bindir}/ara*
|
|
David Moreau-Simard |
11cbfda |
%{_unitdir}/%{package_name}-server.service
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%files -n python3-%{package_name}
|
|
David Moreau-Simard |
11cbfda |
%doc README.rst
|
|
David Moreau-Simard |
11cbfda |
%license LICENSE
|
|
David Moreau-Simard |
11cbfda |
%{python3_sitelib}/%{package_name}
|
|
David Moreau-Simard |
11cbfda |
%{python3_sitelib}/%{package_name}-*.egg-info
|
|
David Moreau-Simard |
11cbfda |
%exclude %{python3_sitelib}/%{package_name}/tests
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%files -n python3-%{package_name}-tests
|
|
David Moreau-Simard |
11cbfda |
%doc README.rst
|
|
David Moreau-Simard |
11cbfda |
%license LICENSE
|
|
David Moreau-Simard |
11cbfda |
%{python3_sitelib}/%{package_name}/tests
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%files common
|
|
David Moreau-Simard |
11cbfda |
%doc README.rst
|
|
David Moreau-Simard |
11cbfda |
%license LICENSE
|
|
David Moreau-Simard |
11cbfda |
%dir %{_sysconfdir}/%{package_name}
|
|
David Moreau-Simard |
11cbfda |
%config(noreplace) %attr(0640, root, %{package_name}) %{_sysconfdir}/%{package_name}/%{package_name}.cfg
|
|
|
797ab35 |
%config(noreplace) %attr(0644, root, %{package_name}) %{_sysconfdir}/%{package_name}/logging-config.yaml
|
|
David Moreau-Simard |
11cbfda |
%config(noreplace) %{_sysconfdir}/logrotate.d/%{package_name}
|
|
David Moreau-Simard |
11cbfda |
%dir %attr(0750, %{package_name}, %{package_name}) %{_localstatedir}/log/%{package_name}
|
|
David Moreau-Simard |
11cbfda |
%dir %attr(0750, %{package_name}, %{package_name}) %{_sharedstatedir}/%{package_name}
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%files doc
|
|
David Moreau-Simard |
11cbfda |
%doc README.rst doc/build/html
|
|
David Moreau-Simard |
11cbfda |
%license LICENSE
|
|
David Moreau-Simard |
11cbfda |
|
|
David Moreau-Simard |
11cbfda |
%changelog
|
|
|
40c5b5f |
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-4
|
|
|
40c5b5f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
40c5b5f |
|
|
|
52278fe |
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-3
|
|
|
52278fe |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
52278fe |
|
|
|
6443f78 |
* Mon Sep 10 2018 David Moreau Simard <dmsimard@redhat.com> - 0.16.1
|
|
|
6443f78 |
- Update to latest upstream release
|
|
|
797ab35 |
- Default to python3
|
|
|
6443f78 |
|
|
|
10ecc13 |
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.6-3
|
|
|
10ecc13 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
10ecc13 |
|
|
|
48fb14e |
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 0.14.6-2
|
|
|
48fb14e |
- Rebuilt for Python 3.7
|
|
|
48fb14e |
|
|
|
ebb8666 |
* Sat Feb 24 2018 David Moreau Simard <dmsimard@redhat.com> - 0.14.6-1
|
|
|
ebb8666 |
- Update to upstream 0.14.6
|
|
|
ebb8666 |
|
|
|
6988080 |
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-2
|
|
|
6988080 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
6988080 |
|
|
David Moreau-Simard |
11cbfda |
* Sat Aug 5 2017 David Moreau Simard <dmsimard@redhat.com> - 0.14.0-1
|
|
David Moreau-Simard |
11cbfda |
- First packaged version of ARA
|