Commit graph

81 commits

Author SHA1 Message Date
Luca Boccassi 4d3d187493
Merge pull request #32324 from mrc0mmand/more-website-fixes
docs: use absolute links for our pages
2024-04-18 10:55:01 +02:00
Daan De Meyer 9fede461ca docs: Add note on packages produced by mkosi builds 2024-04-18 09:58:50 +02:00
Frantisek Sumsal 0d592a5e17 docs: use absolute links for our pages
Since 56b2970 has proven to be a no-go for us, as it breaks existing
links, let's embrace the trailing slash and use absolute links
everywhere for our pages. This way we'll get around browser cleverly
appending the relative link to the current location (since it ends with
a slash), and given our docs/ layout is flat it's not much of a hassle
either.

Converted using this beauty:
  $ sed -ri 's/(\[.+\]\()([A-Z_]+\))/\1\/\2/g' *.md

Resolves: #32088 (again) and #32310
2024-04-17 21:21:23 +02:00
Zbigniew Jędrzejewski-Szmek 9f74901a1e Merge pull request #31648 from neighbourhoodie/review-content
I did the merge manually to resolve a trivial conflict.
2024-04-17 17:41:07 +02:00
Daan De Meyer 9d98617c1a Update debugging with vscode section
- We have ssh-generator now, so need for mkosi's Ssh= option anymore.
- By enabling RuntimeBuildSources= by default, we don't need the gdb
  config file in the image anymore, since the build and source
  directories will be mounted at the expected locations.
2024-04-16 15:25:34 +02:00
Daan De Meyer f1e9e8041c git: Add post-rewrite hook that invokes git submodule update
git rebase does not support a --recurse-submodules switch to automatically
check out the submodules at their registered commits during or after a rebase.

Instead, let's use the post-rewrite git hook to do this ourselves.
2024-04-10 14:39:49 +02:00
Daan De Meyer 957dc5f190 docs: Suggest soft-reboot to restart pid1 and all daemons in mkosi VM 2024-04-08 22:21:51 +01:00
Daan De Meyer e71b40fd00 docs: Add note on RuntimeBuildSources= to hacking guide 2024-04-08 11:37:34 +01:00
hulkoba 3038994792
docs/HACKING: format text 2024-03-27 07:11:59 +01:00
hulkoba 257889efb3
docs/HACKING: fix jinja link 2024-03-27 06:53:42 +01:00
hulkoba 517fd35f94
docs/HACKING: link mkosi webpage
and remove one of two mkosi github links
2024-03-27 06:53:29 +01:00
Daan De Meyer e33d43b059 docs: Add one more git submodule setting to configure 2024-03-21 23:02:52 +00:00
Daan De Meyer 6233a76932 meson: Rename add-git-hook.sh to git-setup.sh and configure git in it
Let's automatically apply the recommended git config with meson.
2024-03-15 17:27:49 +01:00
Daan De Meyer c735424908 docs: Update HACKING guide with recommended git config 2024-03-15 17:27:49 +01:00
Daan De Meyer 4d0f1451b5 Build distribution packages in mkosi
Instead of running meson install and hoping for the best, let's build
distribution packages from the downstream packaging specs. This gets
us the following:

- Vastly simplified mkosi scripts since we don't need a separate initrd
  image anymore but can just reuse the default mkosi initrd.
- Almost everything can move to the base image as its not the basis
  anymore for the initrd and as such we don't need to care about the
  size anymore.
- The systemd packages that get pulled in as dependencies of other
  packages get properly uninstalled and replaced with our packages that
  we built instead of just installing on top of an existing systemd
  installation with no guarantee that everything from that previous
  installation was removed.
- Much better testing coverage as what we're testing is much closer
  to what will actually be deployed in distributions.
- Immediate feedback if something we change breaks distribution packaging
- We get integration with the distribution for free as we'll automatically
  use the proper directories and such instead of having to hack this
  into a mkosi build script.
- ...
2024-03-07 10:47:19 +01:00
Zbigniew Jędrzejewski-Szmek 1b4dc2ea28 docs: drop .md suffixes again 2024-02-23 09:56:00 +01:00
Zbigniew Jędrzejewski-Szmek 8e3fee33af Revert "docs: use collections to structure the data"
This reverts commit 5e8ff010a1.

This broke all the URLs, we can't have that. (And actually, we probably don't
_want_ to make the change either. It's nicer to have all the pages in one
directory, so one doesn't have to figure out to which collection the page
belongs.)
2024-02-23 09:48:47 +01:00
hulkoba 5e8ff010a1
docs: use collections to structure the data 2024-02-22 10:11:54 +01:00
Daan De Meyer 52842bb2c5 mkosi: Build a directory image by default
Both building and booting a directory image is much faster than
building or booting a disk image so let's default to a directory
image.

In CI, we stick to a disk image to make sure that keeps working as
well.

