Skip to content

Commit 0c002ac

Browse files
committed
Work on build-tarball: Refactor customization of git URLs.
1 parent 4dbd491 commit 0c002ac

9 files changed

Lines changed: 14 additions & 26 deletions

File tree

.github/workflows/bsd.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ on:
5050
env:
5151
package: libtool
5252
branch: development
53-
# URL suitable for 'git clone'
54-
#gnulib_url: https://git.savannah.gnu.org/git/gnulib.git
55-
gnulib_url: https://github.com/coreutils/gnulib.git
5653

5754
jobs:
5855
build-tarball:

.github/workflows/linux.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ on:
5050
env:
5151
package: libtool
5252
branch: development
53-
# URL suitable for 'git clone'
54-
#gnulib_url: https://git.savannah.gnu.org/git/gnulib.git
55-
gnulib_url: https://github.com/coreutils/gnulib.git
5653

5754
jobs:
5855
build-tarball:

.github/workflows/macos.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ on:
5151
env:
5252
package: libtool
5353
branch: development
54-
# URL suitable for 'git clone'
55-
#gnulib_url: https://git.savannah.gnu.org/git/gnulib.git
56-
gnulib_url: https://github.com/coreutils/gnulib.git
5754

5855
jobs:
5956
build-tarball:

.github/workflows/many-platforms.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ on:
5050
env:
5151
package: libtool
5252
branch: development
53-
# URL suitable for 'git clone'
54-
#gnulib_url: https://git.savannah.gnu.org/git/gnulib.git
55-
gnulib_url: https://github.com/coreutils/gnulib.git
5653
# URL prefix suitable for downloading individual files through 'wget'
5754
#gnulib_url_prefix: https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f=
5855
gnulib_url_prefix: https://raw.githubusercontent.com/coreutils/gnulib/refs/heads/master/

.github/workflows/solaris.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ on:
5050
env:
5151
package: libtool
5252
branch: development
53-
# URL suitable for 'git clone'
54-
#gnulib_url: https://git.savannah.gnu.org/git/gnulib.git
55-
gnulib_url: https://github.com/coreutils/gnulib.git
5653

5754
jobs:
5855
build-tarball:

.github/workflows/windows.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ on:
5050
env:
5151
package: libtool
5252
branch: development
53-
# URL suitable for 'git clone'
54-
#gnulib_url: https://git.savannah.gnu.org/git/gnulib.git
55-
gnulib_url: https://github.com/coreutils/gnulib.git
5653
# URL prefix suitable for downloading individual files through 'wget'
5754
#gnulib_url_prefix: https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f=
5855
gnulib_url_prefix: https://raw.githubusercontent.com/coreutils/gnulib/refs/heads/master/

build-dev-tarball.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ fi
2929

3030
set -e
3131

32+
. ./init-git.sh
33+
3234
# Fetch sources (uses package 'git').
3335
# The depth here needs to be at least 2, because the number of commits in the
3436
# git history of HEAD is stored as "serial" number in m4/ltversion.m4, and if
3537
# it is not at least 2 the unit test
3638
# libtoolize.at: "14: verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIRS"
3739
# fails.
3840
git clone --depth 2 -b "$branch" https://git.savannah.gnu.org/git/"$package".git
39-
git clone --depth 1 "${gnulib_url}"
41+
git clone --depth 1 https://git.savannah.gnu.org/git/gnulib.git
4042

4143
# Apply patches.
4244
(cd "$package" && patch -p1 < ../patches/Skip-test-option-parser.sh-for-ksh-shell-on-NetBSD.patch)

build-tarball.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,16 @@ fi
2929

3030
set -e
3131

32-
# Improve efficiency of checkout of git submodules.
33-
git config --global url.git://git.savannah.gnu.org/.insteadof git://git.git.savannah.gnu.org/
34-
git config --global url.https://git.savannah.gnu.org/git/.insteadof https://https.git.savannah.gnu.org/git/
35-
git config --global url.git://git.savannah.gnu.org/gnulib.git.insteadof https://github.com/coreutils/gnulib.git
36-
git config --global url.https://git.savannah.gnu.org/git/gnulib.git.insteadof https://github.com/coreutils/gnulib.git
32+
. ./init-git.sh
3733

3834
# Fetch sources (uses package 'git').
3935
# The depth here needs to be at least 2, because the number of commits in the
4036
# git history of HEAD is stored as "serial" number in m4/ltversion.m4, and if
4137
# it is not at least 2 the unit test
4238
# libtoolize.at: "14: verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIRS"
4339
# fails.
44-
git clone --depth 2 -b "$branch" https://https.git.savannah.gnu.org/git/"$package".git
45-
git clone --depth 1 "${gnulib_url}"
40+
git clone --depth 2 -b "$branch" https://git.savannah.gnu.org/git/"$package".git
41+
git clone --depth 1 https://git.savannah.gnu.org/git/gnulib.git
4642

4743
# Apply patches.
4844
(cd "$package" && patch -p1 < ../patches/Skip-test-option-parser.sh-for-ksh-shell-on-NetBSD.patch)

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)