From 28f4e3e6541846e590504ec7352ccf86eeb636f6 Mon Sep 17 00:00:00 2001 From: Timothy Werquin Date: Tue, 7 Nov 2023 23:30:39 +0100 Subject: [PATCH 1/4] Only static link gnutls This prevents a crash on firmware versions 3.6+. The NSS functions in glibc don't play nice with static linking. --- build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build b/build index d848547..6217b7a 100755 --- a/build +++ b/build @@ -45,7 +45,7 @@ rm nettle.tar.gz --disable-shared \ --disable-documentation \ --disable-assembler -make +make -j $(nproc) make install popd @@ -69,7 +69,7 @@ rm gnutls.tar.xz --with-included-libtasn1 \ --with-included-unistring \ --without-p11-kit -make +make -j $(nproc) make install popd @@ -84,11 +84,11 @@ fetch https://ftp.gnu.org/gnu/wget/wget-1.21.1.tar.gz wget.tar.gz \ tar --strip-components=1 -zxf wget.tar.gz rm wget.tar.gz -export GNUTLS_LIBS="-L$SYSROOT/usr/lib -static -lgnutls -pthread -latomic -lhogweed -lnettle" +export GNUTLS_LIBS="-L$SYSROOT/usr/lib -Wl,-Bstatic -lgnutls -Wl,-Bdynamic -pthread -latomic -lhogweed -lnettle" ./configure \ --prefix="$SYSROOT/usr" \ --host="$CHOST" -make +make -j $(nproc) popd mv wget-build/src/wget . From 95c6a884dd7e90d30452f73ecc8ae70e46d6ed0a Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 7 Nov 2023 16:07:56 -0700 Subject: [PATCH 2/4] Run build on every commit Limit publish to only on the release tag --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9520153..390d7e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,8 @@ on: push: tags: - '*' + branches: + - '*' jobs: build: name: Build the wget binary @@ -23,6 +25,7 @@ jobs: name: Publish the wget binary runs-on: ubuntu-latest needs: build + if: ${{ github.ref == 'refs/heads/main' }} steps: - name: Fetch the built binary uses: actions/download-artifact@v2 From 88874cbf6efe4270116155b6252287034f5cead8 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 7 Nov 2023 16:08:52 -0700 Subject: [PATCH 3/4] Also build on pull request --- .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 390d7e1..7574b02 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,8 @@ on: tags: - '*' branches: - - '*' + - main + pull_request: jobs: build: name: Build the wget binary From 36ea3985271ee4b78b845c55f64d8dc1046cf21d Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 8 Nov 2023 14:36:49 -0700 Subject: [PATCH 4/4] Only publish on new tags --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7574b02..5b2a45a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: name: Publish the wget binary runs-on: ubuntu-latest needs: build - if: ${{ github.ref == 'refs/heads/main' }} + if: startsWith(github.ref, 'refs/tags/v') steps: - name: Fetch the built binary uses: actions/download-artifact@v2