The only extra dependency this introduces is virtiofsd which is
packaged in all distributions except Debian stable. For users
hacking on systemd on Debian stable, a disk image can be built by
writing the following to mkosi.local.conf:

```
[Output]
Format=disk
```
2024-01-12 16:19:48 +01:00
Daan De Meyer c417615c12 mkosi: Drop building custom kernel logic
Now that mkosi-kernel is a thing, this logic in systemd is just mostly
bitrotting since I just use mkosi-kernel these days. If I ever need to
hack on systemd and the kernel in tandem, I'll just add support for
building systemd to mkosi-kernel instead, so let's drop the support for
building a custom kernel in systemd's mkosi configuration.
2023-11-29 15:00:34 +00:00
Daan De Meyer bcb335ac68 Update to mkosi v19
- Use mkosi.images/ instead of mkosi.presets/
- Use the .chroot suffix to run scripts in the image
- Use BuildSources= match for the kernel build
- Move 10-systemd.conf to mkosi.conf and rely on mkosi.local.conf
  for local configuration
2023-11-28 19:54:58 +01:00
Daan De Meyer ee7304df5d mkosi: Use RuntimeTrees= to mount sources
Instead of using ExtraTrees=, let's use the new RuntimeTrees= option
to mount the full repository into the VM/container. Let's also store
the sources under /usr/src/systemd and update the gdbinit file and
vscode HACKING guide section to match the new location.
2023-10-20 12:43:57 +02:00
Frantisek Sumsal d04af6aaca docs: update fuzzers docs 2023-10-14 17:55:29 +02:00
Daan De Meyer f478b6e97d Update HACKING instructions
Let's mention that we just need the latest stable release of mkosi,
not the latest git commit. We also split the instructions for building
on the host and the instructions for building with mkosi into two blocks,
as it's not required to build on the host anymore to build with mkosi.
2023-10-06 09:16:33 +02:00
Mike Yuan ba96ba0420 docs/HACKING: Arch has dropped asp in favor of pkgctl
Prompted by #29461

See also: https://wiki.archlinux.org/title/Arch_build_system#Using_the_pkgctl_tool
2023-10-05 17:54:37 +02:00
Daan De Meyer 2fe24cccde mkosi: Enable Incremental= mode by default
Since mkosi is now smart enough to drop the caches when the list of
packages changes, let's enable Incremental= mode by default to ensure
a good experience for anyone new to hacking on systemd with mkosi.
2023-06-29 13:11:39 +01:00
Zbigniew Jędrzejewski-Szmek badea0d6df sd-boot,sd-stub: also print version after the address
The kernel, systemd, and many other things print their version during boot.
sd-boot and sd-stub are also important, so let's print the version if EFI_DEBUG.
(If !EFI_DEBUG, continue to be quiet.)

When updating the docs, I saw that that the text in HACKING.md was out of date.
Instead of trying to update the instructions there, make it shorter and refer
the reader to tools/debug-sd-boot.sh for details.
2023-05-24 04:34:56 +09:00
Daan De Meyer 47e5e12866 mkosi: Package a erofs usr partition with signed verity
Let's start moving towards a more involved partitioning setup to
test our stuff more when using mkosi.

The root partition is generated on boot with systemd-repart.

CentOS supports neither erofs nor btrfs so we use squashfs and xfs
instead.

