Commit graph

73437 commits

Author SHA1 Message Date
Daan De Meyer 0d73e224e2 mkosi: Install tpm2-tools in system image
Required for TEST-70-TPM2.
2024-04-30 17:01:41 +02:00
Daan De Meyer 695ebbaf7f mkosi: Override /sbin/init in minimal-base
Required for TEST-13-NSPAWN.
2024-04-30 17:01:41 +02:00
Daan De Meyer 27f166c523 mkosi: Use systemd.crash_action=poweroff in integration tests
Some integration tests expect to be able to reboot so switch to using
the new systemd.crash_action=poweroff instead.
2024-04-30 17:01:41 +02:00
Richard Maw 334e707329 mkosi: Add curl package for journal tests 2024-04-30 17:01:41 +02:00
Daan De Meyer e911a335ed mkosi: Mask systemd-networkd-wait-online when --runtime-network=none
Otherwise it will wait forever waiting for an interface to appear.
See https://github.com/systemd/systemd/issues/29388.
2024-04-30 17:01:41 +02:00
Daan De Meyer d99deaaaea mkosi: Disable --runtime-scratch=no for tests
Breaks TEST-83-BTRFS if enabled.
2024-04-30 17:01:41 +02:00
Daan De Meyer 989d46df8b mkosi: Install locales on debian/ubuntu
Required for TEST-73-LOCALE.
2024-04-30 17:01:41 +02:00
Daan De Meyer 06489e8332 mkosi: Make sure our extra kernel command line overrides the config one 2024-04-30 17:01:41 +02:00
Daan De Meyer a531931cd4 mkosi: Simply remove all the debian patches instead of mounting over them
The build sources are ephemeral anyways, so we can just remove the patches
instead of hiding them.
2024-04-30 17:01:41 +02:00
Daan De Meyer e839cb1cf8 mkosi: Use symlinks instead of bind mounts for Arch
With bind mounts, the directories we bind mount to get recorded as
the meson source and build directories. This means meson will complain
if we later try to run meson install -C /work/build in the virtual
machine or container. If we use symlinks, the directories we symlink to
will be recorded as the meson source and build directories, which means
meson install -C /work/build will work when executed after booting the
VM or container.

I tried to do the same for debian as well but the debian package tooling
changes directory into the build directory and then does meson setup ..
which is completely broken when switching to a symlink.
2024-04-30 17:01:41 +02:00
Daan De Meyer 48e0399bee mkosi: Install minimal-base to /usr/share/testsuite-13-container-template
Required for TEST-13-NSPAWN.
2024-04-30 17:01:41 +02:00
Daan De Meyer a8bc9400a8 mkosi: Remove more files from Arch minimal image 2024-04-30 17:01:41 +02:00
Luca Boccassi da77ea5c63
Merge pull request #32523 from cgzones/inaccessible_label
shared: create inaccessible files with correct security label
2024-04-30 16:20:49 +02:00
Piotr Drąg ade7fed923 po: add a false positive to POTFILES.skip
Scripts used to detect files that should be in POTFILES.in, like
intltool-update -m used on https://l10n.gnome.org/module/systemd/,
falsely detect this file as containing translations. Avoid this
behavior by putting the file in POTFILES.skip.
2024-04-30 16:18:42 +02:00
Skia ad23fca3ae docs: autopkgtest: refresh the docs with up-to-date information
@iainlane doesn't work on Ubuntu infrastructure anymore, and `bionic` is still ESM, but not really supported anymore either.  
`noble`, which is the latest Ubuntu, probably is better for testing `systemd` in 2024, and pinging `qa-help` on IRC is the current official way to contact the team behind Ubuntu's infrastructure.
2024-04-30 16:16:31 +02:00
Frantisek Sumsal 9fe18055fe test: exclude gperf files from captured coverage
Recent lcov started complaining loudly about unknown lines in gperf
files:

...
Found gcov version: 13.2.1
Using intermediate gcov format
Recording 'internal' directories:
...
Finished processing 1634 GCNO files
Apply filtering..
Message summary:
  1 error message:
    range: 1
  28 warning messages:
    gcov: 27
    usage: 1
geninfo: ERROR: (range) unknown line '33' in /build/src/home/homed-gperf.gperf: there are only 22 lines in the file.
  Use 'geninfo --filter range' to remove out-of-range lines.
        (use "geninfo --ignore-errors range ..." to bypass this error)

Since we drop the coverage of built files from the final report anyway,
let's do it also when capturing both initial and real coverage to avoid
this error.
2024-04-30 15:42:45 +02:00
Daan De Meyer c89244842b test: Don't persist journal in mkosi image if we're not debugging tests
If we're not debugging tests, there's no point in persisting the journal,
so let's use the volatile journal storage mode in that case to avoid doing
unnecessary work.

