Skip to content

Commit c6ec721

Browse files
committed
Work on build-tarball: Refactor customization of git URLs.
1 parent 0e1d928 commit c6ec721

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/many-platforms.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ on:
4141
# Variables.
4242
env:
4343
package: inetutils
44-
# URL suitable for 'git clone'
45-
#gnulib_url: https://git.savannah.gnu.org/git/gnulib.git
46-
gnulib_url: https://github.com/coreutils/gnulib.git
4744
# URL prefix suitable for downloading individual files through 'wget'
4845
#gnulib_url_prefix: https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f=
4946
gnulib_url_prefix: https://raw.githubusercontent.com/coreutils/gnulib/refs/heads/master/

build-tarball.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ newest_gnulib=$(expr $(date +%j) % 2)
2929

3030
set -e
3131

32+
. ./init-git.sh
33+
3234
# Fetch sources (uses package 'git').
3335
# No '--depth 1' here, to avoid an error "unknown revision" during gen-ChangeLog.
34-
git clone https://https.git.savannah.gnu.org/git/"$package".git
36+
git clone https://git.savannah.gnu.org/git/"$package".git
3537
if test $newest_gnulib = 1; then
36-
git clone --depth 1 "${gnulib_url}"
38+
git clone --depth 1 https://git.savannah.gnu.org/git/gnulib.git
3739
fi
3840

3941
# Apply patches.

init-git.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Mapping from canonical git server URLs to more efficient read-only mirrors.
2+
# See
3+
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf
4+
# https://git-scm.com/docs/git-clone#_git_urls
5+
git config set --global --append url.git://git.git.savannah.gnu.org/.insteadOf git://git.savannah.gnu.org/
6+
git config set --global --append url.https://https.git.savannah.gnu.org/git/.insteadOf https://git.savannah.gnu.org/git/
7+
git config set --global --append url.https://github.com/coreutils/gnulib.git.insteadOf git://git.savannah.gnu.org/gnulib.git
8+
git config set --global --append url.https://github.com/coreutils/gnulib.git.insteadOf https://git.savannah.gnu.org/git/gnulib.git

0 commit comments

Comments
 (0)