cccd63e
%global srcname virtualbmc
cccd63e
cccd63e
Name: python-%{srcname}
32f9a6e
Version: 3.0.0
2e809da
Release: 2%{?dist}
cccd63e
Summary: A virtual BMC for controlling virtual machines using IPMI commands
cccd63e
License: ASL 2.0
90063e4
URL: https://opendev.org/openstack/virtualbmc
90063e4
Source0: https://tarballs.opendev.org/openstack/%{srcname}/%{srcname}-%{version}.tar.gz
cccd63e
Source1: 60-vbmcd.rules
cccd63e
Source2: vbmcd.service
f3489b5
Source3: vbmcd.sysusers
cccd63e
BuildArch: noarch
cccd63e
BuildRequires: python3-devel
cccd63e
BuildRequires: python3-pbr
cccd63e
BuildRequires: python3-setuptools
cccd63e
BuildRequires: systemd-rpm-macros
90063e4
BuildRequires: git
cccd63e
# Documentation
cccd63e
BuildRequires: python3-sphinx
90063e4
BuildRequires: python3-openstackdocstheme
cccd63e
# Tests
cccd63e
BuildRequires: python3-stestr
cccd63e
BuildRequires: python3-libvirt
cccd63e
BuildRequires: python3-mock
cccd63e
BuildRequires: python3-pyghmi
cccd63e
BuildRequires: python3-zmq
cccd63e
BuildRequires: python3-oslotest
7bde89c
BuildRequires: python3-autopage
cccd63e
cccd63e
%description
cccd63e
A virtual BMC for controlling virtual machines using IPMI commands.
cccd63e
cccd63e
%package -n python3-%{srcname}
cccd63e
Summary: A virtual BMC for controlling virtual machines using IPMI commands
cccd63e
Suggests: python3-%{srcname}-doc
cccd63e
Requires(pre): shadow-utils
cccd63e
%{?python_provide:%python_provide python3-%{srcname}}
cccd63e
cccd63e
%description -n python3-%{srcname}
cccd63e
A virtual BMC for controlling virtual machines using IPMI commands.
cccd63e
cccd63e
%package -n python3-%{srcname}-tests
cccd63e
Summary: VirtualBMC tests
cccd63e
Requires: python3-%{srcname} = %{version}-%{release}
cccd63e
cccd63e
%description -n python3-%{srcname}-tests
cccd63e
Tests for VirtualBMC.
cccd63e
cccd63e
%package -n python3-%{srcname}-doc
cccd63e
Summary: VirtualBMC documentation
cccd63e
cccd63e
%description -n python3-%{srcname}-doc
cccd63e
Documentation for VirtualBMC.
cccd63e
cccd63e
%prep
90063e4
%autosetup -n %{srcname}-%{version} -S git
cccd63e
cccd63e
%build
cccd63e
%py3_build
cccd63e
# generate html docs
90063e4
sphinx-build-3 -W -b html doc/source doc/build/html
90063e4
# remove the sphinx-build-3 leftovers
cccd63e
rm -rf doc/build/html/.{doctrees,buildinfo}
cccd63e
cccd63e
%install
cccd63e
%py3_install
50231d7
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/polkit-1/rules.d/60-vbmcd.rules
f3489b5
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/vbmcd.service
f3489b5
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/vbmcd.conf
cccd63e
install -d -m 750 %{buildroot}%{_sharedstatedir}/vbmcd
cccd63e
cccd63e
%check
cccd63e
PYTHON=%{__python3} stestr run
cccd63e
cccd63e
%pre -n python3-%{srcname}
f3489b5
%sysusers_create_compat %{SOURCE3}
cccd63e
cccd63e
%post -n python3-%{srcname}
cccd63e
%systemd_post vbmcd.service
cccd63e
cccd63e
%preun -n python3-%{srcname}
cccd63e
%systemd_preun vbmcd.service
cccd63e
cccd63e
%postun -n python3-%{srcname}
cccd63e
%systemd_postun_with_restart vbmcd.service
cccd63e
cccd63e
%files -n python3-%{srcname}
cccd63e
%license LICENSE
cccd63e
%{_bindir}/vbmcd
cccd63e
%{_bindir}/vbmc
cccd63e
%{python3_sitelib}/%{srcname}
cccd63e
%{python3_sitelib}/%{srcname}-*.egg-info
cccd63e
%exclude %{python3_sitelib}/%{srcname}/tests
50231d7
%{_datadir}/polkit-1/rules.d/60-vbmcd.rules
cccd63e
%{_unitdir}/vbmcd.service
f3489b5
%{_sysusersdir}/vbmcd.conf
cccd63e
%dir %attr(750, vbmcd, vbmcd) %{_sharedstatedir}/vbmcd
cccd63e
cccd63e
%files -n python3-%{srcname}-tests
cccd63e
%license LICENSE
cccd63e
%{python3_sitelib}/%{srcname}/tests
cccd63e
cccd63e
%files -n python3-%{srcname}-doc
cccd63e
%license LICENSE
90063e4
%doc AUTHORS README.rst HACKING.rst CONTRIBUTING.rst ChangeLog
cccd63e
%doc doc/build/html
cccd63e
cccd63e
%changelog
2e809da
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-2
2e809da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
2e809da
32f9a6e
* Wed Oct 26 2022 Juan Orti Alcaine <jortialc@redhat.com> - 3.0.0-1
32f9a6e
- Version 3.0.0 (#2137838)
32f9a6e
1e45fda
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-3
1e45fda
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
1e45fda
f9c276e
* Wed Jul 06 2022 Python Maint <python-maint@redhat.com> - 2.2.2-2
f9c276e
- Rebuilt for Python 3.11
f9c276e
cb6b3f2
* Sat Jun 18 2022 Juan Orti Alcaine <jortialc@redhat.com> - 2.2.2-1
cb6b3f2
- Version 2.2.2 (#2098114)
cb6b3f2
50231d7
* Wed Mar 09 2022 Juan Orti Alcaine <jortialc@redhat.com> - 2.2.1-5
50231d7
- Move polkit rule to /usr/share/polkit-1/rules.d
50231d7
7bde89c
* Thu Jan 27 2022 Juan Orti Alcaine <jortialc@redhat.com> - 2.2.1-4
7bde89c
- BR: python3-autopage
7bde89c
920b4af
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-3
920b4af
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
920b4af
f3489b5
* Tue Oct 26 2021 Juan Orti Alcaine <jortialc@redhat.com> - 2.2.1-2
f3489b5
- Create vbmcd user with systemd sysusers
f3489b5
1f54537
* Fri Oct 22 2021 Juan Orti Alcaine <jortialc@redhat.com> - 2.2.1-1
1f54537
- Version 2.2.1 (#1968102)
1f54537
f8e724d
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-3
f8e724d
- Second attempt - Rebuilt for
f8e724d
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
f8e724d
fefc61a
* Mon Jun 07 2021 Python Maint <python-maint@redhat.com> - 2.2.0-2
fefc61a
- Rebuilt for Python 3.10
fefc61a
3922d57
* Sat Jun 05 2021 Juan Orti Alcaine <jortialc@redhat.com> - 2.2.0-1
3922d57
- Version 2.2.0
3922d57
a81988e
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.1.0-5
a81988e
- Rebuilt for Python 3.10
a81988e
9858300
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.1.0-4
9858300
- Rebuilt for updated systemd-rpm-macros
9858300
  See https://pagure.io/fesco/issue/2583.
9858300
40fbb13
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-3
40fbb13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
40fbb13
27d645a
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
27d645a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
27d645a
90063e4
* Fri Jul 17 2020 Juan Orti Alcaine <jortialc@redhat.com> - 2.1.0-1
90063e4
- Version 2.1.0
90063e4
5637ecc
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.6.0-3
5637ecc
- Rebuilt for Python 3.9
5637ecc
746025c
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-2
746025c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
746025c
859174d
* Sun Jan 05 2020 Juan Orti Alcaine <jortialc@redhat.com> - 1.6.0-1
859174d
- Version 1.6.0
859174d
afc7647
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.0-8
afc7647
- Rebuilt for Python 3.8.0rc1 (#1748018)
afc7647
86eae3b
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.0-7
86eae3b
- Rebuilt for Python 3.8
86eae3b
b873818
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-6
b873818
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b873818
4495fff
* Mon Jul 15 2019 Juan Orti Alcaine <jortialc@redhat.com> - 1.5.0-5
4495fff
- Fix polkit logging
4495fff
cccd63e
* Sun Jul 14 2019 Juan Orti Alcaine <jortialc@redhat.com> - 1.5.0-4
cccd63e
- Fix tests for Fedora 30
cccd63e
cccd63e
* Sun Jul 14 2019 Juan Orti Alcaine <jortialc@redhat.com> - 1.5.0-3
cccd63e
- Include html docs
cccd63e
- Run tests
cccd63e
cccd63e
* Thu Jul 11 2019 Juan Orti Alcaine <jortialc@redhat.com> - 1.5.0-2
cccd63e
- Include polkit and service unit
cccd63e
cccd63e
* Wed Jul 10 2019 Juan Orti Alcaine <jortialc@redhat.com> - 1.5.0-1
cccd63e
- Build only for Python3
cccd63e
- Version 1.5.0
cccd63e
cccd63e
* Tue Feb 13 2018 Maxim Burgerhout <maxim@redhat.com> - 1.2.0-2
cccd63e
- First build for Fedora 27 copr
cccd63e
cccd63e
* Tue Aug 22 2017 Alfredo Moralejo <amoralej@redhat.com> - 1.2.0-1
cccd63e
- Update to 1.2.0
cccd63e
cccd63e
* Tue Nov 15 2016 Lucas Alvares Gomes <lucasagomes@gmail.com> - 0.1.0-1
cccd63e
- Initial package.