Skip to content

Commit f77c1e5

Browse files
Copilotbrettcannon
andauthored
Fetch GNU config scripts from git
Co-authored-by: brettcannon <54418+brettcannon@users.noreply.github.com>
1 parent ce00f70 commit f77c1e5

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

autoconf/Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,18 @@ RUN PATCH_VERBOSE=1 curl https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archi
4646
&& ./configure --prefix=/usr/local \
4747
&& make \
4848
&& make install
49-
ADD --chmod=755 https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=${CONFIG_GIT_REV} \
50-
/usr/local/share/autoconf/build-aux/config.guess
51-
ADD --chmod=755 https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=${CONFIG_GIT_REV} \
52-
/usr/local/share/autoconf/build-aux/config.sub
49+
RUN tmp=$(mktemp -d) \
50+
&& git -C "$tmp" init \
51+
&& git -C "$tmp" remote add origin https://git.savannah.gnu.org/git/config.git \
52+
&& for attempt in {1..5}; do \
53+
git -C "$tmp" fetch --depth=1 origin "$CONFIG_GIT_REV" && break; \
54+
if [[ "$attempt" == 5 ]]; then exit 1; fi; \
55+
sleep $((attempt * 5)); \
56+
done \
57+
&& git -C "$tmp" checkout FETCH_HEAD -- config.guess config.sub \
58+
&& install -m 755 "$tmp/config.guess" /usr/local/share/autoconf/build-aux/config.guess \
59+
&& install -m 755 "$tmp/config.sub" /usr/local/share/autoconf/build-aux/config.sub \
60+
&& rm -rf "$tmp"
5361
COPY config.sub.patch .
5462
RUN p=$(pwd)/config.sub.patch \
5563
&& cd /usr/local/share/autoconf/build-aux \

0 commit comments

Comments
 (0)