From ddea3cd1ca0fc97dc8ba41ddac489eec71ee8081 Mon Sep 17 00:00:00 2001 From: Chai Feng Date: Wed, 1 Jan 2025 17:13:33 +0800 Subject: [PATCH] Fix missing Job Control builtins in Bash 3.0-4.3 and stabilize Bash 3.x builds --- 3.0/Dockerfile | 4 +++- 3.1/Dockerfile | 4 +++- 3.2/Dockerfile | 4 +++- 4.0/Dockerfile | 2 ++ 4.1/Dockerfile | 2 ++ 4.2/Dockerfile | 2 ++ 4.3/Dockerfile | 2 ++ Dockerfile.template | 8 ++++++++ 8 files changed, 25 insertions(+), 3 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 55a3ceb..9f24b78 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -100,6 +100,8 @@ RUN set -eux; \ for f in config.guess config.sub; do \ wget -O "support/$f" "https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb"; \ done; \ +# https://github.com/tianon/docker-bash/pull/45 + export CFLAGS='-Wno-error=implicit-int -Wno-error=implicit-function-declaration'; \ ./configure \ --build="$gnuArch" \ --enable-readline \ @@ -113,7 +115,7 @@ RUN set -eux; \ }; \ # parallel jobs workaround borrowed from Alpine :) make y.tab.c; make builtins/libbuiltins.a; \ - make -j "$(nproc)"; \ + make -j 1; \ make install; \ cd /; \ rm -r /usr/local/src/bash; \ diff --git a/3.1/Dockerfile b/3.1/Dockerfile index 60b2daa..f6e7914 100644 --- a/3.1/Dockerfile +++ b/3.1/Dockerfile @@ -99,6 +99,8 @@ RUN set -eux; \ for f in config.guess config.sub; do \ wget -O "support/$f" "https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb"; \ done; \ +# https://github.com/tianon/docker-bash/pull/45 + export CFLAGS='-Wno-error=implicit-int -Wno-error=implicit-function-declaration'; \ ./configure \ --build="$gnuArch" \ --enable-readline \ @@ -112,7 +114,7 @@ RUN set -eux; \ }; \ # parallel jobs workaround borrowed from Alpine :) make y.tab.c; make builtins/libbuiltins.a; \ - make -j "$(nproc)"; \ + make -j 1; \ make install; \ cd /; \ rm -r /usr/local/src/bash; \ diff --git a/3.2/Dockerfile b/3.2/Dockerfile index 9bf2050..fc8426f 100644 --- a/3.2/Dockerfile +++ b/3.2/Dockerfile @@ -100,6 +100,8 @@ RUN set -eux; \ for f in config.guess config.sub; do \ wget -O "support/$f" "https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb"; \ done; \ +# https://github.com/tianon/docker-bash/pull/45 + export CFLAGS='-Wno-error=implicit-int -Wno-error=implicit-function-declaration'; \ ./configure \ --build="$gnuArch" \ --enable-readline \ @@ -113,7 +115,7 @@ RUN set -eux; \ }; \ # parallel jobs workaround borrowed from Alpine :) make y.tab.c; make builtins/libbuiltins.a; \ - make -j "$(nproc)"; \ + make -j 1; \ make install; \ cd /; \ rm -r /usr/local/src/bash; \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index ba5f1f6..9e7e3ea 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -99,6 +99,8 @@ RUN set -eux; \ for f in config.guess config.sub; do \ wget -O "support/$f" "https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb"; \ done; \ +# https://github.com/tianon/docker-bash/pull/45 + export CFLAGS='-Wno-error=implicit-int -Wno-error=implicit-function-declaration'; \ ./configure \ --build="$gnuArch" \ --enable-readline \ diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 071b2c1..69cfcdb 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -99,6 +99,8 @@ RUN set -eux; \ for f in config.guess config.sub; do \ wget -O "support/$f" "https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb"; \ done; \ +# https://github.com/tianon/docker-bash/pull/45 + export CFLAGS='-Wno-error=implicit-int -Wno-error=implicit-function-declaration'; \ ./configure \ --build="$gnuArch" \ --enable-readline \ diff --git a/4.2/Dockerfile b/4.2/Dockerfile index b4ce0d6..fda1b21 100644 --- a/4.2/Dockerfile +++ b/4.2/Dockerfile @@ -100,6 +100,8 @@ RUN set -eux; \ for f in config.guess config.sub; do \ wget -O "support/$f" "https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb"; \ done; \ +# https://github.com/tianon/docker-bash/pull/45 + export CFLAGS='-Wno-error=implicit-int -Wno-error=implicit-function-declaration'; \ ./configure \ --build="$gnuArch" \ --enable-readline \ diff --git a/4.3/Dockerfile b/4.3/Dockerfile index aa1bcda..f15999e 100644 --- a/4.3/Dockerfile +++ b/4.3/Dockerfile @@ -100,6 +100,8 @@ RUN set -eux; \ for f in config.guess config.sub; do \ wget -O "support/$f" "https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb"; \ done; \ +# https://github.com/tianon/docker-bash/pull/45 + export CFLAGS='-Wno-error=implicit-int -Wno-error=implicit-function-declaration'; \ ./configure \ --build="$gnuArch" \ --enable-readline \ diff --git a/Dockerfile.template b/Dockerfile.template index 52028b9..8f3ab50 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -115,6 +115,10 @@ RUN set -eux; \ wget -O "support/$f" "https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb"; \ done; \ {{ ) end -}} +{{ if env.version | IN("3.0", "3.1", "3.2", "4.0", "4.1", "4.2", "4.3") then ( -}} +# https://github.com/tianon/docker-bash/pull/45 + export CFLAGS='-Wno-error=implicit-int -Wno-error=implicit-function-declaration'; \ +{{ ) else "" end -}} ./configure \ --build="$gnuArch" \ --enable-readline \ @@ -135,7 +139,11 @@ RUN set -eux; \ # parallel jobs workaround borrowed from Alpine :) make y.tab.c; make builtins/libbuiltins.a; \ {{ ) end -}} +{{ if env.version | startswith("3.") then ( -}} + make -j 1; \ +{{ ) else ( -}} make -j "$(nproc)"; \ +{{ ) end -}} make install; \ cd /; \ rm -r /usr/local/src/bash; \