1
0
xorg-x11-server/N_Install-Avoid-failure-on-wrapper-installation.patch
Stefan Dirsch c2276ffaed Accepting request 731423 from home:iznogood:branches:X11:XOrg
- Add U_xwayland-Separate-DamagePtr-into-separate-window-data.patch
  and U_xwayland-Allow-passing-a-fd.patch: Needed for gnome 3.34
  new and experimental xwayland on demand feature.
- Rebase patches with quilt.

OBS-URL: https://build.opensuse.org/request/show/731423
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=744
2019-09-18 12:48:07 +00:00

35 lines
1.3 KiB
Diff

From: Egbert Eich <eich@suse.de>
Date: Tue Apr 12 09:22:40 2016 +0200
Subject: [PATCH]Install: Avoid failure on wrapper installation
Patch-mainline: never
References:
Signed-off-by: Egbert Eich <eich@suse.com>
- Check for SUID_WRAPPER_DIR being identical to bindir
before copying script.
- Check whether user is root before doing a chmod/chown
Signed-off-by: Egbert Eich <eich@suse.de>
---
hw/xfree86/Makefile.am | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: xorg-server-1.20.5/hw/xfree86/Makefile.am
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/Makefile.am
+++ xorg-server-1.20.5/hw/xfree86/Makefile.am
@@ -113,9 +113,10 @@ if INSTALL_SETUID
endif
if SUID_WRAPPER
$(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR)
- mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg
- ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg
- -chown 0 $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap
+ mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg 2>/dev/null && target=Xorg; \
+ ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/$${target}
+ -test "x$UID" = "x0" -o "x$EUID" = "x0" && \
+ chown root $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap
endif
uninstall-local: