summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO127
-rw-r--r--0001-v2-FS-58644.patch57
-rw-r--r--0002-fix-libshadow-2.patch24
-rw-r--r--PKGBUILD339
-rw-r--r--nvidia-drm-outputclass.conf6
-rw-r--r--xorg-server.patch18
-rw-r--r--xserver-autobind-hotplug.patch293
-rw-r--r--xvfb-run86
8 files changed, 661 insertions, 289 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0d7d3882e90..3d9f845a71b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,38 +1,24 @@
pkgbase = xorg-server-dev
- pkgver = 1.19.99.901
+ pkgdesc = Xorg X server - bleeding edge version
+ pkgver = 1.20.3
pkgrel = 1
- url = https://xorg.freedesktop.org
+ url = http://xorg.freedesktop.org
arch = x86_64
groups = xorg
license = custom
+ makedepends = xorgproto
makedepends = pixman
makedepends = libx11
makedepends = mesa
- makedepends = libgl
- makedepends = xf86driproto
- makedepends = xcmiscproto
+ makedepends = mesa-libgl
makedepends = xtrans
- makedepends = bigreqsproto
- makedepends = randrproto
- makedepends = inputproto
- makedepends = fontsproto
- makedepends = videoproto
- makedepends = presentproto
- makedepends = compositeproto
- makedepends = recordproto
- makedepends = scrnsaverproto
- makedepends = resourceproto
- makedepends = xineramaproto
makedepends = libxkbfile
makedepends = libxfont2
- makedepends = renderproto
makedepends = libpciaccess
makedepends = libxv
- makedepends = xf86dgaproto
makedepends = libxmu
makedepends = libxrender
makedepends = libxi
- makedepends = dmxproto
makedepends = libxaw
makedepends = libdmx
makedepends = libxtst
@@ -40,31 +26,41 @@ pkgbase = xorg-server-dev
makedepends = xorg-xkbcomp
makedepends = xorg-util-macros
makedepends = xorg-font-util
- makedepends = glproto
- makedepends = dri2proto
- makedepends = libgcrypt
makedepends = libepoxy
makedepends = xcb-util
makedepends = xcb-util-image
makedepends = xcb-util-renderutil
makedepends = xcb-util-wm
makedepends = xcb-util-keysyms
- makedepends = dri3proto
makedepends = libxshmfence
makedepends = libunwind
makedepends = systemd
makedepends = wayland-protocols
- source = https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.19.99.901.tar.bz2
- source = https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.19.99.901.tar.bz2.sig
+ makedepends = egl-wayland
+ makedepends = meson
+ source = https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.20.3.tar.bz2
+ source = https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.20.3.tar.bz2.sig
+ source = xwayland-config.h.meson.in::https://cgit.freedesktop.org/xorg/xserver/plain/include/xwayland-config.h.meson.in?id=xorg-server-1.20.0
+ source = xserver-autobind-hotplug.patch
+ source = 0001-v2-FS-58644.patch
+ source = 0002-fix-libshadow-2.patch
source = xvfb-run
source = xvfb-run.1
- sha256sums = 3654e69e19426d9738381abbe0c325082be42971535eb791fb3604f60499a36e
- sha256sums = SKIP
- sha256sums = ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9
- sha256sums = 2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776
+ validpgpkeys = 7B27A3F1A6E18CD9588B4AE8310180050905E40C
+ validpgpkeys = C383B778255613DFDB409D91DB221A6900000011
+ validpgpkeys = DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3
+ validpgpkeys = 995ED5C8A6138EB0961F18474C09DD83CAAA50B2
+ sha512sums = ee44554f86df4297f54c5871fe7a18954eeef4338775a25f36d6577b279c4775f61128da71b86cfaeadcc080838d6749dede138d4db178866579da2056543fba
+ sha512sums = SKIP
+ sha512sums = d707e0870367de2665c3b82f09564d17ed3f62c9e8b4bd471c11af1fb1e9249e306e92c7961a04e355756eec9f5271bc8e66999e56c73c31bc9da4127ff30a8e
+ sha512sums = d84f4d63a502b7af76ea49944d1b21e2030dfd250ac1e82878935cf631973310ac9ba1f0dfedf10980ec6c7431d61b7daa4b7bbaae9ee477b2c19812c1661a22
+ sha512sums = 74e1aa0c101e42f0f25349d305641873b3a79ab3b9bb2d4ed68ba8e392b4db2701fcbc35826531ee2667d3ee55673e4b4fecc2a9f088141af29ceb400f72f363
+ sha512sums = 0c7f7e43a2ba2372509f4a35e33a8a87a2e631c7e630c9c7c67ecaad00453b52c31d9dc26d1852ecd2fe1cb8c02cb716c1f39a4723473c38a0ef6e559bead271
+ sha512sums = 55bbf520333f6e818b0125b37179a7039b69a0d3d2242b80a08da003d94cbf6c1fb912d880abcce318a85d7947e3eff8fbc4cdf57d7118572e8ebc56c4569af6
+ sha512sums = de5e2cb3c6825e6cf1f07ca0d52423e17f34d70ec7935e9dd24be5fb9883bf1e03b50ff584931bd3b41095c510ab2aa44d2573fd5feaebdcb59363b65607ff22
pkgname = xorg-server-dev
- pkgdesc = Xorg X server - Bleeding edge version
+ pkgdesc = Xorg X server - bleeding edge version
install = xorg-server-dev.install
depends = libepoxy
depends = libxfont2
@@ -74,23 +70,24 @@ pkgname = xorg-server-dev
depends = dbus
depends = libgl
depends = xf86-input-libinput
+ depends = nettle
depends = libpciaccess
depends = libdrm
depends = libxshmfence
- provides = xorg-server=1.19.99.901
- provides = X-ABI-VIDEODRV_VERSION=24
+ provides = xorg-server=1.20.3
+ provides = X-ABI-VIDEODRV_VERSION=24.0
provides = X-ABI-XINPUT_VERSION=24.1
provides = X-ABI-EXTENSION_VERSION=10.0
provides = x-server
conflicts = xorg-server
- conflicts = nvidia-utils<375.26-3
+ conflicts = nvidia-utils<=331.20
conflicts = glamor-egl
conflicts = xf86-video-modesetting
replaces = glamor-egl
replaces = xf86-video-modesetting
pkgname = xorg-server-xephyr-dev
- pkgdesc = A nested X server that runs as an X application - Bleeding edge version
+ pkgdesc = A nested X server that runs as an X application - bleeding edge version
depends = libxfont2
depends = libgl
depends = libepoxy
@@ -103,86 +100,76 @@ pkgname = xorg-server-xephyr-dev
depends = xcb-util-renderutil
depends = xcb-util-wm
depends = xcb-util-keysyms
- provides = xorg-server-xephyr=1.19.99.901
+ depends = nettle
+ depends = libtirpc
+ provides = xorg-server-xephyr=1.20.3
conflicts = xorg-server-xephyr
pkgname = xorg-server-xdmx-dev
- pkgdesc = Distributed Multihead X Server and utilities - Bleeding edge version
+ pkgdesc = Distributed Multihead X Server and utilities - bleeding edge version
depends = libxfont2
depends = libxi
depends = libxaw
depends = libxrender
depends = libdmx
depends = libxfixes
- depends = libunwind
depends = pixman
depends = xorg-server-common-dev
- provides = xorg-server-xdmx=1.19.99.901
+ depends = nettle
+ provides = xorg-server-xdmx=1.20.3
conflicts = xorg-server-xdmx
pkgname = xorg-server-xvfb-dev
- pkgdesc = Virtual framebuffer X server - Bleeding edge version
+ pkgdesc = Virtual framebuffer X server - bleeding edge version
depends = libxfont2
depends = libunwind
- depends = libsystemd
depends = pixman
depends = xorg-server-common-dev
depends = xorg-xauth
depends = libgl
- provides = xorg-server-xvfb=1.19.99.901
+ depends = nettle
+ provides = xorg-server-xvfb=1.20.3
conflicts = xorg-server-xvfb
pkgname = xorg-server-xnest-dev
- pkgdesc = A nested X server that runs as an X application - Bleeding edge version
+ pkgdesc = A nested X server that runs as an X application - bleeding edge version
depends = libxfont2
depends = libxext
- depends = libunwind
depends = pixman
depends = xorg-server-common-dev
- depends = libsystemd
- provides = xorg-server-xnest=1.19.99.901
+ depends = nettle
+ depends = libtirpc
+ provides = xorg-server-xnest=1.20.3
conflicts = xorg-server-xnest
pkgname = xorg-server-xwayland-dev
- pkgdesc = Run X clients under Wayland - Bleeding edge version
- depends = libxfont
+ pkgdesc = run X clients under wayland - bleeding edge version
+ depends = libxfont2
depends = libepoxy
+ depends = libunwind
+ depends = libsystemd
depends = libgl
depends = pixman
depends = xorg-server-common-dev
- provides = xorg-server-xwayland=1.19.99.901
- conflicts = xorg-server-xwayland
+ depends = nettle
+ depends = libtirpc
+ provides = xorg-server-wayland=1.20.3
+ conflicts = xorg-server-wayland
pkgname = xorg-server-common-dev
- pkgdesc = Xorg server common files - Bleeding edge version
+ pkgdesc = Xorg server common files - bleeding edge version
depends = xkeyboard-config
depends = xorg-xkbcomp
depends = xorg-setxkbmap
- provides = xorg-server-common=1.19.99.901-1
+ provides = xorg-server-common=1.20.3
conflicts = xorg-server-common
pkgname = xorg-server-devel-dev
- pkgdesc = Development files for the X.Org X server - Bleeding edge version
- depends = xproto
- depends = randrproto
- depends = renderproto
- depends = xextproto
- depends = inputproto
- depends = kbproto
- depends = fontsproto
- depends = pixman
- depends = videoproto
- depends = xf86driproto
- depends = glproto
+ pkgdesc = Development files for the X.Org X server - bleeding edge version
+ depends = xorgproto
depends = mesa
- depends = dri2proto
- depends = dri3proto
- depends = xineramaproto
depends = libpciaccess
- depends = resourceproto
- depends = scrnsaverproto
- depends = presentproto
depends = xorg-util-macros
- provides = xorg-server-devel=1.19.99.901
+ provides = xorg-server-devel=1.20.3
conflicts = xorg-server-devel
diff --git a/0001-v2-FS-58644.patch b/0001-v2-FS-58644.patch
new file mode 100644
index 00000000000..bb2e463e953
--- /dev/null
+++ b/0001-v2-FS-58644.patch
@@ -0,0 +1,57 @@
+From 17584285d296acaa80f131ca0e8b75eff675962b Mon Sep 17 00:00:00 2001
+From: fafryd <dz1125.bug.tracker@gmail.com>
+Date: Sun, 20 May 2018 14:30:43 +0200
+Subject: [PATCH] v2 FS#58644
+
+---
+ hw/xfree86/common/meson.build | 13 +++++++++++++
+ hw/xfree86/meson.build | 12 +++++++-----
+ 2 files changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/hw/xfree86/common/meson.build b/hw/xfree86/common/meson.build
+index 514999ff6..0eff6e488 100644
+--- a/hw/xfree86/common/meson.build
++++ b/hw/xfree86/common/meson.build
+@@ -1,3 +1,16 @@
++if get_option('suid_wrapper')
++ x_sh = configure_file(
++ input: '../Xorg.sh.in',
++ output: 'Xorg',
++ configuration: conf_data,
++ )
++ install_data(
++ x_sh,
++ install_mode: 'rwxr-xr-x',
++ install_dir: join_paths(get_option('prefix'), get_option('bindir')),
++ )
++endif
++
+ srcs_xorg_common = [
+ 'xf86fbBus.c',
+ 'xf86noBus.c',
+diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build
+index cacf56d4c..d1295d404 100644
+--- a/hw/xfree86/meson.build
++++ b/hw/xfree86/meson.build
+@@ -145,11 +145,13 @@ if get_option('suid_wrapper')
+ install_dir: get_option('libexecdir'),
+ # install_mode: ['r-sr-xr-x', 0, 0],
+ )
+- configure_file(
+- input: 'Xorg.sh.in',
+- output: 'Xorg',
+- configuration: conf_data,
+- install_dir: join_paths(get_option('prefix'), get_option('bindir')),
++ meson.add_install_script(
++ 'sh', '-c',
++ 'chmod u+s @0@@1@/@2@'.format(
++ '${DESTDIR}',
++ join_paths(get_option('prefix'), get_option('libexecdir')),
++ 'Xorg.wrap'
++ )
+ )
+ endif
+
+--
+2.17.0
+
diff --git a/0002-fix-libshadow-2.patch b/0002-fix-libshadow-2.patch
new file mode 100644
index 00000000000..8f6834d6279
--- /dev/null
+++ b/0002-fix-libshadow-2.patch
@@ -0,0 +1,24 @@
+From 9ed4ae9cf207360000742c09007a32ad144b52db Mon Sep 17 00:00:00 2001
+From: fafryd <dz1125.bug.tracker@gmail.com>
+Date: Fri, 25 May 2018 20:17:35 +0200
+Subject: [PATCH] fix libshadow
+
+---
+ hw/xfree86/dixmods/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build
+index 835d23215..6bd8029b6 100644
+--- a/hw/xfree86/dixmods/meson.build
++++ b/hw/xfree86/dixmods/meson.build
+@@ -38,6 +38,7 @@ shared_module(
+
+ install: true,
+ install_dir: module_dir,
++ install_rpath: '$ORIGIN/./',
+ )
+
+ if build_glx
+--
+2.17.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 537e1b655d0..4f516a27137 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,255 +1,234 @@
-# Maintainer: Det <nimetonmaili g-mail>
+# Maintainer : Daniel Bermond < gmail-com: danielbermond >
+# Contributor: Det <nimetonmaili g-mail>
# Based on [testing]'s xorg-server
-_pkgbase=xorg-server
-pkgname=('xorg-server-dev' 'xorg-server-xephyr-dev' 'xorg-server-xdmx-dev' 'xorg-server-xvfb-dev' 'xorg-server-xnest-dev' 'xorg-server-xwayland-dev' 'xorg-server-common-dev' 'xorg-server-devel-dev')
-pkgver=1.19.99.901 # 1.20 RC1: http://lists.x.org/archives/xorg/2018-February/059152.html
+pkgbase=xorg-server-dev
+pkgname=('xorg-server-dev' 'xorg-server-xephyr-dev' 'xorg-server-xdmx-dev' 'xorg-server-xvfb-dev' 'xorg-server-xnest-dev'
+ 'xorg-server-xwayland-dev' 'xorg-server-common-dev' 'xorg-server-devel-dev')
+pkgver=1.20.3
pkgrel=1
arch=('x86_64')
license=('custom')
groups=('xorg')
-url="https://xorg.freedesktop.org"
-makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto'
- 'inputproto' 'fontsproto' 'videoproto' 'presentproto' 'compositeproto' 'recordproto' 'scrnsaverproto'
- 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont2' 'renderproto' 'libpciaccess' 'libxv'
- 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres'
- 'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util' 'glproto' 'dri2proto' 'libgcrypt' 'libepoxy'
- 'xcb-util' 'xcb-util-image' 'xcb-util-renderutil' 'xcb-util-wm' 'xcb-util-keysyms' 'dri3proto'
- 'libxshmfence' 'libunwind' 'systemd' 'wayland-protocols')
-source=(${url}/releases/individual/xserver/${_pkgbase}-${pkgver}.tar.bz2{,.sig}
- xvfb-run
+pkgdesc="Xorg X server - bleeding edge version"
+url="http://xorg.freedesktop.org"
+makedepends=('xorgproto' 'pixman' 'libx11' 'mesa' 'mesa-libgl' 'xtrans'
+ 'libxkbfile' 'libxfont2' 'libpciaccess' 'libxv'
+ 'libxmu' 'libxrender' 'libxi' 'libxaw' 'libdmx' 'libxtst' 'libxres'
+ 'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util' 'libepoxy'
+ 'xcb-util' 'xcb-util-image' 'xcb-util-renderutil' 'xcb-util-wm' 'xcb-util-keysyms'
+ 'libxshmfence' 'libunwind' 'systemd' 'wayland-protocols' 'egl-wayland' 'meson') # 'git')
+source=(https://xorg.freedesktop.org/releases/individual/xserver/${pkgbase%-dev}-${pkgver}.tar.bz2{,.sig}
+ 'xwayland-config.h.meson.in::https://cgit.freedesktop.org/xorg/xserver/plain/include/xwayland-config.h.meson.in?id=xorg-server-1.20.0'
+ xserver-autobind-hotplug.patch
+ 0001-v2-FS-58644.patch
+ 0002-fix-libshadow-2.patch
+ xvfb-run # with updates from FC master
xvfb-run.1)
validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C'
'C383B778255613DFDB409D91DB221A6900000011'
'DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3'
'995ED5C8A6138EB0961F18474C09DD83CAAA50B2')
-sha256sums=('3654e69e19426d9738381abbe0c325082be42971535eb791fb3604f60499a36e'
+sha512sums=('ee44554f86df4297f54c5871fe7a18954eeef4338775a25f36d6577b279c4775f61128da71b86cfaeadcc080838d6749dede138d4db178866579da2056543fba'
'SKIP'
- 'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9'
- '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776')
+ 'd707e0870367de2665c3b82f09564d17ed3f62c9e8b4bd471c11af1fb1e9249e306e92c7961a04e355756eec9f5271bc8e66999e56c73c31bc9da4127ff30a8e'
+ 'd84f4d63a502b7af76ea49944d1b21e2030dfd250ac1e82878935cf631973310ac9ba1f0dfedf10980ec6c7431d61b7daa4b7bbaae9ee477b2c19812c1661a22'
+ '74e1aa0c101e42f0f25349d305641873b3a79ab3b9bb2d4ed68ba8e392b4db2701fcbc35826531ee2667d3ee55673e4b4fecc2a9f088141af29ceb400f72f363'
+ '0c7f7e43a2ba2372509f4a35e33a8a87a2e631c7e630c9c7c67ecaad00453b52c31d9dc26d1852ecd2fe1cb8c02cb716c1f39a4723473c38a0ef6e559bead271'
+ '55bbf520333f6e818b0125b37179a7039b69a0d3d2242b80a08da003d94cbf6c1fb912d880abcce318a85d7947e3eff8fbc4cdf57d7118572e8ebc56c4569af6'
+ 'de5e2cb3c6825e6cf1f07ca0d52423e17f34d70ec7935e9dd24be5fb9883bf1e03b50ff584931bd3b41095c510ab2aa44d2573fd5feaebdcb59363b65607ff22')
prepare() {
- cd "${_pkgbase}-${pkgver}"
+ # missing from tarball
+ cp xwayland-config.h.meson.in ${pkgbase%-dev}-${pkgver}/include/
- msg2 "Starting autoreconf..."
- autoreconf -vfi
+ cd "${pkgbase%-dev}-${pkgver}"
+
+ # patch from Fedora, not yet merged
+ patch -Np1 -i ../xserver-autobind-hotplug.patch
+
+ # Fix rootless xorg - FS#58644
+ # https://bugs.freedesktop.org/show_bug.cgi?id=106588
+ patch -Np1 -i ../0001-v2-FS-58644.patch
+
+ # Fix libshadow.so: libfb.so => not found - FS#58731
+ # https://bugs.freedesktop.org/show_bug.cgi?id=106656
+ patch -Np1 -i ../0002-fix-libshadow-2.patch
}
build() {
# Since pacman 5.0.2-2, hardened flags are now enabled in makepkg.conf
- # With them, modules fail to load with undefined symbol.
+ # With them, module fail to load with undefined symbol.
# See https://bugs.archlinux.org/task/55102 / https://bugs.archlinux.org/task/54845
export CFLAGS=${CFLAGS/-fno-plt}
export CXXFLAGS=${CXXFLAGS/-fno-plt}
export LDFLAGS=${LDFLAGS/,-z,now}
- cd "${_pkgbase}-${pkgver}"
-
- msg2 "Starting ./configure..."
- ./configure --prefix=/usr \
- --enable-ipv6 \
- --enable-dri \
- --enable-dmx \
- --enable-xvfb \
- --enable-xnest \
- --enable-composite \
- --enable-xcsecurity \
- --enable-libunwind \
- --enable-xorg \
- --enable-xephyr \
- --enable-glamor \
- --enable-xwayland \
- --enable-kdrive \
- --enable-kdrive-kbd \
- --enable-kdrive-mouse \
- --enable-config-udev \
- --enable-systemd-logind \
- --enable-suid-wrapper \
- --disable-install-setuid \
- --enable-record \
- --disable-xfbdev \
- --disable-xfake \
- --disable-static \
- --libexecdir=/usr/lib/xorg-server \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --with-xkb-path=/usr/share/X11/xkb \
- --with-xkb-output=/var/lib/xkb \
- --with-fontrootdir=/usr/share/fonts \
- --with-sha1=libgcrypt
-
-# --without-dtrace \
-# --disable-linux-acpi --disable-linux-apm \
-
- msg2 "Starting make..."
- make
-
- # Disable subdirs for make install rule to make splitting easier
- sed -e 's/^DMX_SUBDIRS =.*/DMX_SUBDIRS =/' \
- -e 's/^XVFB_SUBDIRS =.*/XVFB_SUBDIRS =/' \
- -e 's/^XNEST_SUBDIRS =.*/XNEST_SUBDIRS = /' \
- -e 's/^KDRIVE_SUBDIRS =.*/KDRIVE_SUBDIRS =/' \
- -e 's/^XWAYLAND_SUBDIRS =.*/XWAYLAND_SUBDIRS =/' \
- -i hw/Makefile
+ arch-meson ${pkgbase%-dev}-$pkgver build \
+ -D os_vendor="Arch Linux" \
+ -D ipv6=true \
+ -D dmx=true \
+ -D xvfb=true \
+ -D xnest=true \
+ -D xcsecurity=true \
+ -D xorg=true \
+ -D xephyr=true \
+ -D xwayland=true \
+ -D xwayland_eglstream=true \
+ -D glamor=true \
+ -D udev=true \
+ -D systemd_logind=true \
+ -D suid_wrapper=true \
+ -D xkb_dir=/usr/share/X11/xkb \
+ -D xkb_output_dir=/var/lib/xkb
+
+ # Print config
+ meson configure build
+ ninja -C build
+
+ # fake installation to be seperated into packages
+ DESTDIR="${srcdir}/fakeinstall" ninja -C build install
+}
+
+_install() {
+ local src f dir
+ for src; do
+ f="${src#fakeinstall/}"
+ dir="${pkgdir}/${f%/*}"
+ install -m755 -d "${dir}"
+ mv -v "${src}" "${dir}/"
+ done
}
package_xorg-server-common-dev() {
- pkgdesc="Xorg server common files - Bleeding edge version"
+ pkgdesc="Xorg server common files - bleeding edge version"
depends=(xkeyboard-config xorg-xkbcomp xorg-setxkbmap)
- provides=(xorg-server-common=$pkgver-$pkgrel)
- conflicts=(xorg-server-common)
-
- cd "${_pkgbase}-${pkgver}"
- install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-common"
- install -m644 COPYING "${pkgdir}/usr/share/licenses/xorg-server-common"
-
- msg2 "Starting make install-data..."
- make -C xkb DESTDIR="${pkgdir}" install-data
+ provides=("xorg-server-common=${pkgver}")
+ conflicts=('xorg-server-common')
- install -m755 -d "${pkgdir}/usr/share/man/man1"
- install -m644 man/Xserver.1 "${pkgdir}/usr/share/man/man1/"
+ _install fakeinstall/usr/lib/xorg/protocol.txt
+ _install fakeinstall/usr/share/man/man1/Xserver.1.gz
- install -m755 -d "${pkgdir}/usr/lib/xorg"
- install -m644 dix/protocol.txt "${pkgdir}/usr/lib/xorg/"
+ install -m644 -Dt "${pkgdir}/var/lib/xkb/" "${pkgbase%-dev}-${pkgver}"/xkb/README.compiled
+ # license
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase%-dev}-${pkgver}"/COPYING
}
package_xorg-server-dev() {
- pkgdesc="Xorg X server - Bleeding edge version"
- depends=(libepoxy libxfont2 pixman xorg-server-common-dev libunwind dbus libgl xf86-input-libinput
+ pkgdesc="Xorg X server - bleeding edge version"
+ depends=(libepoxy libxfont2 pixman xorg-server-common-dev libunwind
+ dbus libgl xf86-input-libinput nettle
libpciaccess libdrm libxshmfence) # FS#52949
- # see src/xorg-server-*/hw/xfree86/common/xf86Module.h for ABI versions - we provide major numbers that drivers can depend on
- # and /usr/lib/pkgconfig/xorg-server.pc in xorg-server-devel-dev pkg
- provides=("xorg-server=$pkgver" 'X-ABI-VIDEODRV_VERSION=24' 'X-ABI-XINPUT_VERSION=24.1' 'X-ABI-EXTENSION_VERSION=10.0' 'x-server')
- conflicts=('xorg-server' 'nvidia-utils<375.26-3' 'glamor-egl' 'xf86-video-modesetting')
+ # see xorg-server-*/hw/xfree86/common/xf86Module.h for ABI versions - we provide major numbers that drivers can depend on
+ # and /usr/lib/pkgconfig/xorg-server.pc in xorg-server-devel pkg
+ provides=("xorg-server=${pkgver}" 'X-ABI-VIDEODRV_VERSION=24.0' 'X-ABI-XINPUT_VERSION=24.1' 'X-ABI-EXTENSION_VERSION=10.0' 'x-server')
+ conflicts=('xorg-server' 'nvidia-utils<=331.20' 'glamor-egl' 'xf86-video-modesetting')
replaces=('glamor-egl' 'xf86-video-modesetting')
install=xorg-server-dev.install
- cd "${_pkgbase}-${pkgver}"
+ _install fakeinstall/usr/bin/{Xorg,cvt,gtf}
+ ln -s /usr/bin/Xorg "${pkgdir}/usr/bin/X"
+ _install fakeinstall/usr/lib/Xorg{,.wrap}
+ _install fakeinstall/usr/lib/xorg/modules/*
+ _install fakeinstall/usr/share/X11/xorg.conf.d/10-quirks.conf
+ _install fakeinstall/usr/share/man/man1/{Xorg,Xorg.wrap,cvt,gtf}.1.gz
+ _install fakeinstall/usr/share/man/man4/{exa,fbdevhw,modesetting}.4.gz
+ _install fakeinstall/usr/share/man/man5/{Xwrapper.config,xorg.conf,xorg.conf.d}.5.gz
- msg2 "Starting make install..."
- make DESTDIR="${pkgdir}" install
-
# distro specific files must be installed in /usr/share/X11/xorg.conf.d
install -m755 -d "${pkgdir}/etc/X11/xorg.conf.d"
-
- rm -rf "${pkgdir}/var"
-
- rm -f "${pkgdir}/usr/share/man/man1/Xserver.1"
- rm -f "${pkgdir}/usr/lib/xorg/protocol.txt"
-
- install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server"
- ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server/COPYING"
- rm -rf "${pkgdir}/usr/lib/pkgconfig"
- rm -rf "${pkgdir}/usr/include"
- rm -rf "${pkgdir}/usr/share/aclocal"
+ # license
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase%-dev}-${pkgver}"/COPYING
}
package_xorg-server-xephyr-dev() {
- pkgdesc="A nested X server that runs as an X application - Bleeding edge version"
- depends=(libxfont2 libgl libepoxy libunwind libsystemd libxv pixman xorg-server-common-dev xcb-util-image
- xcb-util-renderutil xcb-util-wm xcb-util-keysyms)
- provides=(xorg-server-xephyr=$pkgver)
- conflicts=(xorg-server-xephyr)
-
- cd "${_pkgbase}-${pkgver}/hw/kdrive"
-
- msg2 "Starting make install..."
- make DESTDIR="${pkgdir}" install
-
- install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xephyr"
- ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xephyr/COPYING"
+ pkgdesc="A nested X server that runs as an X application - bleeding edge version"
+ depends=(libxfont2 libgl libepoxy libunwind libsystemd libxv pixman xorg-server-common-dev
+ xcb-util-image xcb-util-renderutil xcb-util-wm xcb-util-keysyms
+ nettle libtirpc)
+ provides=("xorg-server-xephyr=${pkgver}")
+ conflicts=('xorg-server-xephyr')
+
+ _install fakeinstall/usr/bin/Xephyr
+ _install fakeinstall/usr/share/man/man1/Xephyr.1.gz
+
+ # license
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase%-dev}-${pkgver}"/COPYING
}
package_xorg-server-xvfb-dev() {
- pkgdesc="Virtual framebuffer X server - Bleeding edge version"
- depends=(libxfont2 libunwind libsystemd pixman xorg-server-common-dev xorg-xauth libgl)
- provides=(xorg-server-xvfb=$pkgver)
- conflicts=(xorg-server-xvfb)
-
- cd "${_pkgbase}-${pkgver}/hw/vfb"
+ pkgdesc="Virtual framebuffer X server - bleeding edge version"
+ depends=(libxfont2 libunwind pixman xorg-server-common-dev xorg-xauth libgl nettle)
+ provides=("xorg-server-xvfb=${pkgver}")
+ conflicts=('xorg-server-xvfb')
- msg2 "Starting make install..."
- make DESTDIR="${pkgdir}" install
+ _install fakeinstall/usr/bin/Xvfb
+ _install fakeinstall/usr/share/man/man1/Xvfb.1.gz
install -m755 "${srcdir}/xvfb-run" "${pkgdir}/usr/bin/"
- install -m644 "${srcdir}/xvfb-run.1" "${pkgdir}/usr/share/man/man1/"
+ install -m644 "${srcdir}/xvfb-run.1" "${pkgdir}/usr/share/man/man1/" # outda
- install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xvfb"
- ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xvfb/COPYING"
+ # license
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase%-dev}-${pkgver}"/COPYING
}
package_xorg-server-xnest-dev() {
- pkgdesc="A nested X server that runs as an X application - Bleeding edge version"
- depends=(libxfont2 libxext libunwind pixman xorg-server-common-dev libsystemd)
- provides=(xorg-server-xnest=$pkgver)
- conflicts=(xorg-server-xnest)
+ pkgdesc="A nested X server that runs as an X application - bleeding edge version"
+ depends=(libxfont2 libxext pixman xorg-server-common-dev nettle libtirpc)
+ provides=("xorg-server-xnest=${pkgver}")
+ conflicts=('xorg-server-xnest')
- cd "${_pkgbase}-${pkgver}/hw/xnest"
+ _install fakeinstall/usr/bin/Xnest
+ _install fakeinstall/usr/share/man/man1/Xnest.1.gz
- msg2 "Starting make install..."
- make DESTDIR="${pkgdir}" install
-
- install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xnest"
- ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xnest/COPYING"
+ # license
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase%-dev}-${pkgver}"/COPYING
}
package_xorg-server-xdmx-dev() {
- pkgdesc="Distributed Multihead X Server and utilities - Bleeding edge version"
- depends=(libxfont2 libxi libxaw libxrender libdmx libxfixes libunwind pixman xorg-server-common-dev)
- provides=(xorg-server-xdmx=$pkgver)
- conflicts=(xorg-server-xdmx)
-
- cd "${_pkgbase}-${pkgver}/hw/dmx"
+ pkgdesc="Distributed Multihead X Server and utilities - bleeding edge version"
+ depends=(libxfont2 libxi libxaw libxrender libdmx libxfixes
+ pixman xorg-server-common-dev nettle)
+ provides=("xorg-server-xdmx=${pkgver}")
+ conflicts=('xorg-server-xdmx')
- msg2 "Starting make install..."
- make DESTDIR="${pkgdir}" install
+ _install fakeinstall/usr/bin/{Xdmx,dmx*,vdltodmx,xdmxconfig}
+ _install fakeinstall/usr/share/man/man1/{Xdmx,dmxtodmx,vdltodmx,xdmxconfig}.1.gz
- install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xdmx"
- ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xdmx/COPYING"
+ # license
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase%-dev}-${pkgver}"/COPYING
}
package_xorg-server-xwayland-dev() {
- pkgdesc="Run X clients under Wayland - Bleeding edge version"
- depends=(libxfont libepoxy libgl pixman xorg-server-common-dev)
- provides=(xorg-server-xwayland=$pkgver)
- conflicts=(xorg-server-xwayland)
+ pkgdesc="run X clients under wayland - bleeding edge version"
+ depends=(libxfont2 libepoxy libunwind libsystemd libgl pixman xorg-server-common-dev
+ nettle libtirpc)
+ provides=("xorg-server-wayland=${pkgver}")
+ conflicts=('xorg-server-wayland')
- cd "${_pkgbase}-${pkgver}/hw/xwayland"
+ _install fakeinstall/usr/bin/Xwayland
- msg2 "Starting make install..."
- make DESTDIR="${pkgdir}" install
-
- install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xwayland"
- ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xwayland/COPYING"
+ # license
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase%-dev}-${pkgver}"/COPYING
}
package_xorg-server-devel-dev() {
- pkgdesc="Development files for the X.Org X server - Bleeding edge version"
- depends=(# see pkgdir/usr/lib/pkgconfig/xorg-server.pc
- xproto randrproto renderproto xextproto inputproto kbproto
- fontsproto pixman videoproto xf86driproto glproto
- mesa dri2proto dri3proto xineramaproto libpciaccess
- resourceproto scrnsaverproto presentproto
+ pkgdesc="Development files for the X.Org X server - bleeding edge version"
+ depends=('xorgproto' 'mesa' 'libpciaccess'
# not technically required but almost every Xorg pkg needs it to build
- xorg-util-macros)
- provides=(xorg-server-devel=$pkgver)
- conflicts=(xorg-server-devel)
-
- cd "${_pkgbase}-${pkgver}"
+ 'xorg-util-macros')
+ provides=("xorg-server-devel=${pkgver}")
+ conflicts=('xorg-server-devel')
- msg2 "Starting make install..."
- make DESTDIR="${pkgdir}" install
+ _install fakeinstall/usr/include/xorg/*
+ _install fakeinstall/usr/lib/pkgconfig/xorg-server.pc
+ _install fakeinstall/usr/share/aclocal/xorg-server.m4
- rm -rf "${pkgdir}/usr/bin"
- rm -rf "${pkgdir}/usr/share/man"
- rm -rf "${pkgdir}/usr/share/doc"
- rm -rf "${pkgdir}/usr/share/X11"
- rm -rf "${pkgdir}/usr/lib/xorg"
- rm -rf "${pkgdir}/usr/lib/xorg-server"
- rm -rf "${pkgdir}/var"
+ # license
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase%-dev}-${pkgver}"/COPYING
- install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-devel"
- ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-devel/COPYING"
+ # make sure there are no files left to install
+ find fakeinstall -depth -print0 | xargs -0 rmdir
}
diff --git a/nvidia-drm-outputclass.conf b/nvidia-drm-outputclass.conf
deleted file mode 100644
index 40c1e08b5f4..00000000000
--- a/nvidia-drm-outputclass.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-Section "OutputClass"
- Identifier "nvidia"
- MatchDriver "nvidia-drm"
- Driver "nvidia"
-EndSection
-
diff --git a/xorg-server.patch b/xorg-server.patch
new file mode 100644
index 00000000000..46bf5a90ae8
--- /dev/null
+++ b/xorg-server.patch
@@ -0,0 +1,18 @@
+post_upgrade() {
+ if (( $(vercmp $2 1.16.0-3) < 0 )); then
+ post_install
+ fi
+}
+
+post_install() {
+ cat <<MSG
+>>> xorg-server has now the ability to run without root rights with
+ the help of systemd-logind. xserver will fail to run if not launched
+ from the same virtual terminal as was used to log in.
+ Without root rights, log files will be in ~/.local/share/xorg/ directory.
+
+ Old behavior can be restored through Xorg.wrap config file.
+ See Xorg.wrap man page (man xorg.wrap).
+MSG
+}
+
diff --git a/xserver-autobind-hotplug.patch b/xserver-autobind-hotplug.patch
new file mode 100644
index 00000000000..86b96a23e4b
--- /dev/null
+++ b/xserver-autobind-hotplug.patch
@@ -0,0 +1,293 @@
+From 471289fa1dc359555ceed6302f7d9605ab6be3ea Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 2 Apr 2018 16:49:02 -0400
+Subject: [PATCH] autobind GPUs to the screen
+
+This is a modified version of a patch we've been carry-ing in Fedora and
+RHEL for years now. This patch automatically adds secondary GPUs to the
+master as output sink / offload source making e.g. the use of
+slave-outputs just work, with requiring the user to manually run
+"xrandr --setprovideroutputsource" before he can hookup an external
+monitor to his hybrid graphics laptop.
+
+There is one problem with this patch, which is why it was not upstreamed
+before. What to do when a secondary GPU gets detected really is a policy
+decission (e.g. one may want to autobind PCI GPUs but not USB ones) and
+as such should be under control of the Desktop Environment.
+
+Unconditionally adding autobinding support to the xserver will result
+in races between the DE dealing with the hotplug of a secondary GPU
+and the server itself dealing with it.
+
+However we've waited for years for any Desktop Environments to actually
+start doing some sort of autoconfiguration of secondary GPUs and there
+is still not a single DE dealing with this, so I believe that it is
+time to upstream this now.
+
+To avoid potential future problems if any DEs get support for doing
+secondary GPU configuration themselves, the new autobind functionality
+is made optional. Since no DEs currently support doing this themselves it
+is enabled by default. When DEs grow support for doing this themselves
+they can disable the servers autobinding through the servers cmdline or a
+xorg.conf snippet.
+
+Signed-off-by: Dave Airlie <airlied@gmail.com>
+[hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream]
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+ hw/xfree86/common/xf86Config.c | 19 +++++++++++++++++++
+ hw/xfree86/common/xf86Globals.c | 2 ++
+ hw/xfree86/common/xf86Init.c | 20 ++++++++++++++++++++
+ hw/xfree86/common/xf86Priv.h | 1 +
+ hw/xfree86/common/xf86Privstr.h | 1 +
+ hw/xfree86/common/xf86platformBus.c | 4 ++++
+ hw/xfree86/man/Xorg.man | 7 +++++++
+ hw/xfree86/man/xorg.conf.man | 6 ++++++
+ randr/randrstr.h | 3 +++
+ randr/rrprovider.c | 22 ++++++++++++++++++++++
+ 10 files changed, 85 insertions(+)
+
+diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
+index 2c1d335..d7d7c2e 100644
+--- a/hw/xfree86/common/xf86Config.c
++++ b/hw/xfree86/common/xf86Config.c
+@@ -643,6 +643,7 @@ typedef enum {
+ FLAG_DRI2,
+ FLAG_USE_SIGIO,
+ FLAG_AUTO_ADD_GPU,
++ FLAG_AUTO_BIND_GPU,
+ FLAG_MAX_CLIENTS,
+ FLAG_IGLX,
+ FLAG_DEBUG,
+@@ -699,6 +700,8 @@ static OptionInfoRec FlagOptions[] = {
+ {0}, FALSE},
+ {FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN,
+ {0}, FALSE},
++ {FLAG_AUTO_BIND_GPU, "AutoBindGPU", OPTV_BOOLEAN,
++ {0}, FALSE},
+ {FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER,
+ {0}, FALSE },
+ {FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN,
+@@ -779,6 +782,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
+ }
+ xf86Msg(from, "%sutomatically adding GPU devices\n",
+ xf86Info.autoAddGPU ? "A" : "Not a");
++
++ if (xf86AutoBindGPUDisabled) {
++ xf86Info.autoBindGPU = FALSE;
++ from = X_CMDLINE;
++ }
++ else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_BIND_GPU)) {
++ xf86GetOptValBool(FlagOptions, FLAG_AUTO_BIND_GPU,
++ &xf86Info.autoBindGPU);
++ from = X_CONFIG;
++ }
++ else {
++ from = X_DEFAULT;
++ }
++ xf86Msg(from, "%sutomatically binding GPU devices\n",
++ xf86Info.autoBindGPU ? "A" : "Not a");
++
+ /*
+ * Set things up based on the config file information. Some of these
+ * settings may be overridden later when the command line options are
+diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
+index e890f05..7b27b4c 100644
+--- a/hw/xfree86/common/xf86Globals.c
++++ b/hw/xfree86/common/xf86Globals.c
+@@ -131,6 +131,7 @@ xf86InfoRec xf86Info = {
+ #else
+ .autoAddGPU = FALSE,
+ #endif
++ .autoBindGPU = TRUE,
+ };
+
+ const char *xf86ConfigFile = NULL;
+@@ -191,6 +192,7 @@ Bool xf86FlipPixels = FALSE;
+ Gamma xf86Gamma = { 0.0, 0.0, 0.0 };
+
+ Bool xf86AllowMouseOpenFail = FALSE;
++Bool xf86AutoBindGPUDisabled = FALSE;
+
+ #ifdef XF86VIDMODE
+ Bool xf86VidModeDisabled = FALSE;
+diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
+index ea42ec9..ec255b6 100644
+--- a/hw/xfree86/common/xf86Init.c
++++ b/hw/xfree86/common/xf86Init.c
+@@ -76,6 +76,7 @@
+ #include "xf86DDC.h"
+ #include "xf86Xinput.h"
+ #include "xf86InPriv.h"
++#include "xf86Crtc.h"
+ #include "picturestr.h"
+ #include "randrstr.h"
+ #include "glxvndabi.h"
+@@ -237,6 +238,19 @@ xf86PrivsElevated(void)
+ return PrivsElevated();
+ }
+
++static void
++xf86AutoConfigOutputDevices(void)
++{
++ int i;
++
++ if (!xf86Info.autoBindGPU)
++ return;
++
++ for (i = 0; i < xf86NumGPUScreens; i++)
++ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
++ xf86ScrnToScreen(xf86Screens[0]));
++}
++
+ static void
+ TrapSignals(void)
+ {
+@@ -770,6 +784,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
+ for (i = 0; i < xf86NumGPUScreens; i++)
+ AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+
++ xf86AutoConfigOutputDevices();
++
+ xf86VGAarbiterWrapFunctions();
+ if (sigio_blocked)
+ input_unlock();
+@@ -1278,6 +1294,10 @@ ddxProcessArgument(int argc, char **argv, int i)
+ xf86Info.iglxFrom = X_CMDLINE;
+ return 0;
+ }
++ if (!strcmp(argv[i], "-noautoBindGPU")) {
++ xf86AutoBindGPUDisabled = TRUE;
++ return 1;
++ }
+
+ /* OS-specific processing */
+ return xf86ProcessArgument(argc, argv, i);
+diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
+index 4fe2b5f..6566622 100644
+--- a/hw/xfree86/common/xf86Priv.h
++++ b/hw/xfree86/common/xf86Priv.h
+@@ -46,6 +46,7 @@
+ extern _X_EXPORT const char *xf86ConfigFile;
+ extern _X_EXPORT const char *xf86ConfigDir;
+ extern _X_EXPORT Bool xf86AllowMouseOpenFail;
++extern _X_EXPORT Bool xf86AutoBindGPUDisabled;
+
+ #ifdef XF86VIDMODE
+ extern _X_EXPORT Bool xf86VidModeDisabled;
+diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
+index 21c2e1f..6c71863 100644
+--- a/hw/xfree86/common/xf86Privstr.h
++++ b/hw/xfree86/common/xf86Privstr.h
+@@ -98,6 +98,7 @@ typedef struct {
+
+ Bool autoAddGPU;
+ const char *debug;
++ Bool autoBindGPU;
+ } xf86InfoRec, *xf86InfoPtr;
+
+ /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
+diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
+index cef47da..913a324 100644
+--- a/hw/xfree86/common/xf86platformBus.c
++++ b/hw/xfree86/common/xf86platformBus.c
+@@ -49,6 +49,7 @@
+ #include "Pci.h"
+ #include "xf86platformBus.h"
+ #include "xf86Config.h"
++#include "xf86Crtc.h"
+
+ #include "randrstr.h"
+ int platformSlotClaimed;
+@@ -665,6 +666,9 @@ xf86platformAddDevice(int index)
+ }
+ /* attach unbound to 0 protocol screen */
+ AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
++ if (xf86Info.autoBindGPU)
++ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
++ xf86ScrnToScreen(xf86Screens[0]));
+
+ RRResourcesChanged(xf86Screens[0]->pScreen);
+ RRTellChanged(xf86Screens[0]->pScreen);
+diff --git a/hw/xfree86/man/Xorg.man b/hw/xfree86/man/Xorg.man
+index 13a9dc3..745f986 100644
+--- a/hw/xfree86/man/Xorg.man
++++ b/hw/xfree86/man/Xorg.man
+@@ -283,6 +283,13 @@ is a comma separated list of directories to search for
+ server modules. This option is only available when the server is run
+ as root (i.e, with real-uid 0).
+ .TP 8
++.B \-noautoBindGPU
++Disable automatically setting secondary GPUs up as output sinks and offload
++sources. This is equivalent to setting the
++.B AutoBindGPU
++xorg.conf(__filemansuffix__) file option. To
++.B false.
++.TP 8
+ .B \-nosilk
+ Disable Silken Mouse support.
+ .TP 8
+diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
+index 9589262..8d51e06 100644
+--- a/hw/xfree86/man/xorg.conf.man
++++ b/hw/xfree86/man/xorg.conf.man
+@@ -672,6 +672,12 @@ Enabled by default.
+ If this option is disabled, then no GPU devices will be added from the udev
+ backend. Enabled by default. (May need to be disabled to setup Xinerama).
+ .TP 7
++.BI "Option \*qAutoBindGPU\*q \*q" boolean \*q
++If enabled then secondary GPUs will be automatically set up as output-sinks and
++offload-sources. Making e.g. laptop outputs connected only to the secondary
++GPU directly available for use without needing to run
++"xrandr --setprovideroutputsource". Enabled by default.
++.TP 7
+ .BI "Option \*qLog\*q \*q" string \*q
+ This option controls whether the log is flushed and/or synced to disk after
+ each message.
+diff --git a/randr/randrstr.h b/randr/randrstr.h
+index f94174b..092d726 100644
+--- a/randr/randrstr.h
++++ b/randr/randrstr.h
+@@ -1039,6 +1039,9 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p);
+ extern _X_EXPORT void
+ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
+
++extern _X_EXPORT void
++RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen);
++
+ /* rrproviderproperty.c */
+
+ extern _X_EXPORT void
+diff --git a/randr/rrprovider.c b/randr/rrprovider.c
+index e4bc2bf..e04c18f 100644
+--- a/randr/rrprovider.c
++++ b/randr/rrprovider.c
+@@ -485,3 +485,25 @@ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider)
+
+ WriteEventsToClient(client, 1, (xEvent *) &pe);
+ }
++
++void
++RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen)
++{
++ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
++ rrScrPrivPtr masterPriv = rrGetScrPriv(masterScreen);
++ RRProviderPtr provider = pScrPriv->provider;
++ RRProviderPtr master_provider = masterPriv->provider;
++
++ if (!provider || !master_provider)
++ return;
++
++ if ((provider->capabilities & RR_Capability_SinkOutput) &&
++ (master_provider->capabilities & RR_Capability_SourceOutput)) {
++ pScrPriv->rrProviderSetOutputSource(pScreen, provider, master_provider);
++ RRInitPrimeSyncProps(pScreen);
++ }
++
++ if ((provider->capabilities & RR_Capability_SourceOffload) &&
++ (master_provider->capabilities & RR_Capability_SinkOffload))
++ pScrPriv->rrProviderSetOffloadSink(pScreen, provider, master_provider);
++}
+--
+2.16.2
+
diff --git a/xvfb-run b/xvfb-run
index 4c2f4e0d3a4..9d088c1c28e 100644
--- a/xvfb-run
+++ b/xvfb-run
@@ -1,6 +1,21 @@
#!/bin/sh
-
-# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+#
+# T2 SDE: package/.../xorg-server/xvfb-run.sh
+# Copyright (C) 2005 The T2 SDE Project
+# Copyright (C) XXXX - 2005 Debian
+#
+# More information can be found in the files COPYING and README.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License. A copy of the
+# GNU General Public License can be found in the file COPYING.
+# --- T2-COPYRIGHT-NOTE-END ---
+
+# $Id$
+# from: http://necrotic.deadbeast.net/xsf/XFree86/trunk/debian/local/xvfb-run
# This script starts an instance of Xvfb, the "fake" X server, runs a command
# with that server available, and kills the X server when done. The return
@@ -16,7 +31,7 @@ SERVERNUM=99
AUTHFILE=
ERRORFILE=/dev/null
STARTWAIT=3
-XVFBARGS="-screen 0 640x480x8"
+XVFBARGS="-screen 0 640x480x24"
LISTENTCP="-nolisten tcp"
XAUTHPROTO=.
@@ -49,7 +64,10 @@ Usage: $PROGNAME [OPTION ...] COMMAND
Run COMMAND (usually an X client) in a virtual X server environment.
Options:
-a --auto-servernum try to get a free server number, starting at
- --server-num
+ --server-num (deprecated, use --auto-display
+ instead)
+-d --auto-display use the X server to find a display number
+ automatically
-e FILE --error-file=FILE file used to store xauth errors and Xvfb
output (default: $ERRORFILE)
-f FILE --auth-file=FILE file used to store auth cookie
@@ -81,22 +99,9 @@ find_free_servernum() {
echo $i
}
-# Clean up files
-clean_up() {
- if [ -e "$AUTHFILE" ]; then
- XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >>"$ERRORFILE" 2>&1
- fi
- if [ -n "$XVFB_RUN_TMPDIR" ]; then
- if ! rm -r "$XVFB_RUN_TMPDIR"; then
- error "problem while cleaning up temporary directory"
- exit 5
- fi
- fi
-}
-
# Parse the command line.
-ARGS=$(getopt --options +ae:f:hn:lp:s:w: \
- --long auto-servernum,error-file:,auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \
+ARGS=$(getopt --options +ade:f:hn:lp:s:w: \
+ --long auto-servernum,error-file:auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \
--name "$PROGNAME" -- "$@")
GETOPT_STATUS=$?
@@ -110,6 +115,7 @@ eval set -- "$ARGS"
while :; do
case "$1" in
-a|--auto-servernum) SERVERNUM=$(find_free_servernum) ;;
+ -d|--auto-display) AUTO_DISPLAY=1 ;;
-e|--error-file) ERRORFILE="$2"; shift ;;
-f|--auth-file) AUTHFILE="$2"; shift ;;
-h|--help) SHOWHELP="yes" ;;
@@ -136,34 +142,39 @@ if [ -z "$*" ]; then
exit 2
fi
-if ! which xauth >/dev/null; then
+if ! type xauth >/dev/null; then
error "xauth command not found"
exit 3
fi
-# tidy up after ourselves
-trap clean_up EXIT
-
+# Set up the temp dir for the pid and X authorization file
+XVFB_RUN_TMPDIR="$(mktemp --directory --tmpdir $PROGNAME.XXXXXX)"
# If the user did not specify an X authorization file to use, set up a temporary
# directory to house one.
if [ -z "$AUTHFILE" ]; then
- XVFB_RUN_TMPDIR="$(mktemp -d -t $PROGNAME.XXXXXX)"
- AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority"
+ AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority.XXXXXX)
fi
# Start Xvfb.
MCOOKIE=$(mcookie)
+
+if [ -z "$AUTO_DISPLAY" ]; then
+ # Old style using a pre-computed SERVERNUM
+ XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" \
+ 2>&1 &
+ XVFBPID=$!
+else
+ # New style using Xvfb to provide a free display
+ PIDFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" pid.XXXXXX)
+ SERVERNUM=$(XAUTHORITY=$AUTHFILE Xvfb -displayfd 1 $XVFBARGS $LISTENTCP \
+ 2>"$ERRORFILE" & echo $! > $PIDFILE)
+ XVFBPID=$(cat $PIDFILE)
+fi
+sleep "$STARTWAIT"
+
XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1
add :$SERVERNUM $XAUTHPROTO $MCOOKIE
EOF
-XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" \
- 2>&1 &
-XVFBPID=$!
-sleep "$STARTWAIT"
-if ! kill -0 $XVFBPID 2>/dev/null; then
- echo "Xvfb failed to start" >&2
- exit 1
-fi
# Start the command and save its exit status.
set +e
@@ -174,6 +185,15 @@ set -e
# Kill Xvfb now that the command has exited.
kill $XVFBPID
+# Clean up.
+XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >"$ERRORFILE" 2>&1
+if [ -n "$XVFB_RUN_TMPDIR" ]; then
+ if ! rm -r "$XVFB_RUN_TMPDIR"; then
+ error "problem while cleaning up temporary directory"
+ exit 5
+ fi
+fi
+
# Return the executed command's exit status.
exit $RETVAL