git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Todd Zullinger <tmz@pobox.com>
Cc: "Arnout Engelen" <arnout@bzzt.net>,
	git@vger.kernel.org, "Martin Ågren" <martin.agren@gmail.com>,
	"Jeff King" <peff@peff.net>,
	"brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH] doc: make HTML manual reproducible
Date: Tue, 01 Dec 2020 11:27:06 -0800	[thread overview]
Message-ID: <xmqqpn3tpbsl.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20201201154115.GP748@pobox.com> (Todd Zullinger's message of "Tue, 1 Dec 2020 10:41:15 -0500")

Todd Zullinger <tmz@pobox.com> writes:

> Hi Arnout,
>
> [cc: brian, Martin, and peff, for their collective wisdom in
> the area of docs and involvement in the last discussion of
> docbook-xsl requirements.]
>
> Arnout Engelen wrote:
>> This makes sure the generated id's inside the html version of the
>> documentation use the same id's when the same version of the
>> manual is generated twice.
>> 
>> Signed-off-by: Arnout Engelen <arnout@bzzt.net>
>> ---
>>  Documentation/Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/Documentation/Makefile b/Documentation/Makefile
>> index 80d1908a44..4d1fd5e31f 100644
>> --- a/Documentation/Makefile
>> +++ b/Documentation/Makefile
>> @@ -380,7 +380,7 @@ SubmittingPatches.txt: SubmittingPatches
>>  	$(QUIET_GEN) cp $< $@
>>  
>>  XSLT = docbook.xsl
>> -XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
>> +XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css --stringparam generate.consistent.ids 1
>>  
>>  user-manual.html: user-manual.xml $(XSLT)
>>  	$(QUIET_XSLTPROC)$(RM) $@+ $@ && \
>
> I think this would raise the minimum supported version of
> docbook-xsl to 1.77.1.  That might be fine, but we'd
> probably want to make sure it doesn't negatively impact
> OS/distributions which build the docs as a likely group who
> care about reproducible builds.  And we'd want to update the
> requirement in INSTALL, of course.
>
> The minimum docbook-xsl version was raised from 1.73 to
> 1.74, in 5a80d85bbe (INSTALL: drop support for docbook-xsl
> before 1.74, 2020-03-29).  That change was discussed in
> <cover.1585486103.git.martin.agren@gmail.com>¹.
>
> AFAICT, the generate.consistent.ids param was added in
> docbook-xsl-1.77.1 which was released in June 2012.  The
> commit which added it is 74735098e (New param to support
> replacing generate-id() with xsl:number for more consistent
> id values., 2011-10-24).
>
> In any case, a minimum of 1.77.1 is present in the supported
> releases of CentOS/RHEL and Debian/Ubuntu, at least (most
> have 1.79.x).  Those are certainly not the only systems Git
> cares about; they're simply the systems with which I am at
> least mildly familiar.
>
> ¹ https://lore.kernel.org/git/cover.1585486103.git.martin.agren@gmail.com/

I think it is in general a good thing to do (can we lose some lines
from doc-diff, I wonder?) and many of the result of your study shown
above should be in the log message in a summarised form.  Here is a
starter.

    Generated ID's in the HTML version of the documentation does not
    stay the same even when they are generated from the identical
    source.  Pass generate.consistent.ids=1 to the xsltproc tool to
    make them stable, which would help reproducible build product.

    We currently only support docbook-xsl version 1.74 or newer, but
    this option requires version at least 1.77.1 (released in June
    2012), which would be OK for supported releases of CentOS/RHEL
    and Debian/Ubuntu (most have 1.79.x).

We may probably want to talk about versions commonly distributed for
macOS and BSDs as well (I do not know if we want to list minor Linux
distros).  And we definitely need to update INSTALL as you pointed
out.

Thanks and thanks for CC'ing those who may know the area well.


  parent reply	other threads:[~2020-12-01 19:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  9:50 [PATCH] doc: make HTML manual reproducible Arnout Engelen
2020-12-01 15:41 ` Todd Zullinger
2020-12-01 19:18   ` Martin Ågren
2020-12-02  1:54     ` Jeff King
2020-12-01 19:27   ` Junio C Hamano [this message]
2020-12-01 19:57     ` Martin Ågren
2020-12-02  0:36   ` brian m. carlson
2020-12-02 16:07     ` Todd Zullinger
2020-12-02 22:35       ` Junio C Hamano
2020-12-02 23:45       ` brian m. carlson
2020-12-03  1:33         ` Junio C Hamano
2020-12-03  2:00         ` Todd Zullinger
2020-12-03  2:31           ` Re* " Junio C Hamano
2020-12-03  8:07             ` Arnout Engelen
2020-12-02  0:41 ` brian m. carlson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpn3tpbsl.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=arnout@bzzt.net \
    --cc=git@vger.kernel.org \
    --cc=martin.agren@gmail.com \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    --cc=tmz@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).