kisslinux / kiss

KISS Linux - Package Manager
https://kisslinux.github.io
MIT License
465 stars 62 forks source link

Enable signature support in 'kiss update'. #60

Closed dylanaraps closed 5 years ago

dylanaraps commented 5 years ago

From now all commits to the kisslinux repositories are signed. This is further enforced by GitHub using branch protections to deny any unsigned commits.

On kiss update a git fetch and git merge --verify-signatures will be done in place of git pull. This only allows a merge of remote changes if

1) commits are signed. 2) commits can be verified.

Signing will also be an opt-in feature to begin. This allows a testing period for existing users with an easy method of reverting back to the current update process.

I'm leaning towards this being the default afterwards though I'm still thinking about it.


Hurdles to overcome before this will reach users:

Notes:

dylanaraps commented 5 years ago

Was just informed of this tool: https://z3bra.org/sick

Leaving this here as a note.

dylanaraps commented 5 years ago

NOTE: this will also involve signing the kiss-chroot tarballs.

dylanaraps commented 5 years ago

Repository signing is fully functional as of kiss 0.41.1, however it is currently opt-in.

This is an example update (just a single new commit).

-> Updating repositories
-> /var/db/kiss/repo Updating repository
-> /var/db/kiss/repo Need root to update
Commit 41f27e0 has a good GPG signature by Dylan Araps <dylan.araps@gmail.com>
Updating e2c00a9..41f27e0
Fast-forward
 core/kiss/checksums | 2 +-
 core/kiss/sources   | 2 +-
 core/kiss/version   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
-> Checking for new package versions
-> Everything is up to date

The specific line to look at is:

Commit 41f27e0 has a good GPG signature by Dylan Araps <dylan.araps@gmail.com>
dylanaraps commented 5 years ago

Opting into package signing for the system-wide repository:

NOTE: sudo/root is required to use signing with /var/db/kiss/repo, as root is needed to pull system-wide updates. You can alternatively clone https://github.com/kisslinux/repo somewhere in your $HOME and modify $KISS_PATH to do this solely as a normal user.

NOTE: root is only used during updates to run git fetch, git merge (runs gpg) and to install packages.

1) Run kiss u beforehand and ensure your repositories are up to date.

Use of kiss u will now verify signatures for the system repositories.

dylanaraps commented 5 years ago

dylanaraps commented 5 years ago

This is done.