Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 438178 - dev-util/catalyst should gpg sign the DIGESTS file
Summary: dev-util/catalyst should gpg sign the DIGESTS file
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-12 22:27 UTC by Rick Farina (Zero_Chaos)
Modified: 2015-10-11 17:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Farina (Zero_Chaos) gentoo-dev 2012-10-12 22:27:20 UTC
it would be great if catalyst could automatically sign the DIGEST files something like this:

gpg --clearsign -o gentoo-13.iso.DIGESTS.asc gentoo-13.DIGESTS && mv gentoo-13.iso.DIGESTS.asc gentoo-13.iso.DIGESTS

This feature could be off by default but since the gentoo releases are always signed and catalyst doesn't do that, it would be a great enhancement if it could do this.
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2012-10-13 19:10:58 UTC
it would be best to parse make.conf and read FEATURES="sign" and the potentially needed GPG_* variables from portage.  I figure if you have FEATURES="sign" working for portage that should be enough to make all this work, and if you sign for portage you likely want to sign for catalyst as well.
Comment 2 Zac Medico gentoo-dev 2012-10-13 19:16:52 UTC
(In reply to comment #0)
> gpg --clearsign -o gentoo-13.iso.DIGESTS.asc gentoo-13.DIGESTS && mv
> gentoo-13.iso.DIGESTS.asc gentoo-13.iso.DIGESTS

I would suggest to put the signature in a separate file, so that DIGESTS can still be parsed by checksum verifiers like `md5sum -C DIGESTS`. For portage tree snapshots, we do use a command like this:

gpg --batch -u "${SIGNKEYID}" --armor --detach-sign --output "$f".gpgsig "$f"

(In reply to comment #1)
> it would be best to parse make.conf and read FEATURES="sign" and the
> potentially needed GPG_* variables from portage.  I figure if you have
> FEATURES="sign" working for portage that should be enough to make all this
> work, and if you sign for portage you likely want to sign for catalyst as
> well.

To get the portage config, you could use some code like this:

import portage
if "sign" in portage.settings.get("FEATURES", "").split():
    gpg_dir = portage.settings.get("PORTAGE_GPG_DIR")
    gpg_key = portage.settings.get("PORTAGE_GPG_KEY")
Comment 3 Rick Farina (Zero_Chaos) gentoo-dev 2012-10-13 19:19:17 UTC
the original idea of overwriting the DIGESTS file may not be the best as it causes this ugly warning to appear when verifying DIGESTS:

md5sum: WARNING: 26 lines are improperly formatted

Perhaps to keep it named .asc or something else entirely but overwriting .DIGESTS appears to be a "bad idea"