Source: vim Version: 2:7.4.712-2 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-CC: reproducible-bui...@lists.alioth.debian.org
Hi! While working on Debian's “reproducible builds” effort [1], we have noticed that vim doesn't build reproducibly. It embeds the build date and time into the binaries via __DATE__ and __TIME__ macros. Vim already falls back to a long version string without build date/time on systems where those macros are not available. By disabling the check for __DATE__ and __TIME__ in configure(.in), vim will use the reproducible string. This is done in the attached patch. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/debian/remove_date_time_from_version.patch b/debian/patches/debian/remove_date_time_from_version.patch new file mode 100644 index 0000000..191c8a3 --- /dev/null +++ b/debian/patches/debian/remove_date_time_from_version.patch @@ -0,0 +1,25 @@ +Author: Reiner Herrmann <rei...@reiner-h.de> +Description: Don't include build date and time in long version + If configure detects that __DATE__ and __TIME__ are available, it + defines HAVE_DATE_TIME, which will lead to the embedding of __DATE__ + and __TIME__ in the long version string. This makes the build + unreproducible. + As this is no interesting or relevant information, it can be removed + from the version. + +Index: vim-7.4.712/src/configure.in +=================================================================== +--- vim-7.4.712.orig/src/configure.in ++++ vim-7.4.712/src/configure.in +@@ -2843,11 +2843,6 @@ if test "x$vim_cv_toupper_broken" = "xye + AC_DEFINE(BROKEN_TOUPPER) + fi + +-AC_MSG_CHECKING(whether __DATE__ and __TIME__ work) +-AC_TRY_COMPILE([#include <stdio.h>], [printf("(" __DATE__ " " __TIME__ ")");], +- AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DATE_TIME), +- AC_MSG_RESULT(no)) +- + AC_MSG_CHECKING(whether __attribute__((unused)) is allowed) + AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));], + AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ATTRIBUTE_UNUSED), diff --git a/debian/patches/series b/debian/patches/series index 7760ddc..d796726 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,3 +7,4 @@ upstream/lcs_space-overflow.patch debian/vim-tiny.patch debian/disabled-modelines.patch debian/extra-tex-detection.patch +debian/remove_date_time_from_version.patch
signature.asc
Description: OpenPGP digital signature