Bug#831381: proftpd-dfsg: please make the build reproducible

Chris Lamb lamby at debian.org
Fri Jul 15 10:13:30 UTC 2016


Source: proftpd-dfsg
Version: 1.3.5a-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

Whilst working on the "reproducible builds" effort [0], we noticed
that proftpd-dfsg could not be built reproducibly.

Patch attached. It can probably go upstream.

 [0] https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible_build	1970-01-01 02:00:00.000000000 +0200
--- b/debian/patches/reproducible_build	2016-07-15 12:07:13.772871765 +0200
@@ -0,0 +1,24 @@
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-07-15
+
+--- proftpd-dfsg-1.3.5a.orig/Makefile.in
++++ proftpd-dfsg-1.3.5a/Makefile.in
+@@ -21,11 +21,17 @@ BUILD_PROFTPD_OBJS=$(BUILD_OBJS) $(BUILD
+ BUILD_PROFTPD_ARCHIVES=$(BUILD_STATIC_MODULE_ARCHIVES)
+ BUILD_BIN=proftpd$(EXEEXT) ftpcount$(EXEEXT) ftpdctl$(EXEEXT) ftpscrub$(EXEEXT) ftpshut$(EXEEXT) ftptop$(EXEEXT) ftpwho$(EXEEXT)
+ 
++DATE_FMT = %a %b %e %Y %H:%M:%S %Z
++ifdef SOURCE_DATE_EPOCH
++	BUILD_STAMP ?= $(shell LC_ALL=C date --utc --date="@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)")
++else
++	BUILD_STAMP ?= $(shell date "+$(DATE_FMT)")
++endif
+ 
+ all: $(BUILD_BIN)
+ 
+ include/buildstamp.h:
+-	echo \#define BUILD_STAMP \"`date +"%a %b %e %Y %H:%M:%S %Z"`\" > include/buildstamp.h
++	echo \#define BUILD_STAMP \"$(BUILD_STAMP)\" > include/buildstamp.h
+ 
+ dummy:
+ 
--- a/debian/patches/series	2016-07-15 11:22:22.611887653 +0200
--- b/debian/patches/series	2016-07-15 12:06:53.620654127 +0200
@@ -11,3 +11,4 @@
 silent
 use_hypen_in_manpage
 contrib_hardening_flags
+reproducible_build


More information about the Pkg-proftpd-maintainers mailing list