unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72259: guix system: "guix graph -t referrers" could be more helpful in some cases
@ 2024-07-23 17:24 Zack Weinberg via Bug reports for GNU Guix
  2024-07-23 23:15 ` Simon Tournier
  0 siblings, 1 reply; 2+ messages in thread
From: Zack Weinberg via Bug reports for GNU Guix @ 2024-07-23 17:24 UTC (permalink / raw)
  To: 72259

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-24  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-23 17:24 bug#72259: guix system: "guix graph -t referrers" could be more helpful in some cases Zack Weinberg via Bug reports for GNU Guix
2024-07-23 23:15 ` Simon Tournier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).