From 1affeb81232a8c69c19f45c9bef20f6cb2410d27 Mon Sep 17 00:00:00 2001 From: Palash Gandhi Date: Thu, 30 Jan 2025 11:14:47 -0800 Subject: [PATCH 1/2] DLPX-93263 24.04 LTS: Set delphix-rust package version to rustc version PR URL: https://www.github.com/delphix/linux-pkg/pull/333 --- packages/delphix-rust/config.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/delphix-rust/config.sh b/packages/delphix-rust/config.sh index c826a12e..9cd615bd 100755 --- a/packages/delphix-rust/config.sh +++ b/packages/delphix-rust/config.sh @@ -20,5 +20,7 @@ DEFAULT_PACKAGE_GIT_URL="https://github.com/delphix/delphix-rust.git" function build() { logmust mkdir -p "$WORKDIR/repo" + PACKAGE_VERSION="$(tr -d '\n' <"$WORKDIR/repo/RUSTC_VERSION")" + [[ -n "$PACKAGE_VERSION" ]] || die "Failed to retrieve package version" logmust dpkg_buildpackage_default } From c0ccf1ef9d245c27425c318baf7d2c524c2c05c4 Mon Sep 17 00:00:00 2001 From: Palash Gandhi Date: Thu, 30 Jan 2025 15:46:30 -0800 Subject: [PATCH 2/2] Add comment explaining version selection --- packages/delphix-rust/config.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/delphix-rust/config.sh b/packages/delphix-rust/config.sh index 9cd615bd..4f1f06c0 100755 --- a/packages/delphix-rust/config.sh +++ b/packages/delphix-rust/config.sh @@ -20,7 +20,16 @@ DEFAULT_PACKAGE_GIT_URL="https://github.com/delphix/delphix-rust.git" function build() { logmust mkdir -p "$WORKDIR/repo" + + # + # Instead of relying on linux-pkg to assign a default version like 1.0.0, set the + # version of the `delphix-rust` package to the version of the `rustc` package. + # This is done to ensure that third-party packages that rely on specific versions + # of `rustc` can correctly compare the version of the `rustc` package supplied by + # `delphix-rust` with their requirement. + # PACKAGE_VERSION="$(tr -d '\n' <"$WORKDIR/repo/RUSTC_VERSION")" [[ -n "$PACKAGE_VERSION" ]] || die "Failed to retrieve package version" + logmust dpkg_buildpackage_default }