diff --git a/.gitignore b/.gitignore index 0c87270..c8f91e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libxcb-1.11.tar.bz2 +SOURCES/libxcb-1.12.tar.bz2 diff --git a/.libxcb.metadata b/.libxcb.metadata index b1f0863..07ebec1 100644 --- a/.libxcb.metadata +++ b/.libxcb.metadata @@ -1 +1 @@ -8343b417d7eeb2a2c6b6c4a87a03a4fd0fc65c46 SOURCES/libxcb-1.11.tar.bz2 +2f03490d1c75c8a3f902f74b717af6501773926a SOURCES/libxcb-1.12.tar.bz2 diff --git a/SOURCES/libxcb-expose-64-bit-sequence-numbers-for-XLib.patch b/SOURCES/libxcb-expose-64-bit-sequence-numbers-for-XLib.patch deleted file mode 100644 index 06420a7..0000000 --- a/SOURCES/libxcb-expose-64-bit-sequence-numbers-for-XLib.patch +++ /dev/null @@ -1,241 +0,0 @@ -From cb621341a62e6d2233db3e337611f6fdd4f675a6 Mon Sep 17 00:00:00 2001 -From: Christian Linhart -Date: Wed, 29 Apr 2015 09:11:37 +0200 -Subject: [PATCH 1/3] expose 64-bit sequence numbers for XLib - -While XCB uses 64-bit sequence number internally, it only exposes -"unsigned int" so that, on 32-bit architecture, Xlib based applications -may see their sequence number wrap which causes the connection to the X -server to be lost. - -Expose 64-bit sequence number from XCB API so that Xlib and others can -use it even on 32-bit environment. - -This implies the following API addition: - - xcb_send_request64() - xcb_discard_reply64() - xcb_wait_for_reply64() - xcb_poll_for_reply64() - -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71338 - -Reviewed-by: Uli Schlachter -Signed-off-by: Christian Linhart -Signed-off-by: Olivier Fourdan ---- - src/xcb.h | 20 ++++++++++++++++++++ - src/xcb_in.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ - src/xcb_out.c | 8 +++++++- - src/xcbext.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 126 insertions(+), 1 deletion(-) - -diff --git a/src/xcb.h b/src/xcb.h -index 23fe74e..86eb1bc 100644 ---- a/src/xcb.h -+++ b/src/xcb.h -@@ -378,6 +378,26 @@ xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t co - */ - void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence); - -+/** -+ * @brief Discards the reply for a request, given by a 64bit sequence number -+ * @param c: The connection to the X server. -+ * @param sequence: 64-bit sequence number as returned by xcb_send_request64(). -+ * -+ * Discards the reply for a request. Additionally, any error generated -+ * by the request is also discarded (unless it was an _unchecked request -+ * and the error has already arrived). -+ * -+ * This function will not block even if the reply is not yet available. -+ * -+ * Note that the sequence really does have to come from xcb_send_request64(); -+ * the cookie sequence number is defined as "unsigned" int and therefore -+ * not 64-bit on all platforms. -+ * This function is not designed to operate on socket-handoff replies. -+ * -+ * Unlike its xcb_discard_reply() counterpart, the given sequence number is not -+ * automatically "widened" to 64-bit. -+ */ -+void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence); - - /* xcb_ext.c */ - -diff --git a/src/xcb_in.c b/src/xcb_in.c -index ad870c1..623a0a8 100644 ---- a/src/xcb_in.c -+++ b/src/xcb_in.c -@@ -523,6 +523,20 @@ void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_ - return ret; - } - -+void *xcb_wait_for_reply64(xcb_connection_t *c, uint64_t request, xcb_generic_error_t **e) -+{ -+ void *ret; -+ if(e) -+ *e = 0; -+ if(c->has_error) -+ return 0; -+ -+ pthread_mutex_lock(&c->iolock); -+ ret = wait_for_reply(c, request, e); -+ pthread_mutex_unlock(&c->iolock); -+ return ret; -+} -+ - int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t reply_size) - { - return (int *) (&((char *) reply)[reply_size]); -@@ -595,6 +609,20 @@ void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence) - pthread_mutex_unlock(&c->iolock); - } - -+void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence) -+{ -+ if(c->has_error) -+ return; -+ -+ /* If an error occurred when issuing the request, fail immediately. */ -+ if(!sequence) -+ return; -+ -+ pthread_mutex_lock(&c->iolock); -+ discard_reply(c, sequence); -+ pthread_mutex_unlock(&c->iolock); -+} -+ - int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error) - { - int ret; -@@ -612,6 +640,23 @@ int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, - return ret; - } - -+int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xcb_generic_error_t **error) -+{ -+ int ret; -+ if(c->has_error) -+ { -+ *reply = 0; -+ if(error) -+ *error = 0; -+ return 1; /* would not block */ -+ } -+ assert(reply != 0); -+ pthread_mutex_lock(&c->iolock); -+ ret = poll_for_reply(c, request, reply, error); -+ pthread_mutex_unlock(&c->iolock); -+ return ret; -+} -+ - xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c) - { - xcb_generic_event_t *ret; -diff --git a/src/xcb_out.c b/src/xcb_out.c -index dc42954..8cc5be8 100644 ---- a/src/xcb_out.c -+++ b/src/xcb_out.c -@@ -177,7 +177,7 @@ uint32_t xcb_get_maximum_request_length(xcb_connection_t *c) - return c->out.maximum_request_length.value; - } - --unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req) -+uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req) - { - uint64_t request; - uint32_t prefix[2]; -@@ -286,6 +286,12 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect - return request; - } - -+/* request number are actually uint64_t internally but keep API compat with unsigned int */ -+unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req) -+{ -+ return xcb_send_request64(c, flags, vector, req); -+} -+ - void - xcb_send_fd(xcb_connection_t *c, int fd) - { -diff --git a/src/xcbext.h b/src/xcbext.h -index 7587513..b2575f7 100644 ---- a/src/xcbext.h -+++ b/src/xcbext.h -@@ -83,6 +83,30 @@ enum xcb_send_request_flags_t { - unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request); - - /** -+ * @brief Send a request to the server, with 64-bit sequence number returned. -+ * @param c: The connection to the X server. -+ * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration. -+ * @param vector: Data to send; must have two iovecs before start for internal use. -+ * @param request: Information about the request to be sent. -+ * @return The request's sequence number on success, 0 otherwise. -+ * -+ * This function sends a new request to the X server. The data of the request is -+ * given as an array of @c iovecs in the @p vector argument. The length of that -+ * array and the neccessary management information are given in the @p request -+ * argument. -+ * -+ * When this function returns, the request might or might not be sent already. -+ * Use xcb_flush() to make sure that it really was sent. -+ * -+ * Please note that this function is not the prefered way for sending requests. -+ * It's better to use the generated wrapper functions. -+ * -+ * Please note that xcb might use index -1 and -2 of the @p vector array internally, -+ * so they must be valid! -+ */ -+uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request); -+ -+/** - * @brief Send a file descriptor to the server in the next call to xcb_send_request. - * @param c: The connection to the X server. - * @param fd: The file descriptor to send. -@@ -162,6 +186,21 @@ int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t re - void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_error_t **e); - - /** -+ * @brief Wait for the reply of a given request, with 64-bit sequence number -+ * @param c: The connection to the X server. -+ * @param request: 64-bit sequence number of the request as returned by xcb_send_request64(). -+ * @param e: Location to store errors in, or NULL. Ignored for unchecked requests. -+ * -+ * Returns the reply to the given request or returns null in the event of -+ * errors. Blocks until the reply or error for the request arrives, or an I/O -+ * error occurs. -+ * -+ * Unlike its xcb_wait_for_reply() counterpart, the given sequence number is not -+ * automatically "widened" to 64-bit. -+ */ -+void *xcb_wait_for_reply64(xcb_connection_t *c, uint64_t request, xcb_generic_error_t **e); -+ -+/** - * @brief Poll for the reply of a given request. - * @param c: The connection to the X server. - * @param request: Sequence number of the request as returned by xcb_send_request(). -@@ -174,6 +213,21 @@ void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_ - int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error); - - /** -+ * @brief Poll for the reply of a given request, with 64-bit sequence number. -+ * @param c: The connection to the X server. -+ * @param request: 64-bit sequence number of the request as returned by xcb_send_request(). -+ * @param reply: Location to store the reply in, must not be NULL. -+ * @param e: Location to store errors in, or NULL. Ignored for unchecked requests. -+ * @return 1 when the reply to the request was returned, else 0. -+ * -+ * Checks if the reply to the given request already received. Does not block. -+ * -+ * Unlike its xcb_poll_for_reply() counterpart, the given sequence number is not -+ * automatically "widened" to 64-bit. -+ */ -+int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xcb_generic_error_t **error); -+ -+/** - * @brief Don't use this, only needed by the generated code. - * @param c: The connection to the X server. - * @param reply: A reply that was received from the server --- -2.4.2 - diff --git a/SPECS/libxcb.spec b/SPECS/libxcb.spec index eb6fafb..b461ac9 100644 --- a/SPECS/libxcb.spec +++ b/SPECS/libxcb.spec @@ -1,14 +1,13 @@ %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} Name: libxcb -Version: 1.11 -Release: 4%{?dist} +Version: 1.12 +Release: 1%{?dist} Summary: A C binding to the X11 protocol License: MIT URL: http://xcb.freedesktop.org/ Source0: http://xcb.freedesktop.org/dist/%{name}-%{version}.tar.bz2 -Patch1: libxcb-expose-64-bit-sequence-numbers-for-XLib.patch # This is stolen straight from the pthread-stubs source: # http://cgit.freedesktop.org/xcb/pthread-stubs/blob/?id=6900598192bacf5fd9a34619b11328f746a5956d @@ -20,8 +19,9 @@ BuildRequires: doxygen BuildRequires: graphviz BuildRequires: libtool BuildRequires: libxslt +BuildRequires: pkgconfig BuildRequires: pkgconfig(xau) >= 0.99.2 -BuildRequires: pkgconfig(xcb-proto) >= 1.11 +BuildRequires: pkgconfig(xcb-proto) >= 1.12 BuildRequires: pkgconfig(xorg-macros) >= 1.18 #BuildRequires: xorg-x11-proto-devel @@ -32,8 +32,7 @@ threading support, and extensibility. %package devel Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: pkgconfig +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing @@ -47,19 +46,26 @@ BuildArch: noarch The %{name}-doc package contains documentation for the %{name} library. %prep -%setup -q -%patch1 -p1 -b .64bit-seqno +%autosetup -p1 %build sed -i 's/pthread-stubs //' configure.ac -autoreconf -v --install +# autoreconf -f needed to expunge rpaths +autoreconf -v -f --install %configure \ --disable-static \ --docdir=%{_pkgdocdir} \ --enable-selinux \ --enable-xkb \ --enable-xinput \ - --disable-xprint + --enable-xevie \ + --disable-xprint \ + --disable-silent-rules + +# Remove rpath from libtool (extra insurance if autoreconf is ever dropped) +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + make %{?_smp_mflags} %install @@ -112,8 +118,31 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %{_pkgdocdir} %changelog -* Mon Jun 08 2015 Olivier Fourdan 1.11-4 -- Add 64bit sequence number API for Xlib (#1206245) +* Wed May 18 2016 Adam Jackson - 1.12-1 +- libxcb 1.12 + +* Thu Feb 04 2016 Fedora Release Engineering - 1.11.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Sep 21 2015 Adam Jackson 1.11.1-1 +- libxcb 1.11.1 + +* Thu Jun 25 2015 Rex Dieter 1.11-8 +- followup fix for thread deadlocks (#1193742, fdo#84252) + +* Wed Jun 17 2015 Fedora Release Engineering - 1.11-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Jun 12 2015 Rex Dieter 1.11-6 +- pull in (partial?) upstream fix for deadlocks (#1193742, fdo#84252) + +* Wed May 20 2015 Rex Dieter - 1.11-5 +- fix rpath harder (#1136546) +- %%build: --disable-silent-rules + +* Tue May 19 2015 Rex Dieter - 1.11-4 +- fix fpath (use autoreconf -f) +- -devel: tighten deps via %%{?_isa}, drop Requires: pkgconfig (add explicit BR: pkgconfig) * Thu Jan 08 2015 Simone Caronni - 1.11-3 - Clean up SPEC file, fix rpmlint warnings.