From unknown Sat Aug 09 04:59:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72259: guix system: "guix graph -t referrers" could be more helpful in some cases Resent-From: "Zack Weinberg" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 23 Jul 2024 17:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72259 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 72259@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172175547918638 (code B ref -1); Tue, 23 Jul 2024 17:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jul 2024 17:24:39 +0000 Received: from localhost ([127.0.0.1]:60647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWJFe-0004qX-R9 for submit@debbugs.gnu.org; Tue, 23 Jul 2024 13:24:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:40944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWJFc-0004qQ-QN for submit@debbugs.gnu.org; Tue, 23 Jul 2024 13:24:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWJFX-0000KN-7a for bug-guix@gnu.org; Tue, 23 Jul 2024 13:24:31 -0400 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWJFT-0001ry-1p for bug-guix@gnu.org; Tue, 23 Jul 2024 13:24:29 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 4A8A21380275 for ; Tue, 23 Jul 2024 13:24:22 -0400 (EDT) Received: from imap45 ([10.202.2.95]) by compute5.internal (MEProxy); Tue, 23 Jul 2024 13:24:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owlfolio.org; h= cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2; t=1721755462; x=1721841862; bh=Z7gUVv6zAQ3uGlDhRISDw/O+rjIAk5ui wjZeoeIkFNk=; b=Y5EpmJT4xHKFgFbemHVISqA2aEeuWLdjshn26/mN+bShLu9Y 9zG3LDgDSvyfyBf1tI/PpRC0rOCvolCFBYN4Y0NR1YEBYk/EGjVqOb/HL9T1tfAn QGsPsI1sASDkEkyje94BZw6vyi4Oy8HzPamYVr92LiiFyrXtMHrw/D0hlQr+12P3 gQFfOnQUX6miXP8rhfoOvPQOfPwQoHpNF9jIqKU4DbvLg4DYGKNi6VC+PATpEFGc uHGF/vNH+CoLcXpSyFNR8eunTSxU8qOjq62lAzOaoSe02O4oyBaTSmjSCrYFtbZK Jtn/9tG7mt5JG+pg/yQUI6rkN7c8zUVlwfx4mg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1721755462; x=1721841862; bh=Z7gUVv6zAQ3uGlDhRISDw/O+rjIAk5uiwjZ eoeIkFNk=; b=LzdTdPFHY7dt2ldoEnWg9ZkkvsZpjrzHEzwK0O1wK7OO41sxtL7 dAT5wy7mKSzJcphWg3LJ8G+QEswGKOYEBVckh9FrIozgtGtwZIiOYJmRT+9ywY/0 aIQHNFjc5yrJCdY/hJphWgZrh/+HGhvL7MjEXws3gUiQGhdlMNUJ8UvDhlxQ/jQu QfO5aJbjPB9xD5w+od9V57BJHfZW14rzh/gYJ9XHQayVuN4vqmVWGLYZ7M2Y/e45 3eX6IqWIEKZSQYnrhFwa6e5UA8STkrLj/BwvpnMOHGAm6JmUSbGq5EcYIagi3uIZ NPXCCUdY14DF/i55R+CppCyhm7uxKxtOaXw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrheelgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsehttdertd erredtnecuhfhrohhmpedfkggrtghkucghvghinhgsvghrghdfuceoiigrtghksehofihl fhholhhiohdrohhrgheqnecuggftrfgrthhtvghrnhepgfeljeduudduteffteefueefhe ffueefjeeghfdtveekhfegleetveeugfejhfffnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepiigrtghksehofihlfhholhhiohdrohhrghdpnh gspghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: i876146a2:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id E6432272007D; Tue, 23 Jul 2024 13:24:21 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-582-g5a02f8850-fm-20240719.002-g5a02f885 MIME-Version: 1.0 Message-Id: <1044fab9-b70d-477f-a0c6-97757cba2c00@app.fastmail.com> Date: Tue, 23 Jul 2024 13:24:01 -0400 From: "Zack Weinberg" Content-Type: text/plain Received-SPF: pass client-ip=103.168.172.146; envelope-from=zack@owlfolio.org; helo=fout3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) 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 From unknown Sat Aug 09 04:59:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72259: guix system: "guix graph -t referrers" could be more helpful in some cases Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 24 Jul 2024 06:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72259 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Zack Weinberg , 72259@debbugs.gnu.org Received: via spool by 72259-submit@debbugs.gnu.org id=B72259.1721803725391 (code B ref 72259); Wed, 24 Jul 2024 06:49:01 +0000 Received: (at 72259) by debbugs.gnu.org; 24 Jul 2024 06:48:45 +0000 Received: from localhost ([127.0.0.1]:33033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWVnp-00006E-2h for submit@debbugs.gnu.org; Wed, 24 Jul 2024 02:48:45 -0400 Received: from mail-wm1-f49.google.com ([209.85.128.49]:41019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWVnn-00005y-4X for 72259@debbugs.gnu.org; Wed, 24 Jul 2024 02:48:43 -0400 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-427d8f2611fso5757225e9.0 for <72259@debbugs.gnu.org>; Tue, 23 Jul 2024 23:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721803652; x=1722408452; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6dAvMponzx20Uhfy1XI49LjjmHKFFtRqyBvoO2/9mkU=; b=Fm8rw3m2OsIhJ2foCsjjNVAmsbGKLRujaKOkDRIE9lS4IPM6G4d566HHs5mFz7Qk5o qFxZX2vjzB2AJVrejLshsoC88ScfrQ3p2H089hHUEYZ+IkhD9Ork9k8dniPgk+StQFfK F9LYndc9F+8+dIAXt8UgZ/kxkkynzPMed+l41dB3pSXZHGy9FuLy7ptvwB+ZqBRiRChz Vg4OvuHKsq2i86lRjhytZcD1VoxbhOtL6ZHUfWWFKeMnaa82gUVrXyvZf/70LMjNCQU0 xGrPQechdmaaicUypW01NRSOdICXeEZTWyz9Si0FB2W4le7AgxdeaGhCqTXfthDSNQ5Y RGEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721803652; x=1722408452; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=6dAvMponzx20Uhfy1XI49LjjmHKFFtRqyBvoO2/9mkU=; b=tvUgjXa3dkKvsnuOHT26uAzbFAz0uLWbLi+QDzhx266EHsBd0WaHe4RcP2wwHFDbc/ 1eHHotskvuBPExLbR4PJabwsjtKCkUXfhzdZtph+lU2M7qSa3ev9+oqnbagaMlfqZfA6 2Z2O+owe14T2/T6szkbvWyzKhxSEhAAMPaG4tAZrPtV5BW2rruCSdDp8gm40J4xW12zI +dr6uoMIUU3iafIS0G8Bw27oHjSe5ZeVu087RijbU5NIJsHPqD5hkHiZEmUFhN0yjelk GyaUriz18fShK2Wfz1CYGaxBhp5HmRdXMbCkAL28D+KlLVqMmZIGMpyzJN7q1hj5acXD vrdQ== X-Forwarded-Encrypted: i=1; AJvYcCXohTqO2Nv4v2QhN5uDKNLVQy4JNEnPNakw2HjOMUaI59WdyJXp7zgOPQaGYAkxRNFV4Ga/OMU5d4Im968Mv0SLnnFHm6o= X-Gm-Message-State: AOJu0YzbvHYJiCyIRJSfWI5i+sK3k26RY/f7f7/tx9Wi88P+IRuhNFJr 9/VT0o5uKZmALN02hi4I8IUjrZdoAjdP+eUhWvaBJDKi754nQeJe1quIiA== X-Google-Smtp-Source: AGHT+IGkrCPcNY5h8v0aNj1b9JvX+l1Cau8c0pg2dDcKuDHyn/Cuzgjpe+n2nerrRuD5sZAzTqFw1A== X-Received: by 2002:a05:600c:1c25:b0:426:5dd5:f245 with SMTP id 5b1f17b1804b1-427daa215a7mr59413095e9.2.1721803651252; Tue, 23 Jul 2024 23:47:31 -0700 (PDT) Received: from lili (2a02-8429-6820-f501-2d56-26dd-ea60-f757.rev.sfr.net. [2a02:8429:6820:f501:2d56:26dd:ea60:f757]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427fb7bdfa0sm2417735e9.14.2024.07.23.23.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 23:47:30 -0700 (PDT) From: Simon Tournier In-Reply-To: <1044fab9-b70d-477f-a0c6-97757cba2c00@app.fastmail.com> References: <1044fab9-b70d-477f-a0c6-97757cba2c00@app.fastmail.com> Date: Wed, 24 Jul 2024 01:15:15 +0200 Message-ID: <8734nzg0os.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Tue, 23 Jul 2024 at 13:24, "Zack Weinberg" via Bug reports for GNU Guix wrote: > I would have expected "guix graph -t referrers" > to report that the package was a direct dependency of the > operating-system derivation itself Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.49 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.49 listed in wl.mailspike.net] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) Hi, On Tue, 23 Jul 2024 at 13:24, "Zack Weinberg" via Bug reports for GNU Guix = wrote: > I would have expected "guix graph -t referrers" > to report that the package was a direct dependency of the > operating-system derivation itself Hum, I do not think that =E2=80=9Cguix graph=E2=80=9D operated on the level= of =E2=80=99operating-system=E2=80=99. That said, indeed something seems unex= pected: you get, > # guix graph -t referrers lsof > digraph "Guix referrers" { > "/gnu/store/7fkgda85xj4dr2d0r8lafyvnx5b9xwzp-lsof-4.94.0" > [label =3D "lsof-4.94.0", shape =3D box, fontname =3D sans]; > } and the manual reads [1], =E2=80=98referrers=E2=80=99 This is the graph of the =E2=80=9Creferrers=E2=80=9D of a stor= e item, as returned by =E2=80=98guix gc --referrers=E2=80=99 (*note Invoking guix = gc::). This relies exclusively on local information from your store. = For instance, let us suppose that the current Inkscape is availabl= e in 10 profiles on your machine; =E2=80=98guix graph -t referrers = inkscape=E2=80=99 will show a graph rooted at Inkscape and with those 10 profiles linked to it. It can help determine what is preventing a store item from bei= ng garbage collected. --8<---------------cut here---------------start------------->8--- $ guix package -p /tmp/one-profile -I lsof 4.94.0 out /gnu/store/6nyp9cvksvyfww5d7j7rvm43jb46p521-lsof-4.94.0 $ guix gc --referrers /gnu/store/6nyp9cvksvyfww5d7j7rvm43jb46p521-lsof-4.94= .0 /gnu/store/5wmvmlba841wvy681840cjwjcdifcjq2-profile $ guix graph -t referrers /gnu/store/6nyp9cvksvyfww5d7j7rvm43jb46p521-lsof-= 4.94.0 digraph "Guix referrers" { "/gnu/store/6nyp9cvksvyfww5d7j7rvm43jb46p521-lsof-4.94.0" [label =3D "lso= f-4.94.0", shape =3D box, fontname =3D sans]; "/gnu/store/6nyp9cvksvyfww5d7j7rvm43jb46p521-lsof-4.94.0" -> "/gnu/store/= 5wmvmlba841wvy681840cjwjcdifcjq2-profile" [color =3D red]; "/gnu/store/5wmvmlba841wvy681840cjwjcdifcjq2-profile" [label =3D "profile= ", shape =3D box, fontname =3D sans]; "/gnu/store/5wmvmlba841wvy681840cjwjcdifcjq2-profile" -> "/gnu/store/5wmv= mlba841wvy681840cjwjcdifcjq2-profile" [color =3D darkgoldenrod]; } --8<---------------cut here---------------end--------------->8--- So far, so good! However, indeed: --8<---------------cut here---------------start------------->8--- $ guix graph -t referrers lsof digraph "Guix referrers" { "/gnu/store/7fkgda85xj4dr2d0r8lafyvnx5b9xwzp-lsof-4.94.0" [label =3D "lso= f-4.94.0", shape =3D box, fontname =3D sans]; } --8<---------------cut here---------------end--------------->8--- And the reason is because grafts. --8<---------------cut here---------------start------------->8--- $ guix build lsof --no-grafts /gnu/store/7fkgda85xj4dr2d0r8lafyvnx5b9xwzp-lsof-4.94.0 $ guix package -p /tmp/another-profile -i lsof --no-grafts $ guix graph -t referrers lsof digraph "Guix referrers" { "/gnu/store/7fkgda85xj4dr2d0r8lafyvnx5b9xwzp-lsof-4.94.0" [label =3D "lso= f-4.94.0", shape =3D box, fontname =3D sans]; "/gnu/store/7fkgda85xj4dr2d0r8lafyvnx5b9xwzp-lsof-4.94.0" -> "/gnu/store/= hjgbwa566fwzmwvrdal5ycxzlzz3al6x-profile" [color =3D blue]; "/gnu/store/hjgbwa566fwzmwvrdal5ycxzlzz3al6x-profile" [label =3D "profile= ", shape =3D box, fontname =3D sans]; "/gnu/store/hjgbwa566fwzmwvrdal5ycxzlzz3al6x-profile" -> "/gnu/store/hjgb= wa566fwzmwvrdal5ycxzlzz3al6x-profile" [color =3D darkgoldenrod]; } --8<---------------cut here---------------end--------------->8--- Well, the fix should be to have the grafted item by default pointing to the non-grafted one and potentially referencing the others as describe by the manual. Cheers, simon 1: https://guix.gnu.org/manual/devel/en/guix.html#Invoking-guix-graph