doc: Suggest GNULIB_REFDIR instead of GNULIB_SRCDIR
From:
Collin Funk
Subject:
doc: Suggest GNULIB_REFDIR instead of GNULIB_SRCDIR
Date:
Sun, 11 May 2025 10:21:19 -0700
User-agent:
Gnus/5.13 (Gnus v5.13)
Currently README-hacking suggests using GNULIB_SRCDIR to clone a Gnulib
submodule with 'git clone --reference'. This used to be the case but
changed in 2022 [1].
Nowadays, GNULIB_SRCDIR still exists but ./bootstrap will just use that
directory instead of using the submodule at all. I sometimes use this to
test Coreutils with newer Gnulib commits because I struggle to remember
git submodule commands.
However, if someone has an older Gnulib checkout ./bootstrap will almost
certainly fail due to missing files, for example, which may be
confusing.
Therefore, I think we should recommend GNULIB_REFDIR since it will
always create a submodule and checkout the proper Gnulib commit that
Coreutils specifies.
Collin
[1]
https://github.com/coreutils/gnulib/commit/2122284380cc0d1b3b6f11d92c04652616da79c7