diff --git a/_dev/conf.py b/_dev/conf.py
index 9f311f45..c643b145 100644
--- a/_dev/conf.py
+++ b/_dev/conf.py
@@ -186,7 +186,7 @@ htmlhelp_basename = 'QubesOSdev'
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
- 'python': ('http://docs.python.org/', None),
+ 'python': ('https://docs.python.org/', None),
# 'core-admin': ('https://dev.qubes-os.org/projects/core-admin/en/latest/', None),
}
diff --git a/developer/building/development-workflow.md b/developer/building/development-workflow.md
index dd72699a..5f1581bd 100644
--- a/developer/building/development-workflow.md
+++ b/developer/building/development-workflow.md
@@ -12,42 +12,41 @@ title: Development workflow
A workflow for developing Qubes OS+
-First things first, setup [QubesBuilder](/doc/qubes-builder/). This guide
-assumes you're using qubes-builder to build Qubes.
+To begin, setup [QubesBuilder](/doc/qubes-builder-v2/). This guide
+assumes you're using qubes-builder v2 to build Qubes.
## Repositories and committing Code
-Qubes is split into a bunch of git repos. These are all contained in the
-`qubes-src` directory under qubes-builder. Subdirectories there are separate
-components, stored in separate git repositories.
+Qubes source code is split into many git repos. These are all contained in the
+`artifacts/sources` directory under qubes-builder. Subdirectories there are
+separate components, stored in separate git repositories.
The best way to write and contribute code is to create a git repo somewhere
-(e.g., github) for the repo you are interested in editing (e.g.,
+(e.g., GitHub) for the repo you are interested in editing (e.g.,
`qubes-manager`, `core-agent-linux`, etc). To integrate your repo with the rest
of Qubes, cd to the repo directory and add your repository as a remote in git
**Example:**
~~~
-$ cd qubes-builder/qubes-src/qubes-manager
-$ git remote add abel git@github.com:abeluck/qubes-manager.git
+$ cd qubes-builder/artifacts/sources/qubes-manager
+$ git remote add abel git@GitHub.com:abeluck/qubes-manager.git
~~~
You can then proceed to easily develop in your own branches, pull in new
-commits from the dev branches, merge them, and eventually push to your own repo
-on github.
+commits from the dev branches, merge them, and eventually push to your own repo.
When you are ready to submit your changes to Qubes to be merged, push your
changes, then create a signed git tag (using `git tag -s`). Finally, send a
-letter to the Qubes listserv describing the changes and including the link to
-your repository. You can also create pull request on github. Don't forget to
-include your public PGP key you use to sign your tags.
+letter to the Qubes listserv describing the changes, and including a link to
+your repository. If you are using GitHub you can instead create a pull request.
+Don't forget to include the public PGP key you use to sign your tags.
### Kernel-specific notes
#### Prepare fresh version of kernel sources, with Qubes-specific patches applied
-In qubes-builder/qubes-src/linux-kernel:
+In `qubes-builder/artifacts/sources/linux-kernel`:
~~~
make prep
@@ -66,7 +65,7 @@ drwxr-xr-x 6 user user 4096 Nov 21 20:48 kernel-3.4.18/linux-obj
#### Go to the kernel tree and update the version
-In qubes-builder/qubes-src/linux-kernel:
+In `qubes-builder/artifacts/sources/linux-kernel`:
~~~
cd kernel-3.4.18/linux-3.4.18
@@ -74,14 +73,14 @@ cd kernel-3.4.18/linux-3.4.18
#### Changing the config
-In kernel-3.4.18/linux-3.4.18:
+In `kernel-3.4.18/linux-3.4.18`:
~~~
cp ../../config .config
make oldconfig
~~~
-Now change the configuration. For example, in kernel-3.4.18/linux-3.4.18:
+Now change the configuration. For example, in `kernel-3.4.18/linux-3.4.18`:
~~~
make menuconfig
@@ -117,9 +116,7 @@ vi series.conf
#### Building RPMs
-TODO: Is this step generic for all subsystems?
-
-Now it is a good moment to make sure you have changed kernel release name in
+Now is a good moment to make sure you have changed the kernel release name in
rel file. For example, if you change it to '1debug201211116c' the
resulting RPMs will be named
'kernel-3.4.18-1debug20121116c.pvops.qubes.x86\_64.rpm'. This will help
@@ -131,34 +128,23 @@ your changes locally.
To actually build RPMs, in qubes-builder:
~~~
-make linux-kernel
+./qb -c linux-kernel package fetch prep build
~~~
-RPMs will appear in qubes-src/linux-kernel/pkgs/fc20/x86\_64:
+RPMs will appear in
+`artifacts/repository/destination_name/package_name`
+(for example `artifacts/repository/host-fc37/linux-kernel-6.6.31-1.1/`
-~~~
--rw-rw-r-- 1 user user 42996126 Nov 17 04:08 kernel-3.4.18-1debug20121116c.pvops.qubes.x86_64.rpm
--rw-rw-r-- 1 user user 43001450 Nov 17 05:36 kernel-3.4.18-1debug20121117a.pvops.qubes.x86_64.rpm
--rw-rw-r-- 1 user user 8940138 Nov 17 04:08 kernel-devel-3.4.18-1debug20121116c.pvops.qubes.x86_64.rpm
--rw-rw-r-- 1 user user 8937818 Nov 17 05:36 kernel-devel-3.4.18-1debug20121117a.pvops.qubes.x86_64.rpm
--rw-rw-r-- 1 user user 54490741 Nov 17 04:08 kernel-qubes-vm-3.4.18-1debug20121116c.pvops.qubes.x86_64.rpm
--rw-rw-r-- 1 user user 54502117 Nov 17 05:37 kernel-qubes-vm-3.4.18-1debug20121117a.pvops.qubes.x86_64.rpm
-~~~
+### Useful [QubesBuilder](/doc/qubes-builder-v2/) commands
-### Useful [QubesBuilder](/doc/qubes-builder/) commands
-
-1. `make check` - will check if all the code was committed into repository and
-if all repository are tagged with signed tag.
-2. `make show-vtags` - show version of each component (based on git tags) -
-mostly useful just before building ISO. **Note:** this will not show version
-for components containing changes since last version tag.
-3. `make push` - push change from **all** repositories to git server. You must
-set proper remotes (see above) for all repositories first.
-4. `make prepare-merge` - fetch changes from remote repositories (can be
-specified on commandline via GIT\_SUBDIR or GIT\_REMOTE vars), (optionally)
-verify tags and show the changes. This do not merge the changes - there are
-left for review as FETCH\_HEAD ref. You can merge them using `git merge
-FETCH_HEAD` (in each repo directory). Or `make do-merge` to merge all of them.
+1. `./qb package diff` - show uncommitted changes
+2. ` ./qb repository check-release-status-for-component` and
+`./qb repository check-release-status-for-template` - show version of each
+ component/template (based on git tags)
+3. `./qb package sign` - sign built packages
+4. `./qb package publish` and `./qb package upload` - publish signed packages
+ and upload published
+ repository
## Copying Code to dom0
@@ -297,12 +283,12 @@ if [ "$1" = "tb" ]; then
exit $?
fi
-git remote add $1 git@github.com:$1/qubes-`basename $PWD`
+git remote add $1 git@GitHub.com:$1/qubes-`basename $PWD`
~~~
It should be executed from component top level directory. This script takes one
argument - remote name. If it is `tb`, then it creates qrexec-based git remote
-to `testbuilder` VM. Otherwise it creates remote pointing at github account of
+to `testbuilder` VM. Otherwise it creates remote pointing at GitHub account of
the same name. In any case it points at repository matching current directory
name.
@@ -321,7 +307,7 @@ current and current-testing).
### RPM packages - yum repo
-In source VM, grab [linux-yum](https://github.com/QubesOS/qubes-linux-yum) repository (below is assumed you've made it in
+In source VM, grab [linux-yum](https://GitHub.com/QubesOS/qubes-linux-yum) repository (below is assumed you've made it in
`~/repo-yum-upload` directory) and replace `update_repo.sh` script with:
~~~
@@ -337,7 +323,7 @@ find -type f -name '*.rpm' -delete
qrexec-client-vm $VMNAME local.UpdateYum
~~~
-In target VM, setup actual yum repository (also based on [linux-yum](https://github.com/QubesOS/qubes-linux-yum), this time
+In target VM, setup actual yum repository (also based on [linux-yum](https://GitHub.com/QubesOS/qubes-linux-yum), this time
without modifications). You will also need to setup some gpg key for signing
packages (it is possible to force yum to install unsigned packages, but it
isn't possible for `qubes-dom0-update` tool). Fill `~/.rpmmacros` with
@@ -417,7 +403,7 @@ Remember to also import gpg public key using `rpm --import`.
Steps are mostly the same as in the case of yum repo. The only details that differ:
-- use [linux-deb](https://github.com/QubesOS/qubes-linux-deb) instead of [linux-yum](https://github.com/QubesOS/qubes-linux-yum) as a base - both in source and target VM
+- use [linux-deb](https://GitHub.com/QubesOS/qubes-linux-deb) instead of [linux-yum](https://GitHub.com/QubesOS/qubes-linux-yum) as a base - both in source and target VM
- use different `update_repo.sh` script in source VM (below)
- use `local.UpdateApt` qrexec service in target VM (code below)
- in target VM additionally place `update-local-repo.sh` script in repository dir (code below)
diff --git a/developer/building/qubes-builder-details.md b/developer/building/qubes-builder-details.md
index f3582284..1f5e9f3f 100644
--- a/developer/building/qubes-builder-details.md
+++ b/developer/building/qubes-builder-details.md
@@ -10,6 +10,12 @@ ref: 65
title: Qubes builder details
---
+
+
+
+ Note: This information concerns the old Qubes builder (v1). It supports
+ only building Qubes 4.1 or earlier. The build process has been completely rewritten in qubes-builder v2. This can be used for building Qubes R4.1 and later, and all related components.
+
Components Makefile.builder file
--------------------------------
diff --git a/developer/building/qubes-builder-v2.md b/developer/building/qubes-builder-v2.md
new file mode 100644
index 00000000..2ad60e9f
--- /dev/null
+++ b/developer/building/qubes-builder-v2.md
@@ -0,0 +1,166 @@
+---
+lang: en
+layout: doc
+permalink: /doc/qubes-builder-v2/
+redirect_from:
+- /en/doc/qubes-builder-v2/
+- /doc/QubesBuilder2/
+- /wiki/QubesBuilder2/
+ref: 311
+title: 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/).
+
+# 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.
+
+2. Installing dependencies
+
+ - 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:
+ 1. for Fedora, use:
+
+ ```shell
+ $ 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:
+
+ ```shell
+ $ 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.
+
+3. Clone the qubes-builder v2 repository into a location of your choice:
+
+ ```shell
+ 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:
+
+ ```shell
+ $ sudo usermod -aG docker user
+ ```
+ Next, **restart the qube**.
+
+5. Finally, you need to generate a docker image:
+
+ ```shell
+ $ tools/generate-container-image.sh docker
+ ```
+
+ In an app qube, as `/var/lib/docker` is not persistent by default, you also
+ need to use [bind-dirs](/doc/bind-dirs/) to avoid repeating this step after reboot, adding
+ the following to the `/rw/config/qubes-bind-dirs.d/docker.conf` file in
+ this qube:
+
+ ```
+ 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:
+
+```
+# 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:
+
+```shell
+$ ./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:
+
+```shell
+$ ./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:
+
+```shell
+$ ./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:
+
+```shell
+$ ./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.
+
diff --git a/developer/building/qubes-builder.md b/developer/building/qubes-builder.md
index 035a36d3..58573dea 100644
--- a/developer/building/qubes-builder.md
+++ b/developer/building/qubes-builder.md
@@ -10,6 +10,12 @@ ref: 64
title: Qubes builder
---
+
+
+ Note: These instructions concern the older Qubes builder (v1). It supports
+ only building Qubes 4.2 or earlier. The build process has been completely rewritten in qubes-builder v2. This can be used for building Qubes R4.2 and later, and all related components.
+
+
**Note: See [ISO building instructions](/doc/qubes-iso-building/) for a streamlined overview on how to use the build system.**
diff --git a/developer/building/qubes-iso-building.md b/developer/building/qubes-iso-building.md
index fe9fb452..7b131bed 100644
--- a/developer/building/qubes-iso-building.md
+++ b/developer/building/qubes-iso-building.md
@@ -12,6 +12,12 @@ ref: 63
title: Qubes ISO building
---
+
+
+ Note: These instructions concern the older Qubes builder (v1). It supports
+ only building Qubes 4.2 or earlier. The build process has been completely rewritten in qubes-builder v2. This can be used for building Qubes R4.2 and later versions, and all related components.
+
+
Build Environment
-----------------
diff --git a/developer/code/code-signing.md b/developer/code/code-signing.md
index d22c3cf8..8074840d 100644
--- a/developer/code/code-signing.md
+++ b/developer/code/code-signing.md
@@ -65,7 +65,9 @@ Currently, [these](https://github.com/marmarek/signature-checker/blob/master/che
In the example below, we will use `keyserver.ubuntu.com`.
-Replace 6E2F4E7AF50A5827 with your key ID, which is the last 8 hex digits of the long number in the second line of the output above:
+Replace 6E2F4E7AF50A5827 with your key ID, preferably the **long keyID**
+which is the last 16 hex digits of the long number in the second line
+of the output above:
```
pub rsa3072 2021-12-30 [SC] [expires: 2023-12-30]
87975838063F97A968D503266E2F4E7AF50A5827
@@ -76,11 +78,6 @@ $ gpg --send-keys --keyserver hkps://keyserver.ubuntu.com 6E2F4E7AF50A5827
gpg: sending key 6E2F4E7AF50A5827 to hkps://keyserver.ubuntu.com
```
-```
-$ gpg --send-keys --keyserver hkps://keyserver.ubuntu.com 6E2F4E7AF50A5827
-gpg: sending key 6E2F4E7AF50A5827 to hkps://keyserver.ubuntu.com
-```
-
## Using PGP with Git
If you're submitting a patch via GitHub (or a similar Git server), please sign
@@ -147,9 +144,11 @@ Although GitHub adds a little green `Verified` button next to the commit, the [s
1. Is the commit signed?
If the commit is not signed, you can see the message
+
> policy/qubesos/code-signing — No signature found
2. If the commit is signed, the key is downloaded from a GPG key server.
If you can see the following error message, please check if you have uploaded the key to a key server.
+
> policy/qubesos/code-signing — Unable to verify (no valid key found)
### No Signature Found
diff --git a/developer/code/source-code.md b/developer/code/source-code.md
index 85e5cf13..83173e6c 100644
--- a/developer/code/source-code.md
+++ b/developer/code/source-code.md
@@ -60,6 +60,7 @@ method you choose, you must [sign your code](/doc/code-signing/) before it can b
* **Preferred**: Use GitHub's [fork & pull requests](https://guides.github.com/activities/forking/).
+
Opening a pull request on GitHub greatly eases the code review and tracking
process. In addition, especially for bigger changes, it's a good idea to send
a message to the [qubes-devel mailing list](/support/#qubes-devel) in order to notify people who
diff --git a/developer/debugging/automated-tests.md b/developer/debugging/automated-tests.md
index 38e4aca2..51870d97 100644
--- a/developer/debugging/automated-tests.md
+++ b/developer/debugging/automated-tests.md
@@ -132,7 +132,7 @@ Whereas integration tests are mostly stored in the [qubes-core-admin](https://gi
To for example run the `qubes-core-admin` unit tests, you currently have to clone at least [qubes-core-admin](https://github.com/QubesOS/qubes-core-admin) and
its dependency [qubes-core-qrexec](https://github.com/QubesOS/qubes-core-qrexec) repository in the branches that you want to test.
-The below example however will assume that you set up a build environment as described in the [Qubes Builder documentation](/doc/qubes-builder/).
+The below example however will assume that you set up a build environment as described in the [Qubes Builder documentation](/doc/qubes-builder-v2/).
Assuming you cloned the `qubes-builder` repository to your home directory inside a fedora VM, you can use the following commands to run the unit tests:
@@ -267,11 +267,13 @@ It feeds off of the openQA test data to make graph plots. Here is an example:

Some outputs:
+
- plot by tests
- plot by errors
- markdown
Some filters:
+
- filter by error
- filter by test name
diff --git a/developer/debugging/test-bench.md b/developer/debugging/test-bench.md
index ca48a5ea..66a072c5 100644
--- a/developer/debugging/test-bench.md
+++ b/developer/debugging/test-bench.md
@@ -205,9 +205,10 @@ pushd ${HOME}/builder >/dev/null
# the following are needed only if you have sources outside builder
#rm -rf qubes-src/core-admin
-#make COMPONENTS=core-admin get-sources
+#qb -c core-admin package fetch
-make core-admin
+qb -c core-admin -d host-fc41 prep build
+# update your dom0 fedora distribution as appropriate
qtb-install qubes-src/core-admin/rpm/x86_64/qubes-core-dom0-*.rpm
qtb-runtests
```
diff --git a/developer/debugging/vm-interface.md b/developer/debugging/vm-interface.md
index 9c54619d..dc33827c 100644
--- a/developer/debugging/vm-interface.md
+++ b/developer/debugging/vm-interface.md
@@ -22,18 +22,19 @@ Qubes VM have some settings set by dom0 based on VM settings. There are multiple
### Keys exposed by dom0 to VM
+- `/qubes-base-template` - base template
- `/qubes-vm-type` - VM type, the same as `type` field in `qvm-prefs`. One of `AppVM`, `ProxyVM`, `NetVM`, `TemplateVM`, `HVM`, `TemplateHVM`
- `/qubes-vm-updatable` - flag whether VM is updatable (whether changes in root.img will survive VM restart). One of `True`, `False`
- `/qubes-vm-persistence` - what data do persist between VM restarts:
- `full` - all disks
- `rw-only` - only `/rw` disk
- `none` - none
-- `/qubes-timezone - name of timezone based on dom0 timezone. For example `Europe/Warsaw`
+- `/qubes-timezone` - name of timezone based on dom0 timezone. For example `Europe/Warsaw`
- `/qubes-keyboard` (deprecated in R4.1) - keyboard layout based on dom0 layout. Its syntax is suitable for `xkbcomp` command (after expanding escape sequences like `\n` or `\t`). This is meant only as some default value, VM can ignore this option and choose its own keyboard layout (this is what keyboard setting from Qubes Manager does). This entry is created as part of gui-daemon initialization (so not available when gui-daemon disabled, or not started yet).
- `/keyboard-layout` - keyboard layout based on GuiVM layout. Its syntax can be `layout+variant+options`, `layout+variant`, `layout++options` or simply `layout`. For example, `fr+oss`, `pl++compose:caps` or `fr`. This is meant only as some default value, VM can ignore this option and choose its own keyboard layout (this is what keyboard setting from Qubes Manager does).
- `/qubes-debug-mode` - flag whether VM has debug mode enabled (qvm-prefs setting). One of `1`, `0`
- `/qubes-service/SERVICE_NAME` - subtree for VM services controlled from dom0 (using the `qvm-service` command or Qubes Manager). One of `1`, `0`. Note that not every service will be listed here, if entry is missing, it means "use VM default". A list of currently supported services is in the `qvm-service` man page.
-- `/qubes-netmask` - network mask (only when VM has netvm set); currently hardcoded "255.255.255.0"
+- `/qubes-netm ask` - network mask (only when VM has netvm set); currently hardcoded "255.255.255.0"
- `/qubes-ip` - IP address for this VM (only when VM has netvm set)
- `/qubes-gateway` - default gateway IP (only when VM has netvm set); VM should add host route to this address directly via eth0 (or whatever default interface name is)
- `/qubes-primary-dns` - primary DNS address (only when VM has netvm set)
diff --git a/developer/debugging/windows-debugging.md b/developer/debugging/windows-debugging.md
index 852d1c67..089dfecd 100644
--- a/developer/debugging/windows-debugging.md
+++ b/developer/debugging/windows-debugging.md
@@ -10,253 +10,80 @@ ref: 50
title: Windows debugging
---
-Debugging Windows code can be tricky in a virtualized environment. The guide below assumes Xen hypervisor and Windows 7 VMs.
+Debugging Windows code can be tricky in a virtualized environment. The guide below assumes Qubes 4.2 and Windows 7 or later VMs.
User-mode debugging is usually straightforward if it can be done on one machine. Just duplicate your normal debugging environment in the VM.
-Things get complicated if you need to perform kernel debugging or troubleshoot problems that only manifest on system boot, user logoff or similar. For that you need two Windows VMs: the *host* and the *target*. The *host* will contain [WinDbg](https://msdn.microsoft.com/en-us/library/windows/hardware/ff551063(v=vs.85).aspx) installation, your source code and private symbols. The *target* will run the code being debugged. Both will be linked by virtual serial ports.
+Things get complicated if you need to perform kernel debugging or troubleshoot problems that only manifest on system boot, user logoff or similar. For that you need two Windows VMs: the *host* and the *target*. The *host* will contain the debugger, your source code and private symbols. The *target* will run the code being debugged. We will use kernel debugging over network which is supported from Windows 7 onwards. The main caveat is that Windows kernel supports only specific network adapters for this, and the default one in Qubes won't work.
-- First, you need to prepare separate copies of both *target* and *host* VM configuration files with some changes. Copy the files from **/var/lib/qubes/appvms/vmname/vmname.conf** to some convenient location, let's call them **host.conf** and **target.conf**.
-- In both copied files add the following line at the end: `serial = 'pty'`. This will make Xen connect VM's serial ports to dom0's ptys.
-- From now on you need to start both VMs like this: `qvm-start --custom-config=/your/edited/host.conf host`
-- To connect both VM serial ports together you will either need [socat](http://www.dest-unreach.org/socat/) or a custom utility described later.
-- To determine which dom0 pty corresponds to VM's serial port you need to read xenstore, example script below:
+## Important note
-```bash
-#!/bin/sh
+- Do not install Xen network PV drivers in the target VM. Network kernel debugging needs a specific type of NIC or it won't work, the network PV drivers interfere with that.
-id1=$(xl domid "$1-dm")
-tty1=$(xenstore-read /local/domain/${id1}/device/console/3/tty)
-echo $tty1
-```
+- If you have kernel debugging active when the Xen PV drivers are being installed, make sure to disable it before rebooting (`bcdedit /set debug off`). You can re-enable debugging after the reboot. The OS won't boot otherwise. I'm not sure what's the exact cause. I know that busparams for the debugging NIC change when PV drivers are installed (see later), but even changing that accordingly in the debug settings doesn't help -- so it's best to disable debug for this one reboot.
-Pass it a running VM name and it will output the corresponding pty name.
+## Modifying the NIC of the target VM
-- To connect both ptys you can use [socat](http://www.dest-unreach.org/socat/) like that:
+You will need to create a custom libvirt config for the target VM. See [the documentation](https://dev.qubes-os.org/projects/core-admin/en/latest/libvirt.html) for overview of how libvirt templates work in Qubes. The following assumes the target VM is named `target-vm`.
-```bash
-#!/bin/sh
+- Edit `/usr/share/qubes/templates/libvirt/xen.xml` to prepare our custom config to override just the NIC part of the global template:
+ - add `{% raw %}{% block network %}{% endraw %}` before `{% raw %}{% if vm.netvm %}{% endraw %}`
+ - add `{% raw %}{% endblock %}{% endraw %}` after the matching `{% raw %}{% endif %}{% endraw %}`
+- Copy `/usr/share/qubes/templates/libvirt/devices/net.xml` to `/etc/qubes/templates/libvirt/xen/by-name/target-vm.xml`.
+- Add `` to the `` section.
+- Enclose everything within `{% raw %}{% block network %}{% endraw %}` + `{% raw %}{% endblock %}{% endraw %}`.
+- Add `{% raw %}{% extends 'libvirt/xen.xml' %}{% endraw %}` at the start.
+- The final `target-vm.xml` should look something like this:
-id1=$(xl domid "$1-dm")
-id2=$(xl domid "$2-dm")
-tty1=$(xenstore-read /local/domain/${id1}/device/console/3/tty)
-tty2=$(xenstore-read /local/domain/${id2}/device/console/3/tty)
-socat $tty1,raw $tty2,raw
-```
+~~~
+{% raw %}
+{% extends 'libvirt/xen.xml' %}
+{% block network %}
+
+
+
+
+
+
+
+{% endblock %}
+{% endraw %}
+~~~
-...but there is a catch. Xen seems to process the traffic that goes through serial ports and changes all **0x0a** bytes into **0x0d, 0x0a** pairs (newline conversion). I didn't find a way to turn that off (setting ptys to raw mode didn't change anything) and it's not mentioned anywhere on the Internet, so maybe it's something on my system. If the above script works for you then you don't need anything more in dom0.
+- Start `target-vm` and verify in the device manager that a "Intel PRO/1000 MT" adapter is present.
-- On the *target* system, run `bcdedit /set debug on` on the console to turn on kernel debugging. It defaults to the first serial port.
-- On the *host* system, install [WinDbg](http://msdn.microsoft.com/en-us/library/windows/hardware/ff551063(v=vs.85).aspx) and start the kernel debug (Ctrl-K), choose **com1** as the debug port.
-- Reboot the *target* VM.
-- Run the above shell script in dom0.
-- If everything is fine you should see the proper kernel debugging output in WinDbg. However, if you see something like that:
+## Host and target preparation
+
+- On `host-vm` you will need WinDbg, which is a part of the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/).
+- Copy the `Debuggers` directory from Windows SDK to `target-vm`.
+- In both `host-vm` and `target-vm` switch the windows network to private (it tends to be public by default).
+- Either turn off the windows firewall or enable all ICMP-in rules in both VMs.
+- In `firewall-vm` edit `/rw/config/qubes-firewall-user-script` to connect both Windows VMs, add:
+ - `iptables -I FORWARD 2 -s -d -j ACCEPT`
+ - `iptables -I FORWARD 2 -s -d -j ACCEPT`
+ - run `/rw/config/qubes-firewall-user-script` so the changes take effect immediately
+- Make sure both VMs can ping each other.
+- In `target-vm`:
+ - start elevated `cmd` session
+ - `cd sdk\Debuggers\x64`
+ - `kdnet` should show that the NIC is supported, note the busparams:
+
+ ~~~
+ Network debugging is supported on the following NICs:
+ busparams=0.6.0, Intel(R) PRO/1000 MT Network Connection, KDNET is running on this NIC.
+ ~~~
+
+ - `bcdedit /debug on`
+ - `bcdedit /dbgsettings net hostip: port:50000 key:1.1.1.1` (you can customize the key)
+ - `bcdedit /set "{dbgsettings}" busparams x.y.z` (use the busparams `kdnet` has shown earlier)
+- In `host-vm` start WinDbg: `windbg -k net:port=50000,key=1.1.1.1`. It will listen for target's connection.
+- Reboot `target-vm`, debugging should start:
~~~
- Opened \\.\com1
Waiting to reconnect...
- Connected to Windows 7 7601 x64 target at (Wed Mar 19 20:35:43.262 2014 (UTC + 1:00)), ptr64 TRUE
- Kernel Debugger connection established.
- Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols
- Executable search path is:
- ... Retry sending the same data packet for 64 times.
- The transport connection between host kernel debugger and target Windows seems lost.
- please try resync with target, recycle the host debugger, or reboot the target Windows.
- Unable to read KTHREAD address fffff8000281ccc0
- **************************************************************************
- Unable to read debugger data block header
- **************************************************************************
- Unable to read KTHREAD address fffff8000281ccc0
- Unable to read PsLoadedModuleList
- Unable to read KTHREAD address fffff8000281ccc0
- **************************************************************************
- Unable to read debugger data block header
- **************************************************************************
+ Connected to target 10.137.0.19 on port 50000 on local IP 10.137.0.20.
+ You can get the target MAC address by running .kdtargetmac command.
+ Connected to Windows 10 19041 x64 target at (Thu Aug 3 14:05:48.069 2023 (UTC + 2:00)), ptr64 TRUE
~~~
- ...then you're most likely a victim of the CRLF issue mentioned above. To get around it I wrote a small utility that basically does what socat would do and additionally corrects those replaced bytes in the stream. It's not pretty but it works:
-
-```c
-#include
-#include
-#include
-#include
-
-int fd1, fd2;
-char mark = ' ';
-
-void out(unsigned char c)
-{
- static int count = 0;
- static unsigned char buf[17] = {0};
-
- // relay to ouptput port
- write(fd2, &c, 1);
- fprintf(stderr, "%c", mark);
-
- /* dump all data going over the line
- if (count == 0)
- fprintf(stderr, "%c", mark);
- fprintf(stderr, "%02x ", c);
- if (c >= 0x20 && c < 0x80)
- buf[count] = c;
- else
- buf[count] = '.';
- count++;
- if (count == 0x10)
- {
- count = 0;
- fprintf(stderr, " %s\n", buf);
- }
- */
-}
-
-int main(int argc, char* argv[])
-{
- unsigned char c = 0;
- struct termios tio;
- ssize_t size;
-
- if (argc < 3)
- {
- fprintf(stderr, "Usage: %s pty1 pty2 [mark character]\n", argv[0]);
- return EINVAL;
- }
-
- fd1 = open(argv[1], O_RDONLY | O_NOCTTY);
- if (fd1 <= 0)
- {
- perror("open fd1");
- return errno;
- }
- fd2 = open(argv[2], O_WRONLY | O_NOCTTY);
- if (fd2 <= 0)
- {
- perror("open fd2");
- return errno;
- }
-/*
- // This doesn't make any difference which supports the theory
- // that it's Xen who corrupts the byte stream.
- cfmakeraw(&tio);
- if (tcsetattr(fd1, TCSANOW, &tio) < 0)
- {
- perror("tcsetattr 1");
- return errno;
- }
- if (tcsetattr(fd2, TCSANOW, &tio) < 0)
- {
- perror("tcsetattr 2");
- return errno;
- }
-*/
- if (argc == 4)
- mark = argv[3][0];
-
- while (1)
- {
- size = read(fd1, &c, 1);
- if (size <= 0)
- break;
-
-parse:
- if (c == 0x0d)
- {
- size = read(fd1, &c, 1);
- if (size <= 0)
- {
- out(0x0d);
- break;
- }
- if (c == 0x0a)
- {
- out(0x0a);
- }
- else
- {
- out(0x0d);
- goto parse;
- }
- }
- else
- out(c);
- }
-
- close(fd1);
- close(fd2);
- return 0;
-}
-```
-
-> This utility is a unidirectional relay so you need to run two instances to get duplex communication, like:
->
-> #!/bin/sh
->
-> id1=$(xl domid "$1-dm")
-> id2=$(xl domid "$2-dm")
-> tty1=$(xenstore-read /local/domain/${id1}/device/console/3/tty)
-> tty2=$(xenstore-read /local/domain/${id2}/device/console/3/tty)
-> ./ptycrlf ${tty1} ${tty2} - &
-> ./ptycrlf ${tty2} ${tty1} + &
-
-> With this everything should be good:
->
-> ~~~
-> Opened \\.\com1
-> Waiting to reconnect...
-> Connected to Windows 7 7601 x64 target at (Wed Mar 19 20:56:31.371 2014 (UTC + 1:00)), ptr64 TRUE
-> Kernel Debugger connection established.
-> Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols
-> Executable search path is:
-> Windows 7 Kernel Version 7601 MP (1 procs) Free x64
-> Built by: 7601.18247.amd64fre.win7sp1_gdr.130828-1532
-> Machine Name:
-> Kernel base = 0xfffff800`0261a000 PsLoadedModuleList = 0xfffff800`0285d6d0
-> System Uptime: not available
-> ~~~
-
-# Debugging HVMs in the Qubes R4.0
-
-There are two main issues to be adopted to get all things to work in the R4.0.
-
-## Add a virtual serial port
-
-Qemu in the stub domain with virtual serial port added in a recommended way (``````) fails to start (Could not open '/dev/hvc1': No such device). It seems like a lack of multiple xen consoles support/configuration. The only way that I have found is to attach serial port explicitly to the available console.
-
-1. Unpack stub domain in dom0:
-
-```shell_session
-$ mkdir stubroot
-$ cp /usr/lib/xen/boot/stubdom-linux-rootfs stubroot/stubdom-linux-rootfs.gz
-$ cd stubroot
-$ gunzip stubdom-linux-rootfs.gz
-$ cpio -i -d -H newc --no-absolute-filenames < stubdom-linux-rootfs
-$ rm stubdom-linux-rootfs
-```
-
-2. Edit Init script to remove last loop and to add "-serial /dev/hvc0" to the qemu command line.
-
-3. Apply changes:
-
-```shell_session
-$ find . -print0 | cpio --null -ov --format=newc | gzip -9 > ../stubdom-linux-rootfs
-$ sudo mv ../stubdom-linux-rootfs /usr/lib/xen/boot
-```
-
-## Connect two consoles
-
-Run the following script:
-
-```shell
-debugname1=win7new
-debugname2=win7dbg
-id1=$(xl domid "$debugname1-dm")
-id2=$(xl domid "$debugname2-dm")
-
-tty1=$(xenstore-read /local/domain/${id1}/console/tty)
-tty2=$(xenstore-read /local/domain/${id1}/console/tty)
-
-socat $tty1,raw $tty2,raw
-```
-
Happy debugging!
diff --git a/developer/general/devel-books.md b/developer/general/devel-books.md
index d7ae9ae0..361648ba 100644
--- a/developer/general/devel-books.md
+++ b/developer/general/devel-books.md
@@ -26,6 +26,6 @@ Below is a list of various books that might be useful in learning some basics ne
- _[Pro Git](https://git-scm.com/book/en/v2)_, by Scott Chacon and Ben Straub (complete book available free online)
- Useful books about Python:
- - _[Programming in Python 3](http://www.qtrac.eu/py3book.html)_, by Mark Summerfield
- - _[Rapid GUI Programming with Python and Qt](http://www.qtrac.eu/pyqtbook.html)_, by Mark Summerfield
+ - _[Programming in Python 3](https://www.qtrac.eu/py3book.html)_, by Mark Summerfield
+ - _[Rapid GUI Programming with Python and Qt](https://www.qtrac.eu/pyqtbook.html)_, by Mark Summerfield
(Although note that [Qt is being replaced by GTK](/doc/usability-ux/#gnome-kde-and-xfce) in Qubes code.)
diff --git a/developer/general/developing-gui-applications.md b/developer/general/developing-gui-applications.md
index 1ff0387c..19e60a1c 100644
--- a/developer/general/developing-gui-applications.md
+++ b/developer/general/developing-gui-applications.md
@@ -59,7 +59,7 @@ If error should be thrown, you need to provide the error code and name, for exam
b'2\x00QubesNoSuchPropertyError\x00\x00No such property\x00'
```
-For details of particular calls, you can use [Extending the mock Qubes object].
+For details of particular calls, you can use [Extending the mock Qubes object](#extending-the-mock-qubes-object).
## Available mocks
diff --git a/developer/general/documentation-style-guide.md b/developer/general/documentation-style-guide.md
index 84881663..79146d96 100644
--- a/developer/general/documentation-style-guide.md
+++ b/developer/general/documentation-style-guide.md
@@ -262,7 +262,7 @@ Duplicating documentation is almost always a bad idea. There are many reasons fo
### Core vs. external documentation
-Core documentation resides in the [Qubes OS Project's official repositories](https://github.com/QubesOS/), mainly in [qubes-doc](https://github.com/QubesOS/qubes-doc). External documentation can be anywhere else (such as forums, community websites, and blogs), but there is an especially large collection in the [Qubes Community](https://github.com/Qubes-Community) project. External documentation should not be submitted to [qubes-doc](https://github.com/QubesOS/qubes-doc). If you've written a piece of documentation that is not appropriate for [qubes-doc](https://github.com/QubesOS/qubes-doc), we encourage you to submit it to the [Qubes Community](https://github.com/Qubes-Community) project instead. However, *linking* to external documentation from [qubes-doc](https://github.com/QubesOS/qubes-doc) is perfectly fine. Indeed, the maintainers of the [Qubes Community](https://github.com/Qubes-Community) project should regularly submit PRs against the documentation index (see [How to edit the documentation index](/doc/how-to-edit-the-documentation/#how-to-edit-the-documentation-index)) to add and update Qubes Community links in the ["External documentation"](/doc/#external-documentation) section of the documentation table of contents.
+Core documentation resides in the [Qubes OS Project's official repositories](https://github.com/QubesOS/), mainly in [qubes-doc](https://github.com/QubesOS/qubes-doc). External documentation can be anywhere else (such as forums, community websites, and blogs), but there is an especially large collection in the [Qubes Forum](https://forum.qubes-os.org/docs). External documentation should not be submitted to [qubes-doc](https://github.com/QubesOS/qubes-doc). If you've written a piece of documentation that is not appropriate for [qubes-doc](https://github.com/QubesOS/qubes-doc), we encourage you to submit it to the [Qubes Forum](https://forum.qubes-os.org/docs) instead. However, *linking* to external documentation from [qubes-doc](https://github.com/QubesOS/qubes-doc) is perfectly fine. Indeed, the maintainers of the [Qubes Forum](https://forum.qubes-os.org/) should regularly submit PRs against the documentation index (see [How to edit the documentation index](/doc/how-to-edit-the-documentation/#how-to-edit-the-documentation-index)) to add and update Qubes Forum links in the ["External documentation"](/doc/#external-documentation) section of the documentation table of contents.
The main difference between **core** (or **official**) and **external** (or **community** or **unofficial**) documentation is whether it documents software that is officially written and maintained by the Qubes OS Project. The purpose of this distinction is to keep the core docs maintainable and high-quality by limiting them to the software output by the Qubes OS Project. In other words, we take responsibility for documenting all of the software we put out into the world, but it doesn't make sense for us to take on the responsibility of documenting or maintaining documentation for anything else. For example, Qubes OS may use a popular Linux distribution for an official [TemplateVM](/doc/templates/). However, it would not make sense for a comparatively small project like ours, with modest funding and a lean workforce, to attempt to document software belonging to a large, richly-funded project with an army of paid and volunteer contributors, especially when they probably already have documentation of their own. This is particularly true when it comes to Linux in general. Although many users who are new to Qubes are also new to Linux, it makes absolutely no sense for our comparatively tiny project to try to document Linux in general when there is already a plethora of documentation out there.
diff --git a/developer/general/gsoc.md b/developer/general/gsoc.md
index 9e4adad3..f1044aed 100644
--- a/developer/general/gsoc.md
+++ b/developer/general/gsoc.md
@@ -31,7 +31,7 @@ You should start learning the components that you plan on working on before the
Coming up with an interesting idea that you can realistically achieve in the time available to you (one summer) is probably the most difficult part. We strongly recommend getting involved in advance of the beginning of GSoC, and we will look favorably on applications from prospective contributors who have already started to act like free and open source developers.
-Before the summer starts, there are some preparatory tasks which are highly encouraged. First, if you aren't already, definitely start using Qubes as your primary OS as soon as possible! Also, it is encouraged that you become familiar and comfortable with the Qubes development workflow sooner than later. A good way to do this (and also a great way to stand out as an awesome applicant and make us want to accept you!) might be to pick up some issues from [qubes-issues](https://github.com/QubesOS/qubes-issues/issues) (our issue-tracking repo) and submit some patches addressing them. Some suitable issues might be those with tags ["help wanted" and "P: minor"](https://github.com/QubesOS/qubes-issues/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22P%3A%20minor%22%20label%3A%22help%20wanted%22) (although more significant things are also welcome, of course). Doing this will get you some practice with [qubes-builder](/doc/qubes-builder/), our code-signing policies, and some familiarity with our code base in general so you are ready to hit the ground running come summer.
+Before the summer starts, there are some preparatory tasks which are highly encouraged. First, if you aren't already, definitely start using Qubes as your primary OS as soon as possible! Also, it is encouraged that you become familiar and comfortable with the Qubes development workflow sooner than later. A good way to do this (and also a great way to stand out as an awesome applicant and make us want to accept you!) might be to pick up some issues from [qubes-issues](https://github.com/QubesOS/qubes-issues/issues) (our issue-tracking repo) and submit some patches addressing them. Some suitable issues might be those with tags ["help wanted" and "P: minor"](https://github.com/QubesOS/qubes-issues/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22P%3A%20minor%22%20label%3A%22help%20wanted%22) (although more significant things are also welcome, of course). Doing this will get you some practice with [qubes-builder](/doc/qubes-builder-v2/), our code-signing policies, and some familiarity with our code base in general so you are ready to hit the ground running come summer.
### Contributor proposal guidelines
@@ -174,45 +174,6 @@ If applicable, links to more information or discussions
**Mentor**: [Frédéric Pierret](/team/)
-
### Qubes Live USB
@@ -252,26 +213,6 @@ details: [#1552](https://github.com/QubesOS/qubes-issues/issues/1552),
**Mentor**: [Frédéric Pierret](/team/)
-
-
### LogVM(s)
**Project**: LogVM(s)
@@ -422,7 +363,7 @@ for more information and qubes-specific background.
**Difficulty**: medium
-**Knowledge prerequisite**: qubes-builder [[1]](/doc/qubes-builder/) [[2]](/doc/qubes-builder-details/) [[3]](https://github.com/QubesOS/qubes-builder/tree/master/doc), and efficient at introspecting complex systems: comfortable with tracing and debugging tools, ability to quickly identify and locate issues within a large codebase (upstream build tools), etc.
+**Knowledge prerequisite**: qubes-builder [[1]](/doc/qubes-builder-v2/) [[2]](https://github.com/QubesOS/qubes-builderv2), and efficient at introspecting complex systems: comfortable with tracing and debugging tools, ability to quickly identify and locate issues within a large codebase (upstream build tools), etc.
**Size of the project**: 350 hours
@@ -461,44 +402,6 @@ Some related discussion:
**Mentor**: [Marek Marczykowski-Górecki](/team/)
-
-
### Android development in Qubes
**Project**: Research running Android in Qubes VM (probably HVM) and connecting it to Android Studio
@@ -538,12 +441,14 @@ Since the Admin API is continuously growing and changing, continuous security as
A [Fuzzer](https://en.wikipedia.org/wiki/Fuzzing) would help to automate part of these assessments.
**Expected results**:
+
- fully automated & extensible Fuzzer for parts of the Admin API
- user & developer documentation
**Difficulty**: medium
**Prerequisites**:
+
- basic Python understanding
- some knowledge about fuzzing & existing fuzzing frameworks (e.g. [oss-fuzz](https://github.com/google/oss-fuzz/tree/master/projects/qubes-os))
- a hacker's curiosity
@@ -560,6 +465,7 @@ A [Fuzzer](https://en.wikipedia.org/wiki/Fuzzing) would help to automate part of
**Brief explanation**: Since recently, Xen supports "unified EFI boot" which allows to sign not only Xen binary itself, but also dom0 kernel and their parameters. While the base technology is there, enabling it is a painful and complex process. The goal of this project is to integrate configuration of this feature into Qubes, automating as much as possible. See discussion in [issue #4371](https://github.com/QubesOS/qubes-issues/issues/4371)
**Expected results**:
+
- a tool to prepare relevant boot files for unified Xen EFI boot - this includes collecting Xen, dom0 kernel, initramfs, config file, and possibly few more (ucode update?); the tool should then sign the file with user provided key (preferably propose to generate it too)
- integrate it with updates mechanism, so new Xen or dom0 kernel will be picked up automatically
- include a fallback configuration that can be used for troubleshooting (main unified Xen EFI intentionally does not allow to manipulate parameters at boot time)
@@ -567,6 +473,7 @@ A [Fuzzer](https://en.wikipedia.org/wiki/Fuzzing) would help to automate part of
**Difficulty**: hard
**Knowledge prerequisite**:
+
- basic understanding of Secure Boot
- Bash and Python scripting
@@ -586,6 +493,7 @@ A [Fuzzer](https://en.wikipedia.org/wiki/Fuzzing) would help to automate part of
**Difficulty**: medium
**Knowledge prerequisite**:
+
- Python scripting
- Basic knowledge of Linux system services management (systemd, syslog etc)
diff --git a/developer/general/gsod.md b/developer/general/gsod.md
index d02b5163..ad714e50 100644
--- a/developer/general/gsod.md
+++ b/developer/general/gsod.md
@@ -6,9 +6,9 @@ ref: 242
title: Google Season of Docs (GSoD)
---
-Thank you for your interest in participating in the [2023 Google Season of Docs](https://developers.google.com/season-of-docs/) program with the [Qubes OS team](/team/). This page details our 2023 project idea as well as completed past projects. You can read more about the Google Season of Docs in the official [guides](https://developers.google.com/season-of-docs/docs/) and [FAQ](https://developers.google.com/season-of-docs/docs/faq).
+Thank you for your interest in participating in the [2024 Google Season of Docs](https://developers.google.com/season-of-docs/) program with the [Qubes OS team](/team/). This page details our 2024 project idea as well as completed past projects. You can read more about the Google Season of Docs in the official [guides](https://developers.google.com/season-of-docs/docs/) and [FAQ](https://developers.google.com/season-of-docs/docs/faq).
-## Instructional video series -- Qubes OS
+## Update and Expand How-To Guides -- Qubes OS
### About the Qubes OS Project
@@ -18,10 +18,62 @@ Qubes OS was launched in 2011 and has [received praise from security experts and
### The project's problem
-There is user demand for high-quality, up-to-date video guides that take users from zero Linux knowledge to using Qubes as a daily driver and performing specific tasks inside of Qubes, but almost no such videos exist. Although most of the required knowledge is documented, many users report that they would prefer to watch videos rather than read text or that they would find videos easier to understand and follow along with.
+- Some of the existing content is stale. It refers to previous Qubes releases and has not yet been updated to the cover the latest stable release.
+- There are important topic areas that the current guides do not completely cover, such as "understanding Qubes OS," "using Qubes OS in practice," "Qubes OS workflow for coding," "printing," and "audio."
+- The guides do not consistently address users of all skill and experience levels (beginner, intermediate, and expert).
+- Some of the guides lack relevant illustrations and screenshots.
+- When the developers update a software tool, they should update all the guides that mentions this tool. However, there is currently no way for the developers to know which guides mention which tools.
### The project's scope
+The project is estimated to need around six months to complete (see the timeline below). Qubes team members, including Michael Carbone, Andrew Wong, Marta Marczykowska-Górecka, and Marek Marczykowski-Górecki, will supervise and support the writer.
+
+### Measuring the project's success
+
+We will consider the project successful if:
+
+- Existing guides are updated to describe currently supported Qubes OS version
+- Missing common guides are identified
+- 2-3 new guides are written
+
+### Timeline
+
+| Dates | Action items |
+| --------------- | --------------------------------------- |
+| May | Orientation |
+| June - November | Update & extend how-to guides |
+| December | Final project evaluation and case study |
+
+
+### Project budget
+
+| Expense | Amount |
+| --------------------------------------- | ------- |
+| writer (10 hours/week, 6 months) | $12,000 |
+| TOTAL | $12,000 |
+
+### Additional information
+
+Qubes OS regularly participates in Google Summer of Code and Google Season of Docs. This is our third time participating in Google Season of Docs. Our mentorships for GSoD 2019, 2020, and 2023 were successes, and the projects were completed within the times allotted. The past Google Season of Docs projects have given us experience in working with technical writers and have helped us to understand the benefits that technical writers can bring to our project.
+
+## Past Projects
+
+You can view the project we had in 2019 in the [2019 GSoD archive](https://developers.google.com/season-of-docs/docs/2019/participants/project-qubes) and the [2019 writer's report](https://web.archive.org/web/20200928002746/https://refre.ch/report-qubesos/).
+
+You can view the project we had in 2020 in the [2020 GSoD archive](https://developers.google.com/season-of-docs/docs/2020/participants/project-qubesos-c1e0) and the [2020 writer's report](https://web.archive.org/web/20210723170547/https://gist.github.com/PROTechThor/bfe9b8b28295d88c438b6f6c754ae733).
+
+You can view the results of the project we had in 2023 [here](https://www.youtube.com/playlist?list=PLjwSYc73nX6aHcpqub-6lzJbL0vhLleTB).
+
+Here are some successful projects which have been implemented in the past by Google Season of Docs participants.
+
+### Instructional video series
+
+#### The project's problem
+
+There is user demand for high-quality, up-to-date video guides that take users from zero Linux knowledge to using Qubes as a daily driver and performing specific tasks inside of Qubes, but almost no such videos exist. Although most of the required knowledge is documented, many users report that they would prefer to watch videos rather than read text or that they would find videos easier to understand and follow along with.
+
+#### The project's scope
+
This project consists of creating a series of instructional videos that satisfy the following criteria:
- Prospective users who are not yet familiar with Linux or Qubes OS can easily understand and follow the videos.
@@ -59,7 +111,7 @@ Below is an example of the content (which is already [documented](/doc/)) that t
- Passwordless root
- Anti Evil Maid
- Split GPG
-- U2F proxy
+- CTAP proxy
- YubiKey
- Whonix
- How to install and use a VPN in Qubes
@@ -68,7 +120,7 @@ Below is an example of the content (which is already [documented](/doc/)) that t
The project is estimated to need around six months to complete (see the timeline below). Qubes team members, including Michael Carbone, Andrew Wong, and Marek Marczykowski-Górecki, will supervise and support the creator.
-### Measuring the project's success
+#### Measuring the project's success
We will consider the project successful if, after publication of the video series:
@@ -76,34 +128,6 @@ We will consider the project successful if, after publication of the video serie
- The reception to the videos is generally positive and complaints about quality and accuracy are minimal.
- Appropriate analytics (e.g., YouTube metrics) are average or better for videos of this type (to be determined in consultation with the creator).
-### Timeline
-
-| Dates | Action items |
-| -------------- | --------------------------------------- |
-| March | Orientation |
-| April--October | Create Qubes OS video series |
-| November | Final project evaluation and case study |
-
-
-### Project budget
-
-| Expense | Amount |
-| --------------------------------------- | ------- |
-| Video creator (20 hours/week, 6 months) | $12,000 |
-| TOTAL | $12,000 |
-
-### Additional information
-
-Qubes OS regularly participates in Google Summer of Code and Google Season of Docs. This is our third time participating in Google Season of Docs. Our mentorships for GSoD 2019 and 2020 were successes, and both projects were completed within the times allotted. The past Google Season of Docs projects have given us experience in working with technical writers and have helped us to understand the benefits that technical writers can bring to our project. While our experience in working with video creators is more limited, we are keenly aware of the benefits of high-quality video content, as well as the significant time, resources, and talent required to create it.
-
-## Past Projects
-
-You can view the project we had in 2019 in the [2019 GSoD archive](https://developers.google.com/season-of-docs/docs/2019/participants/project-qubes) and the [2019 writer's report](https://refre.ch/report-qubesos/).
-
-You can also view the project we had in 2020 in the [2020 GSoD archive](https://developers.google.com/season-of-docs/docs/2020/participants/project-qubesos-c1e0) and the [2020 writer's report](https://gist.github.com/PROTechThor/bfe9b8b28295d88c438b6f6c754ae733).
-
-Here are some successful projects which have been implemented in the past by Google Season of Docs participants.
-
### Consolidate troubleshooting guides
**Project**: Consolidate troubleshooting guides
diff --git a/developer/general/package-contributions.md b/developer/general/package-contributions.md
index f73c9bd2..f0f1af06 100644
--- a/developer/general/package-contributions.md
+++ b/developer/general/package-contributions.md
@@ -71,7 +71,7 @@ The review procedure is as follows:
1. Someone, S, wishes to make a change to a package, P.
2. S submits a fast-forwardable pull request against the fork of P's repo owned by [QubesOS-contrib](https://github.com/QubesOS-contrib).
3. The PM reviews the pull request.
- If the the pull request passes the PM's review, the PM adds a [signed](/doc/code-signing/) *comment* on the pull request stating that it has passed review.
+ If the pull request passes the PM's review, the PM adds a [signed](/doc/code-signing/) *comment* on the pull request stating that it has passed review.
(In cases in which S = PM, the PM can simply add a [signed](/doc/code-signing/) *tag* to the HEAD commit prior to submitting the pull request.)
If the pull request does not pass the PM's review, the PM leaves a comment on the pull request explaining why not.
4. The QCR reviews the pull request.
diff --git a/developer/releases/2_0/release-notes.md b/developer/releases/2_0/release-notes.md
index e0a5751d..a428a121 100644
--- a/developer/releases/2_0/release-notes.md
+++ b/developer/releases/2_0/release-notes.md
@@ -68,7 +68,7 @@ Note: if the user has custom Template VMs (i.e. other than the default template,
#### From Qubes R1 to R2 beta1
-If you're already running Qubes Release 1, you don't need to reinstall, it's just enough to update the packages in your Dom0 and the template VM(s). This procedure is described [here?](/doc/upgrade-to-r2/).
+If you're already running Qubes Release 1, you don't need to reinstall, it's just enough to update the packages in your Dom0 and the template VM(s). This procedure is described [here](/doc/upgrade-to-r2/).
#### From Qubes R1 or R2 Beta 1 to R2 beta2
diff --git a/developer/releases/4_0/release-notes.md b/developer/releases/4_0/release-notes.md
index b80a1959..1bed1302 100644
--- a/developer/releases/4_0/release-notes.md
+++ b/developer/releases/4_0/release-notes.md
@@ -9,7 +9,7 @@ title: Qubes R4.0 release notes
New features since 3.2
----------------------
-* Core management scripts rewrite with better structure and extensibility, [API documentation](https://dev.qubes-os.org/projects/qubes-core-admin/en/latest/)
+* Core management scripts rewrite with better structure and extensibility, [current API documentation](https://dev.qubes-os.org/projects/core-admin/en/latest/) and the documentation API index as a [webarchive](https://web.archive.org/web/20230128102821/https://dev.qubes-os.org/projects/qubes-core-admin/en/latest/)
* [Admin API](/news/2017/06/27/qubes-admin-api/) allowing strictly controlled managing from non-dom0
* All `qvm-*` command-line tools rewritten, some options have changed
* Renaming VM directly is prohibited, there is GUI to clone under new name and remove old VM
diff --git a/developer/releases/4_2/release-notes.md b/developer/releases/4_2/release-notes.md
index 7b4dbc58..044a022f 100644
--- a/developer/releases/4_2/release-notes.md
+++ b/developer/releases/4_2/release-notes.md
@@ -1,6 +1,6 @@
---
layout: doc
-title: Qubes OS 4.2.0 release notes
+title: Qubes OS 4.2 release notes
permalink: /doc/releases/4.2/release-notes/
---
@@ -16,6 +16,7 @@ permalink: /doc/releases/4.2/release-notes/
- Qubes Global Settings ([#6898](https://github.com/QubesOS/qubes-issues/issues/6898))
- Create New Qube
- Qubes Update ([#7443](https://github.com/QubesOS/qubes-issues/issues/7443))
+- New `qubes-vm-update` tool ([#7443](https://github.com/QubesOS/qubes-issues/issues/7443))
- Unified `grub.cfg` location for both UEFI and legacy boot ([#7985](https://github.com/QubesOS/qubes-issues/issues/7985))
- PipeWire support ([#6358](https://github.com/QubesOS/qubes-issues/issues/6358))
- fwupd integration for firmware updates ([#4855](https://github.com/QubesOS/qubes-issues/issues/4855))
@@ -42,9 +43,33 @@ The new Qubes OS Policy Editor tool:
## Known issues
-- DomU firewalls have completely switched to nftables. Users should add their custom rules to the `custom-input` and `custom-forward` chains. ([#5031](https://github.com/QubesOS/qubes-issues/issues/5031), [#6062](https://github.com/QubesOS/qubes-issues/issues/6062))
+- DomU firewalls have completely switched to nftables. Users should add their custom rules to the `custom-input` and `custom-forward` chains. (For more information, see issues [#5031](https://github.com/QubesOS/qubes-issues/issues/5031) and [#6062](https://github.com/QubesOS/qubes-issues/issues/6062).)
-For a full list of open bug reports affecting 4.2, please see [here](https://github.com/QubesOS/qubes-issues/issues?q=is%3Aissue+label%3Aaffects-4.2+label%3A%22T%3A+bug%22+is%3Aopen). We strongly recommend [updating Qubes OS](/doc/how-to-update/) immediately after installation in order to apply any and all available bug fixes.
+- Templates restored in 4.2 from a pre-4.2 backup continue to target their original Qubes OS release repos. If you are using fresh templates on a clean 4.2 installation, or if you performed an [in-place upgrade from 4.1 to 4.2](/doc/upgrade/4.2/#in-place-upgrade), then this does not affect you. (For more information, see issue [#8701](https://github.com/QubesOS/qubes-issues/issues/8701).)
+
+Also see the [full list of open bug reports affecting Qubes 4.2](https://github.com/QubesOS/qubes-issues/issues?q=is%3Aissue+label%3Aaffects-4.2+label%3A%22T%3A+bug%22+is%3Aopen).
+
+We strongly recommend [updating Qubes OS](/doc/how-to-update/) immediately after installation in order to apply all available bug fixes.
+
+## Notes
+
+- Qubes 4.2 does not support Debian 11 templates (see [supported template releases](/doc/supported-releases/#templates)). Please [upgrade your Debian templates](/doc/templates/debian/#upgrading) to Debian 12.
+
+- Qubes 4.2.2 includes a fix for [#8332: File-copy qrexec service is overly restrictive](https://github.com/QubesOS/qubes-issues/issues/8332). As explained in the issue comments, we introduced a change in Qubes 4.2.0 that caused inter-qube file-copy/move actions to reject filenames containing, e.g., non-Latin characters and certain symbols. The rationale for this change was to mitigate the security risks associated with unusual unicode characters and invalid encoding in filenames, which some software might handle in an unsafe manner and which might cause confusion for users. Such a change represents a trade-off between security and usability.
+
+ - After the change went live, we received several user reports indicating more severe usability problems than we had anticipated. Moreover, these problems were prompting users to resort to dangerous workarounds (such as packing files into an archive format prior to copying) that carry far more risk than the original risk posed by the unrestricted filenames. In addition, we realized that this was a backward-incompatible change that should not have been introduced in a minor release in the first place.
+
+ - Therefore, we have decided, for the time being, to restore the original (pre-4.2) behavior by introducing a new `allow-all-names` argument for the `qubes.Filecopy` service. By default, `qvm-copy` and similar tools will use this less restrictive service (`qubes.Filecopy +allow-all-names`) whenever they detect any files that would be have been blocked by the more restrictive service (`qubes.Filecopy +`). If no such files are detected, they will use the more restrictive service.
+
+ - Users who wish to opt for the more restrictive 4.2.0 and 4.2.1 behavior can do so by modifying their RPC policy rules. To switch a single rule to the more restrictive behavior, change `*` in the argument column to `+` (i.e., change "any argument" to "only empty"). To use the more restrictive behavior globally, add the following "deny" rule before all other relevant rules:
+
+ ```
+ qubes.Filecopy +allow-all-names @anyvm @anyvm deny
+ ```
+
+ - For more information, see [RPC policies](/doc/rpc-policy/) and [Qube configuration interface](/doc/vm-interface/#qubes-rpc).
+
+- Beginning with Qubes 4.2, the recommended way to update Qubes OS via the command line has changed. Salt is no longer the preferred method, though it is still supported. Instead, `qubes-dom0-update` is recommended for updating dom0, and `qubes-vm-update` is recommended for updating templates and standalones. (The recommended way to update via the GUI has not changed. The Qubes Update tool is still the preferred method.) For more information, see [How to update](/doc/how-to-update/).
## Download
diff --git a/developer/releases/todo.md b/developer/releases/todo.md
index 23d370ed..bcac1b17 100644
--- a/developer/releases/todo.md
+++ b/developer/releases/todo.md
@@ -37,6 +37,7 @@ On final release
* finish release notes
* update InstallationInstructions
* build ISO and push to mirrors
+* push `qubes-release` package to `current`
* notify @Rudd-O about the new ISO for new torrent hosting
-* write blog post
-* announce on Twitter
+* write news post
+* announce
diff --git a/developer/releases/version-scheme.md b/developer/releases/version-scheme.md
index a96f9ca6..f241a70a 100644
--- a/developer/releases/version-scheme.md
+++ b/developer/releases/version-scheme.md
@@ -71,7 +71,7 @@ When enough progress has been made, we announce the first stable release, e.g.
`3.0.0`. This is not only a version but an actual release. It is considered
stable, and we commit to supporting it according to our [support
schedule](/doc/supported-releases/). Core components are branched at this
-moment, and bug fixes are backported from the master branch. Please see [help,
+moment, and bug fixes are backported from the main branch. Please see [help,
support, mailing lists, and forum](/support/) for places to ask questions about
stable releases. No major features or interface incompatibilities are to be
included in this release. We release bug fixes as patch releases (`3.0.1`,
@@ -173,7 +173,7 @@ We mark each component version in the repository by tag containing
At the release of some release we create branches named like `release2`. Only
bug fixes and compatible improvements are backported to these branches. These
-branches should compile. All new development is done in `master` branch. This
+branches should compile. All new development is done in `main` branch. This
branch is totally unsupported and may not even compile depending on maintainer
of repository.
diff --git a/developer/services/admin-api.md b/developer/services/admin-api.md
index 8fa12417..f05ee780 100644
--- a/developer/services/admin-api.md
+++ b/developer/services/admin-api.md
@@ -62,94 +62,100 @@ yet documented.
The API should be implemented as a set of qrexec calls. This is to make it easy
to set the policy using current mechanism.
-| call | dest | argument | inside | return | note |
-| ------------------------------------- | --------- | --------- | ----------------------------------------- | --------------------------------------------------------- | ---- |
-| `admin.vmclass.List` | `dom0` | - | - | `\n` |
-| `admin.vm.List` | `dom0|` | - | - | ` class= state=\n` |
-| `admin.vm.Create.` | `dom0` | template | `name= label=