Package: guix-patches;
Reported by: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
Date: Fri, 11 Apr 2025 11:38:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77735 in the body.
You can then email your comments to 77735 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#77735
; Package guix-patches
.
(Fri, 11 Apr 2025 11:38:02 GMT) Full text and rfc822 format available.Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
:guix-patches <at> gnu.org
.
(Fri, 11 Apr 2025 11:38:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Rostislav Svoboda <rostislav.svoboda <at> gmail.com> To: guix-patches <at> gnu.org Cc: Rostislav Svoboda <Rostislav.Svoboda <at> gmail.com> Subject: [PATCH] gnu: flatpak: Fix "No GSettings schemas are installed on the system". Date: Fri, 11 Apr 2025 13:36:51 +0200
* gnu/packages/package-management.scm (flatpak)[inputs]: Add gsettings-desktop-schemas. <#:phases>: Set GSETTINGS_SCHEMA_DIR in wrap-phase. This fixes an error that appeared when running system-wide Flatpak operations such as 'sudo flatpak update': GLib-GIO-ERROR [...] No GSettings schemas are installed on the system The missing schemas from gsettings-desktop-schemas prevented proper GLib configuration lookups (e.g., org.gnome.system.proxy). By setting GSETTINGS_SCHEMA_DIR to point to gsettings-desktop-schemas' schema directory, we ensure Flatpak can access required GLib configuration templates. Change-Id: I9522c07b6c8ccf20a86ee966effb73eb61a2abc7 --- gnu/packages/package-management.scm | 261 ++++++++++++++-------------- 1 file changed, 135 insertions(+), 126 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 81dcf24857..798930588b 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -2040,135 +2040,144 @@ (define-public libostree (license license:lgpl2.0+))) (define-public flatpak - (package - (name "flatpak") - (version "1.16.0") - (source - (origin - (method url-fetch) - (uri (string-append "https://github.com/flatpak/flatpak/releases/download/" - version "/flatpak-" version ".tar.xz")) - (sha256 - (base32 "0ajbz8ms4h5nyjr59hv9z8vaimj4f3p51v8idmy14qnbmmjwa2nb")) - (patches - (search-patches "flatpak-fix-fonts-icons.patch" - "flatpak-fix-path.patch" - "flatpak-fix-icon-validation.patch" - "flatpak-unset-gdk-pixbuf-for-sandbox.patch")))) - (build-system meson-build-system) - (arguments - (list - #:configure-flags - #~(list - "-Dsystem_helper=disabled" - "-Dlocalstatedir=/var" - (string-append "-Dsystem_bubblewrap=" - (assoc-ref %build-inputs "bubblewrap") - "/bin/bwrap") - (string-append "-Dsystem_dbus_proxy=" - (assoc-ref %build-inputs "xdg-dbus-proxy") - "/bin/xdg-dbus-proxy")) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'disable-failing-tests - (lambda _ - (substitute* "tests/test-matrix/meson.build" - ;; The following tests fail with error message related to fusermount3 - ;; failing an unmount operation ("No such file or directory"). - (("^.*test-http-utils.*$") "") - (("^.*test-summaries <at> system.wrap.*$") "") - (("^.*test-prune.*$") "")))) - (add-after 'unpack 'fix-tests - (lambda* (#:key inputs #:allow-other-keys) - (copy-recursively - (search-input-directory inputs "lib/locale") - "/tmp/locale") - (for-each make-file-writable (find-files "/tmp")) - (substitute* "tests/make-test-runtime.sh" - (("cp `which.*") "echo guix\n") - (("cp -r /usr/lib/locale/C\\.\\*") - (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \ + (let ((release "1.16.0") + (revision "1")) + (package + (name "flatpak") + (version (string-append release "-" revision)) + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/flatpak/flatpak/releases/download/" + release "/flatpak-" release ".tar.xz")) + (sha256 + (base32 "0ajbz8ms4h5nyjr59hv9z8vaimj4f3p51v8idmy14qnbmmjwa2nb")) + (patches + (search-patches "flatpak-fix-fonts-icons.patch" + "flatpak-fix-path.patch" + "flatpak-fix-icon-validation.patch" + "flatpak-unset-gdk-pixbuf-for-sandbox.patch")))) + (build-system meson-build-system) + (arguments + (list + #:configure-flags + #~(list + "-Dsystem_helper=disabled" + "-Dlocalstatedir=/var" + (string-append "-Dsystem_bubblewrap=" + (assoc-ref %build-inputs "bubblewrap") + "/bin/bwrap") + (string-append "-Dsystem_dbus_proxy=" + (assoc-ref %build-inputs "xdg-dbus-proxy") + "/bin/xdg-dbus-proxy")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'disable-failing-tests + (lambda _ + (substitute* "tests/test-matrix/meson.build" + ;; The following tests fail with error message related to fusermount3 + ;; failing an unmount operation ("No such file or directory"). + (("^.*test-http-utils.*$") "") + (("^.*test-summaries <at> system.wrap.*$") "") + (("^.*test-prune.*$") "")))) + (add-after 'unpack 'fix-tests + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively + (search-input-directory inputs "lib/locale") + "/tmp/locale") + (for-each make-file-writable (find-files "/tmp")) + (substitute* "tests/make-test-runtime.sh" + (("cp `which.*") "echo guix\n") + (("cp -r /usr/lib/locale/C\\.\\*") + (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \ cp -r /tmp/locale/*/en_US.*"))) - (substitute* "tests/libtest.sh" - (("/bin/kill") (which "kill")) - (("/usr/bin/python3") (which "python3"))) - #t)) - (add-after 'unpack 'p11-kit-fix - (lambda* (#:key inputs #:allow-other-keys) - (let ((p11-path (search-input-file inputs "/bin/p11-kit"))) - (substitute* "session-helper/flatpak-session-helper.c" - (("\"p11-kit\",") - (string-append "\"" p11-path "\",")) - (("if \\(g_find_program_in_path \\(\"p11-kit\"\\)\\)") - (string-append "if (g_find_program_in_path (\"" - p11-path "\"))")))))) - (add-after 'unpack 'fix-icon-validation - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (store (dirname out))) - (substitute* "icon-validator/validate-icon.c" - (("@storeDir@") store))))) - (add-before 'check 'pre-check - (lambda _ - ;; Set $HOME to writable location for testcommon tests. - (setenv "HOME" "/tmp"))) - (add-after 'install 'wrap-flatpak - (lambda* (#:key inputs #:allow-other-keys) - (let ((flatpak (string-append #$output "/bin/flatpak")) - (glib-networking (assoc-ref inputs "glib-networking"))) - (wrap-program flatpak - ;; Allow GIO to find TLS backend. - `("GIO_EXTRA_MODULES" prefix - (,(string-append glib-networking "/lib/gio/modules")))))))))) - (native-inputs - (list bison - dbus ; for dbus-daemon - gettext-minimal - `(,glib "bin") ; for glib-mkenums + gdbus-codegen - gtk-doc - (libc-utf8-locales-for-target) - gobject-introspection - libcap - pkg-config - python - python-pyparsing - socat - which)) - (inputs - (list appstream - appstream-glib - bash-minimal - bubblewrap - curl - fuse - gdk-pixbuf - libcap - libostree - libsoup-minimal-2 - libxml2 - p11-kit - polkit - util-linux - xdg-dbus-proxy - zstd)) - (propagated-inputs (list glib-networking - gnupg - gsettings-desktop-schemas - ;; The following are listed in Requires.private of - ;; `flatpak.pc'. - curl - dconf - gpgme - json-glib - libarchive - libseccomp - libxau)) - (home-page "https://flatpak.org") - (synopsis "System for building, distributing, and running sandboxed desktop + (substitute* "tests/libtest.sh" + (("/bin/kill") (which "kill")) + (("/usr/bin/python3") (which "python3"))) + #t)) + (add-after 'unpack 'p11-kit-fix + (lambda* (#:key inputs #:allow-other-keys) + (let ((p11-path (search-input-file inputs "/bin/p11-kit"))) + (substitute* "session-helper/flatpak-session-helper.c" + (("\"p11-kit\",") + (string-append "\"" p11-path "\",")) + (("if \\(g_find_program_in_path \\(\"p11-kit\"\\)\\)") + (string-append "if (g_find_program_in_path (\"" + p11-path "\"))")))))) + (add-after 'unpack 'fix-icon-validation + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (store (dirname out))) + (substitute* "icon-validator/validate-icon.c" + (("@storeDir@") store))))) + (add-before 'check 'pre-check + (lambda _ + ;; Set $HOME to writable location for testcommon tests. + (setenv "HOME" "/tmp"))) + (add-after 'install 'wrap-flatpak + (lambda* (#:key inputs #:allow-other-keys) + (let ((flatpak (string-append #$output "/bin/flatpak")) + (glib-networking (assoc-ref inputs "glib-networking"))) + (wrap-program flatpak + ;; Prevent error: + ;; "No GSettings schemas are installed on the system" + `("GSETTINGS_SCHEMA_DIR" = + (, (string-append + #$(this-package-input "gsettings-desktop-schemas") + "/share/glib-2.0/schemas"))) + ;; Allow GIO to find TLS backend. + `("GIO_EXTRA_MODULES" prefix + (,(string-append glib-networking "/lib/gio/modules")))))))))) + (native-inputs + (list bison + dbus ; for dbus-daemon + gettext-minimal + `(,glib "bin") ; for glib-mkenums + gdbus-codegen + gtk-doc + (libc-utf8-locales-for-target) + gobject-introspection + libcap + pkg-config + python + python-pyparsing + socat + which)) + (inputs + (list appstream + appstream-glib + bash-minimal + bubblewrap + curl + fuse + gsettings-desktop-schemas + gdk-pixbuf + libcap + libostree + libsoup-minimal-2 + libxml2 + p11-kit + polkit + util-linux + xdg-dbus-proxy + zstd)) + (propagated-inputs (list glib-networking + gnupg + gsettings-desktop-schemas + ;; The following are listed in Requires.private of + ;; `flatpak.pc'. + curl + dconf + gpgme + json-glib + libarchive + libseccomp + libxau)) + (home-page "https://flatpak.org") + (synopsis "System for building, distributing, and running sandboxed desktop applications") - (description "Flatpak is a system for building, distributing, and running + (description "Flatpak is a system for building, distributing, and running sandboxed desktop applications on GNU/Linux.") - (license license:lgpl2.1+))) + (license license:lgpl2.1+)))) (define-public fpm (package base-commit: 772b70455d0d5972fdad80d8529647dce20f409a -- 2.49.0
guix-patches <at> gnu.org
:bug#77735
; Package guix-patches
.
(Wed, 16 Apr 2025 16:27:02 GMT) Full text and rfc822 format available.Message #8 received at 77735 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Rostislav Svoboda <rostislav.svoboda <at> gmail.com> Cc: 77735 <at> debbugs.gnu.org Subject: Re: [bug#77735] [PATCH] gnu: flatpak: Fix "No GSettings schemas are installed on the system". Date: Wed, 16 Apr 2025 17:31:33 +0200
Rostislav Svoboda <rostislav.svoboda <at> gmail.com> writes: > * gnu/packages/package-management.scm (flatpak)[inputs]: Add > gsettings-desktop-schemas. > <#:phases>: Set GSETTINGS_SCHEMA_DIR in wrap-phase. > > This fixes an error that appeared when running system-wide Flatpak > operations such as 'sudo flatpak update': > > GLib-GIO-ERROR [...] No GSettings schemas are installed on the system > > The missing schemas from gsettings-desktop-schemas prevented proper GLib > configuration lookups (e.g., org.gnome.system.proxy). By setting > GSETTINGS_SCHEMA_DIR to point to gsettings-desktop-schemas' schema directory, > we ensure Flatpak can access required GLib configuration templates. > > Change-Id: I9522c07b6c8ccf20a86ee966effb73eb61a2abc7 [...] > + (let ((release "1.16.0") > + (revision "1")) > + (package > + (name "flatpak") > + (version (string-append release "-" revision)) That’s not something we do; just keep the ‘version’ field unchanged. > + (add-after 'install 'wrap-flatpak > + (lambda* (#:key inputs #:allow-other-keys) > + (let ((flatpak (string-append #$output "/bin/flatpak")) > + (glib-networking (assoc-ref inputs "glib-networking"))) > + (wrap-program flatpak > + ;; Prevent error: > + ;; "No GSettings schemas are installed on the system" > + `("GSETTINGS_SCHEMA_DIR" = Should it be ‘prefix’ instead of ‘=’? Apart from that it LGTM, thanks! Ludo’.
guix-patches <at> gnu.org
:bug#77735
; Package guix-patches
.
(Wed, 16 Apr 2025 17:01:07 GMT) Full text and rfc822 format available.Message #11 received at 77735 <at> debbugs.gnu.org (full text, mbox):
From: Rostislav Svoboda <rostislav.svoboda <at> gmail.com> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 77735 <at> debbugs.gnu.org Subject: Re: [bug#77735] [PATCH] gnu: flatpak: Fix "No GSettings schemas are installed on the system". Date: Wed, 16 Apr 2025 18:59:10 +0200
[Message part 1 (text/plain, inline)]
Hello Ludo > > + (let ((release "1.16.0") > > + (revision "1")) > > + (package > > + (name "flatpak") > > + (version (string-append release "-" revision)) > > That’s not something we do; just keep the ‘version’ field unchanged. I've seen some examples like: ``` $ sed -n "5695,5725p" gnu/packages/maths.scm (define-public muparser ;; When switching download sites, muparser re-issued a 2.2.5 release with a ;; different hash. In order to make `guix package --upgrade` work correctly, ;; we set a Guix packaging revision. ;; When the next version of muparser is released, we can remove ;; UPSTREAM-VERSION and REVISION and use the plain VERSION. (let ((upstream-version "2.2.5") (revision "2")) (package (name "muparser") (version (string-append upstream-version "-" revision)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/beltoforion/muparser") (commit (string-append "v" upstream-version)))) (file-name (git-file-name name version)) (sha256 (base32 "0f0g4995xngf1pp3zr4p6ai2f8v6f8bxwa0k8ayjjiv1l8h44m24")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--enable-samples=no") #:tests? #f)) ;no "check" target (home-page "http://muparser.beltoforion.de/") (synopsis "Fast parser library for mathematical expressions") (description "muParser is an extensible high performance math parser library. It is based on transforming an expression into a bytecode and precalculating constant parts of it.") (license license:expat)))) ``` Run `rg --type=lisp --before-context=5 --after-context=2 'version.*string-append.*revision'` to get some more. (But if you insist then I changed that - see attachment) > > + (add-after 'install 'wrap-flatpak > > + (lambda* (#:key inputs #:allow-other-keys) > > + (let ((flatpak (string-append #$output "/bin/flatpak")) > > + (glib-networking (assoc-ref inputs "glib-networking"))) > > + (wrap-program flatpak > > + ;; Prevent error: > > + ;; "No GSettings schemas are installed on the system" > > + `("GSETTINGS_SCHEMA_DIR" = > > Should it be ‘prefix’ instead of ‘=’? I found plenty of examples using '='. E.g.: ``` gnu/packages/containers.scm 682: (wrap-program (string-append #$output "/bin/buildah") 683- `("CONTAINERS_HELPER_BINARY_DIR" = 684- (,(string-append #$output "/_guix"))) gnu/packages/sawfish.scm 157: (wrap-program (string-append out script) 158- `("REP_DL_LOAD_PATH" = 159- ,(list (getenv "REP_DL_LOAD_PATH") ``` Run `rg --type=lisp --after-context=2 '\(wrap-program'` get some more. Cheers Bost
[0001-gnu-flatpak-Fix-No-GSettings-schemas-are-installed-o.patch (application/x-patch, attachment)]
Ludovic Courtès <ludo <at> gnu.org>
:Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
:Message #16 received at 77735-done <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Rostislav Svoboda <rostislav.svoboda <at> gmail.com> Cc: 77735-done <at> debbugs.gnu.org Subject: Re: [bug#77735] [PATCH] gnu: flatpak: Fix "No GSettings schemas are installed on the system". Date: Thu, 17 Apr 2025 22:31:51 +0200
Hey Bost, Rostislav Svoboda <rostislav.svoboda <at> gmail.com> writes: > I've seen some examples like: I don’t doubt there are counterexamples, but! this one: > (define-public muparser > ;; When switching download sites, muparser re-issued a 2.2.5 release with a > ;; different hash. In order to make `guix package --upgrade` work correctly, > ;; we set a Guix packaging revision. > ;; When the next version of muparser is released, we can remove > ;; UPSTREAM-VERSION and REVISION and use the plain VERSION. … apparently had a good reason to do so. :-) Not sure about the others. > (But if you insist then I changed that - see attachment) Applied, thanks! Ludo’.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Fri, 16 May 2025 11:24:06 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.