Debian and SOURCE_DATE_EPOCH=0
Janneke Nieuwenhuizen
janneke at gnu.org
Sat Feb 14 00:10:03 UTC 2026
Hi!
For quite some years now, I've been using in my makefiles somethhing
like
--8<---------------cut here---------------start------------->8---
# help2man reproducibility
SOURCE_DATE_EPOCH=$(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0)
# Be friendly to Debian; avoid using EPOCH
MTIME=$(SOURCE_DATE_EPOCH)
TAR_FLAGS=--sort=name --mtime=@$(MTIME) --owner=0 --group=0 --numeric-owner --mode=go=rX,u+rw,a-s
--8<---------------cut here---------------end--------------->8---
Now, I've somehow gotten entangled in the BLUE 0,1) build system
development and its lead devoloper, Olivier (cc) quite reasonably
challenged me: Why not just use --mtime=0 to make source tarballs
reproducible?
Using another value than 0 is non-trivial. Easiest is to use the
timestamp of the latest commit in git (see the snippet above), but what
if there's no git available?
So my question is: Do we indeed advise not to use --mtime=0 for source
tarballs? And if so, why is that? And, does anyone remember where the
`Be friendly to Debian; avoid using EPOCH' comment may have originated?
And apart from the reprocudible source tarball, what about the value of
SOURCE_DATE_EPOCH we sue at build time, e.g., for tools like HELP2MAN.
Greetings,
Janneke
0) https://codeberg.org/lapislazuli/blue
1) https://fosdem.org/2026/schedule/event/3A7VGM-blue/
--
Janneke Nieuwenhuizen <janneke at gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
More information about the rb-general
mailing list