merelinux icon indicating copy to clipboard operation
merelinux copied to clipboard

Support digital signing and verification of packages

Open jhuntwork opened this issue 8 years ago • 9 comments

The initial libraries to support digital signing are present, but they are not implemented into the build system nor are any packages actually signed yet. Further investigation and testing needs to be done.

jhuntwork avatar Jun 10 '16 19:06 jhuntwork

If it's possible, I would like to suggest OpenBSD's signify for signing purposes. It seems to be a lot simpler than GPG.

subnut avatar Jun 14 '21 03:06 subnut

If it's possible, I would like to suggest OpenBSD's signify for signing purposes. It seems to be a lot simpler than GPG.

Nice, thanks for the suggestion. I'll take a look!

jhuntwork avatar Jun 14 '21 11:06 jhuntwork

So looking a little closer, gpg is pretty well embedded in the way pacman and its build script makepkg work. I think to get around that would probably require a lot of hacking that I'm not particularly interested in doing at the moment. I'll keep this issue open on the back burner, and possibly if someone looks a little deeper and has a suggestion about implementation, we can reconsider

jhuntwork avatar Aug 07 '21 13:08 jhuntwork

Surprisingly, it looks like pacman (or maybe it's gpgme) shells out to to the gpg binary to do validation of packages. If only the gpg binary is removed from the system, pacman cannot validate signed packages.

I expected that all that functionality would be available in the library and compiled directly into the pacman package. This means that we'd have to support gpg and its dependencies in the base system. Additionally, the pacman-key tool is actually a bash script which also sources and uses makepkg bash 'libraries', which means both another hard dependency on bash in the core system and makepkgs libs, neither of which I was expecting.

I'm going to back out the current changes to pacman (and maybe gnupg et al) and re-open this. This might also mean re-evaluating package managers again, or finishing the mere tool sooner rather than later.

jhuntwork avatar Sep 10 '21 14:09 jhuntwork

This may depend on #381

jhuntwork avatar Sep 19 '21 16:09 jhuntwork

This evening I played around with asignify. I was able to patch pacman to get it to use that for signature verification instead of gpgme. The current patch isn't very clean and I'm still reviewing the lib, but it was at least very promising. The work involved isn't too bad. I'll post here again as I have more updates.

jhuntwork avatar Dec 21 '21 03:12 jhuntwork

Submitted an initial set of patches upstream: https://lists.archlinux.org/pipermail/pacman-dev/2022-January/025439.html

jhuntwork avatar Jan 01 '22 21:01 jhuntwork

That's really interesting, thanks for the patch. I will test it on my side to see if all goes well.

Obarun avatar Feb 28 '22 08:02 Obarun

Nice, I'd love to hear how it goes!

I received some additional feedback from pacman devs about the patch here: https://lists.archlinux.org/pipermail/pacman-dev/2022-January/025496.html

Based on that I was going to look at an alternative patch that uses signify or minisign instead, but haven't had time to dive into it yet. Still, the above patch worked for me, and asignify seems like a fine lib, it just doesn't have wide usage yet.

jhuntwork avatar Feb 28 '22 13:02 jhuntwork

Added in #410

jhuntwork avatar Sep 23 '22 22:09 jhuntwork