Better instructions to build packages.

This commit is contained in:
Manuel Amador (Rudd-O) 2024-02-06 02:54:35 +00:00
parent cf2945e742
commit e5534a5225

View File

@ -109,7 +109,7 @@ Here are documents that will help you take advantage of Qubes network server:
* [Setting up your first server](doc/Setting up your first server.md) * [Setting up your first server](doc/Setting up your first server.md)
* [Setting up an SSH server](doc/Setting up an SSH server.md) * [Setting up an SSH server](doc/Setting up an SSH server.md)
## Installation of packages ## Setup
Package installation consists of two steps (**the package creation instructions are below**): Package installation consists of two steps (**the package creation instructions are below**):
@ -130,30 +130,38 @@ a terminal in your NetVM, then typing the following:
systemctl status qubes-routing-manager.service systemctl status qubes-routing-manager.service
``` ```
The routing manager should show as `enabled` and `active` in the terminal output. The routing manager should show as `enabled` and `active` in the terminal
output, with no errors. You can now follow the usage instructions above.
### How to build the packages to install ### How to build the packages to install
You will first build the `qubes-core-admin-addon-network-server` RPM. You will first build the `qubes-core-admin-addon-network-server` RPM.
To build this package, you will need to use a `chroot` jail containing To build this package, you will need to use a `chroot` jail containing
a Fedora installation of the exact same release as your `dom0` (Fedora 25 a Fedora installation of the exact same release as your `dom0` (Fedora 37
for Qubes release 4.0, Fedora 32 for Qubes release 4.1). for Qubes 4.2). You can do this using `toolbox` (for maximum safety
within a disposable qube):
Copy the source of the package to your `chroot`. Then start a shell in ```
your `chroot`, and type `make rpm`. You may have to install some packages dnf install -y toolbox
in your `chroot` -- use `dnf install git rpm-build make coreutils tar gawk findutils systemd systemd-rpm-macros` toolbox create -r 37
to get the minimum dependency set installed. toolbox enter fedora-toolbox-37
# Bam! You have a shell in an isolated Fedora 37 instance now.
```
Once built, in the source directory you will find the RPM built for the Within the toolbox, all your normal files from your home directory are
exact release of Qubes you need. visible. Change into the directory that contains this source code,
then type `make rpm`. You may have to install some packages within your
toolbox -- use `dnf install git rpm-build make coreutils tar gawk findutils systemd systemd-rpm-macros`
to get the minimum dependency set installed. Don't worry -- nothing within
the toolbox affects
Alternatively, you may first create a source RPM using `make srpm` on your Once built, in the source directory you will find the
regular workstation, then use `mock` to rebuild the source RPM produced `qubes-core-admin-addon-network-server` RPM built for your dom0.
in the source directory, using a Fedora release compatible with your `dom0`.
To build the `qubes-network-server` RPM, you can use a DisposableVM running To build the `qubes-network-server` RPM that goes in your template, you
the same Fedora release as your NetVM. Build said package as follows: can simply use a DisposableVM running the same Fedora release as your NetVM.
Build said package as follows:
``` ```
# Dependencies # Dependencies
@ -165,8 +173,8 @@ make rpm
``` ```
The process will output a `qubes-network-server-*.noarch.rpm` in the The process will output a `qubes-network-server-*.noarch.rpm` in the
directory where it ran. Fish it out and save it into the VM where you'll directory where it ran. Fish it out and copy it into the template where
install it. you'll install it.
You can power off the DisposableVM now. You can power off the DisposableVM now.