On 11/28/2025 6:14 AM, Danai SAE-HAN (韓達耐) wrote:

Hello Danai,

Exporting SOURCE_DATE_EPOCH and LOCALE work in debian/rules. We
could just have an empty SOURCE_DATE_EPOCH variable, so it's always set to epoch time:

 > Comment Creation Date: Thu Jan  1 07:30:00 1970

But I think that's a bit ugly, and may perhaps cause weird results
for other parts that rely on this variable. One suggestion from [1]
is to use the latest timestamp in debian/changelog.  I find this a
good alternative. We always have to close debian/changelog anyway,
so we will always have a proper timestamp, even in the event of an
unreleased build.

$ dpkg-parsechangelog -S timestamp
1764094991

According to that web page

<snip>
In Debian, this is automatically set to the same time as the latest entry in debian/changelog, i.e. the same as the output of dpkg-parsechangelog -SDate.

1. For packages using debhelper versions >= 9.20151004, this variable is automatically exported during builds, so you probably don’t need to change anything. One exception is if your debian/rules needs this variable in non-debhelper parts, in which case you can try (3) or (4).
<snip>

So I would have expected that everything is fine. I did not check if SOURCE_DATE_EPOCH has a sane value during build.

Therefore I'd like to implement LOCALE=C, and SOURCE_DATE_EPOCH with
the latest timestamp of debian/changelog.


I'm unsure about the locale, but LOCALE=C sounds reasonable in any way.

Please be aware that I've enable Salsa CI for that package. So every "git push" triggers a Salsa CI run, unless you prepend the commit message with "[skip-ci]".

Hilmar
--
sigfault

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to