mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2025-11-30 16:36:56 -05:00
Add prompts to all code blocks with bash session
This commit is contained in:
parent
b0395e618c
commit
2d2bcb06a6
72 changed files with 513 additions and 497 deletions
|
|
@ -40,7 +40,7 @@ In ``qubes-builder/artifacts/sources/linux-kernel``:
|
|||
|
||||
.. code:: console
|
||||
|
||||
make prep
|
||||
$ make prep
|
||||
|
||||
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ The resulting tree will be in kernel-<VERSION>/linux-<VERSION>:
|
|||
|
||||
.. code:: console
|
||||
|
||||
ls -ltrd kernel*/linux*
|
||||
$ ls -ltrd kernel*/linux*
|
||||
drwxr-xr-x 23 user user 4096 Nov 5 09:50 kernel-3.4.18/linux-3.4.18
|
||||
drwxr-xr-x 6 user user 4096 Nov 21 20:48 kernel-3.4.18/linux-obj
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ In ``qubes-builder/artifacts/sources/linux-kernel``:
|
|||
|
||||
.. code:: console
|
||||
|
||||
cd kernel-3.4.18/linux-3.4.18
|
||||
$ cd kernel-3.4.18/linux-3.4.18
|
||||
|
||||
|
||||
|
||||
|
|
@ -74,8 +74,8 @@ In ``kernel-3.4.18/linux-3.4.18``:
|
|||
|
||||
.. code:: console
|
||||
|
||||
cp ../../config .config
|
||||
make oldconfig
|
||||
$ cp ../../config .config
|
||||
$ make oldconfig
|
||||
|
||||
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ Now change the configuration. For example, in ``kernel-3.4.18/linux-3.4.18``:
|
|||
|
||||
.. code:: console
|
||||
|
||||
make menuconfig
|
||||
$ make menuconfig
|
||||
|
||||
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ Copy the modified config back into the kernel tree:
|
|||
|
||||
.. code:: console
|
||||
|
||||
cp .config ../../../config
|
||||
$ cp .config ../../../config
|
||||
|
||||
|
||||
|
||||
|
|
@ -103,20 +103,20 @@ TODO: describe the workflow for patching the code, below are some random notes,
|
|||
|
||||
.. code:: console
|
||||
|
||||
ln -s ../../patches.xen
|
||||
export QUILT_PATCHES=patches.xen
|
||||
export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
|
||||
export QUILT_SERIES=../../series-pvops.conf
|
||||
$ ln -s ../../patches.xen
|
||||
$ export QUILT_PATCHES=patches.xen
|
||||
$ export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
|
||||
$ export QUILT_SERIES=../../series-pvops.conf
|
||||
|
||||
quilt new patches.xen/pvops-3.4-0101-usb-xen-pvusb-driver-bugfix.patch
|
||||
quilt add drivers/usb/host/Kconfig drivers/usb/host/Makefile \
|
||||
$ quilt new patches.xen/pvops-3.4-0101-usb-xen-pvusb-driver-bugfix.patch
|
||||
$ quilt add drivers/usb/host/Kconfig drivers/usb/host/Makefile \
|
||||
drivers/usb/host/xen-usbback/* drivers/usb/host/xen-usbfront.c \
|
||||
include/xen/interface/io/usbif.h
|
||||
|
||||
*edit something*
|
||||
|
||||
quilt refresh
|
||||
cd ../..
|
||||
$ quilt refresh
|
||||
$ cd ../..
|
||||
vi series.conf
|
||||
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ To actually build RPMs, in qubes-builder:
|
|||
|
||||
.. code:: console
|
||||
|
||||
./qb -c linux-kernel package fetch prep build
|
||||
$ ./qb -c linux-kernel package fetch prep build
|
||||
|
||||
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ Then use ``make update-repo-unstable`` to upload the packages. You can also spec
|
|||
|
||||
.. code:: console
|
||||
|
||||
make COMPONENTS="core-agent-linux gui-agent-linux linux-utils" qubes update-repo-unstable
|
||||
$ make COMPONENTS="core-agent-linux gui-agent-linux linux-utils" qubes update-repo-unstable
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ This is a simple setup using a docker executor. This is a good default choice; i
|
|||
|
||||
.. code:: console
|
||||
|
||||
git clone https://github.com/QubesOS/qubes-builderv2
|
||||
cd qubes-builderv2/
|
||||
$ 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:
|
||||
|
|
|
|||
|
|
@ -55,17 +55,23 @@ Usually you can install those packages by just issuing:
|
|||
|
||||
.. code:: console
|
||||
|
||||
sudo dnf install gnupg git createrepo rpm-build make wget rpmdevtools python3-sh dialog rpm-sign dpkg-dev debootstrap python3-pyyaml devscripts perl-Digest-MD5 perl-Digest-SHA
|
||||
$ sudo dnf install gnupg git createrepo rpm-build make wget rpmdevtools python3-sh dialog rpm-sign dpkg-dev debootstrap python3-pyyaml devscripts perl-Digest-MD5 perl-Digest-SHA
|
||||
|
||||
|
||||
The build system creates build environments in chroots and so no other packages are needed on the host. All files created by the build system are contained within the qubes-builder directory. The full build requires some 25GB of free space, so keep that in mind when deciding where to place this directory.
|
||||
|
||||
The build system is configured via builder.conf file. You can use the setup.sh script to create and modify this file. Alternatively, you can copy the provided default builder.conf, and modify it as needed, e.g.:
|
||||
|
||||
|
||||
.. code:: console
|
||||
|
||||
cp example-configs/qubes-os-master.conf builder.conf
|
||||
# edit the builder.conf file and set the following variables:
|
||||
$ cp example-configs/qubes-os-master.conf builder.conf
|
||||
|
||||
|
||||
Edit the builder.conf file and set the following variables:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
NO_SIGN=1
|
||||
|
||||
|
||||
|
|
@ -87,36 +93,36 @@ So, to build Qubes you would do:
|
|||
.. code:: console
|
||||
|
||||
# Import the Qubes master key
|
||||
gpg --recv-keys 0xDDFA1A3E36879494
|
||||
$ gpg --recv-keys 0xDDFA1A3E36879494
|
||||
|
||||
# Verify its fingerprint, set as 'trusted'.
|
||||
# This is described here:
|
||||
# https://www.qubes-os.org/doc/VerifyingSignatures
|
||||
|
||||
wget https://keys.qubes-os.org/keys/qubes-developers-keys.asc
|
||||
gpg --import qubes-developers-keys.asc
|
||||
$ wget https://keys.qubes-os.org/keys/qubes-developers-keys.asc
|
||||
$ gpg --import qubes-developers-keys.asc
|
||||
|
||||
git clone https://github.com/QubesOS/qubes-builder.git qubes-builder
|
||||
cd qubes-builder
|
||||
$ git clone https://github.com/QubesOS/qubes-builder.git qubes-builder
|
||||
$ cd qubes-builder
|
||||
|
||||
# Verify its integrity:
|
||||
git tag -v `git describe`
|
||||
$ git tag -v `git describe`
|
||||
|
||||
cp example-configs/qubes-os-master.conf builder.conf
|
||||
$ cp example-configs/qubes-os-master.conf builder.conf
|
||||
# edit the builder.conf file and set the following variables:
|
||||
# NO_SIGN="1"
|
||||
|
||||
# Download all components:
|
||||
|
||||
make get-sources
|
||||
$ make get-sources
|
||||
|
||||
# And now to build all Qubes RPMs (this will take a few hours):
|
||||
|
||||
make qubes
|
||||
$ make qubes
|
||||
|
||||
# ... and then to build the ISO
|
||||
|
||||
make iso
|
||||
$ make iso
|
||||
|
||||
|
||||
And this should produce a shiny new ISO.
|
||||
|
|
@ -125,7 +131,7 @@ You can also build selected component separately. Eg. to compile only gui virtua
|
|||
|
||||
.. code:: console
|
||||
|
||||
make gui-daemon
|
||||
$ make gui-daemon
|
||||
|
||||
|
||||
You can get a full list from make help.
|
||||
|
|
@ -154,7 +160,7 @@ You can also modify sources somehow if you wish. Here are some basic steps:
|
|||
|
||||
.. code:: console
|
||||
|
||||
make get-sources
|
||||
$ make get-sources
|
||||
|
||||
|
||||
4. **Make your modifications here**
|
||||
|
|
@ -165,14 +171,14 @@ You can also modify sources somehow if you wish. Here are some basic steps:
|
|||
|
||||
.. code:: console
|
||||
|
||||
make vmm-xen core-admin linux-kernel gui-daemon template desktop-linux-kde installer-qubes-os manager linux-dom0-updates
|
||||
$ make vmm-xen core-admin linux-kernel gui-daemon template desktop-linux-kde installer-qubes-os manager linux-dom0-updates
|
||||
|
||||
|
||||
7. build iso installation image
|
||||
|
||||
.. code:: console
|
||||
|
||||
make iso
|
||||
$ make iso
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@ Fedora 36 (and 37) has been successfully used to build Qubes R4.1 with the below
|
|||
|
||||
.. code:: console
|
||||
|
||||
sudo setenforce 0
|
||||
$ sudo setenforce 0
|
||||
|
||||
|
||||
In ``dom0``, install the Fedora 36 (or 37) template if you don’t already have it.
|
||||
|
||||
.. code:: console
|
||||
|
||||
sudo qubes-dom0-update qubes-template-fedora-36
|
||||
$ sudo qubes-dom0-update qubes-template-fedora-36
|
||||
|
||||
|
||||
|
||||
|
|
@ -66,9 +66,9 @@ Now let’s bootstrap the builder. Unfortunately, the builder cannot verify itse
|
|||
|
||||
.. code:: console
|
||||
|
||||
git clone https://github.com/QubesOS/qubes-builder.git
|
||||
cd qubes-builder
|
||||
git tag -v `git describe`
|
||||
$ git clone https://github.com/QubesOS/qubes-builder.git
|
||||
$ cd qubes-builder
|
||||
$ git tag -v `git describe`
|
||||
|
||||
|
||||
|
||||
|
|
@ -120,8 +120,8 @@ Continue the build process with:
|
|||
|
||||
.. code:: console
|
||||
|
||||
make install-deps
|
||||
make get-sources
|
||||
$ make install-deps
|
||||
$ make get-sources
|
||||
|
||||
|
||||
|
||||
|
|
@ -133,8 +133,8 @@ Finally, if you are making a test build, use:
|
|||
|
||||
.. code:: console
|
||||
|
||||
make qubes
|
||||
make iso
|
||||
$ make qubes
|
||||
$ make iso
|
||||
|
||||
|
||||
|
||||
|
|
@ -142,9 +142,9 @@ Or for a fully signed build (this requires setting ``SIGN_KEY`` in ``builder.con
|
|||
|
||||
.. code:: console
|
||||
|
||||
make qubes
|
||||
make sign-all
|
||||
make iso
|
||||
$ make qubes
|
||||
$ make sign-all
|
||||
$ make iso
|
||||
|
||||
|
||||
|
||||
|
|
@ -160,9 +160,9 @@ If you will be building Whonix templates:
|
|||
|
||||
.. code:: console
|
||||
|
||||
cd ~
|
||||
gpg --keyserver pgp.mit.edu --recv-keys 916B8D99C38EAF5E8ADC7A2A8D66066A2EEACCDA
|
||||
gpg --fingerprint 916B8D99C38EAF5E8ADC7A2A8D66066A2EEACCDA
|
||||
$ cd ~
|
||||
$ gpg --keyserver pgp.mit.edu --recv-keys 916B8D99C38EAF5E8ADC7A2A8D66066A2EEACCDA
|
||||
$ gpg --fingerprint 916B8D99C38EAF5E8ADC7A2A8D66066A2EEACCDA
|
||||
|
||||
|
||||
|
||||
|
|
@ -185,11 +185,11 @@ Next, prepare the Git keyring directory and copy them in:
|
|||
|
||||
.. code:: console
|
||||
|
||||
export GNUPGHOME=~/qubes-builder/keyrings/git
|
||||
mkdir --parents "$GNUPGHOME"
|
||||
cp ~/.gnupg/pubring.gpg "$GNUPGHOME"
|
||||
cp ~/.gnupg/trustdb.gpg "$GNUPGHOME"
|
||||
chmod --recursive 700 "$GNUPGHOME"
|
||||
$ export GNUPGHOME=~/qubes-builder/keyrings/git
|
||||
$ mkdir --parents "$GNUPGHOME"
|
||||
$ cp ~/.gnupg/pubring.gpg "$GNUPGHOME"
|
||||
$ cp ~/.gnupg/trustdb.gpg "$GNUPGHOME"
|
||||
$ chmod --recursive 700 "$GNUPGHOME"
|
||||
|
||||
|
||||
|
||||
|
|
@ -197,8 +197,8 @@ Copy one of the example configurations:
|
|||
|
||||
.. code:: console
|
||||
|
||||
cd ~/qubes-builder
|
||||
cp example-configs/qubes-os-master.conf builder.conf
|
||||
$ cd ~/qubes-builder
|
||||
$ cp example-configs/qubes-os-master.conf builder.conf
|
||||
|
||||
|
||||
|
||||
|
|
@ -208,9 +208,9 @@ Continue the build process with:
|
|||
|
||||
.. code:: console
|
||||
|
||||
make install-deps
|
||||
make get-sources
|
||||
unset GNUPGHOME
|
||||
$ make install-deps
|
||||
$ make get-sources
|
||||
$ unset GNUPGHOME
|
||||
|
||||
|
||||
|
||||
|
|
@ -220,8 +220,8 @@ Finally, if you are making a test build, use:
|
|||
|
||||
.. code:: console
|
||||
|
||||
make qubes
|
||||
make iso
|
||||
$ make qubes
|
||||
$ make iso
|
||||
|
||||
|
||||
|
||||
|
|
@ -229,9 +229,9 @@ Or for a fully signed build (this requires setting ``SIGN_KEY`` in ``builder.con
|
|||
|
||||
.. code:: console
|
||||
|
||||
make qubes
|
||||
make sign-all
|
||||
make iso
|
||||
$ make qubes
|
||||
$ make sign-all
|
||||
$ make iso
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue