Subject: Re: bug#67731: bootstrap, tries to fetch files although using --no-git --skip-po and --gnulib-srcdir...

From: Pádraig Brady <[email-masked]>
Date: Sun, 10 Dec 2023 14:52:35 +0000

On 09/12/2023 20:22, Bjarni Ingi Gislason wrote:
> bootstrap.loc: bootstrapping with --no-git
> --gnulib-srcdir=/home/bg/git/gnulib --skip-po --bootstrap-sync
> ./bootstrap: updating bootstrap and restarting...
> ./bootstrap: Bootstrapping from checked-out coreutils sources...
> ./bootstrap: consider installing git-merge-changelog from gnulib
> ./bootstrap: getting translations into po/.reference for
> coreutils...
> OUTPUT:INVALID,NEW,REJECT IN= OUT=eth0 SRC=192.168.1.72
> DST=80.69.83.146 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=21973 DF
> PROTO=TCP
> SPT=51544 DPT=443 WINDOW=64240 RES=0x00 SYN URGP=0
> OUTPUT:INVALID,NEW,REJECT IN= OUT=eth0 SRC=192.168.1.72
> DST=80.69.83.146 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=21974 DF
> PROTO=TCP
> SPT=51544 DPT=443 WINDOW=64240 RES=0x00 SYN URGP=0
> failed: Connection refused.
> failed: Network is unreachable.
> ./bootstrap: could not fetch auxiliary files

It looks like --bootstrap-sync is the issue here.
Adding a little debug shows that upgrade_bootstrap()
does not propagate params to the subsequent bootstrap run:

$ ./bootstrap --gnulib-srcdir=/home/padraig/g/gnulib --no-git --skip-po --bootstrap-sync
bootstrap params: --gnulib-srcdir=/home/padraig/g/gnulib --no-git --skip-po --bootstrap-sync
./bootstrap: updating bootstrap and restarting...
bootstrap params: --no-bootstrap-sync

The attached adjusts bootstrap so the options are passed
through the upgrade_bootstrap() function.

Marking this as done,

thanks,
Pádraig

From cb632d68ef3cb976c5b366f633478419d1791121 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email-masked]>
Date: Sun, 10 Dec 2023 14:46:58 +0000
Subject: [PATCH] bootstrap: fix option propagation with --bootstrap-sync

* build-aux/bootstrap: Ensure options are propagated through
upgrade_bootstrap().
Fixes https://bugs.gnu.org/67731
---
 ChangeLog           | 6 ++++++
 build-aux/bootstrap | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1a3429e03b..b0d748029d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-12-10  Pádraig Brady  <[email-masked]>
+
+	bootstrap: fix option propagation with --bootstrap-sync
+	* build-aux/bootstrap: Ensure options are propagated through
+	upgrade_bootstrap().
+
 2023-12-01  Paul Eggert  <[email-masked]>
 
 	frexp, frexpf: pacify clang re address-of-volatile
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 979b3af62e..15bda089f6 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -777,7 +777,7 @@ autopull()
   if $use_gnulib || $bootstrap_sync; then
     prepare_GNULIB_SRCDIR
     if $bootstrap_sync; then
-      upgrade_bootstrap
+      upgrade_bootstrap "$@"
     fi
   fi
 
@@ -1496,7 +1496,7 @@ check_build_prerequisites $use_git
 
 if $bootstrap_sync; then
   prepare_GNULIB_SRCDIR
-  upgrade_bootstrap
+  upgrade_bootstrap "$@"
   # Since we have now upgraded if needed, no need to try it a second time below.
   bootstrap_sync=false
 fi
-- 
2.41.0