qusal/salt/qubes-builder
Ben Grande 1a72665a40
feat: add split-gpg2 configuration
Users must migrated their keys from ~/.gnupg to the value of
isolated_gnupg_homedirs.
2024-06-17 14:31:51 +02:00
..
files feat: add split-gpg2 configuration 2024-06-17 14:31:51 +02:00
clone.sls refactor: initial commit 2023-11-13 14:33:28 +00:00
clone.top refactor: initial commit 2023-11-13 14:33:28 +00:00
configure-qubes-executor.sls chore: copyright update 2024-01-29 16:49:54 +01:00
configure-qubes-executor.top refactor: initial commit 2023-11-13 14:33:28 +00:00
configure.sls fix: signature check breaks qubes-builder update 2024-06-14 19:11:16 +02:00
configure.top refactor: initial commit 2023-11-13 14:33:28 +00:00
create.sls fix: install salt depends in fedora-39-minimal 2024-03-23 22:09:49 +01:00
create.top refactor: initial commit 2023-11-13 14:33:28 +00:00
init.sls refactor: initial commit 2023-11-13 14:33:28 +00:00
init.top refactor: initial commit 2023-11-13 14:33:28 +00:00
install-qubes-executor.sls fix: Fedora 40 only has wget2 2024-06-13 14:01:35 +02:00
install-qubes-executor.top refactor: initial commit 2023-11-13 14:33:28 +00:00
install.sls fix: signature check breaks qubes-builder update 2024-06-14 19:11:16 +02:00
install.top refactor: initial commit 2023-11-13 14:33:28 +00:00
prefs.sls fix: install salt depends in fedora-39-minimal 2024-03-23 22:09:49 +01:00
prefs.top fix: install salt depends in fedora-39-minimal 2024-03-23 22:09:49 +01:00
README.md fix: signature check breaks qubes-builder update 2024-06-14 19:11:16 +02:00

qubes-builder

Setup Qubes OS Builder V2 in Qubes OS itself.

Table of Contents

Description

Setup a Builder qube named "qubes-builder" and a disposable template for Qubes Executor named "dvm-qubes-builder". It is possible to use any of the available executors: docker, podman, qubes-executor.

During installation, after cloning the qubes-builderv2 repository, signatures will be verified and the installation will fail if the signatures couldn't be verified. Packages necessary for split operations such as split-gpg2, spit-git and split-ssh-agent will also be installed.

Installation

The template is based on Fedora Minimal and not Debian Minimal due to the Qubes Executor lacking some dependencies on Debian such as mock. Even if the builder qube was Debian based, the executor qube still needs to be a Fedora template.

  • Top
sudo qubesctl top.enable qubes-builder
sudo qubesctl --targets=tpl-qubes-builder,dvm-qubes-builder,qubes-builder state.apply
sudo qubesctl top.disable qubes-builder
sudo qubesctl state.apply qubes-builder.prefs
  • State
sudo qubesctl state.apply qubes-builder.create
sudo qubesctl --skip-dom0 --targets=tpl-qubes-builder state.apply qubes-builder.install
sudo qubesctl state.apply qubes-builder.prefs
sudo qubesctl --skip-dom0 --targets=dvm-qubes-builder state.apply qubes-builder.configure-qubes-executor
sudo qubesctl --skip-dom0 --targets=qubes-builder state.apply qubes-builder.configure

Access Control

The policy is based on qubes-builderv2/rpc/50-qubesbuilder.policy. Extra services added are qubes.Gpg2, qusal.GitInit, qusal.GitFetch, qusal.GitPush, qusal.SshAgent. Necessary services are allowed to have an 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:

gpg --homedir "$HOME/.gnupg/qubes-builder" --import KEY

Builder configuration

When using the Qubes Executor, configure the builder.yml dispvm option to either dom0 or dvm-qubes-builder:

include:
  - example-configs/desired-config.yml

executor:
  type: qubes
  options:
    dispvm: "dom0"
    #dispvm: "dvm-qubes-builder"

Setting the Disposable VM to Dom0 works because it will use the default_dispvm preference of qubes-builder, which is dvm-qubes-builder.