all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Zack Weinberg" via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 72259@debbugs.gnu.org
Subject: bug#72259: guix system: "guix graph -t referrers" could be more helpful in some cases
Date: Tue, 23 Jul 2024 13:24:01 -0400	[thread overview]
Message-ID: <1044fab9-b70d-477f-a0c6-97757cba2c00@app.fastmail.com> (raw)

On a Guix System installation, "guix graph -t referrers" is not
helpful when the package you're investigating is brought in directly
by the operating-system declaration.  Here are two examples.

1) Packages that have been added to the 'packages' property of the
operating-system declaration, but have no connection to any other
package, are described as unconnected.

(operating-system
  (packages (cons* (specification->package "lsof") %base-packages))
  ;; etc
)

# guix graph -t referrers lsof
digraph "Guix referrers" {
  "/gnu/store/7fkgda85xj4dr2d0r8lafyvnx5b9xwzp-lsof-4.94.0"
    [label = "lsof-4.94.0", shape = box, fontname = sans];
}

2) If you've excluded a %base-packages package that ships setuid
binaries (e.g. "sudo", but forgotten to exclude the actual setuid
binaries as well, the package will still be included in the
operating-system derivation, and guix graph won't tell you why:

(operating-system
  (packages
    (filter
      (lambda (pkg) (not (string= (package-name pkg) "sudo")))
      %base-packages))
  ;; etc
)

# guix graph -t referrers sudo
digraph "Guix referrers" {
  "/gnu/store/gnybfg31is632dyaivd907f2h0wff80d-sudo-1.9.14p3"
    [label = "sudo-1.9.14p3", shape = box, fontname = sans];
  "/gnu/store/gnybfg31is632dyaivd907f2h0wff80d-sudo-1.9.14p3" ->
  "/gnu/store/gnybfg31is632dyaivd907f2h0wff80d-sudo-1.9.14p3"
    [color = darkviolet];
}

This is saying that sudo refers to _itself_ and nothing else does,
which doesn't make any sense.

In both cases I would have expected "guix graph -t referrers"
to report that the package was a direct dependency of the
operating-system derivation itself; in the latter case I would
have liked it if there was some indication that the dependency
was because of 'setuid-binaries'.

zw




             reply	other threads:[~2024-07-23 17:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 17:24 Zack Weinberg via Bug reports for GNU Guix [this message]
2024-07-23 23:15 ` bug#72259: guix system: "guix graph -t referrers" could be more helpful in some cases Simon Tournier

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=1044fab9-b70d-477f-a0c6-97757cba2c00@app.fastmail.com \
    --to=bug-guix@gnu.org \
    --cc=72259@debbugs.gnu.org \
    --cc=zack@owlfolio.org \
    /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.