Skip to content

Commit

Permalink
tmpfiles.d: install and use systemd-tmpfiles.d mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihalko committed Apr 4, 2024
1 parent 3cc4847 commit c41ab3e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ specfile_path: .packit/polkit.spec
files_to_sync:
- .packit/polkit.spec
- .packit/polkit.sysusers
- .packit/polkit-tmpfiles.conf
- packit.yaml

# name in upstream package repository or registry (e.g. in PyPI)
Expand Down
1 change: 1 addition & 0 deletions .packit/polkit-tmpfiles.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d /etc/polkit-1/rules.d 0750 root polkitd - -
3 changes: 3 additions & 0 deletions .packit/polkit.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ 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-tmpfiles.conf


BuildRequires: gcc-c++
Expand Down Expand Up @@ -95,6 +96,7 @@ Libraries files for polkit.
%install
%meson_install
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/polkit.conf
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/polkit-tmpfiles.conf

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

Expand Down Expand Up @@ -137,6 +139,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{_bindir}/pkttyagent
%dir %{_prefix}/lib/polkit-1
%{_prefix}/lib/polkit-1/polkitd
%{_tmpfilesdir}/polkit-tmpfiles.conf

# see upstream docs for why these permissions are necessary
%attr(4755,root,root) %{_bindir}/pkexec
Expand Down

0 comments on commit c41ab3e

Please sign in to comment.