We don't disable journal storage alltogether since various tests check
that stuff is written to the journal.
2024-04-30 15:20:55 +02:00
Daan De Meyer 123450e58e journal: Add journal.storage credential
In mkosi CI, we want persistent journals when running interactively
and runtime journals when running in CI, so let's add a credential
that allows us to configure which one to use.
2024-04-30 14:19:55 +02:00
dependabot[bot] 9c53f6a7ae build(deps): bump pkg/debian from 640ff73 to 9a5adf2
Bumps pkg/debian from `640ff73` to `9a5adf2`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 12:09:12 +02:00
Daan De Meyer c676ed3fc1
Merge pull request #32575 from DaanDeMeyer/fix
Various mkosi fixes
2024-04-30 12:08:42 +02:00
Daan De Meyer 742b77e1d2 mkosi: Make sure we create an image without /var/log/journal
This allows journald to create the directory itself with the right
chattr settings on first boot.
2024-04-30 11:41:02 +02:00
Daan De Meyer 744fe45b8f mkosi: Simplify rpm build scripts 2024-04-30 11:39:36 +02:00
Daan De Meyer ebc7c0f303
Merge pull request #32567 from DaanDeMeyer/profile
mkosi: Introduce particle profile
2024-04-30 11:34:35 +02:00
Yu Watanabe 8719a65003 test-journal-flush: use archived journal if possible
Workaround for #32436.

The test may fail if the journal is vacuumed or rotated during the test is running.
Let's use the newest archive file for safety.
2024-04-30 10:50:43 +02:00
Daan De Meyer e7c8507977 mkosi: Introduce particle profile
Unfortunately the current mkosi partitioning setup is a bit too
avant-garde for the integration tests. Both in that distributions
aren't ready for it yet (some more than others), and that software
which we depend on in the integration tests isn't ready for it yet
(e.g. libselinux does not read its configuration from /usr).

Let's switch back to a more boring partioning setup by default but
keep the fancy stuff around as a mkosi profile. This means that it
can still be used for manually testing stuff by running
"mkosi --profile particle -f qemu".
2024-04-30 10:46:18 +02:00
Daan De Meyer 1ce32f2f5f TEST-81-GENERATORS: Use SYSTEMD_PROC_CMDLINE more
Makes the test more robust as the command line the image is booted
won't influence the test result.
2024-04-30 10:45:35 +02:00
Luca Boccassi 6c699c61ca meson: bump libbpf dependency to 1.4.0 when using gcc
bpf_core_type_id_kernel() needs libbpf 1.4.0 when building with gcc
rather than clang, so bump the dependency accordingly.

More precisely, the following change is needed:

b19fdbf1be

Related to: https://github.com/systemd/systemd/issues/31869

Follow-up for 8aee931e7a
2024-04-30 01:17:03 +02:00
Daan De Meyer 132f6cfcfe machine: Add PIDFDs= fallback
In some environments, systemd-machined might not be restarted on
downgrade. For safety, let's add the usual PIDFDs= fallback here
as well.
2024-04-29 22:56:49 +02:00
Ronan Pigott d840783db5 resolved: always progress DS queries
If we request a DS and the resolver offers an unsigned SOA, a new
auxiliary transaction for the DS will be rejected as a loop, and we
might not make any progress toward finding the DS we need. Let's ensure
that we at least always check the parent in this case.

Fixes: 47690634f1 ("resolved: don't request the SOA for every dns label")
2024-04-29 19:04:11 +02:00
Luca Boccassi 8d6e439aae meson: copy prefix mapping CFLAGS when building BPF objects
Otherwise the filenames will contain variable paths and break reproducibility
2024-04-29 19:00:34 +02:00
Christian Göttsche b9a05e860c shared: create inaccessible files with correct security label 2024-04-29 18:17:46 +02:00
Christian Göttsche 4be62f821c basic: add open_mkdir_at_full()
Add helper for open_mkdir_at() which accepts xopen flags, e.g. to pass
XO_LABEL to create the target with the correct security context.
2024-04-29 18:16:58 +02:00
Christian Göttsche 22b768d127 basic: add mknodat_label()
Add helper for mknodat(2) which creates the destination with the correct
security label.
2024-04-29 18:14:41 +02:00
Luca Boccassi aab7bb5968 meson: define 's390' for 's390x' when building BPF objects
The kernel headers match on __s390__ so the build fails

