powa-collector: Update to 1.3.1 per changes described at https://github.com/powa...
authorDevrim Gunduz <devrim@gunduz.org>
Sun, 23 Mar 2025 17:22:16 +0000 (20:22 +0300)
committerDevrim Gunduz <devrim@gunduz.org>
Sun, 23 Mar 2025 17:22:16 +0000 (20:22 +0300)
rpm/redhat/main/common/powa-collector/main/powa-collector.spec

index 29086a4c0bd5ae364bff5494cff29187b69e0ccb..5db3640e22bbb4d392bdd22ea6683262e1f9c587 100644 (file)
@@ -3,17 +3,9 @@
 
 %global __ospython %{_bindir}/python3
 
-%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
-%{expand: %%global pyver %(echo `%{__ospython} -c "import sys; sys.stdout.write(sys.version[:4])"`)}
-%else
-%{expand: %%global pyver %(echo `%{__ospython} -c "import sys; sys.stdout.write(sys.version[:3])"`)}
-%endif
-%global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
-
-
 Name:          powa-collector
-Version:       1.3.0
-Release:       2PGDG%{?dist}
+Version:       1.3.1
+Release:       1PGDG%{?dist}
 Summary:       POWA data collector daemon
 License:       PostgreSQL
 URL:           https://github.com/powa-team/%{name}
@@ -29,7 +21,7 @@ BuildArch:    noarch
 # We require this to be present for %%{_prefix}/lib/tmpfiles.d
 Requires:              systemd
 %if 0%{?suse_version}
-%if 0%{?suse_version} >= 1315
+%if 0%{?suse_version} >= 1500
 Requires(post):                systemd-sysvinit
 %endif
 %else
@@ -47,12 +39,14 @@ database (in the powa_servers table).
 %prep
 %setup -q -n %{name}-%{version}
 
+%generate_buildrequires
+%pyproject_buildrequires -t
+
 %build
-%{__ospython} setup.py build
+%pyproject_wheel
 
 %install
-%{__rm} -rf %{buildroot}
-%{__ospython} setup.py install -O1 --skip-build --root %{buildroot}
+%pyproject_install
 
 # Install sample config file:
 %{__install} -d %{buildroot}%{_sysconfdir}
@@ -69,7 +63,7 @@ database (in the powa_servers table).
 %post
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 %if 0%{?suse_version}
-%if 0%{?suse_version} >= 1315
+%if 0%{?suse_version} >= 1500
 %service_add_pre %{name}.service
 %endif
 %else
@@ -84,12 +78,15 @@ database (in the powa_servers table).
 %{_sysconfdir}/%{name}.conf-dist
 %{_unitdir}/%{name}.service
 %{_tmpfilesdir}/%{sname}.conf
-%dir %{python3_sitelib}/%{pname}-%{version}-py%{pyver}.egg-info
-%{python3_sitelib}/%{pname}-%{version}-py%{pyver}.egg-info/*
 %{python3_sitelib}/%{pname}/*.py
 %{python3_sitelib}/%{pname}/__pycache__/*.py*
+%{python3_sitelib}/%{pname}-%{version}.dist-info/*
 
 %changelog
+* Sun Mar 23 2025 Devrim Gündüz <devrim@gunduz.org> - 1.3.1-1PGDG
+- Update to 1.3.1 per changes described at:
+  https://github.com/powa-team/powa-collector/releases/tag/1.3.1
+
 * Tue Dec 17 2024 Devrim Gündüz <devrim@gunduz.org> - 1.3.0-2PGDG
 - Add RHEL 10 support