From ed4fc511192d4d1fd81e938a19aa91d8ed082d8a Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:29:35 -0700 Subject: [PATCH 01/26] Library/Homebrew/glibc-bootstrap/build-bison.sh: remove --- .../Homebrew/glibc-bootstrap/build-bison.sh | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100755 Library/Homebrew/glibc-bootstrap/build-bison.sh diff --git a/Library/Homebrew/glibc-bootstrap/build-bison.sh b/Library/Homebrew/glibc-bootstrap/build-bison.sh deleted file mode 100755 index a4243c9..0000000 --- a/Library/Homebrew/glibc-bootstrap/build-bison.sh +++ /dev/null @@ -1,18 +0,0 @@ -#/bin/bash - -M4_VERSION=1.4.19 -BISON_VERSION=3.8.2 - -# Build m4 -curl -LO --insecure https://ftp.gnu.org/gnu/m4/m4-$M4_VERSION.tar.xz -tar xf m4-$M4_VERSION.tar.xz && cd m4-$M4_VERSION -./configure --prefix="${PREFIX}" && make && make install -cd .. && rm -rf m4-$M4_VERSION - -# Build bison -curl -LO --insecure https://ftp.gnu.org/gnu/bison/bison-$BISON_VERSION.tar.xz -tar xf bison-$BISON_VERSION.tar.xz && cd bison-$BISON_VERSION -./configure --prefix="${PREFIX}" M4="${PREFIX}/bin/m4" && make install -cd .. && rm -rf bison-$BISON_VERSION - -cd $PREFIX && tar --remove-files -czf $PKGDIR/bootstrap-bison-$BISON_VERSION.tar.gz . From dc2170df468b75f6d511cda714b87daa8c387ff2 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:29:44 -0700 Subject: [PATCH 02/26] Library/Homebrew/glibc-bootstrap/build-gawk.sh: remove --- Library/Homebrew/glibc-bootstrap/build-gawk.sh | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100755 Library/Homebrew/glibc-bootstrap/build-gawk.sh diff --git a/Library/Homebrew/glibc-bootstrap/build-gawk.sh b/Library/Homebrew/glibc-bootstrap/build-gawk.sh deleted file mode 100755 index 44f34ea..0000000 --- a/Library/Homebrew/glibc-bootstrap/build-gawk.sh +++ /dev/null @@ -1,11 +0,0 @@ -#/bin/bash - -VERSION=5.1.1 - -# Build gawk -curl -LO --insecure https://ftp.gnu.org/gnu/gawk/gawk-$VERSION.tar.xz -tar xf gawk-$VERSION.tar.xz && cd gawk-$VERSION -./configure --prefix="${PREFIX}" --disable-mpfr --without-libsigsegv && make && make install -cd .. && rm -rf gawk-$VERSION - -cd $PREFIX && tar --remove-files -czf $PKGDIR/bootstrap-gawk-$VERSION.tar.gz . From 0109ea7207f082bbf1ccfe47690bb46f56efd907 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:29:52 -0700 Subject: [PATCH 03/26] Library/Homebrew/glibc-bootstrap/build-gcc.sh: remove --- Library/Homebrew/glibc-bootstrap/build-gcc.sh | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100755 Library/Homebrew/glibc-bootstrap/build-gcc.sh diff --git a/Library/Homebrew/glibc-bootstrap/build-gcc.sh b/Library/Homebrew/glibc-bootstrap/build-gcc.sh deleted file mode 100755 index af37e48..0000000 --- a/Library/Homebrew/glibc-bootstrap/build-gcc.sh +++ /dev/null @@ -1,39 +0,0 @@ -#/bin/bash - -VERSION=9.5.0 - -# Build GCC -curl -LO --insecure https://ftp.gnu.org/gnu/gcc/gcc-$VERSION/gcc-$VERSION.tar.xz -tar xf gcc-$VERSION.tar.xz && cd gcc-$VERSION - -# Download GCC support libraries -./contrib/download_prerequisites - -# Disable building documentation -gcc_cv_prog_makeinfo_modern=no - -mkdir build && cd build - -# Disable everything that isn't needed to build glibc. -../configure \ - --prefix="${PREFIX}" \ - --enable-languages="c,c++" \ - --disable-werror \ - --disable-nls \ - --disable-bootstrap \ - --disable-decimal-float \ - --disable-libatomic \ - --disable-libgomp \ - --disable-libquadmath \ - --disable-libsanitizer \ - --disable-libssp \ - --disable-libvtv \ - --disable-threads \ - --disable-multilib \ - --with-newlib \ - --without-headers -make && make install - -cd ../.. && rm -rf gcc-$VERSION - -cd $PREFIX && tar --remove-files -czf $PKGDIR/bootstrap-gcc-$VERSION.tar.gz . From 6b472c2ccef60357f6de578021f1ab9a52db00be Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:29:59 -0700 Subject: [PATCH 04/26] Library/Homebrew/glibc-bootstrap/build-make.sh: remove --- Library/Homebrew/glibc-bootstrap/build-make.sh | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100755 Library/Homebrew/glibc-bootstrap/build-make.sh diff --git a/Library/Homebrew/glibc-bootstrap/build-make.sh b/Library/Homebrew/glibc-bootstrap/build-make.sh deleted file mode 100755 index 3678c71..0000000 --- a/Library/Homebrew/glibc-bootstrap/build-make.sh +++ /dev/null @@ -1,11 +0,0 @@ -#/bin/bash - -VERSION=4.3 - -# Build make -curl -LO --insecure https://ftp.gnu.org/gnu/make/make-${VERSION}.tar.gz -tar xzf make-${VERSION}.tar.gz && cd make-${VERSION} -./configure --prefix="${PREFIX}" && make install -cd .. && rm -rf make-${VERSION} - -cd ${PREFIX} && tar --remove-files -czf ${PKGDIR}/bootstrap-make-${VERSION}.tar.gz . From 68030702b01dd4acffc0fa31f785a31c2d391b11 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:30:14 -0700 Subject: [PATCH 05/26] Library/Homebrew/glibc-bootstrap/build-python3.sh: remove --- Library/Homebrew/glibc-bootstrap/build-python3.sh | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100755 Library/Homebrew/glibc-bootstrap/build-python3.sh diff --git a/Library/Homebrew/glibc-bootstrap/build-python3.sh b/Library/Homebrew/glibc-bootstrap/build-python3.sh deleted file mode 100755 index a8762fe..0000000 --- a/Library/Homebrew/glibc-bootstrap/build-python3.sh +++ /dev/null @@ -1,14 +0,0 @@ -#/bin/bash - -VERSION=3.9.13 - -# Build Python 3 -curl -LO https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz -tar xf Python-$VERSION.tar.xz && cd Python-$VERSION - -./configure --prefix="${PREFIX}" ac_cv_search_crypt=no ac_cv_search_crypt_r=no -make && make install - -cd .. && rm -rf Python-$VERSION - -cd $PREFIX && tar --remove-files -czf $PKGDIR/bootstrap-python3-${VERSION}.tar.gz . From 1cc08bbd6ce77b105af1f05eba6c929bb1db89f0 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:30:44 -0700 Subject: [PATCH 06/26] Library/Homebrew/glibc-bootstrap/debian7/Dockerfile: remove --- Library/Homebrew/glibc-bootstrap/debian7/Dockerfile | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 Library/Homebrew/glibc-bootstrap/debian7/Dockerfile diff --git a/Library/Homebrew/glibc-bootstrap/debian7/Dockerfile b/Library/Homebrew/glibc-bootstrap/debian7/Dockerfile deleted file mode 100644 index e575c54..0000000 --- a/Library/Homebrew/glibc-bootstrap/debian7/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM debian/eol:wheezy -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get update \ - && apt-get install -y build-essential curl bzip2 libz-dev - -RUN useradd -m -s /bin/bash linuxbrew - -ENV PREFIX=/tmp/homebrew -RUN su - linuxbrew -c 'mkdir -p /tmp/homebrew' -ENV PKGDIR=/home/linuxbrew/bootstrap-binaries -RUN su - linuxbrew -c 'mkdir -p /home/linuxbrew/bootstrap-binaries' From 7489996f42604c0ae061847cab859f9e0bc88999 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:31:03 -0700 Subject: [PATCH 07/26] Library/Homebrew/glibc-bootstrap/build-sed.sh: remove --- Library/Homebrew/glibc-bootstrap/build-sed.sh | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100755 Library/Homebrew/glibc-bootstrap/build-sed.sh diff --git a/Library/Homebrew/glibc-bootstrap/build-sed.sh b/Library/Homebrew/glibc-bootstrap/build-sed.sh deleted file mode 100755 index 86938da..0000000 --- a/Library/Homebrew/glibc-bootstrap/build-sed.sh +++ /dev/null @@ -1,11 +0,0 @@ -#/bin/bash - -VERSION=4.8 - -# Build sed -curl -LO --insecure https://ftp.gnu.org/gnu/sed/sed-$VERSION.tar.xz -tar xf sed-$VERSION.tar.xz && cd sed-$VERSION -./configure --prefix="${PREFIX}" --without-selinux && make install -cd .. && rm -rf sed-$VERSION - -cd $PREFIX && tar --remove-files -czf $PKGDIR/bootstrap-sed-$VERSION.tar.gz . From 4967c3b07de21b5b137a325e6da201807e4bb8db Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:39:17 -0700 Subject: [PATCH 08/26] .github/workflows/build.yml: fix syntax and update directories --- .github/workflows/build.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1a71f1..739e9cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,12 +1,11 @@ name: Build bootstrap binaries for glibc on Linux -# FILL in - on: pull_request: paths: - .github/workflows/build.yml - - Library/Homebrew/glibc-bootstrap/** + - 'build-*.sh' + - debian7/Dockerfile jobs: build: @@ -15,23 +14,25 @@ jobs: fail-fast: false matrix: binary: [ + "binutils", "bison", "gawk", "gcc", "make", "python3", - "sed",] + "sed", + ] include: - container: debian7 steps: - uses: actions/checkout@v2 - name: Build Docker image - run: docker build -t ${{matrix.container}} . - working-directory: Library/Homebrew/glibc-bootstrap/debian7 + run: docker build --tag ${{matrix.container}} . + working-directory: debian7 - name: Run Docker container - run: docker run --rm --detach --user linuxbrew --name ${{github.sha}} -w /home/linuxbrew -v $(pwd)/Library/Homebrew/glibc-bootstrap:/home/linuxbrew/glibc-bootstrap ${{matrix.container}} sleep inf + run: docker run --rm --detach --user linuxbrew --name ${{github.sha}} --workdir /home/linuxbrew --volume $(pwd):/home/linuxbrew/glibc-bootstrap ${{matrix.container}} sleep inf - name: Build ${{matrix.binary}} run: docker exec ${{github.sha}} /bin/bash -c "/home/linuxbrew/glibc-bootstrap/build-${{matrix.binary}}.sh" @@ -40,7 +41,7 @@ jobs: run: docker cp ${{github.sha}}:/home/linuxbrew/bootstrap-binaries . - name: Upload binaries to GitHub Actions - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Bootstrap binaries path: bootstrap-binaries From b619efc3d0345cdcc72f94c6500215877fb011de Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:35:20 -0700 Subject: [PATCH 09/26] .github/workflows/release.yml: add --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..40617d9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Upload new release + +on: + pull_request: + # Add these back when everything works + # workflow_dispatch: + # inputs: + # tag: + # description: Version to use for release tag + # required: true + +jobs: + build: + uses: ./.github/workflows/build.yml + + release: + needs: build + runs-on: ubuntu-latest + env: + TAG: ${{github.event.inputs.tag}} + steps: + - name: Download binaries from GitHub Actions + uses: actions/download-artifact@v3 + with: + name: Bootstrap binaries + path: bootstrap-binaries + + - name: Push tag + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + gh release create "${TAG}" --notes "Bootstrap binaries ${TAG}" --target "$(git rev-parse --verify HEAD)" + + - name: Upload to GitHub Releases + working-directory: bootstrap-binaries + env: + GITHUB_TOKEN: ${{ github.token }} + run: gh release upload "${TAG}" . From c5871588d6988a761f67e2e4e69efaeae421ae5d Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:38:11 -0700 Subject: [PATCH 10/26] debian7/Dockerfile: add --- debian7/Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 debian7/Dockerfile diff --git a/debian7/Dockerfile b/debian7/Dockerfile new file mode 100644 index 0000000..d947fe5 --- /dev/null +++ b/debian7/Dockerfile @@ -0,0 +1,14 @@ +FROM debian/eol:wheezy +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y build-essential bzip2 libz-dev texinfo wget + +RUN useradd --create-home --shell /bin/bash linuxbrew + +ENV CFLAGS="-march=core2 -O2" +ENV CXXFLAGS="-march=core2 -O2" +ENV PREFIX=/tmp/homebrew +RUN su - linuxbrew --command 'mkdir --parents /tmp/homebrew' +ENV PKGDIR=/home/linuxbrew/bootstrap-binaries +RUN su - linuxbrew --command 'mkdir --parents /home/linuxbrew/bootstrap-binaries' From 7b5efbad80bd662aad01297043e9fba870f181f0 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:36:11 -0700 Subject: [PATCH 11/26] build-binutils.sh: add --- build-binutils.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 build-binutils.sh diff --git a/build-binutils.sh b/build-binutils.sh new file mode 100755 index 0000000..3164bcb --- /dev/null +++ b/build-binutils.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -e +source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" + +VERSION=2.38 +SHA256SUM=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024 + +# Build binutils +wget --no-check-certificate https://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.xz +verify_checksum binutils-$VERSION.tar.xz $SHA256SUM + +tar --extract --file binutils-$VERSION.tar.xz +cd binutils-$VERSION +./configure --prefix="${PREFIX}" \ + --enable-deterministic-archives \ + --prefix="${PREFIX}" \ + --disable-werror \ + --enable-interwork \ + --enable-multilib \ + --enable-64-bit-bfd \ + --enable-targets=all \ + --disable-nls + +make +make install +cd .. +rm -rf binutils-$VERSION + +package binutils $VERSION From c40a0e36069d55b94cc4ac86ba8495f66f17ef08 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:36:20 -0700 Subject: [PATCH 12/26] build-bison.sh: add --- build-bison.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 build-bison.sh diff --git a/build-bison.sh b/build-bison.sh new file mode 100755 index 0000000..abe51e4 --- /dev/null +++ b/build-bison.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +set -e +source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" + +M4_VERSION=1.4.19 +M4_SHA256SUM=63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96 +BISON_VERSION=3.8.2 +BISON_SHA256SUM=9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2 + +# Build m4 +wget --no-check-certificate https://ftp.gnu.org/gnu/m4/m4-$M4_VERSION.tar.xz +verify_checksum m4-$M4_VERSION.tar.xz $M4_SHA256SUM + +tar --extract --file m4-$M4_VERSION.tar.xz +cd m4-$M4_VERSION +./configure --prefix="${PREFIX}" +make +make install +cd .. +rm --recursive --force m4-$M4_VERSION + +# Build bison +wget --no-check-certificate https://ftp.gnu.org/gnu/bison/bison-$BISON_VERSION.tar.xz +verify_checksum bison-$BISON_VERSION.tar.xz $BISON_SHA256SUM + +tar --extract --file bison-$BISON_VERSION.tar.xz +cd bison-$BISON_VERSION +./configure --prefix="${PREFIX}" M4="${PREFIX}/bin/m4" +make install +cd .. +rm --recursive --force bison-$BISON_VERSION + +package bison $BISON_VERSION From 9bb02e3ead491ef324f5abfc3ae7e572d5768319 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:36:32 -0700 Subject: [PATCH 13/26] build-gawk.sh: add --- build-gawk.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 build-gawk.sh diff --git a/build-gawk.sh b/build-gawk.sh new file mode 100755 index 0000000..cb6d2a2 --- /dev/null +++ b/build-gawk.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e +source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" + +VERSION=5.1.1 +SHA256SUM=d87629386e894bbea11a5e00515fc909dc9b7249529dad9e6a3a2c77085f7ea2 + +# Build gawk +wget --no-check-certificate https://ftp.gnu.org/gnu/gawk/gawk-$VERSION.tar.xz +verify_checksum gawk-$VERSION.tar.xz $SHA256SUM + +tar --extract --file gawk-$VERSION.tar.xz +cd gawk-$VERSION +./configure --prefix="${PREFIX}" --disable-mpfr --without-libsigsegv +make +make install +cd .. +rm --recursive --force gawk-$VERSION + +package gawk ${VERSION} From 98dff206736c201c86b54a6baf134b5647c4e48f Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:36:46 -0700 Subject: [PATCH 14/26] build-gcc.sh: add --- build-gcc.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 build-gcc.sh diff --git a/build-gcc.sh b/build-gcc.sh new file mode 100755 index 0000000..347fb06 --- /dev/null +++ b/build-gcc.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +set -e +source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" + +VERSION=9.5.0 +SHA256SUM=27769f64ef1d4cd5e2be8682c0c93f9887983e6cfd1a927ce5a0a2915a95cf8f + +# Build GCC +wget --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-$VERSION/gcc-$VERSION.tar.xz +verify_checksum gcc-$VERSION.tar.xz $SHA256SUM + +tar --extract --file gcc-$VERSION.tar.xz +cd gcc-$VERSION + +# Download GCC support libraries +./contrib/download_prerequisites + +# Disable building documentation +gcc_cv_prog_makeinfo_modern=no + +mkdir build +cd build + +# Disable everything that isn't needed to build glibc. +../configure \ + --prefix="${PREFIX}" \ + --enable-languages="c,c++" \ + --disable-werror \ + --disable-nls \ + --disable-bootstrap \ + --disable-decimal-float \ + --disable-libatomic \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-libsanitizer \ + --disable-libssp \ + --disable-libvtv \ + --disable-threads \ + --disable-multilib \ + --with-newlib \ + --without-headers +make +make install + +cd ../.. +rm --recursive --force gcc-$VERSION + +package gcc $VERSION From 72a20517ee18fac0dcba4c23c0cf17eaa2610271 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:36:53 -0700 Subject: [PATCH 15/26] build-make.sh: add --- build-make.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 build-make.sh diff --git a/build-make.sh b/build-make.sh new file mode 100755 index 0000000..34ac5b4 --- /dev/null +++ b/build-make.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e +source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" + +VERSION=4.3 +SHA256SUM=e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19 + +# Build make +wget --no-check-certificate https://ftp.gnu.org/gnu/make/make-${VERSION}.tar.gz +verify_checksum make-${VERSION}.tar.gz $SHA256SUM + +tar --extract --gunzip --file make-${VERSION}.tar.gz +cd make-${VERSION} +./configure --prefix="${PREFIX}" +make install +cd .. +rm --recursive --force make-${VERSION} + +package make ${VERSION} From fa5b8f66d5563f21b156467b6b280190ca5daf93 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:37:02 -0700 Subject: [PATCH 16/26] build-python3.sh: add --- build-python3.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 build-python3.sh diff --git a/build-python3.sh b/build-python3.sh new file mode 100755 index 0000000..8110525 --- /dev/null +++ b/build-python3.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e +source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" + +VERSION=3.9.13 +SHA256SUM=125b0c598f1e15d2aa65406e83f792df7d171cdf38c16803b149994316a3080f + +# Build Python 3 +wget --no-check-certificate https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz +verify_checksum Python-$VERSION.tar.xz $SHA256SUM + +tar --extract --file Python-$VERSION.tar.xz +cd Python-$VERSION + +./configure --prefix="${PREFIX}" ac_cv_search_crypt=no ac_cv_search_crypt_r=no +make +make install + +cd .. +rm --recursive --force Python-$VERSION + +package python3 ${VERSION} From 13b4f8e7c32ab5f9e00fa15dd2e2b5de3d84c513 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Fri, 19 Aug 2022 01:37:10 -0700 Subject: [PATCH 17/26] build-sed.sh: add --- build-sed.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 build-sed.sh diff --git a/build-sed.sh b/build-sed.sh new file mode 100755 index 0000000..c8f5560 --- /dev/null +++ b/build-sed.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e +source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" + +VERSION=4.8 +SHA256SUM=f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633 + +# Build sed +wget --no-check-certificate https://ftp.gnu.org/gnu/sed/sed-$VERSION.tar.xz +verify_checksum sed-$VERSION.tar.xz $SHA256SUM + +tar --extract --file sed-$VERSION.tar.xz +cd sed-$VERSION +./configure --prefix="${PREFIX}" --without-selinux +make install +cd .. +rm --recursive --force sed-$VERSION + +package sed $VERSION From b79c909a1ebb78b646902f33a337949da5ec0e1f Mon Sep 17 00:00:00 2001 From: danielnachun Date: Sat, 20 Aug 2022 00:49:50 -0700 Subject: [PATCH 18/26] utils.sh: add --- utils.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 utils.sh diff --git a/utils.sh b/utils.sh new file mode 100755 index 0000000..94313dd --- /dev/null +++ b/utils.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +verify_checksum() { + FILE=$1 + EXPECTED_CHECKSUM=$2 + FILE_CHECKSUM=$(sha256sum ${FILE} | cut -d ' ' -f 1) + + if [[ $FILE_CHECKSUM != $EXPECTED_CHECKSUM ]]; then + echo "Checksum mismatch!" + return 1 + fi +} + +package() { + PKGNAME=$1 + VERSION=$2 + + cd $PREFIX + tar --remove-files --create --gzip --file $PKGDIR/bootstrap-$PKGNAME-$VERSION.tar.gz . +} From 5404bd87cd95eaea24753e5f8d1084d16c4c4f32 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Sat, 20 Aug 2022 00:54:09 -0700 Subject: [PATCH 19/26] .github/workflows/build.yml: add workflow_call --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 739e9cd..3f527ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,8 @@ name: Build bootstrap binaries for glibc on Linux on: + workflow_call: + pull_request: paths: - .github/workflows/build.yml From f3acabbe6011aacde05654abb6d5e9bb486e1e70 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Sat, 20 Aug 2022 00:56:35 -0700 Subject: [PATCH 20/26] .github/workflows/build.yml: disable pull_request for testing --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f527ce..e95aac4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,11 +3,11 @@ name: Build bootstrap binaries for glibc on Linux on: workflow_call: - pull_request: - paths: - - .github/workflows/build.yml - - 'build-*.sh' - - debian7/Dockerfile + # pull_request: + #paths: + # - .github/workflows/build.yml + # - 'build-*.sh' + # - debian7/Dockerfile jobs: build: From 1e0f67a4f1956c7a212733f2308426326e40c4aa Mon Sep 17 00:00:00 2001 From: danielnachun Date: Sat, 20 Aug 2022 00:56:15 -0700 Subject: [PATCH 21/26] .github/workflows/release.yml: hardcode tag for testing --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40617d9..2ede4eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,8 @@ jobs: needs: build runs-on: ubuntu-latest env: - TAG: ${{github.event.inputs.tag}} + #TAG: ${{github.event.inputs.tag}} + TAG: 1.0.0 steps: - name: Download binaries from GitHub Actions uses: actions/download-artifact@v3 From 4fc1d0975f54551fa84ee725977b5e59a6e397a0 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Sat, 20 Aug 2022 01:34:18 -0700 Subject: [PATCH 22/26] .github/workflows/release.yml: add checkout action --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ede4eb..e69a40d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,8 @@ jobs: #TAG: ${{github.event.inputs.tag}} TAG: 1.0.0 steps: + - uses: actions/checkout@v2 + - name: Download binaries from GitHub Actions uses: actions/download-artifact@v3 with: From d87537c9a0121759a494bec4ca7193c60a4094b2 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Sat, 20 Aug 2022 02:09:59 -0700 Subject: [PATCH 23/26] .github/workflows/release.yml: set permissions --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e69a40d..9a98a3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,7 @@ on: # tag: # description: Version to use for release tag # required: true + jobs: build: @@ -16,6 +17,7 @@ jobs: release: needs: build runs-on: ubuntu-latest + permissions: write-all env: #TAG: ${{github.event.inputs.tag}} TAG: 1.0.0 From e4ad6e314eed9dff5315328b655ea03b335c3854 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Sat, 20 Aug 2022 16:34:43 -0700 Subject: [PATCH 24/26] LICENSE.txt: add --- LICENSE.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..12500f7 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright (c) 2009-present, Homebrew contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From fd57414501649a2c491461cbc01689722699d9d8 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Sun, 21 Aug 2022 20:07:29 -0700 Subject: [PATCH 25/26] Fix gh release upload --- .github/workflows/release.yml | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a98a3c..5316f3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,11 @@ name: Upload new release on: - pull_request: - # Add these back when everything works - # workflow_dispatch: - # inputs: - # tag: - # description: Version to use for release tag - # required: true - + workflow_dispatch: + inputs: + tag: + description: Version to use for release tag + required: true jobs: build: @@ -17,10 +14,11 @@ jobs: release: needs: build runs-on: ubuntu-latest - permissions: write-all + permissions: + contents: write env: - #TAG: ${{github.event.inputs.tag}} - TAG: 1.0.0 + GH_TOKEN: ${{github.token}} + TAG: ${{github.event.inputs.tag}} steps: - uses: actions/checkout@v2 @@ -31,13 +29,7 @@ jobs: path: bootstrap-binaries - name: Push tag - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - gh release create "${TAG}" --notes "Bootstrap binaries ${TAG}" --target "$(git rev-parse --verify HEAD)" + run: gh release create "$TAG" --generate-notes - name: Upload to GitHub Releases - working-directory: bootstrap-binaries - env: - GITHUB_TOKEN: ${{ github.token }} - run: gh release upload "${TAG}" . + run: gh release upload "$TAG" bootstrap-binaries/*.tar.gz From 753eca8f0cac10688814ee545ff79c7354919fcb Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Sun, 21 Aug 2022 21:07:05 -0700 Subject: [PATCH 26/26] Tidy .github/workflows/build.yml --- .github/workflows/build.yml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e95aac4..7f79076 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,11 @@ name: Build bootstrap binaries for glibc on Linux on: - workflow_call: - - # pull_request: - #paths: - # - .github/workflows/build.yml - # - 'build-*.sh' - # - debian7/Dockerfile + pull_request: + paths: + - .github/workflows/build.yml + - "build-*.sh" + - debian7/Dockerfile jobs: build: @@ -15,15 +13,14 @@ jobs: strategy: fail-fast: false matrix: - binary: [ - "binutils", - "bison", - "gawk", - "gcc", - "make", - "python3", - "sed", - ] + binary: + - binutils + - bison + - gawk + - gcc + - make + - python3 + - sed include: - container: debian7 steps: @@ -44,6 +41,6 @@ jobs: - name: Upload binaries to GitHub Actions uses: actions/upload-artifact@v3 - with: + with: name: Bootstrap binaries path: bootstrap-binaries