#12 tmpfiles.d: install and use systemd-tmpfiles.d mechanism
Opened a month ago by vmihalko. Modified a month ago
rpms/ vmihalko/polkit vmihalko-tmpd  into  rawhide

file added
+1
@@ -0,0 +1,1 @@ 

+ d /etc/polkit-1/rules.d 0750 root polkitd - -

file modified
+7 -1
@@ -4,11 +4,12 @@ 

  Summary: An authorization framework

  Name: polkit

  Version: 124

- Release: 3%{?dist}

+ Release: 4%{?dist}

  License: LGPL-2.0-or-later

  URL: https://github.com/polkit-org/polkit

  Source0: https://github.com/polkit-org/polkit/archive/refs/tags/%{version}.tar.gz

  Source1: polkit.sysusers

+ Source2: polkit.conf

  

  Patch1: no-session-for-cookie.patch

  Patch2: pkttyagent-coredump-after-eof.patch
@@ -97,6 +98,7 @@ 

  %install

  %meson_install

  install -Dpm 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/polkit.conf

+ install -Dpm 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/polkit.conf

  

  rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

  
@@ -139,6 +141,7 @@ 

  %{_bindir}/pkttyagent

  %dir %{_prefix}/lib/polkit-1

  %{_prefix}/lib/polkit-1/polkitd

+ %{_tmpfilesdir}/polkit.conf

  

  # see upstream docs for why these permissions are necessary

  %attr(4755,root,root) %{_bindir}/pkexec
@@ -162,6 +165,9 @@ 

  %{_libdir}/girepository-1.0/*.typelib

  

  %changelog

+ * Wed Apr 10 2024 Vincent Mihalkovic <vmihalko@redhat.com> - 124-4

+ - Install and use systemd-tmpfiles.d mechanism

+ 

  * Fri Mar 15 2024 Jan Rybar <jrybar@redhat.com> - 124-3

  - pkexec: no session for cookie error fixed

  - pkttyagent: fix of generation of coredump if EOF (Ctrl+D) sent to password prompt

tmpfiles.d will automatically create the /etc/polkit-1/rules.d directory (and any non-existing directories on the path). After reboot, the directory contents will remain unchanged, and after removing the directory & rebooting, an empty directory will be created.

tmpfiles.d in fedora: https://docs.fedoraproject.org/en-US/packaging-guidelines/Tmpfiles.d/
tmpfiles.d manpage: https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html

Metadata