From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6Er8FqD182C/uQAAgWs5BA (envelope-from ) for ; Sun, 18 Jul 2021 11:34:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WMnuEqD182DpJAAAB5/wlQ (envelope-from ) for ; Sun, 18 Jul 2021 09:34:24 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 06B391FA9C for ; Sun, 18 Jul 2021 11:34:23 +0200 (CEST) Received: from localhost ([::1]:50832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m53Bm-0007b6-UK for larch@yhetil.org; Sun, 18 Jul 2021 05:34:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4xik-0005pz-6z for guix-patches@gnu.org; Sat, 17 Jul 2021 23:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m4xij-00081n-Vc for guix-patches@gnu.org; Sat, 17 Jul 2021 23:44:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m4xij-0002T7-Sq for guix-patches@gnu.org; Sat, 17 Jul 2021 23:44:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49517] [PATCH] gnu: txr: Build documentation and update to 265. Resent-From: Kaz Kylheku Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Jul 2021 03:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49517 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Guillaume Le Vaillant Cc: "Paul A. Patience" , 49517@debbugs.gnu.org Received: via spool by 49517-submit@debbugs.gnu.org id=B49517.16265798259451 (code B ref 49517); Sun, 18 Jul 2021 03:44:01 +0000 Received: (at 49517) by debbugs.gnu.org; 18 Jul 2021 03:43:45 +0000 Received: from localhost ([127.0.0.1]:54984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4xiT-0002SM-6t for submit@debbugs.gnu.org; Sat, 17 Jul 2021 23:43:45 -0400 Received: from omta001.cacentral1.a.cloudfilter.net ([3.97.99.32]:41851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4xiR-0002S9-Rg for 49517@debbugs.gnu.org; Sat, 17 Jul 2021 23:43:44 -0400 Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id 4bNcmJl7XFRDp4xiMmGOus; Sun, 18 Jul 2021 03:43:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=shaw.ca; s=s20180605; t=1626579818; bh=LKJWxfs/H2++pASrGYSsOFwMjVSNP7wgUWtRQdsJqo4=; h=To:Subject:Date:From:Cc:In-Reply-To:References; b=AovkgPwnslD0/kAXsOCiwk+GwRrK5ZXZjlYJlDGCwN6k2+Z8VokMcUI7FDN7NZ9Qr 0jyVfKlrtxfjyjm1rjJCbg+vSHIp42fR/S+lPsOvJMwm4JbHwjjN694acIbYQylM4t PGyQA02eYD2Zbb47rOXwKDSaaudkQntCeAl8ciAet7hGDy4BAj9ki3+BCMQ/cE48jH jiE/VH2npoxDpzSQ5wCV7KiAhe/AGY4HN2H/sxYHtoFCRdxQZkQW3KYgPDAhWqOia0 zh9RiKWgtWfxpmnkO8h1M33OcRRt03pNnXunxNQ18EmedA5ug886p805cLOUsxZbjw eXtt+QKnpKJ0A== Received: from kylheku.com ([70.79.163.252]) by cmsmtp with ESMTPA id 4xiKmqAIC3DJA4xiLm7A2G; Sun, 18 Jul 2021 03:43:38 +0000 X-Authority-Analysis: v=2.4 cv=FMjee8ks c=1 sm=1 tr=0 ts=60f3a36a a=95A0EdhkF1LMGt25d7h1IQ==:117 a=95A0EdhkF1LMGt25d7h1IQ==:17 a=IkcTkHD0fZMA:10 a=SMorJkV_YP8A:10 a=e_q4qTt1xDgA:10 a=2KUf1mbJAAAA:8 a=KEWag6eFhvh9P8iV3C0A:9 a=QEXdDO2ut3YA:10 a=LME9DoRMzU6P72L8X6EC:22 Received: from www-data by kylheku.com with local (Exim 4.72) (envelope-from ) id 1m4xiK-0005sj-L3; Sat, 17 Jul 2021 20:43:36 -0700 X-PHP-Originating-Script: 501:rcmail.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Date: Sat, 17 Jul 2021 20:43:36 -0700 From: Kaz Kylheku In-Reply-To: <3ae1061ea0a61b579c48f9ea7b4f4832@mail.kylheku.com> References: <87o8b1p8k1.fsf@kitej> <3ae1061ea0a61b579c48f9ea7b4f4832@mail.kylheku.com> Message-ID: <96d55c0d8940c64eca79aa4a15a3cb8f@mail.kylheku.com> X-Sender: kaz@kylheku.com User-Agent: Roundcube Webmail/0.9.2 X-CMAE-Envelope: MS4xfJFL9pm1YakDgUSU0hxsrdhPCy+p41xKOBgKOCuREWIyvED8Y0KWLYCDBYq1i+XVLKMXB7trekBDutVoWNXrnh6NEunhsA7f0axD2ZN6+RgPeehX08ri N0px2aC8BjRRYus+wJy9TJ+E2XOz2z43dj+uqTGkMDUnD7kioOKdodNGHafZtQKnyXI1cZgBe3rNcDHNbMdY/HNdqBgsZV46hb2ChP/3+5FpCeK8xxVwCm66 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 18 Jul 2021 05:34:14 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626600864; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=M6RTo+6MqD4O63FOB6ct3clsqDmUPd0SY5NKAVWssv4=; b=Qgl7coF+Exm5MDySJrF0gHj8B0UDhF6Ox7CqH/1NYEJquRnVpcqTGQFIS3PKiTiTBAjhXh MwQMAlXr2Q01L3XbeKIGYqncK+2h9gJAAsK6wV9kKb6Fw2ybHJBQUmjn2E+g5+O8fOGOl4 1d2DAS91ObgxmmxQRNs4Bnys0vLxMArfM1Q3WYGKFvZJSmbJQV1wdKV8oR6enbJqJkiw8Q iA+8yPMdfzohe6ztYLVbw1zpq2cJDQ95cFk8528ObdtafGR1cWqTFWroXitQrcz5iqaQ4+ tCae9aoRjs4zgTDP4KggqzEvP5XEXtsS4qCZNp7ZD9w9jfZe++OvEKdhd+fvVQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626600864; a=rsa-sha256; cv=none; b=M4C0N2vFUlK3z4OLB6Q8DskhTpVWndbHxGk1zZhKPpB74eciRBWWcEl2hBvj55gteTX9N+ pwe0FujKNiP6KmmRUsrVWrFqKbbP7z/DBwx4qYMjVOrfN+Qcuj0wUkJgu5tcefe6aQU0z6 bVNm5+s17gXj8UnEfWHzdi3f7FQDdxax5SLVwuvcao5uX7rLEW2JgPannh+/9gVkt6LOL6 Iupg5VHbAZ0TFMeuF6hjdbAXzk6ZJ5Ahc2Rr0u1AdSdAOkaCZSZuwDYOEwcW4RF4JZG7Yz OzSHnp7DDuvvUw0Ok1U0QHUY8aaqyH316TUTYQNV4ttIsfQY7X/od5HIrIYSaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=shaw.ca header.s=s20180605 header.b=AovkgPwn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=kylheku.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=shaw.ca header.s=s20180605 header.b=AovkgPwn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=kylheku.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 06B391FA9C X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: pm+z6/Y9EaV/ On 2021-07-17 15:51, Kaz Kylheku wrote: > On 2021-07-17 02:57, Guillaume Le Vaillant wrote: >> Hi, >>=20 >> 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). >>=20 >> Could you take a look at that and see if there's a way to make it >> reproducible? >> Thanks. >=20 > Hi Guillaume, >=20 > Thank you for your report. I don't see anything in the pdfroff=20 > 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 <>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. Here is what I am going with: commit 8fbf3f55446427c06248ce222a05fd09d77ac878 (HEAD -> master) Author: Kaz Kylheku Date: Sat Jul 17 19:11:20 2021 -0700 doc: reproducible PDF. * Makefile (txr-manpage.pdf): If SOURCE_DATE_EPOCH exists, then run pdf-clobber-stamps.tl. * pdf-clobber-stamps.tl: New file. diff --git a/Makefile b/Makefile index 0094985f..cac9b3c0 100644 --- a/Makefile +++ b/Makefile @@ -560,6 +560,7 @@ txr-manpage.html: txr.1 genman.txr txr-manpage.pdf: txr.1 checkman.txr $(TXR) checkman.txr $< tbl $< | pdfroff -ww -man --no-toc - > $@ + [ $$SOURCE_DATE_EPOCH ] && $(TXR) pdf-clobber-stamps.tl || true # # Special targets used by ./configure diff --git a/pdf-clobber-stamps.tl b/pdf-clobber-stamps.tl new file mode 100644 index 00000000..0e56a44d --- /dev/null +++ b/pdf-clobber-stamps.tl @@ -0,0 +1,19 @@ +(let* ((epoch (or (tointz (getenv "SOURCE_DATE_EPOCH")) 0)) + (isotime (time-string-utc epoch "%FT%T+00:00")) + (pdf (file-get-string "txr-manpage.pdf")) + (start (search-str pdf "....-..-..T..:..:..-..:../ + `Date>@isotime`)) + (assert (eql (len xml) orig-len)) + (set [pdf start..end] xml) + (file-put-string "txr-manpage.pdf.temp" pdf) + (rename-path "txr-manpage.pdf.temp" "txr-manpage.pdf"))