PolicyKit: Branch 'wip/js-rule-files'

David Zeuthen david at kemper.freedesktop.org
Wed May 23 14:12:05 PDT 2012


 configure.ac                               |   10 +---------
 data/Makefile.am                           |    6 ++++--
 data/org.freedesktop.PolicyKit1.service.in |    2 +-
 data/polkit.service.in                     |    2 +-
 src/polkitagent/Makefile.am                |   10 ++++++----
 src/polkitagent/polkitagentsession.c       |    2 +-
 src/polkitd/Makefile.am                    |    3 ++-
 7 files changed, 16 insertions(+), 19 deletions(-)

New commits:
commit 6fbcc6cd839680fcefd81c4a43676e7c031c9859
Author: David Zeuthen <davidz at redhat.com>
Date:   Wed May 23 17:11:29 2012 -0400

    Store private binaries in /usr/lib/polkit-1 instead of /usr/libexec
    
    Signed-off-by: David Zeuthen <davidz at redhat.com>

diff --git a/configure.ac b/configure.ac
index f75b8d9..961a886 100644
--- a/configure.ac
+++ b/configure.ac
@@ -515,15 +515,7 @@ echo "
 
 "
 
-echo "NOTE: The directory ${sysconfdir}/polkit-1/localauthority must be owned"
-echo "      by root and have mode 700"
-echo
-
-echo "NOTE: The directory ${localstatedir}/lib/polkit-1 must be owned"
-echo "      by root and have mode 700"
-echo
-
-echo "NOTE: The file ${libexecdir}/polkit-agent-helper-1 must be owned"
+echo "NOTE: The file ${prefix}/lib/polkit-1/polkit-agent-helper-1 must be owned"
 echo "      by root and have mode 4755 (setuid root binary)"
 echo
 
diff --git a/data/Makefile.am b/data/Makefile.am
index 83bcc20..6623286 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -2,12 +2,14 @@
 
 NULL =
 
+libprivdir = $(prefix)/lib/polkit-1
+
 servicedir       = $(datadir)/dbus-1/system-services
 service_in_files = org.freedesktop.PolicyKit1.service.in
 service_DATA     = $(service_in_files:.service.in=.service)
 
 $(service_DATA): $(service_in_files) Makefile
-	@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
+	@sed -e "s|\@libprivdir\@|$(libprivdir)|" $< > $@
 
 dbusconfdir = $(sysconfdir)/dbus-1/system.d
 dbusconf_DATA = org.freedesktop.PolicyKit1.conf
@@ -27,7 +29,7 @@ if HAVE_SYSTEMD
 systemdservicedir       = $(systemdsystemunitdir)
 systemdservice_DATA     = $(systemdservice_in_files:.service.in=.service)
 $(systemdservice_DATA): $(systemdservice_in_files) Makefile
-	@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
+	@sed -e "s|\@libprivdir\@|$(libprivdir)|" $< > $@
 endif
 
 CLEANFILES = $(BUILT_SOURCES)
diff --git a/data/org.freedesktop.PolicyKit1.service.in b/data/org.freedesktop.PolicyKit1.service.in
index fbceb3f..10bbab0 100644
--- a/data/org.freedesktop.PolicyKit1.service.in
+++ b/data/org.freedesktop.PolicyKit1.service.in
@@ -1,5 +1,5 @@
 [D-BUS Service]
 Name=org.freedesktop.PolicyKit1
-Exec=@libexecdir@/polkitd --no-debug
+Exec=@libprivdir@/polkitd --no-debug
 User=root
 SystemdService=polkit.service
diff --git a/data/polkit.service.in b/data/polkit.service.in
index efd2948..9665043 100644
--- a/data/polkit.service.in
+++ b/data/polkit.service.in
@@ -5,4 +5,4 @@ Documentation=man:polkit(8)
 [Service]
 Type=dbus
 BusName=org.freedesktop.PolicyKit1
-ExecStart=@libexecdir@/polkitd --no-debug
+ExecStart=@libprivdir@/polkitd --no-debug
diff --git a/src/polkitagent/Makefile.am b/src/polkitagent/Makefile.am
index e8c9fb1..1cfb73c 100644
--- a/src/polkitagent/Makefile.am
+++ b/src/polkitagent/Makefile.am
@@ -5,6 +5,7 @@ INCLUDES =                                                      \
         -I$(top_srcdir)/src                                     \
         -I$(top_builddir)/src/polkit                            \
         -I$(top_srcdir)/src/polkit                              \
+        -DPACKAGE_PREFIX=\""$(prefix)"\"                    	\
         -DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\"               \
         -DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\"               \
         -DPACKAGE_DATA_DIR=\""$(datadir)"\"                     \
@@ -77,7 +78,8 @@ libpolkit_agent_1_la_LIBADD =                               		\
 
 libpolkit_agent_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'
 
-libexec_PROGRAMS = polkit-agent-helper-1
+libprivdir = $(prefix)/lib/polkit-1
+libpriv_PROGRAMS = polkit-agent-helper-1
 
 polkit_agent_helper_1_SOURCES = 					\
 	polkitagenthelperprivate.c polkitagenthelperprivate.h		\
@@ -132,9 +134,9 @@ endif # HAVE_INTROSPECTION
 # authenticate not only the invoking user, but possibly also root
 # and/or other users.
 #
-install-exec-hook:
-	-chown root $(DESTDIR)$(libexecdir)/polkit-agent-helper-1
-	-chmod 4755 $(DESTDIR)$(libexecdir)/polkit-agent-helper-1
+install-data-hook:
+	-chown root $(DESTDIR)$(libprivdir)/polkit-agent-helper-1
+	-chmod 4755 $(DESTDIR)$(libprivdir)/polkit-agent-helper-1
 
 EXTRA_DIST = polkitagentmarshal.list polkitagentenumtypes.h.template polkitagentenumtypes.c.template
 
diff --git a/src/polkitagent/polkitagentsession.c b/src/polkitagent/polkitagentsession.c
index 8129cd9..1c7a2dc 100644
--- a/src/polkitagent/polkitagentsession.c
+++ b/src/polkitagent/polkitagentsession.c
@@ -620,7 +620,7 @@ polkit_agent_session_initiate (PolkitAgentSession *session)
       goto error;
     }
 
-  helper_argv[0] = PACKAGE_LIBEXEC_DIR "/polkit-agent-helper-1";
+  helper_argv[0] = PACKAGE_PREFIX "/lib/polkit-1/polkit-agent-helper-1";
   helper_argv[1] = passwd->pw_name;
   helper_argv[2] = session->cookie;
   helper_argv[3] = NULL;
diff --git a/src/polkitd/Makefile.am b/src/polkitd/Makefile.am
index 5ea3e95..584b795 100644
--- a/src/polkitd/Makefile.am
+++ b/src/polkitd/Makefile.am
@@ -14,7 +14,8 @@ INCLUDES =                                              		\
 	-D_REENTRANT	                                		\
 	$(NULL)
 
-libexec_PROGRAMS = polkitd
+libprivdir = $(prefix)/lib/polkit-1
+libpriv_PROGRAMS = polkitd
 
 polkitd_SOURCES = 							\
 					main.c				\


More information about the hal-commit mailing list