From unknown Sun Jun 22 04:36:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71371] [PATCH] gnu: svn-fetch: Make revision field optional. Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, pelzflorian@pelzflorian.de, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, matt@excalamus.com, maxim.cournoyer@gmail.com, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Wed, 05 Jun 2024 05:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71371@debbugs.gnu.org Cc: Nicolas Goaziou , Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Matthew Trzcinski , Maxim Cournoyer , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Matthew Trzcinski , Maxim Cournoyer , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.17175667718334 (code B ref -1); Wed, 05 Jun 2024 05:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jun 2024 05:52:51 +0000 Received: from localhost ([127.0.0.1]:58573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEjZr-0002AL-AL for submit@debbugs.gnu.org; Wed, 05 Jun 2024 01:52:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:40046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEjZn-0002A5-TS for submit@debbugs.gnu.org; Wed, 05 Jun 2024 01:52:49 -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 1sEjZZ-0003ii-LY for guix-patches@gnu.org; Wed, 05 Jun 2024 01:52:33 -0400 Received: from msg-1.mailo.com ([213.182.54.11] helo=mailo.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEjZX-0004b8-Dv for guix-patches@gnu.org; Wed, 05 Jun 2024 01:52:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nicolasgoaziou.fr; s=mailo; t=1717566747; bh=KuoJxxBqX1Xvce3JemmKqmMt9FKSVPUDJL5mDew5fSY=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; b=sYgmN2HBDProExN5HDvK7fg1KOK2pm0A3w634iBoBqgSEziit1+AQ5udAEStRIR+w YuZ6dswcW6XDo0QAQSPaudjHtRM9eKNiaNSHgXnCJmFCGzM7Fh4rSvk+F9zyymI41U UIk2flfhJSKNCJhSS56R0xCMKg5gixqOsHFjnjzU= Received: by b221-1.in.mailobj.net [192.168.90.21] with ESMTP via ip-20.mailobj.net [213.182.54.20] Wed, 5 Jun 2024 07:52:26 +0200 (CEST) X-EA-Auth: 8wT/0CcWeRMyblq3WYYowBh2gcPb+BpY5TAAI6ij2XS5hxYMFp66wFOpDOuywya/8d5ZvS45XtsoPeQ0gbOayZCMgvxydgl2ZEtNrmLT6Go= From: Nicolas Goaziou Date: Wed, 5 Jun 2024 07:52:02 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=213.182.54.11; envelope-from=mail@nicolasgoaziou.fr; helo=mailo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) * guix/svn-download.scm (): Set default value for REVISION field to #F. (svn-fetch): (svn-multi-fetch): Take into consideration the revision can be a number or #F. * guix/build/svn.scm (svn-fetch): Skip "-r" argument when revision is #F. * doc/guix.texi (origin Reference): Document changes about REVISION field. Change-Id: Idb0eeb7ca4121db3caf789a9658ac79b321439d4 --- doc/guix.texi | 5 +++-- guix/build/svn.scm | 6 ++++-- guix/svn-download.scm | 16 ++++++++++------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9b60e6c603..5e1173b8c6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8263,8 +8263,9 @@ origin Reference @item @code{url} The URL of the Subversion repository to clone. -@item @code{revision} -This string denotes revision to fetch specified as a number. +@item @code{revision} (default: @code{#f}) +This field denotes the revision to fetch, as a number. It can also be +set to @code{#f}, for example when @var{url} contains a tag reference. @item @code{recursive?} (default: @code{#f}) This Boolean indicates whether to recursively fetch Subversion diff --git a/guix/build/svn.scm b/guix/build/svn.scm index 875d3c50ca..3ae6519628 100644 --- a/guix/build/svn.scm +++ b/guix/build/svn.scm @@ -46,8 +46,7 @@ (define* (svn-fetch url revision directory ;; Trust the server certificate. This is OK as we ;; verify the checksum later. This can be removed when ;; ca-certificates package is added. - "--trust-server-cert" "-r" (number->string revision) - + "--trust-server-cert" ;; Disable keyword substitutions (keywords are CVS-like strings ;; like "$Date$", "$Id$", and so on) for two reasons: (1) some ;; expansions depend on the local time zone, and (2) SWH disables @@ -61,6 +60,9 @@ (define* (svn-fetch url revision directory ,@(if recursive? '() (list "--ignore-externals")) + ,@(if revision + (list "-r" (number->string revision)) + '()) ,url ,directory)) #t)) diff --git a/guix/svn-download.scm b/guix/svn-download.scm index bdd9c39eb5..dc9856cfb1 100644 --- a/guix/svn-download.scm +++ b/guix/svn-download.scm @@ -63,7 +63,7 @@ (define-record-type* svn-reference make-svn-reference svn-reference? (url svn-reference-url) ; string - (revision svn-reference-revision) ; number + (revision svn-reference-revision (default #f)) ; number or #f (recursive? svn-reference-recursive? (default #f)) (user-name svn-reference-user-name (default #f)) (password svn-reference-password (default #f))) @@ -120,7 +120,9 @@ (define* (svn-fetch ref hash-algo hash (or (and (download-method-enabled? 'upstream) (svn-fetch (getenv "svn url") - (string->number (getenv "svn revision")) + (match (getenv "svn revision") + ("#f" #f) + (s (string->number s))) #$output #:svn-command #+(file-append svn "/bin/svn") #:recursive? (match (getenv "svn recursive?") @@ -145,7 +147,7 @@ (define* (svn-fetch ref hash-algo hash #:env-vars `(("svn url" . ,(svn-reference-url ref)) ("svn revision" - . ,(number->string (svn-reference-revision ref))) + . ,(object->string (svn-reference-revision ref))) ,@(if (svn-reference-recursive? ref) `(("svn recursive?" . "yes")) '()) @@ -173,7 +175,7 @@ (define-record-type* svn-multi-reference make-svn-multi-reference svn-multi-reference? (url svn-multi-reference-url) ; string - (revision svn-multi-reference-revision) ; number + (revision svn-multi-reference-revision) ; number or #f (locations svn-multi-reference-locations) ; list of strings (recursive? svn-multi-reference-recursive? (default #f)) (user-name svn-multi-reference-user-name (default #f)) @@ -233,7 +235,9 @@ (define* (svn-multi-fetch ref hash-algo hash (mkdir-p (string-append #$output "/" (dirname location)))) (and (download-method-enabled? 'upstream) (svn-fetch (string-append (getenv "svn url") "/" location) - (string->number (getenv "svn revision")) + (match (getenv "svn revision") + ("#f" #f) + (s (string-to-number s))) (if (string-suffix? "/" location) (string-append #$output "/" location) (string-append #$output "/" (dirname location))) @@ -271,7 +275,7 @@ (define* (svn-multi-fetch ref hash-algo hash ("svn locations" . ,(object->string (svn-multi-reference-locations ref))) ("svn revision" - . ,(number->string (svn-multi-reference-revision ref))) + . ,(object->string (svn-multi-reference-revision ref))) ,@(if (svn-multi-reference-recursive? ref) `(("svn recursive?" . "yes")) '()) base-commit: bf202e8bdd10dbd01da391ef635d1a31197251c1 -- 2.41.0 From unknown Sun Jun 22 04:36:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71371] [PATCH] gnu: svn-fetch: Make revision field optional. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Jun 2024 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou Cc: 71371@debbugs.gnu.org, Josselin Poiret , Maxim Cournoyer , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Florian Pelz , Ricardo Wurmus , Christopher Baines , Matthew Trzcinski Received: via spool by 71371-submit@debbugs.gnu.org id=B71371.171760378921546 (code B ref 71371); Wed, 05 Jun 2024 16:10:02 +0000 Received: (at 71371) by debbugs.gnu.org; 5 Jun 2024 16:09:49 +0000 Received: from localhost ([127.0.0.1]:45554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEtCv-0005bS-Af for submit@debbugs.gnu.org; Wed, 05 Jun 2024 12:09:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEtCt-0005b7-25 for 71371@debbugs.gnu.org; Wed, 05 Jun 2024 12:09:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEtCV-0001OH-P7; Wed, 05 Jun 2024 12:09:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=a7ayskx7kd8W+OfuK9KBaZEmlt+eu0hOkP0F3uOWc9E=; b=qkjYlyQcTIetgjpeTCdl jMzJjadtty6IGKdRPadLe4TF3YWEYIxxbMA8cy5XMXRMufSIOnsxG9xy8Of0GSEvKtgR8lddSCUkv Z6EOqYsRnKHDYX5X1GyHid9wKupM6VcerwOr4gCxghlGpcH3LX3ISDtRLfQ8WRieslLXoiMy/bAnv EjyWO7pNIZjkCVlMmTgqaxT2OlJlOaFL8DqUkvU9owx1gkrf57tvaHvQZ1nrB+qWcu17D1+1jvusu xEABB78Q5Ti/PSm/jHhqWipLXQITn4kTDz8AgSQZTQ8LqPoWLj7kQVg6JuCCFwrHOH+Ucgd3zeVge fwy5fjonjnvVGw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Nicolas Goaziou's message of "Wed, 5 Jun 2024 07:52:02 +0200") References: Date: Wed, 05 Jun 2024 18:09:07 +0200 Message-ID: <874ja774nw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Hello! Nicolas Goaziou skribis: > -@item @code{revision} > -This string denotes revision to fetch specified as a number. > +@item @code{revision} (default: @code{#f}) > +This field denotes the revision to fetch, as a number. It can also be > +set to @code{#f}, for example when @var{url} contains a tag reference. Hmm, IIRC, tags in svn are mutable, no? My recollection is that there=E2=80=99s no distinction between a directory,= a branch, and a tag: tags and branches are just a copy (=E2=80=98svn cp=E2=80= =99) of a directory that can change over time. Thus, you can=E2=80=99t rely on a tag= as an unambiguous reference. Am I right? Thanks, Ludo=E2=80=99. From unknown Sun Jun 22 04:36:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71371] [PATCH] gnu: svn-fetch: Make revision field optional. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Jun 2024 16:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71371@debbugs.gnu.org Cc: Josselin Poiret , Maxim Cournoyer , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Florian Pelz , Ricardo Wurmus , Nicolas Goaziou , Christopher Baines , Matthew Trzcinski X-Debbugs-Original-To: Nicolas Goaziou via Guix-patches via , 71371@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171760521225818 (code B ref -1); Wed, 05 Jun 2024 16:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jun 2024 16:33:32 +0000 Received: from localhost ([127.0.0.1]:47177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEtZs-0006iL-2f for submit@debbugs.gnu.org; Wed, 05 Jun 2024 12:33:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:46322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEtZq-0006iB-Ec for submit@debbugs.gnu.org; Wed, 05 Jun 2024 12:33:31 -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 1sEtZc-0007O4-0K for guix-patches@gnu.org; Wed, 05 Jun 2024 12:33:16 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEtZa-0007ph-Du; Wed, 05 Jun 2024 12:33:15 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4214b2c5d40so6185e9.1; Wed, 05 Jun 2024 09:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717605192; x=1718209992; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eN+otJTdC+MWbfiHPgZIam+pjMFpliZ0TtmAtM9Zpts=; b=mjW3NqtyHZP2ZS0zLg6MHIrlzX/BtsolyFoAzlvIXHPfN975TKhWpW2pbA6hZA88ZM 6TRWIOOL5RynFBqaLYTdcnCQ+RKHvAbXqfc/AWU6ED7K8E7lrRqsfvSU05VC52XZrayA YahN5Ozzph8KsNSKLElT6VV9L4Bc4x9EMXo8HsvjCojQIn/RtutfNXcg+YuLodDupIyG mcTn1ZlD/7bC01ugdlaOBZGfZTfNsG0Zr+m5iXTXDS8fEiMZIcNOPMn9WWvItTKCIakG TCMqYqm6imfpiuLcQHlK6FJyw1XAT4NID/71reU97IzzukaQm3c1XWYVrzD/5bIvK1uC do4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717605192; x=1718209992; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eN+otJTdC+MWbfiHPgZIam+pjMFpliZ0TtmAtM9Zpts=; b=F/31SLq1AQ8wzsHhlZmLr+Chb2rQMqFUTKopFCVDj9N41g0T3/z2wQZNvlgpMOfMSZ UK3st1Yw7maD3h8OiyMDP/qlchDZCy63FU3AeEsuZLdafmZxyNDjMQWRwd9g2vcUeRAp ou3jI+DxJbRaE+OIOvkug8uNjrGCoVPz3WZ3AueEde+okzRQCZdb/HnyUgsOll5Qxvu0 z6uZ64tNIEpHak1jeLCgxLAog6tpuPkBod4Te1bQhcMoSioaG+j0l9ISHpBLL+Ul6iH7 emxMYOkF/N7bFjFJkl43Y2MhC0JCMhIFl/UVUzAYrVA79m9BSUO3MNWjeK4vsYLWnf5g A8Nw== X-Forwarded-Encrypted: i=1; AJvYcCXQCMWolPqAbeNoklfkHYW/Xz2dCUrLzFJ+Q3Jl+aqZOMMGA8DSWqvnhk4C8wJKPcjvTSGM59IjW/IhnqEtGsvvlYLbld+zlJH2PcpdYj8= X-Gm-Message-State: AOJu0YwkGx0bETGRtZqK9jAxIaVRvyAoxJZMo38gAkfk/sWrkW07LS0F JfGlaf2QBCk70sSZ36m82VgjQhSJj4Cap6re+1nzUKV2hMAbVx7e X-Google-Smtp-Source: AGHT+IGPAPLjSidrY/M67WqUqUXjHoolErG/vW54wlpRIxNfKql5DMIJ9yIGg1Q7TyX87ZRBVM11eA== X-Received: by 2002:a05:600c:3c93:b0:41b:e58c:e007 with SMTP id 5b1f17b1804b1-421563558d3mr22771025e9.4.1717605191568; Wed, 05 Jun 2024 09:33:11 -0700 (PDT) Received: from lili (roam-nat-fw-prg-194-254-61-45.net.univ-paris-diderot.fr. [194.254.61.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42158102a9csm28383935e9.14.2024.06.05.09.33.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 09:33:11 -0700 (PDT) From: Simon Tournier In-Reply-To: References: Date: Wed, 05 Jun 2024 18:32:57 +0200 Message-ID: <87frtrnydi.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Nicolas, On Wed, 05 Jun 2024 at 07:52, Nicolas Goaziou via Guix-patches via wrote: > * guix/svn-download.scm (): Set default value for REVISION > field to #F. > (svn-fetch): > (svn-multi-fetch [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.0 MANY_TO_CC Sent to 10+ recipients -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Hi Nicolas, On Wed, 05 Jun 2024 at 07:52, Nicolas Goaziou via Guix-patches via wrote: > * guix/svn-download.scm (): Set default value for REVISION > field to #F. > (svn-fetch): > (svn-multi-fetch): Take into consideration the revision can be a number o= r #F. > * guix/build/svn.scm (svn-fetch): Skip "-r" argument when revision is #F. > * doc/guix.texi (origin Reference): Document changes about REVISION field. Does it make sense to have a Subversion reference without any specific revision? > - (string->number (getenv "svn revision")) > + (match (getenv "svn revision") > + ("#f" #f) > + (s (string->number s))) [...] > - (string->number (getenv "svn revision= ")) > + (match (getenv "svn revision") > + ("#f" #f) > + (s (string-to-number s))) I am probably missing something, why =E2=80=99string-to-number=E2=80=99 and= not =E2=80=99string->number=E2=80=99? Cheers, simon From unknown Sun Jun 22 04:36:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71371] [PATCH] gnu: svn-fetch: Make revision field optional. Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Jun 2024 20:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 71371@debbugs.gnu.org, Josselin Poiret , Maxim Cournoyer , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Florian Pelz , Ricardo Wurmus , Christopher Baines , Matthew Trzcinski Received: via spool by 71371-submit@debbugs.gnu.org id=B71371.17176203024598 (code B ref 71371); Wed, 05 Jun 2024 20:45:02 +0000 Received: (at 71371) by debbugs.gnu.org; 5 Jun 2024 20:45:02 +0000 Received: from localhost ([127.0.0.1]:36353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sExVC-0001Bw-4J for submit@debbugs.gnu.org; Wed, 05 Jun 2024 16:45:01 -0400 Received: from msg-2.mailo.com ([213.182.54.12]:53646 helo=mailo.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sExV6-0001BS-Eg for 71371@debbugs.gnu.org; Wed, 05 Jun 2024 16:44:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nicolasgoaziou.fr; s=mailo; t=1717620265; bh=jpLE5ELJtsvxnhpiJT6lBLRcmknVf73y1U8GvWM8/nU=; h=X-EA-Auth:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; b=r/D3TV5Ui7xy48uyYx/Mbgm2F/wHGOjANTds7h5zyJk+Z5qQN9oYPmCtR/wp98hWq yexdsS2G5Q7cl6zzwE3JjqmSUO/ta7L124y3WyHxUho+WUueUffbUdDWWS8Xid4OYC 2f7BNnVymai/M5tqLOStRr/nC5o09r62d6FrXjpU= Received: by b221-1.in.mailobj.net [192.168.90.21] with ESMTP via ip-20.mailobj.net [213.182.54.20] Wed, 5 Jun 2024 22:44:25 +0200 (CEST) X-EA-Auth: nWK8BDlu/yWc8OHKfPU30zNMKzG7M2zNPwxHkRIMYKVkkxNIJKB7ECwbJUsUbB68FEQN0xa1hElGdzqRg+M0wM/FAYy3Ospt8LrXUb1rX24= From: Nicolas Goaziou In-Reply-To: <874ja774nw.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 05 Jun 2024 18:09:07 +0200") References: <874ja774nw.fsf@gnu.org> Date: Wed, 05 Jun 2024 22:44:08 +0200 Message-ID: <87o78fw25j.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 3.0 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, Ludovic =?UTF-8?Q?Court=C3=A8s?= writes: > Nicolas Goaziou skribis: > >> -@item @code{revision} >> -This string denotes revision to fetch specified as a number. >> +@item @code{revision} (default: @code{#f}) >> +This [...] Content analysis details: (3.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [213.182.54.12 listed in wl.mailspike.net] 3.0 MANY_TO_CC Sent to 10+ recipients -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, Ludovic =?UTF-8?Q?Court=C3=A8s?= writes: > Nicolas Goaziou skribis: > >> -@item @code{revision} >> -This string denotes revision to fetch specified as a number. >> +@item @code{revision} (default: @code{#f}) >> +This [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [213.182.54.12 listed in wl.mailspike.net] 3.0 MANY_TO_CC Sent to 10+ recipients -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hello, Ludovic Court=C3=A8s writes: > Nicolas Goaziou skribis: > >> -@item @code{revision} >> -This string denotes revision to fetch specified as a number. >> +@item @code{revision} (default: @code{#f}) >> +This field denotes the revision to fetch, as a number. It can also be >> +set to @code{#f}, for example when @var{url} contains a tag reference. > > Hmm, IIRC, tags in svn are mutable, no? Disclaimer: prior to this patch, I knew nothing about SVN. So feel free to take my answers with a grain of salt. Now to answer your question, yes, they are mutable. But in practice, altering tagged contents seems to be frowned upon in the trunk-branch-tag trilogy. > My recollection is that there=E2=80=99s no distinction between a director= y, a > branch, and a tag: tags and branches are just a copy (=E2=80=98svn cp=E2= =80=99) of a > directory that can change over time. Thus, you can=E2=80=99t rely on a t= ag as > an unambiguous reference. > > Am I right? You are certainly right, but I think this patch still makes sense for projects that swear to never change tagged contents, which could possibly be the case for most of the projects using SVN. Every now and then, we will encounter a project that does modify such contents, but it also currently happens with tarballs: sometimes, upstream modifies the contents of a tarball without changing its name, inducing a hash mismatch. My concern here is that some Guix packages relying on `svn-fetch' provide both a tag and a revision, which is redundant. We could get rid of the tag, but the revision is not human-friendly. Regards, --=20 Nicolas Goaziou From unknown Sun Jun 22 04:36:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71371] [PATCH v2] gnu: svn-fetch: Allow specifying revisions as strings. References: In-Reply-To: Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, pelzflorian@pelzflorian.de, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, matt@excalamus.com, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 18 Jun 2024 08:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71371@debbugs.gnu.org Cc: Nicolas Goaziou , Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Matthew Trzcinski , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Matthew Trzcinski , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 71371-submit@debbugs.gnu.org id=B71371.17186999424168 (code B ref 71371); Tue, 18 Jun 2024 08:40:02 +0000 Received: (at 71371) by debbugs.gnu.org; 18 Jun 2024 08:39:02 +0000 Received: from localhost ([127.0.0.1]:41639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJUMo-000150-8R for submit@debbugs.gnu.org; Tue, 18 Jun 2024 04:39:02 -0400 Received: from msg-4.mailo.com ([213.182.54.15]:38598 helo=mailo.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJUMm-00014c-JK for 71371@debbugs.gnu.org; Tue, 18 Jun 2024 04:39:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nicolasgoaziou.fr; s=mailo; t=1718699930; bh=4QMEG/qMiuD3QkGYOIxiqIt6eMlmYyQKAC+lnWwAlA0=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; b=Xfu6xcphGwaRMGo3tF0jEe7SEYZb+AszwP0MGKy1JLQT3BdlRV9+5Grpb1xXTU9YA 3/gpVKdGRKe5V4vGorI+hsYgYvEza4o9ZchS3h3ea59D4QfDXrsuEhLQE6aQzj2ruZ /L2F6Q9zkmEjrB5Svngs3NWJy1a6KVmdJxGhLGqw= Received: by b221-7.in.mailobj.net [192.168.90.27] with ESMTP via ip-20.mailobj.net [213.182.54.20] Tue, 18 Jun 2024 10:38:50 +0200 (CEST) X-EA-Auth: pwvtsl39DJMV5KbYbgUxD1RNUDIYKhkPlg3t8xIrpWwJEtV+diGlGVSD/+qwBw9H1yduXo/6H6yCR/pjzorqCyBACIJqm7blgObFH7DHC2c= From: Nicolas Goaziou Date: Tue, 18 Jun 2024 10:30:10 +0200 Message-ID: <4885bc5c95529991846db147ca58f7445d3cd864.1718699410.git.mail@nicolasgoaziou.fr> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/svn-download.scm (): (svn-fetch): (svn-multi-fetch): * guix/build/svn.scm (svn-fetch): Revision can also be a string, not only a number. * doc/guix.texi (origin Reference): Document changes about REVISION field. Change-Id: Ibb17b539575fdf3daf895bd1ce39a40dd9b495cb --- v2: No longer ignore "-r" argument. Instead, allow strings, such as "HEAD". Yes, in practice, it means this relies on the tag being stable, which is the same assumption as for, e.g., tarballs. WDYT? doc/guix.texi | 2 +- guix/build/svn.scm | 7 ++++++- guix/svn-download.scm | 20 ++++++++++++++------ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 0102fd0fad..0b30ed0a72 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8283,7 +8283,7 @@ origin Reference The URL of the Subversion repository to clone. @item @code{revision} -This string denotes revision to fetch specified as a number. +This string or number denotes revision to fetch. @item @code{recursive?} (default: @code{#f}) This Boolean indicates whether to recursively fetch Subversion diff --git a/guix/build/svn.scm b/guix/build/svn.scm index 875d3c50ca..58b74fd37a 100644 --- a/guix/build/svn.scm +++ b/guix/build/svn.scm @@ -46,7 +46,12 @@ (define* (svn-fetch url revision directory ;; Trust the server certificate. This is OK as we ;; verify the checksum later. This can be removed when ;; ca-certificates package is added. - "--trust-server-cert" "-r" (number->string revision) + "--trust-server-cert" + + ;; Revision. It can be a number or a string. + "-r" (if (number? revision) + (number->string revision) + revision) ;assume string ;; Disable keyword substitutions (keywords are CVS-like strings ;; like "$Date$", "$Id$", and so on) for two reasons: (1) some diff --git a/guix/svn-download.scm b/guix/svn-download.scm index 62649e4374..e21091defc 100644 --- a/guix/svn-download.scm +++ b/guix/svn-download.scm @@ -64,7 +64,7 @@ (define-record-type* svn-reference make-svn-reference svn-reference? (url svn-reference-url) ; string - (revision svn-reference-revision) ; number + (revision svn-reference-revision) ; number|string (recursive? svn-reference-recursive? (default #f)) (user-name svn-reference-user-name (default #f)) (password svn-reference-password (default #f))) @@ -113,7 +113,8 @@ (define (svn-fetch-builder svn hash-algo) (or (and (download-method-enabled? 'upstream) (svn-fetch (getenv "svn url") - (string->number (getenv "svn revision")) + (let ((r (getenv "svn revision"))) + (or (string->number r) r)) #$output #:svn-command #+(file-append svn "/bin/svn") #:recursive? (match (getenv "svn recursive?") @@ -152,7 +153,10 @@ (define* (svn-fetch ref hash-algo hash #:env-vars `(("svn url" . ,(svn-reference-url ref)) ("svn revision" - . ,(number->string (svn-reference-revision ref))) + . ,(let ((revision (svn-reference-revision ref))) + (if (number? revision) + (number->string revision) + revision))) ,@(if (svn-reference-recursive? ref) `(("svn recursive?" . "yes")) '()) @@ -187,7 +191,7 @@ (define-record-type* svn-multi-reference make-svn-multi-reference svn-multi-reference? (url svn-multi-reference-url) ; string - (revision svn-multi-reference-revision) ; number + (revision svn-multi-reference-revision) ; number|string (locations svn-multi-reference-locations) ; list of strings (recursive? svn-multi-reference-recursive? (default #f)) (user-name svn-multi-reference-user-name (default #f)) @@ -240,7 +244,8 @@ (define (svn-multi-fetch-builder svn hash-algo) (mkdir-p (string-append #$output "/" (dirname location)))) (and (download-method-enabled? 'upstream) (svn-fetch (string-append (getenv "svn url") "/" location) - (string->number (getenv "svn revision")) + (let ((r (getenv "svn revision"))) + (or (string->number r) r)) (if (string-suffix? "/" location) (string-append #$output "/" location) (string-append #$output "/" (dirname location))) @@ -292,7 +297,10 @@ (define* (svn-multi-fetch ref hash-algo hash ("svn locations" . ,(object->string (svn-multi-reference-locations ref))) ("svn revision" - . ,(number->string (svn-multi-reference-revision ref))) + . ,(let ((revision (svn-multi-reference-revision ref))) + (if (number? revision) + (number->string revision) + revision))) ,@(if (svn-multi-reference-recursive? ref) `(("svn recursive?" . "yes")) '()) base-commit: 30dbc8e7b0d94c0e38e8b7380260450e20035c58 -- 2.45.1 From unknown Sun Jun 22 04:36:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71371] [PATCH v2] gnu: svn-fetch: Allow specifying revisions as strings. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Jun 2024 12:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou Cc: 71371@debbugs.gnu.org, Josselin Poiret , Simon Tournier , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Florian Pelz , Christopher Baines , Matthew Trzcinski Received: via spool by 71371-submit@debbugs.gnu.org id=B71371.17187127414203 (code B ref 71371); Tue, 18 Jun 2024 12:13:02 +0000 Received: (at 71371) by debbugs.gnu.org; 18 Jun 2024 12:12:21 +0000 Received: from localhost ([127.0.0.1]:42124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJXhF-00015j-DV for submit@debbugs.gnu.org; Tue, 18 Jun 2024 08:12:21 -0400 Received: from mail-qt1-f182.google.com ([209.85.160.182]:43149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJXhB-00015T-11 for 71371@debbugs.gnu.org; Tue, 18 Jun 2024 08:12:20 -0400 Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-4421c014b95so31322621cf.0 for <71371@debbugs.gnu.org>; Tue, 18 Jun 2024 05:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718712669; x=1719317469; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=aHwIkidhlSokjK9D4RF5yCwpwIxPfy+KqLvyM4uJDpo=; b=RMIN6KuRY5LjxmsQS0uPYkf339hf7tOeGWHMby1YiRheIUzTrn6QjLs9LPJZYuXfYB Bb28HUjyuWRUhLB4rm5cOGx0N/525cymWYrU6cesUmPyfjcz2yfspaKgkvw6k0l0+k9u T9JofexO2vp9vLta4GUxIOscomsLO90msqeFpkwwqtdkGWpb24DuI1eL+RoKw1J1aDMw 1+MCig4LOsbojc+LbcydGvQoPd2hoBwisYaabjnfFtypNm3CovLPFCR0MyIkuNbVYyc8 4+DlhFkzpHvZsAV1q4uhOR3/6Hjx5KQE9rQb2jD7sj6XVuGGaAf93xtFcRpqfi9Tekac ur2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718712669; x=1719317469; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aHwIkidhlSokjK9D4RF5yCwpwIxPfy+KqLvyM4uJDpo=; b=rl5Tk+LmK+qywWkKc5+qSySA3Mq+DVXrnU9EwmhxqZr1LIzZEJ68GQVvvn+wa2YIoL t3YfETiCbPx+WPQX4yEjGHHbmjkOjV00HQRQTSjsXopM1fiThiRhYqIHA2cVPyQE5KYj CbNfYr/34/ufRVlnuS8E/we0Jb7jXENdjBuoV6bFft3FgHVOlxWB8YnayoJVMvaeqoPU OKRJuy53IgWcjvGxOzWL2yjd0AhUpiyfAjGP0e9bS+6VRL8vv2wIN7k/1tlAT+IQTIbB ze9WTL7OAspFoQMtlWRgfRVPW2VOazAopNJOK4WBiU4hFzX7wLhgJTqdgDut8Hd+Ykg7 uWWw== X-Gm-Message-State: AOJu0Yz48iPoWYNVq5aDeumecwULSyUJ2rH9dtwz1u1wG+XHkPTYgwd2 epnQL2IuN3Io8J5mIf1c3fHAFaP3luOCqDA23wTROqJAuF0T/oXG X-Google-Smtp-Source: AGHT+IGprZ5ezGhh29y6HmeDzuaLuq29g7tkXhMt8uruhmatlY7HlCGiQFgv4xSGIV+YZlcG7bD91w== X-Received: by 2002:a05:622a:1a8b:b0:440:57ca:5b6b with SMTP id d75a77b69052e-4449bb37ca4mr43442451cf.18.1718712668680; Tue, 18 Jun 2024 05:11:08 -0700 (PDT) Received: from hurd (dsl-152-211.b2b2c.ca. [66.158.152.211]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4421aafcf49sm44700611cf.37.2024.06.18.05.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 05:11:08 -0700 (PDT) From: Maxim Cournoyer In-Reply-To: <4885bc5c95529991846db147ca58f7445d3cd864.1718699410.git.mail@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 18 Jun 2024 10:30:10 +0200") References: <4885bc5c95529991846db147ca58f7445d3cd864.1718699410.git.mail@nicolasgoaziou.fr> Date: Tue, 18 Jun 2024 08:11:06 -0400 Message-ID: <87tthqe9id.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Nicolas Goaziou writes: > * guix/svn-download.scm (): > (svn-fetch): > (svn-multi-fetch): > * guix/build/svn.scm (svn-fetch): Revision can also be a string, not only > a number. > * doc/guix.texi (origin Reference): Document changes about REVISION field. > > Change-Id: Ibb17b539575fdf3daf895bd1ce39a40dd9b495cb > --- > v2: No longer ignore "-r" argument. Instead, allow strings, such as "HEAD". Yes, in practice, it means this relies on the tag being stable, which is the same assumption as for, e.g., tarballs. WDYT? While it may be useful to point to volatile references such as HEAD for internal projects (like I believe is also possible for our git fetcher) or the likes (with a hash of #f for example), I wouldn't like to see this used in the Guix tree (I'd consider it a bad practice). I'm not against merging this, but I think we should add a 'guix lint' rule that'd warn that some SVN reference should be specified if it wasn't. Does that sound reasonable? -- Thanks, Maxim From unknown Sun Jun 22 04:36:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71371] [PATCH v2] gnu: svn-fetch: Allow specifying revisions as strings. Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Jun 2024 13:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 71371@debbugs.gnu.org, Josselin Poiret , Simon Tournier , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Florian Pelz , Christopher Baines , Matthew Trzcinski Received: via spool by 71371-submit@debbugs.gnu.org id=B71371.171871720811971 (code B ref 71371); Tue, 18 Jun 2024 13:27:01 +0000 Received: (at 71371) by debbugs.gnu.org; 18 Jun 2024 13:26:48 +0000 Received: from localhost ([127.0.0.1]:42238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJYrH-000371-KZ for submit@debbugs.gnu.org; Tue, 18 Jun 2024 09:26:48 -0400 Received: from msg-2.mailo.com ([213.182.54.12]:42586 helo=mailo.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJYrF-00036n-6z for 71371@debbugs.gnu.org; Tue, 18 Jun 2024 09:26:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nicolasgoaziou.fr; s=mailo; t=1718717195; bh=jZPR+6G5ylJeT96MLkjWMNKZ0uq/9LDbkoG7XiXKaQg=; h=X-EA-Auth:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type; b=0wjjUeYztaIRMmIShOu3kQC30CFNSrgoKYVERz8xbtELpOrvhR//vTLezMp53GuWx el/3OHa6pqwRJGq1jYxCI1RO+jhn6UdFM+92/sbQ1SgossWo0Vh2tDOe5ybGaA5IEB bnCHRMt2V2LwvJ35MQgSfNB1DUjQNb4CsNl4fbLk= Received: by b221-6.in.mailobj.net [192.168.90.26] with ESMTP via ip-20.mailobj.net [213.182.54.20] Tue, 18 Jun 2024 15:26:34 +0200 (CEST) X-EA-Auth: CRIYXhht8HKj5q0xmyETd9bm7C/xAwdE/dYm4OQ/JJNd9Q2dT2bO/ifk53SloBI8t0Txe+dlR2stCcNNBcMNV/CdlJsULz1INc23fCC5zus= From: Nicolas Goaziou In-Reply-To: <87tthqe9id.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 18 Jun 2024 08:11:06 -0400") References: <4885bc5c95529991846db147ca58f7445d3cd864.1718699410.git.mail@nicolasgoaziou.fr> <87tthqe9id.fsf@gmail.com> Date: Tue, 18 Jun 2024 15:26:18 +0200 Message-ID: <871q4uwfet.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Maxim Cournoyer writes: > Nicolas Goaziou writes: > >> * guix/svn-download.scm (): >> (svn-fetch): >> (svn-multi-fetch): >> * guix/build/svn.scm (svn-fetch): Revision can also be a string, not only >> a number. >> * doc/guix.texi (origin Reference): Document changes about REVISION field. >> >> Change-Id: Ibb17b539575fdf3daf895bd1ce39a40dd9b495cb >> --- >> v2: No longer ignore "-r" argument. Instead, allow strings, such as "HEAD". Yes, in practice, it means this relies on the tag being stable, which is the same assumption as for, e.g., tarballs. WDYT? > > While it may be useful to point to volatile references such as HEAD for > internal projects (like I believe is also possible for our git fetcher) > or the likes (with a hash of #f for example), I wouldn't like to see > this used in the Guix tree (I'd consider it a bad practice). I'm not > against merging this, but I think we should add a 'guix lint' rule > that'd warn that some SVN reference should be specified if it wasn't. > > Does that sound reasonable? To be clear, I intend to use it in Guix tree, _in conjunction with a tag_. The purpose of this patch is to put the reference on the human-readable repository tag, not on the revision number. Sure, as already pointed out, some evil repository could modify contents associated to a tag because Subversion allows it. But that would defeat the whole purpose of tags, so I don't think that's common at all. Tags are not meant to be volatile. Again, as also pointed out, we trust tarballs, but the situation is exactly the same for them: one evil project could modify the contents of the tarball without changing its name. The consequence would then be the same: a hash mismatch. Anyway, this patch is there to make my life less miserable while writing a TeX Live updater. It is of no use (to me) if it is restricted to internal projects. I'm not putting pressure on anyone though, if it isn't accepted, I'll find other, probably more tedious, ways to complete the updater. Regards, -- Nicolas Goaziou From unknown Sun Jun 22 04:36:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71371] [PATCH v2] gnu: svn-fetch: Allow specifying revisions as strings. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Jun 2024 18:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou Cc: 71371@debbugs.gnu.org, Josselin Poiret , Simon Tournier , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Florian Pelz , Christopher Baines , Matthew Trzcinski Received: via spool by 71371-submit@debbugs.gnu.org id=B71371.17187352493639 (code B ref 71371); Tue, 18 Jun 2024 18:28:02 +0000 Received: (at 71371) by debbugs.gnu.org; 18 Jun 2024 18:27:29 +0000 Received: from localhost ([127.0.0.1]:47881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJdYG-0000wd-Hy for submit@debbugs.gnu.org; Tue, 18 Jun 2024 14:27:28 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:53643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJdYD-0000wJ-6k for 71371@debbugs.gnu.org; Tue, 18 Jun 2024 14:27:26 -0400 Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-441187684e3so35708581cf.3 for <71371@debbugs.gnu.org>; Tue, 18 Jun 2024 11:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718735176; x=1719339976; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ko/31qjh6BDahXzpnmt7tOexMo2uv3xl43uNS2bZBc8=; b=jN1lhGyv2u/RznGwXRFlQmGHj9OF0GycNQi6/cOW/wABlXi7fGfq8qentmDIoB8/jf ALcmKS0x8CPvux3aSsuwBDUtxAz0WhXllqzjJ3hRDuTpmGqgum5XWTSk99J+Zj9YanF7 QsTPPRARLmOtxWeVhsG9mq2DQZ+A6bjVnf/bD4t1YfHruaHKK95QFKldBI3gYT+R5D5F zkhldgF14wvaVDyNKxr7+ZKisK4NgiFYPUCgvL5uQfn/iBWXE1imVR0fdZzUjyKnKCb+ gU28/nC+0EglbqKXZAltc1DVunN7R1JjRIrSVm80dD1SYKeefBdWsr2W6FRgjXj2OxSP jH3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718735176; x=1719339976; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ko/31qjh6BDahXzpnmt7tOexMo2uv3xl43uNS2bZBc8=; b=G3NQr1KaF8s0hJnQdINbmngSmzQTN1KrisaV9fN1AFegCl/kiiY3HikiCHy1AeZTep 3dukW1hhqdoc2rxwF5VCz7aJebxADBVfYbRG3A8Erl8kCp2d5HwXOyUTRrq5W2ot+1VO 738DJl98mbicXFBiaLpiDvSvVXoH9edxKC9k+GydNWIcIuuNykbWET845PwCNNDQTj3Y P/8q096FbtcGMmcDaNdaVsyLpY0NOnusD4pIe1gRxMgCNFgNytuB2Lkq3GvTxgdMm8hU WX+nw4Ga0nOObj6fOWTveWeDRQU6qqIvsLUNF1piKHymZs9y0T7BvHEeIYF/sahqODCV Ym3g== X-Gm-Message-State: AOJu0Yz518TwNSNzQFJZYyA0bky1XcUbcFPk8ucjjueQfL4KqQL6MzLH /A3UjJppD9B4YCwmGPU+XhTZeavJpConjY3Iv7qT7uVUKaSXhaHw X-Google-Smtp-Source: AGHT+IFBWe6LNFhEtV150zey/GbVWU6u+eSJ44ikkBJ7h0SD5T5NE0yLAxWalIia9HuYX1niwTPnhg== X-Received: by 2002:ac8:5a85:0:b0:440:f0be:4bd7 with SMTP id d75a77b69052e-444a79c17f3mr7636861cf.19.1718735176555; Tue, 18 Jun 2024 11:26:16 -0700 (PDT) Received: from hurd (dsl-152-211.b2b2c.ca. [66.158.152.211]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-441f2fd020csm58053811cf.64.2024.06.18.11.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 11:26:16 -0700 (PDT) From: Maxim Cournoyer In-Reply-To: <871q4uwfet.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 18 Jun 2024 15:26:18 +0200") References: <4885bc5c95529991846db147ca58f7445d3cd864.1718699410.git.mail@nicolasgoaziou.fr> <87tthqe9id.fsf@gmail.com> <871q4uwfet.fsf@nicolasgoaziou.fr> Date: Tue, 18 Jun 2024 14:26:14 -0400 Message-ID: <878qz2ds55.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Nicolas Goaziou writes: > Hello, > > Maxim Cournoyer writes: > >> Nicolas Goaziou writes: >> >>> * guix/svn-download.scm (): >>> (svn-fetch): >>> (svn-multi-fetch): >>> * guix/build/svn.scm (svn-fetch): Revision can also be a string, not only >>> a number. >>> * doc/guix.texi (origin Reference): Document changes about REVISION field. >>> >>> Change-Id: Ibb17b539575fdf3daf895bd1ce39a40dd9b495cb >>> --- >>> v2: No longer ignore "-r" argument. Instead, allow strings, such as "HEAD". Yes, in practice, it means this relies on the tag being stable, which is the same assumption as for, e.g., tarballs. WDYT? >> >> While it may be useful to point to volatile references such as HEAD for >> internal projects (like I believe is also possible for our git fetcher) >> or the likes (with a hash of #f for example), I wouldn't like to see >> this used in the Guix tree (I'd consider it a bad practice). I'm not >> against merging this, but I think we should add a 'guix lint' rule >> that'd warn that some SVN reference should be specified if it wasn't. >> >> Does that sound reasonable? > > To be clear, I intend to use it in Guix tree, _in conjunction with > a tag_. The purpose of this patch is to put the reference on the > human-readable repository tag, not on the revision number. [...] > Again, as also pointed out, we trust tarballs, but the situation is > exactly the same for them: one evil project could modify the contents of > the tarball without changing its name. The consequence would then be the > same: a hash mismatch. > > Anyway, this patch is there to make my life less miserable while writing > a TeX Live updater. It is of no use (to me) if it is restricted to > internal projects. I'm not putting pressure on anyone though, if it > isn't accepted, I'll find other, probably more tedious, ways to complete > the updater. I see. I don't have a strong opinion, if it eases the maintenance of the many texlive packages we carry, but it seems to me that an updater could do the work of associating an immutable SVN reference to a tag at the time of the import. -- Thanks, Maxim From unknown Sun Jun 22 04:36:29 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Nicolas Goaziou Subject: bug#71371: closed (Re: [bug#71371] [PATCH v2] gnu: svn-fetch: Allow specifying revisions as strings.) Message-ID: References: <87frt9mlyh.fsf@nicolasgoaziou.fr> X-Gnu-PR-Message: they-closed 71371 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 71371@debbugs.gnu.org Date: Wed, 19 Jun 2024 07:28:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1718782082-11929-1" This is a multi-part message in MIME format... ------------=_1718782082-11929-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #71371: [PATCH] gnu: svn-fetch: Make revision field optional. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 71371@debbugs.gnu.org. --=20 71371: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71371 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1718782082-11929-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 71371-done) by debbugs.gnu.org; 19 Jun 2024 07:27:48 +0000 Received: from localhost ([127.0.0.1]:35607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJpjP-00035x-RS for submit@debbugs.gnu.org; Wed, 19 Jun 2024 03:27:48 -0400 Received: from msg-2.mailo.com ([213.182.54.12]:40912 helo=mailo.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJpjM-00035b-Lp for 71371-done@debbugs.gnu.org; Wed, 19 Jun 2024 03:27:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nicolasgoaziou.fr; s=mailo; t=1718782054; bh=S2WU0YUJXOWM7FogwqKLEvrQcuSVyO9wC1C7j2Itebs=; h=X-EA-Auth:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type; b=s51AwV4J1jqyycJQfY7z90f1r0ODs2tjNlxxGQAw8k3/3yzjPYTFOOD8oVIoPabgp vUrL/twyVzRILslNgXl/YufeAbKVuvx6OgfQ/kRyyF9VBMhvDvId+VM4LLdZU1GxwT kzsYKej5S7Esq1op16UqUSFRES8l7/MZ8CiWA8eU= Received: by b221-1.in.mailobj.net [192.168.90.21] with ESMTP via ip-20.mailobj.net [213.182.54.20] Wed, 19 Jun 2024 09:27:34 +0200 (CEST) X-EA-Auth: dW6n1qlAYsmrPVBIp5qJ9u+FTRZ0HfssXtaEA/j/D1aqG+nb6Y4IoaCxA8CTRicMH2/CJDFFW51ELqDaS4p+z5qq6r2HQKv2BSmJe0LJwQs= From: Nicolas Goaziou To: Maxim Cournoyer Subject: Re: [bug#71371] [PATCH v2] gnu: svn-fetch: Allow specifying revisions as strings. In-Reply-To: <878qz2ds55.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 18 Jun 2024 14:26:14 -0400") References: <4885bc5c95529991846db147ca58f7445d3cd864.1718699410.git.mail@nicolasgoaziou.fr> <87tthqe9id.fsf@gmail.com> <871q4uwfet.fsf@nicolasgoaziou.fr> <878qz2ds55.fsf@gmail.com> Date: Wed, 19 Jun 2024 09:27:18 +0200 Message-ID: <87frt9mlyh.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71371-done Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Florian Pelz , 71371-done@debbugs.gnu.org, Christopher Baines , Matthew Trzcinski X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Maxim Cournoyer writes: > Nicolas Goaziou writes: >> Anyway, this patch is there to make my life less miserable while writing >> a TeX Live updater. It is of no use (to me) if it is restricted to >> internal projects. I'm not putting pressure on anyone though, if it >> isn't accepted, I'll find other, probably more tedious, ways to complete >> the updater. > I see. I don't have a strong opinion, if it eases the maintenance of > the many texlive packages we carry, but it seems to me that an updater > could do the work of associating an immutable SVN reference to a tag at > the time of the import. That's indeed the plan B I had in mind when I wrote about other ways. It's a bit more involved, though. Fair enough. I'll close this door and open a new one. Regards, -- Nicolas Goaziou ------------=_1718782082-11929-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Jun 2024 05:52:51 +0000 Received: from localhost ([127.0.0.1]:58573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEjZr-0002AL-AL for submit@debbugs.gnu.org; Wed, 05 Jun 2024 01:52:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:40046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEjZn-0002A5-TS for submit@debbugs.gnu.org; Wed, 05 Jun 2024 01:52:49 -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 1sEjZZ-0003ii-LY for guix-patches@gnu.org; Wed, 05 Jun 2024 01:52:33 -0400 Received: from msg-1.mailo.com ([213.182.54.11] helo=mailo.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEjZX-0004b8-Dv for guix-patches@gnu.org; Wed, 05 Jun 2024 01:52:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nicolasgoaziou.fr; s=mailo; t=1717566747; bh=KuoJxxBqX1Xvce3JemmKqmMt9FKSVPUDJL5mDew5fSY=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; b=sYgmN2HBDProExN5HDvK7fg1KOK2pm0A3w634iBoBqgSEziit1+AQ5udAEStRIR+w YuZ6dswcW6XDo0QAQSPaudjHtRM9eKNiaNSHgXnCJmFCGzM7Fh4rSvk+F9zyymI41U UIk2flfhJSKNCJhSS56R0xCMKg5gixqOsHFjnjzU= Received: by b221-1.in.mailobj.net [192.168.90.21] with ESMTP via ip-20.mailobj.net [213.182.54.20] Wed, 5 Jun 2024 07:52:26 +0200 (CEST) X-EA-Auth: 8wT/0CcWeRMyblq3WYYowBh2gcPb+BpY5TAAI6ij2XS5hxYMFp66wFOpDOuywya/8d5ZvS45XtsoPeQ0gbOayZCMgvxydgl2ZEtNrmLT6Go= From: Nicolas Goaziou To: guix-patches@gnu.org Subject: [PATCH] gnu: svn-fetch: Make revision field optional. Date: Wed, 5 Jun 2024 07:52:02 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Matthew Trzcinski , Maxim Cournoyer , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=213.182.54.11; envelope-from=mail@nicolasgoaziou.fr; helo=mailo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Nicolas Goaziou X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) * guix/svn-download.scm (): Set default value for REVISION field to #F. (svn-fetch): (svn-multi-fetch): Take into consideration the revision can be a number or #F. * guix/build/svn.scm (svn-fetch): Skip "-r" argument when revision is #F. * doc/guix.texi (origin Reference): Document changes about REVISION field. Change-Id: Idb0eeb7ca4121db3caf789a9658ac79b321439d4 --- doc/guix.texi | 5 +++-- guix/build/svn.scm | 6 ++++-- guix/svn-download.scm | 16 ++++++++++------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9b60e6c603..5e1173b8c6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8263,8 +8263,9 @@ origin Reference @item @code{url} The URL of the Subversion repository to clone. -@item @code{revision} -This string denotes revision to fetch specified as a number. +@item @code{revision} (default: @code{#f}) +This field denotes the revision to fetch, as a number. It can also be +set to @code{#f}, for example when @var{url} contains a tag reference. @item @code{recursive?} (default: @code{#f}) This Boolean indicates whether to recursively fetch Subversion diff --git a/guix/build/svn.scm b/guix/build/svn.scm index 875d3c50ca..3ae6519628 100644 --- a/guix/build/svn.scm +++ b/guix/build/svn.scm @@ -46,8 +46,7 @@ (define* (svn-fetch url revision directory ;; Trust the server certificate. This is OK as we ;; verify the checksum later. This can be removed when ;; ca-certificates package is added. - "--trust-server-cert" "-r" (number->string revision) - + "--trust-server-cert" ;; Disable keyword substitutions (keywords are CVS-like strings ;; like "$Date$", "$Id$", and so on) for two reasons: (1) some ;; expansions depend on the local time zone, and (2) SWH disables @@ -61,6 +60,9 @@ (define* (svn-fetch url revision directory ,@(if recursive? '() (list "--ignore-externals")) + ,@(if revision + (list "-r" (number->string revision)) + '()) ,url ,directory)) #t)) diff --git a/guix/svn-download.scm b/guix/svn-download.scm index bdd9c39eb5..dc9856cfb1 100644 --- a/guix/svn-download.scm +++ b/guix/svn-download.scm @@ -63,7 +63,7 @@ (define-record-type* svn-reference make-svn-reference svn-reference? (url svn-reference-url) ; string - (revision svn-reference-revision) ; number + (revision svn-reference-revision (default #f)) ; number or #f (recursive? svn-reference-recursive? (default #f)) (user-name svn-reference-user-name (default #f)) (password svn-reference-password (default #f))) @@ -120,7 +120,9 @@ (define* (svn-fetch ref hash-algo hash (or (and (download-method-enabled? 'upstream) (svn-fetch (getenv "svn url") - (string->number (getenv "svn revision")) + (match (getenv "svn revision") + ("#f" #f) + (s (string->number s))) #$output #:svn-command #+(file-append svn "/bin/svn") #:recursive? (match (getenv "svn recursive?") @@ -145,7 +147,7 @@ (define* (svn-fetch ref hash-algo hash #:env-vars `(("svn url" . ,(svn-reference-url ref)) ("svn revision" - . ,(number->string (svn-reference-revision ref))) + . ,(object->string (svn-reference-revision ref))) ,@(if (svn-reference-recursive? ref) `(("svn recursive?" . "yes")) '()) @@ -173,7 +175,7 @@ (define-record-type* svn-multi-reference make-svn-multi-reference svn-multi-reference? (url svn-multi-reference-url) ; string - (revision svn-multi-reference-revision) ; number + (revision svn-multi-reference-revision) ; number or #f (locations svn-multi-reference-locations) ; list of strings (recursive? svn-multi-reference-recursive? (default #f)) (user-name svn-multi-reference-user-name (default #f)) @@ -233,7 +235,9 @@ (define* (svn-multi-fetch ref hash-algo hash (mkdir-p (string-append #$output "/" (dirname location)))) (and (download-method-enabled? 'upstream) (svn-fetch (string-append (getenv "svn url") "/" location) - (string->number (getenv "svn revision")) + (match (getenv "svn revision") + ("#f" #f) + (s (string-to-number s))) (if (string-suffix? "/" location) (string-append #$output "/" location) (string-append #$output "/" (dirname location))) @@ -271,7 +275,7 @@ (define* (svn-multi-fetch ref hash-algo hash ("svn locations" . ,(object->string (svn-multi-reference-locations ref))) ("svn revision" - . ,(number->string (svn-multi-reference-revision ref))) + . ,(object->string (svn-multi-reference-revision ref))) ,@(if (svn-multi-reference-recursive? ref) `(("svn recursive?" . "yes")) '()) base-commit: bf202e8bdd10dbd01da391ef635d1a31197251c1 -- 2.41.0 ------------=_1718782082-11929-1-- From unknown Sun Jun 22 04:36:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#71371] [PATCH v2] gnu: svn-fetch: Allow specifying revisions as strings. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Jun 2024 15:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 71371@debbugs.gnu.org, Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Florian Pelz , Nicolas Goaziou , Christopher Baines , Matthew Trzcinski Received: via spool by 71371-submit@debbugs.gnu.org id=B71371.171932878127224 (code B ref 71371); Tue, 25 Jun 2024 15:20:02 +0000 Received: (at 71371) by debbugs.gnu.org; 25 Jun 2024 15:19:41 +0000 Received: from localhost ([127.0.0.1]:37568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sM7xN-000751-1o for submit@debbugs.gnu.org; Tue, 25 Jun 2024 11:19:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sM7xL-00074n-Ca for 71371@debbugs.gnu.org; Tue, 25 Jun 2024 11:19:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sM7xB-0000Zw-W1; Tue, 25 Jun 2024 11:19:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=qnj1Wnz2D+kPHvtOTocxn4iC9uqPD1DJMi9USw2mm84=; b=ICWQPFrpaOqYZMFwh+iB 6SfG+acqFFUSn2MGepLkG8siuB0OYX9xUZrivCbBDlPAgSJ3KPSiQZKsWGYxQtzTySMB5vjwLMNDP VEyz11Sw9txNUTg2wejkUbh4VEyVzdP3LT56R9F9M8v1XpJdg/HtWCqILhnx+JYTPK7a9GJrjQIWF UPz3VmEhl8LIRnL7c5jc4t7cUkxJo395mQm4WpqRVND87k9Wea7bBeG9TqkEEeccf27F0hWy3itG6 Hu97HjNX1mrVCrL7tqSQPdwqXIrZ3usfnkQduMrnE0B0HdIBYsPOPWhvcAqZ0jAYGnOslKUImjUyg yYNEdcTyjPa+eg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <878qz2ds55.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 18 Jun 2024 14:26:14 -0400") References: <4885bc5c95529991846db147ca58f7445d3cd864.1718699410.git.mail@nicolasgoaziou.fr> <87tthqe9id.fsf@gmail.com> <871q4uwfet.fsf@nicolasgoaziou.fr> <878qz2ds55.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 8 Messidor an 232 de la =?UTF-8?Q?R=C3=A9volution,?= jour de =?UTF-8?Q?l'=C3=89chalotte?= 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: Tue, 25 Jun 2024 17:19:26 +0200 Message-ID: <87wmmdcao1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Maxim Cournoyer skribis: > I see. I don't have a strong opinion, if it eases the maintenance of > the many texlive packages we carry, but it seems to me that an updater > could do the work of associating an immutable SVN reference to a tag at > the time of the import. I share that sentiment too. But Nicolas, do let us know if doing the work in the importer turns out to be more difficult than expected. Ludo=E2=80=99.