Re: [PATCH] doc: make HTML manual reproducible
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Dec 1, 2020, 19:18 UTC
- Message-ID
- <CAN0heSpzA2ecKkjz0kMD8k66x8tDipKs93OHQ0+2efQyrS9_=A@mail.gmail.com>
- In-Reply-To
- <20201201154115.GP748@pobox.com>
On Tue, 1 Dec 2020 at 16:41, Todd Zullinger <tmz@pobox.com> wrote:
> 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.
Thanks for this. Your mail still hasn't reached me through the list, so I'm replying to Todd's reply here.
Looking through the word-diff of the resulting user-manual.html, I see basically three changes. I've applied some light copy-editing to try to make them more readable (the lack of spaces means the notion of "word" diff is a bit off). Do you also have these three changes?
1. <a name=[-"idp1"-]{+"id-1"+}></a>Git User Manual</h1> 2. <a href=[-"#idp2"-]{+"#id-1.2"+}></a> 3. <a name=[-"idp2"-]{+"id-1.2"+}></a>These names and links don't strike me as particularly useful. But even so, reproducibility makes sense. I guess you're not really after linking to these, but want to have binary-identical user-manual.html when building from the same commit?
Show 6 quoted lines
> > @@ -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
Nit: Maybe add a new line
XSLTOPTS += --stringparam generate.consistent.ids 1
instead to keep within 80 characters.
Show 6 quoted lines
> 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.
Thanks for digging out the version number. Agreed that this change should be reflected in INSTALL.
> 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>¹.
As mentioned there, it's not like I went out and tested with 1.74. So whether we *actually* support 1.74 right now is anyone's guess.
Show 11 quoted lines
> 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.
Seems to me like we can go with a change like this. If you're on a pre-1.77.1 system and want user-manual.html, but don't want to update your tool chain, you should still be able to clone the "htmldocs" repo. I'm not sure exactly where the cut-off point is, but I think moving up to mid-2012 should be ok.
Martin