Fix the date stamp recorded in sources to $SOURCE_DATE_EPOCH

The builds were irreproducible because `date` was used to insert the
timestamp into alpine/date.c. Use --utc to ignore the local time zone
setting (if any) and --date=@$SOURCE_DATE_EPOCH to clamp the time
to the "official build time".

(Use of $SOURCE_DATE_EPOCH is made optional. It'll be set in normal
rpm builds, but allow it to not be set, so the spec file still works
even if built with 'rpmbuild -ba' or such.)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2024-07-03 11:46:56 +02:00
commit dbd9d4a821

View file

@ -95,6 +95,7 @@ touch imap/ip6
--enable-debug=no \
--without-tcl \
--with-c-client-target=lfd \
--with-date-stamp="$(date --utc ${SOURCE_DATE_EPOCH:+--date=@${SOURCE_DATE_EPOCH}})" \
--with-smtp-msa=/usr/sbin/sendmail \
--with-npa=/usr/bin/inews \
--with-passfile=.alpine.passfile \