diff --git a/.forgejo/workflows/build-socat.yml b/.forgejo/workflows/build-socat.yml deleted file mode 100644 index 6113268..0000000 --- a/.forgejo/workflows/build-socat.yml +++ /dev/null @@ -1,235 +0,0 @@ -name: socat -on: - workflow_dispatch -jobs: - build-x86: - name: Build socat x86 - runs-on: docker - container: - image: muslcc/x86_64:i686-linux-musl - outputs: - version: "${{ steps.build_socat.outputs.PACKAGED_VERSION }}" - steps: - - name: Install dependencies - run: sudo apk update && sudo apk add bash nodejs git-lfs - - - name: Checkout - uses: actions/checkout@v4 - - - name: Install build dependencies - run: sudo bash build/install_deps_alpine.sh - - - name: Install testing dependencies - run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl - - - name: Build socat - id: build_socat - run: $GITHUB_WORKSPACE/build/targets/build_socat.sh x86 - - - name: Upload artifacts - uses: https://code.forgejo.org/forgejo/upload-artifact@v4 - with: - name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} - path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} - - build-x86_64: - name: Build socat x86_64 - runs-on: docker - container: muslcc/x86_64:x86_64-linux-musl - steps: - - name: Install dependencies - run: sudo apk update && sudo apk add bash nodejs git-lfs - - - name: Checkout - uses: actions/checkout@v4 - - - name: Install build dependencies - run: sudo bash build/install_deps_alpine.sh - - - name: Checkout - uses: actions/checkout@v4 - - - name: Install dependencies - run: sudo apk update && sudo apk add bash && sudo bash build/install_deps_alpine.sh - - - name: Install testing dependencies - run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl - - - name: Build socat - id: build_socat - run: $GITHUB_WORKSPACE/build/targets/build_socat.sh x86_64 - - - name: Upload artifacts - uses: https://code.forgejo.org/forgejo/upload-artifact@v4 - with: - name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} - path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} - - build-armhf: - name: Build socat ARMHF - runs-on: docker - container: muslcc/x86_64:arm-linux-musleabihf - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install dependencies - run: sudo apk update && sudo apk add bash && sudo bash build/install_deps_alpine.sh - - - name: Install testing dependencies - run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl - - - name: Install build compiler - run: /bin/sh -c "apk update && apk upgrade && apk add --no-cache curl rsync sudo util-linux && cd / && curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz && tar -xf ${ARCH}-cross.tgz && rm ${ARCH}-cross.tgz && cd ${ARCH}-cross" - env: - ARCH: x86_64-linux-musl - HOST: http://musl.cc/ - TEMP: /tmp - USER: 0 - - - name: Build socat - id: build_socat - run: $GITHUB_WORKSPACE/build/targets/build_socat.sh armhf - - - name: Upload artifacts - uses: https://code.forgejo.org/forgejo/upload-artifact@v4 - with: - name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} - path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} - - build-aarch64: - name: Build socat AARCH64 - runs-on: docker - container: muslcc/x86_64:aarch64-linux-musl - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install dependencies - run: sudo apk update && sudo apk add bash && sudo bash build/install_deps_alpine.sh - - - name: Install testing dependencies - run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl - - - name: Install build compiler - run: /bin/sh -c "apk update && apk upgrade && apk add --no-cache curl rsync sudo util-linux && cd / && curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz && tar -xf ${ARCH}-cross.tgz && rm ${ARCH}-cross.tgz && cd ${ARCH}-cross" - env: - ARCH: x86_64-linux-musl - HOST: http://musl.cc/ - TEMP: /tmp - USER: 0 - - - name: Build socat - id: build_socat - run: $GITHUB_WORKSPACE/build/targets/build_socat.sh aarch64 - - - name: Upload artifacts - uses: https://code.forgejo.org/forgejo/upload-artifact@v4 - with: - name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} - path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} - - build-ppc32: - name: Build socat powerpc32 - runs-on: docker - container: muslcc/x86_64:powerpc-linux-musl - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install dependencies - run: sudo apk update && sudo apk add bash && sudo bash build/install_deps_alpine.sh - - - name: Install testing dependencies - run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl - - - name: Install build compiler - run: /bin/sh -c "apk update && apk upgrade && apk add --no-cache curl rsync sudo util-linux && cd / && curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz && tar -xf ${ARCH}-cross.tgz && rm ${ARCH}-cross.tgz && cd ${ARCH}-cross" - env: - ARCH: x86_64-linux-musl - HOST: http://musl.cc/ - TEMP: /tmp - USER: 0 - - - name: Build socat - id: build_socat - run: $GITHUB_WORKSPACE/build/targets/build_socat.sh ppc32 - - - name: Upload artifacts - uses: https://code.forgejo.org/forgejo/upload-artifact@v4 - with: - name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} - path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} - - build-ppc64: - name: Build socat powerpc64 - runs-on: docker - container: muslcc/x86_64:powerpc64-linux-musl - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install dependencies - run: sudo apk update && sudo apk add bash && sudo bash build/install_deps_alpine.sh - - - name: Install testing dependencies - run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl - - - name: Install build compiler - run: /bin/sh -c "apk update && apk upgrade && apk add --no-cache curl rsync sudo util-linux && cd / && curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz && tar -xf ${ARCH}-cross.tgz && rm ${ARCH}-cross.tgz && cd ${ARCH}-cross" - env: - ARCH: x86_64-linux-musl - HOST: http://musl.cc/ - TEMP: /tmp - USER: 0 - - - name: Build socat - id: build_socat - run: $GITHUB_WORKSPACE/build/targets/build_socat.sh ppc64 - - - name: Upload artifacts - uses: https://code.forgejo.org/forgejo/upload-artifact@v4 - with: - name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} - path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} - - create-release: - name: Create socat Release - runs-on: docker - needs: [build-x86, build-x86_64, build-armhf, build-aarch64, build-ppc32, build-ppc64] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Prepare Environment - run: mkdir /tmp/releases - - - name: Download Artifacts - uses: https://code.forgejo.org/forgejo/download-artifact@v4 - with: - path: /tmp/releases - - - name: List Artifacts - run: ls -laR /tmp/releases - - - name: Tag Release - id: tag_release - run: | - set +e - if git rev-list "socat-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then - echo "Tag for socat-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." - echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT - else - git tag "socat-v${{ needs.build-x86.outputs.version }}" - git push origin "socat-v${{ needs.build-x86.outputs.version }}" - echo "NEW_RELEASE=true" >> $GITHUB_OUTPUT - fi - - - name: Create Release - uses: ncipollo/release-action@v1 - if: ${{ steps.tag_release.outputs.NEW_RELEASE == 'true' }} - with: - name: socat-v${{ needs.build-x86.outputs.version }} - tag: socat-v${{ needs.build-x86.outputs.version }} - artifacts: "/tmp/releases/*/*" - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.forgejo/workflows/build-gdb.yml b/.github/workflows/build-gdb.yml similarity index 100% rename from .forgejo/workflows/build-gdb.yml rename to .github/workflows/build-gdb.yml diff --git a/.forgejo/workflows/build-nmap.yml b/.github/workflows/build-nmap.yml similarity index 93% rename from .forgejo/workflows/build-nmap.yml rename to .github/workflows/build-nmap.yml index 33f0d3d..93e1188 100644 --- a/.forgejo/workflows/build-nmap.yml +++ b/.github/workflows/build-nmap.yml @@ -145,18 +145,15 @@ jobs: run: ls -laR /tmp/releases - name: Tag Release - id: tag_release run: | set +e - git fetch --quiet --prune --tags - if [[ $(git tag -l | grep nmap-v${{ needs.build-x86.outputs.version }} | wc -l) -gt 0 ]]; then + if git rev-list "nmap-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then echo "Tag for nmap-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." - echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT + echo ::set-output name=NEW_RELEASE::"false" else - echo "Tag for nmap-v${{ needs.build-x86.outputs.version }} missing. Starting release creation." git tag "nmap-v${{ needs.build-x86.outputs.version }}" git push origin "nmap-v${{ needs.build-x86.outputs.version }}" - echo "NEW_RELEASE=true" >> $GITHUB_OUTPUT + echo ::set-output name=NEW_RELEASE::"true" fi - name: Create Release diff --git a/.forgejo/workflows/build-openssh.yml b/.github/workflows/build-openssh.yml similarity index 97% rename from .forgejo/workflows/build-openssh.yml rename to .github/workflows/build-openssh.yml index de32095..cea4e49 100644 --- a/.forgejo/workflows/build-openssh.yml +++ b/.github/workflows/build-openssh.yml @@ -113,11 +113,11 @@ jobs: set +e if git rev-list "openssh-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then echo "Tag for openssh-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." - echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT + echo ::set-output name=NEW_RELEASE::"false" else git tag "openssh-v${{ needs.build-x86.outputs.version }}" git push origin "openssh-v${{ needs.build-x86.outputs.version }}" - echo "NEW_RELEASE=true" >> $GITHUB_OUTPUT + echo ::set-output name=NEW_RELEASE::"true" fi - name: Create Release diff --git a/.forgejo/workflows/build-strace.yml b/.github/workflows/build-socat.yml similarity index 62% rename from .forgejo/workflows/build-strace.yml rename to .github/workflows/build-socat.yml index c5a426a..3c8a4fd 100644 --- a/.forgejo/workflows/build-strace.yml +++ b/.github/workflows/build-socat.yml @@ -1,13 +1,13 @@ -name: strace +name: socat on: workflow_dispatch jobs: build-x86: - name: Build strace x86 + name: Build socat x86 runs-on: ubuntu-latest container: muslcc/x86_64:i686-linux-musl outputs: - version: ${{ steps.build_strace.outputs.PACKAGED_VERSION }} + version: ${{ steps.build_socat.outputs.PACKAGED_VERSION }} steps: - name: Checkout uses: actions/checkout@v2 @@ -18,26 +18,18 @@ jobs: - name: Install testing dependencies run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl - - name: Install build compiler - run: /bin/sh -c "apk update && apk upgrade && apk add --no-cache curl rsync sudo util-linux && cd / && curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz && tar -xf ${ARCH}-cross.tgz && rm ${ARCH}-cross.tgz && cd ${ARCH}-cross" - env: - ARCH: x86_64-linux-musl - HOST: http://musl.cc/ - TEMP: /tmp - USER: 0 - - - name: Build strace - id: build_strace - run: $GITHUB_WORKSPACE/build/targets/build_strace.sh x86 + - name: Build socat + id: build_socat + run: $GITHUB_WORKSPACE/build/targets/build_socat.sh x86 - name: Upload artifacts uses: actions/upload-artifact@v2 with: - name: ${{ steps.build_strace.outputs.PACKAGED_NAME }} - path: ${{ steps.build_strace.outputs.PACKAGED_NAME_PATH }} + name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} + path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} build-x86_64: - name: Build strace x86_64 + name: Build socat x86_64 runs-on: ubuntu-latest container: muslcc/x86_64:x86_64-linux-musl steps: @@ -50,18 +42,18 @@ jobs: - name: Install testing dependencies run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl - - name: Build strace - id: build_strace - run: $GITHUB_WORKSPACE/build/targets/build_strace.sh x86_64 + - name: Build socat + id: build_socat + run: $GITHUB_WORKSPACE/build/targets/build_socat.sh x86_64 - name: Upload artifacts uses: actions/upload-artifact@v2 with: - name: ${{ steps.build_strace.outputs.PACKAGED_NAME }} - path: ${{ steps.build_strace.outputs.PACKAGED_NAME_PATH }} + name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} + path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} build-armhf: - name: Build strace ARMHF + name: Build socat ARMHF runs-on: ubuntu-latest container: muslcc/x86_64:arm-linux-musleabihf steps: @@ -82,18 +74,18 @@ jobs: TEMP: /tmp USER: 0 - - name: Build strace - id: build_strace - run: $GITHUB_WORKSPACE/build/targets/build_strace.sh armhf + - name: Build socat + id: build_socat + run: $GITHUB_WORKSPACE/build/targets/build_socat.sh armhf - name: Upload artifacts uses: actions/upload-artifact@v2 with: - name: ${{ steps.build_strace.outputs.PACKAGED_NAME }} - path: ${{ steps.build_strace.outputs.PACKAGED_NAME_PATH }} + name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} + path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} build-aarch64: - name: Build strace AARCH64 + name: Build socat AARCH64 runs-on: ubuntu-latest container: muslcc/x86_64:aarch64-linux-musl steps: @@ -114,18 +106,18 @@ jobs: TEMP: /tmp USER: 0 - - name: Build strace - id: build_strace - run: $GITHUB_WORKSPACE/build/targets/build_strace.sh aarch64 + - name: Build socat + id: build_socat + run: $GITHUB_WORKSPACE/build/targets/build_socat.sh aarch64 - name: Upload artifacts uses: actions/upload-artifact@v2 with: - name: ${{ steps.build_strace.outputs.PACKAGED_NAME }} - path: ${{ steps.build_strace.outputs.PACKAGED_NAME_PATH }} + name: ${{ steps.build_socat.outputs.PACKAGED_NAME }} + path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }} create-release: - name: Create strace Release + name: Create socat Release runs-on: ubuntu-latest needs: [build-x86, build-x86_64, build-armhf, build-aarch64] steps: @@ -147,20 +139,20 @@ jobs: id: tag_release run: | set +e - if git rev-list "strace-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then - echo "Tag for strace-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." - echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT + if git rev-list "socat-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then + echo "Tag for socat-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." + echo ::set-output name=NEW_RELEASE::"false" else - git tag "strace-v${{ needs.build-x86.outputs.version }}" - git push origin "strace-v${{ needs.build-x86.outputs.version }}" - echo "NEW_RELEASE=true" >> $GITHUB_OUTPUT + git tag "socat-v${{ needs.build-x86.outputs.version }}" + git push origin "socat-v${{ needs.build-x86.outputs.version }}" + echo ::set-output name=NEW_RELEASE::"true" fi - name: Create Release uses: ncipollo/release-action@v1 if: ${{ steps.tag_release.outputs.NEW_RELEASE == 'true' }} with: - name: strace-v${{ needs.build-x86.outputs.version }} - tag: strace-v${{ needs.build-x86.outputs.version }} + name: socat-v${{ needs.build-x86.outputs.version }} + tag: socat-v${{ needs.build-x86.outputs.version }} artifacts: "/tmp/releases/*/*" token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.forgejo/workflows/build-tcpdump.yml b/.github/workflows/build-tcpdump.yml similarity index 97% rename from .forgejo/workflows/build-tcpdump.yml rename to .github/workflows/build-tcpdump.yml index 080857c..12f3a05 100644 --- a/.forgejo/workflows/build-tcpdump.yml +++ b/.github/workflows/build-tcpdump.yml @@ -112,11 +112,11 @@ jobs: set +e if git rev-list "tcpdump-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then echo "Tag for tcpdump-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." - echo "NEW_RELEASE=false" >> $GITHUB_OUTPUT + echo ::set-output name=NEW_RELEASE::"false" else git tag "tcpdump-v${{ needs.build-x86.outputs.version }}" git push origin "tcpdump-v${{ needs.build-x86.outputs.version }}" - echo "NEW_RELEASE=true" >> $GITHUB_OUTPUT + echo ::set-output name=NEW_RELEASE::"true" fi - name: Create Release diff --git a/README.md b/README.md index 5772046..2c0a061 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,12 @@ This repository includes prebuild static binaries and build-recipes for various The Linux versions are compiled with the musl-cross toolchain and the openssl-pm-snapshot fork of OpenSSL in order to support a wide range of SSL/TLS features (Warning: some of them are insecure!). -Compilation is done automatically with GitHub Actions. The binaries are uploaded to the [release section](https://github.com/ernw/static-toolbox/releases). The artifacts are also available in the artifacts of each GitHub Action. However, there are some limitations: +Compilation is done automatically with GitHub Actions. + +## Current Limitations * Downloading of build artifacts in GitHub Ations currently requires a GitHub account * Blobs in build artifacts are zipped by the GitHub frontend by default, even zip files themselves! Build artifact zips may contain other zip files. -* Build artifacts will expire after some time. - -Therefore, it is recommended to download the binaries from the release section. ## Building Status @@ -28,4 +27,4 @@ The following table shows the building status for the current toolset. The follo |[socat](https://github.com/ernw/static-toolbox/actions?query=workflow%3A%22socat%22)|| |[GDB & gdbserver](https://github.com/ernw/static-toolbox/actions?query=workflow%3AGDB)|| |[tcpdump](https://github.com/ernw/static-toolbox/actions?query=workflow%3A%22tcpdump%22)|| -|[strace](https://github.com/ernw/static-toolbox/actions?query=workflow%3A%22strace%22)|| + diff --git a/build/02_install_build_compiler.sh b/build/02_install_build_compiler.sh index bb70c9e..15cb8c3 100755 --- a/build/02_install_build_compiler.sh +++ b/build/02_install_build_compiler.sh @@ -1,15 +1,9 @@ #!/bin/bash - -function die(){ - echo "$1" - exit 1 -} - if [ $# -ne 1 ];then echo "Missing arch" exit 1 fi -ARCH="${1}" +ARCH="${1,,}" case $ARCH in x86_64|i686|aarch64) ARCH="${ARCH}-linux-musl" @@ -26,8 +20,7 @@ case $ARCH in ;; esac HOST=http://musl.cc -echo "Fetching ${HOST}/${ARCH}-cross.tgz" cd / -curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz || die "Failed to download build compiler package" -tar -xf ${ARCH}-cross.tgz || die "Failed to extract build compiler package" -rm ${ARCH}-cross.tgz || die "Failed to remove build compiler package" \ No newline at end of file +curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz +tar -xf ${ARCH}-cross.tgz +rm ${ARCH}-cross.tgz \ No newline at end of file diff --git a/build/install_deps_alpine.sh b/build/install_deps_alpine.sh index 15b52b7..3f916b0 100755 --- a/build/install_deps_alpine.sh +++ b/build/install_deps_alpine.sh @@ -13,8 +13,6 @@ apk add \ libtool \ qemu-arm \ qemu-aarch64 \ - qemu-ppc \ - qemu-ppc64 \ file \ texinfo \ zip \ diff --git a/build/lib.sh b/build/lib.sh index 3d09984..8107faa 100755 --- a/build/lib.sh +++ b/build/lib.sh @@ -47,10 +47,6 @@ get_host_triple(){ host="arm-linux-musleabihf" elif [ "$CURRENT_ARCH" == "aarch64" ];then host="aarch64-linux-musl" - elif [ "$CURRENT_ARCH" == "ppc32" ];then - host="powerpc-linux-musl" - elif [ "$CURRENT_ARCH" == "ppc64" ];then - host="powerpc64-linux-musl" fi echo $host } @@ -149,20 +145,6 @@ get_version(){ else echo "qemu-aarch64 not found, skipping AARCH64 version checks." >&2 fi - elif [ "$CURRENT_ARCH" == "ppc32" ];then - if which qemu-ppc 1>&2 2>/dev/null;then - cmd="qemu-ppc ${cmd}" - version+=$(eval "$cmd") - else - echo "qemu-ppc not found, skipping ppc32 version checks." >&2 - fi - elif [ "$CURRENT_ARCH" == "ppc64" ];then - if which qemu-ppc64 1>&2 2>/dev/null;then - cmd="qemu-ppc64 ${cmd}" - version+=$(eval "$cmd") - else - echo "qemu-ppc64 not found, skipping ppc64 version checks." >&2 - fi else version+=$(eval "$cmd") fi @@ -232,10 +214,6 @@ lib_build_openssl(){ openssl_arch="linux-x86_64" elif [ "${CURRENT_ARCH}" == "aarch64" ];then openssl_arch="linux-generic64" - elif [ "${CURRENT_ARCH}" == "ppc32" ];then - openssl_arch="linux-ppc" - elif [ "${CURRENT_ARCH}" == "ppc64" ];then - openssl_arch="linux-ppc" fi CFLAGS="${GCC_OPTS}" \ ./Configure \ diff --git a/build/targets/build_gdb.sh b/build/targets/build_gdb.sh index 658b7e7..916d74b 100755 --- a/build/targets/build_gdb.sh +++ b/build/targets/build_gdb.sh @@ -18,7 +18,8 @@ build_gdb() { fetch "$GIT_BINUTILS_GDB" "${BUILD_DIRECTORY}/binutils-gdb" git cd "${BUILD_DIRECTORY}/binutils-gdb/" || { echo "Cannot cd to ${BUILD_DIRECTORY}/binutils-gdb/"; exit 1; } git clean -fdx - git checkout gdb-12.1-release + git checkout gdb-10.1-release + CMD="CFLAGS=\"${GCC_OPTS}\" " CMD+="CXXFLAGS=\"${GXX_OPTS}\" " CMD+="LDFLAGS=\"-static\" " @@ -51,9 +52,9 @@ main() { cp "${BUILD_DIRECTORY}/gdb_build/gdbserver/gdbserver" "${OUTPUT_DIRECTORY}/gdbserver${GDBSERVER_VERSION}" echo "[+] Finished building GDB ${CURRENT_ARCH}" - echo "PACKAGED_NAME=gdb${GDB_VERSION}" >> $GITHUB_OUTPUT - echo "PACKAGED_NAME_PATH=/output/*" >> $GITHUB_OUTPUT - echo "PACKAGED_VERSION=${version_number}" >> $GITHUB_OUTPUT + echo ::set-output name=PACKAGED_NAME::"gdb${GDB_VERSION}" + echo ::set-output name=PACKAGED_NAME_PATH::"/output/*" + echo ::set-output name=PACKAGED_VERSION::"${version_number}" } main diff --git a/build/targets/build_openssh.sh b/build/targets/build_openssh.sh index 37a4c0a..e9ba48e 100755 --- a/build/targets/build_openssh.sh +++ b/build/targets/build_openssh.sh @@ -17,7 +17,7 @@ init_lib $1 build_openssh() { fetch "https://github.com/openssh/openssh-portable.git" "${BUILD_DIRECTORY}/openssh-portable" git cd "${BUILD_DIRECTORY}/openssh-portable" - git checkout V_9_1_P1 + git checkout V_8_6_P1 git clean -fdx autoreconf -i CC="gcc ${GCC_OPTS}" \ @@ -49,9 +49,9 @@ main() { echo "[+] Finished building OpenSSH ${CURRENT_ARCH}" OPENSSH_VERSION=$(echo $OPENSSH_VERSION | sed 's/-//') - echo "PACKAGED_NAME=${OPENSSH_VERSION} >> $GITHUB_OUTPUT" - echo "PACKAGED_NAME_PATH=/output/* >> $GITHUB_OUTPUT" - echo "PACKAGED_VERSION=${version_number} >> $GITHUB_OUTPUT" + echo ::set-output name=PACKAGED_NAME::"${OPENSSH_VERSION}" + echo ::set-output name=PACKAGED_NAME_PATH::"/output/*" + echo ::set-output name=PACKAGED_VERSION::"${version_number}" } main diff --git a/build/targets/build_socat.sh b/build/targets/build_socat.sh index 5550a88..51b1f72 100755 --- a/build/targets/build_socat.sh +++ b/build/targets/build_socat.sh @@ -4,7 +4,7 @@ if [ -z "$GITHUB_WORKSPACE" ];then exit 1 fi if [ "$#" -ne 1 ];then - echo "Usage: ${0} [x86|x86_64|armhf|aarch64|ppc32|ppc64]" + echo "Usage: ${0} [x86|x86_64|armhf|aarch64]" echo "Example: ${0} x86_64" exit 1 fi @@ -41,9 +41,9 @@ main() { cp "${BUILD_DIRECTORY}/socat/socat" "${OUTPUT_DIRECTORY}/socat${version}" echo "[+] Finished building socat ${CURRENT_ARCH}" - echo "PACKAGED_NAME=socat${version}" >> $GITHUB_OUTPUT - echo "PACKAGED_NAME_PATH=${OUTPUT_DIRECTORY}/*" >> $GITHUB_OUTPUT - echo "PACKAGED_VERSION=${version_number}" >> $GITHUB_OUTPUT + echo ::set-output name=PACKAGED_NAME::"socat${version}" + echo ::set-output name=PACKAGED_NAME_PATH::"${OUTPUT_DIRECTORY}/*" + echo ::set-output name=PACKAGED_VERSION::"${version_number}" } main diff --git a/build/targets/build_strace.sh b/build/targets/build_strace.sh index b87db5c..9b9c442 100755 --- a/build/targets/build_strace.sh +++ b/build/targets/build_strace.sh @@ -10,39 +10,34 @@ fi source $GITHUB_WORKSPACE/build/lib.sh init_lib "$1" -VERSION="v6.3" - build_strace() { fetch "https://github.com/strace/strace" "${BUILD_DIRECTORY}/strace" git cd "${BUILD_DIRECTORY}/strace" git clean -fdx - git checkout "$VERSION" + git checkout v5.7 ./bootstrap CMD="CFLAGS=\"${GCC_OPTS}\" " CMD+="CXXFLAGS=\"${GXX_OPTS}\" " CMD+="LDFLAGS=\"-static -pthread\" " - if [ "$CURRENT_ARCH" != "x86_64" ];then - CMD+="CC_FOR_BUILD=\"/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc\" " - CMD+="CPP_FOR_BUILD=\"/x86_64-linux-musl-cross/bin/x86_64-linux-musl-g++ -E\" " - CMD+="CXX_FOR_BUILD=\"/x86_64-linux-musl-cross/bin/x86_64-linux-musl-g++\" " + if [ "$CURRENT_ARCH" != "x86" ] && [ "$CURRENT_ARCH" != "x86_64" ];then + CMD+="CC_FOR_BUILD=\"/i686-linux-musl-cross/bin/i686-linux-musl-gcc\" " + CMD+="CPP_FOR_BUILD=\"/i686-linux-musl-cross/bin/i686-linux-musl-g++\" " fi - CMD+="./configure --disable-mpers --host=$(get_host_triple)" + CMD+="./configure --host=i486-linux-musl --target=$(get_host_triple)" eval "$CMD" make CFLAGS="-w" -j4 - strip "${BUILD_DIRECTORY}/strace/src/strace" + strip strace } main() { build_strace local version - version=$(get_version "${BUILD_DIRECTORY}/strace/src/strace -V 2>&1 | head -n1 | awk '{print \$4}'") - version_number=$(echo "$version" | cut -d"-" -f2) - cp "${BUILD_DIRECTORY}/strace/src/strace" "${OUTPUT_DIRECTORY}/strace${version}" + version=$(get_version "${BUILD_DIRECTORY}/strace/strace --version 2>&1 | head -n1 | awk '{print \$4}'") + cp "${BUILD_DIRECTORY}/strace/strace" "${OUTPUT_DIRECTORY}/strace" echo "[+] Finished building strace ${CURRENT_ARCH}" - echo "PACKAGED_NAME=strace${version}" >> $GITHUB_OUTPUT - echo "PACKAGED_NAME_PATH=${OUTPUT_DIRECTORY}/*" >> $GITHUB_OUTPUT - echo "PACKAGED_VERSION=${version_number}" >> $GITHUB_OUTPUT + echo ::set-output name=PACKAGED_NAME::"strace${version}" + echo ::set-output name=PACKAGED_NAME_PATH::"${OUTPUT_DIRECTORY}/*" } main diff --git a/build/targets/build_tcpdump.sh b/build/targets/build_tcpdump.sh index 3c6f8d6..fdab747 100755 --- a/build/targets/build_tcpdump.sh +++ b/build/targets/build_tcpdump.sh @@ -39,9 +39,9 @@ main() { cp "${BUILD_DIRECTORY}/tcpdump/tcpdump" "${OUTPUT_DIRECTORY}/tcpdump${version}" echo "[+] Finished building tcpdump ${CURRENT_ARCH}" - echo "PACKAGED_NAME=tcpdump${version}" >> $GITHUB_OUTPUT - echo "PACKAGED_NAME_PATH=${OUTPUT_DIRECTORY}/*" >> $GITHUB_OUTPUT - echo "PACKAGED_VERSION=${version_number}" >> $GITHUB_OUTPUT + echo ::set-output name=PACKAGED_NAME::"tcpdump${version}" + echo ::set-output name=PACKAGED_NAME_PATH::"${OUTPUT_DIRECTORY}/*" + echo ::set-output name=PACKAGED_VERSION::"${version_number}" } main diff --git a/build/targets/build_tcpreplay.sh b/build/targets/build_tcpreplay.sh index ed326b1..eb46fcf 100755 --- a/build/targets/build_tcpreplay.sh +++ b/build/targets/build_tcpreplay.sh @@ -50,8 +50,8 @@ main() { cp "${BUILD_DIRECTORY}/tcpreplay/tcpreplay" "${OUTPUT_DIRECTORY}/tcpreplay" echo "[+] Finished building tcpreplay ${CURRENT_ARCH}" - echo "PACKAGED_NAME=tcpreplay${version}" - echo "PACKAGED_NAME_PATH=${OUTPUT_DIRECTORY}/*" + echo ::set-output name=PACKAGED_NAME::"tcpreplay${version}" + echo ::set-output name=PACKAGED_NAME_PATH::"${OUTPUT_DIRECTORY}/*" } main diff --git a/package/targets/nmap/package.sh b/package/targets/nmap/package.sh index 51f2d05..85ca112 100755 --- a/package/targets/nmap/package.sh +++ b/package/targets/nmap/package.sh @@ -53,13 +53,13 @@ cd "$tmp_dir" TARBALL="nmap-${version}-${arch}-portable.tar.gz" tar czf "${output}/${TARBALL}" -C "$tmp_dir" . cp "${output}/${TARBALL}" /packaged -echo "PACKAGED_TARBALL=${TARBALL}" >> $GITHUB_OUTPUT -echo "PACKAGED_TARBALL_PATH=/packaged/${TARBALL}" >> $GITHUB_OUTPUT +echo ::set-output name=PACKAGED_TARBALL::${TARBALL} +echo ::set-output name=PACKAGED_TARBALL_PATH::"/packaged/${TARBALL}" ZIP="nmap-${version}-${arch}-portable.zip" zip -r -q "${output}/${ZIP}" . cp "${output}/${ZIP}" /packaged -echo "PACKAGED_ZIP=${ZIP}" >> $GITHUB_OUTPUT -echo "PACKAGED_ZIP_PATH=/packaged/${ZIP}" >> $GITHUB_OUTPUT +echo ::set-output name=PACKAGED_ZIP::${ZIP} +echo ::set-output name=PACKAGED_ZIP_PATH::"/packaged/${ZIP}" -echo "PACKAGED_VERSION=${version}" >> $GITHUB_OUTPUT \ No newline at end of file +echo ::set-output name=PACKAGED_VERSION::${version} \ No newline at end of file