From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 36A0D138010 for ; Fri, 24 Aug 2012 21:27:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B8DFAE0512; Fri, 24 Aug 2012 21:27:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5EC87E0512 for ; Fri, 24 Aug 2012 21:27:40 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2D24133D80F for ; Fri, 24 Aug 2012 21:27:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 9CA6FE543D for ; Fri, 24 Aug 2012 21:27:37 +0000 (UTC) From: "Priit Laes" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Priit Laes" Message-ID: <1345843214.7a8450be3ab30d820193277ca68768c4e863abc1.plaes@gentoo> Subject: [gentoo-commits] proj/gnome:master commit in: net-libs/libsoup/, net-libs/libsoup/files/, net-libs/libsoup-gnome/, ... X-VCS-Repository: proj/gnome X-VCS-Files: net-libs/libsoup-gnome/files/libsoup-gnome-system-lib.patch net-libs/libsoup-gnome/libsoup-gnome-2.39.5.ebuild net-libs/libsoup-gnome/libsoup-gnome-2.39.90.ebuild net-libs/libsoup/files/libsoup-2.39.5-fix-public-tlds.patch net-libs/libsoup/files/libsoup-2.39.90-avoid-double-free.patch net-libs/libsoup/libsoup-2.39.5.ebuild net-libs/libsoup/libsoup-2.39.90.ebuild X-VCS-Directories: net-libs/libsoup/ net-libs/libsoup/files/ net-libs/libsoup-gnome/ net-libs/libsoup-gnome/files/ X-VCS-Committer: plaes X-VCS-Committer-Name: Priit Laes X-VCS-Revision: 7a8450be3ab30d820193277ca68768c4e863abc1 X-VCS-Branch: master Date: Fri, 24 Aug 2012 21:27:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 014945bc-3fa8-4f5c-a926-9b50b59b3b9b X-Archives-Hash: 7fe1d7eb81a9954bf5058aa8cce5cbb1 commit: 7a8450be3ab30d820193277ca68768c4e863abc1 Author: Priit Laes plaes org> AuthorDate: Fri Aug 24 21:20:14 2012 +0000 Commit: Priit Laes plaes org> CommitDate: Fri Aug 24 21:20:14 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=7a8450be net-libs/libsoup{,-gnome}: 2.39.5 → 2.39.90 --- .../files/libsoup-gnome-system-lib.patch | 28 ++-- ...-2.39.5.ebuild => libsoup-gnome-2.39.90.ebuild} | 0 .../files/libsoup-2.39.5-fix-public-tlds.patch | 168 -------------------- .../files/libsoup-2.39.90-avoid-double-free.patch | 30 ++++ ...ibsoup-2.39.5.ebuild => libsoup-2.39.90.ebuild} | 2 +- 5 files changed, 45 insertions(+), 183 deletions(-) diff --git a/net-libs/libsoup-gnome/files/libsoup-gnome-system-lib.patch b/net-libs/libsoup-gnome/files/libsoup-gnome-system-lib.patch index 5b24c58..d236e0c 100644 --- a/net-libs/libsoup-gnome/files/libsoup-gnome-system-lib.patch +++ b/net-libs/libsoup-gnome/files/libsoup-gnome-system-lib.patch @@ -1,4 +1,4 @@ -From 75d7a77705cd567ea1d2d95b6f99f1e0cabdb8bb Mon Sep 17 00:00:00 2001 +From 41200f48909dbf48fd2c96f305b71797634aca3e Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Tue, 20 Dec 2011 15:42:44 +0200 Subject: [PATCH] Split support for libsoup-gnome @@ -7,9 +7,9 @@ https://bugzilla.gnome.org/show_bug.cgi?id=595065 Original patch by Romain Perier. --- - Makefile.am | 12 ++++++++- - configure.ac | 35 ++++++++++++++++++--------- - libsoup/Makefile.am | 63 +++++++++++++++++++++++++++++++++++++------------- + Makefile.am | 12 ++++++++-- + configure.ac | 35 +++++++++++++++++++---------- + libsoup/Makefile.am | 63 ++++++++++++++++++++++++++++++++++++++--------------- 3 files changed, 79 insertions(+), 31 deletions(-) diff --git a/Makefile.am b/Makefile.am @@ -43,7 +43,7 @@ index 18bf80a..046f945 100644 if BUILD_LIBSOUP_GNOME pkgconfig_DATA += libsoup-gnome-2.4.pc diff --git a/configure.ac b/configure.ac -index 1057f63..648afc7 100644 +index 95410de..1f00bdd 100644 --- a/configure.ac +++ b/configure.ac @@ -71,20 +71,27 @@ LT_INIT([win32-dll]) @@ -98,7 +98,7 @@ index 1057f63..648afc7 100644 [Could not find sqlite3 devel files: diff --git a/libsoup/Makefile.am b/libsoup/Makefile.am -index fdba1ef..b8a9186 100644 +index cc99e75..f9b25fc 100644 --- a/libsoup/Makefile.am +++ b/libsoup/Makefile.am @@ -1,23 +1,26 @@ @@ -133,7 +133,7 @@ index fdba1ef..b8a9186 100644 libsoupincludedir = $(includedir)/libsoup-2.4/libsoup -@@ -71,7 +74,7 @@ libsoupinclude_HEADERS = \ +@@ -72,7 +75,7 @@ libsoupinclude_HEADERS = \ $(soup_headers) \ soup-enum-types.h @@ -142,7 +142,7 @@ index fdba1ef..b8a9186 100644 libsoup_2_4_la_LDFLAGS = \ -version-info $(SOUP_CURRENT):$(SOUP_REVISION):$(SOUP_AGE) -no-undefined -@@ -171,14 +174,17 @@ libsoup_2_4_la_SOURCES = \ +@@ -173,14 +176,17 @@ libsoup_2_4_la_SOURCES = \ soup-value-utils.c \ soup-xmlrpc.c @@ -163,7 +163,7 @@ index fdba1ef..b8a9186 100644 if BUILD_LIBSOUP_GNOME if OS_WIN32 -@@ -191,6 +197,10 @@ endif +@@ -193,6 +199,10 @@ endif libsoupgnomeincludedir = $(includedir)/libsoup-gnome-2.4/libsoup @@ -174,7 +174,7 @@ index fdba1ef..b8a9186 100644 libsoupgnomeinclude_HEADERS = \ soup-cookie-jar-sqlite.h\ soup-gnome.h \ -@@ -198,14 +208,24 @@ libsoupgnomeinclude_HEADERS = \ +@@ -200,14 +210,24 @@ libsoupgnomeinclude_HEADERS = \ lib_LTLIBRARIES += libsoup-gnome-2.4.la @@ -200,7 +200,7 @@ index fdba1ef..b8a9186 100644 libsoup_gnome_2_4_la_SOURCES = \ soup-cookie-jar-sqlite.c \ soup-gnome-features.c \ -@@ -217,9 +237,8 @@ endif +@@ -219,9 +239,8 @@ endif GLIB_GENERATED = soup-marshal.c soup-marshal.h GLIB_GENERATED += soup-enum-types.c soup-enum-types.h @@ -212,7 +212,7 @@ index fdba1ef..b8a9186 100644 soup_marshal_sources = $(libsoup_2_4_la_SOURCES) $(libsoup_gnome_2_4_la_SOURCES) soup_enum_types_sources = $(libsoupinclude_HEADERS) $(libsoupgnomeinclude_HEADERS) -@@ -235,6 +254,8 @@ INTROSPECTION_COMPILER_ARGS = --includedir=. +@@ -237,6 +256,8 @@ INTROSPECTION_COMPILER_ARGS = --includedir=. if HAVE_INTROSPECTION @@ -221,7 +221,7 @@ index fdba1ef..b8a9186 100644 # Core library gi_soup_files = \ $(filter-out soup.h soup-enum-types.% soup-marshal.% soup-proxy-resolver.h,\ -@@ -256,20 +277,28 @@ Soup_2_4_gir_FILES = \ +@@ -258,20 +279,28 @@ Soup_2_4_gir_FILES = \ INTROSPECTION_GIRS += Soup-2.4.gir @@ -255,5 +255,5 @@ index fdba1ef..b8a9186 100644 SoupGNOME_2_4_gir_EXPORT_PACKAGES = libsoup-gnome-2.4 -- -1.7.8.6 +1.7.12 diff --git a/net-libs/libsoup-gnome/libsoup-gnome-2.39.5.ebuild b/net-libs/libsoup-gnome/libsoup-gnome-2.39.90.ebuild similarity index 100% rename from net-libs/libsoup-gnome/libsoup-gnome-2.39.5.ebuild rename to net-libs/libsoup-gnome/libsoup-gnome-2.39.90.ebuild diff --git a/net-libs/libsoup/files/libsoup-2.39.5-fix-public-tlds.patch b/net-libs/libsoup/files/libsoup-2.39.5-fix-public-tlds.patch deleted file mode 100644 index 81fe7cf..0000000 --- a/net-libs/libsoup/files/libsoup-2.39.5-fix-public-tlds.patch +++ /dev/null @@ -1,168 +0,0 @@ -commit 82084a0c02c958a8d5bff4f847fc1507b10db9ed -Author: Sergio Villar Senin -Date: Thu Aug 2 16:50:54 2012 +0200 - - SoupTLD: fix a regression in soup_tld_is_public_suffix() - - soup_tld_is_public_suffix() was not returning TRUE for well known TLDs as - ".com" after cbae89f4. Also added some extra documentation to - soup_tld_get_base_domain() in order to make explicit that it returns NULL - for private URLs. - - Reworked unit tests in order to allow them detect these regressions. - - https://bugzilla.gnome.org/show_bug.cgi?id=681085 - -diff --git a/libsoup/soup-tld.c b/libsoup/soup-tld.c -index 0c40b67..fc7c992 100644 ---- a/libsoup/soup-tld.c -+++ b/libsoup/soup-tld.c -@@ -59,6 +59,10 @@ soup_tld_ensure_rules_hash_table (void) - * plus the second level domain, for example for myhost.mydomain.com - * it will return mydomain.com. - * -+ * Note that %NULL will be returned for private URLs (those not ending -+ * with any well known TLD) because choosing a base domain for them -+ * would be totally arbitrary. -+ * - * This method only works for valid UTF-8 hostnames in their canonical - * representation form, so you should use g_hostname_to_unicode() to - * get the canonical representation if that is not the case. -@@ -106,7 +110,7 @@ soup_tld_domain_is_public_suffix (const char *domain) - g_return_val_if_reached (FALSE); - - base_domain = soup_tld_get_base_domain_internal (domain, 0, &error); -- if (base_domain) -+ if (g_strcmp0 (domain, base_domain)) - return FALSE; - - if (g_error_matches (error, SOUP_TLD_ERROR, SOUP_TLD_ERROR_NO_BASE_DOMAIN)) { -@@ -178,15 +182,9 @@ soup_tld_get_base_domain_internal (const char *hostname, guint additional_domain - /* If we match a *. rule and there were no previous exceptions - * nor previous domains then treat it as an exact match. - */ -- if (!prev_domain) { -- g_set_error_literal (error, SOUP_TLD_ERROR, -- SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS, -- _("Not enough domains")); -- return NULL; -- } -- tld = prev_domain; -+ tld = prev_domain ? prev_domain : cur_domain; - break; -- } else if (*flags == SOUP_TLD_RULE_NORMAL || !next_dot) { -+ } else if (*flags == SOUP_TLD_RULE_NORMAL) { - tld = cur_domain; - break; - } else if (*flags & SOUP_TLD_RULE_EXCEPTION) { -diff --git a/tests/tld-test.c b/tests/tld-test.c -index 25d2da2..d0c73a8 100644 ---- a/tests/tld-test.c -+++ b/tests/tld-test.c -@@ -21,16 +21,6 @@ static struct { - { ".example", NULL }, - { ".example.com", NULL }, - { ".example.example", NULL }, -- /* Unlisted TLD.*/ -- { "example", NULL }, -- { "example.example", NULL }, -- { "b.example.example", NULL }, -- { "a.b.example.example", NULL }, -- /* Listed, but non-Internet, TLD. */ -- { "local", NULL }, -- { "example.local", NULL }, -- { "b.example.local", NULL }, -- { "a.b.example.local", NULL }, - /* TLD with only 1 rule. */ - { "biz", NULL }, - { "domain.biz", "domain.biz" }, -@@ -88,6 +78,20 @@ static struct { - /* The original list does not include non-ASCII tests. Let's add a couple. */ - { "公司.cn", NULL }, - { "a.b.åfjord.no", "b.åfjord.no" } -+}, -+/* Non Internet TLDs have NULL as expected result -+ */ -+non_inet_tld_tests[] = { -+ /* Unlisted TLD.*/ -+ { "example", NULL }, -+ { "example.example", NULL }, -+ { "b.example.example", NULL }, -+ { "a.b.example.example", NULL }, -+ /* Listed, but non-Internet, TLD. */ -+ { "local", NULL }, -+ { "example.local", NULL }, -+ { "b.example.local", NULL }, -+ { "a.b.example.local", NULL } - }; - - int -@@ -99,29 +103,46 @@ main (int argc, char **argv) - - errors = 0; - for (i = 0; i < G_N_ELEMENTS (tld_tests); ++i) { -- gboolean is_public = soup_tld_domain_is_public_suffix (tld_tests[i].hostname); -- const char *base_domain = soup_tld_get_base_domain (tld_tests[i].hostname, NULL); -+ GError *error = NULL; -+ gboolean is_public = soup_tld_domain_is_public_suffix (tld_tests[i].hostname); -+ const char *base_domain = soup_tld_get_base_domain (tld_tests[i].hostname, &error); -+ -+ debug_printf (1, "Testing %s: ", tld_tests[i].hostname); -+ -+ if (is_public && tld_tests[i].result) { -+ debug_printf (1, "ERROR: domain is public but base_domain is not NULL (%s)\n", -+ base_domain); -+ ++errors; -+ } else if (g_strcmp0 (tld_tests[i].result, base_domain)) { -+ debug_printf (1, "ERROR: %s expected as base domain but got %s\n", -+ tld_tests[i].result, base_domain); -+ ++errors; -+ -+ } else if (!tld_tests[i].result && !is_public && -+ !g_error_matches (error, SOUP_TLD_ERROR, SOUP_TLD_ERROR_INVALID_HOSTNAME)) { -+ debug_printf (1, "ERROR: not public domain with NULL expected result\n"); -+ ++errors; -+ } else -+ debug_printf (1, "OK\n"); -+ -+ g_clear_error(&error); -+ } -+ -+ for (i = 0; i < G_N_ELEMENTS (non_inet_tld_tests); ++i) { -+ gboolean is_public = soup_tld_domain_is_public_suffix (non_inet_tld_tests[i].hostname); -+ const char *base_domain = soup_tld_get_base_domain (non_inet_tld_tests[i].hostname, NULL); -+ -+ debug_printf (1, "Testing %s: ", non_inet_tld_tests[i].hostname); - -- debug_printf (1, "Testing %s: ", tld_tests[i].hostname); -- if (tld_tests[i].result) { -- /* Public domains have NULL expected results. */ -- if (is_public || g_strcmp0 (tld_tests[i].result, base_domain)) { -- debug_printf (1, "ERROR: %s got %s (%s expected)\n", -- tld_tests[i].hostname, base_domain, tld_tests[i].result); -- ++errors; -- } else -- debug_printf (1, "OK\n"); -- } else { -- /* If there is no expected result then either the domain is public or -- * the hostname invalid (for example starts with a leading dot). -- */ -- if (!is_public && base_domain) { -- debug_printf (1, "ERROR: public domain %s got %s (none expected)\n", -- tld_tests[i].hostname, base_domain); -- ++errors; -- } else -- debug_printf (1, "OK\n"); -- } -+ if (is_public) { -+ debug_printf (1, "ERROR: domain incorrectly clasified as public\n"); -+ ++errors; -+ } else if (base_domain) { -+ debug_printf (1, "ERROR: non NULL base domain (%s) for local url\n", -+ base_domain); -+ ++errors; -+ } else -+ debug_printf (1, "OK\n"); - } - - test_cleanup (); diff --git a/net-libs/libsoup/files/libsoup-2.39.90-avoid-double-free.patch b/net-libs/libsoup/files/libsoup-2.39.90-avoid-double-free.patch new file mode 100644 index 0000000..8ab5021 --- /dev/null +++ b/net-libs/libsoup/files/libsoup-2.39.90-avoid-double-free.patch @@ -0,0 +1,30 @@ +From 2e70097a13289f6e665e7bbe327d12d5b0d3cddb Mon Sep 17 00:00:00 2001 +From: Alexander Larsson +Date: Fri, 24 Aug 2012 13:20:15 +0200 +Subject: [PATCH 1/2] Avoid double free of hash key + +When soup_message_headers_get_content_disposition re-inserts the +new filename we need to g_strdup the key or otherwise it will +be freed by the hashtable key destroy func. + +https://bugzilla.gnome.org/show_bug.cgi?id=682569 +--- + libsoup/soup-message-headers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c +index b9bab23..1dd53dd 100644 +--- a/libsoup/soup-message-headers.c ++++ b/libsoup/soup-message-headers.c +@@ -1303,7 +1303,7 @@ soup_message_headers_get_content_disposition (SoupMessageHeaders *hdrs, + char *filename = strrchr (orig_value, '/'); + + if (filename) +- g_hash_table_insert (*params, orig_key, filename + 1); ++ g_hash_table_insert (*params, g_strdup (orig_key), filename + 1); + } + return TRUE; + } +-- +1.7.12 + diff --git a/net-libs/libsoup/libsoup-2.39.5.ebuild b/net-libs/libsoup/libsoup-2.39.90.ebuild similarity index 98% rename from net-libs/libsoup/libsoup-2.39.5.ebuild rename to net-libs/libsoup/libsoup-2.39.90.ebuild index 17826ee..7f50d15 100644 --- a/net-libs/libsoup/libsoup-2.39.5.ebuild +++ b/net-libs/libsoup/libsoup-2.39.90.ebuild @@ -80,7 +80,7 @@ src_prepare() { epatch "${FILESDIR}/${PN}-2.34.2-fix-build-without-gnome-with-doc.patch" [[ ${PV} != 9999 ]] && eautoreconf fi - epatch "${FILESDIR}/${P}-fix-public-tlds.patch" + epatch "${FILESDIR}/${P}-avoid-double-free.patch" gnome2_src_prepare }