Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
polkit: fix config install paths, use systemd-tmpfiles
Browse files Browse the repository at this point in the history
All configs should be installed to /usr and tmpfiles should be used to
create and fix directory permissions instead of the ebuild's postinst.
  • Loading branch information
marineam committed Aug 1, 2014
1 parent be83c16 commit 5c4d184
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions sys-auth/polkit/files/polkit.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
d /etc/polkit-1 - - - - -
d /etc/polkit-1/rules.d 0700 polkitd root - -
d /var/lib/polkit-1 0700 polkitd polkitd - -
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,15 @@ src_install() {

dodoc docs/TODO HACKING NEWS README

fowners -R polkitd:root /{etc,usr/share}/polkit-1/rules.d
# relocate default configs from /etc to /usr
dodir /usr/share/dbus-1/system.d
mv "${D}"/{etc,usr/share}/dbus-1/system.d/org.freedesktop.PolicyKit1.conf || die
mv "${D}"/{etc,usr/share}/polkit-1/rules.d/50-default.rules || die
rmdir "${D}"/etc/dbus-1/system.d "${D}"/etc/dbus-1 || die

systemd_dotmpfilesd "${FILESDIR}/polkit.conf"
diropts -m0700 -o polkitd -g polkitd
keepdir /var/lib/polkit-1
dodir /var/lib/polkit-1

if use examples; then
insinto /usr/share/doc/${PF}/examples
Expand All @@ -124,8 +129,3 @@ src_install() {

prune_libtool_files
}

pkg_postinst() {
chown -R polkitd:root "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
chown -R polkitd:polkitd "${EROOT}"/var/lib/polkit-1
}

0 comments on commit 5c4d184

Please sign in to comment.