GNU bug report logs - #68228
[PATCH] gnu: Add gnome-software.

Previous Next

Package: guix-patches;

Reported by: Justin Veilleux <terramorpha <at> cock.li>

Date: Wed, 3 Jan 2024 06:32:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Justin Veilleux <terramorpha <at> cock.li>
Subject: bug#68228: closed (Re: [bug#68228] [PATCH v4] gnu: Add
 gnome-software.)
Date: Thu, 20 Mar 2025 05:50:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#68228: [PATCH] gnu: Add gnome-software.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 68228 <at> debbugs.gnu.org.

-- 
68228: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68228
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Noé Lopez <noe <at> xn--no-cja.eu>
Cc: terramorpha <terramorpha <at> cock.li>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Vivien Kraus <vivien <at> planete-kraus.eu>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 68228-done <at> debbugs.gnu.org
Subject: Re: [bug#68228] [PATCH v4] gnu: Add gnome-software.
Date: Thu, 20 Mar 2025 14:49:02 +0900
Hi,

Noé Lopez <noe <at> noé.eu> writes:

> From: terramorpha <terramorpha <at> cock.li>
>
> * gnu/packages/gnome.scm (gnome-software): New variable.

A 2nd look on it from my side.  Apologies for failing to mention these
in my first look.

[...]

> +(define-public gnome-software
> +  (package
> +    (name "gnome-software")
> +    (version "46.5")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri
> +        (string-append "mirror://gnome/sources/"
> +                       name "/"
> +                       (version-major version) "/"
> +                       name "-" version ".tar.xz"))
> +       (sha256 (base32 "0b5y9z64582aarw3v92wjm63yib2q85ylny1k7k4d2y48jivirb9"))))
> +    (build-system meson-build-system)
> +    (arguments
> +     (list
> +      #:test-options #~(list "--no-suite=plugins") ;needs a dbus-system
> +      #:glib-or-gtk? #t
> +      #:configure-flags
> +      #~(list "-Dsoup2=true"

Why forcing libsoup2?  libsoup2 is deprecated in GNOME; we should be
using the newer version.  If there are problems, it should be ideally
resolved, failing that at least a comment should appear above to explain
why we force libsoup2.

From meson.build, it seems we should be able to use libsoup v3:

--8<---------------cut here---------------start------------->8---
if get_option('soup2')
  libsoup = dependency('libsoup-2.4', version : '>= 2.52.0')
  libsoupapiversion = '2.4'
  conf.set('SOUP_HTTP_URI_FLAGS', '(G_URI_FLAGS_HAS_PASSWORD | G_URI_FLAGS_ENCODED_PATH | G_URI_FLAGS_ENCODED_QUERY | G_URI_FLAGS_ENCODED_FRAGMENT | G_URI_FLAGS_SCHEME_NORMALIZE)')
else
  libsoup = dependency('libsoup-3.0', version : '>= 3.0')
  libsoupapiversion = '3.0'
endif
--8<---------------cut here---------------end--------------->8---


> +              "-Dman=false"             ;tries to access the internet

That surprises me!  Looking at src/meson.build, I see:

--8<---------------cut here---------------start------------->8---
if get_option('man')
  xsltproc = find_program('xsltproc')
  custom_target('manfile-gnome-software',
    input: 'gnome-software.xml',
    output: 'gnome-software.1',
    install: true,
    install_dir: join_paths(get_option('mandir'), 'man1'),
    command: [
      xsltproc,
      '--nonet',
      '--stringparam', 'man.output.quietly', '1',
      '--stringparam', 'funcsynopsis.style', 'ansi',
      '--stringparam', 'man.th.extra1.suppress', '1',
      '--stringparam', 'man.authors.section.enabled', '0',
      '--stringparam', 'man.copyright.section.enabled', '0',
      '-o', '@OUTPUT@',
      'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
      '@INPUT@'
    ]
  )
endif
--8<---------------cut here---------------end--------------->8---

We were just missing the docbook-xsl and libxslt packages as native
inputs.

> +              "-Dhardcoded_proprietary_webapps=false")
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'patch-iso-codes
> +            (lambda _
> +              (with-directory-excursion "src"
> +                (substitute* "./gs-language.c"
> +                  (("DATADIR")
> +                   (format #f "\"~a/share\"" #$iso-codes))))))
> +          (add-before 'install 'disable-gtk-update-icon-cache
> +            (lambda _
> +              (setenv "DESTDIR" "/")
> +              ;; Needed for complete RUNPATHs, but not actually needed at runtime.
> +              (copy-file
> +               "../build/lib/libgnomesoftware.so.20"
> +               (string-append #$output "/lib/libgnomesoftware.so.20")))))))

The above lib copying is weird, but it indeed relates to some
post-install script that has to do with generating the icon cache (at
least that's one of the things it does).  Perhaps we could disable this
post-install script instead and avoid that useful library?

> +    (native-inputs
> +     (list `(,glib "bin")
> +           gettext-minimal
> +           gtk-doc
> +           pkg-config))
> +    (inputs
> +     (list appstream
> +           flatpak
> +           fwupd
> +           gdk-pixbuf
> +           gtk
> +           json-glib
> +           libadwaita
> +           libglib-testing

Hm, the above is for some epiphany self-test plugin, which appears
only useful while running the test suite; 'guix size gnome-software'
doesn't list it either, so it can indeed be moved to the native inputs.


> +           libgudev
> +           libostree
> +           libsoup-minimal-2
> +           libxmlb
> +           malcontent
> +           packagekit
> +           polkit
> +           sysprof
> +           valgrind))

sysprof and valgrind should also be moved to native inputs (aka build
time dependencies).

> +    (synopsis "Graphical software manager for gnome")

s/gnome/GNOME/

> +    (description "Software allows you to find and install new apps and system
>

> +extensions and remove existing installed apps.")

I'd use s/apps/applications/, and call it 'GNOME Software' instead of
just 'Software'.

Actually, having tested that hands on, I was satisfied with a version
that implements most of the above changes:

--8<---------------cut here---------------start------------->8---
1 file changed, 18 insertions(+), 14 deletions(-)
gnu/packages/gnome.scm | 32 ++++++++++++++++++--------------

modified   gnu/packages/gnome.scm
@@ -14616,12 +14616,13 @@ (define-public gnome-software
     (build-system meson-build-system)
     (arguments
      (list
-      #:test-options #~(list "--no-suite=plugins") ;needs a dbus-system
+      #:test-options
+      ;; The plugins test suite requires a D-Bus system session, which
+      ;; attempts to set its session under /var/run and fails.
+      #~(list "--no-suite=plugins")
       #:glib-or-gtk? #t
       #:configure-flags
-      #~(list "-Dsoup2=true"
-              "-Dman=false"             ;tries to access the internet
-              "-Dhardcoded_proprietary_webapps=false")
+      #~(list "-Dhardcoded_proprietary_webapps=false")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-iso-codes
@@ -14638,10 +14639,15 @@ (define-public gnome-software
                "../build/lib/libgnomesoftware.so.20"
                (string-append #$output "/lib/libgnomesoftware.so.20")))))))
     (native-inputs
-     (list `(,glib "bin")
+     (list docbook-xsl
            gettext-minimal
+           `(,glib "bin")
            gtk-doc
-           pkg-config))
+           libglib-testing
+           libxslt                      ;for xsltproc
+           pkg-config
+           sysprof
+           valgrind))
     (inputs
      (list appstream
            flatpak
@@ -14650,18 +14656,16 @@ (define-public gnome-software
            gtk
            json-glib
            libadwaita
-           libglib-testing
            libgudev
            libostree
-           libsoup-minimal-2
+           libsoup-minimal
            libxmlb
            malcontent
            packagekit
-           polkit
-           sysprof
-           valgrind))
-    (synopsis "Graphical software manager for gnome")
-    (description "Software allows you to find and install new apps and system
-extensions and remove existing installed apps.")
+           polkit))
+    (synopsis "Graphical software manager for GNOME")
+    (description "GNOME Software allows you to find and install new
+applications and system extensions and remove existing installed
+applications.")
     (license license:gpl2+)
     (home-page "https://apps.gnome.org/en/Software/")))

--8<---------------cut here---------------end--------------->8---

So I've already pushed it as commit 77ff73a920, add myself as co-author
via a git trailer in the commit message.

To be able to use libsoup 3, I had to update ostree first to have it use
libsoup 3 as well.

Thank you!

-- 
Maxim

[Message part 3 (message/rfc822, inline)]
From: Justin Veilleux <terramorpha <at> cock.li>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add gnome-software.
Date: Wed, 03 Jan 2024 01:30:38 -0500
[Message part 4 (text/plain, inline)]
Hi. This is a patch for gnome-software.

Cheers.

[0001-gnu-Add-gnome-software.patch (text/x-patch, attachment)]

This bug report was last modified 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.