1
0

- n_Install-Avoid-failure-on-wrapper-installation.patch:

Fix up build for wrapper.
- Place SUID wrapper into a separate package: 
  xorg-x11-server-wrapper

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=626
This commit is contained in:
Egbert Eich 2016-04-12 09:35:45 +00:00 committed by Git OBS Bridge
parent 5f5d510726
commit 19a8f400f7
3 changed files with 72 additions and 2 deletions

View File

@ -0,0 +1,34 @@
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(-)
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 85bd0be..461e818 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -108,9 +108,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 root $(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:

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Apr 12 09:06:06 UTC 2016 - eich@suse.com
- n_Install-Avoid-failure-on-wrapper-installation.patch:
Fix up build for wrapper.
- Place SUID wrapper into a separate package:
xorg-x11-server-wrapper
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Apr 7 15:53:39 UTC 2016 - eich@suse.com Thu Apr 7 15:53:39 UTC 2016 - eich@suse.com

View File

@ -24,6 +24,12 @@
%define have_wayland 1 %define have_wayland 1
%endif %endif
%endif %endif
%if 0%{?suse_version} >= 1330
%define build_suid_wrapper 1
%define suid_wrapper_dir %{_libexecdir}
%else
%define build_suid_wrapper 0
%endif
Name: xorg-x11-server Name: xorg-x11-server
@ -164,6 +170,7 @@ Patch2: N_zap_warning_xserver.diff
Patch3: N_driver-autoconfig.diff Patch3: N_driver-autoconfig.diff
Patch4: N_fix_fglrx_screendepth_issue.patch Patch4: N_fix_fglrx_screendepth_issue.patch
Patch6: N_fix-dpi-values.diff Patch6: N_fix-dpi-values.diff
Patch7: n_Install-Avoid-failure-on-wrapper-installation.patch
Patch100: u_01-Improved-ConfineToShape.patch Patch100: u_01-Improved-ConfineToShape.patch
Patch101: u_02-DIX-ConfineTo-Don-t-bother-about-the-bounding-box-when-grabbing-a-shaped-window.patch Patch101: u_02-DIX-ConfineTo-Don-t-bother-about-the-bounding-box-when-grabbing-a-shaped-window.patch
@ -230,6 +237,16 @@ Requires: xorg-x11-fonts-core
This package contains the Xserver running on the Wayland Display Server. This package contains the Xserver running on the Wayland Display Server.
%endif %endif
%if 0%{?build_suid_wrapper} == 1
%package wrapper
Summary: Xserver SUID Wrapper
Group: System/X11/Servers/XF86_4
Requires: xorg-x11-server == %{version}
%description wrapper
This package contains an SUID wrapper for the Xserver.
%endif
%package sdk %package sdk
Summary: X Summary: X
Group: System/Libraries Group: System/Libraries
@ -289,6 +306,7 @@ sh %{SOURCE92} --verify . %{SOURCE91}
%patch3 -p0 %patch3 -p0
%patch4 -p0 %patch4 -p0
%patch6 -p0 %patch6 -p0
%patch7 -p1
# #
%patch100 -p1 %patch100 -p1
#%patch101 -p1 #%patch101 -p1
@ -332,7 +350,7 @@ sh %{SOURCE92} --verify . %{SOURCE91}
%build %build
test -e source-file-list || \ test -e source-file-list || \
find . -type f \! -name '*.orig' \! -path ./source-file-list > \ find -L . -type f \! -name '*.orig' \! -path ./source-file-list > \
source-file-list source-file-list
autoreconf -fi autoreconf -fi
@ -374,8 +392,9 @@ export PCI_TXT_IDS_DIR=%{pci_ids_dir}
%else %else
--disable-xwayland \ --disable-xwayland \
%endif %endif
%if 0%{?suse_version} >= 1330 %if 0%{?build_suid_wrapper} == 1
--enable-suid-wrapper \ --enable-suid-wrapper \
--libexecdir=%{suid_wrapper_dir} \
%endif %endif
--with-log-dir="/var/log" \ --with-log-dir="/var/log" \
--with-os-name="openSUSE" \ --with-os-name="openSUSE" \
@ -522,6 +541,9 @@ fi
%{_localstatedir}/lib/xkb/compiled/README.compiled %{_localstatedir}/lib/xkb/compiled/README.compiled
%ifnarch s390 s390x %ifnarch s390 s390x
%{_bindir}/Xorg %{_bindir}/Xorg
%if 0%{?build_suid_wrapper} == 1
%{suid_wrapper_dir}/Xorg
%endif
%{_bindir}/X %{_bindir}/X
%{_bindir}/cvt %{_bindir}/cvt
@ -543,6 +565,12 @@ fi
%{_bindir}/Xwayland %{_bindir}/Xwayland
%endif %endif
%if 0%{?build_suid_wrapper} == 1
%files wrapper
%defattr(-,root,root)
%attr(4755,root,root) %{suid_wrapper_dir}/Xorg.wrap
%endif
%files extra %files extra
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/Xephyr %{_bindir}/Xephyr