Compare commits

...

No commits in common. 'i9c-beta' and 'c9' have entirely different histories.
i9c-beta ... c9

2
.gitignore vendored

@ -1 +1 @@
SOURCES/virt-who-1.31.28.tar.gz
SOURCES/virt-who-1.31.26.tar.gz

@ -1 +1 @@
8d8152a123729e56694f9be6729e3a0915c54ac0 SOURCES/virt-who-1.31.28.tar.gz
97fc2e5eb684c0dfdc08fd38963046625211a94b SOURCES/virt-who-1.31.26.tar.gz

@ -1,31 +1,84 @@
%define use_systemd (0%{?fedora} && 0%{?fedora} >= 18) || (0%{?rhel} && 0%{?rhel} >= 7)
%define use_python3 0%{?fedora} || (0%{?rhel} && 0%{?rhel} > 7)
%if %{use_python3}
%global python_ver python3
%global python_exec %{__python3}
%global python_sitelib %{python3_sitelib}
%else
%if !%{use_systemd}
%global __python2 %{__python}
%global python2_sitelib %{python_sitelib}
%endif
%global python_ver python
%global python_exec %{__python2}
%global python_sitelib %{python2_sitelib}
%endif
%global release_number 1
%global git_tag %{name}-%{version}-%{release_number}
Name: virt-who
Version: 1.31.28
Release: 1%{?dist}
Version: 1.31.26
Release: %{release_number}%{?dist}
Summary: Agent for reporting virtual guest IDs to subscription-manager
Group: System Environment/Base
# GPL for virt-who proper and LGPL for incorporated suds
License: GPL-2.0-or-later AND LGPL-3.0-or-later
License: GPLv2+ and LGPLv3+
URL: https://github.com/candlepin/virt-who
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pyyaml
BuildRequires: %{python_ver}-devel
BuildRequires: %{python_ver}-setuptools
BuildRequires: %{python_ver}-pyyaml
Requires: %{python_ver}-setuptools
# libvirt python required for libvirt support
Requires: python3-libvirt
%if (0%{?rhel} && 0%{?rhel} > 7 || 0%{?fedora})
Requires: %{python_ver}-libvirt
%else
Requires: libvirt-python
%endif
# python-rhsm 1.20 has the M2Crypto wrappers needed to replace M2Crypto
# with the python standard libraries where plausible
%if %{use_python3}
Requires: python3-subscription-manager-rhsm > 1.25.6
%else
Requires: subscription-manager-rhsm > 1.25.6
%endif
# m2crypto OR python3-cryptography is required for Hyper-V support
%if %{use_python3}
Requires: python3-cryptography
Requires: python3-requests
Requires: python3-pyyaml
%else
Requires: m2crypto
%endif
Requires: %{python_ver}-requests
Requires: %{python_ver}-six
# python-argparse is required for Python 2.6 on EL6
%{?el6:Requires: python-argparse}
Requires: openssl
Requires: %{python_ver}-pyyaml
%if %{use_systemd}
%if %{use_python3}
Requires: python3-systemd
%else
Requires: systemd-python
%endif
BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%else
Requires(post): chkconfig
Requires(preun): chkconfig
# This is for /sbin/service
Requires(preun): initscripts
%endif
Provides: bundled(python-suds) = 0.8.4
%description
@ -36,13 +89,18 @@ report them to the subscription manager.
%setup -q
%build
%{__python3} setup.py build --rpm-version=%{version}-%{release}
%{python_exec} setup.py build --rpm-version=%{version}-%{release_number}
%install
%{__python3} setup.py install --root %{buildroot}
%{__python3} setup.py install_config --root %{buildroot}
%{__python3} setup.py install_man_pages --root %{buildroot}
%{__python3} setup.py install_systemd --root %{buildroot}
rm -rf $RPM_BUILD_ROOT
%{python_exec} setup.py install --root %{buildroot}
%{python_exec} setup.py install_config --root %{buildroot}
%{python_exec} setup.py install_man_pages --root %{buildroot}
%if %{use_systemd}
%{python_exec} setup.py install_systemd --root %{buildroot}
%else
%{python_exec} setup.py install_upstart --root %{buildroot}
%endif
mkdir -p %{buildroot}/%{_sharedstatedir}/%{name}/
touch %{buildroot}/%{_sharedstatedir}/%{name}/key
@ -54,25 +112,47 @@ install -m 644 virt-who-zsh %{buildroot}/%{_datadir}/zsh/site-functions/_virt-wh
# registered to subscription-manager server
%post
%if %{use_systemd}
%systemd_post virt-who.service
%else
# This adds the proper /etc/rc*.d links for the script
/sbin/chkconfig --add virt-who
%endif
# This moves parameters from old config to remaining general config file
%if (0%{?fedora} || 0%{?rhel} > 8)
%{__python3} %{python3_sitelib}/virtwho/migrate/migrateconfiguration.py
%if (0%{?fedora} > 33 || 0%{?rhel} > 8)
%{python_exec} %{python_sitelib}/virtwho/migrate/migrateconfiguration.py
%endif
%preun
%if %{use_systemd}
%systemd_preun virt-who.service
%else
if [ $1 -eq 0 ] ; then
/sbin/service virt-who stop >/dev/null 2>&1
/sbin/chkconfig --del virt-who
fi
%endif
%postun
%if %{use_systemd}
%systemd_postun_with_restart virt-who.service
%else
if [ "$1" -ge "1" ] ; then
/sbin/service virt-who condrestart >/dev/null 2>&1 || :
fi
%endif
%files
%doc README.md LICENSE README.hyperv
%{_bindir}/virt-who
%{_bindir}/virt-who-password
%{python3_sitelib}/*
%{python_sitelib}/*
%if %{use_systemd}
%{_unitdir}/virt-who.service
%else
%{_sysconfdir}/rc.d/init.d/virt-who
%endif
%attr(700, root, root) %dir %{_sysconfdir}/virt-who.d
%{_mandir}/man8/virt-who.8.gz
%{_mandir}/man8/virt-who-password.8.gz
@ -85,47 +165,6 @@ install -m 644 virt-who-zsh %{buildroot}/%{_datadir}/zsh/site-functions/_virt-wh
%changelog
* Thu Jul 18 2024 Jiri Hnidek <jhnidek@redhat.com> 1.31.28-1
- New tag for virt-who-1.31 branch
* Tue May 14 2024 Jiri Hnidek <jhnidek@redhat.com> 1.31.27-1
- ci: bump actions/checkout from 3 to 4
(49699333+dependabot[bot]@users.noreply.github.com)
- Change /var/run -> /run (orion@nwra.com)
- ci: add dependabot config for GitHub Actions (ptoscano@redhat.com)
- Drop unused copy of python-daemon sources (ptoscano@redhat.com)
- Migrate to SPDX license (jhnidek@redhat.com)
- fix: disable complex tests for ESX (jhnidek@redhat.com)
- fix: use ssl.SSLContext.wrap_socket for wrapping socket (jhnidek@redhat.com)
- fix: stylish issue discovered by flake8 (jhnidek@redhat.com)
- fix: Use ConfigParser and not SafeConfigParser (jhnidek@redhat.com)
- spec: drop unused openssl dependency (ptoscano@redhat.com)
- spec: hardcode/inline Python 3 variables (ptoscano@redhat.com)
- spec: drop unused Group tag (ptoscano@redhat.com)
- spec: do not Require setuptools (ptoscano@redhat.com)
- spec: drop $RPM_BUILD_ROOT manual cleanup (ptoscano@redhat.com)
- Updated README.md file to reflect current state (jhnidek@redhat.com)
- Drop outdated/unused requirements (ptoscano@redhat.com)
- Removed support for Jenkins (jhnidek@redhat.com)
- Added support for GitHub actions (jhnidek@redhat.com)
- Removed some unused parts of Makefile (jhnidek@redhat.com)
- Removed support for docker (jhnidek@redhat.com)
- spec: assume the python3-libvirt package name everywhere
(ptoscano@redhat.com)
- spec: drop redundant "release_number" variable (ptoscano@redhat.com)
- spec: drop outdated variables and comments (ptoscano@redhat.com)
- spec: drop six dependency (ptoscano@redhat.com)
- Drop non-systemd support (ptoscano@redhat.com)
- Feature: improve log message, when wrong value is provided
(jhnidek@redhat.com)
- Fix: default value for prism_central cannot be None (jhnidek@redhat.com)
- spec: drop support for Python < 3 (ptoscano@redhat.com)
- spec: drop support for Fedora < 36 (ptoscano@redhat.com)
- spec: drop support for RHEL < 8 (ptoscano@redhat.com)
* Fri Apr 14 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 1.31.26-1
- Rebuilt for MSVSphere 9.2 beta
* Wed Feb 01 2023 Jiri Hnidek <jhnidek@redhat.com> 1.31.26-1
- Fix stylish issue in migrateconfiguration.py (jhnidek@redhat.com)
- Added next rhel-9.x subversion to releasers.conf file. (jhnidek@redhat.com)

Loading…
Cancel
Save