nmh-workers
[Top] [All Lists]

Re: [nmh-workers] Reproducible build patch

2018-07-23 17:13:17
Hello valdis, Ken and nmh-workers@,

valdis.kletnieks@vt.edu writes:
[...]
Also, the "date +s" and the "date -u -r" don't do what you think they do...
[...]

I think that `date +s' is a typo - probably missing a `%' as you've
noticed - while `date -u -r' (that's after the `||') should work on
most BSD systems.

[...]
I'm assuming that the BSD 'date'  takes -r as a timestamp rather than a 
filename.  Somebody
on a BSD system will need to check that.

This is what happens on NetBSD (if I'm not missing something the
it is similar to what happens with GNU date):

 | % cat /tmp/date.sh
 | 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")
 | echo $date
 | % date && sh -x date.sh
 | Mon Jul 23 23:57:26 CEST 2018
 | + DATE_FMT='%Y-%m-%d %T +0000'
 | + date '+%s'
 | + SOURCE_DATE_EPOCH=1532383046
 | + TZ=GMT0 date '--date=@1532383046' '+%Y-%m-%d %T +0000' 2>/dev/null
 | + date -u -r 1532383046 '+%Y-%m-%d %T +0000' 2>/dev/null
 | + date='2018-07-23 21:57:26 +0000'
 | + echo 2018-07-23 '21:57:26' +0000
 | 2018-07-23 21:57:26 +0000

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>