GNU bug report logs

#70588 Content-addressed mirror is not used upon invalid hash

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #5 received at submit@debbugs.gnu.org (full text, mbox, reply):

Received: (at submit) by debbugs.gnu.org; 26 Apr 2024 08:49:13 +0000
From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 04:49:12 2024
Received: from localhost ([127.0.0.1]:33943 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1s0HGR-0004gQ-Mx
	for submit@debbugs.gnu.org; Fri, 26 Apr 2024 04:49:12 -0400
Received: from lists.gnu.org ([2001:470:142::17]:41742)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@gmail.com>) id 1s0HFw-0004YW-0k
 for submit@debbugs.gnu.org; Fri, 26 Apr 2024 04:48:41 -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 <zimon.toutoune@gmail.com>)
 id 1s0HFX-0006Zz-Tz
 for bug-guix@gnu.org; Fri, 26 Apr 2024 04:48:07 -0400
Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@gmail.com>)
 id 1s0HFV-0005mi-SR
 for bug-guix@gnu.org; Fri, 26 Apr 2024 04:48:07 -0400
Received: by mail-wr1-x434.google.com with SMTP id
 ffacd0b85a97d-34bddecd63eso322496f8f.1
 for <bug-guix@gnu.org>; Fri, 26 Apr 2024 01:48:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714121284; x=1714726084; darn=gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:subject:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=4ElzzjqxVgMaxXjuWg1hQFR/OrahJTtcJcfmNt644qE=;
 b=Ze1omn3EkJHyOgjZwX0izueM3kzQBd2d9SieseUjREuJKopwwEcJObHCEmaqQKNtlu
 C0HYUHr7fcZnXTpX33VCzKAG3FvMZ5f/2KDxN9cymddBHIKeeXyQJb5eyoyNLbXc7BNE
 LrownQkLsIR7INqoXYoIUgZWKXg/gp5OcxrTzNBmYKmtIIIucUpuXACbSGO3HI8eueLq
 ltmaq5v8yCqaPieqzPFvWkooZ31QtL6bHvl9OSRHyO8hmHqT2OaoyfOOy4EwG9GeKDYt
 tEnFEnFrAYSiHuI8G/05FQvTxb/cbzBGYlmAxD45Ntk9XXq4MSUJBUEoiMHnYptI9Fkr
 Wcfg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714121284; x=1714726084;
 h=content-transfer-encoding:mime-version:message-id:date:subject:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=4ElzzjqxVgMaxXjuWg1hQFR/OrahJTtcJcfmNt644qE=;
 b=r4llFgjkJtqCcWlBz4DF2Gc3LYJU+l6AbkMmeioXd8f6+z4X9xStc/uuOuyWU0nK+a
 kUOT2i224cNBB1feFADgNxyy9Vl74CcQNkzvrZAGgwcWxpaCYkHZwqnIX03DpE4orfLP
 eRC2r8C8ofeRZFPUUGUckeuJ40EDR7e/10L05jpvYWTsELh1goUf9aSyPdpoa6jY0PHt
 Uv9tYaLS0qluto4DFZGMcbXqJi0ZuLYanlsAa/xYrYmFld+1Xw7Wc46YkBBX9uRbuLmg
 fYJHmcVXsbh3NMqyEW1LfsCU2ZFXQP6U7AEZTFCbH3ur9bmwvJ5HDZSAYTs64f7SyJEF
 IXCw==
X-Gm-Message-State: AOJu0YxfLi61SK86XmpSgXwt0+jFTpcpVXexQktnrcoqDNaJdMOZa66A
 eirQHfQ4G076yAYU0enRUo7o+966x4AKry97SDnGp9dhPoRXWxJynLnrbQ==
X-Google-Smtp-Source: AGHT+IGH4/sKCRXzvPWV8TRiOs60pws0qQZDcv7e8wXVKVVkUFGOGfUGc7vZonuUcT2qzEm43+ITXA==
X-Received: by 2002:adf:9b8f:0:b0:346:65dd:55e6 with SMTP id
 d15-20020adf9b8f000000b0034665dd55e6mr1362118wrc.1.1714121283559; 
 Fri, 26 Apr 2024 01:48:03 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 p3-20020a5d6383000000b00341b451a31asm21728692wru.36.2024.04.26.01.48.02
 for <bug-guix@gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 26 Apr 2024 01:48:02 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@gmail.com>
To: bug-guix@gnu.org
Subject: hash mismatch error and stop fallback
X-Debbugs-CC: ludo@gnu.org
Date: Thu, 25 Apr 2024 15:28:27 +0200
Message-ID: <87ttjpinb8.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::434;
 envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x434.google.com
X-Spam_score_int: -10
X-Spam_score: -1.1
X-Spam_bar: -
X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049,
 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 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.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:  Hi, Considering something from the past – well to my knowledge
    it is still an issue with the current implementation and such it will be
   a issue for the future. ;-) For instance, the R package MASS from 2019 (Guix
    revision 711cec): because the CRAN project did some in-place replacements,
    we have a hash mismatch and all the process stops. 
 
 Content analysis details:   (1.8 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (zimon.toutoune[at]gmail.com)
  0.8 DATE_IN_PAST_12_24     Date: is 12 to 24 hours before Received: date
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: 0.8 (/)
Hi,

Considering something from the past – well to my knowledge it is still
an issue with the current implementation and such it will be a issue for
the future. ;-)

