From 19feabfae0d52dfe992a5e5bc3ce6a30587072ed Mon Sep 17 00:00:00 2001 From: Brady Bonnette Date: Wed, 6 Mar 2024 15:58:06 -0500 Subject: [PATCH 1/3] Force cargo-pgrx to --locked; also change filename to reflect Debian version --- .github/docker/Dockerfile.debian-artifact-build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/docker/Dockerfile.debian-artifact-build b/.github/docker/Dockerfile.debian-artifact-build index 0d309b47..7a5c6cb2 100644 --- a/.github/docker/Dockerfile.debian-artifact-build +++ b/.github/docker/Dockerfile.debian-artifact-build @@ -84,7 +84,7 @@ ENV PATH="/var/lib/postgresql/.cargo/bin:${PATH}" # Install the version of PGRX that is dictated by Cargo.toml for this project RUN PGRX_VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name=="pgrx")|.version') && \ - cargo install cargo-pgrx --force --version "$PGRX_VERSION" + cargo install cargo-pgrx --locked --force --version "$PGRX_VERSION" # Necessary to build plrustc and company RUN rustup component add llvm-tools-preview rustc-dev @@ -161,7 +161,7 @@ EOF # Package everything up based on whatever's in RELEASE_DIR, and send the resulting # .deb file to the /out directory RUN TOOLCHAIN_VER=$( Date: Wed, 6 Mar 2024 16:02:20 -0500 Subject: [PATCH 2/3] Also use --locked in non-release-build CI workflows --- .github/scripts/install_cargo_pgrx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/install_cargo_pgrx.sh b/.github/scripts/install_cargo_pgrx.sh index 1909ea06..a887e21e 100755 --- a/.github/scripts/install_cargo_pgrx.sh +++ b/.github/scripts/install_cargo_pgrx.sh @@ -18,7 +18,7 @@ function install_cargo_pgrx() { if TARGET_VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name=="pgrx")|.version'); then echo "Installing/upgrading cargo-pgrx to version $TARGET_VERSION" - cargo install cargo-pgrx --force --version "$TARGET_VERSION" + cargo install cargo-pgrx --locked --force --version "$TARGET_VERSION" else echo "Could not determine cargo-pgrx version to install." exit 1 From 2782fff3f189104a52cfbcbc2fbb1e2e59462116 Mon Sep 17 00:00:00 2001 From: Brady Bonnette Date: Wed, 6 Mar 2024 16:38:32 -0500 Subject: [PATCH 3/3] Also fixes Dockerfile.try --- Dockerfile.try | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.try b/Dockerfile.try index d833a81a..3d13ce5b 100644 --- a/Dockerfile.try +++ b/Dockerfile.try @@ -65,7 +65,7 @@ ENV PATH="/var/lib/postgresql/.cargo/bin:${PATH}" # Build/install/remove all that is necessary in one step as to keep the resulting layer as small as possible. RUN PGRX_VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name=="pgrx")|.version') && \ - cargo install cargo-pgrx --force --version "$PGRX_VERSION" && \ + cargo install cargo-pgrx --locked --force --version "$PGRX_VERSION" && \ rustup component add llvm-tools-preview rustc-dev && \ cd /src/plrustc && ./build.sh && cp ../build/bin/plrustc ~/.cargo/bin && \ cargo pgrx init --pg15 $(which pg_config) && \