[Spice-devel] [PATCH spice-gtk] Makefile: Ensure the acl helper is installed before running install-exec-hook
Christophe Fergeau
cfergeau at redhat.com
Wed Jan 4 02:06:06 PST 2012
Hey,
Looking some more into this, gtk/Makefile on my system has
install-data-am: install-aclPROGRAMS
install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \
install-pyexecLTLIBRARIES
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
I assumed the PROGRAMS suffix would make the autotools classify
acl_PROGRAMS as a program and not data, but it seems it's not the case and
that it's considered as data.
Changing install-exec-hook to install-data-hook in gtk/Makefile.am
generates this:
install-data-am: install-aclPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
so this should work and is cleaner than this patch imo.
Christophe
On Wed, Jan 04, 2012 at 10:54:46AM +0100, Hans de Goede wrote:
> 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
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120104/db2278af/attachment.pgp>
More information about the Spice-devel
mailing list