From 3b7510657164c07e64842eebda98811896d89ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ciarcin=CC=81ski?= Date: Wed, 15 Apr 2026 14:31:47 +0200 Subject: [PATCH 1/4] Get rid of Cross-rs --- .github/workflows/release.yml | 261 ++++++++++++++++++++-------------- .github/workflows/sbom.yml | 4 +- Cargo.lock | 88 ++++++------ Cross.toml | 38 ----- 4 files changed, 203 insertions(+), 188 deletions(-) delete mode 100644 Cross.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 904a13c3..ac18973f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,9 @@ name: Publish on: push: + # TODO: remove + branches: + - cross tags: - v*.*.* @@ -8,6 +11,12 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + SQLX_OFFLINE: "1" + # sccache + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + jobs: build-docker-release: # Ignore tags with -, like v1.0.0-alpha @@ -45,45 +54,29 @@ jobs: steps: - name: Create GitHub release id: release - uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/tags/') + uses: shogo82148/actions-create-release@v1 with: draft: true generate_release_notes: true + # TODO: remove + release_name: test + tag_name: test create-sbom: - needs: [create-release, build-docker-release] + needs: + - create-release + - build-docker-release uses: ./.github/workflows/sbom.yml with: upload_url: ${{ needs.create-release.outputs.upload_url }} build-release: - name: Release ${{ matrix.build }} - needs: [create-release] + needs: + - create-release runs-on: - self-hosted - - ${{ matrix.os }} + - Linux - X64 - strategy: - fail-fast: false - matrix: - build: [linux, linux-arm64, freebsd] - include: - - build: linux - arch: amd64 - os: Linux - asset_name: defguard-gateway-linux-x86_64 - target: x86_64-unknown-linux-gnu - - build: linux-arm64 - arch: arm64 - os: Linux - asset_name: defguard-gateway-linux-arm64 - target: aarch64-unknown-linux-gnu - - build: freebsd - arch: amd64 - os: Linux - asset_name: defguard-gateway-freebsd-x86_64 - target: x86_64-unknown-freebsd steps: # Store the version, stripping any v-prefix - name: Write release version @@ -91,128 +84,188 @@ jobs: VERSION=${GITHUB_REF_NAME#v} echo Version: $VERSION echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Checkout uses: actions/checkout@v6 with: submodules: recursive - name: Install Rust stable - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.89.0 # "stable" causes rust-lld: error on aarch64-linux - target: ${{ matrix.target }} - override: true + targets: "aarch64-unknown-linux-gnu" + + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.9 + + - name: Build Linux x86_64 binary + run: | + cargo build --locked --release --target x86_64-unknown-linux-gnu + mv target/x86_64-unknown-linux-gnu/release/defguard-gateway defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu + tar -zcf defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz \ + defguard-${{ env.VERSION }}-x86_64-unknown-linux-gnu + + - name: Build Linux aarch64 binary + env: + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + PKG_CONFIG_SYSROOT_DIR: /usr/lib/aarch64-linux-gnu + run: | + cargo build --locked --release --target aarch64-unknown-linux-gnu + mv target/aarch64-unknown-linux-gnu/release/defguard-gateway defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu + tar -zcf defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz \ + defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu - - name: Setup `packer` - uses: hashicorp/setup-packer@main - id: setup + - name: Build FreeBSD binary + run: | + rsync -rlptxzH -e 'ssh -l root' --del ./ freebsd:work/gateway/ + ssh root@freebsd 'cd work/gateway && cargo build --locked --release' + scp root@freebsd:work/gateway/target/release/defguard-gateway defguard-gateway-${{ env.VERSION }}-x86_64-unknown-freebsd + tar -zcf defguard-gateway-${{ env.VERSION }}-x86_64-unknown-freebsd.tar.gz \ + defguard-gateway-${{ env.VERSION }}-x86_64-unknown-freebsd + + - name: Build x86_64 DEB package + uses: defGuard/fpm-action@main + with: + fpm_args: + "defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu=/usr/bin/defguard-gateway + defguard-gateway.service=/usr/lib/systemd/system/defguard-gateway.service + example-config.toml=/etc/defguard/gateway.toml.sample" + fpm_opts: "--architecture amd64 --output-type deb --version ${{ env.VERSION }} --package defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu.deb --after-install after-install.sh" + + - name: Build aarch64 DEB package + uses: defGuard/fpm-action@main + with: + fpm_args: + "defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu=/usr/bin/defguard-gateway + defguard-gateway.service=/usr/lib/systemd/system/defguard-gateway.service + example-config.toml=/etc/defguard/gateway.toml.sample" + fpm_opts: "--architecture arm64 --output-type deb --version ${{ env.VERSION }} --package defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu.deb --after-install after-install.sh" - - name: Build release binary - uses: actions-rs/cargo@v1 + - name: Build x86_64 RPM package + uses: defGuard/fpm-action@main with: - use-cross: true - command: build - args: --locked --release --target ${{ matrix.target }} + fpm_args: + "defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu=/usr/bin/defguard-gateway + defguard-gateway.service=/usr/lib/systemd/system/defguard-gateway.service + example-config.toml=/etc/defguard/gateway.toml.sample" + fpm_opts: "--architecture amd64 --output-type rpm --version ${{ env.VERSION }} --package defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu.rpm --after-install after-install.sh" - - name: Rename binary - run: mv target/${{ matrix.target }}/release/defguard-gateway ${{ matrix.asset_name }}-${{ github.ref_name }} + - name: Build aarch64 RPM package + uses: defGuard/fpm-action@main + with: + fpm_args: + "defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu=/usr/bin/defguard-gateway + defguard-gateway.service=/usr/lib/systemd/system/defguard-gateway.service + example-config.toml=/etc/defguard/gateway.toml.sample" + fpm_opts: "--architecture arm64 --output-type rpm --version ${{ env.VERSION }} --package defguard-gateway-${{ env.VERSION }}-aarch64-unknown-freebsd.rpm --after-install after-install.sh" - - name: Tar - uses: a7ul/tar-action@v1.2.0 + - name: Build FreeBSD package + uses: defGuard/fpm-action@main with: - command: c - files: | - ${{ matrix.asset_name }}-${{ github.ref_name }} - outPath: ${{ matrix.asset_name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz + fpm_args: + "defguard-gateway-${{ env.VERSION }}-x86_64-unknown-freebsd=/usr/local/bin/defguard-gateway + defguard-gateway.service.freebsd=/usr/local/etc/rc.d/defguard-gateway + example-config.toml=/etc/defguard/gateway.toml.sample" + fpm_opts: "--architecture amd64 --output-type freebsd --version ${{ env.VERSION }} --package defguard-gateway-${{ env.VERSION }}_x86_64-unknown-freebsd.pkg --freebsd-osversion '*' --depends openssl" - - name: Upload release archive - uses: actions/upload-release-asset@v1 + - name: Build OPNsense package + uses: defGuard/fpm-action@main + with: + fpm_args: + "defguard-gateway-${{ env.VERSION }}-x86_64-unknown-freebsd=/usr/local/bin/defguard-gateway + defguard-gateway.service.freebsd=/usr/local/etc/rc.d/defguard-gateway + example-config.toml=/etc/defguard/gateway.toml.sample + defguard-rc.conf=/etc/rc.conf.d/defguard_gateway + opnsense/src/etc/=/usr/local/etc/ + opnsense/src/opnsense/=/usr/local/opnsense/" + fpm_opts: "--architecture amd64 --output-type freebsd --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_x86_64-unknown-opnsense.pkg --freebsd-osversion '*' --depends openssl" + + - name: Upload Linux x86_64 archive + uses: shogo82148/actions-upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ${{ matrix.asset_name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz - asset_name: ${{ matrix.asset_name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz - asset_content_type: application/octet-stream + asset_path: defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz + asset_content_type: application/gzip + overwrite: true - - name: Build DEB package - if: matrix.build != 'freebsd' - uses: defGuard/fpm-action@main + - name: Upload Linux aarch64 archive + uses: shogo82148/actions-upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - fpm_args: "${{ matrix.asset_name }}-${{ github.ref_name }}=/usr/sbin/defguard-gateway defguard-gateway.service=/usr/lib/systemd/system/defguard-gateway.service example-config.toml=/etc/defguard/gateway.toml.sample" - fpm_opts: "--architecture ${{ matrix.arch }} --debug --output-type deb --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.deb --after-install after-install.sh" + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz + asset_content_type: application/gzip + overwrite: true - - name: Upload DEB - if: matrix.build != 'freebsd' - uses: actions/upload-release-asset@v1 + - name: Upload FreeBSD x86_64 archive + uses: shogo82148/actions-upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.deb - asset_name: defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.deb - asset_content_type: application/octet-stream + asset_path: defguard-gateway-${{ env.VERSION }}-x86_64-unknown-freebsd.tar.gz + asset_content_type: application/gzip + overwrite: true - - name: Build RPM package - if: matrix.build == 'linux' - uses: defGuard/fpm-action@main + - name: Upload Linux x86_64 DEB + uses: shogo82148/actions-upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - fpm_args: "${{ matrix.asset_name }}-${{ github.ref_name }}=/usr/sbin/defguard-gateway defguard-gateway.service=/usr/lib/systemd/system/defguard-gateway.service example-config.toml=/etc/defguard/gateway.toml.sample" - fpm_opts: "--architecture ${{ matrix.arch }} --debug --output-type rpm --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.rpm --after-install after-install.sh" + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu.deb + asset_content_type: application/gzip + overwrite: true - - name: Upload RPM - if: matrix.build == 'linux' - uses: actions/upload-release-asset@v1 + - name: Upload Linux aarch64 DEB + uses: shogo82148/actions-upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.rpm - asset_name: defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.rpm - asset_content_type: application/octet-stream + asset_path: defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu.deb + asset_content_type: application/gzip + overwrite: true - - name: Build FreeBSD package - if: matrix.build == 'freebsd' - uses: defGuard/fpm-action@main + - name: Upload Linux x86_64 RPM + uses: shogo82148/actions-upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - fpm_args: - "${{ matrix.asset_name }}-${{ github.ref_name }}=/usr/local/sbin/defguard-gateway - defguard-gateway.service.freebsd=/usr/local/etc/rc.d/defguard_gateway - example-config.toml=/etc/defguard/gateway.toml.sample - defguard-rc.conf=/etc/rc.conf.d/defguard_gateway" - fpm_opts: "--architecture ${{ matrix.arch }} --debug --output-type freebsd --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.pkg --freebsd-osversion '*'" + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu.rpm + asset_content_type: application/gzip + overwrite: true - - name: Upload FreeBSD - if: matrix.build == 'freebsd' - uses: actions/upload-release-asset@v1 + - name: Upload Linux aarch64 RPM + uses: shogo82148/actions-upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.pkg - asset_name: defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.pkg - asset_content_type: application/octet-stream + asset_path: defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu.rpm + asset_content_type: application/gzip + overwrite: true - - name: Build OPNsense package - if: matrix.build == 'freebsd' - uses: defGuard/fpm-action@main + - name: Upload FreeBSD package + uses: shogo82148/actions-upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - fpm_args: - "${{ matrix.asset_name }}-${{ github.ref_name }}=/usr/local/sbin/defguard-gateway - defguard-gateway.service.freebsd=/usr/local/etc/rc.d/defguard_gateway - example-config.toml=/etc/defguard/gateway.toml.sample - defguard-rc.conf=/etc/rc.conf.d/defguard_gateway - opnsense/src/etc/=/usr/local/etc/ - opnsense/src/opnsense/=/usr/local/opnsense/" - fpm_opts: "--architecture ${{ matrix.arch }} --debug --output-type freebsd --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_x86_64-unknown-opnsense.pkg --freebsd-osversion '*'" + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: defguard-gateway-${{ env.VERSION }}_x86_64-unknown-freebsd.pkg + asset_content_type: application/x-pkg + overwrite: true - name: Upload OPNsense package - if: matrix.build == 'freebsd' - uses: actions/upload-release-asset@v1 + uses: shogo82148/actions-upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: defguard-gateway_${{ env.VERSION }}_x86_64-unknown-opnsense.pkg - asset_name: defguard-gateway_${{ env.VERSION }}_x86_64-unknown-opnsense.pkg - asset_content_type: application/octet-stream + asset_path: defguard-gateway-${{ env.VERSION }}_x86_64-unknown-opnsense.pkg + asset_content_type: application/x-pkg + overwrite: true diff --git a/.github/workflows/sbom.yml b/.github/workflows/sbom.yml index 6d74422c..9091cdf5 100644 --- a/.github/workflows/sbom.yml +++ b/.github/workflows/sbom.yml @@ -62,7 +62,7 @@ jobs: severity: "CRITICAL,HIGH,MEDIUM,LOW" scanners: "vuln" - - name: Create docker image security advisory file with Trivy + - name: Create Docker image security advisory file with Trivy uses: aquasecurity/trivy-action@0.35.0 with: image-ref: "ghcr.io/defguard/gateway:${{ steps.vars.outputs.VERSION }}" @@ -79,5 +79,5 @@ jobs: with: upload_url: ${{ inputs.upload_url }} asset_path: "defguard-*.json" - asset_content_type: application/octet-stream + asset_content_type: application/json overwrite: true diff --git a/Cargo.lock b/Cargo.lock index 4415eebe..12718643 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -198,9 +198,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axum" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" dependencies = [ "axum-core", "bytes", @@ -265,9 +265,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "blake2" @@ -348,9 +348,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.59" +version = "1.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a4d3ec6524d28a329fc53654bbadc9bdd7b0431f5d65f1a56ffb28a1ee5283" +checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" dependencies = [ "find-msvc-tools", "jobserver", @@ -1423,9 +1423,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.94" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9" +checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" dependencies = [ "once_cell", "wasm-bindgen", @@ -1445,9 +1445,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.184" +version = "0.2.185" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" +checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" [[package]] name = "libgit2-sys" @@ -2071,9 +2071,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" [[package]] name = "plain" @@ -2349,9 +2349,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.37" +version = "0.23.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" +checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" dependencies = [ "log", "once_cell", @@ -2385,9 +2385,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.10" +version = "0.103.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef" +checksum = "8279bb85272c9f10811ae6a6c547ff594d6a7f3c6c6b02ee9726d1d0dcfcdd06" dependencies = [ "ring", "rustls-pki-types", @@ -2794,9 +2794,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.51.1" +version = "1.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c" +checksum = "a91135f59b1cbf38c91e73cf3386fca9bb77915c45ce2771460c9d92f0f3d776" dependencies = [ "bytes", "libc", @@ -3110,9 +3110,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "uniffi" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8c6dec3fc6645f71a16a3fa9ff57991028153bd194ca97f4b55e610c73ce66a" +checksum = "dc5f2297ee5b893405bed1a6929faec4713a061df158ecf5198089f23910d470" dependencies = [ "anyhow", "camino", @@ -3127,9 +3127,9 @@ dependencies = [ [[package]] name = "uniffi_bindgen" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ed0150801958d4825da56a41c71f000a457ac3a4613fa9647df78ac4b6b6881" +checksum = "8bc0c60a9607e7ab77a2ad47ec5530178015014839db25af7512447d2238016c" dependencies = [ "anyhow", "askama", @@ -3153,9 +3153,9 @@ dependencies = [ [[package]] name = "uniffi_build" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b78fd9271a4c2e85bd2c266c5a9ede1fac676eb39fd77f636c27eaf67426fd5f" +checksum = "4c39413c43b955e4aa8a4e2b34bbd1b6b5ff6bd85532b52f9eb92fbe88c14458" dependencies = [ "anyhow", "camino", @@ -3164,9 +3164,9 @@ dependencies = [ [[package]] name = "uniffi_core" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0ef62e69762fbb9386dcb6c87cd3dd05d525fa8a3a579a290892e60ddbda47e" +checksum = "77baf5d539fe2e1ad6805e942dbc5dbdeb2b83eb5f2b3a6535d422ca4b02a12f" dependencies = [ "anyhow", "bytes", @@ -3176,9 +3176,9 @@ dependencies = [ [[package]] name = "uniffi_internal_macros" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98f51ebca0d9a4b2aa6c644d5ede45c56f73906b96403c08a1985e75ccb64a01" +checksum = "b4b42137524f4be6400fcaca9d02c1d4ecb6ad917e4013c0b93235526d8396e5" dependencies = [ "anyhow", "indexmap", @@ -3189,9 +3189,9 @@ dependencies = [ [[package]] name = "uniffi_macros" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db9d12529f1223d014fd501e5f29ca0884d15d6ed5ddddd9f506e55350327dc3" +checksum = "d9273ec45330d8fe9a3701b7b983cea7a4e218503359831967cb95d26b873561" dependencies = [ "camino", "fs-err", @@ -3206,9 +3206,9 @@ dependencies = [ [[package]] name = "uniffi_meta" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9df6d413db2827c68588f8149d30d49b71d540d46539e435b23a7f7dbd4d4f86" +checksum = "431d2f443e7828a6c29d188de98b6771a6491ee98bba2d4372643bf93f988a18" dependencies = [ "anyhow", "siphasher", @@ -3218,9 +3218,9 @@ dependencies = [ [[package]] name = "uniffi_pipeline" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a806dddc8208f22efd7e95a5cdf88ed43d0f3271e8f63b47e757a8bbdb43b63a" +checksum = "761ef74f6175e15603d0424cc5f98854c5baccfe7bf4ccb08e5816f9ab8af689" dependencies = [ "anyhow", "heck", @@ -3231,9 +3231,9 @@ dependencies = [ [[package]] name = "uniffi_udl" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d1a7339539bf6f6fa3e9b534dece13f778bda2d54b1a6d4e40b4d6090ac26e7" +checksum = "68773ec0e1c067b6505a73bbf6a5782f31a7f9209333a0df97b87565c46bf370" dependencies = [ "anyhow", "textwrap", @@ -3372,9 +3372,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.117" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0" +checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" dependencies = [ "cfg-if", "once_cell", @@ -3385,9 +3385,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.117" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbdf9a35adf44786aecd5ff89b4563a90325f9da0923236f6104e603c7e86be" +checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3395,9 +3395,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.117" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca9693ef2bab6d4e6707234500350d8dad079eb508dca05530c85dc3a529ff2" +checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" dependencies = [ "bumpalo", "proc-macro2", @@ -3408,9 +3408,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.117" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39129a682a6d2d841b6c429d0c51e5cb0ed1a03829d8b3d1e69a011e62cb3d3b" +checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" dependencies = [ "unicode-ident", ] diff --git a/Cross.toml b/Cross.toml deleted file mode 100644 index 19052585..00000000 --- a/Cross.toml +++ /dev/null @@ -1,38 +0,0 @@ -[target.x86_64-unknown-linux-gnu] -image = "ghcr.io/defguard/cross:x86_64-unknown-linux-gnu" -pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get install --assume-yes libssl-dev unzip libnftnl-dev:$CROSS_DEB_ARCH libmnl-dev:$CROSS_DEB_ARCH", - "PB_REL='https://github.com/protocolbuffers/protobuf/releases'", - "PB_VERSION='3.20.0' && curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-x86_64.zip", - "unzip protoc-$PB_VERSION-linux-x86_64.zip bin/protoc include/google/* -d /usr", -] - -[target.armv7-unknown-linux-gnueabihf] -image = "ghcr.io/defguard/cross:armv7-unknown-linux-gnueabihf" -pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get install --assume-yes libssl-dev libssl-dev:$CROSS_DEB_ARCH unzip libnftnl-dev:$CROSS_DEB_ARCH libmnl-dev:$CROSS_DEB_ARCH", - "PB_REL='https://github.com/protocolbuffers/protobuf/releases'", - "PB_VERSION='3.20.0' && curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-x86_64.zip", - "unzip protoc-$PB_VERSION-linux-x86_64.zip bin/protoc include/google/* -d /usr", -] - -[target.aarch64-unknown-linux-gnu] -image = "ghcr.io/defguard/cross:aarch64-unknown-linux-gnu" -pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get install --assume-yes libssl-dev libssl-dev:$CROSS_DEB_ARCH unzip libnftnl-dev libnftnl-dev:$CROSS_DEB_ARCH libmnl-dev libmnl-dev:$CROSS_DEB_ARCH", - "PB_REL='https://github.com/protocolbuffers/protobuf/releases'", - "PB_VERSION='3.20.0' && curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-x86_64.zip", - "unzip protoc-$PB_VERSION-linux-x86_64.zip bin/protoc include/google/* -d /usr", -] - -[target.x86_64-unknown-freebsd] -image = "ghcr.io/defguard/cross:x86_64-unknown-freebsd" -pre-build = [ - "apt-get update && apt-get install --assume-yes libssl-dev unzip", - "PB_REL='https://github.com/protocolbuffers/protobuf/releases'", - "PB_VERSION='3.20.0' && curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-x86_64.zip", - "unzip protoc-$PB_VERSION-linux-x86_64.zip bin/protoc include/google/* -d /usr", -] From f3250ca06593964f1b7597a587f303cb5d31c4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ciarcin=CC=81ski?= Date: Wed, 15 Apr 2026 14:34:07 +0200 Subject: [PATCH 2/4] fix --- .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 ac18973f..29f2ad8a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,7 +103,7 @@ jobs: cargo build --locked --release --target x86_64-unknown-linux-gnu mv target/x86_64-unknown-linux-gnu/release/defguard-gateway defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu tar -zcf defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz \ - defguard-${{ env.VERSION }}-x86_64-unknown-linux-gnu + defguard-gateway-${{ env.VERSION }}-x86_64-unknown-linux-gnu - name: Build Linux aarch64 binary env: From 414990c53aff322fcb22cc43e7451520bf892696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ciarcin=CC=81ski?= Date: Wed, 15 Apr 2026 15:04:36 +0200 Subject: [PATCH 3/4] Remove test --- .github/workflows/release.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29f2ad8a..76f55a35 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,6 @@ name: Publish on: push: - # TODO: remove - branches: - - cross tags: - v*.*.* @@ -58,9 +55,6 @@ jobs: with: draft: true generate_release_notes: true - # TODO: remove - release_name: test - tag_name: test create-sbom: needs: @@ -178,7 +172,7 @@ jobs: defguard-rc.conf=/etc/rc.conf.d/defguard_gateway opnsense/src/etc/=/usr/local/etc/ opnsense/src/opnsense/=/usr/local/opnsense/" - fpm_opts: "--architecture amd64 --output-type freebsd --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_x86_64-unknown-opnsense.pkg --freebsd-osversion '*' --depends openssl" + fpm_opts: "--architecture amd64 --output-type freebsd --version ${{ env.VERSION }} --package defguard-gateway-${{ env.VERSION }}_x86_64-unknown-opnsense.pkg --freebsd-osversion '*' --depends openssl" - name: Upload Linux x86_64 archive uses: shogo82148/actions-upload-release-asset@v1 From 26e6bf196aa1864aed7da11c4045e084c489eeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ciarcin=CC=81ski?= Date: Wed, 15 Apr 2026 15:22:01 +0200 Subject: [PATCH 4/4] fix --- .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 76f55a35..47334544 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -151,7 +151,7 @@ jobs: "defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu=/usr/bin/defguard-gateway defguard-gateway.service=/usr/lib/systemd/system/defguard-gateway.service example-config.toml=/etc/defguard/gateway.toml.sample" - fpm_opts: "--architecture arm64 --output-type rpm --version ${{ env.VERSION }} --package defguard-gateway-${{ env.VERSION }}-aarch64-unknown-freebsd.rpm --after-install after-install.sh" + fpm_opts: "--architecture arm64 --output-type rpm --version ${{ env.VERSION }} --package defguard-gateway-${{ env.VERSION }}-aarch64-unknown-linux-gnu.rpm --after-install after-install.sh" - name: Build FreeBSD package uses: defGuard/fpm-action@main