[Spice-devel] [PATCH spice-gtk] Makefile: Ensure the acl helper is installed before running install-exec-hook
Hans de Goede
hdegoede at redhat.com
Wed Jan 4 01:54:46 PST 2012
On my system when running make install, after installing the libraries it
first executes install-binPROGRAMS:
/bin/sh ../libtool --mode=install /usr/bin/install -c spicy snappy spicy-st
libtool: install: /usr/bin/install -c .libs/spicy /usr/bin/spicy
libtool: install: /usr/bin/install -c .libs/snappy /usr/bin/snappy
libtool: install: /usr/bin/install -c .libs/spicy-stats /usr/bin/spicy-stats
Then the install-exec-hook:
make install-exec-hook
make[6]: Entering directory `/home/hans/projects/spice/spice-gtk/gtk'
chown root /usr/bin//spice-client-glib-usb-acl-helper
chmod u+s /usr/bin//spice-client-glib-usb-acl-helper
And only then does it install the actual helper by executing
install-aclPROGRAMS:
/bin/sh ../libtool --mode=install /usr/bin/install -c spice-client-glib-usb
libtool: install: /usr/bin/install -c spice-client-glib-usb-acl-helper /usr/bin
Which means that the install-exec-hook runs too early, either there is no
spice-client-glib-usb-acl-helper for it to make suid root, or if there is it
will later get overwritten and its rights will get reset.
This patch fixes this by making install-binPROGRAMS depend on
install-aclPROGRAMS, thus ensuring the acl helper is installed before running
the install-exec-hook.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
gtk/Makefile.am | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 82a0cbf..0eefd1a 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -23,6 +23,7 @@ bin_PROGRAMS = spicy snappy spicy-stats
if WITH_POLKIT
acldir = $(ACL_HELPER_DIR)
acl_PROGRAMS = spice-client-glib-usb-acl-helper
+install-binPROGRAMS: install-aclPROGRAMS
endif
lib_LTLIBRARIES = \
--
1.7.7.4
More information about the Spice-devel
mailing list