For instance, the R package MASS from 2019 (Guix revision 711cec):
because the CRAN project did some in-place replacements, we have a hash
mismatch and all the process stops.

--8<---------------cut here---------------start------------->8---
$ guix build /gnu/store/wfq2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
The following derivation will be built:
  /gnu/store/wfq2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv
building /gnu/store/wfq2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv...

Starting download of /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
From http://cran.r-project.org/src/contrib/MASS_7.3-51.4.tar.gz...
download failed "http://cran.r-project.org/src/contrib/MASS_7.3-51.4.tar.gz" 404 "Not Found"

Starting download of /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
From http://cran.rstudio.com/src/contrib/MASS_7.3-51.4.tar.gz...
download failed "http://cran.rstudio.com/src/contrib/MASS_7.3-51.4.tar.gz" 404 "Not Found"

Starting download of /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
From http://cran.univ-lyon1.fr/src/contrib/MASS_7.3-51.4.tar.gz...
following redirection to `https://pbil.univ-lyon1.fr/CRAN/src/contrib/MASS_7.3-51.4.tar.gz'...
download failed "https://pbil.univ-lyon1.fr/CRAN/src/contrib/MASS_7.3-51.4.tar.gz" 404 "Not Found"

Starting download of /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
From http://cran.ism.ac.jp/src/contrib/MASS_7.3-51.4.tar.gz...
download failed "http://cran.ism.ac.jp/src/contrib/MASS_7.3-51.4.tar.gz" 404 "Not Found"

Starting download of /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
From http://cran.stat.auckland.ac.nz/src/contrib/MASS_7.3-51.4.tar.gz...
download failed "http://cran.stat.auckland.ac.nz/src/contrib/MASS_7.3-51.4.tar.gz" 404 "Not Found"

Starting download of /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
From http://cran.mirror.ac.za/src/contrib/MASS_7.3-51.4.tar.gz...
download failed "http://cran.mirror.ac.za/src/contrib/MASS_7.3-51.4.tar.gz" 404 "Not Found"

Starting download of /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
From http://cran.csie.ntu.edu.tw/src/contrib/MASS_7.3-51.4.tar.gz...
download failed "http://cran.csie.ntu.edu.tw/src/contrib/MASS_7.3-51.4.tar.gz" 404 "Not Found"

Starting download of /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
From http://cran.r-project.org/src/contrib/Archive/MASS/MASS_7.3-51.4.tar.gz...
downloading from http://cran.r-project.org/src/contrib/Archive/MASS/MASS_7.3-51.4.tar.gz ...
 MASS_7.3-51.4.tar.gz  476KiB         2.1MiB/s 00:00 ▕██████████████████▏ 100.0%
sha256 hash mismatch for /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz:
  expected hash: 0x1ckf51y851g0kvbhsgdxb26vfpmbw3xdbcnh3ck7fjm13da4cr
  actual hash:   1swfd4jnqhsb2imznib629bywrxah7b63yqxhwhd9bhyaji70hl4
hash mismatch for store item '/gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz'
build of /gnu/store/wfq2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv failed
View build log at '/var/log/guix/drvs/wf/q2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv.gz'.
guix build: error: build of `/gnu/store/wfq2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv' failed
--8<---------------cut here---------------end--------------->8---


When the source is correctly available in SWH:

--8<---------------cut here---------------start------------->8---
$ guix build /gnu/store/wfq2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv
The following derivation will be built:
  /gnu/store/wfq2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv
building /gnu/store/wfq2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv...

[...]

Starting download of /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
From https://archive.softwareheritage.org/api/1/content/sha256:9911d546a8d29dc906b46cb53ef8aad76d23566f4fc3b52778a1201f8a9b2c74/raw/...
downloading from https://archive.softwareheritage.org/api/1/content/sha256:9911d546a8d29dc906b46cb53ef8aad76d23566f4fc3b52778a1201f8a9b2c74/raw/ ...
 raw/  476KiB                         9.9MiB/s 00:00 ▕██████████████████▏ 100.0%
successfully built /gnu/store/wfq2ji5x9awgyk680i1vv95hq75nx3vv-MASS_7.3-51.4.tar.gz.drv
/gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz

$ guix hash /gnu/store/gxbam95zqjaxdd6303j97z4djr907yzn-MASS_7.3-51.4.tar.gz
0x1ckf51y851g0kvbhsgdxb26vfpmbw3xdbcnh3ck7fjm13da4cr
--8<---------------cut here---------------end--------------->8---

Therefore, the bug is to not consider a hash mismatch as a fullstop and
error out but consider it as a failure of one strategy and thus try the
next strategy.

Other said, hash mismatch should be raised and obviously the content
must be discarded; then the hash mismatch should be considered as “not
found” so let try the next strategy for downloading the content.

Cheers,
simon




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Mon Sep 8 19:41:20 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.