[PATCH xserver] Xorg.wrap: Ensure correct ordering of post-install hook

Hans de Goede hdegoede at redhat.com
Mon Jan 1 12:12:34 UTC 2018


Hi,

On 30-12-17 23:46, Lukáš Krejčí wrote:
> The install rule of Xorg.wrap is currently a dependency of the
> install-data target instead of the install-exec target. The build also
> uses install-exec-hook to change the ownership and set the SUID bit on
> the Xorg.wrap binary. The problem is that install-exec-hook is only
> ordered respective to the install-exec target, the rules of install-data
> may or may not have been executed.
> 
> If install-exec-hook runs before the Xorg.wrap binary is in place,
> a message similar to the following will be present in the build log:
> 
> chown: cannot access '/pkgdir/usr/lib/xorg-server/Xorg.wrap': No such file or directory
> make[6]: [Makefile:1151: install-exec-hook] Error 1 (ignored)
> 
> All that needs to be done is to change the name of the program variable
> to contain 'exec' for the install rule to depend on the install-exec
> target.
> 
> Excerpt from the Automake manual, chapter 12.2 The Two Parts of Install:
> "Any variable using a user-defined directory prefix with ‘exec’ in the
> name (e.g., myexecbin_PROGRAMS) is installed by install-exec. All other
> user-defined prefixes are installed by install-data."
> 
> Signed-off-by: Lukáš Krejčí <lskrejci at gmail.com>

Looks good to me:

Acked-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans


> ---
>   hw/xfree86/Makefile.am | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
> index b876b79ab..458720052 100644
> --- a/hw/xfree86/Makefile.am
> +++ b/hw/xfree86/Makefile.am
> @@ -84,8 +84,8 @@ Xorg_DEPENDENCIES = $(LOCAL_LIBS)
>   Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
>   
>   if SUID_WRAPPER
> -wrapdir = $(SUID_WRAPPER_DIR)
> -wrap_PROGRAMS = Xorg.wrap
> +wrapexecdir = $(SUID_WRAPPER_DIR)
> +wrapexec_PROGRAMS = Xorg.wrap
>   Xorg_wrap_SOURCES = xorg-wrapper.c
>   endif
>   
> 


More information about the xorg-devel mailing list