nmh-workers
[Top] [All Lists]

Re: [nmh-workers] Reproducible build patch

2018-07-23 12:56:12
On Mon, 23 Jul 2018 09:17:45 -0400, Ken Hornstein said:

DATE_FMT="%Y-%m-%d %T +0000"
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +s)}"
date=$(TZ=GMT0 date --date="@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null ||
date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT
")

I ... think that's right (note, I haven't tested it yet).  Everyone ok
with this?

I doubt that's right - at least on Fedora, /usr/bin/date doesn't work that 
way....

date -r takes the next thing as a file whose mtime should be used
as the date source.

       -r, --reference=FILE
              display the last modification time of FILE

However, the next thing after -r is a bash variable that's probably not the 
name of a file.

Also, the 'date +s' is busted, it will just return "s".

Attachment: pgpq_rS_wrjdV.pgp
Description: PGP signature

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers
<Prev in Thread] Current Thread [Next in Thread>