diff --git a/.github/workflows/deb-buildd.yml b/.github/workflows/deb-buildd.yml index 83a0bf2b..db171a1c 100644 --- a/.github/workflows/deb-buildd.yml +++ b/.github/workflows/deb-buildd.yml @@ -79,7 +79,7 @@ jobs: e2fsprogs \ fakemachine \ fdisk \ - gpg \ + gnupg \ iproute2 \ libarchive13 \ mmdebstrap \ @@ -156,6 +156,13 @@ jobs: if [ "${{ inputs.dist-name }}" = "debian" ]; then tee -a ~/.sbuildrc > /dev/null < [ "export LD_PRELOAD=/usr/lib/$(dpkg-architecture -q DEB_BUILD_GNU_TYPE)/libeatmydata.so" ] + }; + \$build_environment = { + "LD_PRELOAD" => "/usr/lib/$(dpkg-architecture -q DEB_BUILD_GNU_TYPE)/libeatmydata.so" + }; + \$environment_filter = [Dpkg::BuildInfo::get_build_env_allowed(), '^LD_PRELOAD$']; push @{\$unshare_mmdebstrap_extra_args}, "*", [ '--hook-dir=/usr/share/mmdebstrap/hooks/eatmydata' ]; diff --git a/.github/workflows/deb-orchestrator.yml b/.github/workflows/deb-orchestrator.yml index 37c70b22..683f244f 100644 --- a/.github/workflows/deb-orchestrator.yml +++ b/.github/workflows/deb-orchestrator.yml @@ -56,8 +56,20 @@ jobs: secrets: GPG_SECRET_SUBKEYS: ${{ secrets.GPG_SECRET_SUBKEYS }} GPG_SIGNING_SUBKEY_FINGERPRINT: ${{ secrets.GPG_SIGNING_SUBKEY_FINGERPRINT }} + reprotest: + needs: source-only + uses: ./.github/workflows/deb-reprotest.yml + with: + deb-src-artifact-id: ${{ needs.source-only.outputs.deb-src-artifact-id }} + runs-on: "ubuntu-latest" + arch: amd64 + dist-name: debian + dist-version: unstable + secrets: + GPG_SECRET_SUBKEYS: ${{ secrets.GPG_SECRET_SUBKEYS }} + GPG_SIGNING_SUBKEY_FINGERPRINT: ${{ secrets.GPG_SIGNING_SUBKEY_FINGERPRINT }} publish: - needs: [ source-only, buildd ] + needs: [ source-only, buildd, reprotest ] if: github.event_name != 'pull_request' && (github.ref_type == 'tag' || (github.ref_type == 'branch' && github.ref_name == 'master')) uses: ./.github/workflows/deb-publish.yml secrets: diff --git a/.github/workflows/deb-publish.yml b/.github/workflows/deb-publish.yml index 6d21bb1d..6caf8f5a 100644 --- a/.github/workflows/deb-publish.yml +++ b/.github/workflows/deb-publish.yml @@ -61,7 +61,6 @@ jobs: gettext-base \ git \ gnupg \ - gpg-agent \ openssh-client \ pandoc \ reprepro \ diff --git a/.github/workflows/deb-reprotest.yml b/.github/workflows/deb-reprotest.yml new file mode 100644 index 00000000..9d093639 --- /dev/null +++ b/.github/workflows/deb-reprotest.yml @@ -0,0 +1,167 @@ +on: + workflow_call: + inputs: + deb-src-artifact-id: + required: true + type: string + runs-on: + required: true + type: string + arch: + required: true + type: string + dist-name: + required: true + type: string + dist-version: + required: true + type: string + secrets: + GPG_SECRET_SUBKEYS: + GPG_SIGNING_SUBKEY_FINGERPRINT: + +jobs: + linux: + runs-on: ${{ inputs.runs-on }} + container: + image: debian:unstable-slim + options: --privileged --cap-add=SYS_ADMIN --security-opt=apparmor:unconfined --tmpfs /tmp:exec --tmpfs /var/lib/schroot/unpack:exec --tmpfs /var/lib/schroot/union/overlay:exec --tmpfs /var/lib/schroot/session:exec --tmpfs /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} + permissions: + id-token: write + contents: read + attestations: write + steps: + - name: Install necessary packages + timeout-minutes: 1 + run: | + set -xe + tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io > /dev/null < /dev/null < /dev/null < /dev/null < /dev/null < /dev/null < /dev/null < /dev/null < /dev/null < /dev/null < [ "export LD_PRELOAD=/usr/lib/$(dpkg-architecture -q DEB_BUILD_GNU_TYPE)/libeatmydata.so" ] + }; + \$build_environment = { + "LD_PRELOAD" => "/usr/lib/$(dpkg-architecture -q DEB_BUILD_GNU_TYPE)/libeatmydata.so" + }; + \$environment_filter = [Dpkg::BuildInfo::get_build_env_allowed(), '^LD_PRELOAD$']; push @{\$unshare_mmdebstrap_extra_args}, "*", [ '--include=eatmydata', '--hook-dir=/usr/share/mmdebstrap/hooks/eatmydata', @@ -143,7 +150,8 @@ jobs: timeout-minutes: 1 run: | set -xe - eatmydata curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain $RUST_VERSION --profile minimal -y + eatmydata curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ + eatmydata sh -s -- --default-toolchain $RUST_VERSION --profile minimal -y . "$HOME/.cargo/env" - name: Fetch our git repository timeout-minutes: 1