mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2025-08-10 23:50:24 -04:00
Migration: fix indented lists and raw html tables
All raw directives have been removed or replaced by reStructuredText list-tables.
This commit is contained in:
parent
ba609d123e
commit
19cc43f286
8 changed files with 299 additions and 1546 deletions
|
@ -2,7 +2,6 @@
|
|||
Qubes builder v2
|
||||
================
|
||||
|
||||
|
||||
This is a brief introduction to using Qubes Builder v2 to work with Qubes OS sources. It will walk you through installing and configuring Builder v2, and using it to fetch and build Qubes OS packages.
|
||||
|
||||
For details and customization, use `Qubes OS v2 builder documentation <https://github.com/QubesOS/qubes-builderv2/>`__.
|
||||
|
@ -10,13 +9,11 @@ For details and customization, use `Qubes OS v2 builder documentation <https://g
|
|||
Overview
|
||||
--------
|
||||
|
||||
|
||||
In the second generation of Qubes OS builder, container or disposable qube isolation is used to perform every stage of the build and release process. From fetching sources to building, everything is executed inside an isolated *cage* (either a disposable or a container) using an *executor*. For every command that needs to perform an action on sources, like cloning and verifying Git repos, rendering a SPEC file, generating SRPM or Debian source packages, a new cage is used. Only the signing, publishing, and uploading stages are executed locally outside a cage.
|
||||
|
||||
Setup
|
||||
-----
|
||||
|
||||
|
||||
This is a simple setup using a docker executor. This is a good default choice; if you don’t know which executor to use, use docker.
|
||||
|
||||
1. First, decide what qube you are going to use when working with Qubes Builder v2. It can be an AppVM or a Standalone qube, with some steps different between the two.
|
||||
|
@ -25,30 +22,21 @@ This is a simple setup using a docker executor. This is a good default choice; i
|
|||
|
||||
- If you want to use an app qube for developing, install dependencies in the template. If you are using a standalone, install them in the qube itself. Dependencies are specified in ``dependencies-*. txt`` files in the main builder directory, and you can install them easily in the following ways:
|
||||
|
||||
- for Fedora, use:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
1. for Fedora, use:
|
||||
$ sudo dnf install $(cat dependencies-fedora.txt)
|
||||
$ test -f /usr/share/qubes/marker-vm && sudo dnf install qubes-gpg-split
|
||||
|
||||
- for Debian (note: some Debian packages require Debian version 13 or later), use:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
.. code:: bash
|
||||
$ sudo apt install $(cat dependencies-debian.txt)
|
||||
$ test -f /usr/share/qubes/marker-vm && sudo apt install qubes-gpg-split
|
||||
|
||||
$ sudo dnf install $(cat dependencies-fedora.txt)
|
||||
$ test -f /usr/share/qubes/marker-vm && sudo dnf install qubes-gpg-split
|
||||
|
||||
|
||||
2. for Debian (note: some Debian packages require Debian version 13 or later), use:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ sudo apt install $(cat dependencies-debian.txt)
|
||||
$ test -f /usr/share/qubes/marker-vm && sudo apt install qubes-gpg-split
|
||||
|
||||
If you have installed dependencies in the template, close it, and (re)start the development qube.
|
||||
- If you have installed dependencies in the template, close it, and (re)start the development qube.
|
||||
|
||||
3. Clone the qubes-builder v2 repository into a location of your choice:
|
||||
|
||||
|
@ -57,7 +45,6 @@ This is a simple setup using a docker executor. This is a good default choice; i
|
|||
git clone https://github.com/QubesOS/qubes-builderv2
|
||||
cd qubes-builderv2/
|
||||
|
||||
|
||||
4. If you haven’t previously used docker in the current qube, you need to set up some permissions. In particular, the user has to be added to the ``docker`` group:
|
||||
|
||||
.. code:: bash
|
||||
|
@ -78,14 +65,9 @@ This is a simple setup using a docker executor. This is a good default choice; i
|
|||
|
||||
binds+=( '/var/lib/docker' )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
|
||||
To use Qubes OS Builder v2, you need to have a ``builder.yml`` configuration file. You can use one of the sample files from the ``example-configs/`` directory; for a more readable ``builder.yml``, you can also include one of the files from that directory in your ``builder.yml``. An example ``builder.yml`` is:
|
||||
|
||||
.. code:: bash
|
||||
|
@ -93,42 +75,38 @@ To use Qubes OS Builder v2, you need to have a ``builder.yml`` configuration fil
|
|||
# include configuration relevant for the current release
|
||||
include:
|
||||
- example-configs/qubes-os-r4.2.yml
|
||||
|
||||
|
||||
# which repository to use to fetch sources
|
||||
use-qubes-repo:
|
||||
version: 4.2
|
||||
testing: true
|
||||
|
||||
|
||||
# each package built will have local build number appended to package release
|
||||
# number. It makes it easier to update in testing environment
|
||||
increment-devel-versions: true
|
||||
|
||||
|
||||
# reduce output
|
||||
debug: false
|
||||
|
||||
|
||||
# this can be set to true if you do not want sources to be automatically
|
||||
# fetched from git
|
||||
skip-git-fetch: false
|
||||
|
||||
|
||||
# executor configuration
|
||||
executor:
|
||||
type: docker
|
||||
options:
|
||||
image: "qubes-builder-fedora:latest"
|
||||
|
||||
|
||||
|
||||
Using Builder v2
|
||||
----------------
|
||||
|
||||
|
||||
To fetch sources - in this example, for the ``core-admin-client`` package, you can use the following command:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ ./qb -c core-admin-client package fetch
|
||||
|
||||
|
||||
This will fetch the sources for the listed package and place them in ``artifacts/sources`` directory.
|
||||
|
||||
To build a package (from sources in the ``artifacts/sources`` directory), use:
|
||||
|
@ -137,19 +115,16 @@ To build a package (from sources in the ``artifacts/sources`` directory), use:
|
|||
|
||||
$ ./qb -c core-admin-client package fetch prep build
|
||||
|
||||
|
||||
or, if you want to build for a specific target (``host-fc37`` is a ``dom0`` using Fedora 37, ``vm-fc40`` would be a qube using Fedora 40 etc.), use:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ ./qb -c core-admin-client -d host-fc37 package fetch prep build
|
||||
|
||||
|
||||
If you want to fetch the entire Qubes OS source use the following:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ ./qb package fetch
|
||||
|
||||
|
||||
**caution**: some repositories might have additional requirements. You can disable repositories that are not needed in the ``example-configs/*.yml`` file you are using by commenting them out. In particular, ``python-fido2``, ``lvm`` and ``windows``-related repositories have special requirements.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue