GNU bug report logs - #75157
Grafting inconsistency with multiple outputs is causing problems

Previous Next

Package: guix;

Reported by: Dariqq <dariqq <at> posteo.net>

Date: Sat, 28 Dec 2024 08:54:01 UTC

Severity: important

Merged with 48907

Full log


View this message in rfc822 format

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Dariqq <dariqq <at> posteo.net>
Cc: 75157 <at> debbugs.gnu.org
Subject: bug#75157: Grafting inconsistency with multiple outputs is causing problems
Date: Thu, 02 Jan 2025 16:20:51 +0100
[Message part 1 (text/plain, inline)]
Hi Dariqq.  Your glib and json bug is indeed different.

Your initial suggestion for a proper fix to the different but similar
troubles we both have:

> I think it would be good if grafts are only applied per output (which 
> might also help resolve #69653).

is the same proposal as in bug#48907.

At https://bugs.gnu.org/48907 Richard Sent wrote:
> One idea I had was to somehow graft each output as a unique derivation
> via repeated calls to graft-derivation. From what I've seen so far
> though that looks much easier said than done. It hasn't progressed
> beyond the "huh, I wonder" phase.

Therefore I will merge the two bugs.

Not entirely sure if this proper fix would currently need changes to the
C++ guix-daemon code.  Anyway, I will not implement it.

Currently we both have workarounds, obviously disabling security updates
with --no-grafts is possible, but also you wrote you can set the
pkgconfig path.  For GTK programs, a workaround is instead of putting

(list gdk-pixbuf
      graphene gtk harfbuzz
      pango)

in your Guix shell manifest or a scheme-file, I could instead rebuild
without grafts, like in Guix’ ungraft manifest.

That is, my previous home configuration for commit
08e0144d2338c8fb51e52e74274554583d0faa69 was:

[old-launcher.scm (text/plain, inline)]
(service home-sway-service-type
         (sway-configuration
          (startup-programs
           `(,(with-extensions
               (list
                ((options->transformation
                  '((with-commit . "guile-g-golf=v0.8.0-rc9")))
                 guile-g-golf))
               #~(string-append
                  "guile "
                  #$(scheme-file "launcher.scm"
                     #~(begin
                         (eval-when (expand load eval)
                           (use-modules (oop goops))
                           (default-duplicate-binding-handler
                             '(merge-generics replace
                               warn-override-core warn last))
                           (setenv "GI_TYPELIB_PATH"
                                   #$(file-append
                                      (directory-union
                                       "typelibs"
                                       (list gdk-pixbuf
                                             graphene gtk harfbuzz
                                             pango))
                                      "/lib/girepository-1.0"))
                           (use-modules (g-golf))
                           (g-irepository-require
                            "Gtk" #:version "4.0")
                           (for-each (lambda (name)
                                       (gi-import-by-name "Gtk" name))
                                     '("Application"
                                       "ApplicationWindow"
                                       "Builder")))
                         (use-modules (sxml simple))
                         (define ui
                           '(interface
                             (requires (@ (version 4.0) (lib gtk)))
[Message part 3 (text/plain, inline)]
Since then, I have now had to change it to:

[workaround.scm (text/plain, inline)]
(service home-sway-service-type
         (sway-configuration
          (startup-programs
           `(,(with-extensions
               (list
                ((options->transformation
                  '((with-commit . "guile-g-golf=v0.8.0-rc9")))
                 guile-g-golf))
               #~(string-append
                  "guile "
                  #$(scheme-file "launcher.scm"
                     #~(begin
                         (eval-when (expand load eval)
                           (use-modules (oop goops))
                           (default-duplicate-binding-handler
                             '(merge-generics replace
                               warn-override-core warn last))
                           (setenv "GI_TYPELIB_PATH"
                                   #$(file-append
                                      (directory-union
                                       "typelibs"
                                       (let ((ungraft
                                              (package-mapping
                                               (lambda (p)
                                                 (cond
                                                  ;; Ungrafted fails to validate runpath.
                                                  ((string=? (package-name p)
                                                             "gst-plugins-bad")
                                                   (specification->package
                                                    "gst-plugins-bad-minimal"))
                                                  (else
                                                   (let ((old
                                                          (or (package-replacement p) p)))
                                                     (package
                                                      (inherit old)
                                                      (arguments
                                                       (substitute-keyword-arguments
                                                        (package-arguments old)
                                                        ((#:disallowed-references _)  (list))
                                                        ((#:allowed-references _) #f))))))))
                                               #:deep? #t)))
                                         (map ungraft (list gdk-pixbuf
                                                            graphene gtk harfbuzz
                                                            pango))))
                                      "/lib/girepository-1.0"))
                           (use-modules (g-golf))
                           (g-irepository-require
                            "Gtk" #:version "4.0")
                           (for-each (lambda (name)
                                       (gi-import-by-name "Gtk" name))
                                     '("Application"
                                       "ApplicationWindow"
                                       "Builder")))
                         (use-modules (sxml simple))
                         (define ui
[Message part 5 (text/plain, inline)]
Unlike --no-grafts,
this has security updates appropriate for use in production
environments, but rebuilds part of the world, most importantly Rust.
Building bootstrap rust-1.54 fails on my laptop, unless I specify the
common build option --cores=1 in guix build.

I dedicate the above snippet to the public domain as per CC0.
https://creativecommons.org/publicdomain/zero/1.0/legalcode
If someone wishes to use similar code.

Regards,
Florian

This bug report was last modified 161 days ago.

Previous Next


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