From 39a3c40d67f442ad0ab44e23fb108954941c6711 Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Sat, 28 Nov 2020 17:32:05 +0000 Subject: [PATCH] debian: Build reproducibly --- debian/rules | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/rules b/debian/rules index 8e5b6bd6..05ee1295 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,13 @@ export CARGO_HOME = $(CURDIR)/debian/cargo export DEB_BUILD_MAINT_OPTIONS = hardening=+all +# Don't use paths that may change between builds. +# No need to care about $HOME +# because Cargo will not place any source in ~/.cargo. +# The build directory is a subdirectory of the source directory, +# so it doesn't need to be explicitly taken care of. +export RUSTFLAGS = --remap-path-prefix=$(CURDIR)=/remap-pwd + distrel := $(shell lsb_release --codename --short) ifneq (,$(filter $(distrel),buster amber))