all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: Timothy Sample <samplet@ngyro.com>
Cc: 43442@debbugs.gnu.org, zimoun <zimon.toutoune@gmail.com>
Subject: [bug#43442] Subversion keyword substitution
Date: Fri, 24 Mar 2023 18:22:06 +0100	[thread overview]
Message-ID: <871qle6p4x.fsf_-_@inria.fr> (raw)
In-Reply-To: <87jzz8xva8.fsf@ngyro.com> (Timothy Sample's message of "Wed, 22 Mar 2023 16:42:39 -0600")

[-- Attachment #1: Type: text/plain, Size: 3063 bytes --]

Hi Timothy,

Timothy Sample <samplet@ngyro.com> 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’.


[-- Attachment #2: Type: text/x-patch, Size: 1132 bytes --]

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 <ludo@gnu.org>
+;;; Copyright © 2014, 2020, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
 ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
@@ -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))

  reply	other threads:[~2023-03-24 22:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  8:14 [bug#43442] [PATCH] Fixes init of #42162: gforge.inria.fr down Dec. 2020 zimoun
2020-09-16  8:16 ` [bug#43442] [PATCH 1/2] gnu: mpfi: Replace 'url-fetch' by 'svn-fetch' zimoun
2020-09-16  8:16   ` [bug#43442] [PATCH 2/2] gnu: gmp-ecm: " zimoun
2020-09-21 21:19   ` [bug#43442] [PATCH 1/2] gnu: mpfi: " Ludovic Courtès
2020-09-21 21:51     ` zimoun
2020-09-23 16:21       ` Ludovic Courtès
2020-09-23 17:07         ` zimoun
2020-09-25  8:56           ` Ludovic Courtès
2020-10-01 20:26             ` zimoun
2020-10-01 21:01               ` zimoun
2020-10-03  8:59               ` Ludovic Courtès
2023-03-20 14:09                 ` [bug#43442] [PATCH] Fixes init of #42162: gforge.inria.fr down Dec. 2020 Ludovic Courtès
2023-03-22 22:42                   ` Timothy Sample
2023-03-24 17:22                     ` Ludovic Courtès [this message]
2023-03-24 23:31                       ` [bug#43442] Subversion keyword substitution Timothy Sample
2023-03-27  9:04                         ` Ludovic Courtès
2023-04-03 12:05                           ` Simon Tournier
2023-04-04 17:16                           ` Timothy Sample
2023-04-07 16:45                         ` Ludovic Courtès
2023-04-03 13:34                   ` [bug#43442] [PATCH] Fixes init of #42162: gforge.inria.fr down Dec. 2020 Simon Tournier
2024-03-09 22:34                   ` bug#43442: Code stored with Subversion (SVN) cannot be retrieved from SWH Ludovic Courtès
2020-09-17  8:14 ` [bug#43442] [PATCH] Fixes init of #42162: gforge.inria.fr down Dec. 2020 Ludovic Courtès

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qle6p4x.fsf_-_@inria.fr \
    --to=ludovic.courtes@inria.fr \
    --cc=43442@debbugs.gnu.org \
    --cc=samplet@ngyro.com \
    --cc=zimon.toutoune@gmail.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.