From a844b35e50420aaf98280136cf8e3e1fdf71804525ec737f1ad1b737bc7d3326 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Sat, 26 Aug 2023 15:33:46 +0000 Subject: [PATCH] - Update to version 1.16 * gitlab CI: add a basic build test * configure.ac: drop dependency `pthread-stubs` on Solaris * configure.ac: Remove obsolete AC_HEADER_STDC * Raise minimum required version of Python from 2.6 to 3.0 * Fix windows build. * Fix indentation. * Fix a compiler warning * Fix handling of documented enum parameters * Allow full paths to sockets on non-macOS * DISPLAY starting with / or unix: is always a socket path * Add tests for unix socket parsing * autogen.sh: use quoted string variables * c_client: Fix crash in xcb_randr_set_monitor * configure.ac: drop `pthread-stubs` dependency on DragonFly and FreeBSD * xcb_conn: Add a check for NULL to silence a UBSan runtime error * configure.ac: Require xcb-proto >= 1.16.0 * Fix xcb_connect() call with a custom xcb_auth_info_t * autogen: add default patch prefix * Build DOUBLE-BUFFER extension. * Require xcb-proto >= 1.15.1, which has Dbe * configure.ac: drop dependency `pthread-stubs` on macOS * autogen.sh: use exec instead of waiting for configure to finish * Improve tutorial example - adjusted bug-262309_xcb-xauthlocalhostname.diff, n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch - added libxcb-dbe0 subpackage for libxcb-dbe.so.0* OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libxcb?expand=0&rev=67 --- bug-262309_xcb-xauthlocalhostname.diff | 20 ++++-- libxcb-1.15.tar.xz | 3 - libxcb-1.15.tar.xz.sig | Bin 215 -> 0 bytes libxcb-1.16.tar.xz | 3 + libxcb-1.16.tar.xz.sig | Bin 0 -> 215 bytes libxcb.changes | 31 ++++++++ libxcb.spec | 16 ++++- ...-fails-retry-with-XAUTHLOCALHOSTNAME.patch | 68 +++++++++--------- 8 files changed, 99 insertions(+), 42 deletions(-) delete mode 100644 libxcb-1.15.tar.xz delete mode 100644 libxcb-1.15.tar.xz.sig create mode 100644 libxcb-1.16.tar.xz create mode 100644 libxcb-1.16.tar.xz.sig diff --git a/bug-262309_xcb-xauthlocalhostname.diff b/bug-262309_xcb-xauthlocalhostname.diff index ffd3eb7..54752e7 100644 --- a/bug-262309_xcb-xauthlocalhostname.diff +++ b/bug-262309_xcb-xauthlocalhostname.diff @@ -1,16 +1,24 @@ ---- src/xcb_auth.c.orig 2009-05-29 17:48:24.000000000 +0200 -+++ src/xcb_auth.c 2009-05-29 17:56:01.000000000 +0200 -@@ -119,2 +119,3 @@ static Xauth *get_authptr(struct sockadd +Index: src/xcb_auth.c +=================================================================== +--- src/xcb_auth.c.orig ++++ src/xcb_auth.c +@@ -118,6 +118,7 @@ static Xauth *get_authptr(struct sockadd + char hostnamebuf[256]; /* big enough for max hostname */ + char dispbuf[40]; /* big enough to hold more than 2^64 base 10 */ int dispbuflen; + Xauth *authptr = NULL; -@@ -163,6 +163,16 @@ static Xauth *get_authptr(struct sockadd + family = FamilyLocal; /* 256 */ + switch(sockname->sa_family) +@@ -162,10 +163,20 @@ static Xauth *get_authptr(struct sockadd + addrlen = strlen(addr); + } - return XauGetBestAuthByAddr (family, + authptr = XauGetBestAuthByAddr (family, (unsigned short) addrlen, addr, (unsigned short) dispbuflen, dispbuf, - N_AUTH_PROTOS, authnames, authnameslen); + N_AUTH_PROTOS, (char **)authnames, authnameslen); + // && !phostname + if ((!authptr || !authptr->data_length) && family == FamilyLocal) { + if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) { @@ -22,3 +30,5 @@ + } + return authptr; } + + #ifdef HASXDMAUTH diff --git a/libxcb-1.15.tar.xz b/libxcb-1.15.tar.xz deleted file mode 100644 index 4da335d..0000000 --- a/libxcb-1.15.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc38744f817cf6814c847e2df37fcb8997357d72fa4bcbc228ae0fe47219a059 -size 446492 diff --git a/libxcb-1.15.tar.xz.sig b/libxcb-1.15.tar.xz.sig deleted file mode 100644 index 8a5db3596c752612e911ef6bb2427a1298b9d5fde202f5a0ceb35b2d7350412f..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 215 zcmeCU%EBPV#ZW7z$P%|+k!4ofj-@`QrGKq?ty#h|%Wpa>Q&Qn7ws?^S1|ZO5(8w$< zE=?`cO)DsJ$jdKDEXmBzE7r>|NX;uqFVIWNOe@LA$S*2R%}vbH%S$aWb#-(zGBhx; zbhI#YvT!stadvhxbaHcabar(zvNSg_aJFOtZwvCpbC+u^% zW7(GZD=4$>_^dQ;ui!Zm442#Y>%386_`~&(!!=jh*p;Us_0-edQQ_5Zaw0MyQ1|ZO5(8w$< zE=?`cO)DsJ$jdKDEXmBzE7r>|NX;uqFVIWNOe@LA$S*2R%}vbH%S$aWb#-(zGBhx; zbhI#YvT!stadvhxbaHcabar(zvNSg_aJF + +- Update to version 1.16 + * gitlab CI: add a basic build test + * configure.ac: drop dependency `pthread-stubs` on Solaris + * configure.ac: Remove obsolete AC_HEADER_STDC + * Raise minimum required version of Python from 2.6 to 3.0 + * Fix windows build. + * Fix indentation. + * Fix a compiler warning + * Fix handling of documented enum parameters + * Allow full paths to sockets on non-macOS + * DISPLAY starting with / or unix: is always a socket path + * Add tests for unix socket parsing + * autogen.sh: use quoted string variables + * c_client: Fix crash in xcb_randr_set_monitor + * configure.ac: drop `pthread-stubs` dependency on DragonFly and FreeBSD + * xcb_conn: Add a check for NULL to silence a UBSan runtime error + * configure.ac: Require xcb-proto >= 1.16.0 + * Fix xcb_connect() call with a custom xcb_auth_info_t + * autogen: add default patch prefix + * Build DOUBLE-BUFFER extension. + * Require xcb-proto >= 1.15.1, which has Dbe + * configure.ac: drop dependency `pthread-stubs` on macOS + * autogen.sh: use exec instead of waiting for configure to finish + * Improve tutorial example +- adjusted bug-262309_xcb-xauthlocalhostname.diff, + n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch +- added libxcb-dbe0 subpackage for libxcb-dbe.so.0* + ------------------------------------------------------------------- Thu Jan 5 20:19:45 UTC 2023 - Dirk Müller diff --git a/libxcb.spec b/libxcb.spec index 864923b..cc390bb 100644 --- a/libxcb.spec +++ b/libxcb.spec @@ -23,7 +23,7 @@ %bcond_without python2 %endif Name: libxcb -Version: 1.15 +Version: 1.16 Release: 0 Summary: X11 core protocol C library License: MIT @@ -101,6 +101,15 @@ protocol, improved threading support, and extensibility. The X Damage Extension allows applications to track modified regions of drawables. +%package -n libxcb-dbe0 +Summary: X11 Dbe Extension C library +Group: System/Libraries + +%description -n libxcb-dbe0 +The X protocol C-language Binding (XCB) is a replacement for Xlib +featuring a small footprint, latency hiding, direct access to the +protocol, improved threading support, and extensibility. + %package -n libxcb-dpms0 Summary: X11 DPMS Extension C library Group: System/Libraries @@ -412,6 +421,8 @@ find %{buildroot} -type f -name "*.la" -delete -print %postun -n libxcb-composite0 -p /sbin/ldconfig %post -n libxcb-damage0 -p /sbin/ldconfig %postun -n libxcb-damage0 -p /sbin/ldconfig +%post -n libxcb-dbe0 -p /sbin/ldconfig +%postun -n libxcb-dbe0 -p /sbin/ldconfig %post -n libxcb-dpms0 -p /sbin/ldconfig %postun -n libxcb-dpms0 -p /sbin/ldconfig %post -n libxcb-dri2-0 -p /sbin/ldconfig @@ -464,6 +475,9 @@ find %{buildroot} -type f -name "*.la" -delete -print %files -n libxcb-damage0 %{_libdir}/libxcb-damage.so.0* +%files -n libxcb-dbe0 +%{_libdir}/libxcb-dbe.so.0* + %files -n libxcb-dpms0 %{_libdir}/libxcb-dpms.so.0* diff --git a/n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch b/n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch index f1f7774..457fa2a 100644 --- a/n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch +++ b/n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch @@ -11,11 +11,11 @@ Signed-off-by: Egbert Eich src/xcb_auth.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) -Index: libxcb-1.12/src/xcb_auth.c +Index: libxcb-1.16/src/xcb_auth.c =================================================================== ---- libxcb-1.12.orig/src/xcb_auth.c -+++ libxcb-1.12/src/xcb_auth.c -@@ -109,7 +109,7 @@ static int authname_match(enum auth_prot +--- libxcb-1.16.orig/src/xcb_auth.c ++++ libxcb-1.16/src/xcb_auth.c +@@ -110,7 +110,7 @@ static int authname_match(enum auth_prot #define SIN6_ADDR(s) (&((struct sockaddr_in6 *)s)->sin6_addr) @@ -24,7 +24,7 @@ Index: libxcb-1.12/src/xcb_auth.c { char *addr = 0; int addrlen = 0; -@@ -119,6 +119,8 @@ static Xauth *get_authptr(struct sockadd +@@ -120,6 +120,8 @@ static Xauth *get_authptr(struct sockadd int dispbuflen; Xauth *authptr = NULL; @@ -33,38 +33,40 @@ Index: libxcb-1.12/src/xcb_auth.c family = FamilyLocal; /* 256 */ switch(sockname->sa_family) { -@@ -161,18 +163,23 @@ static Xauth *get_authptr(struct sockadd +@@ -163,17 +165,22 @@ static Xauth *get_authptr(struct sockadd addrlen = strlen(addr); } - authptr = XauGetBestAuthByAddr (family, - (unsigned short) addrlen, addr, - (unsigned short) dispbuflen, dispbuf, -- N_AUTH_PROTOS, authnames, authnameslen); +- N_AUTH_PROTOS, (char **)authnames, authnameslen); - // && !phostname - if ((!authptr || !authptr->data_length) && family == FamilyLocal) { - if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) { + if (*stage == 0) { + authptr = XauGetBestAuthByAddr (family, -+ (unsigned short) addrlen, addr, -+ (unsigned short) dispbuflen, dispbuf, -+ N_AUTH_PROTOS, authnames, authnameslen); ++ (unsigned short) addrlen, addr, ++ (unsigned short) dispbuflen, dispbuf, ++ N_AUTH_PROTOS, (char **)authnames, authnameslen); + *stage = 1; + return authptr; + } + if (*stage == 1) { + if ((!authptr || !authptr->data_length) && family == FamilyLocal && (addr = getenv("XAUTHLOCALHOSTNAME"))) { authptr = XauGetBestAuthByAddr (family, - (unsigned short) strlen(addr), addr, - (unsigned short) dispbuflen, dispbuf, - N_AUTH_PROTOS, authnames, authnameslen); +- (unsigned short) strlen(addr), addr, +- (unsigned short) dispbuflen, dispbuf, +- N_AUTH_PROTOS, authnames, authnameslen); ++ (unsigned short) strlen(addr), addr, ++ (unsigned short) dispbuflen, dispbuf, ++ N_AUTH_PROTOS, authnames, authnameslen); ++ *stage = 2; ++ return authptr; } -+ *stage = 2; -+ return authptr; } return authptr; - } -@@ -320,7 +327,7 @@ static struct sockaddr *get_peer_sock_na +@@ -329,7 +336,7 @@ static struct sockaddr *get_peer_sock_na return NULL; } @@ -73,7 +75,7 @@ Index: libxcb-1.12/src/xcb_auth.c { /* code adapted from Xlib/ConnDis.c, xtrans/Xtranssocket.c, xtrans/Xtransutils.c */ -@@ -345,7 +352,7 @@ int _xcb_get_auth_info(int fd, xcb_auth_ +@@ -354,7 +361,7 @@ int _xcb_get_auth_info(int fd, xcb_auth_ gotsockname = 1; } @@ -82,11 +84,11 @@ Index: libxcb-1.12/src/xcb_auth.c if (authptr == 0) { free(sockname); -Index: libxcb-1.12/src/xcbint.h +Index: libxcb-1.16/src/xcbint.h =================================================================== ---- libxcb-1.12.orig/src/xcbint.h -+++ libxcb-1.12/src/xcbint.h -@@ -219,7 +219,7 @@ int _xcb_conn_wait(xcb_connection_t *c, +--- libxcb-1.16.orig/src/xcbint.h ++++ libxcb-1.16/src/xcbint.h +@@ -232,7 +232,7 @@ int _xcb_conn_wait(xcb_connection_t *c, /* xcb_auth.c */ @@ -95,11 +97,11 @@ Index: libxcb-1.12/src/xcbint.h #ifdef GCC_HAS_VISIBILITY #pragma GCC visibility pop -Index: libxcb-1.12/src/xcb_util.c +Index: libxcb-1.16/src/xcb_util.c =================================================================== ---- libxcb-1.12.orig/src/xcb_util.c -+++ libxcb-1.12/src/xcb_util.c -@@ -494,6 +494,7 @@ xcb_connection_t *xcb_connect_to_display +--- libxcb-1.16.orig/src/xcb_util.c ++++ libxcb-1.16/src/xcb_util.c +@@ -514,6 +514,7 @@ xcb_connection_t *xcb_connect_to_display char *protocol = NULL; xcb_auth_info_t ourauth; xcb_connection_t *c; @@ -107,7 +109,7 @@ Index: libxcb-1.12/src/xcb_util.c int parsed = _xcb_parse_display(displayname, &host, &protocol, &display, screenp); -@@ -510,6 +511,7 @@ xcb_connection_t *xcb_connect_to_display +@@ -530,6 +531,7 @@ xcb_connection_t *xcb_connect_to_display } #endif @@ -115,16 +117,16 @@ Index: libxcb-1.12/src/xcb_util.c fd = _xcb_open(host, protocol, display); if(fd == -1) { -@@ -525,7 +527,7 @@ xcb_connection_t *xcb_connect_to_display - goto out; +@@ -543,7 +545,7 @@ xcb_connection_t *xcb_connect_to_display + if(auth) { + c = xcb_connect_to_fd(fd, auth); } - -- if(_xcb_get_auth_info(fd, &ourauth, display)) -+ if(_xcb_get_auth_info(fd, &ourauth, display, &stage)) +- else if(_xcb_get_auth_info(fd, &ourauth, display)) ++ else if(_xcb_get_auth_info(fd, &ourauth, display, &stage)) { c = xcb_connect_to_fd(fd, &ourauth); free(ourauth.name); -@@ -534,8 +536,11 @@ xcb_connection_t *xcb_connect_to_display +@@ -552,8 +554,11 @@ xcb_connection_t *xcb_connect_to_display else c = xcb_connect_to_fd(fd, 0);