Subject: bug#56749: closed (Re: bug#56749: modernize bootstrap.conf)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 26 Dec 2022 04:37:02 +0000

Your bug report

#56749: modernize bootstrap.conf

which was filed against the gzip package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
56749: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56749
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#56749: modernize bootstrap.conf
From: Paul Eggert <[email-masked]>
To: Bruno Haible <[email-masked]>
Cc: [email-masked]
Date: Sun, 25 Dec 2022 20:36:02 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for the heads-up. I installed the attached patch to gzip and 
updated the bootstrap script to current Gnulib.

diff --git a/README-hacking b/README-hacking
index 60e40ca..4af67f4 100644
--- a/README-hacking
+++ b/README-hacking
@@ -63,6 +63,17 @@ and the Git master copy:
 
 should output no difference.
 
+If you have already bootstrapped, you can redo it in two phases:
+
+        $ # 1. Fetch auxiliary files from the network.
+        $ ./autopull.sh
+        $
+        $ # 2. Generate files locally.
+        $ ./autogen.sh
+
+Separating the phases can be useful for reproducible builds, and for
+applying local modifications between the two phases.
+
 Enjoy!
 
 [*] By default GCC warnings are enabled when building from Git.
diff --git a/bootstrap.conf b/bootstrap.conf
index d2363dc..9a67bc2 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -76,9 +76,6 @@ gnulib_tool_option_extras="\
 "

-# Create build-aux, since 'bootstrap' won't do that for us.
-mkdir -p build-aux
-
 # Build prerequisites
 buildreq="\
 autoconf   2.61
@@ -98,4 +95,6 @@ bootstrap_epilogue()
 }
 
 # Automake requires that ChangeLog exist.
-touch ChangeLog || exit 1
+bootstrap_post_import_hook() {
+  touch ChangeLog || exit
+}

Subject: modernize bootstrap.conf
From: Bruno Haible <[email-masked]>
To: [email-masked]
Date: Sun, 24 Jul 2022 21:50:10 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

The 'bootstrap' script from Gnulib has been reorganized to work in two phases:
  (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.

See <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00053.html> for
details.

For GNU gzip some adjustment of the bootstrap.conf is needed. The bootstrap.conf
is meant to contain configuration settings, that is, define variables and
functions (hooks with special meanings). Instead, gzip/bootstrap.conf does some
actions directly. This will not work satisfactorily with the new two-phase
bootstrap. What is needed, is to move these actions into hooks:
  - Actions that may require network access belong in the
    bootstrap_post_pull_hook function.
  - Actions that merely regenerate files (without network access) usually
    belong in the bootstrap_post_import_hook.

The 'mkdir -p build-aux' is not needed any more. I verified that.

The lines

  # Automake requires that ChangeLog exist.
  touch ChangeLog || exit 1

can be moved into the bootstrap_post_import_hook function.

Bruno