Package Details: libsoup 2.74.3-4

Git Clone URL: https://aur.archlinux.org/libsoup.git (read-only, click to copy)
Package Base: libsoup
Description: HTTP client/server library for GNOME
Upstream URL: https://wiki.gnome.org/Projects/libsoup
Licenses: LGPL-2.0-or-later
Provides: libsoup-2.4.so, libsoup-gnome-2.4.so
Submitter: City-busz
Maintainer: HurricanePootis
Last Packager: City-busz
Votes: 37
Popularity: 6.15
First Submitted: 2026-05-31 21:58 (UTC)
Last Updated: 2026-05-31 21:58 (UTC)

Latest Comments

Chryseus commented on 2026-10-22 00:10 (UTC)

@jose1711 I couldn't get patch 2 to apply but it managed to pass tests with just patch 3.

jose1711 commented on 2026-10-16 20:24 (UTC)

PKGBUILD changes

Add both patches to source/b2sums and extend prepare():

  # tld-test: update after changes in the public suffix list
  git cherry-pick -n 708719c73b79c98bafb7a336e8d87f7edbf32c31

  # Fix trailing dot handling with libpsl using a text-based PSL file
  # (fixes cookies-test and tld-test)
  git apply -3 ../0002-soup-tld-Handle-trailing-dot.patch

  # Apache 2.4.69 no longer supports RFC 2069-style Digest
  git apply -3 ../0003-tests-Drop-AuthDigestQop-none.patch

Since #2 changes library behaviour, a pkgrel bump makes sense. With these changes the package builds in a clean chroot and all 37 tests pass.

jose1711 commented on 2026-10-16 20:23 (UTC)

check() currently fails in a clean chroot (tested with libpsl 0.21.5, publicsuffix-list 20260507, apache 2.4.69). There are three independent causes; below are fixes that make the full test suite pass.

1. tld-test: *.bd was removed from the Public Suffix List

Upstream already fixed this (the test now uses .jm), it just needs to be cherry-picked: 708719c7 "tld-test: update after changes in the public suffix list". It applies cleanly on top of 2.74.3.

2. cookies-test and tld-test (domain.biz.): trailing dot not handled — a real bug in the library, not just in the tests

soup_psl_context() uses psl_latest(), which loads the plain-text /usr/share/publicsuffix/public_suffix_list.dat because it is newer than libpsl's built-in data. With text-based data, libpsl does not strip a trailing dot:

psl_builtin():     psl_is_public_suffix2("org.") -> 1
psl_latest(NULL):  psl_is_public_suffix2("org.") -> 0

As a result, libsoup accepts a cookie with Domain=.org., i.e. a supercookie valid for the whole TLD (cookies-test.c:232). Upstream master has the same code. Fix — strip the trailing dot before the libpsl lookups:

0002-soup-tld-Handle-trailing-dot.patch

diff --git a/libsoup/soup-tld.c b/libsoup/soup-tld.c
index 3455e22d..a35ab167 100644
--- a/libsoup/soup-tld.c
+++ b/libsoup/soup-tld.c
@@ -92,6 +92,7 @@ gboolean
 soup_tld_domain_is_public_suffix (const char *domain)
 {
    const psl_ctx_t* psl = soup_psl_context ();
+   gsize len;

    g_return_val_if_fail (domain, FALSE);

@@ -100,6 +101,19 @@ soup_tld_domain_is_public_suffix (const char *domain)
        return FALSE;
    }

+   /* libpsl does not handle a trailing dot when the suffix list
+    * was loaded from a plain text file, so strip it ourselves.
+    */
+   len = strlen (domain);
+   if (len > 1 && domain[len - 1] == '.') {
+       char *tmp = g_strndup (domain, len - 1);
+       gboolean ret;
+
+       ret = psl_is_public_suffix2 (psl, tmp, PSL_TYPE_ANY | PSL_TYPE_NO_STAR_RULE);
+       g_free (tmp);
+       return ret;
+   }
+
    return psl_is_public_suffix2 (psl, domain, PSL_TYPE_ANY | PSL_TYPE_NO_STAR_RULE);
 }

@@ -143,6 +157,9 @@ soup_tld_get_base_domain_internal (const char *hostname, GError **error)
    char *utf8_hostname = NULL;
    const psl_ctx_t* psl = soup_psl_context ();
    const char *registrable_domain, *unregistrable_domain;
