From: Fabian Grünbichler Date: Wed, 10 Jul 2024 12:29:24 +0000 (+0200) Subject: build: ensure wrapper config is picked up X-Git-Tag: v3.2.9~134 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=396806b211610e81496f844d8028e30738783d35;p=proxmox-backup.git build: ensure wrapper config is picked up `cargo build` and `cargo install` pick up different config files, by symlinking the wrapper config into a place with higher precedence than the one in the top-level git repo dir, we ensure the package build actually picks up the desired config instead of the one intended for quick dev builds. Signed-off-by: Fabian Grünbichler --- diff --git a/debian/rules b/debian/rules index a82c3e12..a03fe11b 100755 --- a/debian/rules +++ b/debian/rules @@ -28,6 +28,11 @@ override_dh_auto_configure: @perl -ne 'if (/^version\s*=\s*"(\d+(?:\.\d+)+)"/) { my $$v_cargo = $$1; my $$v_deb = "$(DEB_VERSION_UPSTREAM)"; \ die "ERROR: d/changelog <-> Cargo.toml version mismatch: $$v_cargo != $$v_deb\n" if $$v_cargo ne $$v_deb; exit(0); }' Cargo.toml $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system + # `cargo build` and `cargo install` have different config precedence, symlink + # the wrapper config into a place where `build` picks it up as well.. + # https://doc.rust-lang.org/cargo/commands/cargo-install.html#configuration-discovery + mkdir -p .cargo + ln -s $(CARGO_HOME)/config.toml $(CURDIR)/.cargo/config.toml dh_auto_configure override_dh_auto_build: