diff --git a/n_Install-Avoid-failure-on-wrapper-installation.patch b/n_Install-Avoid-failure-on-wrapper-installation.patch new file mode 100644 index 0000000..f9538e8 --- /dev/null +++ b/n_Install-Avoid-failure-on-wrapper-installation.patch @@ -0,0 +1,34 @@ +From: Egbert Eich +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 + +- 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 +--- + 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: diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 0fe0b00..c634b25 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -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 diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index bcaaf89..acdb15a 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -24,6 +24,12 @@ %define have_wayland 1 %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 @@ -164,6 +170,7 @@ Patch2: N_zap_warning_xserver.diff Patch3: N_driver-autoconfig.diff Patch4: N_fix_fglrx_screendepth_issue.patch Patch6: N_fix-dpi-values.diff +Patch7: n_Install-Avoid-failure-on-wrapper-installation.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 @@ -230,6 +237,16 @@ Requires: xorg-x11-fonts-core This package contains the Xserver running on the Wayland Display Server. %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 Summary: X Group: System/Libraries @@ -289,6 +306,7 @@ sh %{SOURCE92} --verify . %{SOURCE91} %patch3 -p0 %patch4 -p0 %patch6 -p0 +%patch7 -p1 # %patch100 -p1 #%patch101 -p1 @@ -332,7 +350,7 @@ sh %{SOURCE92} --verify . %{SOURCE91} %build 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 autoreconf -fi @@ -374,8 +392,9 @@ export PCI_TXT_IDS_DIR=%{pci_ids_dir} %else --disable-xwayland \ %endif -%if 0%{?suse_version} >= 1330 +%if 0%{?build_suid_wrapper} == 1 --enable-suid-wrapper \ + --libexecdir=%{suid_wrapper_dir} \ %endif --with-log-dir="/var/log" \ --with-os-name="openSUSE" \ @@ -522,6 +541,9 @@ fi %{_localstatedir}/lib/xkb/compiled/README.compiled %ifnarch s390 s390x %{_bindir}/Xorg +%if 0%{?build_suid_wrapper} == 1 +%{suid_wrapper_dir}/Xorg +%endif %{_bindir}/X %{_bindir}/cvt @@ -543,6 +565,12 @@ fi %{_bindir}/Xwayland %endif +%if 0%{?build_suid_wrapper} == 1 +%files wrapper +%defattr(-,root,root) +%attr(4755,root,root) %{suid_wrapper_dir}/Xorg.wrap +%endif + %files extra %defattr(-,root,root) %{_bindir}/Xephyr