public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Eli Schwartz <eschwartz@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 1/2] sec-keys.eclass: new eclass
Date: Wed, 27 Nov 2024 23:24:53 -0500	[thread overview]
Message-ID: <5612b61e-a2dd-46ec-87c5-3a5314ef2fe6@gentoo.org> (raw)
In-Reply-To: <796bd145558001d054ee56ec23eed31385ae453a.camel@gentoo.org>


[-- Attachment #1.1: Type: text/plain, Size: 1684 bytes --]

On 11/27/24 4:12 PM, Michał Górny wrote:
> On Wed, 2024-11-27 at 15:30 -0500, Eli Schwartz wrote:
>> The current state of verify-sig support is a bit awkward. We rely on
>> validating distfiles against a known trusted keyring, but creating the
>> known trusted keyring is basically all manual verification. We somehow
>> decide an ascii armored key is good enough without any portage
>> assistance, then arrange to download it and trust it by Manifest hash.
>> How do we know when updating a key is actually safe?
>>
>> This eclass handles the problem in a manner inspired in part by pacman.
>> We require an eclass variable that lists all permitted PGP fingerprints,
>> and the eclass is responsible checking that list against the keys we
>> will install. It comes with a mechanism for computing SRC_URI for a
>> couple of well known locations, or you can append your own in the
>> ebuild.
> 
> How about adding a src_test() that would check if the key needs bumping,
> i.e. if an online update triggers any meaningful changes?


This is a really nice suggestion. I used Sam's tip about pgpdump, so
that we print a diff after the online update, and fail if diff produces
a diff.

We use a cleaned and minimized version of the key, so it will only
show/trigger on changes to the uid or self-sig packets, which isn't
exactly the same as "meaningful changes". For example, running the tests
on the gnutls keyring in the second patch, Daiki's key has been updated
on Ubuntu with an additional expiry date change for a secondary uid,
which may be meaningful in certain senses but we can validate it just
fine using the primary uid.


-- 
Eli Schwartz

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  parent reply	other threads:[~2024-11-28  4:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27 20:30 [gentoo-dev] [PATCH 1/2] sec-keys.eclass: new eclass Eli Schwartz
2024-11-27 20:30 ` [gentoo-dev] [PATCH 2/2] sec-keys/openpgp-keys-gnutls: update to use sec-keys.eclass Eli Schwartz
2024-11-27 21:12 ` [gentoo-dev] [PATCH 1/2] sec-keys.eclass: new eclass Michał Górny
2024-11-27 21:52   ` Sam James
2024-11-28  4:24   ` Eli Schwartz [this message]
2024-11-27 21:57 ` Sam James
2024-11-28  4:17   ` Eli Schwartz
2024-11-28  4:32 ` [gentoo-dev] [PATCH v2 0/2] sec-keys.eclass Eli Schwartz
2024-11-28  4:32   ` [gentoo-dev] [PATCH v2 1/2] sec-keys.eclass: new eclass Eli Schwartz
2024-11-28 13:10     ` Michał Górny
2024-11-28 15:36       ` Eli Schwartz
2024-11-28 16:42         ` Michał Górny
2024-11-28 16:56         ` Sam James
2024-11-28 17:06           ` Michał Górny
2024-11-28 17:22             ` Sam James
2024-11-29 18:31         ` Robin H. Johnson
2024-11-29 19:02           ` Eli Schwartz
2024-11-29  7:30     ` Florian Schmaus
2024-11-28  4:32   ` [gentoo-dev] [PATCH v2 2/2] sec-keys/openpgp-keys-gnutls: update to use sec-keys.eclass Eli Schwartz
2024-11-28 10:35 ` [gentoo-dev] [PATCH 1/2] sec-keys.eclass: new eclass Ulrich Müller
2024-11-28 15:36   ` Eli Schwartz

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

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

  git send-email \
    --in-reply-to=5612b61e-a2dd-46ec-87c5-3a5314ef2fe6@gentoo.org \
    --to=eschwartz@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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