From patchwork Fri Mar 24 17:22:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 11637 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 E324B16FF8; Fri, 24 Mar 2023 22:04:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CBEA816D87 for ; Fri, 24 Mar 2023 22:04:07 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfpTb-0004MC-G5; Fri, 24 Mar 2023 18:01:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfpTF-00045j-TL for guix-patches@gnu.org; Fri, 24 Mar 2023 18:01:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pfpTF-0000eY-Jx for guix-patches@gnu.org; Fri, 24 Mar 2023 18:01:13 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pfl81-0007yS-TG for guix-patches@gnu.org; Fri, 24 Mar 2023 13:23:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43442] Subversion keyword substitution Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Mar 2023 17:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43442 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Timothy Sample Cc: 43442@debbugs.gnu.org, zimoun Received: via spool by 43442-submit@debbugs.gnu.org id=B43442.167967853630597 (code B ref 43442); Fri, 24 Mar 2023 17:23:01 +0000 Received: (at 43442) by debbugs.gnu.org; 24 Mar 2023 17:22:16 +0000 Received: from localhost ([127.0.0.1]:41287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfl7I-0007xQ-C6 for submit@debbugs.gnu.org; Fri, 24 Mar 2023 13:22:16 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:34155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfl7F-0007xB-DB for 43442@debbugs.gnu.org; Fri, 24 Mar 2023 13:22:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=iWXEd8VieoJ9zk9Eu/YpB3f8L6uCAVkSevnY5OpXjT8=; b=B/Y6xj5Q+w4CY4IRuinAC3mP0zr6txcTwys0SU4FmUT/Gz6U3dqpYZZC +LloHzvQ0CXQI8A5OBWVKQyq6eCEDeHatjcq0QY7/NW6KN11CwVOcL3ZZ ZMWqio5c2qWt4ZENsCtjXA0goBd8SYq/7SkmRrW3HdUx/c/n8HP5TnI1d M=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludovic.courtes@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.98,288,1673910000"; d="scan'208";a="51181893" Received: from unknown (HELO ribbon) ([193.50.110.81]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2023 18:22:08 +0100 From: Ludovic =?utf-8?q?Court=C3=A8s?= References: <20200916081411.5801-1-zimon.toutoune@gmail.com> <20200916081642.6716-1-zimon.toutoune@gmail.com> <87o8lyj090.fsf@gnu.org> <86zh5iol1n.fsf@gmail.com> <87h7rocvkt.fsf@gnu.org> <877dsi44lu.fsf@gnu.org> <87y2knhei3.fsf@gnu.org> <87jzzbms54.fsf_-_@gnu.org> <87jzz8xva8.fsf@ngyro.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 4 Germinal an 231 de la =?utf-8?q?R=C3=A9volu?= =?utf-8?q?tion=2C_?= jour de la Tulipe X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 24 Mar 2023 18:22:06 +0100 In-Reply-To: <87jzz8xva8.fsf@ngyro.com> (Timothy Sample's message of "Wed, 22 Mar 2023 16:42:39 -0600") Message-ID: <871qle6p4x.fsf_-_@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi Timothy, Timothy Sample skribis: > I was starting with doing a simple check for the “easy” Subversion > repositories. That is, no externals (‘recursive?’) and no > ‘svn-multi-fetch’ [1]. I immediately hit a problem. Guix hashes the > export of the repository with the keywords processed, while SWH hashes > it with unprocessed keywords. Ouch. I had forgotten keywords were also a thing in Subversion. :-/ Can we tell Subversion to not expand them? That could be the way forward in Guix, though it won’t help for past revisions. How frequent is the use of keywords though? I tried the patch below to turn off keyword substitution, and then ran guix build -S --check -v1 --keep-going for the 407 packages identified by: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (define svn (fold-packages (lambda (p lst) (if (and (not (hidden-package? p)) (not (package-superseded p)) (origin? (package-source p)) (memq (origin-method (package-source p)) (list svn-fetch svn-multi-fetch))) (cons p lst) lst)) '())) scheme@(guile-user)> (length svn) $8 = 407 --8<---------------cut here---------------end--------------->8--- That led to: --8<---------------cut here---------------start------------->8--- guix build: error: build of `/gnu/store/2byn59zmdbc4bz2wknnv0df4n67bdvgr-texlive-pdftex-59745-checkout.drv', `/gnu/store/2gj88z4plmwhraghxj5626zpiir1ck6k-libsmpeg-0.4.5-401-checkout.drv', `/gnu/store/2zygylsb2b333rzrvjyrh4qybw799hl3-ghmm-0.9-rc3-0.2341-checkout.drv', `/gnu/store/4a81qlka5w73rprapzi1w63xzb01n0r8-java-geronimo-xbean-reflect-4.5.drv', `/gnu/store/4mabgwil0ygwm3bkka3nzfbrwg1kk0wz-texlive-kpathsea-59745-checkout.drv', `/gnu/store/5ivk83abj22bs9ka10dk1v67kyczcd80-texlive-dvips-59745-checkout.drv', `/gnu/store/6zhnahylfr1zmpwzb8qzh8qp3yf9yl1p-texlive-tex-plain-59745-checkout.drv', `/gnu/store/f1sjmghs0f4v0y2pnljqaplifq52qbn2-texlive-cm-59745-checkout.drv', `/gnu/store/kd7kahaq71gi8j6zbabr0njqw60sjjxc-libsmpeg-0.4.5-399-checkout.drv', `/gnu/store/q3kip5bxkkdh14kx81afakbmpy7l4lr4-texlive-latexconfig-59745-checkout.drv', `/gnu/store/qskxc2c30fdclmrjp7nk35n1q2sl6sp8-texlive-tetex-59745-checkout.drv', `/gnu/store/wibsxy4kxlpq8lr76wvwgdyc2x5farr4-texlive-hyphen-base-59745-checkout.drv' failed --8<---------------cut here---------------end--------------->8--- That’s 11 failures out of 407. So, how about applying the ‘--ignore-keywords’ change and updating hashes accordingly? > [1] More precisely, I was going to process recursive ‘svn-fetch’ origins > because a lot of them are needlessly marked as recursive. In some > (many?) cases, the repositories don’t actually have external references, > so the flag does nothing. I was only going to skip the ones where it > makes a difference. We should remove that recursive flag when it has no effect. Perhaps we could proceed similarly? Thanks, Ludo’. diff --git a/guix/build/svn.scm b/guix/build/svn.scm index 2d960cb364..863c48e46d 100644 --- a/guix/build/svn.scm +++ b/guix/build/svn.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2020 Ludovic Courtès +;;; Copyright © 2014, 2020, 2023 Ludovic Courtès ;;; Copyright © 2014 Sree Harsha Totakura ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2020 Simon Tournier @@ -47,6 +47,11 @@ (define* (svn-fetch url revision directory ;; verify the checksum later. This can be removed when ;; ca-certificates package is added. "--trust-server-cert" "-r" (number->string revision) + + ;; Disable keyword substitution (keywords are CVS-like strings + ;; like "$Date$", "$Id$", and so on). + "--ignore-keywords" + `(,@(if (and user-name password) (list (string-append "--username=" user-name) (string-append "--password=" password))