Supporting reproducible builds.

This commit is contained in:
Mihail Ivanchev 2024-10-19 17:23:28 +02:00
parent 20d839f2dd
commit 137bd28dc2
2 changed files with 18 additions and 0 deletions

View file

@ -8,6 +8,7 @@ AC_SUBST(MODULE_DIR)
AC_SUBST(LISP_PROGRAM)
AC_SUBST(LISP)
AC_SUBST(COMPRESSION)
AC_SUBST(REPRODUCIBLE)
AC_SUBST(STUMPWM_ASDF_DIR)
# Checks for programs.
@ -22,6 +23,11 @@ AC_ARG_ENABLE(compression,
COMPRESSION="t",
COMPRESSION="nil")
AC_ARG_ENABLE(reproducible,
[ --enable-reproducible create a reproducible build (doesn't include compilation date and time)],
REPRODUCIBLE="t",
REPRODUCIBLE="nil")
STUMPWM_ASDF_DIR="`pwd`"
if test -x "$SBCL_PATH"; then

View file

@ -42,6 +42,18 @@
(stumpwm:set-module-dir "@MODULE_DIR@")
;; To support reproducible (compiled) builds we modify the version string
;; to exclude the timestamp. This could be done in version.lisp as well but
;; it hinders StumpWM users who do not compile the manager.
(when @REPRODUCIBLE@
(let* ((ver stumpwm:*version*)
(idx (search "compiled on" ver :test #'char-equal)))
(setf stumpwm:*version* (concatenate
'string
(subseq ver 0 idx)
"Reproducible Build"))))
(when (uiop:version<= "3.1.5" (asdf:asdf-version))
;; We register StumpWM and its dependencies as immutable, to stop ASDF from
;; looking for their source code when loading modules.