summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch84
-rw-r--r--PKGBUILD11
3 files changed, 95 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d5038e459807..8ffd45a52cd1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = xorg-server-dev
pkgver = 1.17.99.901
- pkgrel = 1
+ pkgrel = 2
url = http://xorg.freedesktop.org
arch = i686
arch = x86_64
@@ -58,12 +58,14 @@ pkgbase = xorg-server-dev
source = xvfb-run
source = xvfb-run.1
source = 0001-systemd-logind-do-not-rely-on-directed-signals.patch
+ source = 0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch
sha256sums = d9efaf191f9dd4e84771de507ac00571d2a2f43bfae589fbf1b05706f83bb280
sha256sums = SKIP
sha256sums = af1c3d2ea5de7f6a6b5f7c60951a189a4749d1495e5462f3157ae7ac8fe1dc56
sha256sums = ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9
sha256sums = 2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776
sha256sums = 3d7edab3a54d647e7d924b29d29f91b50212f308fcb1853a5aacd3181f58276c
+ sha256sums = bdcfc54ce0b64d29848efc56383d850778c6eeecf836c10b67ec2eda03a6160b
pkgname = xorg-server-dev
pkgdesc = Xorg X server - Bleeding edge version
diff --git a/0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch b/0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch
new file mode 100644
index 000000000000..a33840adcf09
--- /dev/null
+++ b/0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch
@@ -0,0 +1,84 @@
+From ca355e9d6acab994453cdbb65cb213d09ee4a50f Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 14 Oct 2015 15:10:35 +0200
+Subject: [PATCH] linux: Do not call FatalError from xf86CloseConsole
+
+FatalError ends up calling xf86CloseConsole itself, so calling FatalError
+from within xf86CloseConsole is not a good idea.
+
+All the other error checking done in xf86CloseConsole uses
+xf86Msg(X_WARNING, ...) except for the switch_to() helper function,
+change things so that switch_to() also uses xf86Msg rather then FatalError
+when called from xf86CloseConsole.
+
+BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1269210
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+ hw/xfree86/os-support/linux/lnx_init.c | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
+index ec06a05..9fec964 100644
+--- a/hw/xfree86/os-support/linux/lnx_init.c
++++ b/hw/xfree86/os-support/linux/lnx_init.c
+@@ -64,17 +64,25 @@ drain_console(int fd, void *closure)
+ }
+
+ static void
+-switch_to(int vt, const char *from)
++switch_to(int vt, Bool is_open)
+ {
+ int ret;
+
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
+- if (ret < 0)
+- FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
++ if (ret < 0) {
++ if (is_open)
++ FatalError("xf86OpenConsole: VT_ACTIVATE failed: %s\n", strerror(errno));
++ else
++ xf86Msg(X_WARNING, "xf86CloseConsole: VT_ACTIVATE failed: %s\n", strerror(errno));
++ }
+
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
+- if (ret < 0)
+- FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
++ if (ret < 0) {
++ if (is_open)
++ FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n", strerror(errno));
++ else
++ xf86Msg(X_WARNING, "xf86CloseConsole: VT_WAITACTIVE failed: %s\n", strerror(errno));
++ }
+ }
+
+ #pragma GCC diagnostic push
+@@ -233,7 +241,7 @@ xf86OpenConsole(void)
+ /*
+ * now get the VT. This _must_ succeed, or else fail completely.
+ */
+- switch_to(xf86Info.vtno, "xf86OpenConsole");
++ switch_to(xf86Info.vtno, TRUE);
+
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
+ if (ret < 0)
+@@ -294,7 +302,7 @@ xf86OpenConsole(void)
+ else { /* serverGeneration != 1 */
+ if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch) {
+ /* now get the VT */
+- switch_to(xf86Info.vtno, "xf86OpenConsole");
++ switch_to(xf86Info.vtno, TRUE);
+ }
+ }
+ }
+@@ -346,7 +354,7 @@ xf86CloseConsole(void)
+ * Perform a switch back to the active VT when we were started
+ */
+ if (activeVT >= 0) {
+- switch_to(activeVT, "xf86CloseConsole");
++ switch_to(activeVT, FALSE);
+ activeVT = -1;
+ }
+ }
+--
+2.5.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 5d4a4c346b27..3cacc71c77a2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
_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.17.99.901 # 1.18.0 RC1: http://lists.x.org/archives/xorg/2015-September/057571.html
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
license=('custom')
url="http://xorg.freedesktop.org"
@@ -19,7 +19,8 @@ source=(${url}/releases/individual/xserver/${_pkgbase}-${pkgver}.tar.bz2{,.sig}
nvidia-drm-outputclass.conf
xvfb-run
xvfb-run.1
- 0001-systemd-logind-do-not-rely-on-directed-signals.patch)
+ 0001-systemd-logind-do-not-rely-on-directed-signals.patch
+ 0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch)
validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C'
'C383B778255613DFDB409D91DB221A6900000011'
'DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3')
@@ -28,7 +29,8 @@ sha256sums=('d9efaf191f9dd4e84771de507ac00571d2a2f43bfae589fbf1b05706f83bb280'
'af1c3d2ea5de7f6a6b5f7c60951a189a4749d1495e5462f3157ae7ac8fe1dc56'
'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9'
'2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776'
- '3d7edab3a54d647e7d924b29d29f91b50212f308fcb1853a5aacd3181f58276c')
+ '3d7edab3a54d647e7d924b29d29f91b50212f308fcb1853a5aacd3181f58276c'
+ 'bdcfc54ce0b64d29848efc56383d850778c6eeecf836c10b67ec2eda03a6160b')
prepare() {
cd "${_pkgbase}-${pkgver}"
@@ -36,6 +38,9 @@ prepare() {
msg2 "fix VT switching with kdbus; from upstream"
patch -Np1 -i ../0001-systemd-logind-do-not-rely-on-directed-signals.patch
+ msg2 "fix FS#46741, taken from Fedora"
+ patch -Np1 -i ../0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch
+
msg2 "Starting autoreconf..."
autoreconf -fvi
}