[bug#76109] doc: Mention --check --no-grafts as a way to force-rebuild packages.
Commit Message
Adjusted! A new patch is attached.
Le ven. 7 févr. 2025 à 01:05, Leo Famulari <leo@famulari.name> a écrit :
>
> On Fri, Feb 07, 2025 at 12:43:36AM +0100, Rostislav Svoboda wrote:
> > * doc/guix.texi (On Trusting Binaries): Document that combining --check and
> > --no-grafts with 'guix build' forces the rebuild of a package.
>
> Thanks, this is really useful information that most people have had to
> learn by asking.
>
> > +@command{guix build --check}}). To force a full rebuild of a package
> > +(ignoring security updates via grafts), use @option{--check} together
> > +with @option{--no-grafts} (@pxref{Common Build Options,
> > +@option{--no-grafts}}).
>
> Grafts are not always present in the codebase (hard to believe, I know),
> so can you adjust it to something like "(ignoring security updates via
> grafts, which are often present)"?
Comments
On Fri, Feb 07, 2025 at 02:23:20AM +0100, Rostislav Svoboda wrote:
> @@ -3978,7 +3978,11 @@ On Trusting Binaries
> challenge}). Similarly, the @option{--check} option of @command{guix
> build} allows users to check whether previously-installed substitutes
> are genuine by rebuilding them locally (@pxref{build-check,
> -@command{guix build --check}}).
> +@command{guix build --check}}). To force a full rebuild of a package
> +(ignoring security updates via grafts, if any grafts exist—which is
> +not always the case), use @option{--check} together with
> +@option{--no-grafts} (@pxref{Common Build Options,
> +@option{--no-grafts}}).
I realized that it would be worthwhile to include a brief explanation of
why --no-grafts would be necessary here, so I wrote another sentence and
pushed as 8e9bceda87d55f475992ec5184590463ac7b5ffb
Thanks for recognizing the need for the documentation and making it
happen!
Le ven. 7 févr. 2025 à 20:02, Leo Famulari <leo@famulari.name> a écrit :
> I realized that it would be worthwhile to include a brief explanation of
> why --no-grafts would be necessary here, so I wrote another sentence and
> pushed as 8e9bceda87d55f475992ec5184590463ac7b5ffb
Thanks for the improvement, Leo.
> Thanks for recognizing the need for the documentation and making it
> happen!
I just asked at the "Guile & Guix Errors" session at FOSDEM 2025
during the Guix Days Fringe event, and Ludo shared this hack with me.
(For the record, until now, I have forced package rebuilds by putting
a dummy (write "...") or (format #t "...") in one of the user-defined
modify-phases.)
BTW, I feel like the whole explanation of what grafts and grafting are
could be made a bit clearer—with the help of a picture or something
similar. But that's something for another pull request.
Cheers, Bost
On Fri, Feb 07, 2025 at 08:33:47PM +0100, Rostislav Svoboda wrote:
> (For the record, until now, I have forced package rebuilds by putting
> a dummy (write "...") or (format #t "...") in one of the user-defined
> modify-phases.)
Right, we definitely needed to improve the documentation!
> BTW, I feel like the whole explanation of what grafts and grafting are
> could be made a bit clearer—with the help of a picture or something
> similar. But that's something for another pull request.
I just looked at the manual section Security Updates and, yes, I agree
we should have some illustrative / nicely-formatted-ASCII example of
grafting in the manual.
I seem to remember such a presentation on the subject some years ago,
probably soon after the current implementation of grafting was deployed.
Might be worth looking through the archives of Guix-related
presentations in our maintenance.git repository, or the FOSDEM
archives:
https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/talks
Ludovic, do you recall making a slideshow that illustrates grafting?
From 836a004c63236e76416702a50d9c2870644fe110 Mon Sep 17 00:00:00 2001
Message-ID: <836a004c63236e76416702a50d9c2870644fe110.1738891318.git.Rostislav.Svoboda@gmail.com>
From: Rostislav Svoboda <Rostislav.Svoboda@gmail.com>
Date: Thu, 6 Feb 2025 23:55:44 +0100
Subject: [PATCH] doc: Mention --check --no-grafts as a way to force-rebuild
packages.
* doc/guix.texi (On Trusting Binaries): Document that combining --check and
--no-grafts with 'guix build' forces the rebuild of a package.
Change-Id: I4eb6be04243a52f70d0fc298f76e62f10e3d376e
---
doc/guix.texi | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
@@ -3978,7 +3978,11 @@ On Trusting Binaries
challenge}). Similarly, the @option{--check} option of @command{guix
build} allows users to check whether previously-installed substitutes
are genuine by rebuilding them locally (@pxref{build-check,
-@command{guix build --check}}).
+@command{guix build --check}}). To force a full rebuild of a package
+(ignoring security updates via grafts, if any grafts exist—which is
+not always the case), use @option{--check} together with
+@option{--no-grafts} (@pxref{Common Build Options,
+@option{--no-grafts}}).
In the future, we want Guix to have support to publish and retrieve
binaries to/from other users, in a peer-to-peer fashion. If you would
base-commit: 8cf5eefbf3ca634fce98a832fc90e84ce91ef9d4
--
2.48.1