1 |
commit: 7a8450be3ab30d820193277ca68768c4e863abc1 |
2 |
Author: Priit Laes <plaes <AT> plaes <DOT> org> |
3 |
AuthorDate: Fri Aug 24 21:20:14 2012 +0000 |
4 |
Commit: Priit Laes <plaes <AT> plaes <DOT> org> |
5 |
CommitDate: Fri Aug 24 21:20:14 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=7a8450be |
7 |
|
8 |
net-libs/libsoup{,-gnome}: 2.39.5 → 2.39.90 |
9 |
|
10 |
--- |
11 |
.../files/libsoup-gnome-system-lib.patch | 28 ++-- |
12 |
...-2.39.5.ebuild => libsoup-gnome-2.39.90.ebuild} | 0 |
13 |
.../files/libsoup-2.39.5-fix-public-tlds.patch | 168 -------------------- |
14 |
.../files/libsoup-2.39.90-avoid-double-free.patch | 30 ++++ |
15 |
...ibsoup-2.39.5.ebuild => libsoup-2.39.90.ebuild} | 2 +- |
16 |
5 files changed, 45 insertions(+), 183 deletions(-) |
17 |
|
18 |
diff --git a/net-libs/libsoup-gnome/files/libsoup-gnome-system-lib.patch b/net-libs/libsoup-gnome/files/libsoup-gnome-system-lib.patch |
19 |
index 5b24c58..d236e0c 100644 |
20 |
--- a/net-libs/libsoup-gnome/files/libsoup-gnome-system-lib.patch |
21 |
+++ b/net-libs/libsoup-gnome/files/libsoup-gnome-system-lib.patch |
22 |
@@ -1,4 +1,4 @@ |
23 |
-From 75d7a77705cd567ea1d2d95b6f99f1e0cabdb8bb Mon Sep 17 00:00:00 2001 |
24 |
+From 41200f48909dbf48fd2c96f305b71797634aca3e Mon Sep 17 00:00:00 2001 |
25 |
From: Priit Laes <plaes@×××××.org> |
26 |
Date: Tue, 20 Dec 2011 15:42:44 +0200 |
27 |
Subject: [PATCH] Split support for libsoup-gnome |
28 |
@@ -7,9 +7,9 @@ https://bugzilla.gnome.org/show_bug.cgi?id=595065 |
29 |
|
30 |
Original patch by Romain Perier. |
31 |
--- |
32 |
- Makefile.am | 12 ++++++++- |
33 |
- configure.ac | 35 ++++++++++++++++++--------- |
34 |
- libsoup/Makefile.am | 63 +++++++++++++++++++++++++++++++++++++------------- |
35 |
+ Makefile.am | 12 ++++++++-- |
36 |
+ configure.ac | 35 +++++++++++++++++++---------- |
37 |
+ libsoup/Makefile.am | 63 ++++++++++++++++++++++++++++++++++++++--------------- |
38 |
3 files changed, 79 insertions(+), 31 deletions(-) |
39 |
|
40 |
diff --git a/Makefile.am b/Makefile.am |
41 |
@@ -43,7 +43,7 @@ index 18bf80a..046f945 100644 |
42 |
if BUILD_LIBSOUP_GNOME |
43 |
pkgconfig_DATA += libsoup-gnome-2.4.pc |
44 |
diff --git a/configure.ac b/configure.ac |
45 |
-index 1057f63..648afc7 100644 |
46 |
+index 95410de..1f00bdd 100644 |
47 |
--- a/configure.ac |
48 |
+++ b/configure.ac |
49 |
@@ -71,20 +71,27 @@ LT_INIT([win32-dll]) |
50 |
@@ -98,7 +98,7 @@ index 1057f63..648afc7 100644 |
51 |
[Could not find sqlite3 devel files: |
52 |
|
53 |
diff --git a/libsoup/Makefile.am b/libsoup/Makefile.am |
54 |
-index fdba1ef..b8a9186 100644 |
55 |
+index cc99e75..f9b25fc 100644 |
56 |
--- a/libsoup/Makefile.am |
57 |
+++ b/libsoup/Makefile.am |
58 |
@@ -1,23 +1,26 @@ |
59 |
@@ -133,7 +133,7 @@ index fdba1ef..b8a9186 100644 |
60 |
|
61 |
libsoupincludedir = $(includedir)/libsoup-2.4/libsoup |
62 |
|
63 |
-@@ -71,7 +74,7 @@ libsoupinclude_HEADERS = \ |
64 |
+@@ -72,7 +75,7 @@ libsoupinclude_HEADERS = \ |
65 |
$(soup_headers) \ |
66 |
soup-enum-types.h |
67 |
|
68 |
@@ -142,7 +142,7 @@ index fdba1ef..b8a9186 100644 |
69 |
|
70 |
libsoup_2_4_la_LDFLAGS = \ |
71 |
-version-info $(SOUP_CURRENT):$(SOUP_REVISION):$(SOUP_AGE) -no-undefined |
72 |
-@@ -171,14 +174,17 @@ libsoup_2_4_la_SOURCES = \ |
73 |
+@@ -173,14 +176,17 @@ libsoup_2_4_la_SOURCES = \ |
74 |
soup-value-utils.c \ |
75 |
soup-xmlrpc.c |
76 |
|
77 |
@@ -163,7 +163,7 @@ index fdba1ef..b8a9186 100644 |
78 |
if BUILD_LIBSOUP_GNOME |
79 |
|
80 |
if OS_WIN32 |
81 |
-@@ -191,6 +197,10 @@ endif |
82 |
+@@ -193,6 +199,10 @@ endif |
83 |
|
84 |
libsoupgnomeincludedir = $(includedir)/libsoup-gnome-2.4/libsoup |
85 |
|
86 |
@@ -174,7 +174,7 @@ index fdba1ef..b8a9186 100644 |
87 |
libsoupgnomeinclude_HEADERS = \ |
88 |
soup-cookie-jar-sqlite.h\ |
89 |
soup-gnome.h \ |
90 |
-@@ -198,14 +208,24 @@ libsoupgnomeinclude_HEADERS = \ |
91 |
+@@ -200,14 +210,24 @@ libsoupgnomeinclude_HEADERS = \ |
92 |
|
93 |
lib_LTLIBRARIES += libsoup-gnome-2.4.la |
94 |
|
95 |
@@ -200,7 +200,7 @@ index fdba1ef..b8a9186 100644 |
96 |
libsoup_gnome_2_4_la_SOURCES = \ |
97 |
soup-cookie-jar-sqlite.c \ |
98 |
soup-gnome-features.c \ |
99 |
-@@ -217,9 +237,8 @@ endif |
100 |
+@@ -219,9 +239,8 @@ endif |
101 |
|
102 |
GLIB_GENERATED = soup-marshal.c soup-marshal.h |
103 |
GLIB_GENERATED += soup-enum-types.c soup-enum-types.h |
104 |
@@ -212,7 +212,7 @@ index fdba1ef..b8a9186 100644 |
105 |
|
106 |
soup_marshal_sources = $(libsoup_2_4_la_SOURCES) $(libsoup_gnome_2_4_la_SOURCES) |
107 |
soup_enum_types_sources = $(libsoupinclude_HEADERS) $(libsoupgnomeinclude_HEADERS) |
108 |
-@@ -235,6 +254,8 @@ INTROSPECTION_COMPILER_ARGS = --includedir=. |
109 |
+@@ -237,6 +256,8 @@ INTROSPECTION_COMPILER_ARGS = --includedir=. |
110 |
|
111 |
if HAVE_INTROSPECTION |
112 |
|
113 |
@@ -221,7 +221,7 @@ index fdba1ef..b8a9186 100644 |
114 |
# Core library |
115 |
gi_soup_files = \ |
116 |
$(filter-out soup.h soup-enum-types.% soup-marshal.% soup-proxy-resolver.h,\ |
117 |
-@@ -256,20 +277,28 @@ Soup_2_4_gir_FILES = \ |
118 |
+@@ -258,20 +279,28 @@ Soup_2_4_gir_FILES = \ |
119 |
|
120 |
INTROSPECTION_GIRS += Soup-2.4.gir |
121 |
|
122 |
@@ -255,5 +255,5 @@ index fdba1ef..b8a9186 100644 |
123 |
SoupGNOME_2_4_gir_EXPORT_PACKAGES = libsoup-gnome-2.4 |
124 |
|
125 |
-- |
126 |
-1.7.8.6 |
127 |
+1.7.12 |
128 |
|
129 |
|
130 |
diff --git a/net-libs/libsoup-gnome/libsoup-gnome-2.39.5.ebuild b/net-libs/libsoup-gnome/libsoup-gnome-2.39.90.ebuild |
131 |
similarity index 100% |
132 |
rename from net-libs/libsoup-gnome/libsoup-gnome-2.39.5.ebuild |
133 |
rename to net-libs/libsoup-gnome/libsoup-gnome-2.39.90.ebuild |
134 |
|
135 |
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 |
136 |
deleted file mode 100644 |
137 |
index 81fe7cf..0000000 |
138 |
--- a/net-libs/libsoup/files/libsoup-2.39.5-fix-public-tlds.patch |
139 |
+++ /dev/null |
140 |
@@ -1,168 +0,0 @@ |
141 |
-commit 82084a0c02c958a8d5bff4f847fc1507b10db9ed |
142 |
-Author: Sergio Villar Senin <svillar@××××××.com> |
143 |
-Date: Thu Aug 2 16:50:54 2012 +0200 |
144 |
- |
145 |
- SoupTLD: fix a regression in soup_tld_is_public_suffix() |
146 |
- |
147 |
- soup_tld_is_public_suffix() was not returning TRUE for well known TLDs as |
148 |
- ".com" after cbae89f4. Also added some extra documentation to |
149 |
- soup_tld_get_base_domain() in order to make explicit that it returns NULL |
150 |
- for private URLs. |
151 |
- |
152 |
- Reworked unit tests in order to allow them detect these regressions. |
153 |
- |
154 |
- https://bugzilla.gnome.org/show_bug.cgi?id=681085 |
155 |
- |
156 |
-diff --git a/libsoup/soup-tld.c b/libsoup/soup-tld.c |
157 |
-index 0c40b67..fc7c992 100644 |
158 |
---- a/libsoup/soup-tld.c |
159 |
-+++ b/libsoup/soup-tld.c |
160 |
-@@ -59,6 +59,10 @@ soup_tld_ensure_rules_hash_table (void) |
161 |
- * plus the second level domain, for example for myhost.mydomain.com |
162 |
- * it will return mydomain.com. |
163 |
- * |
164 |
-+ * Note that %NULL will be returned for private URLs (those not ending |
165 |
-+ * with any well known TLD) because choosing a base domain for them |
166 |
-+ * would be totally arbitrary. |
167 |
-+ * |
168 |
- * This method only works for valid UTF-8 hostnames in their canonical |
169 |
- * representation form, so you should use g_hostname_to_unicode() to |
170 |
- * get the canonical representation if that is not the case. |
171 |
-@@ -106,7 +110,7 @@ soup_tld_domain_is_public_suffix (const char *domain) |
172 |
- g_return_val_if_reached (FALSE); |
173 |
- |
174 |
- base_domain = soup_tld_get_base_domain_internal (domain, 0, &error); |
175 |
-- if (base_domain) |
176 |
-+ if (g_strcmp0 (domain, base_domain)) |
177 |
- return FALSE; |
178 |
- |
179 |
- if (g_error_matches (error, SOUP_TLD_ERROR, SOUP_TLD_ERROR_NO_BASE_DOMAIN)) { |
180 |
-@@ -178,15 +182,9 @@ soup_tld_get_base_domain_internal (const char *hostname, guint additional_domain |
181 |
- /* If we match a *. rule and there were no previous exceptions |
182 |
- * nor previous domains then treat it as an exact match. |
183 |
- */ |
184 |
-- if (!prev_domain) { |
185 |
-- g_set_error_literal (error, SOUP_TLD_ERROR, |
186 |
-- SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS, |
187 |
-- _("Not enough domains")); |
188 |
-- return NULL; |
189 |
-- } |
190 |
-- tld = prev_domain; |
191 |
-+ tld = prev_domain ? prev_domain : cur_domain; |
192 |
- break; |
193 |
-- } else if (*flags == SOUP_TLD_RULE_NORMAL || !next_dot) { |
194 |
-+ } else if (*flags == SOUP_TLD_RULE_NORMAL) { |
195 |
- tld = cur_domain; |
196 |
- break; |
197 |
- } else if (*flags & SOUP_TLD_RULE_EXCEPTION) { |
198 |
-diff --git a/tests/tld-test.c b/tests/tld-test.c |
199 |
-index 25d2da2..d0c73a8 100644 |
200 |
---- a/tests/tld-test.c |
201 |
-+++ b/tests/tld-test.c |
202 |
-@@ -21,16 +21,6 @@ static struct { |
203 |
- { ".example", NULL }, |
204 |
- { ".example.com", NULL }, |
205 |
- { ".example.example", NULL }, |
206 |
-- /* Unlisted TLD.*/ |
207 |
-- { "example", NULL }, |
208 |
-- { "example.example", NULL }, |
209 |
-- { "b.example.example", NULL }, |
210 |
-- { "a.b.example.example", NULL }, |
211 |
-- /* Listed, but non-Internet, TLD. */ |
212 |
-- { "local", NULL }, |
213 |
-- { "example.local", NULL }, |
214 |
-- { "b.example.local", NULL }, |
215 |
-- { "a.b.example.local", NULL }, |
216 |
- /* TLD with only 1 rule. */ |
217 |
- { "biz", NULL }, |
218 |
- { "domain.biz", "domain.biz" }, |
219 |
-@@ -88,6 +78,20 @@ static struct { |
220 |
- /* The original list does not include non-ASCII tests. Let's add a couple. */ |
221 |
- { "公司.cn", NULL }, |
222 |
- { "a.b.åfjord.no", "b.åfjord.no" } |
223 |
-+}, |
224 |
-+/* Non Internet TLDs have NULL as expected result |
225 |
-+ */ |
226 |
-+non_inet_tld_tests[] = { |
227 |
-+ /* Unlisted TLD.*/ |
228 |
-+ { "example", NULL }, |
229 |
-+ { "example.example", NULL }, |
230 |
-+ { "b.example.example", NULL }, |
231 |
-+ { "a.b.example.example", NULL }, |
232 |
-+ /* Listed, but non-Internet, TLD. */ |
233 |
-+ { "local", NULL }, |
234 |
-+ { "example.local", NULL }, |
235 |
-+ { "b.example.local", NULL }, |
236 |
-+ { "a.b.example.local", NULL } |
237 |
- }; |
238 |
- |
239 |
- int |
240 |
-@@ -99,29 +103,46 @@ main (int argc, char **argv) |
241 |
- |
242 |
- errors = 0; |
243 |
- for (i = 0; i < G_N_ELEMENTS (tld_tests); ++i) { |
244 |
-- gboolean is_public = soup_tld_domain_is_public_suffix (tld_tests[i].hostname); |
245 |
-- const char *base_domain = soup_tld_get_base_domain (tld_tests[i].hostname, NULL); |
246 |
-+ GError *error = NULL; |
247 |
-+ gboolean is_public = soup_tld_domain_is_public_suffix (tld_tests[i].hostname); |
248 |
-+ const char *base_domain = soup_tld_get_base_domain (tld_tests[i].hostname, &error); |
249 |
-+ |
250 |
-+ debug_printf (1, "Testing %s: ", tld_tests[i].hostname); |
251 |
-+ |
252 |
-+ if (is_public && tld_tests[i].result) { |
253 |
-+ debug_printf (1, "ERROR: domain is public but base_domain is not NULL (%s)\n", |
254 |
-+ base_domain); |
255 |
-+ ++errors; |
256 |
-+ } else if (g_strcmp0 (tld_tests[i].result, base_domain)) { |
257 |
-+ debug_printf (1, "ERROR: %s expected as base domain but got %s\n", |
258 |
-+ tld_tests[i].result, base_domain); |
259 |
-+ ++errors; |
260 |
-+ |
261 |
-+ } else if (!tld_tests[i].result && !is_public && |
262 |
-+ !g_error_matches (error, SOUP_TLD_ERROR, SOUP_TLD_ERROR_INVALID_HOSTNAME)) { |
263 |
-+ debug_printf (1, "ERROR: not public domain with NULL expected result\n"); |
264 |
-+ ++errors; |
265 |
-+ } else |
266 |
-+ debug_printf (1, "OK\n"); |
267 |
-+ |
268 |
-+ g_clear_error(&error); |
269 |
-+ } |
270 |
-+ |
271 |
-+ for (i = 0; i < G_N_ELEMENTS (non_inet_tld_tests); ++i) { |
272 |
-+ gboolean is_public = soup_tld_domain_is_public_suffix (non_inet_tld_tests[i].hostname); |
273 |
-+ const char *base_domain = soup_tld_get_base_domain (non_inet_tld_tests[i].hostname, NULL); |
274 |
-+ |
275 |
-+ debug_printf (1, "Testing %s: ", non_inet_tld_tests[i].hostname); |
276 |
- |
277 |
-- debug_printf (1, "Testing %s: ", tld_tests[i].hostname); |
278 |
-- if (tld_tests[i].result) { |
279 |
-- /* Public domains have NULL expected results. */ |
280 |
-- if (is_public || g_strcmp0 (tld_tests[i].result, base_domain)) { |
281 |
-- debug_printf (1, "ERROR: %s got %s (%s expected)\n", |
282 |
-- tld_tests[i].hostname, base_domain, tld_tests[i].result); |
283 |
-- ++errors; |
284 |
-- } else |
285 |
-- debug_printf (1, "OK\n"); |
286 |
-- } else { |
287 |
-- /* If there is no expected result then either the domain is public or |
288 |
-- * the hostname invalid (for example starts with a leading dot). |
289 |
-- */ |
290 |
-- if (!is_public && base_domain) { |
291 |
-- debug_printf (1, "ERROR: public domain %s got %s (none expected)\n", |
292 |
-- tld_tests[i].hostname, base_domain); |
293 |
-- ++errors; |
294 |
-- } else |
295 |
-- debug_printf (1, "OK\n"); |
296 |
-- } |
297 |
-+ if (is_public) { |
298 |
-+ debug_printf (1, "ERROR: domain incorrectly clasified as public\n"); |
299 |
-+ ++errors; |
300 |
-+ } else if (base_domain) { |
301 |
-+ debug_printf (1, "ERROR: non NULL base domain (%s) for local url\n", |
302 |
-+ base_domain); |
303 |
-+ ++errors; |
304 |
-+ } else |
305 |
-+ debug_printf (1, "OK\n"); |
306 |
- } |
307 |
- |
308 |
- test_cleanup (); |
309 |
|
310 |
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 |
311 |
new file mode 100644 |
312 |
index 0000000..8ab5021 |
313 |
--- /dev/null |
314 |
+++ b/net-libs/libsoup/files/libsoup-2.39.90-avoid-double-free.patch |
315 |
@@ -0,0 +1,30 @@ |
316 |
+From 2e70097a13289f6e665e7bbe327d12d5b0d3cddb Mon Sep 17 00:00:00 2001 |
317 |
+From: Alexander Larsson <alexl@××××××.com> |
318 |
+Date: Fri, 24 Aug 2012 13:20:15 +0200 |
319 |
+Subject: [PATCH 1/2] Avoid double free of hash key |
320 |
+ |
321 |
+When soup_message_headers_get_content_disposition re-inserts the |
322 |
+new filename we need to g_strdup the key or otherwise it will |
323 |
+be freed by the hashtable key destroy func. |
324 |
+ |
325 |
+https://bugzilla.gnome.org/show_bug.cgi?id=682569 |
326 |
+--- |
327 |
+ libsoup/soup-message-headers.c | 2 +- |
328 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
329 |
+ |
330 |
+diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c |
331 |
+index b9bab23..1dd53dd 100644 |
332 |
+--- a/libsoup/soup-message-headers.c |
333 |
++++ b/libsoup/soup-message-headers.c |
334 |
+@@ -1303,7 +1303,7 @@ soup_message_headers_get_content_disposition (SoupMessageHeaders *hdrs, |
335 |
+ char *filename = strrchr (orig_value, '/'); |
336 |
+ |
337 |
+ if (filename) |
338 |
+- g_hash_table_insert (*params, orig_key, filename + 1); |
339 |
++ g_hash_table_insert (*params, g_strdup (orig_key), filename + 1); |
340 |
+ } |
341 |
+ return TRUE; |
342 |
+ } |
343 |
+-- |
344 |
+1.7.12 |
345 |
+ |
346 |
|
347 |
diff --git a/net-libs/libsoup/libsoup-2.39.5.ebuild b/net-libs/libsoup/libsoup-2.39.90.ebuild |
348 |
similarity index 98% |
349 |
rename from net-libs/libsoup/libsoup-2.39.5.ebuild |
350 |
rename to net-libs/libsoup/libsoup-2.39.90.ebuild |
351 |
index 17826ee..7f50d15 100644 |
352 |
--- a/net-libs/libsoup/libsoup-2.39.5.ebuild |
353 |
+++ b/net-libs/libsoup/libsoup-2.39.90.ebuild |
354 |
@@ -80,7 +80,7 @@ src_prepare() { |
355 |
epatch "${FILESDIR}/${PN}-2.34.2-fix-build-without-gnome-with-doc.patch" |
356 |
[[ ${PV} != 9999 ]] && eautoreconf |
357 |
fi |
358 |
- epatch "${FILESDIR}/${P}-fix-public-tlds.patch" |
359 |
+ epatch "${FILESDIR}/${P}-avoid-double-free.patch" |
360 |
|
361 |
gnome2_src_prepare |
362 |
} |