+   char *stripped_hostname = NULL;
+   const char *lookup;
+   gsize len;

    if (!psl) {
        g_set_error_literal (error, SOUP_TLD_ERROR,
@@ -179,23 +196,38 @@ soup_tld_get_base_domain_internal (const char *hostname, GError **error)
        g_free (utf8_hostname);
    }

+   /* libpsl does not handle a trailing dot when the suffix list
+    * was loaded from a plain text file, so do the lookups without
+    * it and map the result back into @hostname.
+    */
+   len = strlen (hostname);
+   if (len > 1 && hostname[len - 1] == '.')
+       lookup = stripped_hostname = g_strndup (hostname, len - 1);
+   else
+       lookup = hostname;
+
    /* Fetch the domain portion of the hostname and check whether
     * it's a public domain. */
-   unregistrable_domain = psl_unregistrable_domain (psl, hostname);
+   unregistrable_domain = psl_unregistrable_domain (psl, lookup);
    if (!psl_is_public_suffix2 (psl, unregistrable_domain, PSL_TYPE_ANY | PSL_TYPE_NO_STAR_RULE)) {
        g_set_error_literal (error, SOUP_TLD_ERROR,
                     SOUP_TLD_ERROR_NO_BASE_DOMAIN,
                     _("Hostname has no base domain"));
+       g_free (stripped_hostname);
        return NULL;
    }

-   registrable_domain = psl_registrable_domain (psl, hostname);
+   registrable_domain = psl_registrable_domain (psl, lookup);
    if (!registrable_domain) {
        g_set_error_literal (error, SOUP_TLD_ERROR,
                     SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS,
                     _("Not enough domains"));
+       g_free (stripped_hostname);
        return NULL;
    }

+   registrable_domain = hostname + (registrable_domain - lookup);
+   g_free (stripped_hostname);
+
    return registrable_domain;
 }

3. All Apache-based tests (auth, connection, range, proxy, pull-api): httpd refuses to start

AH00526: Syntax error on line 285 of .../build/tests/httpd.conf:
AuthDigestQop is deprecated: only 'auth' is supported

Apache 2.4.69 dropped RFC 2069-style Digest (AuthDigestQop none). No test checks for the absence of qop specifically, so realm3 can simply use regular Digest:

0003-tests-Drop-AuthDigestQop-none.patch

diff --git a/tests/httpd.conf.in b/tests/httpd.conf.in
index 93fb7ff4..37992c1d 100644
--- a/tests/httpd.conf.in
+++ b/tests/httpd.conf.in
@@ -281,6 +281,4 @@ Alias /Digest .
   AuthUserFile ./htdigest
   AuthDigestDomain /Digest/realm3
   Require valid-user
-  # test RFC2069-style Digest
-  AuthDigestQop none
 </Location>

raurodse commented on 2026-08-06 16:56 (UTC) (edited on 2026-08-07 08:15 (UTC) by raurodse)

Hi, I'm trying to compile it, but it keeps failing during the tests. Specifically, it starts failing from test 32 onward. On Test 32 get time out error, and rest tests after that fail because a web server is supposed to be running.

Add exit code when compile

32/37 libsoup:server-test TIMEOUT 60.01s killed by signal 15 SIGTERM

MALLOC_CHECK_=2 G_TEST_SRCDIR=/home/kbut/.cache/yay/libsoup/src/libsoup/tests MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MESON_TEST_ITERATION=1 MALLOC_PERTURB_=227 G_TEST_BUILDDIR=/home/kbut/.cache/yay/libsoup/src/build/tests G_DEBUG=gc-friendly ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 LD_LIBRARY_PATH=/home/kbut/.cache/yay/libsoup/src/build/libsoup:/home/kbut/.cache/yay/libsoup/src/build/tests:/home/kbut/.cache/yay/libsoup/src/build/libsoup /home/kbut/.cache/yay/libsoup/src/build/tests/server-test ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TAP version 14

<h1>random seed: R02S96a8282987ca0727679639f31b7f98a8</h1> <h1>GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation gnutls (GTlsBackendGnutls) for ‘gio-tls-backend’ 1..17</h1> <h1>Start of server tests</h1> <h1>Bug Reference: https://bugzilla.gnome.org/590751</h1>

ok 1 /server/OPTIONS *

<h1>Bug Reference: https://bugzilla.gnome.org/703694</h1> <h1>GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation dummy (GDummyProxyResolver) for ‘gio-proxy-resolver’</h1>

eduardosato commented on 2026-07-29 17:52 (UTC)

Replying to my own comment. I was able to fix the issue by closing Firefox before building the package. Apparently having Firefox running interferes with libsoup's tests.

eduardosato commented on 2026-07-29 17:39 (UTC) (edited on 2026-07-29 17:39 (UTC) by eduardosato)

I am currently having trouble installing this package. I get the following error:

33/37 libsoup:auth-test OK 5.17s 34/37 libsoup:connection-test OK 1.67s 35/37 libsoup:range-test OK 1.09s 36/37 libsoup:proxy-test OK 1.36s 37/37 libsoup:pull-api-test OK 1.52s

Summary of Failures:

32/37 libsoup:hsts-db-test TIMEOUT 60.03s killed by signal 15 SIGTERM

Ok: 36
Fail: 0
Timeout: 1

Full log written to /home/xxxxxx/.cache/yay/libsoup/src/build/meson-logs/testlog.txt ==> ERROR: A failure occurred in check(). Aborting... -> error making: libsoup-exit status 4 -> Failed to install the following packages. Manual intervention is required: libsoup - exit status 4