Source: rust-xh
Version: 0.23.1-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed that
rust-xh could not be built reproducibly.
This is because the manual page embeds the current build date.
The patch attached mangles this date after the file has been generated
to use SOURCE_DATE_EPOCH. There is an alternative solution that parses
SOURCE_DATE_EPOCH within Rust itself, but I think that might require
an additional Rust crate [1].
[0] https://reproducible-builds.org/
[1] https://reproducible-builds.org/docs/source-date-epoch/#rust
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
--- a/debian/rules 2025-01-13 11:38:41.366168680 +0000
--- b/debian/rules 2025-01-13 11:52:09.832195254 +0000
@@ -1,7 +1,10 @@
#!/usr/bin/make -f
+BUILD_DATE := $(shell LC_ALL=C date --utc "+%Y-%m-%d" -d
"@$(SOURCE_DATE_EPOCH)")
+
%:
dh $@ --buildsystem cargo --with shell_completions
execute_after_dh_auto_install:
debian/*/usr/bin/xh --generate man > debian/xh.1
+ sed -i -e 's@^\(.TH XH 1 \)\([^ ]*\)@\1$(BUILD_DATE)@g' debian/xh.1