diff mbox series

[bug#67473,gnome-team,v2,09/13] gnu: Remove libsoup-minimal.

Message ID b6830c7ba3c4f13667362919a65b22505bb9c2a7.1701174883.git.vivien@planete-kraus.eu
State New
Headers show
Series None | expand

Commit Message

Vivien Kraus Nov. 28, 2023, 7:24 a.m. UTC
* gnu/packages/gnome.scm (libsoup-minimal): Remove.
(libsoup-minimal-2): Do not inherit libsoup-minimal.
(libsoup): Inherit libsoup-minimal-2 instead of libsoup-minimal.
(rhythmbox): Replace libsoup-minimal with libsoup.
* gnu/packages/mastodon.scm (tuba) [inputs]: Same.
* gnu/packages/messaging.scm (python-nbxmpp) [inputs]: Same.
* gnu/packages/radio.scm (gnuais) [inputs]: Same.

Change-Id: Ic57cdd0c2f7d3ceba19d7c84780b24ff2dac221f
---
 gnu/packages/gnome.scm     | 93 +++++++++++++++-----------------------
 gnu/packages/mastodon.scm  |  2 +-
 gnu/packages/messaging.scm |  2 +-
 gnu/packages/radio.scm     |  2 +-
 4 files changed, 39 insertions(+), 60 deletions(-)

Comments

Liliana Marie Prikler Nov. 28, 2023, 8:05 p.m. UTC | #1
Am Dienstag, dem 28.11.2023 um 08:24 +0100 schrieb Vivien Kraus:
> * gnu/packages/gnome.scm (libsoup-minimal): Remove.
> (libsoup-minimal-2): Do not inherit libsoup-minimal.
> (libsoup): Inherit libsoup-minimal-2 instead of libsoup-minimal.
Sorry for the weird wording:  By unify, I meant unify their versions,
not making them the same package.  That being said…

> (rhythmbox): Replace libsoup-minimal with libsoup.
> * gnu/packages/mastodon.scm (tuba) [inputs]: Same.
> * gnu/packages/messaging.scm (python-nbxmpp) [inputs]: Same.
> * gnu/packages/radio.scm (gnuais) [inputs]: Same.
> 
> Change-Id: Ic57cdd0c2f7d3ceba19d7c84780b24ff2dac221f
> ---
>  gnu/packages/gnome.scm     | 93 +++++++++++++++---------------------
> --
>  gnu/packages/mastodon.scm  |  2 +-
>  gnu/packages/messaging.scm |  2 +-
>  gnu/packages/radio.scm     |  2 +-
>  4 files changed, 39 insertions(+), 60 deletions(-)
> 
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 7baef6ae5d..904a8cacfe 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -5004,11 +5004,10 @@ (define-public libshumate
>  as OpenStreetMap, OpenCycleMap, OpenAerialMap and Maps.")
>      (license license:lgpl2.1+)))
>  
> -;;; A minimal version of libsoup used to prevent a cycle with
> Inkscape.
> -(define-public libsoup-minimal
> +(define-public libsoup-minimal-2
… is the cycle with inkscape not still a concern?
>    (package
>      (name "libsoup-minimal")
> -    (version "3.0.7")
> +    (version "2.74.3")
>      (source (origin
>                (method url-fetch)
>                (uri (string-append "mirror://gnome/sources/libsoup/"
> @@ -5016,34 +5015,40 @@ (define-public libsoup-minimal
>                                    "libsoup-" version ".tar.xz"))
>                (sha256
>                 (base32
> -               
> "1j7p3cz6hwi9js9rp0pbas7cdln97yg9v2l1nv5imhcr6p7r1pzb"))))
> +               
> "04rgv6hkyhgi7lak9865yxgbgky6gc635p7w6nhcbj64rx0prdz4"))))
>      (build-system meson-build-system)
>      (arguments
> -     `(#:configure-flags '("-Dgtk_doc=false")
> -       #:phases
> -       (modify-phases %standard-phases
> -         (add-after 'unpack 'adjust-tests
> -           (lambda _
> -             ;; This test fails due to missing /etc/nsswitch.conf
> -             ;; in the build environment.
> -             (substitute* "tests/socket-test.c"
> -               ((".*/sockets/unconnected.*") ""))
> -
> -             ;; These fail because "subdomain.localhost" does not
> resolve in
> -             ;; the build environment.  Moreover, the hsts-test
> suite fails on
> -             ;; i686-linux because of errors from `session_get_uri'
> like
> -             ;; "Unexpected status 200 OK (expected 301 Moved
> Permanently)"
> -             ;; (see:
> https://gitlab.gnome.org/GNOME/libsoup/-/issues/239).
> -             (substitute* "tests/meson.build"
> -               ((".*'name': 'hsts'.*") ""))
> -             (substitute* "tests/hsts-db-test.c"
> -               ((".*/hsts-db/subdomains.*") "")))))))
> +     (list
> +      #:configure-flags #~'("-Dgtk_doc=false")
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'adjust-tests
> +            (lambda _
> +              ;; This test fails due to missing /etc/nsswitch.conf
> +              ;; in the build environment.
> +              (substitute* "tests/socket-test.c"
> +                ((".*/sockets/unconnected.*") ""))
> +
> +              ;; These fail because "subdomain.localhost" does not
> resolve in
> +              ;; the build environment.  Moreover, the hsts-test
> suite fails on
> +              ;; i686-linux because of errors from `session_get_uri'
> like
> +              ;; "Unexpected status 200 OK (expected 301 Moved
> Permanently)"
> +              ;; (see:
> https://gitlab.gnome.org/GNOME/libsoup/-/issues/239).
> +              (substitute* "tests/meson.build"
> +                ((".*'name': 'hsts'.*") ""))
> +              (substitute* "tests/hsts-db-test.c"
> +                ((".*/hsts-db/subdomains.*") ""))
> +
> +              ;; Disable the SSL test, failing since 2.68 and
> resolved in
> +              ;; libsoup 3.
> +              (substitute* "tests/meson.build"
> +                (("[ \t]*\\['ssl', true, \\[\\]\\],") "")))))))
>      (native-inputs
>       (list `(,glib "bin") ;for glib-mkenums
>             gobject-introspection
>             pkg-config
>             python-wrapper
> -           vala
> +           vala-0.52
>             curl
>             gnutls ;for 'certtool'
>             httpd/pinned))
> @@ -5067,35 +5072,8 @@ (define-public libsoup-minimal
>  and the GLib main loop, to integrate well with GNOME applications.")
>      (license license:lgpl2.0+)))
>  
> -;;; An older variant kept to build the 'rest' package.
> -(define-public libsoup-minimal-2
> -  (package
> -    (inherit libsoup-minimal)
> -    (version "2.74.3")
> -    (source (origin
> -              (method url-fetch)
> -              (uri (string-append "mirror://gnome/sources/libsoup/"
> -                                  (version-major+minor version) "/"
> -                                  "libsoup-" version ".tar.xz"))
> -              (sha256
> -               (base32
> -               
> "04rgv6hkyhgi7lak9865yxgbgky6gc635p7w6nhcbj64rx0prdz4"))))
> -    (arguments
> -     (substitute-keyword-arguments (package-arguments libsoup-
> minimal)
> -       ((#:phases phases)
> -        `(modify-phases ,phases
> -           (add-after 'unpack 'disable-failing-tests
> -             (lambda _
> -               ;; Disable the SSL test, failing since 2.68 and
> resolved in
> -               ;; libsoup 3.
> -               (substitute* "tests/meson.build"
> -                 (("[ \t]*\\['ssl', true, \\[\\]\\],") ""))))))))
> -    (native-inputs
> -     (modify-inputs (package-native-inputs libsoup-minimal)
> -       (replace "vala" vala-0.52)))))
> -
>  (define-public libsoup
> -  (package/inherit libsoup-minimal
> +  (package/inherit libsoup-minimal-2
>      (name "libsoup")
>      (version "3.4.4")
>      (source (origin
> @@ -5106,9 +5084,9 @@ (define-public libsoup
>                (sha256
>                 (base32
>                 
> "1an5n2sa70f40my4g20lk38s5ib99c32bzzg8gm91v9nbxr6f719"))))
> -    (outputs (cons "doc" (package-outputs libsoup-minimal)))
> +    (outputs (cons "doc" (package-outputs libsoup-minimal-2)))
>      (arguments
> -     (substitute-keyword-arguments (package-arguments libsoup-
> minimal)
> +     (substitute-keyword-arguments (package-arguments libsoup-
> minimal-2)
>         ((#:configure-flags configure-flags)
>          #~(delete "-Dgtk_doc=false" #$configure-flags))
>         ((#:phases phases)
> @@ -5134,8 +5112,9 @@ (define-public libsoup
>                  (mkdir-p (string-append #$output:doc "/share"))
>                  (rename-file (string-append #$output "/share/doc")
>                               (string-append #$output:doc
> "/share/doc"))))))))
> -    (native-inputs (modify-inputs (package-native-inputs libsoup-
> minimal)
> -                     (prepend gettext-minimal gi-docgen)))))
> +    (native-inputs (modify-inputs (package-native-inputs libsoup-
> minimal-2)
> +                     (prepend gettext-minimal gi-docgen)
> +                     (replace "vala" vala)))))
>  
>  (define-public libsecret
>    (package
> @@ -6789,7 +6768,7 @@ (define-public rhythmbox
>             libpeas
>             libsecret
>             libmtp
> -           libsoup-minimal
> +           libsoup
>             libxml2
>             lirc
>             pango
> diff --git a/gnu/packages/mastodon.scm b/gnu/packages/mastodon.scm
> index cbeccdb402..d766979070 100644
> --- a/gnu/packages/mastodon.scm
> +++ b/gnu/packages/mastodon.scm
> @@ -131,7 +131,7 @@ (define-public tuba
>             json-glib
>             libadwaita
>             libgee
> -           libsoup-minimal
> +           libsoup
>             libsecret
>             libwebp
>             libxml2
> diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
> index 1c5bc4bbd7..54ae080463 100644
> --- a/gnu/packages/messaging.scm
> +++ b/gnu/packages/messaging.scm
> @@ -1110,7 +1110,7 @@ (define-public python-nbxmpp
>      (inputs
>       (list glib
>             glib-networking
> -           libsoup-minimal
> +           libsoup
>             python-gssapi
>             python-idna
>             python-precis-i18n
> diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
> index 486244e154..e6d8eb9ab9 100644
> --- a/gnu/packages/radio.scm
> +++ b/gnu/packages/radio.scm
> @@ -2170,7 +2170,7 @@ (define-public gnuais
>       `(("alsa-lib" ,alsa-lib)
>         ("curl" ,curl)
>         ("gtk+" ,gtk+)
> -       ("libsoup" ,libsoup-minimal)
> +       ("libsoup" ,libsoup)
>         ("mariadb-lib" ,mariadb "lib")
>         ("osm-gps-map" ,osm-gps-map)
>         ("pulseaudio" ,pulseaudio)))

Cheers
Vivien Kraus Nov. 28, 2023, 9:26 p.m. UTC | #2
Le mardi 28 novembre 2023 à 21:05 +0100, Liliana Marie Prikler a
écrit :
> > -;;; A minimal version of libsoup used to prevent a cycle with
> > Inkscape.
> > -(define-public libsoup-minimal
> > +(define-public libsoup-minimal-2
> … is the cycle with inkscape not still a concern?
I don’t know why the comment was there, inkscape uses libsoup-minimal-
2.
Liliana Marie Prikler Nov. 29, 2023, 5:21 a.m. UTC | #3
Am Dienstag, dem 28.11.2023 um 22:26 +0100 schrieb Vivien Kraus:
> Le mardi 28 novembre 2023 à 21:05 +0100, Liliana Marie Prikler a
> écrit :
> > > -;;; A minimal version of libsoup used to prevent a cycle with
> > > Inkscape.
> > > -(define-public libsoup-minimal
> > > +(define-public libsoup-minimal-2
> > … is the cycle with inkscape not still a concern?
> I don’t know why the comment was there, inkscape uses libsoup-
> minimal-2.
Hmm, it's been carried over from back then, then.  Still, there were
other users of libsoup-minimal over libsoup, so we might want to keep
the variable even as we update both to a new, shared version.

Cheers
Vivien Kraus Nov. 29, 2023, 6:25 a.m. UTC | #4
Le mercredi 29 novembre 2023 à 06:21 +0100, Liliana Marie Prikler a
écrit :
> Still, there were
> other users of libsoup-minimal over libsoup, so we might want to keep
> the variable even as we update both to a new, shared version.
I’m tempted to say the users of libsoup-minimal used to depend on
libsoup@2, so they put libsoup-minimal-2, but then the package required
libsoup@3, and they just removed the "-2" suffix. Is there another
reason packages would want a doc-less version of libsoup?

I can make another series revision where libsoup-minimal is a
deprecated-package pointing to libsoup, or a doc-less libsoup@3. I
think the deprecated-package solution is the most useful. What do you
think?

Vivien
Liliana Marie Prikler Nov. 29, 2023, 4:22 p.m. UTC | #5
Am Mittwoch, dem 29.11.2023 um 07:25 +0100 schrieb Vivien Kraus:
> Le mercredi 29 novembre 2023 à 06:21 +0100, Liliana Marie Prikler a
> écrit :
> > Still, there were
> > other users of libsoup-minimal over libsoup, so we might want to
> > keep
> > the variable even as we update both to a new, shared version.
> I’m tempted to say the users of libsoup-minimal used to depend on
> libsoup@2, so they put libsoup-minimal-2, but then the package
> required
> libsoup@3, and they just removed the "-2" suffix. Is there another
> reason packages would want a doc-less version of libsoup?
Closure size?

> I can make another series revision where libsoup-minimal is a
> deprecated-package pointing to libsoup, or a doc-less libsoup@3. I
> think the deprecated-package solution is the most useful. What do you
> think?
I'd really like a second opinion here.  All I can say is that I don't
really trust my own gut feeling here.

Cheers
Maxim Cournoyer Dec. 4, 2023, 1:24 a.m. UTC | #6
Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Mittwoch, dem 29.11.2023 um 07:25 +0100 schrieb Vivien Kraus:
>> Le mercredi 29 novembre 2023 à 06:21 +0100, Liliana Marie Prikler a
>> écrit :
>> > Still, there were
>> > other users of libsoup-minimal over libsoup, so we might want to
>> > keep
>> > the variable even as we update both to a new, shared version.
>> I’m tempted to say the users of libsoup-minimal used to depend on
>> libsoup@2, so they put libsoup-minimal-2, but then the package
>> required
>> libsoup@3, and they just removed the "-2" suffix. Is there another
>> reason packages would want a doc-less version of libsoup?
> Closure size?
>
>> I can make another series revision where libsoup-minimal is a
>> deprecated-package pointing to libsoup, or a doc-less libsoup@3. I
>> think the deprecated-package solution is the most useful. What do you
>> think?
> I'd really like a second opinion here.  All I can say is that I don't
> really trust my own gut feeling here.

It appears libsoup and libsoup-minimal closures differs in size by only
little (100 KiB).  So unless there is a requirement here to avoid cycles
(which if there are, would be easy to spot: byte compiling guix would
not complete and bust memory), it could be removed.
diff mbox series

Patch

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 7baef6ae5d..904a8cacfe 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5004,11 +5004,10 @@  (define-public libshumate
 as OpenStreetMap, OpenCycleMap, OpenAerialMap and Maps.")
     (license license:lgpl2.1+)))
 
-;;; A minimal version of libsoup used to prevent a cycle with Inkscape.
-(define-public libsoup-minimal
+(define-public libsoup-minimal-2
   (package
     (name "libsoup-minimal")
-    (version "3.0.7")
+    (version "2.74.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/libsoup/"
@@ -5016,34 +5015,40 @@  (define-public libsoup-minimal
                                   "libsoup-" version ".tar.xz"))
               (sha256
                (base32
-                "1j7p3cz6hwi9js9rp0pbas7cdln97yg9v2l1nv5imhcr6p7r1pzb"))))
+                "04rgv6hkyhgi7lak9865yxgbgky6gc635p7w6nhcbj64rx0prdz4"))))
     (build-system meson-build-system)
     (arguments
-     `(#:configure-flags '("-Dgtk_doc=false")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'adjust-tests
-           (lambda _
-             ;; This test fails due to missing /etc/nsswitch.conf
-             ;; in the build environment.
-             (substitute* "tests/socket-test.c"
-               ((".*/sockets/unconnected.*") ""))
-
-             ;; These fail because "subdomain.localhost" does not resolve in
-             ;; the build environment.  Moreover, the hsts-test suite fails on
-             ;; i686-linux because of errors from `session_get_uri' like
-             ;; "Unexpected status 200 OK (expected 301 Moved Permanently)"
-             ;; (see: https://gitlab.gnome.org/GNOME/libsoup/-/issues/239).
-             (substitute* "tests/meson.build"
-               ((".*'name': 'hsts'.*") ""))
-             (substitute* "tests/hsts-db-test.c"
-               ((".*/hsts-db/subdomains.*") "")))))))
+     (list
+      #:configure-flags #~'("-Dgtk_doc=false")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'adjust-tests
+            (lambda _
+              ;; This test fails due to missing /etc/nsswitch.conf
+              ;; in the build environment.
+              (substitute* "tests/socket-test.c"
+                ((".*/sockets/unconnected.*") ""))
+
+              ;; These fail because "subdomain.localhost" does not resolve in
+              ;; the build environment.  Moreover, the hsts-test suite fails on
+              ;; i686-linux because of errors from `session_get_uri' like
+              ;; "Unexpected status 200 OK (expected 301 Moved Permanently)"
+              ;; (see: https://gitlab.gnome.org/GNOME/libsoup/-/issues/239).
+              (substitute* "tests/meson.build"
+                ((".*'name': 'hsts'.*") ""))
+              (substitute* "tests/hsts-db-test.c"
+                ((".*/hsts-db/subdomains.*") ""))
+
+              ;; Disable the SSL test, failing since 2.68 and resolved in
+              ;; libsoup 3.
+              (substitute* "tests/meson.build"
+                (("[ \t]*\\['ssl', true, \\[\\]\\],") "")))))))
     (native-inputs
      (list `(,glib "bin") ;for glib-mkenums
            gobject-introspection
            pkg-config
            python-wrapper
-           vala
+           vala-0.52
            curl
            gnutls ;for 'certtool'
            httpd/pinned))
@@ -5067,35 +5072,8 @@  (define-public libsoup-minimal
 and the GLib main loop, to integrate well with GNOME applications.")
     (license license:lgpl2.0+)))
 
-;;; An older variant kept to build the 'rest' package.
-(define-public libsoup-minimal-2
-  (package
-    (inherit libsoup-minimal)
-    (version "2.74.3")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/libsoup/"
-                                  (version-major+minor version) "/"
-                                  "libsoup-" version ".tar.xz"))
-              (sha256
-               (base32
-                "04rgv6hkyhgi7lak9865yxgbgky6gc635p7w6nhcbj64rx0prdz4"))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments libsoup-minimal)
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (add-after 'unpack 'disable-failing-tests
-             (lambda _
-               ;; Disable the SSL test, failing since 2.68 and resolved in
-               ;; libsoup 3.
-               (substitute* "tests/meson.build"
-                 (("[ \t]*\\['ssl', true, \\[\\]\\],") ""))))))))
-    (native-inputs
-     (modify-inputs (package-native-inputs libsoup-minimal)
-       (replace "vala" vala-0.52)))))
-
 (define-public libsoup
-  (package/inherit libsoup-minimal
+  (package/inherit libsoup-minimal-2
     (name "libsoup")
     (version "3.4.4")
     (source (origin
@@ -5106,9 +5084,9 @@  (define-public libsoup
               (sha256
                (base32
                 "1an5n2sa70f40my4g20lk38s5ib99c32bzzg8gm91v9nbxr6f719"))))
-    (outputs (cons "doc" (package-outputs libsoup-minimal)))
+    (outputs (cons "doc" (package-outputs libsoup-minimal-2)))
     (arguments
-     (substitute-keyword-arguments (package-arguments libsoup-minimal)
+     (substitute-keyword-arguments (package-arguments libsoup-minimal-2)
        ((#:configure-flags configure-flags)
         #~(delete "-Dgtk_doc=false" #$configure-flags))
        ((#:phases phases)
@@ -5134,8 +5112,9 @@  (define-public libsoup
                 (mkdir-p (string-append #$output:doc "/share"))
                 (rename-file (string-append #$output "/share/doc")
                              (string-append #$output:doc "/share/doc"))))))))
-    (native-inputs (modify-inputs (package-native-inputs libsoup-minimal)
-                     (prepend gettext-minimal gi-docgen)))))
+    (native-inputs (modify-inputs (package-native-inputs libsoup-minimal-2)
+                     (prepend gettext-minimal gi-docgen)
+                     (replace "vala" vala)))))
 
 (define-public libsecret
   (package
@@ -6789,7 +6768,7 @@  (define-public rhythmbox
            libpeas
            libsecret
            libmtp
-           libsoup-minimal
+           libsoup
            libxml2
            lirc
            pango
diff --git a/gnu/packages/mastodon.scm b/gnu/packages/mastodon.scm
index cbeccdb402..d766979070 100644
--- a/gnu/packages/mastodon.scm
+++ b/gnu/packages/mastodon.scm
@@ -131,7 +131,7 @@  (define-public tuba
            json-glib
            libadwaita
            libgee
-           libsoup-minimal
+           libsoup
            libsecret
            libwebp
            libxml2
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 1c5bc4bbd7..54ae080463 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1110,7 +1110,7 @@  (define-public python-nbxmpp
     (inputs
      (list glib
            glib-networking
-           libsoup-minimal
+           libsoup
            python-gssapi
            python-idna
            python-precis-i18n
diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index 486244e154..e6d8eb9ab9 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -2170,7 +2170,7 @@  (define-public gnuais
      `(("alsa-lib" ,alsa-lib)
        ("curl" ,curl)
        ("gtk+" ,gtk+)
-       ("libsoup" ,libsoup-minimal)
+       ("libsoup" ,libsoup)
        ("mariadb-lib" ,mariadb "lib")
        ("osm-gps-map" ,osm-gps-map)
        ("pulseaudio" ,pulseaudio)))