#global gitdate 20151027 # temporary build fix: %define _python_bytecompile_build 0 %bcond_with debug %define enable_builddocs 0 # Need this for shared objects that reference X Server, or other modules symbols %define _disable_ld_no_undefined 1 # Alternatives priority for standard libglx.so and mesa libs %define priority 500 %define rel 3 %global __provides_exclude_from %{_datadir}/%{name}-source %global __requires_exclude_from %{_datadir}/%{name}-source # Released ABI versions. Have to keep these manually in sync with the # source because rpm is a terrible language. %global ansic_major 0 %global ansic_minor 4 %global videodrv_major 24 %global videodrv_minor 0 %global xinput_major 24 %global xinput_minor 1 %global extension_major 10 %global extension_minor 0 %global pkgname xorg-server Name: x11-server Version: 1.20.3 Release: %mkrel %rel%{?gitdate:.%{gitdate}} Summary: X11 servers Group: System/X11 URL: http://xorg.freedesktop.org %if 0%{?gitdate} Source0: xorg-server-%{gitdate}.tar.xz %else Source0: http://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.bz2 Source1: gitignore %endif Source4: 10-quirks.conf Source5: mageia-setup-keyboard-udev Source6: 61-x11-input.rules Source10: xserver.pamd # from RH/FC: # "useful" xvfb-run script Source20: http://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.sh Source21: http://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.1 # for requires generation in drivers Source30: xserver-sdk-abi-requires.release # for finding & loading nvidia and flgrx drivers: Source90: 00-modules.conf License: GPLv2+ and MIT # Instructions to setup your repository clone # git://anongit.freedesktop.org/git/xorg/xserver # git checkout origin/server-1.7-branch # git checkout -b mdv-1.7-cherry-picks # git am ../03??-*.patch # git checkout -b mdv-1.7-redhat # git am ../04??-*.patch # git checkout -b mdv-1.7-patches # git am ../09??-*.patch # Sync with server-1.20-branch # git format-patch --start-number 100 xorg-server-1.20.3..server-1.20-branch Patch100: 0100-xwayland-Plug-leaks-in-xwl_present_sync_callback.patch Patch101: 0101-present-wnmd-Fix-use-after-free-on-CRTC-removal.patch Patch102: 0102-xwayland-do-not-crash-if-gbm_bo_create-fails.patch Patch103: 0103-xwayland-Use-xwl_present_reset_timer-in-xwl_present_.patch Patch104: 0104-xwayland-Rename-xwl_present_events_notify-to-xwl_pre.patch Patch105: 0105-xwayland-Complete-synchronous-Present-flips-from-xwl.patch Patch106: 0106-xwayland-Replace-xwl_window-present_window-with-pres.patch Patch107: 0107-xwayland-Add-xwl_present_unrealize_window.patch Patch108: 0108-xwayland-Don-t-need-xwl_window-anymore-in-xwl_presen.patch Patch109: 0109-xwayland-Don-t-take-buffer-release-queue-into-accoun.patch Patch110: 0110-xwayland-handle-case-without-any-crtc.patch # xorg server master branch from 200 Patch200: 0200-DRI2-Add-another-Coffeelake-PCI-ID.patch # Fedora Patches # XXX needs rebase, but also va_gl should probably just be the default # Patch3: 0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch Patch4: 0001-Always-install-vbe-and-int10-sdk-headers.patch # Submitted upstream, but not going anywhere Patch5: 0001-autobind-GPUs-to-the-screen.patch # because the display-managers are not ready yet, do not upstream Patch6: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch # Submitted upstream # Mageia patches # git format-patch --start-number 900 mdv-1.6.4-redhat..mdv-1.6.4-patches Patch900: 0900-Use-a-X-wrapper-that-uses-pam-and-consolehelper-to-g.patch Patch901: 0901-Don-t-print-information-about-X-Server-being-a-pre-r.patch Patch902: 0902-Take-width-into-account-when-choosing-default-mode.patch Patch903: 0903-LED-behavior-fixes.patch Patch906: 0906-xfree86-need-to-press-Ctrl-Alt-Bksp-twice-to-termina.patch # Candidates for dropping: # 902: by pixel, so that X11 choose the best resolution with a better algorithm # 903: Input subsystem has changed *a lot* since this patch was written... I # fear it might break things now # 906: All this patch does is force users to hit ctrl+alt+bksp twice (with # an annoying sound) IF the hotkey is enabled. If the user chooses to # enable ctrk+alt+bksp, why force him to hit twice? OTOH, the sound is # annoying, and it should teach users to not use ctrl+alt+bksp =D # Do not crash if Xv is not initialized (patch from xorg-devel ML) # The crash happened when v4l was loaded and xv was not registered, # for example on RV610 with radeon driver Patch4001: 1001-do-not-crash-if-xv-not-initialized.patch # (cg) Point the user at the journal rather than a logfile at /dev/null Patch5001: point-user-at-journal-rather-than-dev-null.patch # from Suse Patch5009: N_Disable-HW-Cursor-for-cirrus-and-mgag200-kernel-modules.patch Source5010: u_os-connections-Check-for-stale-FDs.patch # Security fixes Requires: %{name}-xorg Requires: %{name}-xdmx Requires: %{name}-xnest Requires: %{name}-xvfb # This should be removed when any of the vnc packages provide x11-server-xvnc: Obsoletes: %{name}-xvnc < %{version}-%{release} Obsoletes: %{name}-xfake < %{version}-%{release} # temp force new gcc BuildRequires: gcc >= 5.4.0-2 # temp force new glibc BuildRequires: glibc >= 6:2.27-2 BuildRequires: git BuildRequires: libpam-devel BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(fontutil) >= 1.1 BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(gl) >= 7.1 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pciaccess) BuildRequires: pkgconfig(pixman-1) >= 0.9.5 BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(xau) >= 1.0.0 BuildRequires: pkgconfig(xaw7) >= 1.0.1 BuildRequires: pkgconfig(xdmcp) >= 1.0.0 BuildRequires: pkgconfig(xext) >= 1.1 BuildRequires: pkgconfig(xfixes) BuildRequires: pkgconfig(xfont2) BuildRequires: pkgconfig(xi) >= 1.1.3 BuildRequires: pkgconfig(xkbfile) >= 1.0.4 BuildRequires: pkgconfig(xmu) >= 1.0.0 BuildRequires: pkgconfig(xorg-macros) >= 1.10 BuildRequires: pkgconfig(xpm) >= 3.5.4.2 BuildRequires: pkgconfig(xrender) >= 0.9.4 BuildRequires: pkgconfig(xres) >= 1.0.0 BuildRequires: pkgconfig(xtrans) >= 1.3.5 BuildRequires: pkgconfig(xv) BuildRequires: x11-proto-devel >= 7.7-11 # for ./hw/xwin/glx/gen_gl_wrappers.py: %define _python_bytecompile_errors_terminate_build 0 # Probably only needed if we change .l or .y files, but let's have them anyway: BuildRequires: byacc BuildRequires: flex # for xkbcomp patch BuildRequires: pkgconfig(libcrypto) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(dmx) BuildRequires: pkgconfig(xtst) >= 1.1 BuildRequires: pkgconfig(wayland-client) >= 1.3.0 BuildRequires: pkgconfig(wayland-eglstream-protocols) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: pkgconfig(epoxy) BuildRequires: pkgconfig(xshmfence) >= 1.1 BuildRequires: pkgconfig(libunwind) BuildRequires: pkgconfig(xcb-aux) pkgconfig(xcb-image) pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil) %if %{enable_builddocs} BuildRequires: doxygen BuildRequires: fop BuildRequires: xmlto BuildRequires: pkgconfig(xorg-sgml-doctools) %endif %description X.Org X11 X server %package common Summary: Xorg server common files Group: System/X11 License: MIT Provides: XFree86 = 7.0.0 Requires: rgb # for 'fixed' and 'cursor' fonts Requires: x11-font-misc-misc Requires: x11-font-cursor-misc Requires: x11-font-alias Requires: x11-data-xkbdata Requires: xkbcomp Requires: udev # else modesetting fails on minimal install: Requires: %{mklibname mesaegl 1} Requires(post): update-alternatives Requires(postun): update-alternatives # nvidia-71xx does not support X.org server >= 1.5 Conflicts: x11-driver-video-nvidia71xx < 71.86.09-2 # old fglrx does not support X.org server >= 1.7 Conflicts: x11-driver-video-fglrx < 8.720 # Fix: missing conflicts to allow upgrade from 2008.0 to cooker # http://qa.mandriva.com/show_bug.cgi?id=36651 Conflicts: x11-driver-video-nvidia-current <= 100.14.19 Provides: xserver-abi(ansic-%{ansic_major}) = %{ansic_minor} Provides: xserver-abi(videodrv-%{videodrv_major}) = %{videodrv_minor} Provides: xserver-abi(xinput-%{xinput_major}) = %{xinput_minor} Provides: xserver-abi(extension-%{extension_major}) = %{extension_minor} # For proprietary drivers that can support multiple videodrv versions: Provides: xserver-abi(videodrv) = %{videodrv_major}.%{videodrv_minor} %description common X server common files %package xorg Summary: Xorg X server Group: System/X11 License: MIT Requires: x11-server-common = %{version}-%{release} Requires: x11-data-xkbdata > 1.3-5 Requires: x11-font-alias Requires: libx11-common Requires: x11-driver-input-libinput # minimum libxfont needed for xserver-1.9: Requires: libxfont >= 1.4.2 %rename glamor %rename x11-driver-video-modesetting %description xorg X.org X11 is an open source implementation of the X Window System. It provides the basic low level functionality which full fledged graphical user interfaces (GUIs) such as GNOME and KDE are designed upon. %package xnest Summary: A nested server Group: System/X11 License: MIT Requires: x11-server-common = %{version}-%{release} %description xnest Xnest is an X server which has been implemented as an ordinary X application. It runs in a window just like other X applications, but it is an X server itself in which you can run other software. It is a very useful tool for developers who wish to test their applications without running them on their real X server. %package xdmx Summary: Distributed Multihead X Server and utilities Group: System/X11 License: MIT Requires: x11-server-common = %{version}-%{release} %description xdmx Xdmx is a proxy X server that provides multi-head support for multiple displays attached to different machines (each of which is running a typical X server). When Xinerama is used with Xdmx, the multiple displays on multiple machines are presented to the user as a single unified screen. A simple application for Xdmx would be to provide multi-head support using two desktop machines, each of which has a single display device attached to it. A complex application for Xdmx would be to unify a 4 by 4 grid of 1280x1024 displays (each attached to one of 16 computers) into a unified 5120x4096 display. %package xvfb Summary: A X Windows System virtual framebuffer X server Group: System/X11 # xvfb-run is GPLv2, rest is MIT License: MIT and GPLv2 Requires: x11-server-common = %{version}-%{release} Requires: xauth %description xvfb Xvfb (X Virtual Frame Buffer) is an X server that is able to run on machines with no display hardware and no physical input devices. Xvfb simulates a dumb framebuffer using virtual memory. Xvfb does not open any devices, but behaves otherwise as an X display. Xvfb is normally used for testing servers. %package xephyr Summary: A nested server Group: System/X11 License: MIT Requires: x11-server-common = %{version}-%{release} %description xephyr Xephyr is an X server which has been implemented as an ordinary X application. It runs in a window just like other X applications, but it is an X server itself in which you can run other software. It is a very useful tool for developers who wish to test their applications without running them on their real X server. Unlike Xnest, Xephyr renders to an X image rather than relaying the X protocol, and therefore supports the newer X extensions like Render and Composite. %package xwayland Summary: Wayland X Server Group: System/X11 License: MIT Requires: x11-server-common = %{version}-%{release} %description xwayland Xwayland is an X server for running X clients under Wayland. %package devel Summary: SDK for X server driver module development Group: Development/X11 License: MIT %define oldxorgnamedevel %mklibname xorg-x11 Requires: libpixman-1-devel Requires: libpciaccess-devel Requires: libxkbfile-devel Requires: libxext-devel >= 1.1 Requires: pkgconfig(xfont2) # pkgconfig file needs dri.pc: Requires: GL-devel %description devel The SDK package provides the development files which are necessary for developing X server driver modules, and for compiling driver modules outside of the standard X11 source code tree. Developers writing video drivers, input drivers, or other X modules should install this package. %package source Summary: Xserver source code required to build VNC server (Xvnc) Group: Development/X11 License: MIT BuildArch: noarch %description source Xserver source code needed to build VNC server (Xvnc) %prep %autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} rm -rf .git cp %{SOURCE1} .gitignore # ick %global __scm git %{expand:%__scm_setup_git -q} %autopatch # check the ABI in the source against what we expect. getmajor() { grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h | tr '(),' ' ' | awk '{ print $4 }' } getminor() { grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h | tr '(),' ' ' | awk '{ print $5 }' } test `getmajor ansic` == %{ansic_major} test `getminor ansic` == %{ansic_minor} test `getmajor videodrv` == %{videodrv_major} test `getminor videodrv` == %{videodrv_minor} test `getmajor xinput` == %{xinput_major} test `getminor xinput` == %{xinput_minor} test `getmajor extension` == %{extension_major} test `getminor extension` == %{extension_minor} %build %ifnarch %{ix86} x86_64 %global no_int10 --disable-vbe --disable-int10-module %endif %global kdrive --enable-kdrive --enable-xephyr %global xservers --enable-xvfb --enable-xnest %{kdrive} --enable-xorg %global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins" %global dri_flags --enable-dri2 --enable-dri3 --enable-suid-wrapper --enable-glamor %global bodhi_flags --with-vendor-name="%_vendor" %if %with debug CFLAGS='-DBUILDDEBUG -O0 -g3' \ %endif autoreconf -f -v --install || exit 1 %configure2_5x %{xservers} \ --with-log-dir=%{_logdir} \ --enable-dependency-tracking \ --enable-xwayland-eglstream \ %{?no_int10} --with-int10=x86emu \ --with-default-font-path=%{default_font_path} \ --with-module-dir=%{_libdir}/xorg/modules \ --with-vendor-web="https://bugs.mageia.org" \ %if %{with debug} --enable-debug \ %else --disable-debug \ %endif --with-builderstring="Build ID: %{name} %{version}-%{release}" \ --with-os-name="$(hostname -s) $(uname -r)" \ --without-dtrace \ --disable-xselinux --enable-record --enable-present \ --enable-config-udev \ --disable-strict-compilation \ --enable-dpms \ --disable-install-setuid \ --enable-secure-rpc \ --enable-pam \ --enable-dmx \ --enable-xwayland \ %{dri_flags} %{?bodhi_flags} \ --with-sha1=libcrypto \ pushd include && make xorg-server.h dix-config.h xorg-config.h && popd %make %install %make_install mkdir -p $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} mkdir -p %{buildroot}%{_sysconfdir}/X11/ ln -s %{_bindir}/Xorg %{buildroot}%{_sysconfdir}/X11/X ln -sf %{_libexecdir}/Xorg.wrap %{buildroot}%{_bindir}/X mkdir -p %{buildroot}%{_sysconfdir}/pam.d install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/xserver mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps touch %{buildroot}%{_sysconfdir}/security/console.apps/xserver mkdir -p $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d # make sure the (empty) /etc/X11/xorg.conf.d is there, system-setup-keyboard # relies on it more or less. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d mkdir -p %{buildroot}%{_sysconfdir}/X11/app-defaults mkdir -p %{buildroot}%{_sysconfdir}/X11/fontpath.d # move README.compiled outside compiled/ dir, so there won't be any problem with x11-data-xkbdata mv -f %{buildroot}%{_datadir}/X11/xkb/compiled/README.compiled %{buildroot}%{_datadir}/X11/xkb/ # (anssi) manage proprietary drivers install -d -m755 %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL/standard.conf << EOF # This file is knowingly empty since the libraries are in standard search # path. Please do not remove this file. EOF touch %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL.conf mkdir -p %{buildroot}/sbin mkdir -p %{buildroot}/lib/udev/rules.d/ install -m 0755 %{SOURCE5} %{buildroot}/sbin/mageia-setup-keyboard install -m 0644 %{SOURCE6} %{buildroot}/lib/udev/rules.d install -m 755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires install -m 0755 %{SOURCE20} $RPM_BUILD_ROOT%{_bindir}/xvfb-run # Make the source package %global xserver_source_dir %{_datadir}/x11-server-source %global inst_srcdir %{buildroot}/%{xserver_source_dir} mkdir -p %{inst_srcdir}/{Xext,xkb,GL,hw/{xquartz/bundle,xfree86/common}} mkdir -p %{inst_srcdir}/{hw/dmx/doc,man,doc,hw/dmx/doxygen} cp {,%{inst_srcdir}/}hw/xquartz/bundle/cpprules.in cp {,%{inst_srcdir}/}man/Xserver.man cp {,%{inst_srcdir}/}doc/smartsched cp {,%{inst_srcdir}/}hw/dmx/doxygen/doxygen.conf.in cp {,%{inst_srcdir}/}xserver.ent.in cp {,%{inst_srcdir}/}hw/xfree86/Xorg.sh.in cp xkb/README.compiled %{inst_srcdir}/xkb cp hw/xfree86/xorgconf.cpp %{inst_srcdir}/hw/xfree86 install -m 0755 %{SOURCE21} $RPM_BUILD_ROOT%{_mandir}/man1/xvfb-run.1 install -m 0644 %{SOURCE90} $RPM_BUILD_ROOT/usr/share/X11/xorg.conf.d/ find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | xargs tar cf - | (cd %{inst_srcdir} && tar xf -) find %{inst_srcdir}/hw/xfree86 -name \*.c -delete # Remove unwanted files/dirs { find $RPM_BUILD_ROOT -type f -name '*.la' | xargs rm -f -- || : # wtf %ifnarch %{ix86} x86_64 rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/lib{int10,vbe}.so %endif } %post common %{_sbindir}/update-alternatives \ --install %{_sysconfdir}/ld.so.conf.d/GL.conf gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf %{priority} # (anssi) %triggerun common -- %{name}-common < 1.3.0.0-17 [ $1 -eq 2 ] || exit 0 # do not run if downgrading current_glconf="$(readlink -e %{_sysconfdir}/ld.so.conf.d/GL.conf)" if [ "${current_glconf#*mesa}" == "gl1.conf" ]; then # This an upgrade of a system with no proprietary drivers enabled, update # the link to point to the new standard.conf instead of libmesagl1.conf (2008.0 change). %{_sbindir}/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf else # XFdrake did not set symlink to manual mode before 2008.0, so we ensure it here. %{_sbindir}/update-alternatives --set gl_conf "${current_glconf}" fi true %postun common if [ ! -f %{_sysconfdir}/ld.so.conf.d/GL/standard.conf ]; then /usr/sbin/update-alternatives --remove gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf fi %files %files common %dir %{_libdir}/xorg/modules %dir %{_sysconfdir}/X11 %dir %{_sysconfdir}/X11/app-defaults %dir %{_sysconfdir}/X11/fontpath.d %dir %{_sysconfdir}/ld.so.conf.d/GL %dir %{_sysconfdir}/X11/xorg.conf.d %ghost %{_sysconfdir}/ld.so.conf.d/GL.conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf %{_bindir}/gtf %{_bindir}/cvt /sbin/mageia-setup-keyboard /lib/udev/rules.d/61-x11-input.rules %{_bindir}/vdltodmx %{_libdir}/xorg/modules/* %{_libdir}/xorg/protocol.txt %{_datadir}/X11/xkb/README.compiled %{_mandir}/man1/gtf.* %{_mandir}/man1/cvt.* %{_mandir}/man1/vdltodmx.* %{_mandir}/man4/* %global Xorgperms %attr(4755, root, root) %files xorg %{_bindir}/X %{_bindir}/Xorg %{_libexecdir}/Xorg %{Xorgperms} %{_libexecdir}/Xorg.wrap %attr(4755,root,root)%{_bindir}/Xwrapper %{_sysconfdir}/X11/X %{_sysconfdir}/pam.d/xserver %{_sysconfdir}/security/console.apps/xserver %{_mandir}/man1/Xorg.1* %{_mandir}/man1/Xorg.wrap.1* %{_mandir}/man1/Xserver.1* %{_mandir}/man5/Xwrapper.config.5* %{_mandir}/man5/xorg.conf.5* %{_mandir}/man5/xorg.conf.d.5* %{_datadir}/X11/xorg.conf.d/00-modules.conf %{_datadir}/X11/xorg.conf.d/10-quirks.conf %files xnest %{_bindir}/Xnest %{_mandir}/man1/Xnest.1* %files xdmx %{_bindir}/Xdmx %{_bindir}/dmx* %{_bindir}/xdmx* %{_mandir}/man1/Xdmx.1* %{_mandir}/man1/dmxtodmx.1* %{_mandir}/man1/xdmxconfig.1* %files xvfb %{_bindir}/Xvfb %{_bindir}/xvfb-run %{_mandir}/man1/Xvfb.1* %{_mandir}/man1/xvfb-run.1* %files xephyr %{_bindir}/Xephyr %{_mandir}/man1/Xephyr.1* %files xwayland %{_bindir}/Xwayland %files devel %{_bindir}/xserver-sdk-abi-requires %{_libdir}/pkgconfig/xorg-server.pc %dir %{_includedir}/xorg %{_includedir}/xorg/*.h %{_datadir}/aclocal/xorg-server.m4 %files source %{xserver_source_dir}