We also enable SecureBoot= locally for additional coverage. This
and the use of verity means users need to run `mkosi genkey` once
to generate the keys necessary to do secure boot and verity.
2023-05-13 10:49:17 +02:00
Klaus ab13274a19
docs: add correct pacman command (#27486)
The `pacman` command in order to install packages on Arch in the documentation is invalid.
This PR fixes the command.
2023-05-02 17:18:10 +08:00
Daan De Meyer 94c9855a18 mkosi: Update to latest
- Drop Netdev= as it was removed in mkosi
- Always install python-psutil in the final image (required for networkd tests)
- Always Install python-pytest in the final image (required for ukify tests)
- Use the narrow glob for all centos python packages
- Drop the networkd mkosi config files (the default image can be used instead)
- Use ".conf" as the mkosi config file suffix everywhere
- Copy src/ to /root/src in the final image and set gdb substitute path in
  .gdbinit to make gdb work properly
2023-03-29 13:27:19 +02:00
Daan De Meyer 1441a6a751 docs: Explicitly tell developers to enable mkosi required meson options
We need repart, bootctl, analyze and ukify for mkosi so let's make
sure those get built in the HACKING guide.
2023-03-23 13:09:09 +00:00
Daan De Meyer c84d14c525 docs: Fix vscode debugging section in HACKING.md
Let's account for the recent changes in mkosi in the debugging
with vscode section.
2023-03-21 17:47:51 +00:00
Daan De Meyer e9c47453d2 Drop mkosi + clang section from HACKING
We removed a few features that made this work, will be added back
in the future when we restructure the way mkosi does build images.
2023-02-16 20:06:27 +01:00
Daan De Meyer 2edcf8e7db Update HACKING for latest mkosi 2023-02-16 20:05:55 +01:00
Zbigniew Jędrzejewski-Szmek 7a17e41dcf test: drop whitespace after shell redirection operators
(The one case that is left unchanged is '< <(subcommand)'.)

This way, the style with no gap was already dominant. This way, the reader
immediately knows that ' < ' is a comparison operator and ' << ' is a shift.

In a few cases, replace custom EOF replacement by just EOF. There is no point
in using someting like "_EOL" unless "EOF" appears in the text.
2023-02-06 09:19:04 +01:00
Daan De Meyer 246fd4d2ed docs: Update HACKING.md to mention latest mkosi is needed
Let's require users to run mkosi from git so we can fix any issues
forward instead of trying to keep the configs working with older
versions.
2023-01-24 22:05:49 +01:00
William Roberts 026d249969 docs/HACKING.md: clarify some portions
Clarify portions of HACKING.md so folks don't spend as much time as I
did on it.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
2022-10-31 20:56:37 +01:00
Daan De Meyer d12e9bdc76 mkosi: Optionally build a kernel image from mkosi.kernel/
If mkosi.kernel/ exists, the mkosi script will try to build a kernel
image from it. We use the architecture defconfig as a base and add
our own extra configuration on top.

We also add some extra tooling to the build image required to build
the kernel and include some documentation in HACKING.md on how to
use this new feature.

To avoid the kernel sources from being copied into the build or
final image (which we don't want because it takes a while), we put
the mkosi.kernel/ directory in .gitignore and use
"SourceFileTransfer=mount" so that the sources are still accessible
in the build image.
2022-09-29 20:15:57 +02:00
Daan De Meyer 2d92c35b35 docs: Add guide to debug binaries in vscode that need to run as root 2022-08-18 14:46:01 +02:00
Daan De Meyer d1e9a4244b docs: Recommend pkexec over using an askpass program with sudo
Less configuration required than downloading and configuring an
askpass program.
2022-08-18 14:17:07 +02:00
Sonali Srivastava 39e3135bc2 docs: mkosi-13 or newer required 2022-08-08 12:15:20 +01:00
Daan De Meyer 7ca9563ca1 mkosi: Remove usage of deprecated option names/sections 2022-07-18 16:54:58 +02:00
Daan De Meyer 69d638e67e mkosi: Changes to allow booting with sanitizers in mkosi
- Extra memory because ASAN needs it
- The environment variables to make the sanitizers more useful
- LD_PRELOAD because the ASAN DSO needs to be the first in the list
- The sanitizer library packages
- Disable syscall filters because they interfere with ASAN
- Disable systemd-hwdb-update because it's super slow when systemd-hwdb
  is built with sanitizers
- Take the value for meson's b_sanitize option from the SANITIZERS
  environment variable
2022-07-18 16:54:56 +02:00
Evgeny Vereshchagin 61ad4f25ed docs: mention how to build 32 bit fuzz targets 2022-05-29 09:12:38 +00:00
Evgeny Vereshchagin 39e63b441b docs: be more specific about the OSS-Fuzz toolchain 2022-05-26 15:22:50 +00:00
Benjamin Franzke 818e46ae7c docs: avoid multiple first-level headlines
One document should only contain one main
headline, both for structuring and for
visual reasons.

Relevant cases found via:

  git grep -A2 '^# ' docs/
2022-05-17 23:00:18 +02:00
Elias Probst 8f1a581e0d
Use consistent formatting for PID 1 across docs/ 2022-05-11 15:31:07 +02:00
Zbigniew Jędrzejewski-Szmek e8a688178c docs: stop recommending meson compile
With meson-0.60, meson compile stopped working with some targets:

$ meson compile -C build update-man-rules
ERROR: Can't invoke target `update-man-rules`: ambiguous name. Add target type and/or path: `PATH/NAME:TYPE`

This is obviously a regression in meson, but based on a chat with the
maintainers, it seems that there's some disagreement as to whether 'meson
compile' is useful and how exactly it should work. Since we're already at
meson 0.60.3 and this hasn't been fixed, and people generally don't seem to
consider this an issue, let's return to documenting the usual practice of
'ninja -C build' that just works everywhere.

(Since nobody has raised any fuss in systemd, it means that people are
generally using the shorter form during development too. I only noticed
because I pasted a command from the release docs when preparing -rc1.)
2022-04-12 12:35:44 +02:00
Lennart Poettering 4bb37359f6 docs: s/straight-forward/straightforward/
Inspired by https://github.com/systemd/systemd/pull/20156#discussion_r810878846
2022-03-15 22:46:09 +00:00
Jan Janssen 948d085e89 boot: Add gdb support and documentation
This will finally allow debugging issues in systemd without resorting to
Print() calls all over the place.
2022-01-04 17:23:01 +01:00