changeset 29627:f114b45ebbc9

bootstrap: Add diff and instructions for local changes after gnulib update. * bootstrap.conf: Add documentation for applying local changes after updating gnulib to a newer revision. * build-aux/gnulib-bootstrap-git-fetch.diff: Add new file (not necessary to be included in the tarball).
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 07 May 2021 15:48:52 +0200
parents efb5b450ab95
children a3df57fa5c5d
files bootstrap.conf build-aux/gnulib-bootstrap-git-fetch.diff
diffstat 2 files changed, 33 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bootstrap.conf	Fri May 07 14:37:26 2021 +0200
+++ b/bootstrap.conf	Fri May 07 15:48:52 2021 +0200
@@ -191,8 +191,10 @@
 # revision ID.  Paste it below and run
 #
 #   ./bootstrap --bootstrap-sync
+#   patch -p1 -u < ./build-aux/gnulib-bootstrap-git-fetch.diff
 #
 # To update the ./bootstrap file with that from ./gnulib/build-aux/bootstrap
+# and apply local changes.
 
 : ${GNULIB_REVISION=372b1f317894d6916a94cd3fd08361fe270206b2}
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build-aux/gnulib-bootstrap-git-fetch.diff	Fri May 07 15:48:52 2021 +0200
@@ -0,0 +1,31 @@
+Update bootstrap script from upstream gnulib to automatically fetch from repository if needed
+
+See also: https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00150.html
+
+diff --git a/bootstrap b/bootstrap
+index 8f76d6962..2d0a06376 100755
+--- a/bootstrap
++++ b/bootstrap
+@@ -670,6 +670,11 @@ if $use_gnulib; then
+         || cleanup_gnulib
+ 
+       trap - 1 2 13 15
++
++    elif test -n "$GNULIB_REVISION" \
++         && ! git --git-dir="$gnulib_path"/.git cat-file \
++              commit "$GNULIB_REVISION"; then
++      git --git-dir="$gnulib_path"/.git fetch
+     fi
+     GNULIB_SRCDIR=$gnulib_path
+     ;;
+@@ -704,6 +709,10 @@ if $use_gnulib; then
+ 
+   if test -d "$GNULIB_SRCDIR"/.git && test -n "$GNULIB_REVISION" \
+      && ! git_modules_config submodule.gnulib.url >/dev/null; then
++    if ! git --git-dir="$GNULIB_SRCDIR"/.git cat-file \
++         commit "$GNULIB_REVISION"; then
++      git --git-dir="$GNULIB_SRCDIR"/.git fetch
++    fi
+     (cd "$GNULIB_SRCDIR" && git checkout "$GNULIB_REVISION") || cleanup_gnulib
+   fi
+