../src/nsresourced/bpf/userns_restrict/userns-restrict.bpf.c:159:6: error: Must specify a BPF target arch via __TARGET_ARCH_xxx
void BPF_KPROBE(userns_restrict_free_user_ns, struct work_struct *work) {
     ^
/usr/include/bpf/bpf_tracing.h:817:20: note: expanded from macro 'BPF_KPROBE'
        return ____##name(___bpf_kprobe_args(args));                        \
                          ^
/usr/include/bpf/bpf_tracing.h:797:41: note: expanded from macro '___bpf_kprobe_args'
                                        ^
/usr/include/bpf/bpf_helpers.h:195:29: note: expanded from macro '___bpf_apply'
                            ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/include/bpf/bpf_tracing.h:789:72: note: expanded from macro '___bpf_kprobe_args1'
                                                                       ^
/usr/include/bpf/bpf_tracing.h:563:29: note: expanded from macro 'PT_REGS_PARM1'
                            ^
<scratch space>:125:6: note: expanded from here
 GCC error "Must specify a BPF target arch via __TARGET_ARCH_xxx"
2024-04-29 15:20:39 +02:00
Mike Yuan f193fcbce9
Merge pull request #32547 from YHNdnzj/minor-cleanup
Some cleanups prompted during review
2024-04-29 21:08:06 +08:00
Antonio Alvarez Feijoo c355b6af19 boot: fix argument name mismatch in two functions 2024-04-29 14:34:37 +02:00
Daan De Meyer 7a66f21556 core: Add systemd.crash_action= kernel command line argument
Required for integration tests to power off on PID 1 crashes. We
deprecate systemd.crash_reboot and related options by removing them
from the documentation but still parsing them.
2024-04-29 14:34:22 +02:00
Mike Yuan 821bf13b6e journalctl: also check arg_file_stdin with other journal location
options

Prompted by #32491
2024-04-29 14:18:38 +02:00
nl6720 92ecff6098 docs/DEBUGGING.md: use an underscore in the kernel command line option
systemd-debug-generator(8) lists it as `systemd.debug_shell`.

According to 1d84ad9445, kernel command
line options should use an underscore instead of a dash.
2024-04-29 14:16:57 +02:00
Daan De Meyer ba4c69a0c6 core: Pass NULL error in dump_impl()
If mac_selinux_access_check() or bus_verify_bypass_dump_ratelimit_async()
fail, we goto "ratelimited" where we set a custom D-BUS error. In
"ratelimited", we call sd_bus_error_setf() which eventually hits an
assert_return(!bus_error_is_dirty()). Avoid hitting this assertion by
passing NULL as the error to mac_selinux_access_check() and
bus_verify_bypass_dump_ratelimit_async() since we will override the error
immediately anyway if either fails.

We modify both functions as well to allow passing a NULL error and fix
the argument name as well while we're at it.
2024-04-29 14:14:40 +02:00
Frantisek Sumsal 7d7a3c3535
Merge pull request #32556 from YHNdnzj/development-freeze
development-freeze: suppress warning for some labels
2024-04-29 13:46:41 +02:00
dependabot[bot] 89aec596c9 build(deps): bump pkg/debian from 4b1f868 to 640ff73
Bumps pkg/debian from `4b1f868` to `640ff73`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 13:05:36 +02:00
Mike Yuan 2286c15676
development-freeze: suppress warning for some labels 2024-04-29 18:59:02 +08:00
Mike Yuan 274623cc83
labeler: add l10n 🌍 2024-04-29 18:56:54 +08:00
Daan De Meyer 4eae58b3d3 pam: Setup logging to syslog
We already log to syslog using pam_syslog() for logs generated directly
within our pam plugins. However, any logs generated by our generic logging
macros that are invoked within a pam plugin will log to the console. Let's
make sure our generic logging macros are set up to log to syslog as well.
2024-04-29 12:17:18 +02:00
Pierre GRASSER d682bc1dae po: Translated using Weblate (French)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Pierre GRASSER <pierre.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2024-04-29 11:21:24 +02:00
Antonio Alvarez Feijoo 509871e6d5 NEWS: fix minimum dracut version required for systemd v256
Follow-up for d4e9be97a3
2024-04-29 11:19:31 +02:00
Mike Yuan f0fb294369
fs-util: modernize touch_file a bit 2024-04-29 16:33:17 +08:00
Mike Yuan 973464ad0e
fs-util: try AT_EMPTY_PATH first for futimens_opath 2024-04-29 16:33:17 +08:00
Mike Yuan cce82462a1
efivars: drop unneeded UTIME_NOW
futimens(2) defaults to current time if 'times' is NULL.
2024-04-29 16:33:17 +08:00