diff --git a/.github/workflows/stealth-push.yaml b/.github/workflows/stealth-push.yaml index 1f48a23b..fe23a41c 100644 --- a/.github/workflows/stealth-push.yaml +++ b/.github/workflows/stealth-push.yaml @@ -43,50 +43,6 @@ jobs: # tag: v${{ env.VER }} -# FreeBSD: -# env: -# OS: "freebsd" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Starting the VM -# uses: vmactions/freebsd-vm@v0 -# with: -# usesh: true -# prepare: | -# pkg install -y curl automake autoconf gcc - -# run: | -# curl -SsfL https://www.openssl.org/source/openssl-${OPENSSL_VER:-1.1.1w}.tar.gz | tar -xzf - -C /tmp/ -# ( cd /tmp/openssl-${OPENSSL_VER:-1.1.1w} && \ -# ./Configure --prefix=/opt no-tests no-dso no-threads no-shared BSD-generic64 && \ -# make install_sw ) -# rm -rf rm -rf /tmp/openssl-${OPENSSL_VER:-1.1.1w} /opt/bin/openssl /opt/bin/c_rehash -# ./bootstrap -# ./configure --enable-static --prefix=/opt -# make all -# strip tools/gs-netcat -# (cd tools; tar cfz ../gsocket_${{ env.OS }}-x86_x64.tar.gz gs-netcat gsocket blitz gs-mount gs-sftp gs_funcs gsocket_dso.so.0 gsocket_uchroot_dso.so.0) -# mv tools/gs-netcat gs-netcat_${{ env.OS }}-x86_64 - -# - name: Upload gs-netcat to release -# uses: svenstaro/upload-release-action@v2 -# with: -# repo_token: ${{ secrets.GITHUB_TOKEN }} -# file: gs-netcat_* -# overwrite: true -# file_glob: true -# tag: v${{ env.VER }} - -# - name: Upload gsocket to release -# uses: svenstaro/upload-release-action@v2 -# with: -# repo_token: ${{ secrets.GITHUB_TOKEN }} -# file: gsocket_* -# overwrite: true -# file_glob: true -# tag: v${{ env.VER }} - # # https://github.com/vmactions/openbsd-vm # OpenBSD: # env: @@ -123,53 +79,36 @@ jobs: # (cd tools; tar cfz ../gsocket_${{ env.OS }}-x86_x64.tar.gz gs-netcat gsocket blitz gs-mount gs-sftp gs_funcs gsocket_dso.so.0 gsocket_uchroot_dso.so.0) # mv tools/gs-netcat gs-netcat_${{ env.OS }}-x86_64 - # runs-on: macos-12 - # steps: - # - uses: actions/checkout@v3 - # - name: Compile - # uses: vmactions/openbsd-vm@v0 - # with: - # usesh: true - # prepare: | - # pkg_add curl - # pkg_add autoconf-2.71 - # pkg_add automake-1.16.5 - # pkg_add openssl-3.0.8 - # pkg_info -Q tar - # pkg_add gcc-11.2.0p3 - # pkg_add gmake - # pkg_add tar - - # run: | - # export AUTOCONF_VERSION=2.71 - # export AUTOMAKE_VERSION=1.16 - # ./bootstrap - # export CPPFLAGS="-I/usr/local/include/eopenssl30/" - # export LDFLAGS="-L/usr/local/lib/eopenssl30/" - # ./configure --enable-static - # make all - # strip tools/gs-netcat - # (cd tools; tar cfz ../gsocket_openbsd-x86_x64.tar.gz gs-netcat gsocket blitz gs-mount gs-sftp gs_funcs gsocket_dso.so.0 gsocket_uchroot_dso.so.0) - # mv tools/gs-netcat gs-netcat_openbsd-x86_64 - - # - name: Upload gs-netcat to release - # uses: svenstaro/upload-release-action@v2 - # with: - # repo_token: ${{ secrets.GITHUB_TOKEN }} - # file: gs-netcat_* - # overwrite: true - # file_glob: true - # tag: v${{ env.VER }} - - # - name: Upload gsocket to release - # uses: svenstaro/upload-release-action@v2 - # with: - # repo_token: ${{ secrets.GITHUB_TOKEN }} - # file: gsocket_* - # overwrite: true - # file_glob: true - # tag: v${{ env.VER }} + FreeBSD: + env: + OS: "freebsd" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Starting the VM + uses: vmactions/freebsd-vm@v0 + with: + usesh: true + prepare: | + pkg install -y curl automake autoconf gcc + + run: | + curl -SsfL https://www.openssl.org/source/openssl-${OPENSSL_VER:-1.1.1w}.tar.gz | tar -xzf - -C /tmp/ + ( cd /tmp/openssl-${OPENSSL_VER:-1.1.1w} && \ + ./Configure --prefix=/opt no-tests no-dso no-threads no-shared BSD-generic64 && \ + make install_sw ) + rm -rf rm -rf /tmp/openssl-${OPENSSL_VER:-1.1.1w} /opt/bin/openssl /opt/bin/c_rehash + ./bootstrap + ./configure --enable-static --prefix=/opt --enable-stealth + make all + strip tools/gs-netcat + mv tools/gs-netcat tools/gs-netcat_mini-freebsd-x86_64 + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: gsnc + path: tools/gs-netcat_mini-freebsd-x86_64 Linux-Cross-Compile: strategy: @@ -258,7 +197,7 @@ jobs: path: tools/gs-netcat_mini-linux-${{ matrix.arch }} deploy: - needs: Linux-Cross-Compile + needs: [Linux-Cross-Compile, FreeBSD] name: Deploy to gsocket.io runs-on: ubuntu-latest steps: diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 18863c9e..3910ac32 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -604,18 +604,34 @@ init_vars() if [[ $OSTYPE == *linux* ]]; then if [[ "$arch" == "i686" ]] || [[ "$arch" == "i386" ]]; then OSARCH="i386-alpine" + SRC_PKG="gs-netcat_mini-linux-i686" + elif [[ "$arch" == *"armv6"* ]]; then + OSARCH="arm-linux" + SRC_PKG="gs-netcat_mini-linux-armv6" + elif [[ "$arch" == *"armv7l" ]]; then + OSARCH="arm-linux" + SRC_PKG="gs-netcat_mini-linux-armv7l" elif [[ "$arch" == *"armv"* ]]; then OSARCH="arm-linux" # RPI-Zero / RPI 4b+ + SRC_PKG="gs-netcat_mini-linux-arm" elif [[ "$arch" == "aarch64" ]]; then OSARCH="aarch64-linux" SRC_PKG="gs-netcat_mini-linux-aarch64" elif [[ "$arch" == "mips64" ]]; then OSARCH="mips64-alpine" + SRC_PKG="gs-netcat_mini-linux-mips64" # Go 32-bit if Little Endian even if 64bit arch - is_le && OSARCH="mipsel32-alpine" + is_le && { + OSARCH="mipsel32-alpine" + SRC_PKG="gs-netcat_mini-linux-mipsel" + } elif [[ "$arch" == *mips* ]]; then OSARCH="mips32-alpine" - is_le && OSARCH="mipsel32-alpine" + SRC_PKG="gs-netcat_mini-linux-mips32" + is_le && { + OSARCH="mipsel32-alpine" + SRC_PKG="gs-netcat_mini-linux-mipsel" + } fi elif [[ $OSTYPE == *darwin* ]]; then if [[ "$arch" == "arm64" ]]; then