unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: Ivan Petkov <ivanppetkov@gmail.com>
Cc: 36614-done@debbugs.gnu.org
Subject: bug#36614: rust@1.36's hash is incorrect.
Date: Fri, 12 Jul 2019 19:26:07 +0200	[thread overview]
Message-ID: <87k1cn411s.fsf@nckx> (raw)
In-Reply-To: <B9AB01AB-BC00-44C5-BCD9-17B1E26FEE97@gmail.com>

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

Ivan,

Ivan Petkov wrote:
> My apologies, this was all partly my fault. I do have the old 
> source lying
> around, diffing the two (attached) reveals that the changelog 
> and one source
> file actually changed.
>
> A bit more detailed context:
> The rust project makes pre-release sources available for testing 
> ahead of
> the formal release, and the process is meant to shake out any 
> potential bugs.
> I tested with the prerelease build originally, and after the 
> real release
> came out I updated the package URL to the formal release and 
> immediately
> rebuilt successfully.

No apologies necessary.  It's nice to know that our Rust updates 
will always follow swiftly on the heels of upstream as long as you 
take care of them.  However, please make sure to check the 
signature (.asc) once the final release is cut; one never knows...

> I'm not 100% sure if maybe guix reused the cached tarball I had 
> from earlier,
> or whether the prerelease source was immediately upgraded to the 
> formal release
> and fixed shortly after. (I did try rebuilding right before 
> pushing the change
> out which succeeded with no changes, which I'm guessing is 
> because guix did
> not redownload the tarball and why I didn't notice the hash 
> mismatch).

Yes, this is exactly what happened.  I consider this is a feature 
of Guix, even though it can feel like a gotcha sometimes.  :-)

We often tend to think of the source URL(s) as an ‘identifier’ of 
the source file.  However, it is nothing more than a hint about 
its *location*.  The only authoritative identifier of its 
*content* is the hash: to get *this file* (content hash), try 
looking *here* (location: URL).

One origin may have 0 or more source URLs: Guix will try them all 
until it downloads something matching the hash (and if even that 
fails it will try some implicit ones like tarballs.nixos.org).

    ‘Unique’ identifier (hash)
      ├ maybe you can *find* it here (URL)
      ├ or here (another URL)
      ├ hell maybe here I don't know (yet another URL)
      ⋮
      
Guix cares only about the content of the file; it doesn't care or 
even remember how it got it.  Or: if you change the download hint 
(release URL in this case), Guix won't care, because you didn't 
change the hash.

I hope that makes some sense,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  parent reply	other threads:[~2019-07-12 17:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12  9:41 bug#36614: rust@1.36's hash is incorrect Pierre Langlois
     [not found] ` <handler.36614.B.156292453627169.ack@debbugs.gnu.org>
2019-07-12 13:11   ` bug#36614: Acknowledgement (rust@1.36's hash is incorrect.) Pierre Langlois
2019-07-12 13:16 ` bug#36614: rust@1.36's hash is incorrect Tobias Geerinckx-Rice
2019-07-12 16:33   ` Ivan Petkov
2019-07-12 17:23     ` Leo Famulari
2019-07-12 17:26     ` Tobias Geerinckx-Rice [this message]
2019-07-13  0:59       ` Ivan Petkov
2019-07-12 17:27     ` Tobias Geerinckx-Rice
2019-07-12 17:34       ` Tobias Geerinckx-Rice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87k1cn411s.fsf@nckx \
    --to=me@tobias.gr \
    --cc=36614-done@debbugs.gnu.org \
    --cc=ivanppetkov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).