bug-tar
[Top][All Lists]
Advanced

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

Re: split bootstrap in two phases, GNU tar


From: Bruno Haible
Subject: Re: split bootstrap in two phases, GNU tar
Date: Mon, 25 Jul 2022 01:18:45 +0200

Replying to https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00058.html 
:

Hi Paul,

> I got confused by the two Gnulib files build-aux/bootstrap and top/bootstrap. 
> Although top/bootstrap says "The canonical version of this script is 
> maintained as build-aux/bootstrap in gnulib", it's really in top/bootstrap.

Oops, indeed. Fixing the comments through the patch below.

> More important, build-aux/bootstrap exists separately from top/bootstrap only 
> to support packages that don't have bootstrap-funclib.sh ... fix 
> top/gen-bootstrap.sed so that it inlines autopull.sh and autogen.sh as well 
> as inlining bootstrap-funclib.sh

What you see as a problem is already the solution to the problem.

Namely, there are two ways for a maintainer to upgrade to a newer 'bootstrap'.
(a) Run './bootstrap --bootstrap-sync', or just './bootstrap' if the
    configuration contains the assignment 'bootstrap_sync=true'. Then,
    commit the local modifications to the package's git repository.
(b) Copy the 4 files from gnulib/top/ manually, and commit them in the
    package's git repository.

For (a), everything works already. The old 'bootstrap' script has
hardwired code to fetch gnulib/build-aux/bootstrap. This gets executed,
and this intermediate, not really functional 'bootstrap' script gets
copied into the package and gets executed. It notices that the 3
companion files are still missing, copies the 4 files into the package,
and re-execs the (now fully functional) 'bootstrap'. In other words,
the only purpose of the gnulib/build-aux/bootstrap is a trampoline
to fetch the other files.

For (b), I'll need to add a bit of comments/documentation somewhere.

> perhaps it'd be better for GNU tar to have these new files in a new 
> directory, i.e., boot/autogen.sh, boot/autopull.sh, 
> boot/bootstrap-funclib.sh, instead of autogen.sh, autopull.sh, 
> bootstrap-funclib.sh, so as to keep the top level simple. Is that easy to 
> arrange?

autopull.sh and autogen.sh are meant to be used by the developers,
several times a day. In the long term, they will be as important as
'INSTALL', 'HACKING', and 'configure', which are at the top-level.
I don't think it is useful to put them in a subdirectory.

bootstrap-funclib.sh could be put into a subdirectory; maybe
build-aux/ is the right one for this? (But determining $build_aux
requires parsing configure.ac...)

The forked bootstrap, by Gary Vaughan and others, at
https://github.com/gnulib-modules/bootstrap, uses another approach:
it presents itself as a git submodule. This is "clean", but resurfaces
the problems that 'bootstrap' / 'autopull.sh' were meant to solve,
namely
  - to present a simple, single command that can be executed
    directly after 'git clone' or 'git pull',
  - to hide the complexities of 'git submodule' from the user.
    (I have read about submodules several times over the last
    few years, and still find that they are a usability mess.)


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

        Fix comment.
        Reported by Paul Eggert in
        <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00058.html>.
        * top/bootstrap-funclib.sh: Fix comment about canonical location.
        * top/autopull.sh: Likewise.
        * top/autogen.sh: Likewise.
        * top/bootstrap: Likewise.

diff --git a/top/autogen.sh b/top/autogen.sh
index f245fb11f2..02028f272b 100755
--- a/top/autogen.sh
+++ b/top/autogen.sh
@@ -20,12 +20,12 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # Originally written by Paul Eggert.  The canonical version of this
-# script is maintained as build-aux/autogen.sh in gnulib.  However,
-# to be useful to your package, you should place a copy of it under
-# version control in the top-level directory of your package.  The
-# intent is that all customization can be done with a bootstrap.conf
-# file also maintained in your version control; gnulib comes with a
-# template build-aux/bootstrap.conf to get you started.
+# script is maintained as top/autogen.sh in gnulib.  However, to be
+# useful to your package, you should place a copy of it under version
+# control in the top-level directory of your package.  The intent is
+# that all customization can be done with a bootstrap.conf file also
+# maintained in your version control; gnulib comes with a template
+# build-aux/bootstrap.conf to get you started.
 #
 # Alternatively, you can use an autogen.sh script that is specific
 # to your package.
diff --git a/top/autopull.sh b/top/autopull.sh
index f4c0f49652..ffb4ba7cba 100755
--- a/top/autopull.sh
+++ b/top/autopull.sh
@@ -18,12 +18,12 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # Originally written by Paul Eggert.  The canonical version of this
-# script is maintained as build-aux/autopull.sh in gnulib.  However,
-# to be useful to your package, you should place a copy of it under
-# version control in the top-level directory of your package.  The
-# intent is that all customization can be done with a bootstrap.conf
-# file also maintained in your version control; gnulib comes with a
-# template build-aux/bootstrap.conf to get you started.
+# script is maintained as top/autopull.sh in gnulib.  However, to be
+# useful to your package, you should place a copy of it under version
+# control in the top-level directory of your package.  The intent is
+# that all customization can be done with a bootstrap.conf file also
+# maintained in your version control; gnulib comes with a template
+# build-aux/bootstrap.conf to get you started.
 #
 # Alternatively, you can use an autopull.sh script that is specific
 # to your package.
diff --git a/top/bootstrap b/top/bootstrap
index 3acdb47f37..b7216d20fe 100755
--- a/top/bootstrap
+++ b/top/bootstrap
@@ -17,12 +17,12 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # Originally written by Paul Eggert.  The canonical version of this
-# script is maintained as build-aux/bootstrap in gnulib. However,
-# to be useful to your package, you should place a copy of it under
-# version control in the top-level directory of your package.  The
-# intent is that all customization can be done with a bootstrap.conf
-# file also maintained in your version control; gnulib comes with a
-# template build-aux/bootstrap.conf to get you started.
+# script is maintained as top/bootstrap in gnulib. However, to be
+# useful to your package, you should place a copy of it under version
+# control in the top-level directory of your package.  The intent is
+# that all customization can be done with a bootstrap.conf file also
+# maintained in your version control; gnulib comes with a template
+# build-aux/bootstrap.conf to get you started.
 
 # Please report bugs or propose patches to bug-gnulib@gnu.org.
 
diff --git a/top/bootstrap-funclib.sh b/top/bootstrap-funclib.sh
index 60692aaaaa..f66f338c5a 100644
--- a/top/bootstrap-funclib.sh
+++ b/top/bootstrap-funclib.sh
@@ -16,9 +16,9 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # Originally written by Paul Eggert.  The canonical version of this
-# script is maintained as build-aux/bootstrap-funclib.sh in gnulib.
-# However, to be useful to your package, you should place a copy of it
-# under version control in the top-level directory of your package.  The
+# script is maintained as top/bootstrap-funclib.sh in gnulib.  However,
+# to be useful to your package, you should place a copy of it under
+# version control in the top-level directory of your package.  The
 # intent is that all customization can be done with a bootstrap.conf
 # file also maintained in your version control; gnulib comes with a
 # template build-aux/bootstrap.conf to get you started.






reply via email to

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