Skip to content

Commit

Permalink
Bootstrap gzip on linux generic target
Browse files Browse the repository at this point in the history
The distro's version does not support the `-k` option.
  • Loading branch information
elprans committed Oct 17, 2024
1 parent ed9d485 commit 8d8bf73
Show file tree
Hide file tree
Showing 18 changed files with 598 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration/linux/build/Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ RUN set -ex \
&& /_bootstrap/python.sh \
&& /_bootstrap/git.sh \
&& /_bootstrap/patchelf.sh \
&& /_bootstrap/gzip.sh \
&& /_bootstrap/tar.sh \
&& /_bootstrap/pkgconf.sh \
&& /_bootstrap/rust.sh \
Expand Down
35 changes: 35 additions & 0 deletions integration/linux/build/_bootstrap/gzip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

set -ex

: ${GZIP_VERSION:=1.13}

GZIP_KEYS=(
155D3FC500C834486D1EEA677FD9FCCB000BEEEE
)

mkdir -p /usr/src/gzip
cd /usr/src

curl -fsSLo gzip.tar.gz "https://ftp.gnu.org/gnu/gzip/gzip-${GZIP_VERSION}.tar.gz"
curl -fsSLo gzip.tar.gz.sign "https://ftp.gnu.org/gnu/gzip/gzip-${GZIP_VERSION}.tar.gz.sig"

for key in "${GZIP_KEYS[@]}"; do
gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys "$key" \
|| gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key"
done

gpg --batch --verify gzip.tar.gz.sign gzip.tar.gz
rm -f gzip.tar.gz.sign

tar -xzC /usr/src/gzip --strip-components=1 -f gzip.tar.gz
rm -f gzip.tar.gz

cd /usr/src/gzip
./configure \
--bindir=/usr/local/bin/ \
--libexecdir=/usr/local/sbin/
make -j $(nproc)
make install
cd /usr/src
rm -rf /usr/src/gzip
35 changes: 35 additions & 0 deletions integration/linux/build/centos-7/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions integration/linux/build/centos-8/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions integration/linux/build/debian-bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions integration/linux/build/debian-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions integration/linux/build/debian-buster/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions integration/linux/build/fedora-40/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,41 @@ RUN mkdir -p '_bootstrap'; /bin/echo -e '#!/usr/bin/env bash\n\
\n\
set -ex\n\
\n\
: ${GZIP_VERSION:=1.13}\n\
\n\
GZIP_KEYS=(\n\
155D3FC500C834486D1EEA677FD9FCCB000BEEEE\n\
)\n\
\n\
mkdir -p /usr/src/gzip\n\
cd /usr/src\n\
\n\
curl -fsSLo gzip.tar.gz "https://ftp.gnu.org/gnu/gzip/gzip-${GZIP_VERSION}.tar.gz"\n\
curl -fsSLo gzip.tar.gz.sign "https://ftp.gnu.org/gnu/gzip/gzip-${GZIP_VERSION}.tar.gz.sig"\n\
\n\
for key in "${GZIP_KEYS[@]}"; do\n\
gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys "$key" \\\n\
|| gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key"\n\
done\n\
\n\
gpg --batch --verify gzip.tar.gz.sign gzip.tar.gz\n\
rm -f gzip.tar.gz.sign\n\
\n\
tar -xzC /usr/src/gzip --strip-components=1 -f gzip.tar.gz\n\
rm -f gzip.tar.gz\n\
\n\
cd /usr/src/gzip\n\
./configure \\\n\
--bindir=/usr/local/bin/ \\\n\
--libexecdir=/usr/local/sbin/\n\
make -j $(nproc)\n\
make install\n\
cd /usr/src\n\
rm -rf /usr/src/gzip\n\' >/_bootstrap/gzip.sh; chmod +x /_bootstrap/gzip.sh
RUN mkdir -p '_bootstrap'; /bin/echo -e '#!/usr/bin/env bash\n\
\n\
set -ex\n\
\n\
: ${MESON_VERSION:=1.5.2}\n\
\n\
mkdir -p /usr/src/meson\n\
Expand Down
36 changes: 36 additions & 0 deletions integration/linux/build/linux-aarch64/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions integration/linux/build/linux-x86_64/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8d8bf73

Please sign in to comment.