all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: Dariqq <dariqq@posteo.net>
Cc: 75157@debbugs.gnu.org
Subject: bug#75157: Grafting inconsistency with multiple outputs is causing problems
Date: Thu, 02 Jan 2025 16:20:51 +0100	[thread overview]
Message-ID: <87pll58coc.fsf@pelzflorian.de> (raw)
In-Reply-To: <bf6c3172-132b-4290-b023-38a68652411c@posteo.net> (dariqq@posteo.net's message of "Sun, 29 Dec 2024 09:30:54 +0000")

[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]

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:


[-- Attachment #2: old-launcher.scm --]
[-- Type: text/plain, Size: 1784 bytes --]

(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)))

[-- Attachment #3: Type: text/plain, Size: 46 bytes --]


Since then, I have now had to change it to:


[-- Attachment #4: workaround.scm --]
[-- Type: text/plain, Size: 3175 bytes --]

(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

[-- Attachment #5: Type: text/plain, Size: 445 bytes --]


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

      reply	other threads:[~2025-01-02 15:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-28  8:52 bug#75157: Grafting inconsistency with multiple outputs is causing problems Dariqq
2024-12-29  0:24 ` pelzflorian (Florian Pelz)
2024-12-29  9:30   ` Dariqq
2025-01-02 15:20     ` pelzflorian (Florian Pelz) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pll58coc.fsf@pelzflorian.de \
    --to=pelzflorian@pelzflorian.de \
    --cc=75157@debbugs.gnu.org \
    --cc=dariqq@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.