chiark / gitweb /
polkit: autogenerate polkit policy with correct paths
authorLennart Poettering <lennart@poettering.net>
Sat, 12 Mar 2011 00:15:30 +0000 (01:15 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 12 Mar 2011 00:15:30 +0000 (01:15 +0100)
Makefile.am
src/org.freedesktop.systemd1.policy.in [moved from src/org.freedesktop.systemd1.policy with 94% similarity]

index 7120636d9f369e415015c19bf064a99dd54e2e3b..bb6485792aea13e1b0a60eec66220d7825f66a84 100644 (file)
@@ -339,7 +339,8 @@ EXTRA_DIST = \
        units/fsck-root.service.in \
        units/quotacheck.service.in \
        systemd.pc.in \
        units/fsck-root.service.in \
        units/quotacheck.service.in \
        systemd.pc.in \
-       introspect.awk
+       introspect.awk \
+        src/org.freedesktop.systemd1.policy.in
 
 if TARGET_FEDORA
 dist_systemunit_DATA += \
 
 if TARGET_FEDORA
 dist_systemunit_DATA += \
@@ -386,7 +387,7 @@ dist_doc_DATA = \
 pkgconfigdata_DATA = \
        systemd.pc
 
 pkgconfigdata_DATA = \
        systemd.pc
 
-dist_polkitpolicy_DATA = \
+polkitpolicy_DATA = \
        src/org.freedesktop.systemd1.policy
 
 noinst_LTLIBRARIES = \
        src/org.freedesktop.systemd1.policy
 
 noinst_LTLIBRARIES = \
@@ -1069,6 +1070,7 @@ SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
        $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
                 -e 's,@rootbindir\@,$(rootbindir),g' \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
        $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
                 -e 's,@rootbindir\@,$(rootbindir),g' \
+                -e 's,@bindir\@,$(bindir),g' \
                -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
                -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
                -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
                -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
                -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
                -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
@@ -1090,6 +1092,9 @@ man/%: man/%.in Makefile
 %.pc: %.pc.in Makefile
        $(SED_PROCESS)
 
 %.pc: %.pc.in Makefile
        $(SED_PROCESS)
 
+src/%.policy: src/%.policy.in Makefile
+       $(SED_PROCESS)
+
 M4_PROCESS_SYSTEM = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
        $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ || rm $@
 M4_PROCESS_SYSTEM = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
        $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ || rm $@
similarity index 94%
rename from src/org.freedesktop.systemd1.policy
rename to src/org.freedesktop.systemd1.policy.in
index a9958c2e33a2006c067cad3d43ba075aa3413e58..b8b354726bd06012ea8a3d5cedcfb12fc27d0e72 100644 (file)
@@ -24,7 +24,7 @@
                         <allow_inactive>no</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
                         <allow_inactive>no</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
-                <annotate key="org.freedesktop.policykit.exec.path">/lib/systemd/systemd-reply-password</annotate>
+                <annotate key="org.freedesktop.policykit.exec.path">@rootlibexecdir@/systemd-reply-password</annotate>
         </action>
 
         <action id="org.freedesktop.systemd1.BusAccess">
         </action>
 
         <action id="org.freedesktop.systemd1.BusAccess">
@@ -35,7 +35,7 @@
                         <allow_inactive>no</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
                         <allow_inactive>no</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
-                <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/systemd-stdio-bridge</annotate>
+                <annotate key="org.freedesktop.policykit.exec.path">@bindir@/systemd-stdio-bridge</annotate>
         </action>
 
 </policyconfig>
         </action>
 
 </policyconfig>