From a3e421db3df629e3b964efe122fd485edc886923 Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Sun, 15 Sep 2019 11:04:33 +0000 Subject: [PATCH] build: Fix Debian Cargo.toml mismatch Debian uses a separate registry for the packages it distributes. Checksums for some Debian packages don't match anything that's available on crates.io, which is the default source of dependencies. *linked-hash-map* in particular doesn't provide any hash. As a result, Debian's `Cargo.lock` and crates.io's `Cargo.lock` are not matching, and building is only possible with one or the other, depending on what's checked in. As a separate issue, Debian packages are usually not checked in in multiple versions, so checking in Debian's `Cargo.lock` would result in the package not building whenever a bugfix is distributed (due to checksum changes). This change removes the crates.io `Cargo.lock` so that a new one will be created whenever a .deb is built, solving the above. What keeps falsely passing builds from happening is `Cargo.toml` specifying no interface changes, as well as Build-Depends, which seem enough for any other Debian package. --- debian/rules | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/rules b/debian/rules index 0e8e3ec6..a5c63017 100755 --- a/debian/rules +++ b/debian/rules @@ -6,4 +6,10 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --builddirectory=_build --buildsystem=meson +# The Debian version of linked-hash-map doesn't provide any hash, +# causing Cargo to refuse to build with a crates.io copy +build: + rm Cargo.lock + dh $@ --builddirectory=_build --buildsystem=meson + override_dh_autoreconf: