polkit: fix config install paths, use systemd-tmpfiles

All configs should be installed to /usr and tmpfiles should be used to
create and fix directory permissions instead of the ebuild's postinst.
This commit is contained in:
Michael Marineau 2014-08-01 14:48:59 -07:00
parent fc957fe692
commit 31baa96f49
2 changed files with 10 additions and 7 deletions

View File

@ -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 - -

View File

@ -112,10 +112,15 @@ src_install() {
dodoc docs/TODO HACKING NEWS README 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 diropts -m0700 -o polkitd -g polkitd
keepdir /var/lib/polkit-1 dodir /var/lib/polkit-1
if use examples; then if use examples; then
insinto /usr/share/doc/${PF}/examples insinto /usr/share/doc/${PF}/examples
@ -124,8 +129,3 @@ src_install() {
prune_libtool_files 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
}