diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c882e32..1402291 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -383,9 +383,17 @@ jobs: sudo apt-get update sudo apt-get install --no-install-recommends -y musl-tools rpm createrepo-c - - uses: taiki-e/install-action@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2.89.1 - with: - tool: cargo-generate-rpm@0.21.1 + # From source, as release.yml installs it and for its reason: it is not + # in install-action's checksummed manifest. + # Outside ~/.cargo/bin, which rust-cache restores: a cached copy is + # how the first version of this step ran QuickInstall's binary anyway. + # The `rm` removes that copy from caches saved before this change. + - name: Install cargo-generate-rpm + run: | + rm -f "$HOME/.cargo/bin/cargo-generate-rpm" + cargo install --locked cargo-generate-rpm --version 0.21.1 \ + --root "$RUNNER_TEMP/cargo-generate-rpm" + echo "$RUNNER_TEMP/cargo-generate-rpm/bin" >> "$GITHUB_PATH" - name: Build the packages env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40ad380..c22b0f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -123,10 +123,21 @@ jobs: with: tool: cargo-deb + # From source, not through install-action. install-action verifies a + # checksum only for the tools in its own manifest, and this is not one: + # it fell back to an unpinned cargo-binstall, which fetched a binary + # built by QuickInstall, a third party. That binary would write the + # .rpm this workflow attests. `cargo install --locked` builds the + # published crate against its own lockfile, every crate checked + # against the crates.io index, and costs about a minute. Into a + # directory of its own rather than ~/.cargo/bin, which rust-cache + # saves and restores in ci.yml, so neither workflow can end up running + # a binary some earlier run left there. - name: Install cargo-generate-rpm - uses: taiki-e/install-action@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2.89.1 - with: - tool: cargo-generate-rpm@0.21.1 + run: | + cargo install --locked cargo-generate-rpm --version 0.21.1 \ + --root "$RUNNER_TEMP/cargo-generate-rpm" + echo "$RUNNER_TEMP/cargo-generate-rpm/bin" >> "$GITHUB_PATH" # The target-specific `CC_*` rather than a bare `CC`: build scripts and # proc macros are compiled for the *host*, and pointing their C compiler