Subject: [bug#32231] [PATCH 8/8] gnu: java-tomcat: Strip timestamps

From: Björn Höfling <[email-masked]>
Date: Sat, 21 Jul 2018 10:25:32 +0200

* gnu/package/web.scm (java-tomcat)[arguments]: Add phase 'strip timestamps.
Makes build deterministic.
---
 gnu/packages/web.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index a3290a3..565198f 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -5747,6 +5747,14 @@ encoder/decoder based on the draft-12 specification for UBJSON.")
                (("depends=\"validate\"") "depends=\"build-prepare\"")
                ((",download-validate") ""))
              #t))
+         (add-after 'unpack 'strip-timestamps
+           (lambda _
+             (substitute* "build.xml"
+               (("<filter token=\"YEAR\" value=.*")
+                "<filter token=\"YEAR\" value=\"1970\"/>")
+               (("<filter token=\"VERSION_BUILT\" value=.*")
+                "<filter token=\"VERSION_BUILT\" value=\"Jan 1 1970 00:00:00 UTC\"/>"))
+             #t))
          (add-after 'unpack 'generate-properties
            (lambda _
              ;; This could have been passed to make-flags, but getcwd returns
-- 
2.7.4