public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Hlavinka <mhlavink@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/nut] f45: regenerate nut-2.8.4-piddir-owner.patch
Date: Mon, 23 Nov 2026 22:50:59 GMT [thread overview]
Message-ID: <179547425930.1.647358097231250237.rpms-nut-d54490232805@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/nut
Branch : f45
Commit : d5449023280509cf7b94a092ac37c9213d3c6b0a
Author : Michal Hlavinka <mhlavink@redhat.com>
Date : 2026-11-23T23:29:48+01:00
Stats : +59/-55 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/nut/c/d5449023280509cf7b94a092ac37c9213d3c6b0a?branch=f45
Log:
regenerate nut-2.8.4-piddir-owner.patch
create /run/nut and /run/nut/upsmon.pid with owner root
---
diff --git a/nut-2.8.0-piddir-owner.patch b/nut-2.8.0-piddir-owner.patch
deleted file mode 100644
index 53e639d..0000000
--- a/nut-2.8.0-piddir-owner.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -up nut-2.8.1/configure.ac.piddir-owner nut-2.8.1/configure.ac
---- nut-2.8.1/configure.ac.piddir-owner 2023-11-01 09:39:24.267596406 +0100
-+++ nut-2.8.1/configure.ac 2023-11-01 10:00:35.425987029 +0100
-@@ -4451,7 +4451,7 @@ AS_IF([test -n "$systemdtmpfilesdir"],
-
- # See also: https://github.com/networkupstools/nut/wiki/Technicalities:-Work-with-PID-and-state-file-paths#pidpath-altpidpath-statepath
- # State file (e.g. upsd to driver pipes) and PID file location for NUT:
--d @STATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-+d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - -
- # Default PIPEFN and LOCKFN locations per upssched.conf:
- d @STATEPATH@/upssched 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
- X @STATEPATH@
-@@ -4461,7 +4461,7 @@ EOF
- [*/run|*/tmp|*/shm], [], dnl Do not intrude into system paths; TODO: add more if appropriate for some Linux distro
- [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
- # Primarily used by upsmon and upslog, possibly running as root:
--d @PIDPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-+d @PIDPATH@ 0770 root @RUN_AS_GROUP@ - -
- X @PIDPATH@
- EOF
- ])])
-@@ -4469,14 +4469,14 @@ EOF
- [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
- # Should be used as upsd and driver PID file location for NUT
- # (if ALTPIDPATH differs from STATEPATH):
--d @ALTPIDPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-+d @ALTPIDPATH@ 0770 root @RUN_AS_GROUP@ - -
- X @ALTPIDPATH@
- EOF])
- dnl Generally added to support some forks
- AS_IF([test -n "$ALTSTATEPATH" && test "$STATEPATH" != "$ALTSTATEPATH" && test "$ALTSTATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTSTATEPATH"],
- [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
- # Some NUT variants also maintain an ALTSTATEPATH:
--d @ALTSTATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-+d @ALTSTATEPATH@ 0770 root @RUN_AS_GROUP@ - -
- X @ALTSTATEPATH@
- EOF])
- ])
-diff -up nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in.piddir-owner nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in
---- nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in.piddir-owner 2023-10-31 23:05:03.000000000 +0100
-+++ nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in 2023-11-01 10:03:46.970845553 +0100
-@@ -5,7 +5,7 @@
-
- # See also: https://github.com/networkupstools/nut/wiki/Technicalities:-Work-with-PID-and-state-file-paths#pidpath-altpidpath-statepath
- # State file (e.g. upsd to driver pipes) and PID file location for NUT:
--d @STATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-+d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - -
- # Default PIPEFN and LOCKFN locations per upssched.conf:
- d @STATEPATH@/upssched 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
- X @STATEPATH@
diff --git a/nut-2.8.4-piddir-owner.patch b/nut-2.8.4-piddir-owner.patch
new file mode 100644
index 0000000..3beb3bd
--- /dev/null
+++ b/nut-2.8.4-piddir-owner.patch
@@ -0,0 +1,50 @@
+diff -up nut-2.8.4/configure.ac.piddir-owner nut-2.8.4/configure.ac
+--- nut-2.8.4/configure.ac.piddir-owner 2025-08-06 09:50:58.000000000 -0400
++++ nut-2.8.4/configure.ac 2025-12-02 00:42:55.340090027 -0500
+@@ -6482,7 +6482,7 @@ AS_IF([test -n "$systemdtmpfilesdir"],
+
+ # See also: https://github.com/networkupstools/nut/wiki/Technicalities:-Work-with-PID-and-state-file-paths#pidpath-altpidpath-statepath
+ # State file (e.g. upsd to driver pipes) and PID file location for NUT:
+-d @STATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
++d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - -
+ # Default PIPEFN and LOCKFN locations per upssched.conf:
+ d @STATEPATH@/upssched 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+ X @STATEPATH@
+@@ -6499,7 +6499,7 @@ d @PIDPATH@ 0750 root @RUN_AS_GROUP@ - -
+ EOF
+ ], [
+ cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
+-d @PIDPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
++d @PIDPATH@ 0770 root @RUN_AS_GROUP@ - -
+ EOF
+ ])
+
+@@ -6511,14 +6511,14 @@ EOF
+ [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
+ # Should be used as upsd and driver PID file location for NUT
+ # (if ALTPIDPATH differs from STATEPATH):
+-d @ALTPIDPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
++d @ALTPIDPATH@ 0770 root @RUN_AS_GROUP@ - -
+ X @ALTPIDPATH@
+ EOF])
+ dnl Generally added to support some forks
+ AS_IF([test -n "$ALTSTATEPATH" && test "$STATEPATH" != "$ALTSTATEPATH" && test "$ALTSTATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTSTATEPATH"],
+ [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
+ # Some NUT variants also maintain an ALTSTATEPATH:
+-d @ALTSTATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
++d @ALTSTATEPATH@ 0770 root @RUN_AS_GROUP@ - -
+ X @ALTSTATEPATH@
+ EOF])
+ ])
+diff -up nut-2.8.4/scripts/systemd/nut-common-tmpfiles.conf.in.piddir-owner nut-2.8.4/scripts/systemd/nut-common-tmpfiles.conf.in
+--- nut-2.8.4/scripts/systemd/nut-common-tmpfiles.conf.in.piddir-owner 2025-08-08 04:25:35.000000000 -0400
++++ nut-2.8.4/scripts/systemd/nut-common-tmpfiles.conf.in 2025-12-02 00:37:34.064668119 -0500
+@@ -5,7 +5,7 @@
+
+ # See also: https://github.com/networkupstools/nut/wiki/Technicalities:-Work-with-PID-and-state-file-paths#pidpath-altpidpath-statepath
+ # State file (e.g. upsd to driver pipes) and PID file location for NUT:
+-d @STATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
++d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - -
+ # Default PIPEFN and LOCKFN locations per upssched.conf:
+ d @STATEPATH@/upssched 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+ X @STATEPATH@
diff --git a/nut.spec b/nut.spec
index c8f47cf..ec8b78e 100644
--- a/nut.spec
+++ b/nut.spec
@@ -13,12 +13,12 @@
Summary: Network UPS Tools
Name: nut
Version: 2.8.5
-Release: 9%{?dist}
+Release: 10%{?dist}
License: GPL-2.0-or-later AND GPL-3.0-or-later
Url: https://www.networkupstools.org/
Source: https://www.networkupstools.org/source/2.8/%{name}-%{version}.tar.gz
Source4: libs.sh
-Patch2: nut-2.8.0-piddir-owner.patch
+Patch2: nut-2.8.4-piddir-owner.patch
#quick fix. TODO: fix it properly
Patch9: nut-2.6.5-rmpidf.patch
@@ -139,7 +139,7 @@ necessary to develop NUT client applications.
%prep
%setup -q
-#patch -P 2 -p1 -b .piddir-owner
+%patch -P 2 -p1 -b .piddir-owner
%patch -P 9 -p1 -b .rmpidf
#patch -P 15 -p1
%patch -P 16 -p2 -b .rhinoname
@@ -460,9 +460,9 @@ fi
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upssched.conf
%{_tmpfilesdir}/nut-common-tmpfiles.conf
%dir %attr(750,nut,nut) %{_localstatedir}/lib/ups
-# upsmon.pid is written as root, so root needs access for now
+# upsmon.pid is written as root, so root needs access to avoid need for SELinux dac_override
%dir %attr(770,root,dialout) %{piddir}
-%attr(644,nut,nut) %verify(not size mtime md5) /run/%{name}/upsmon.pid
+%attr(644,root,root) %verify(not size mtime md5) %{piddir}/upsmon.pid
%{_bindir}/upsc
%{_bindir}/upscmd
%{_bindir}/upslog
@@ -540,6 +540,10 @@ fi
%{_libdir}/pkgconfig/libnutscan.pc
%changelog
+* Mon Nov 23 2026 Charles R. Anderson <cra@alum.wpi.edu> - 2.8.5-10
+- regenerate nut-2.8.4-piddir-owner.patch
+- create /run/nut and /run/nut/upsmon.pid with owner root
+
* Wed Oct 07 2026 Michal Hlavinka <mhlavink@redhat.com> - 2.8.5-9
- fix nut monitor spin CPU after upsd closed connection (rhbz#2539831)
reply other threads:[~2026-11-23 22:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179547425930.1.647358097231250237.rpms-nut-d54490232805@fedoraproject.org \
--to=mhlavink@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox