summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch74
-rw-r--r--meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch44
-rw-r--r--meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch43
-rw-r--r--meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch145
-rw-r--r--meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch37
-rw-r--r--meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch43
-rw-r--r--meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch48
-rw-r--r--meta-oe/recipes-support/libsoup/libsoup-2.4_2.74.3.bb66
8 files changed, 500 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch b/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch
new file mode 100644
index 0000000000..9ef0643837
--- /dev/null
+++ b/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch
@@ -0,0 +1,74 @@
1From 52c5859b82fe79f2c32d883e048d218e0d7f2182 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 30 Apr 2025 14:59:55 +0800
4Subject: [PATCH] CVE-2025-32911
5
6CVE: CVE-2025-32911
7Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/422/commits]
8
9Signed-off-by: Changqing Li <changqing.li@windriver.com>
10---
11 libsoup/soup-message-headers.c | 13 +++++++++----
12 tests/header-parsing-test.c | 15 +++++++++++++++
13 2 files changed, 24 insertions(+), 4 deletions(-)
14
15diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
16index 39ad14a..78b2455 100644
17--- a/libsoup/soup-message-headers.c
18+++ b/libsoup/soup-message-headers.c
19@@ -1454,10 +1454,15 @@ soup_message_headers_get_content_disposition (SoupMessageHeaders *hdrs,
20 */
21 if (params && g_hash_table_lookup_extended (*params, "filename",
22 &orig_key, &orig_value)) {
23- char *filename = strrchr (orig_value, '/');
24-
25- if (filename)
26- g_hash_table_insert (*params, g_strdup (orig_key), filename + 1);
27+ if (orig_value) {
28+ char *filename = strrchr (orig_value, '/');
29+
30+ if (filename)
31+ g_hash_table_insert (*params, g_strdup (orig_key), g_strdup(filename + 1));
32+ } else {
33+ /* filename with no value isn't valid. */
34+ g_hash_table_remove (*params, "filename");
35+ }
36 }
37 return TRUE;
38 }
39diff --git a/tests/header-parsing-test.c b/tests/header-parsing-test.c
40index 946f118..752196e 100644
41--- a/tests/header-parsing-test.c
42+++ b/tests/header-parsing-test.c
43@@ -1034,6 +1034,7 @@ do_param_list_tests (void)
44 #define RFC5987_TEST_HEADER_FALLBACK "attachment; filename*=Unknown''t%FF%FF%FFst.txt; filename=\"test.txt\""
45 #define RFC5987_TEST_HEADER_NO_TYPE "filename=\"test.txt\""
46 #define RFC5987_TEST_HEADER_NO_TYPE_2 "filename=\"test.txt\"; foo=bar"
47+#define RFC5987_TEST_HEADER_EMPTY_FILENAME ";filename"
48
49 static void
50 do_content_disposition_tests (void)
51@@ -1133,6 +1134,20 @@ do_content_disposition_tests (void)
52 g_assert_cmpstr (filename, ==, RFC5987_TEST_FALLBACK_FILENAME);
53 parameter2 = g_hash_table_lookup (params, "foo");
54 g_assert_cmpstr (parameter2, ==, "bar");
55+ g_hash_table_destroy (params);
56+
57+ /* Empty filename */
58+ soup_message_headers_clear (hdrs);
59+ soup_message_headers_append (hdrs, "Content-Disposition",
60+ RFC5987_TEST_HEADER_EMPTY_FILENAME);
61+ if (!soup_message_headers_get_content_disposition (hdrs,
62+ &disposition,
63+ &params)) {
64+ soup_test_assert (FALSE, "empty filename decoding FAILED");
65+ return;
66+ }
67+ g_free (disposition);
68+ g_assert_false (g_hash_table_contains (params, "filename"));
69 g_hash_table_destroy (params);
70
71 soup_message_headers_free (hdrs);
72--
732.34.1
74
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch b/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch
new file mode 100644
index 0000000000..d867e5bc17
--- /dev/null
+++ b/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch
@@ -0,0 +1,44 @@
1From ced3c5d8cad0177b297666343f1561799dfefb0d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 22 Nov 2023 18:49:10 -0800
4Subject: [PATCH] Fix build with libxml2-2.12.0 and clang-17
5
6Fixes build errors about missing function prototypes with clang-17
7
8Fixes
9| ../libsoup-2.74.3/libsoup/soup-xmlrpc-old.c:512:8: error: call to undeclared function 'xmlParseMemory'; ISO C99 and later do not support implicit function declarations
10
11Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/385]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 libsoup/soup-xmlrpc-old.c | 1 +
15 libsoup/soup-xmlrpc.c | 1 +
16 2 files changed, 2 insertions(+)
17
18diff --git a/libsoup/soup-xmlrpc-old.c b/libsoup/soup-xmlrpc-old.c
19index c57086b6..527e3b23 100644
20--- a/libsoup/soup-xmlrpc-old.c
21+++ b/libsoup/soup-xmlrpc-old.c
22@@ -11,6 +11,7 @@
23
24 #include <string.h>
25
26+#include <libxml/parser.h>
27 #include <libxml/tree.h>
28
29 #include "soup-xmlrpc-old.h"
30diff --git a/libsoup/soup-xmlrpc.c b/libsoup/soup-xmlrpc.c
31index 42dcda9c..e991cbf0 100644
32--- a/libsoup/soup-xmlrpc.c
33+++ b/libsoup/soup-xmlrpc.c
34@@ -17,6 +17,7 @@
35
36 #include <string.h>
37 #include <errno.h>
38+#include <libxml/parser.h>
39 #include <libxml/tree.h>
40 #include "soup-xmlrpc.h"
41 #include "soup.h"
42--
432.43.0
44
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch b/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch
new file mode 100644
index 0000000000..fcd442c13a
--- /dev/null
+++ b/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch
@@ -0,0 +1,43 @@
1From 1159686379184a1c899eabb2174258aba5e0fd79 Mon Sep 17 00:00:00 2001
2From: Patrick Griffis <pgriffis@igalia.com>
3Date: Mon, 20 Sep 2021 15:41:31 -0500
4Subject: [PATCH] Fix possibly uninitialized warnings
5
6Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/fb98e9a8c3062c75357b961543af091de2dd5459]
7
8Signed-off-by: Changqing Li <changqing.li@windriver.com>
9---
10 libsoup/soup-websocket-connection.c | 2 +-
11 tests/samesite-test.c | 3 +++
12 2 files changed, 4 insertions(+), 1 deletion(-)
13
14diff --git a/libsoup/soup-websocket-connection.c b/libsoup/soup-websocket-connection.c
15index 65c1492..585d45c 100644
16--- a/libsoup/soup-websocket-connection.c
17+++ b/libsoup/soup-websocket-connection.c
18@@ -471,7 +471,7 @@ send_message (SoupWebsocketConnection *self,
19 GByteArray *bytes;
20 gsize frame_len;
21 guint8 *outer;
22- guint8 mask_offset;
23+ guint8 mask_offset = 0;
24 GBytes *filtered_bytes;
25 GList *l;
26 GError *error = NULL;
27diff --git a/tests/samesite-test.c b/tests/samesite-test.c
28index 0b081b2..60c9b8e 100644
29--- a/tests/samesite-test.c
30+++ b/tests/samesite-test.c
31@@ -60,6 +60,9 @@ assert_highest_policy_visible (GSList *cookies, SoupSameSitePolicy policy)
32 case SOUP_SAME_SITE_POLICY_NONE:
33 expected_count = 1;
34 break;
35+ default:
36+ g_assert_not_reached ();
37+ break;
38 }
39
40 g_assert_cmpuint (size, ==, expected_count);
41--
422.34.1
43
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch b/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch
new file mode 100644
index 0000000000..0d4139ec08
--- /dev/null
+++ b/meta-oe/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch
@@ -0,0 +1,145 @@
1From 0e3bfa22b23451531caf8cc30b1771ac6a41fcad Mon Sep 17 00:00:00 2001
2From: Carlos Garcia Campos <cgarcia@igalia.com>
3Date: Thu, 11 Feb 2021 10:47:09 +0100
4Subject: [PATCH] Remove http and https aliases support test
5
6Upstream has removed the whole function of http and https aliases
7support, this commit partially cherry pick it, only remove the test to
8mute the warning:
9| ../libsoup-2.74.3/tests/server-test.c: In function 'do_one_server_aliases_test':
10| ../libsoup-2.74.3/tests/server-test.c:180:17: warning: 'g_socket_client_set_tls_validation_flags' is deprecated [-Wdeprecated-declarations]
11| 180 | g_socket_client_set_tls_validation_flags (client, 0);
12| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13
14Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/111ae4ebe7cc2e389573cff5b9ac76509d6cbac0]
15
16Signed-off-by: Changqing Li <changqing.li@windriver.com>
17---
18 tests/server-test.c | 104 --------------------------------------------
19 1 file changed, 104 deletions(-)
20
21diff --git a/tests/server-test.c b/tests/server-test.c
22index 8976103..cb7e815 100644
23--- a/tests/server-test.c
24+++ b/tests/server-test.c
25@@ -154,108 +154,6 @@ do_star_test (ServerData *sd, gconstpointer test_data)
26 soup_uri_free (star_uri);
27 }
28
29-static void
30-do_one_server_aliases_test (SoupURI *uri,
31- const char *alias,
32- gboolean succeed)
33-{
34- GSocketClient *client;
35- GSocketConnectable *addr;
36- GSocketConnection *conn;
37- GInputStream *in;
38- GOutputStream *out;
39- GError *error = NULL;
40- GString *req;
41- static char buf[1024];
42-
43- debug_printf (1, " %s via %s\n", alias, uri->scheme);
44-
45- /* There's no way to make libsoup's client side send an absolute
46- * URI (to a non-proxy server), so we have to fake this.
47- */
48-
49- client = g_socket_client_new ();
50- if (uri->scheme == SOUP_URI_SCHEME_HTTPS) {
51- g_socket_client_set_tls (client, TRUE);
52- g_socket_client_set_tls_validation_flags (client, 0);
53- }
54- addr = g_network_address_new (uri->host, uri->port);
55-
56- conn = g_socket_client_connect (client, addr, NULL, &error);
57- g_object_unref (addr);
58- g_object_unref (client);
59- if (!conn) {
60- g_assert_no_error (error);
61- g_error_free (error);
62- return;
63- }
64-
65- in = g_io_stream_get_input_stream (G_IO_STREAM (conn));
66- out = g_io_stream_get_output_stream (G_IO_STREAM (conn));
67-
68- req = g_string_new (NULL);
69- g_string_append_printf (req, "GET %s://%s:%d HTTP/1.1\r\n",
70- alias, uri->host, uri->port);
71- g_string_append_printf (req, "Host: %s:%d\r\n",
72- uri->host, uri->port);
73- g_string_append (req, "Connection: close\r\n\r\n");
74-
75- if (!g_output_stream_write_all (out, req->str, req->len, NULL, NULL, &error)) {
76- g_assert_no_error (error);
77- g_error_free (error);
78- g_object_unref (conn);
79- g_string_free (req, TRUE);
80- return;
81- }
82- g_string_free (req, TRUE);
83-
84- if (!g_input_stream_read_all (in, buf, sizeof (buf), NULL, NULL, &error)) {
85- g_assert_no_error (error);
86- g_error_free (error);
87- g_object_unref (conn);
88- return;
89- }
90-
91- if (succeed)
92- g_assert_true (g_str_has_prefix (buf, "HTTP/1.1 200 "));
93- else
94- g_assert_true (g_str_has_prefix (buf, "HTTP/1.1 400 "));
95-
96- g_io_stream_close (G_IO_STREAM (conn), NULL, NULL);
97- g_object_unref (conn);
98-}
99-
100-static void
101-do_server_aliases_test (ServerData *sd, gconstpointer test_data)
102-{
103- char *http_aliases[] = { "dav", NULL };
104- char *https_aliases[] = { "davs", NULL };
105- char *http_good[] = { "http", "dav", NULL };
106- char *http_bad[] = { "https", "davs", "fred", NULL };
107- char *https_good[] = { "https", "davs", NULL };
108- char *https_bad[] = { "http", "dav", "fred", NULL };
109- int i;
110-
111- g_test_bug ("703694");
112-
113- g_object_set (G_OBJECT (sd->server),
114- SOUP_SERVER_HTTP_ALIASES, http_aliases,
115- SOUP_SERVER_HTTPS_ALIASES, https_aliases,
116- NULL);
117-
118- for (i = 0; http_good[i]; i++)
119- do_one_server_aliases_test (sd->base_uri, http_good[i], TRUE);
120- for (i = 0; http_bad[i]; i++)
121- do_one_server_aliases_test (sd->base_uri, http_bad[i], FALSE);
122-
123- if (tls_available) {
124- for (i = 0; https_good[i]; i++)
125- do_one_server_aliases_test (sd->ssl_base_uri, https_good[i], TRUE);
126- for (i = 0; https_bad[i]; i++)
127- do_one_server_aliases_test (sd->ssl_base_uri, https_bad[i], FALSE);
128- }
129-}
130-
131 static void
132 do_dot_dot_test (ServerData *sd, gconstpointer test_data)
133 {
134@@ -1382,8 +1280,6 @@ main (int argc, char **argv)
135
136 g_test_add ("/server/OPTIONS *", ServerData, NULL,
137 server_setup, do_star_test, server_teardown);
138- g_test_add ("/server/aliases", ServerData, NULL,
139- server_setup, do_server_aliases_test, server_teardown);
140 g_test_add ("/server/..-in-path", ServerData, NULL,
141 server_setup, do_dot_dot_test, server_teardown);
142 g_test_add ("/server/ipv6", ServerData, NULL,
143--
1442.34.1
145
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch b/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch
new file mode 100644
index 0000000000..cb1f096110
--- /dev/null
+++ b/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch
@@ -0,0 +1,37 @@
1From a693d49bff058fc20a448dc4e7d324ff0dc6597e Mon Sep 17 00:00:00 2001
2From: Ignacio Casal Quinteiro <qignacio@amazon.com>
3Date: Wed, 11 Sep 2024 11:52:11 +0200
4Subject: [PATCH 1/3] websocket: process the frame as soon as we read data
5
6Otherwise we can enter in a read loop because we were not
7validating the data until the all the data was read.
8
9Fixes #391
10
11CVE: CVE-2024-52532
12Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/6adc0e3eb74c257ed4e2a23eb4b2774fdb0d67be#f1d67ca0386b145ea201cf88d27f72724d7c6715]
13
14Signed-off-by: Changqing Li <changqing.li@windriver.com>
15---
16 libsoup/soup-websocket-connection.c | 5 ++---
17 1 file changed, 2 insertions(+), 3 deletions(-)
18
19diff --git a/libsoup/soup-websocket-connection.c b/libsoup/soup-websocket-connection.c
20index a4095e1..65c1492 100644
21--- a/libsoup/soup-websocket-connection.c
22+++ b/libsoup/soup-websocket-connection.c
23@@ -1140,9 +1140,8 @@ soup_websocket_connection_read (SoupWebsocketConnection *self)
24 }
25
26 pv->incoming->len = len + count;
27- } while (count > 0);
28-
29- process_incoming (self);
30+ process_incoming (self);
31+ } while (count > 0 && !pv->close_sent && !pv->io_closing);
32
33 if (end) {
34 if (!pv->close_sent || !pv->close_received) {
35--
362.34.1
37
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch b/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch
new file mode 100644
index 0000000000..dcadafe944
--- /dev/null
+++ b/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch
@@ -0,0 +1,43 @@
1From f5b76410de1318f49844dacf6e68692522b6c856 Mon Sep 17 00:00:00 2001
2From: Ignacio Casal Quinteiro <qignacio@amazon.com>
3Date: Wed, 2 Oct 2024 11:17:19 +0200
4Subject: [PATCH] websocket-test: disconnect error copy after the test ends
5
6Otherwise the server will have already sent a few more wrong
7bytes and the client will continue getting errors to copy
8but the error is already != NULL and it will assert
9
10CVE: CVE-2024-52532
11Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/29b96fab2512666d7241e46c98cc45b60b795c0c]
12
13Signed-off-by: Changqing Li <changqing.li@windriver.com>
14---
15 tests/websocket-test.c | 5 ++++-
16 1 file changed, 4 insertions(+), 1 deletion(-)
17
18diff --git a/tests/websocket-test.c b/tests/websocket-test.c
19index 5e40cf3..1ec9ff6 100644
20--- a/tests/websocket-test.c
21+++ b/tests/websocket-test.c
22@@ -1331,8 +1331,9 @@ test_receive_invalid_encode_length_64 (Test *test,
23 GError *error = NULL;
24 InvalidEncodeLengthTest context = { test, NULL };
25 guint i;
26+ guint error_id;
27
28- g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error);
29+ error_id = g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error);
30 g_signal_connect (test->client, "message", G_CALLBACK (on_binary_message), &received);
31
32 /* We use 127(\x7f) as payload length with 65535 extended length */
33@@ -1345,6 +1346,7 @@ test_receive_invalid_encode_length_64 (Test *test,
34 WAIT_UNTIL (error != NULL || received != NULL);
35 g_assert_error (error, SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR);
36 g_clear_error (&error);
37+ g_signal_handler_disconnect (test->client, error_id);
38 g_assert_null (received);
39
40 g_thread_join (thread);
41--
422.34.1
43
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch b/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch
new file mode 100644
index 0000000000..ab6af72291
--- /dev/null
+++ b/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch
@@ -0,0 +1,48 @@
1From d97bb2e340f5a6d7e56a7738403f9d18bc406b70 Mon Sep 17 00:00:00 2001
2From: Simon McVittie <smcv@debian.org>
3Date: Wed, 13 Nov 2024 14:14:23 +0000
4Subject: [PATCH 3/3] websocket-test: Disconnect error signal in another place
5
6This is the same change as commit 29b96fab "websocket-test: disconnect
7error copy after the test ends", and is done for the same reason, but
8replicating it into a different function.
9
10Fixes: 6adc0e3e "websocket: process the frame as soon as we read data"
11Resolves: https://gitlab.gnome.org/GNOME/libsoup/-/issues/399
12Signed-off-by: Simon McVittie <smcv@debian.org>
13
14CVE: CVE-2024-52532
15Upstream-Status: Backport
16[https://gitlab.gnome.org/GNOME/libsoup/-/commit/4c9e75c6676a37b6485620c332e568e1a3f530ff]
17
18Signed-off-by: Changqing Li <changqing.li@windriver.com>
19---
20 tests/websocket-test.c | 4 +++-
21 1 file changed, 3 insertions(+), 1 deletion(-)
22
23diff --git a/tests/websocket-test.c b/tests/websocket-test.c
24index 2b19a7b..0699a06 100644
25--- a/tests/websocket-test.c
26+++ b/tests/websocket-test.c
27@@ -1300,8 +1300,9 @@ test_receive_invalid_encode_length_16 (Test *test,
28 GError *error = NULL;
29 InvalidEncodeLengthTest context = { test, NULL };
30 guint i;
31+ guint error_id;
32
33- g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error);
34+ error_id = g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error);
35 g_signal_connect (test->client, "message", G_CALLBACK (on_binary_message), &received);
36
37 /* We use 126(~) as payload length with 125 extended length */
38@@ -1314,6 +1315,7 @@ test_receive_invalid_encode_length_16 (Test *test,
39 WAIT_UNTIL (error != NULL || received != NULL);
40 g_assert_error (error, SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR);
41 g_clear_error (&error);
42+ g_signal_handler_disconnect (test->client, error_id);
43 g_assert_null (received);
44
45 g_thread_join (thread);
46--
472.34.1
48
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4_2.74.3.bb b/meta-oe/recipes-support/libsoup/libsoup-2.4_2.74.3.bb
new file mode 100644
index 0000000000..7e275a48f4
--- /dev/null
+++ b/meta-oe/recipes-support/libsoup/libsoup-2.4_2.74.3.bb
@@ -0,0 +1,66 @@
1SUMMARY = "An HTTP library implementation in C"
2DESCRIPTION = "libsoup is an HTTP client/server library for GNOME. It uses GObjects \
3and the glib main loop, to integrate well with GNOME applications."
4HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
5BUGTRACKER = "https://bugzilla.gnome.org/"
6SECTION = "x11/gnome/libs"
7LICENSE = "LGPL-2.0-only"
8LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
9
10DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 libpsl"
11
12SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
13
14SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
15 file://0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch \
16 file://0001-CVE-2025-32911.patch \
17 file://0001-Fix-possibly-uninitialized-warnings.patch \
18 file://0001-Remove-http-and-https-aliases-support-test.patch \
19 file://CVE-2024-52532-1.patch \
20 file://CVE-2024-52532-2.patch \
21 file://CVE-2024-52532-3.patch"
22
23SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13"
24
25CVE_PRODUCT = "libsoup"
26
27S = "${WORKDIR}/libsoup-${PV}"
28
29inherit meson gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
30
31UPSTREAM_CHECK_REGEX = "libsoup-(?P<pver>2(\.(?!99)\d+)+)\.tar"
32
33GIR_MESON_ENABLE_FLAG = 'enabled'
34GIR_MESON_DISABLE_FLAG = 'disabled'
35
36PACKAGECONFIG ??= ""
37PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli"
38# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards
39PACKAGECONFIG[gnome] = "-Dgnome=true,-Dgnome=false"
40PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5"
41PACKAGECONFIG[ntlm] = "-Dntlm=enabled,-Dntlm=disabled"
42PACKAGECONFIG[sysprof] = "-Dsysprof=enabled,-Dsysprof=disabled,sysprof"
43
44# Tell libsoup where the target ntlm_auth is installed
45do_write_config:append:class-target() {
46 cat >${WORKDIR}/soup.cross <<EOF
47[binaries]
48ntlm_auth = '${bindir}/ntlm_auth'
49EOF
50}
51EXTRA_OEMESON:append:class-target = " --cross-file ${WORKDIR}/soup.cross"
52
53EXTRA_OEMESON += "-Dvapi=disabled -Dtls_check=false"
54
55GTKDOC_MESON_OPTION = "gtk_doc"
56
57# When built without gnome support, libsoup-2.4 will contain only one shared lib
58# and will therefore become subject to renaming by debian.bbclass. Prevent
59# renaming in order to keep the package name consistent regardless of whether
60# gnome support is enabled or disabled.
61DEBIAN_NOAUTONAME:${PN} = "1"
62
63# glib-networking is needed for SSL, proxies, etc.
64RRECOMMENDS:${PN} = "glib-networking"
65
66BBCLASSEXTEND = "native nativesdk"