Re: [PATCH] doc: doc-diff: specify date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 04, 2023 at 10:55:52PM -0700, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> >> >  			GIT_VERSION=omitted \
> >> > +			GIT_DATE=1970-01-01 \
> >> >  			SOURCE_DATE_EPOCH=0 \
> >> >  			DESTDIR="$tmp/installed/$dname+" \
> >> >  			install-man &&
> >> 
> >> I wonder what the existing SOURCE_DATE_EPOCH was trying to do there,
> >> though.
> >
> > It used to be necessary so that we had a reproducible build. Otherwise,
> > asciidoc uses the mtime of the file, and diffing two versions would have
> > tons of uninteresting date-differences.
> >
> > After 28fde3a1 I doubt it is necessary, as the header uses $GIT_DATE
> > instead (it's possible the mtime may be used elsewhere, but I didn't see
> > any spot after grepping a built xml file. And at any rate, if it does
> > not produce a visible difference, that is enough for doc-diff).
> 
> Thanks for confirming my suspicion.  I guess leaving it there still
> would not hurt.  It can be removed whenever somebody motivated
> enough comes and shows a well-reasoned patch that explains why it no
> longer is necessary ;-)

-- >8 --
Subject: [PATCH] doc-diff: drop SOURCE_DATE_EPOCH override

The original doc-diff script set SOURCE_DATE_EPOCH to make asciidoc's
output deterministic. Otherwise, the mtime of the source files would end
up in the footer of the manpage, causing noisy and uninteresting diff
hunks.

But this has been unused since 28fde3a1f4 (doc: set actual revdate for
manpages, 2023-04-13), as the footer uses the externally-specified
GIT_DATE instead (that needs to be set consistently, too, which it now
is as of the previous commit).

Asciidoc sets several automatic attributes based on the mtime (or manual
epoch), so it's still possible to write a document that would need
SOURCE_DATE_EPOCH set to be deterministic. But if we wrote such a thing,
it's probably a mistake, and we're better off having doc-diff loudly
show it.

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
 Documentation/doc-diff | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/doc-diff b/Documentation/doc-diff
index 554a78a12d..fb09e0ac0e 100755
--- a/Documentation/doc-diff
+++ b/Documentation/doc-diff
@@ -154,7 +154,6 @@ render_tree () {
 			$makemanflags \
 			GIT_VERSION=omitted \
 			GIT_DATE=1970-01-01 \
-			SOURCE_DATE_EPOCH=0 \
 			DESTDIR="$tmp/installed/$dname+" \
 			install-man &&
 		mv "$tmp/installed/$dname+" "$tmp/installed/$dname"
-- 
2.40.1.802.gdef2a8734a




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux