From: Guillaume Le Vaillant <glv@posteo.net>
To: Kaz Kylheku <kaz@kylheku.com>
Cc: "Paul A. Patience" <paul@apatience.com>, 49517@debbugs.gnu.org
Subject: [bug#49517] [PATCH] gnu: txr: Build documentation and update to 265.
Date: Sun, 18 Jul 2021 10:36:36 +0000 [thread overview]
Message-ID: <874kcr7vt7.fsf@kitej> (raw)
In-Reply-To: <96d55c0d8940c64eca79aa4a15a3cb8f@mail.kylheku.com>
[-- Attachment #1: Type: text/plain, Size: 2791 bytes --]
Kaz Kylheku <kaz@kylheku.com> skribis:
> On 2021-07-17 15:51, Kaz Kylheku wrote:
>> On 2021-07-17 02:57, Guillaume Le Vaillant wrote:
>>> Hi,
>>> When testing the patch to build the HTML and PDF documentation,
>>> I noticed that the 'share/doc/txr-263/txr-manpage.pdf' file is not
>>> reproducible. There are some timestamps and UUIDs in it that change at
>>> each build (diffoscope output attached).
>>> Could you take a look at that and see if there's a way to make it
>>> reproducible?
>>> Thanks.
>> Hi Guillaume,
>> Thank you for your report. I don't see anything in the pdfroff
>> documentation
>> about getting rid of this. I might use a program similar to this one
>> to just overwrite the UUIDs and dates:
>
> I've noticed that there are some dates in the document which
> respond to SOURCE_DATE_EPOCH:
>
> 2 0 obj
> <</Producer(GPL Ghostscript 9.26)
> /CreationDate(D:20210717203740-07'00')
> /ModDate(D:20210717203740-07'00')
> /Creator(groff version 1.22.3)>>endobj
>
> If I build with the SOURCE_DATE_EPOCH environment variable,
> these dates from Ghostscript follow that variable.
> That's why Guillaume isn't seeing an issue in that section
> of the file.
Hi Kaz,
I tried your patch and it doesn't fix all the timestamps in the
environment used to build Guix packages:
- Timestamps have the "YYYY-MM-DDTHH:MM:SSZ" format instead of
"YYYY-MM-DDTHH:MM:SS+00:00"
- There are two "...Date(D:YYYYMMDDHHMMSSZ..." timestamps after the XML
block, although SOURCE_DATE_EPOCH is set to 1 in the environment
With the following modified 'pdf-clobber-stamps.tl' the document becomes
reproducible with Guix (but probably not in some other environments,
depending on the timezone format):
--8<---------------cut here---------------start------------->8---
(let* ((epoch (or (tointz (getenv "SOURCE_DATE_EPOCH")) 0))
(isotime (time-string-utc epoch "%FT%TZ"))
(pdf (file-get-string "txr-manpage.pdf"))
(start (search-str pdf "<?xpacket begin="))
(end (if start (search-str pdf "<?xpacket end" start)))
(xml (if end [pdf start..end]))
(orig-len (len xml)))
(unless xml
(format *stderr* "XML block not found in PDF")
(exit nil))
(upd xml
(regsub #/uuid:........-....-....-....-............/
"uuid:00000000-0000-0000-0000-000000000000")
(regsub #/Date>....-..-..T..:..:..Z/
`Date>@isotime`))
(assert (eql (len xml) orig-len))
(set [pdf start..end] xml)
(upd pdf
(regsub #/Date\(D:..............Z/
"Date(D:19700101000001Z"))
(file-put-string "txr-manpage.pdf.temp" pdf)
(rename-path "txr-manpage.pdf.temp" "txr-manpage.pdf"))
--8<---------------cut here---------------end--------------->8---
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
next prev parent reply other threads:[~2021-07-18 10:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-11 0:37 [bug#49517] [PATCH] gnu: txr: Build documentation and update to 265 Paul A. Patience
2021-07-12 1:01 ` Paul A. Patience
2021-07-13 23:45 ` Paul A. Patience
2021-07-17 9:57 ` Guillaume Le Vaillant
2021-07-17 22:51 ` Kaz Kylheku
2021-07-18 3:43 ` Kaz Kylheku
2021-07-18 10:36 ` Guillaume Le Vaillant [this message]
2021-07-18 12:59 ` Paul A. Patience
2021-07-20 9:07 ` bug#49517: " Guillaume Le Vaillant
2021-07-18 20:27 ` [bug#49517] " Kaz Kylheku
2021-07-18 21:28 ` Paul A. Patience
2021-07-19 12:08 ` Guillaume Le Vaillant
2021-07-19 21:31 ` Kaz Kylheku
2021-07-20 9:18 ` Guillaume Le Vaillant
2021-07-19 3:23 ` Kaz Kylheku
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874kcr7vt7.fsf@kitej \
--to=glv@posteo.net \
--cc=49517@debbugs.gnu.org \
--cc=kaz@kylheku.com \
--cc=paul@apatience.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).