public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-bucky] rawhide: Modernize specfile (fedora#2377500).
@ 2026-08-16 18:21 Jonathan Steffan
  0 siblings, 0 replies; only message in thread
From: Jonathan Steffan @ 2026-08-16 18:21 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-bucky
Branch : rawhide
Commit : 388c73c61bb98cacd96c7bd5d8c3055a67312e3a
Author : Jonathan Steffan <jsteffan@fedoraproject.org>
Date   : 2026-08-16T12:20:58-06:00
Stats  : +33/-27 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/python-bucky/c/388c73c61bb98cacd96c7bd5d8c3055a67312e3a?branch=rawhide

Log:
Modernize specfile (fedora#2377500).

---
diff --git a/python-bucky.spec b/python-bucky.spec
index d675a31..cd57565 100644
--- a/python-bucky.spec
+++ b/python-bucky.spec
@@ -15,11 +15,13 @@ URL:            %{forgeurl}
 Source0:        %{forgesource}
 Source1:        python-bucky-example.conf
 Source2:        python-bucky-supervisord-example.conf
+Source3:        python-bucky.sysusers.conf
+Source4:        python-bucky.tmpfiles.conf
 
 BuildArch:      noarch
 
 BuildRequires:  python3-devel
-BuildRequires:  python3-setuptools
+BuildRequires:  systemd-rpm-macros
 
 %global _description\
 Bucky is a small server for collecting and translating metrics for\
@@ -31,55 +33,57 @@ and from StatsD clients.
 %package -n python3-bucky
 Summary: %summary
 Requires:       collectd
-Requires:       python3-six
-Requires:       python3-setuptools
-Requires:       python3-watchdog
-Requires:       python3-setproctitle
-Requires:       python3-cryptography
 Requires:       python3-pkg-resources
-%{?python_provide:%python_provide python3-bucky}
+%py_provides python3-bucky
 
 %description -n python3-bucky %_description
 
 %prep
 %forgeautosetup
-%{__install} -m 644 %{SOURCE2} .
+install -p -m 0644 %{SOURCE2} .
 
-# Create a sysusers.d config file
-cat >python-bucky.sysusers.conf <<EOF
-u bucky - 'Bucky daemon' - -
-EOF
+
+%generate_buildrequires
+%pyproject_buildrequires
 
 
 %build
-%py3_build
+%pyproject_wheel
 
 
 %install
-# Delete the Python 2 executable so that the Python 3
-# version can take it's place.
-rm -rf %{_bindir}/bucky
-%py3_install
-%{__mkdir_p} %{buildroot}%{_localstatedir}/log/bucky
-%{__mkdir_p} %{buildroot}%{_localstatedir}/run/bucky
-%{__mkdir_p} %{buildroot}%{_sysconfdir}/bucky
-%{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/bucky/bucky.conf
+%pyproject_install
+%pyproject_save_files -l bucky
+
+mkdir -p %{buildroot}%{_localstatedir}/log/bucky
+mkdir -p %{buildroot}%{_sysconfdir}/bucky
+install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/bucky/bucky.conf
+
+install -p -m 0644 -D %{SOURCE3} %{buildroot}%{_sysusersdir}/python-bucky.conf
+install -p -m 0644 -D %{SOURCE4} %{buildroot}%{_tmpfilesdir}/python-bucky.conf
+
+
+%check
+# bucky.sentry requires raven, which is not packaged in Fedora
+%pyproject_check_import -e bucky.sentry
+
 
-install -m0644 -D python-bucky.sysusers.conf %{buildroot}%{_sysusersdir}/python-bucky.conf
+%pre -n python3-bucky
+%sysusers_create_package python-bucky %{SOURCE3}
 
 
+%post -n python3-bucky
+%tmpfiles_create_package python-bucky %{SOURCE4}
 
 
-%files -n python3-bucky
-%license LICENSE
+%files -n python3-bucky -f %{pyproject_files}
 %doc THANKS README.rst python-bucky-supervisord-example.conf
 %{_bindir}/bucky
 %attr(-,bucky,bucky) %{_localstatedir}/log/bucky
-%attr(-,bucky,bucky) %{_localstatedir}/run/bucky
+%ghost %attr(0755,bucky,bucky) %dir %{_rundir}/bucky
 %config(noreplace) %{_sysconfdir}/bucky/bucky.conf
-%{python3_sitelib}/bucky/
-%{python3_sitelib}/bucky-%{version}-py%{python3_version}.egg-info
 %{_sysusersdir}/python-bucky.conf
+%{_tmpfilesdir}/python-bucky.conf
 
 
 %changelog

diff --git a/python-bucky.sysusers.conf b/python-bucky.sysusers.conf
new file mode 100644
index 0000000..2b6b56b
--- /dev/null
+++ b/python-bucky.sysusers.conf
@@ -0,0 +1 @@
+u bucky - 'Bucky daemon' - -

diff --git a/python-bucky.tmpfiles.conf b/python-bucky.tmpfiles.conf
new file mode 100644
index 0000000..7668d24
--- /dev/null
+++ b/python-bucky.tmpfiles.conf
@@ -0,0 +1 @@
+d /run/bucky 0755 bucky bucky -

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-16 18:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-16 18:21 [rpms/python-bucky] rawhide: Modernize specfile (fedora#2377500) Jonathan Steffan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox