From 410af549636529928133ece25a7ae6b209059027 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sat, 18 Mar 2023 16:05:26 +0100 Subject: [PATCH] sudo: Use systemd tmpfiles mechanism Use the tmpfiles mechanism from systemd to proper recreate the /run/sudo directory. Signed-off-by: Stefan Schantl --- sudo/sudo.nm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sudo/sudo.nm b/sudo/sudo.nm index 1ccd04f3c..6c46eb1ac 100644 --- a/sudo/sudo.nm +++ b/sudo/sudo.nm @@ -5,7 +5,7 @@ name = sudo version = 1.9.12p1 -release = 1 +release = 2 groups = Applications/System url = https://www.sudo.ws/ @@ -46,7 +46,8 @@ build --with-ignore-dot \ --with-tty-tickets \ --with-ldap \ - --with-passprompt="[sudo] password for %p: " + --with-passprompt="[sudo] password for %p: " \ + --enable-tmpfiles.d=%{tmpfilesdir} prepare_cmds # The tarball contains files owned by a stange uid:gid which will let @@ -61,6 +62,9 @@ build install_cmds mkdir -pv %{BUILDROOT}%{sysconfdir} cp -vf %{DIR_SOURCE}/sudoers %{BUILDROOT}%{sysconfdir}/sudoers + + # Do not ship /run + rm -rvf %{BUILDROOT}/run end end -- 2.47.3