From unknown Sat Jun 21 10:45:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#48971 <48971@debbugs.gnu.org> To: bug#48971 <48971@debbugs.gnu.org> Subject: Status: [PATCH 0/2] Add SWH support for Hg repositories Reply-To: bug#48971 <48971@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:45:33 +0000 retitle 48971 [PATCH 0/2] Add SWH support for Hg repositories reassign 48971 guix-patches submitter 48971 Xinglu Chen severity 48971 normal tag 48971 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 07:52:36 2021 Received: (at submit) by debbugs.gnu.org; 12 Jun 2021 11:52:36 +0000 Received: from localhost ([127.0.0.1]:40444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls2Bo-0003uw-9V for submit@debbugs.gnu.org; Sat, 12 Jun 2021 07:52:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:42300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls2Bm-0003uo-MB for submit@debbugs.gnu.org; Sat, 12 Jun 2021 07:52:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls2Bm-0005Un-BW for guix-patches@gnu.org; Sat, 12 Jun 2021 07:52:34 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:55452 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls2Bk-0004nT-E0 for guix-patches@gnu.org; Sat, 12 Jun 2021 07:52:33 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1623498744; bh=BrzruZ2My3DfmtgdPXwdqz5EKbTx9CHcpKqZafwS3uI=; h=From:To:Subject:Date; b=K9+8iT9KZspbbD0Rb7r7BpjbBL6fem07cmk29F42rR/zY73n6fr3RHOgWsh/izECN Tz9Fryp7QbgPhKUV/xObwrPeD9UR8st9S1XUncoEvFgLZ9BdN0ceJJ0Q76Dz+va0Vb sHJ6gKsFbIQFFGky0/LTJp+SUa04/8RqWoeTxmuc= To: guix-patches@gnu.org Subject: [PATCH 0/2] Add SWH support for Hg repositories Message-Id: Date: Sat, 12 Jun 2021 13:52:23 +0200 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 30 X-Spam_score: 3.0 X-Spam_bar: +++ X-Spam_report: (3.0 / 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, FROM_SUSPICIOUS_NTLD=0.498, FROM_SUSPICIOUS_NTLD_FP=1.593, PDS_OTHER_BAD_TLD=1.997, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.8 (++) 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: This series adds SWH support for Hg repositories, meaning that if the upstream Hg repository is missing, Guix will try to fetch the source from SWH. SWH has archived more than 250 000 Hg repositories [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] -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] 1.6 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: submit 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.2 (/) This series adds SWH support for Hg repositories, meaning that if the upstream Hg repository is missing, Guix will try to fetch the source from SWH. SWH has archived more than 250 000 Hg repositories that were previously hosted od BitBucket, so I think will be a useful feature. :) https://www.softwareheritage.org/2020/09/17/250-000-endangered-mercurial-repositories-rescued/ Xinglu Chen (2): swh: Support lookup of Hg tags. hg-download: Support falling back to SWH. guix/hg-download.scm | 31 ++++++++++++++++++++++++++++--- guix/swh.scm | 10 ++++++++-- 2 files changed, 36 insertions(+), 5 deletions(-) base-commit: 00727470b92e0b8ab0e00dd2cd87495c0c136341 -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 07:57:29 2021 Received: (at 48971) by debbugs.gnu.org; 12 Jun 2021 11:57:29 +0000 Received: from localhost ([127.0.0.1]:40450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls2GW-000429-TV for submit@debbugs.gnu.org; Sat, 12 Jun 2021 07:57:29 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:35578 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls2GU-00041p-Ov for 48971@debbugs.gnu.org; Sat, 12 Jun 2021 07:57:27 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1623499040; bh=j9TwaveoX7r8U5DkeF2faZc327V+HOSv9Ev4TGbnfpk=; h=From:To:Subject:In-Reply-To:References:Date; b=d+iCYfPTHNvg1XuZbVJc9L+oHj8EEIsRksqA/Mb+GVKUmQaixBgngC3eFzJC+y12I +gke0Bnke3Igd7WWFnJCEw50cDeGIarPJ3OSVKNGDzFwkkdeoI97IYpMm1vWVwngqk fZ4Np2n3rTiKT4R4ctgIx4vX2TfD0KKFicSroigo= To: 48971@debbugs.gnu.org Subject: [PATCH 1/2] swh: Support lookup of Hg tags. In-Reply-To: References: Message-Id: Date: Sat, 12 Jun 2021 13:57:19 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.9 (++) 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: * guix/swh.scm (lookup-origin-revision): Support lookup of Hg tags, not just Git tags. --- I noticed that the ‘commit-id?’ procedure checks if REFERENCE is of length 40, this will result in false [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 48971 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.9 (+) 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: * guix/swh.scm (lookup-origin-revision): Support lookup of Hg tags, not just Git tags. --- I noticed that the ‘commit-id?’ procedure checks if REFERENCE is of length 40, this will result in false [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * guix/swh.scm (lookup-origin-revision): Support lookup of Hg tags, not just Git tags. --- I noticed that the =E2=80=98commit-id?=E2=80=99 procedure checks if REFEREN= CE is of length 40, this will result in false negatives because some packages that use =E2=80=98hg-fetch=E2=80=99 only specify the first ~10 or ~15 chara= cters of the changeset revision. We should probably fix that. guix/swh.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/guix/swh.scm b/guix/swh.scm index f6d5241e06..b5c800011d 100644 --- a/guix/swh.scm +++ b/guix/swh.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2018, 2019, 2020, 2021 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka +;;; Copyright =C2=A9 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -455,8 +456,13 @@ URL could not be found." ((visit . _) (let ((snapshot (visit-snapshot visit))) (match (and=3D> (find (lambda (branch) - (string=3D? (string-append "refs/tags/" t= ag) - (branch-name branch))) + (or + ;; Git specific. + (string=3D? (string-append "refs/tags/" = tag) + (branch-name branch)) + ;; Hg specific. + (string=3D? tag + (branch-name branch)))) (snapshot-branches snapshot)) branch-target) ((? release? release) --=20 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 07:57:31 2021 Received: (at 48971) by debbugs.gnu.org; 12 Jun 2021 11:57:31 +0000 Received: from localhost ([127.0.0.1]:40452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls2GZ-00042I-65 for submit@debbugs.gnu.org; Sat, 12 Jun 2021 07:57:31 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:35588 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls2GW-00041r-3N for 48971@debbugs.gnu.org; Sat, 12 Jun 2021 07:57:28 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1623499042; bh=YU8cp0av1oYsm74DHbY/+Vg/wwgpY9EcLCuzPE/apWk=; h=From:To:Subject:In-Reply-To:References:Date; b=pMiCghv1SKEKiV3Ab1+J1tPJSDMEw/rj8Z39Xn6MwYKqBwLCAdyYIn75s00/tmloG xVGwTVr9GoYbfeGzmafuq/rXv2fWLUe4loMpfDJnFqW9z8YnK0AJT5RNug+bGkBkEY ny5Hz446ggik/bQrBjxPbx7laebv2chFn3fSDkfM= To: 48971@debbugs.gnu.org Subject: [PATCH 2/2] hg-download: Support falling back to SWH. In-Reply-To: References: Message-Id: <22034af85a90fb2138169465f80641b28c60fb37.1623498543.git.public@yoctocell.xyz> Date: Sat, 12 Jun 2021 13:57:22 +0200 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.9 (++) 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: * guix/hg-download.scm (hg-fetch): Fall back to fetching the source from SWH if the upstream source is missing. --- guix/hg-download.scm | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 inserti [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 48971 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.9 (+) 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: * guix/hg-download.scm (hg-fetch): Fall back to fetching the source from SWH if the upstream source is missing. --- guix/hg-download.scm | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 inserti [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * guix/hg-download.scm (hg-fetch): Fall back to fetching the source from SWH if the upstream source is missing. --- guix/hg-download.scm | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/guix/hg-download.scm b/guix/hg-download.scm index eb7c345489..c386d2f5f3 100644 --- a/guix/hg-download.scm +++ b/guix/hg-download.scm @@ -67,6 +67,13 @@ "Return a fixed-output derivation that fetches REF, a object. The output is expected to have recursive hash HASH of type HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." + (define inputs + ;; The 'swh-download' procedure requires tar and gzip. + `(("gzip" ,(module-ref (resolve-interface '(gnu packages compression)) + 'gzip)) + ("tar" ,(module-ref (resolve-interface '(gnu packages base)) + 'tar)))) + (define guile-zlib (module-ref (resolve-interface '(gnu packages guile)) 'guile-zlib)) @@ -79,7 +86,8 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." (define modules (delete '(guix config) (source-module-closure '((guix build hg) - (guix build download-nar))))) + (guix build download-nar) + (guix swh))))) (define build (with-imported-modules modules @@ -87,13 +95,30 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." guile-zlib) #~(begin (use-modules (guix build hg) - (guix build download-nar)) + (guix build utils) ;for `set-path-environment-variable' + (guix build download-nar) + (guix swh) + (ice-9 match)) + + (set-path-environment-variable "PATH" '("bin") + (match '#+inputs + (((names dirs outputs ...) ...) + dirs))) (or (hg-fetch '#$(hg-reference-url ref) '#$(hg-reference-changeset ref) #$output #:hg-command (string-append #+hg "/bin/hg")) - (download-nar #$output)))))) + (download-nar #$output) + ;; As a last resort, attempt to download from Software Heritage. + ;; Disable X.509 certificate verification to avoid depending + ;; on nss-certs--we're authenticating the checkout anyway. + (parameterize ((%verify-swh-certificate? #f)) + (format (current-error-port) + "Trying to download from Software Heritage...~%") + (swh-download #$(hg-reference-url ref) + #$(hg-reference-changeset ref) + #$output))))))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "hg-checkout") build -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 12:45:11 2021 Received: (at 48971) by debbugs.gnu.org; 14 Jun 2021 16:45:12 +0000 Received: from localhost ([127.0.0.1]:47723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lspi3-0006CI-F1 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 12:45:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lspi1-00065C-Mr for 48971@debbugs.gnu.org; Mon, 14 Jun 2021 12:45:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51410) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsphv-0007eW-V1; Mon, 14 Jun 2021 12:45:03 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33576 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lspha-00052Z-18; Mon, 14 Jun 2021 12:45:02 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Xinglu Chen Subject: Re: bug#48971: [PATCH 0/2] Add SWH support for Hg repositories References: Date: Mon, 14 Jun 2021 18:44:40 +0200 In-Reply-To: (Xinglu Chen's message of "Sat, 12 Jun 2021 13:52:23 +0200") Message-ID: <87k0mwwg3r.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 48971 Cc: 48971@debbugs.gnu.org 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.8 (/) Hello, Xinglu Chen skribis: > Xinglu Chen (2): > swh: Support lookup of Hg tags. > hg-download: Support falling back to SWH. Pushed as 69d7333217ce85d9d1643a8349757b6b170d3b1f! Note that currently this only works for (1) repositories that are archived, and (2) origins that refer to hg tags, not commit IDs. I found an example that meets these criteria: python-openpyxl. :-) I commented out the other fallbacks in (guix hg-download) and ran: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build python-openpyxl -S --no-substitutes=20 The following derivation will be built: /gnu/store/71xjlgdqw50a76ycqrmjrqh7b4mdi5s7-python-openpyxl-3.0.5-checko= ut.drv building /gnu/store/71xjlgdqw50a76ycqrmjrqh7b4mdi5s7-python-openpyxl-3.0.5-= checkout.drv... guile: warning: failed to install locale environment variable `PATH' set to `/gnu/store/378zjf2kgajcfd7mfr98jn5xyc5w= a3qv-gzip-1.10/bin:/gnu/store/sf3rbvb6iqcphgm1afbplcs72hsywg25-tar-1.32/bin' Trying to download from Software Heritage... SWH: found revision 4d4e19e58314de481b98f4c239c3b3e9fd080613 with directory= at 'https://archive.softwareheritage.org/api/1/directory/fb5bbba156e6b8e2b= b94ea1dd5807ef2c8931864/' SWH vault: requested bundle cooking, waiting for completion... SWH vault: requested bundle cooking, waiting for completion... SWH vault: requested bundle cooking, waiting for completion... SWH vault: requested bundle cooking, waiting for completion... SWH vault: requested bundle cooking, waiting for completion... SWH vault: requested bundle cooking, waiting for completion... SWH vault: requested bundle cooking, waiting for completion... --8<---------------cut here---------------end--------------->8--- It=E2=80=99s still waiting for the bundle=E2=80=A6 Regarding #2, there are some good news: is about implementing a mapping from =E2=80=9CVCS IDs=E2=80=9D (hg commit IDs in this case) to SWHI= Ds. Thus, eventually, =E2=80=98lookup-origin-revision=E2=80=99 should be able to take= an hg commit ID and to map it to an SWHID. That JSON API isn=E2=80=99t exposed yet. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 12:45:29 2021 Received: (at control) by debbugs.gnu.org; 14 Jun 2021 16:45:29 +0000 Received: from localhost ([127.0.0.1]:47726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lspiK-0006TY-SY for submit@debbugs.gnu.org; Mon, 14 Jun 2021 12:45:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lspiJ-0006N2-6x for control@debbugs.gnu.org; Mon, 14 Jun 2021 12:45:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51434) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lspiD-0007vZ-Vd for control@debbugs.gnu.org; Mon, 14 Jun 2021 12:45:21 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33584 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lspiD-00055y-1J for control@debbugs.gnu.org; Mon, 14 Jun 2021 12:45:21 -0400 Date: Mon, 14 Jun 2021 18:45:18 +0200 Message-Id: <87im2gwg2p.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #48971 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) close 48971 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 15 01:37:37 2021 Received: (at 48971) by debbugs.gnu.org; 15 Jun 2021 05:37:38 +0000 Received: from localhost ([127.0.0.1]:48251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lt1lZ-00065B-LD for submit@debbugs.gnu.org; Tue, 15 Jun 2021 01:37:37 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:59368 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lt1lY-00064w-0K for 48971@debbugs.gnu.org; Tue, 15 Jun 2021 01:37:36 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1623735448; bh=Z5YIZI1NfbJyU5lq+1bZ3/l9OuaiYNArKhlqG6nIbgk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=aSVGQTLrYa4wuODzcAjFxv3nvsuGZE/92j2jcIOwqY1tp0pSPYoEhuPEyvqEtUkzf EIziZSkzVNuRE4q3srByxjMXuHdO+jFxrOiNbyEES3C1S8uKyI9W3MYvnMbrrac+Ao WHntixpSaOdwZ5ncfGkcB7+ZyhcPkqGX/AbXVAg0= To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#48971] [PATCH 0/2] Add SWH support for Hg repositories In-Reply-To: <87k0mwwg3r.fsf@gnu.org> References: <87k0mwwg3r.fsf@gnu.org> Date: Tue, 15 Jun 2021 07:37:27 +0200 Message-ID: <87mtrrhenc.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 3.4 (+++) 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: On Mon, Jun 14 2021, Ludovic Courtès wrote: > Hello, > > Xinglu Chen skribis: > >> Xinglu Chen (2): >> swh: Support lookup of Hg tags. >> hg-download: Support falling back to SWH. > > Pushed as 69d7333217ce85d9d1643a83497 [...] Content analysis details: (3.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.0 T_PDS_BTC_NTLD Bitcoin suspect NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.5 PDS_BTC_ID FP reduced Bitcoin ID X-Debbugs-Envelope-To: 48971 Cc: 48971@debbugs.gnu.org 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.4 (+++) 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: On Mon, Jun 14 2021, Ludovic Courtès wrote: > Hello, > > Xinglu Chen skribis: > >> Xinglu Chen (2): >> swh: Support lookup of Hg tags. >> hg-download: Support falling back to SWH. > > Pushed as 69d7333217ce85d9d1643a83497 [...] Content analysis details: (3.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.0 T_PDS_BTC_NTLD Bitcoin suspect NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.5 PDS_BTC_ID FP reduced Bitcoin ID -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Jun 14 2021, Ludovic Court=C3=A8s wrote: > Hello, > > Xinglu Chen skribis: > >> Xinglu Chen (2): >> swh: Support lookup of Hg tags. >> hg-download: Support falling back to SWH. > > Pushed as 69d7333217ce85d9d1643a8349757b6b170d3b1f! > > Note that currently this only works for (1) repositories that are > archived, and (2) origins that refer to hg tags, not commit IDs. > > I found an example that meets these criteria: python-openpyxl. :-) > I commented out the other fallbacks in (guix hg-download) and ran: > > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix build python-openpyxl -S --no-substitutes=20 > The following derivation will be built: > /gnu/store/71xjlgdqw50a76ycqrmjrqh7b4mdi5s7-python-openpyxl-3.0.5-chec= kout.drv > building /gnu/store/71xjlgdqw50a76ycqrmjrqh7b4mdi5s7-python-openpyxl-3.0.= 5-checkout.drv... > guile: warning: failed to install locale > environment variable `PATH' set to `/gnu/store/378zjf2kgajcfd7mfr98jn5xyc= 5wa3qv-gzip-1.10/bin:/gnu/store/sf3rbvb6iqcphgm1afbplcs72hsywg25-tar-1.32/b= in' > Trying to download from Software Heritage... > SWH: found revision 4d4e19e58314de481b98f4c239c3b3e9fd080613 with directo= ry at 'https://archive.softwareheritage.org/api/1/directory/fb5bbba156e6b8e= 2bb94ea1dd5807ef2c8931864/' > SWH vault: requested bundle cooking, waiting for completion... > SWH vault: requested bundle cooking, waiting for completion... > SWH vault: requested bundle cooking, waiting for completion... > SWH vault: requested bundle cooking, waiting for completion... > SWH vault: requested bundle cooking, waiting for completion... > SWH vault: requested bundle cooking, waiting for completion... > SWH vault: requested bundle cooking, waiting for completion... > --8<---------------cut here---------------end--------------->8--- > > It=E2=80=99s still waiting for the bundle=E2=80=A6 Hmm, I tried it on a package in local config and it seemed to work fine with commit IDs, I guess this was because I ran =E2=80=98guix hash -r=E2=80= =99 on the extracted tarball I downloaded from SWH, so the source was already in the store when I tried to build it... > Regarding #2, there are some good news: > is about implementing a > mapping from =E2=80=9CVCS IDs=E2=80=9D (hg commit IDs in this case) to SW= HIDs. Thus, > eventually, =E2=80=98lookup-origin-revision=E2=80=99 should be able to ta= ke an hg commit > ID and to map it to an SWHID. That JSON API isn=E2=80=99t exposed yet. Oh, that=E2=80=99s great! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDIPJcVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5d0MP/RM1HfSJEY0e/dZAPP+gz++uFJAV k8ojApV+3s7Ib1nK4swj5ylN0EeaQCVgYGcgbFRXrfDf8m4kYQrrooziEZoXnK8l UVIDacDyP/7Cc/1kWbio9z/TexpUvbdtENpOlkhLlV91qEHs5oaeO+2HsDE5l2Ls Zt9xu3fZgNS3Vmi+eHYYM7EPfwePaGKo5GsqHvXQn3fojgpsW+LDs/IUocJ0irFm QPmU8XSsm2GxVefGr1O0WEivn/LDGQmFqoBHFr/X8HIKttFNWYoxVuuLopZyycHK /2aOMyqfW4gF09vgBAt45alg0Vvtn0KnXjkFQeyodFdObKyXysTmo8YJwbrNkp/y n1FTc6o0iunV+Kx0+uzpHnw5zajZLNBgWfWg6m0v6SDwgncQcF6HyuA2aRn6USlx fOJF3RXPemkAxe/1/lua4bv+SFeJzCBWjS+PJcM0ITP0T5JVsr9R1WnUJBQWMhTt L2DK7N6lGoh+xFCf2l3YAdRavcG4eKdN6H7u2uN10RCfTEI5t4A8NCJuOVskYqu1 jGOll9CdxSJQ/uNZghkg8S0SEfq76zM2aV9s189Hx9n61erLmpHIlXRMc7wPWEd2 U8RRnGmrlEfsFydTLOHgRlIHcz2BBXurOgXYTGRxUBW2kdcyri2RHGALTg3Aq0kq FM+JhlLjZ3uTSw++ =C+pZ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 16 01:26:05 2021 Received: (at 48971) by debbugs.gnu.org; 16 Jun 2021 05:26:06 +0000 Received: from localhost ([127.0.0.1]:51218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltO3x-0001V9-K1 for submit@debbugs.gnu.org; Wed, 16 Jun 2021 01:26:05 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:40564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltO3u-0001UR-AA for 48971@debbugs.gnu.org; Wed, 16 Jun 2021 01:26:03 -0400 Received: by mail-wr1-f48.google.com with SMTP id y7so1089649wrh.7 for <48971@debbugs.gnu.org>; Tue, 15 Jun 2021 22:26:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=YvqzxXcMzPzP+6eNpgBUt4MbU/4MX6kfp9to7fhdodU=; b=bOsxwpDkWn2JzNl9ZPmQ7kSTcA4r7ucMpdv+Y5OZLmcPmrVFQsCOsC09Jo01PZtI58 /XQ5l7fQf/HvV6dfwlVPMbLj7lDM33GtfbJmJk+lBczW+XKnenauEpzB/7O+AD2ah1Lz K0VQPJwtlAVtUndBsg2N106ZHGmIQSpo7d/BzO4UBmKCwrJZkaZLUM/Lk3vRbdVEkQXh NhUeptsq+wwTcpIigSkmwns+eClBzEXp/RJwISXQqvZgwk5zB55VSE/ChxWscKF1DnAF QAo0MBItdUwDraDsEPqdwZrXA1igI5YqMXaRJ6/QB1NqYTEdCfQj1cIox/xCOsBis2Lb twTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=YvqzxXcMzPzP+6eNpgBUt4MbU/4MX6kfp9to7fhdodU=; b=cXiVOA9IZ3DKyovV53CaofTB5Yy8noTnjEtfxOhdx3HtPbdC3EMRPb0q92Z/Y1GOdW PJSLYyu3LFrXHwFOzs886Nm1WI9Qp0UrWxJaZ2Nl8pdyEvnzgNV6Aqajc2KKVXEMpZTC n5GHXxNUCIV6Ua/gIfBY1GnZr0wT643IcjF9ebL3tVEvoxWz5dYjXlTVxr3HyICMUsnG rBJ4usU0W/LrSXDlbu9VruEOCye3QJPe4D9J5MuGpXQ0Y7mjl1cFfvQzGC+Yd8HXriPk 1xEiYzaGrDptTL0Ql29LvCNpG1Zzv289ApV+Fej3EzsOED/8FU/IZQtWxoLqga7LBNWk NvPw== X-Gm-Message-State: AOAM530l9TDURvotVEg9I7FzeBLFDEFl2dvyZdyF4KgwAvwqAWpctSBf mbldU4YgPnH1E9Bw0m95Sod9o5MFXWU= X-Google-Smtp-Source: ABdhPJxk9jvd/nEV815Pi2RY5ZOiep6z1Iu+1fbuZu7LDA6eJpD9txYTIquD+3mHLscJqUYYMpaB0A== X-Received: by 2002:a05:6000:1883:: with SMTP id a3mr2997645wri.65.1623821156596; Tue, 15 Jun 2021 22:25:56 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o7sm889049wro.76.2021.06.15.22.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 22:25:56 -0700 (PDT) From: zimoun To: Xinglu Chen , 48971@debbugs.gnu.org Subject: Re: [bug#48971] [PATCH 0/2] Add SWH support for Hg repositories In-Reply-To: References: Date: Wed, 16 Jun 2021 07:23:03 +0200 Message-ID: <86h7hyjsco.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain 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: Hi, On Sat, 12 Jun 2021 at 13:52, Xinglu Chen wrote: > This series adds SWH support for Hg repositories, meaning that if the > upstream Hg repository is missing, Guix will try to fetch the source > from [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.48 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.48 listed in wl.mailspike.net] X-Debbugs-Envelope-To: 48971 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, On Sat, 12 Jun 2021 at 13:52, Xinglu Chen wrote: > This series adds SWH support for Hg repositories, meaning that if the > upstream Hg repository is missing, Guix will try to fetch the source > from SWH. SWH has archived more than 250 000 Hg repositories that were > previously hosted od BitBucket, so I think will be a useful feature. :) > > https://www.softwareheritage.org/2020/09/17/250-000-endangered-mercurial-repositories-rescued/ Cool! Thanks for working on this. > Xinglu Chen (2): > swh: Support lookup of Hg tags. > hg-download: Support falling back to SWH. > > guix/hg-download.scm | 31 ++++++++++++++++++++++++++++--- > guix/swh.scm | 10 ++++++++-- > 2 files changed, 36 insertions(+), 5 deletions(-) LGTM. All the best, simon From unknown Sat Jun 21 10:45:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 14 Jul 2021 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator