Commit Graph
23 Commits
Author SHA1 Message Date
Yu Watanabe fd1f164b1b mkosi: drop unnecessary packages
This partially reverts 77b3ddf2aa.

Testing with musl is now done by postmarketOS. Hence, these packages
are not necessary anymore.
2026-09-23 16:47:25 +02:00
Yu Watanabe 1a787e5195 mkosi: add postmarketos support
postmarketOS image can be built with for example the following mkosi.local.conf:
```
[Distribution]
Distribution=postmarketos

[Output]
Format=disk

[Build]
UseSubvolumes=yes

[Runtime]
Firmware=uefi
```
2026-06-27 00:18:16 +09:00
Luca Boccassi 379bba482b mkosi: install sysuser-tools in suse build images
This provides the sysusers RPM macros that the new version
of the spec file uses
2026-06-17 01:05:26 +01:00
Daan De Meyer c7113f6b3c ci: run the musl build & test under mkosi with a postmarketOS tools tree
Drop the standalone Unit-tests (musl) workflow that ran on an Alpine sandbox
spun up by jirutka/setup-alpine, and merge it into unit-tests.yml as a new
build-musl job that provisions a postmarketOS tools tree via mkosi and runs
the meson build + test suite through 'mkosi box'. postmarketOS is musl-native,
so the musl-gcc / -idirafter /usr/include wrappers the Fedora tools tree
needed are gone; the linter.yml's own musl build step also goes away since
the unit-tests workflow now covers it (and tests it).

postmarketOS doesn't ship a downstream systemd packaging spec, so the new
tools tree config in mkosi.tools.conf/mkosi.conf.d/postmarketos.conf does not
set PrepareScripts and lists build deps manually. mkosi.sync now early-exits
when PKG_SUBDIR is unset so the missing pkgenv entry doesn't trip set -u.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 17:22:35 +00:00
Daan De Meyer 73fd578f86 mkosi: drop libucontext again
Turns out it's possible to implement fibers without unnecessary
system calls and without ucontext.h so there's no need for libucontext
anymore, so drop it from the package list.
2026-05-08 22:38:31 +01:00
Daan De Meyer bb17ded158 mkosi: Install liburing
Make sure liburing is installed so it's available for 
experimentation in sd-event integration.
2026-04-29 09:20:57 +01:00
Michael Vogt ad7813844a mkosi: add coccinelle to the debian tools tree too
It is already part of the fedora/opensues tools tree. It must
have slipped through for Debian so lets add it.
2026-03-30 13:31:07 +02:00
Michael Vogt 777d9c10ad coccinelle: add checks for pointer access without NULL check
The fix in 8f1751a111 made me wonder if we could automatically detect
when pointers are accessed but when this might not be safe. Systemd
is already using a lot of `assert(dst)` and this change now forces
us to use them.

So this commit (ab)uses coccinelle to flag any pointer parameter
dereference not preceded by assert(param), ASSERT_PTR(param), or an
explicit NULL check. It adds integration into meson as a new "coccinelle"
test suite (just like clang-tidy) and is run in CI. The check is not
perfect but seems a reasonable heuristic.

For this RFC commit it is scoped to a subset, it excludes 25 dirs right
now and includes around 100. About 300 warnings left. Busywork that I am
happy to do if there is agreement that it is worth it.

With this in place we would have caught the bug from 8f1751a111 in CI:
```
FAIL: check-pointer-deref.cocci found issues in systemd/src/boot:
diff -u -p systemd/src/boot/measure.c /tmp/nothing/measure.c
--- systemd/src/boot/measure.c
+++ /tmp/nothing/measure.c
@@ -312,7 +312,6 @@ EFI_STATUS tpm_log_tagged_event(
         if (err != EFI_SUCCESS)
                 return err;

-        *ret_measured = true;
         return EFI_SUCCESS;
 }
```

This also adds a new POINTER_MAY_BE_NULL() for the cases when the
called function will do the NULL check (like `iovec_is_set()`).
2026-03-26 18:13:17 +01:00
Daan De Meyer c78ba976e1 mkosi: Install clang-tidy package instead of clang-tools
clang-tools surprisingly enough doesn't provide clang-tidy
2026-03-26 10:14:09 +00:00
vlefebvre d7a759569e mkosi-tool/opensuse: add libtss2-tcti-device0 package
libtss2-tcti-device0 is not installed by default in the openSUSE
image, but is now required when building the test image. Without it,
the build fails with

```
Shared library 'libtss2-tcti-device.so.0' is not available:
libtss2-tcti-device.so.0: cannot open shared object file: No such file or directory
```

Follow-up for 5f85409f93
2026-03-23 11:15:20 +01:00
Daan De Meyer 77b3ddf2aa mkosi: Install musl in tools trees on Fedora/Arch
For debugging purposes.
2026-02-16 09:37:14 +01:00
Daan De Meyer 81a43a44eb mkosi: Install libucontext in Arch/Fedora images
Split out of #39771

We don't use make use of libucontext yet but merging this early makes
sure my mkosi cached images don't get invalidated every time I switch
between my other work and the fiber branch.
2026-01-21 12:02:52 +01:00
Nick Rosbrook 0eaddf8c82 mkosi: stop using noble-proposed for qemu
The qemu update migrated to noble-updates a couple weeks ago, so it is
no longer necessary to enable noble-proposed (or add the associated apt
pinning config).
2026-01-06 04:47:27 +09:00
Luca Boccassi c78d18096d mkosi: drop gh from mkosi-tools debian/ubuntu
It was removed from testing so building images fails
2025-12-16 17:54:15 +00:00
Nick Rosbrook 39d3f63782 mkosi: use qemu from noble-proposed instead of ppa
This is also temporary, but demonstrates that the version of qemu
currently in noble-proposed fixes https://launchpad.net/bugs/2127974,
which will ultimately allow for the fix to be released to noble-updates.
2025-12-15 19:16:57 +00:00
Daan De Meyer 91af194001 mkosi: Add fixed qemu ppa for Noble temporarily
Until https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2127974
is fixed and rolled out, let's use enr0n's ppa with the fixed qemu
to make CI pass.
2025-11-25 11:02:34 +01:00
Daan De Meyer fb514c2f8f mkosi: Rework how the pkgenv environment variables are set
Instead of including distribution specific files in the subimages,
let's have one common mkosi.pkgenv/ directory that handles all the
matching which is then included in the subimages.

This gives us more control on exactly how we do the matching.
2025-11-25 11:02:34 +01:00
Daan De Meyer 6629107404 mkosi: Drop IWYU
We use clang-tidy's include checker, so let's stop installing IWYU.
2025-11-20 18:46:14 +01:00
Daan De Meyer 8137c6bf2d mkosi: Install valgrind in tools tree 2025-11-20 12:03:01 +01:00
Daan De Meyer 09ee7040c8 mkosi: Add sanitizer libraries to the CentOS/Fedora tools tree 2025-11-18 15:07:49 +01:00
Daan De Meyer 46833d6c8f mkosi: Add clang tools and iwyu to tools tree 2025-04-19 00:45:47 +02:00
Daan De Meyer 8ffacf8efa mkosi: Replace base-devel with base in arch tools packages
base-devel pulls in a bit too much, especially for NO_BUILD builds
so let's use base instead.
2025-04-19 00:45:42 +02:00
Daan De Meyer 342d21ef19 mkosi: Move all mkosi configuration into mkosi/ subdirectory
Now that mkosi can automatically pick up its main configuration from
a mkosi/ subdirectory if it exists and there is no configuration in the
top level directory, let's make use of it  to reduce the amount of clutter
in the top level directory of the repository.

This will also make it easier to install the mkosi configuration files as
part of the testing packages later on.
2025-04-03 09:59:15 +02:00