Move systemd tmpfiles from /var/run to /run

systemd 239 complains about the legacy of certmonger's tmpfiles
which are located in /var/run.

Change /var/run -> /run in systemd service file
This commit is contained in:
Rob Crittenden 2019-05-20 14:41:33 -04:00
parent 7eca3b6000
commit 2b5894b598
2 changed files with 43 additions and 5 deletions

View File

@ -0,0 +1,32 @@
From c2687bdf550f65756aef2cada53e18530ad402c9 Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion@nwra.com>
Date: Wed, 8 May 2019 08:23:23 -0600
Subject: [PATCH] Change /var/run -> /run in systemd service file
systemd 239 complains about the legacy of certmonger's PID file which is
located in /var/run.
Signed-off-by: Orion Poplawski <orion@nwra.com>
---
systemd/certmonger.service.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/systemd/certmonger.service.in b/systemd/certmonger.service.in
index 7bdbb464..6381d845 100644
--- a/systemd/certmonger.service.in
+++ b/systemd/certmonger.service.in
@@ -4,9 +4,9 @@ After=syslog.target network.target dbus.service
[Service]
Type=dbus
-PIDFile=/var/run/certmonger.pid
+PIDFile=/run/certmonger.pid
EnvironmentFile=-/etc/sysconfig/certmonger
-ExecStart=/usr/sbin/certmonger -S -p /var/run/certmonger.pid -n $OPTS
+ExecStart=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS
BusName=@CM_DBUS_NAME@
[Install]
--
2.17.2

View File

@ -26,7 +26,7 @@
Name: certmonger
Version: 0.79.7
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Certificate status monitor and PKI enrollment client
License: GPLv3+
@ -111,6 +111,7 @@ Conflicts: libtevent < 0.9.13
%endif
Patch1: 0001-NSS-crypto-policy-sets-minimum-RSA-and-DSA-key-size-.patch
Patch2: 0002-Change-var-run-run-in-systemd-service-file.patch
%description
Certmonger is a service which is primarily concerned with getting your
@ -119,6 +120,7 @@ system enrolled with a certificate authority (CA) and keeping it enrolled.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%if 0%{?rhel} > 0
# Enabled by default for RHEL for bug #765600, still disabled by default for
@ -138,8 +140,8 @@ autoreconf -i -f
%if %{tmpfiles}
--enable-tmpfiles \
%endif
--with-homedir=/var/run/certmonger \
--with-tmpdir=/var/run/certmonger --enable-pie --enable-now
--with-homedir=/run/certmonger \
--with-tmpdir=/run/certmonger --enable-pie --enable-now
# For some reason, some versions of xmlrpc-c-config in Fedora and RHEL just
# tell us about libxmlrpc_client, but we need more. Work around.
make %{?_smp_mflags} XMLRPC_LIBS="-lxmlrpc_client -lxmlrpc_util -lxmlrpc"
@ -148,7 +150,7 @@ make %{?_smp_mflags} XMLRPC_LIBS="-lxmlrpc_client -lxmlrpc_util -lxmlrpc"
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/certmonger/{cas,requests}
install -m755 -d $RPM_BUILD_ROOT/var/run/certmonger
install -m755 -d $RPM_BUILD_ROOT/run/certmonger
%{find_lang} %{name}
%check
@ -228,7 +230,7 @@ exit 0
%{_datadir}/dbus-1/services/*
%dir %{_sysconfdir}/certmonger
%config(noreplace) %{_sysconfdir}/certmonger/certmonger.conf
%dir /var/run/certmonger
%dir /run/certmonger
%{_bindir}/*
%{_sbindir}/certmonger
%{_mandir}/man*/*
@ -246,6 +248,10 @@ exit 0
%endif
%changelog
* Mon May 20 2019 Rob Crittenden <rcritten@redhat.com> - 0.79.7-2
- Move systemd tmpfiles from /var/run to /run (upstream #111)
- Change /var/run -> /run in systemd service file
* Mon Feb 18 2019 Rob Crittenden <rcritten@redhat.com> - 0.79.7-1
- Update to upstream 0.79.7