From 96c0cb8c33ce5865bf08604294ed92c4a3b61045 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2019 09:50:46 +0000 Subject: import libX11-1.6.7-2.el7 --- diff --git a/.gitignore b/.gitignore index c14276c..b524cec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libX11-1.6.5.tar.bz2 +SOURCES/libX11-1.6.7.tar.bz2 diff --git a/.libX11.metadata b/.libX11.metadata index 95c59bb..6a78a77 100644 --- a/.libX11.metadata +++ b/.libX11.metadata @@ -1 +1 @@ -c32155467508dfe783f9296ef22ee6ed53cae7df SOURCES/libX11-1.6.5.tar.bz2 +5076f7853713d7db958a05f6fd1c18f7e111a0ad SOURCES/libX11-1.6.7.tar.bz2 diff --git a/SOURCES/0001-_XDefaultIOError-Reformat-to-be-less-ugly.patch b/SOURCES/0001-_XDefaultIOError-Reformat-to-be-less-ugly.patch new file mode 100644 index 0000000..6f5c89f --- /dev/null +++ b/SOURCES/0001-_XDefaultIOError-Reformat-to-be-less-ugly.patch @@ -0,0 +1,56 @@ +From 6d2cde9633b5ee020cb60caea1cf61e090b86dd2 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Fri, 24 Mar 2017 11:07:35 -0400 +Subject: [PATCH 1/2] _XDefaultIOError: Reformat to be less ugly + +Signed-off-by: Adam Jackson +Reviewed-by: Alan Coopersmith +--- + src/XlibInt.c | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +diff --git a/src/XlibInt.c b/src/XlibInt.c +index 73afe024..903e47f3 100644 +--- a/src/XlibInt.c ++++ b/src/XlibInt.c +@@ -1243,24 +1243,24 @@ _X_NORETURN int _XDefaultIOError( + Display *dpy) + { + if (ECHECK(EPIPE)) { +- (void) fprintf (stderr, +- "X connection to %s broken (explicit kill or server shutdown).\r\n", +- DisplayString (dpy)); ++ fprintf (stderr, ++ "X connection to %s broken (explicit kill or server shutdown).\r\n", ++ DisplayString (dpy)); + } else { +- (void) fprintf (stderr, +- "XIO: fatal IO error %d (%s) on X server \"%s\"\r\n", ++ fprintf (stderr, ++ "XIO: fatal IO error %d (%s) on X server \"%s\"\r\n", + #ifdef WIN32 +- WSAGetLastError(), strerror(WSAGetLastError()), ++ WSAGetLastError(), strerror(WSAGetLastError()), + #else +- errno, strerror (errno), ++ errno, strerror (errno), + #endif +- DisplayString (dpy)); +- (void) fprintf (stderr, +- " after %lu requests (%lu known processed) with %d events remaining.\r\n", +- NextRequest(dpy) - 1, LastKnownRequestProcessed(dpy), +- QLength(dpy)); ++ DisplayString (dpy)); ++ fprintf (stderr, ++ " after %lu requests (%lu known processed) with %d events remaining.\r\n", ++ NextRequest(dpy) - 1, LastKnownRequestProcessed(dpy), ++ QLength(dpy)); ++ } + +- } + exit(1); + /*NOTREACHED*/ + } +-- +2.21.0 + diff --git a/SOURCES/0002-_XDefaultIOError-Do-better-at-detecting-explicit-shu.patch b/SOURCES/0002-_XDefaultIOError-Do-better-at-detecting-explicit-shu.patch new file mode 100644 index 0000000..c75c1d8 --- /dev/null +++ b/SOURCES/0002-_XDefaultIOError-Do-better-at-detecting-explicit-shu.patch @@ -0,0 +1,79 @@ +From 5538b3e4ae6dee32c47db9dfc85b07bbe7b90f6c Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Fri, 24 Mar 2017 11:07:36 -0400 +Subject: [PATCH 2/2] _XDefaultIOError: Do better at detecting explicit + shutdown + +Currently, when the X server crashes or a client is disconnected with +XKillClient, you get a somewhat confusing error message from libX11 +along the lines of: + +XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0" + after 98 requests (40 known processed) with 0 events remaining. + +What's happening here is the previous recvmsg has thrown EAGAIN, since +the socket is non-blocking. In this case, check whether the socket has +any more data to read, and if not treat it like EPIPE. + +Signed-off-by: Adam Jackson +--- + src/XlibInt.c | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/src/XlibInt.c b/src/XlibInt.c +index 903e47f3..dd39445b 100644 +--- a/src/XlibInt.c ++++ b/src/XlibInt.c +@@ -50,6 +50,8 @@ from The Open Group. + #ifdef XTHREADS + #include "locking.h" + ++#include ++ + /* these pointers get initialized by XInitThreads */ + LockInfoPtr _Xglobal_lock = NULL; + void (*_XCreateMutex_fn)(LockInfoPtr) = NULL; +@@ -1234,6 +1236,21 @@ _XWireToEvent( + return(True); + } + ++static int ++SocketBytesReadable(Display *dpy) ++{ ++ int bytes = 0, last_error; ++#ifdef WIN32 ++ last_error = WSAGetLastError(); ++ ioctlsocket(ConnectionNumber(dpy), FIONREAD, &bytes); ++ WSASetLastError(last_error); ++#else ++ last_error = errno; ++ ioctl(ConnectionNumber(dpy), FIONREAD, &bytes); ++ errno = last_error; ++#endif ++ return bytes; ++} + + /* + * _XDefaultIOError - Default fatal system error reporting routine. Called +@@ -1242,7 +1259,17 @@ _XWireToEvent( + _X_NORETURN int _XDefaultIOError( + Display *dpy) + { +- if (ECHECK(EPIPE)) { ++ int killed = ECHECK(EPIPE); ++ ++ /* ++ * If the socket was closed on the far end, the final recvmsg in ++ * xcb will have thrown EAGAIN because we're non-blocking. Detect ++ * this to get the more informative error message. ++ */ ++ if (ECHECK(EAGAIN) && SocketBytesReadable(dpy) <= 0) ++ killed = True; ++ ++ if (killed) { + fprintf (stderr, + "X connection to %s broken (explicit kill or server shutdown).\r\n", + DisplayString (dpy)); +-- +2.21.0 + diff --git a/SPECS/libX11.spec b/SPECS/libX11.spec index c116c61..a979050 100644 --- a/SPECS/libX11.spec +++ b/SPECS/libX11.spec @@ -4,7 +4,7 @@ Summary: Core X11 protocol client library Name: libX11 -Version: 1.6.5 +Version: 1.6.7 Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} License: MIT Group: System Environment/Libraries @@ -19,6 +19,8 @@ Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}. %endif Patch2: dont-forward-keycode-0.patch +Patch3: 0001-_XDefaultIOError-Reformat-to-be-less-ugly.patch +Patch4: 0002-_XDefaultIOError-Do-better-at-detecting-explicit-shu.patch BuildRequires: xorg-x11-util-macros >= 1.11 BuildRequires: pkgconfig(xproto) >= 7.0.15 @@ -52,6 +54,8 @@ X.Org X11 libX11 development package %prep %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} %patch2 -p1 -b .dont-forward-keycode-0 +%patch3 -p1 -b .reformat +%patch4 -p1 -b .shutdown %build autoreconf -v --install --force @@ -111,6 +115,15 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/*.5* %changelog +* Tue May 28 2019 Adam Jackson - 1.6.7-2 +- Restore the less-alarming server-disconnect message + +* Mon Apr 15 2019 Adam Jackson - 1.6.7-1 +- libX11 1.6.7 + +* Fri Mar 01 2019 Adam Jackson - 1.6.5-3 +- Make the server-disconnect message less alarming + * Thu Jul 12 2018 Peter Hutterer 1.6.5-2 - Rebuild to pick up new xproto keysyms (#1600147)