bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

split bootstrap in two phases


From: Bruno Haible
Subject: split bootstrap in two phases
Date: Sun, 24 Jul 2022 17:57:38 +0200

Hi all 'bootstrap' users,

Over the last few years, it has become more and more clear that bootstrap
does two things:
  (1) Fetch auxiliary files that are not in the git checkout.
      This is the part that requires network access and that has
      supply-chain concerns.
  (2) Generate files such as configure, config.h, Makefile.in etc.
      This includes running gnulib-tool.

Recent discussion in gnu-prog-discuss has shown that making the separation
into two phases (1) and (2) explicit will have several benefits:

  * For reproducible builds, it is necessary to be execute the second
    phase without the first one.

  * For people who have local modifications in dependency packages
    (e.g. in gnulib), or for distros who want to apply patches to .m4 files,
    it is important to have these phases separated.

  * The second phase is a way for people to regenerate files in a
    supported way. So far, too many users have been running 'autoreconf -fvi',
    which many GNU packages don't support.

  * For people who develop without an internet connection, the ability
    to regenerate files explicitly is nice (even when, for some of the files,
    Makefile rules would force a regeneration on the fly).

This patch does the separation.
The first phase is a script 'autopull.sh'.
The second phase is a script 'autogen.sh'.
Some packages may use the ones that are "generic" and customized
through a bootstrap.conf file. Other packages (e.g. GNU gettext) will
provide hand-written 'autopull.sh' and 'autogen.sh'.

The names of these scripts end with '.sh' in order to make them easily
editable in editors that recognize the file type from the suffix.

This patch is backward-compatible: A script named 'bootstrap' continues
to exist. But it will be useful for packages to document in their
INSTALL / HACKING / README-hacking / INSTALL.REPO files the sequence
of two commands:
  ./autopull.sh
  ./autogen.sh
because — as mentioned above — in some situations it is not necessary to
run ./autopull.sh.

I've tested this patch with GNU coreutils and GNU poke. The invocation
'./bootstrap --bootstrap-sync' can be used to upgrade from the older
bootstrap to the newer one with its companions autopull.sh and autogen.sh.


2022-07-24  Bruno Haible  <bruno@clisp.org>

        Split bootstrap into autopull.sh and autogen.sh.
        * top/bootstrap-funclib.sh: New file, based on build-aux/bootstrap.
        * top/autopull.sh: New file, based on build-aux/bootstrap.
        * top/autogen.sh: New file, based on build-aux/bootstrap.
        * top/bootstrap: New file, based on build-aux/bootstrap.
        * top/gen-bootstrap.sed: New file.
        * Makefile (build-aux/bootstrap): New rule.
        (regen): Depend on it.
        * build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".

Attachment: 0001-Split-bootstrap-into-autopull.sh-and-autogen.sh.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]