Debian (and other distributions) are trying to enforce "reproducible"
builds, which means bit-identical. This requires using alternative build
timestamps upon request, which all the compilers are set up to do. GNU APL
is set up for it too, but there was a little bug that made it not work.
Here is a patch.

$ cat debian/patches/0009-date.patch
From: Jochen Sprickerhof <[email protected]>
Date: Thu, 16 Jul 2026 20:03:31 +0200
Subject: [PATCH] Fix apl_BUILD_DATE computation

- Remove space after equal sign as it is not allowed in shell.
- Call date with -d @<timestamp> to set the correct date.
---
 m4/build_date.m4 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/m4/build_date.m4 b/m4/build_date.m4
index bfaaccd..4299a6b 100644
--- a/m4/build_date.m4
+++ b/m4/build_date.m4
@@ -22,9 +22,9 @@ apl_BUILD_OS=$(uname -s -r -m)          # current OS

 AS_IF( [test -n "$SOURCE_DATE_EPOCH"],
        [ apl_BUILD_OS="none"
-         apl_BUILD_DATE=             $(
-                   dash_format_date -u -d "$SOURCE_DATE_EPOCH" 2>/dev/null
||
-                   dash_format_date -u -r $SOURCE_DATE_EPOCH  ||
+         apl_BUILD_DATE=$(
+                   dash_format_date -u -d "@$SOURCE_DATE_EPOCH"
2>/dev/null ||
+                   dash_format_date -u -d "@$SOURCE_DATE_EPOCH"  ||
                    dash_format_date -u)
        ])
 AC_SUBST([apl_BUILD_DATE])

Reply via email to