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

Peter Hutterer peter.hutterer at who-t.net
Sun Jan 7 23:56:52 UTC 2018


On Sat, Dec 30, 2017 at 11:46:45PM +0100, 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>
> ---
>  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
>  
> -- 
> 2.15.1
> 

thanks, pushed.

remote: Updating patchwork state for https://patchwork.freedesktop.org/project/Xorg/list/
remote: I: patch #195280 updated using rev f615cb62d47cb24ea31718e8226df53ce6651c91.
remote: I: 1 patch(es) updated to state Accepted.
To git+ssh://git.freedesktop.org/git/xorg/xserver
   170c95978..f615cb62d  master -> master

Cheers,
   Peter


More information about the xorg-devel mailing list