Date: Saturday, October 17, 2015 @ 13:14:53 Author: lcarlier Revision: 249462
upgpkg: xorg-server 1.17.2-5 fix FS#46741 Added: xorg-server/trunk/0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch Modified: xorg-server/trunk/PKGBUILD ---------------------------------------------------------------+ 0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch | 84 ++++++++++ PKGBUILD | 11 - 2 files changed, 92 insertions(+), 3 deletions(-) Added: 0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch =================================================================== --- 0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch (rev 0) +++ 0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch 2015-10-17 11:14:53 UTC (rev 249462) @@ -0,0 +1,84 @@ +From ca355e9d6acab994453cdbb65cb213d09ee4a50f Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdego...@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 <hdego...@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 + Modified: PKGBUILD =================================================================== --- PKGBUILD 2015-10-17 09:03:49 UTC (rev 249461) +++ PKGBUILD 2015-10-17 11:14:53 UTC (rev 249462) @@ -5,7 +5,7 @@ pkgbase=xorg-server pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-xwayland' 'xorg-server-common' 'xorg-server-devel') pkgver=1.17.2 -pkgrel=4 +pkgrel=5 arch=('i686' 'x86_64') license=('custom') url="http://xorg.freedesktop.org" @@ -24,7 +24,8 @@ 0002-dix-hook-up-the-unaccelerated-valuator-masks.patch 0001-systemd-logind-do-not-rely-on-directed-signals.patch 0001-glamor-make-current-in-prepare-paths.patch - 0001-os-make-sure-the-clientsWritable-fd_set-is-initializ.patch) + 0001-os-make-sure-the-clientsWritable-fd_set-is-initializ.patch + 0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch) validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C' 'C383B778255613DFDB409D91DB221A6900000011' 'DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3') @@ -37,7 +38,8 @@ '416a1422eed71efcebb1d893de74e7f27e408323a56c4df003db37f5673b3f96' '3d7edab3a54d647e7d924b29d29f91b50212f308fcb1853a5aacd3181f58276c' '793579adbef979088cadc0fd9ce0c24df0455a6936d3de7a9356df537b7d9a81' - 'efc05c06af2bfdf588ef7a60b44c1d180fb353b1bffdfdf96415d63690b6e394') + 'efc05c06af2bfdf588ef7a60b44c1d180fb353b1bffdfdf96415d63690b6e394' + 'bdcfc54ce0b64d29848efc56383d850778c6eeecf836c10b67ec2eda03a6160b') prepare() { cd "${pkgbase}-${pkgver}" @@ -52,6 +54,9 @@ patch -Np1 -i ../0001-glamor-make-current-in-prepare-paths.patch patch -Np1 -i ../0001-os-make-sure-the-clientsWritable-fd_set-is-initializ.patch + # fix FS#46741, taken from Fedora + patch -Np1 -i ../0001-linux-Do-not-call-FatalError-from-xf86CloseConsole.patch + autoreconf -fvi }