From patchwork Sun Jul 18 12:59:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 31485 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9200B27BC78; Sun, 18 Jul 2021 14:01:03 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9E79B27BC6B for ; Sun, 18 Jul 2021 14:01:02 +0100 (BST) Received: from localhost ([::1]:56838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m56Pl-0007ng-My for patchwork@mira.cbaines.net; Sun, 18 Jul 2021 09:01:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m56Op-0007g4-It for guix-patches@gnu.org; Sun, 18 Jul 2021 09:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m56Oo-0007uz-Lm for guix-patches@gnu.org; Sun, 18 Jul 2021 09:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m56Oo-00087W-Iz for guix-patches@gnu.org; Sun, 18 Jul 2021 09:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49517] [PATCH] gnu: txr: Build documentation and update to 265. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Jul 2021 13:00:02 +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: Kaz Kylheku , 49517@debbugs.gnu.org Received: via spool by 49517-submit@debbugs.gnu.org id=B49517.162661319331168 (code B ref 49517); Sun, 18 Jul 2021 13:00:02 +0000 Received: (at 49517) by debbugs.gnu.org; 18 Jul 2021 12:59:53 +0000 Received: from localhost ([127.0.0.1]:55404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m56OU-00086S-Df for submit@debbugs.gnu.org; Sun, 18 Jul 2021 08:59:53 -0400 Received: from mail1.protonmail.ch ([185.70.40.18]:41489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m56OQ-00086C-DD for 49517@debbugs.gnu.org; Sun, 18 Jul 2021 08:59:41 -0400 Date: Sun, 18 Jul 2021 12:59:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail3; t=1626613170; bh=ybvJB5s24mAGzLd3B6yZ/lOBMxoXKWYYpdVl/ABcy2E=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=Tqpp4VRtX7gV2MQw+dCldt90XDVtikKWvD1OX7vVPNgbyDzbUWN5Z0Dhqcx6VIIY9 OTxoSSHP/AiLdeA5pTOlE5BGNdOW1jQO0YVgqgDIJfJIIxvaDfuM/as8AIlz6uK24P F2F5CGv+aNoycew4ugLqf00lITgykq3QVsuOxtdaeXCXCy1st9jrM9TsaPRYfKsdlq ce9HlwJ9BxDIaT/ZJG9RPeDKUXUF41lFkjbF3FYVaWwySDGxzBB5blH19sbYYDFQT7 WieQpJQs6zOdNHJAw+kCowverBY4LappGIDidQr+K85GXjMMR7FTm+/v3iVBfPkO4k QUsgDSZlu8NAQ== From: "Paul A. Patience" Message-ID: In-Reply-To: <874kcr7vt7.fsf@kitej> References: <87o8b1p8k1.fsf@kitej> <3ae1061ea0a61b579c48f9ea7b4f4832@mail.kylheku.com> <96d55c0d8940c64eca79aa4a15a3cb8f@mail.kylheku.com> <874kcr7vt7.fsf@kitej> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: "Paul A. Patience" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Guillaume, On Sunday, July 18th, 2021 at 06:36, Guillaume Le Vaillant wrote: > Hi Kaz, > > I tried your patch and it doesn't fix all the timestamps in the > environment used to build Guix packages: I had sent an email last night but accidentally only to Kaz. Here it is below: On Saturday, July 17th, 2021 at 18:51, Kaz Kylheku wrote: > On 2021-07-17 02:57, Guillaume Le Vaillant wrote: >> 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). I've updated the first patch to fix this by setting GS_GENERATE_UUIDS to 0, which seems to be the standard Guix way to patch groff's use of Ghostscript. It removes most of the date (i.e., the hours, minutes and seconds) and the UUID, but leaves the year, month and day: $ xxd /gnu/store/h94iilsa2xsp2ymn3k9x3ckmvfjha731-txr-266/share/doc/txr-266/txr-manpage.pdf | grep -C 1 Date 00231430: 702f 312e 302f 273e 3c78 6d70 3a4d 6f64 p/1.0/'>2021-07- 00231450: 3138 3c2f 786d 703a 4d6f 6469 6679 4461 182021-07-18. 00231490: 3c78 6d70 3a43 7265 6174 6f72 546f 6f6c Thank you for your report. I don't see anything in the pdfroff > documentation about getting rid of this. The problem is in fact with Ghostscript [1]. Ghostscript is the program adding the metadata. > 2. Is there some recommended practice with regard to some > ./configure option or environment/make variable to react to > for ensuring reproducible builds? So that is to say, suppose > I don't wish to do the above embedded XML cleaning, except > when building for a distro that strives for reproducibility. > > For opting in to reproducibilty, should I again rely on > SOURCE_DATE_EPOCH and have the build react to it? I think the goal of SOURCE_DATE_EPOCH is for projects such as TXR to need do nothing, and rather have Guix arrange for the "builder" applications (i.e., Ghostscript here) to produce reproducible outputs. In this case with GS_GENERATE_UUIDS=0. So I don't think TXR need change anything. Since I had to make a change in one of the patches, I have added a third patch (squeezed in between the other two) adjusting the installation of the license files. The three patches are attached. (Kaz, if there's anything TXR should change, perhaps it is the target directory of the license files, i.e., $(datadir) -> $(docdir). I think it's more common in general to install license files into /usr/share/doc/APP rather than /usr/share/APP -- at least, that's where Guix installs them. This would render the second attached patch unnecessary.) Best regards, Paul [1]: https://bugs.ghostscript.com/show_bug.cgi?id=696765 From dfd4147f5992b561ac1a72bbc32c738724c855f9 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Tue, 13 Jul 2021 19:38:12 -0400 Subject: [PATCH 3/3] gnu: txr: Update to 266. * gnu/packages/lisp.scm (txr)[version]: Update to 266. [arguments]<#:phases>{inhibit-doc-syms-generation}: Correct the path to doc-syms.tl to its new location. {fix-tests}: Fix another test. {disable-failing-tests}: New phase. --- gnu/packages/lisp.scm | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 6a1cc4dcfd..6ec59f5231 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -906,7 +906,7 @@ the HTML documentation of TXR.") (define-public txr (package (name "txr") - (version "263") + (version "266") (source (origin (method git-fetch) @@ -915,7 +915,7 @@ the HTML documentation of TXR.") (commit (string-append "txr-" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "14zaziymnbr2ld79x4h7sf88bzzzj82w3xpavmcx7mhwannb2swh")))) + (base32 "1k9mj3zaxdsylgnb8g6cq0cmp6420x7fp3nnsqdmds4gh8ib95wn")))) (build-system gnu-build-system) (native-inputs ;; Required to build the documentation. @@ -947,7 +947,7 @@ the HTML documentation of TXR.") ;; stdlib/doc-syms.tl, which is anyway kept up to date with ;; each release (and is already compiled to stdlib/doc-syms.tlo ;; when genman.txr is run). - (("^@\\(output \"share/txr/stdlib/doc-syms\\.tl\"\\).*" line) + (("^@\\(output \"stdlib/doc-syms\\.tl\"\\).*" line) (string-append "@(do (exit))\n" line))) #t)) (add-after 'unpack 'fix-tests @@ -955,6 +955,22 @@ the HTML documentation of TXR.") (substitute* (list "tests/017/realpath.tl" "tests/017/realpath.expected") (("/usr/bin") "/")) + (substitute* "tests/018/path-test.tl" + (("/bin") (dirname (which "sh")))) + #t)) + (add-after 'unpack 'disable-failing-tests + (lambda _ + (for-each delete-file + ;; These tests fail because they call external commands + ;; (like ls and cat) that don't run because the forked + ;; child processes' execvp calls cannot find the + ;; hardcoded /bin/sh. + ;; (The tests pass when run manually in the directory + ;; left by --keep-failed.) + (map (lambda (f) (string-append "tests/" f)) + '("002/query-1.txr" + "010/json.tl" + "018/process.tl"))) #t)) (replace 'configure ;; ./configure is a hand-written script that can't handle standard -- 2.32.0