diff --git a/.gitignore b/.gitignore index 1695703..6208dd2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rest-0.7.92.tar.xz +SOURCES/rest-0.8.0.tar.xz diff --git a/.rest.metadata b/.rest.metadata index 6b52767..62a492d 100644 --- a/.rest.metadata +++ b/.rest.metadata @@ -1 +1 @@ -e8cb955148745e75313766a6b5fb7a0da6bf42e8 SOURCES/rest-0.7.92.tar.xz +87d4cbed92c5702ea085ebe157b271b4023d0b04 SOURCES/rest-0.8.0.tar.xz diff --git a/SOURCES/0001-oauth-Add-missing-include.patch b/SOURCES/0001-oauth-Add-missing-include.patch deleted file mode 100644 index cf41fed..0000000 --- a/SOURCES/0001-oauth-Add-missing-include.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b50ace7738ea03817acdad87fb2b338a86018329 Mon Sep 17 00:00:00 2001 -From: Christophe Fergeau -Date: Wed, 3 Sep 2014 11:31:49 +0200 -Subject: [PATCH] oauth: Add missing include - -This fixes a compilation warning about a missing prototype. ---- - rest/oauth-proxy-call.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/rest/oauth-proxy-call.c b/rest/oauth-proxy-call.c -index dce2c66..ab77b1a 100644 ---- a/rest/oauth-proxy-call.c -+++ b/rest/oauth-proxy-call.c -@@ -25,6 +25,7 @@ - #include - #include "oauth-proxy-call.h" - #include "oauth-proxy-private.h" -+#include "rest-proxy-call-private.h" - #include "sha1.h" - - G_DEFINE_TYPE (OAuthProxyCall, oauth_proxy_call, REST_TYPE_PROXY_CALL) --- -2.1.0 - diff --git a/SOURCES/0001-rest-proxy-auth-Add-rest_proxy_auth_cancel-for-cance.patch b/SOURCES/0001-rest-proxy-auth-Add-rest_proxy_auth_cancel-for-cance.patch deleted file mode 100644 index 463d6ed..0000000 --- a/SOURCES/0001-rest-proxy-auth-Add-rest_proxy_auth_cancel-for-cance.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 18cf9a2090bb846c92d19d416cd56080eb20f7bd Mon Sep 17 00:00:00 2001 -From: Pavel Grunt -Date: Fri, 20 Mar 2015 16:22:11 +0100 -Subject: [PATCH] rest-proxy-auth: Add rest_proxy_auth_cancel for cancelling - authentication - -It can be helpful when handling the "authenticate" signal to allow -to cancel the authentication instead of failing with an error. ---- - rest/rest-proxy-auth.c | 17 +++++++++++++++++ - rest/rest-proxy-auth.h | 1 + - 2 files changed, 18 insertions(+) - -diff --git a/rest/rest-proxy-auth.c b/rest/rest-proxy-auth.c -index 0cb6d7c77695..79f21e0101aa 100644 ---- a/rest/rest-proxy-auth.c -+++ b/rest/rest-proxy-auth.c -@@ -135,6 +135,23 @@ rest_proxy_auth_unpause (RestProxyAuth *auth) - auth->priv->paused = FALSE; - } - -+/** -+ * rest_proxy_auth_cancel: -+ * @auth: a #RestProxyAuth -+ * -+ * Cancel the authentication process -+ * by cancelling the associated #SoupMessage. -+ * It results in returning #GError REST_PROXY_ERROR_CANCELLED -+ * to the function that requested the authentication. -+ */ -+void -+rest_proxy_auth_cancel (RestProxyAuth *auth) -+{ -+ g_return_if_fail (REST_IS_PROXY_AUTH (auth)); -+ -+ soup_session_cancel_message (auth->priv->session, auth->priv->message, SOUP_STATUS_CANCELLED); -+} -+ - G_GNUC_INTERNAL gboolean rest_proxy_auth_is_paused (RestProxyAuth *auth) - { - g_return_val_if_fail (REST_IS_PROXY_AUTH (auth), FALSE); -diff --git a/rest/rest-proxy-auth.h b/rest/rest-proxy-auth.h -index 6358e1a16b35..816aaa9007b7 100644 ---- a/rest/rest-proxy-auth.h -+++ b/rest/rest-proxy-auth.h -@@ -66,6 +66,7 @@ GType rest_proxy_auth_get_type (void); - - void rest_proxy_auth_pause (RestProxyAuth *auth); - void rest_proxy_auth_unpause (RestProxyAuth *auth); -+void rest_proxy_auth_cancel (RestProxyAuth *auth); - - G_END_DECLS - --- -2.5.0 - diff --git a/SOURCES/0001-tests-Avoid-race-condition-in-threaded-tests.patch b/SOURCES/0001-tests-Avoid-race-condition-in-threaded-tests.patch deleted file mode 100644 index f6e0aed..0000000 --- a/SOURCES/0001-tests-Avoid-race-condition-in-threaded-tests.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 08f1fc35e3c77aecedacf08aa510e82c91ac7f2a Mon Sep 17 00:00:00 2001 -From: Christophe Fergeau -Date: Tue, 17 Mar 2015 15:53:36 +0100 -Subject: [PATCH] tests: Avoid race condition in threaded tests - -Calling soup_server_run in a new thread, and calling -soup_server_get_port() on the same SoupServer instance -right after creating the thread. -With recent libsoup, this sometimes causes a crash when the 2 threads -try to call soup_server_ensure_listening() at the same time. -Moving the call to soup_server_get_port() before the thread creation -avoids this race condition. ---- - tests/custom-serialize.c | 4 ++-- - tests/threaded.c | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tests/custom-serialize.c b/tests/custom-serialize.c -index f683941d297a..c4ca5413cad1 100644 ---- a/tests/custom-serialize.c -+++ b/tests/custom-serialize.c -@@ -123,10 +123,10 @@ main (int argc, char **argv) - - server = soup_server_new (NULL); - soup_server_add_handler (server, NULL, server_callback, NULL, NULL); -- g_thread_create ((GThreadFunc)soup_server_run, server, FALSE, NULL); -- - url = g_strdup_printf ("http://127.0.0.1:%d/", soup_server_get_port (server)); - -+ g_thread_create ((GThreadFunc)soup_server_run, server, FALSE, NULL); -+ - proxy = rest_proxy_new (url, FALSE); - call = g_object_new (REST_TYPE_CUSTOM_PROXY_CALL, "proxy", proxy, NULL); - -diff --git a/tests/threaded.c b/tests/threaded.c -index ecb074fd76c7..abb11e7a42d3 100644 ---- a/tests/threaded.c -+++ b/tests/threaded.c -@@ -90,10 +90,10 @@ main (int argc, char **argv) - - server = soup_server_new (NULL); - soup_server_add_handler (server, NULL, server_callback, NULL, NULL); -- g_thread_create ((GThreadFunc)soup_server_run, server, FALSE, NULL); -- - url = g_strdup_printf ("http://127.0.0.1:%d/", soup_server_get_port (server)); - -+ g_thread_create ((GThreadFunc)soup_server_run, server, FALSE, NULL); -+ - for (i = 0; i < G_N_ELEMENTS (threads); i++) { - threads[i] = g_thread_create (func, url, TRUE, NULL); - if (verbose) --- -2.5.0 - diff --git a/SOURCES/0001-tests-proxy-continuous-Server-chunks-can-be-differen.patch b/SOURCES/0001-tests-proxy-continuous-Server-chunks-can-be-differen.patch deleted file mode 100644 index a05d55f..0000000 --- a/SOURCES/0001-tests-proxy-continuous-Server-chunks-can-be-differen.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 5af733210438aef493008b92ef5857a27e952596 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Wed, 16 Sep 2015 18:40:59 +0200 -Subject: [PATCH] tests/proxy-continuous: Server chunks can be different from - client ones - -https://bugzilla.gnome.org/show_bug.cgi?id=755124 ---- - tests/proxy-continuous.c | 52 ++++++++++++++++++++++-------------------------- - 1 file changed, 24 insertions(+), 28 deletions(-) - -diff --git a/tests/proxy-continuous.c b/tests/proxy-continuous.c -index 9395cd28cc8f..5be64fa696b5 100644 ---- a/tests/proxy-continuous.c -+++ b/tests/proxy-continuous.c -@@ -32,26 +32,31 @@ static int errors = 0; - static GMainLoop *loop = NULL; - - #define NUM_CHUNKS 20 --static int server_count = 0; --static gint client_count = 0; -+#define SIZE_CHUNK 4 -+static guint8 server_count = 0; -+static guint8 client_count = 0; - static SoupServer *server; - - static gboolean - send_chunks (gpointer user_data) - { - SoupMessage *msg = SOUP_MESSAGE (user_data); -- char *s; - SoupBuffer *buf; -+ guint i; -+ guint8 data[SIZE_CHUNK]; - -- s = g_strdup_printf ("%d %d %d %d\n", -- server_count, server_count, -- server_count, server_count); -- buf = soup_buffer_new (SOUP_MEMORY_TAKE, s, strlen (s)); -+ for (i = 0; i < SIZE_CHUNK; i++) -+ { -+ data[i] = server_count; -+ server_count++; -+ } -+ -+ buf = soup_buffer_new (SOUP_MEMORY_COPY, data, SIZE_CHUNK); - - soup_message_body_append_buffer (msg->response_body, buf); - soup_server_unpause_message (server, msg); - -- if (++server_count == NUM_CHUNKS) -+ if (server_count == NUM_CHUNKS * SIZE_CHUNK) - { - soup_message_body_complete (msg->response_body); - return FALSE; -@@ -71,7 +76,6 @@ server_callback (SoupServer *server, SoupMessage *msg, - SOUP_ENCODING_CHUNKED); - soup_server_pause_message (server, msg); - -- server_count = 1; - g_idle_add (send_chunks, msg); - } - } -@@ -84,7 +88,7 @@ _call_continuous_cb (RestProxyCall *call, - GObject *weak_object, - gpointer userdata) - { -- gint a = 0, b = 0, c = 0, d = 0; -+ guint i; - - if (error) - { -@@ -102,7 +106,7 @@ _call_continuous_cb (RestProxyCall *call, - - if (buf == NULL && len == 0) - { -- if (client_count != NUM_CHUNKS) -+ if (client_count < NUM_CHUNKS * SIZE_CHUNK) - { - g_printerr ("stream ended prematurely\n"); - errors++; -@@ -110,25 +114,19 @@ _call_continuous_cb (RestProxyCall *call, - goto out; - } - -- if (sscanf (buf, "%d %d %d %d\n", &a, &b, &c, &d) != 4) -+ for (i = 0; i < len; i++) - { -- g_printerr ("stream data not formatted as expected\n"); -- errors++; -- goto out; -- } -+ if (buf[i] != client_count) -+ { -+ g_printerr ("stream data not as expected (got %d, expected %d)\n", -+ (gint) buf[i], client_count); -+ errors++; -+ goto out; -+ } - -- if (a != client_count || -- b != client_count || -- c != client_count || -- d != client_count) -- { -- g_printerr ("stream data not as expected (got %d %d %d %d, expected %d)\n", -- a, b, c, d, client_count); -- errors++; -- goto out; -+ client_count++; - } - -- client_count++; - return; - out: - g_main_loop_quit (loop); -@@ -141,8 +139,6 @@ stream_test (RestProxy *proxy) - RestProxyCall *call; - GError *error; - -- client_count = 1; -- - call = rest_proxy_new_call (proxy); - rest_proxy_call_set_function (call, "stream"); - --- -2.1.0 - diff --git a/SOURCES/rest-fixdso.patch b/SOURCES/rest-fixdso.patch deleted file mode 100644 index b938c56..0000000 --- a/SOURCES/rest-fixdso.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- rest-0.7.6/docs/reference/rest/Makefile.in.orig 2011-02-22 16:31:17.687229767 +0000 -+++ rest-0.7.6/docs/reference/rest/Makefile.in 2011-02-22 16:31:26.528229982 +0000 -@@ -117,7 +117,7 @@ - INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ - INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ - LD = @LD@ --LDFLAGS = @LDFLAGS@ -+LDFLAGS = @LDFLAGS@ -lgobject-2.0 -lglib-2.0 - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ - LIBTOOL = @LIBTOOL@ diff --git a/SPECS/rest.spec b/SPECS/rest.spec index 80fafbf..410ad31 100644 --- a/SPECS/rest.spec +++ b/SPECS/rest.spec @@ -1,28 +1,17 @@ Name: rest -Version: 0.7.92 -Release: 5%{?dist} +Version: 0.8.0 +Release: 1%{?dist} Summary: A library for access to RESTful web services -Group: System Environment/Libraries License: LGPLv2 URL: http://www.gnome.org -Source0: http://download.gnome.org/sources/%{name}/0.7/%{name}-%{version}.tar.xz -Patch0: rest-fixdso.patch -Patch1: 0001-oauth-Add-missing-include.patch -Patch2: 0001-tests-proxy-continuous-Server-chunks-can-be-differen.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1271197 -Patch3: 0001-tests-Avoid-race-condition-in-threaded-tests.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1331101 -Patch4: 0001-rest-proxy-auth-Add-rest_proxy_auth_cancel-for-cance.patch +Source0: http://download.gnome.org/sources/%{name}/0.8/%{name}-%{version}.tar.xz BuildRequires: glib2-devel BuildRequires: gobject-introspection-devel BuildRequires: libsoup-devel BuildRequires: libxml2-devel BuildRequires: gtk-doc -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool %description This library was designed to make it easier to access web services that @@ -35,23 +24,15 @@ this library is attempting to support. %package devel Summary: Development package for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: pkgconfig +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Files for development with %{name}. %prep %setup -q -%patch0 -p1 -b .fixdso -%patch1 -p1 -b .missinginclude -%patch2 -p1 -b .proxycontinuous -%patch3 -p1 -b .threadedtests -%patch4 -p1 -b .cancellingauth %build -autoreconf -vif %configure --disable-static --enable-gtk-doc --enable-introspection=yes make %{?_smp_mflags} V=1 @@ -60,15 +41,15 @@ make %{?_smp_mflags} V=1 make install DESTDIR=%{buildroot} INSTALL='install -p' #Remove libtool archives. -find %{buildroot} -name '*.la' -exec rm -f {} ';' +find %{buildroot} -type f -name "*.la" -delete %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -%defattr(-,root,root,-) -%doc AUTHORS COPYING README +%license COPYING +%doc AUTHORS README %{_libdir}/librest-0.7.so.0 %{_libdir}/librest-0.7.so.0.0.0 %{_libdir}/librest-extras-0.7.so.0 @@ -77,7 +58,6 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_libdir}/girepository-1.0/RestExtras-0.7.typelib %files devel -%defattr(-,root,root,-) %{_includedir}/rest-0.7 %{_libdir}/pkgconfig/rest* %{_libdir}/librest-0.7.so @@ -87,6 +67,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_datadir}/gir-1.0/RestExtras-0.7.gir %changelog +* Wed Sep 28 2016 Kalev Lember - 0.8.0-1 +- Update to 0.8.0 +- Resolves: #1387040 + * Mon May 02 2016 Debarshi Ray - 0.7.92-5 - Add rest_proxy_auth_cancel for cancelling authentication Resolves: #1331101