From: Vagrant Cascadian <vagrant@debian.org>
To: jgart <jgart@dismail.de>, Guix Help <help-guix@gnu.org>
Subject: Re: How do I verify my hashes?
Date: Sat, 09 Jul 2022 21:13:08 -0700 [thread overview]
Message-ID: <87wnclppuz.fsf@contorta> (raw)
In-Reply-To: <20220709211259.GB25347@gac>
[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]
On 2022-07-09, jgart@dismail.de wrote:
> Today Bonface mentioned to me that I should be cloning my packages and
> verifying the hashes with `git hash-object` or `git hash` iirc?
probably "guix hash"
> Do others do this when packaging?
>
> My workflow currently is the lazy way:
>
> 1. I change the version in the package definition.
>
> 2. build the package
>
> 3. package blows up on stdout
>
> 4. I retrieve the hash and add it
>
> 5. profit!
Profit, for whom? Whoever injected the cryptocurrency malware? :P
My workflow for git-based things is typically:
1. git clone https://example.org/someproject.git && cd someproject
2. git co -b VERSION-local VERSION
3. git diff OLDVERSION..NEWVERSION
4. git clean -dfx # make sure the working tree is totally clean
5. guix hash -rx .
Step 3, even if I don't completely understand the code, I can at least
check for (problematic) license changes or maybe something "obviously"
wrong.
Similar steps for tarballs-based projects, though you may need to unpack
and/or diffoscope the sources for step 3.
I don't have a good idea how to verify pypi or similar origins... but
you could at least double-check the sources of the old and new versions
with something like:
1. guix build --source # before you update the hash
2. update version, build, get new hash, update hash ...
3. guix build --source # after updating the hash
4. diffoscope OLDSOURCE NEWSOURCE
And do a best effort check for issues...
live well,
vagrant
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2022-07-10 4:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-10 2:12 How do I verify my hashes? jgart
2022-07-10 4:13 ` Vagrant Cascadian [this message]
2022-07-10 10:09 ` Csepp
2022-07-10 13:25 ` indieterminacy
2022-07-10 16:59 ` jgart
2022-07-14 8:52 ` Munyoki Kilyungi
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=87wnclppuz.fsf@contorta \
--to=vagrant@debian.org \
--cc=help-guix@gnu.org \
--cc=jgart@dismail.de \
/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.
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).