]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
sudo: Use systemd tmpfiles mechanism
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 18 Mar 2023 15:05:26 +0000 (16:05 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Mar 2023 18:25:39 +0000 (18:25 +0000)
Use the tmpfiles mechanism from systemd to proper
recreate the /run/sudo directory.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
sudo/sudo.nm

index 1ccd04f3c93a7d4c704d216878a3108e1b123173..6c46eb1ac114ade99bd540a86c14bab379cff24d 100644 (file)
@@ -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