-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: signature check breaks qubes-builder update
The state module git.latest does not allow setting environment variable for us to set the correct GNUPGHOME. The module environ.set does not work as we call git as the normal user and not as root, but may still be the problem of git.latest not respecting environment variables. The problem with always pulling new commits is that it may conflict with the current work the user has done on the repository locally. It will also not work in case the last commit is not signed by a trusted key deployed by the formula, in this case, you should add the key manually to verify the commit. Setting the gpg.program only for the required repositories solves the aforementioned problem and also enhances usability by removing extra commands that the user needs to learn and remember. Fixes: #58
- Loading branch information
1 parent
afcb730
commit ba5b481
Showing
5 changed files
with
68 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,9 @@ Setup Qubes OS Builder V2 in Qubes OS itself. | |
* [Installation](#installation) | ||
* [Access Control](#access-control) | ||
* [Usage](#usage) | ||
* [Pulling new commits](#pulling-new-commits) | ||
* [Add PGP public key to qubes-builder GPG home directory](#add-pgp-public-key-to-qubes-builder-gpg-home-directory) | ||
* [Builder configuration](#builder-configuration) | ||
* [Update repository safely](#update-repository-safely) | ||
|
||
## Description | ||
|
||
|
@@ -58,6 +59,19 @@ unattended build. | |
|
||
## Usage | ||
|
||
### Pulling new commits | ||
|
||
The installation will clone the repository but not pull new commits. You will | ||
need to pull new commits from time to time, their signature will be | ||
automatically verified before merging them to your git index. | ||
|
||
### Add PGP public key to qubes-builder GPG home directory | ||
|
||
If you need to pull commits signed by someone with a key not deployed by | ||
default, import their key to the GPG home directory of qubes-builder: | ||
```sh | ||
gpg --homedir "$HOME/.gnupg/qubes-builder" --import KEY | ||
``` | ||
### Builder configuration | ||
|
||
When using the Qubes Executor, configure the `builder.yml` `dispvm` option to | ||
|
@@ -74,15 +88,3 @@ executor: | |
``` | ||
Setting the Disposable VM to Dom0 works because it will use the | ||
`default_dispvm` preference of `qubes-builder`, which is `dvm-qubes-builder`. | ||
|
||
### Update repository safely | ||
|
||
If you need to pull new commits, set `GNUPGHOME` to | ||
`/home/user/.gnupg/qubes-builder`, the provided gitconfig enforces signature | ||
verification on git merges: | ||
```sh | ||
GNUPGHOME="$HOME/.gnupg/qubes-builder" git pull | ||
Commit 7c37bb7 has a good GPG signature by Frederic Pierret (fepitre) | ||
<[email protected]> | ||
... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
# SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
set -eu | ||
env GNUPGHOME="$HOME/.gnupg/qubes-builder" gpg2 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters