mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2025-10-13 19:10:47 -04:00
Use console lexer instead of bash with a prompt
This commit is contained in:
parent
d541882733
commit
fa7a62b529
49 changed files with 276 additions and 267 deletions
|
@ -17,7 +17,7 @@ The best way to write and contribute code is to create a git repo somewhere (e.g
|
|||
|
||||
**Example:**
|
||||
|
||||
.. code:: bash
|
||||
.. code:: console
|
||||
|
||||
$ cd qubes-builder/artifacts/sources/qubes-manager
|
||||
$ git remote add abel git@GitHub.com:abeluck/qubes-manager.git
|
||||
|
@ -290,7 +290,7 @@ You will also need to setup qrexec policy in dom0 (``/etc/qubes-rpc/policy/local
|
|||
|
||||
Usage:
|
||||
|
||||
.. code:: bash
|
||||
.. code:: console
|
||||
|
||||
[user@source core-agent-linux]$ git remote add testbuilder "ext::git-qrexec testbuilder 3 core-agent-linux"
|
||||
[user@source core-agent-linux]$ git push testbuilder master
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
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/>`__.
|
||||
|
@ -9,11 +10,13 @@ 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.
|
||||
|
@ -24,14 +27,7 @@ This is a simple setup using a docker executor. This is a good default choice; i
|
|||
|
||||
- for Fedora, use:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ 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:: console
|
||||
|
||||
$ sudo apt install $(cat dependencies-debian.txt)
|
||||
$ test -f /usr/share/qubes/marker-vm && sudo apt install qubes-gpg-split
|
||||
|
@ -45,9 +41,10 @@ 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
|
||||
.. code:: console
|
||||
|
||||
$ sudo usermod -aG docker user
|
||||
|
||||
|
@ -55,7 +52,7 @@ This is a simple setup using a docker executor. This is a good default choice; i
|
|||
|
||||
5. Finally, you need to generate a docker image:
|
||||
|
||||
.. code:: bash
|
||||
.. code:: console
|
||||
|
||||
$ tools/generate-container-image.sh docker
|
||||
|
||||
|
@ -65,9 +62,14 @@ 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
|
||||
|
@ -75,56 +77,63 @@ 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
|
||||
.. code:: console
|
||||
|
||||
$ ./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:
|
||||
|
||||
.. code:: bash
|
||||
.. code:: console
|
||||
|
||||
$ ./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
|
||||
.. code:: console
|
||||
|
||||
$ ./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
|
||||
.. code:: console
|
||||
|
||||
$ ./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.
|
||||
|
|
|
@ -32,7 +32,7 @@ Create a standalone AppVM from the Fedora template. Set private storage to at le
|
|||
|
||||
Once you’ve built the development AppVM, open a Terminal window to it and install the necessary dependencies (see :doc:`QubesBuilder </developer/building/qubes-builder>` for more info):
|
||||
|
||||
.. code:: bash
|
||||
.. code:: console
|
||||
|
||||
$ sudo dnf install git createrepo rpm-build rpm-sign make python3-sh rpmdevtools rpm-sign dialog perl-open python3-pyyaml perl-Digest-MD5 perl-Digest-SHA
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue