Commit Graph
74935 Commits
Author SHA1 Message Date
Mike Yuan 2bff236e70 core/main: move capability_ambient_set_apply() to initialize_runtime()
This is preparation for (user) manager, and we apply capability
settings for the system manager in initialize_runtime() too.
2024-07-13 22:58:24 +02:00
Mike Yuan 9100325690 core/main: respect skip_setup for RUNTIME_SCOPE_USER too 2024-07-13 22:58:24 +02:00
Mike Yuan 0acf4dfef5 core/main: merge second RUNTIME_SCOPE_SYSTEM block into switch above 2024-07-13 22:58:23 +02:00
Mike Yuan 20817cd272 core/main: modernize setup_os_release() a bit 2024-07-13 22:58:23 +02:00
Mike Yuan 0c7a2a5542 core/main: cast ignored retval of machine_id_setup() to void 2024-07-13 22:58:23 +02:00
Mike Yuan efa7a5cfe4 core/import-creds: use proc_cmdline_get_bool() 2024-07-13 22:58:23 +02:00
Mike Yuan 497b17bbad core/import-creds: use FOREACH_ARRAY and RET_GATHER where appropriate 2024-07-13 22:58:23 +02:00
Mike Yuan 77c3e07f93 basic/mkdir: merge two if blocks, return more accurate errno 2024-07-13 22:58:22 +02:00
Merlin Jehli 274a38c79a machine-id: Add cmdline argument to use VM behaviour on bare metal (#32086)
Closes #30707
2024-07-13 18:00:16 +02:00
Luca Boccassi e21333611a Merge pull request #33711 from dtardon/masked-unit-NeedDaemonReload
Fix `NeedDaemonReload=` for masked units with drop-ins
2024-07-13 14:22:05 +02:00
Mike Yuan 3addeada79 core/execute-serialize: fix deserialization for apparmor_profile_ignore
Follow-up for 99a1cdc951
2024-07-13 00:15:12 +02:00
Lennart Poettering dac77cae14 Merge pull request #33520 from tomcoldrick-ct/coldtom/sysupdate-improvements
sysupdate: Add --offline mode, notifications, JSON output and additional metadata
2024-07-12 19:12:41 +02:00
Mike Yuan 56f4ab2906 logind-user: take gc_mode into account when reporting user state
Prompted by #33650

Previously, if a user manually starts user@.service (which is
something we support), we'd track it as 'manager' session.
However, since user_get_state() ignores all non-pinning sessions,
if lingering is not enabled, the user state would always be
reported as 'closing', which is spurious.

Let's instead take gc_mode into consideration, and ignore
non-pinning sessions only if USER_GC_BY_PIN.
2024-07-12 18:32:53 +02:00
Mike Yuan 11b3775f51 core/unit: ignore dropins for masked units completely when checking need_reload
Follow-up for 19a44dfe45

If a drop-in is set from upper level, e.g. global unit_type.d/,
even if a unit is masked, its dropin_paths would still be partially
populated. However, unit_need_daemon_reload() would always
compare u->dropin_paths with empty strv in case of masked units,
resulting in it always returning true. Instead, let's ignore
dropins entirely here.

Fixes #33672
2024-07-12 15:59:36 +02:00
David Tardon 8b6de9e638 test: add a reproducer for #33672 2024-07-12 15:59:20 +02:00
Lennart Poettering 8f036c928e update TODO 2024-07-12 15:55:15 +02:00
Adrian Vovk 8ba9a9ac96 sysupdate: Split reboot_now into utils
This will let us reuse reboot_now in updatectl
2024-07-12 14:38:10 +01:00
Adrian Vovk 3f79921c08 sysupdate: Split UpdateSetFlags out from UpdateSet
This will let us reuse UpdateSetFlags in updatectl
2024-07-12 14:38:10 +01:00
Tom Coldrick 42e4659780 sysupdate: Use FOREACH_ARRAY where possible
Replace simple loops over arrays with the FOREACH_ARRAY macro.
2024-07-12 14:38:09 +01:00
Adrian Vovk db8849f2d4 sysupdate: Support changelogs & appstream metadata
Makes it possible to specify URLs to a changelog and an appstream
catalog XML in the sysupdate.d/*.conf files. This will be passed along
to the clients of systemd-sysupdated, which can then present this data.
2024-07-12 14:38:09 +01:00
Adrian Vovk 42c0b689a8 sysupdate: Implement JSON output
Previously, the JSON output happened mostly as an accident (i.e. just
dumped tables intended for viewing). Now we have more complete JSON
output.
2024-07-12 14:38:09 +01:00
Adrian Vovk c0d6186227 sysupdate: Add --offline mode
This prevents sysupdate from going out to the network to enumerate
available instances. When combined with the list command, this lets us
query installed instances
2024-07-12 14:38:09 +01:00
Adrian Vovk 8db5e9b657 sysupdate: Report download progress via sd_notify
We set up a NOTIFY_SOCKET to get download progress notifications from
each individual import helper. Along with the number of import jobs we
have to run, this gives an overall progress value which we report using
sd_notify
2024-07-12 14:38:09 +01:00
Lennart Poettering e37164cafc stub: const'ify a few parameters 2024-07-12 09:50:23 +02:00
Daan De Meyer d13615b7e0 Merge pull request #33686 from poettering/boot-tweaklets
boot/bootspec: some minor fixes/additions
2024-07-12 09:50:07 +02:00
Daan De Meyer aa6ebdd909 Merge pull request #33697 from poettering/vmspawn-stream-fix
vmspawn: fix AF_VSOCK sd_notify() reception
2024-07-12 08:33:18 +02:00
Lennart Poettering 0bd7217634 signal-util: use common definitions for ignore + default "struct sigaction"
We use this at various places, let's unify this in one global constant.

This changes flags in crash-handler.c in a tiny irrelevant way: we ask
syscalls to be continued on signal arrival, which we previously didn't.
But that shouldn't change anything, the only thing we'll do in the
relevant process is call raise(), and that's it, hence there definitely
are no syscalls to restart or not to restart.
2024-07-12 08:26:15 +02:00
Lennart Poettering 7b7f4c2608 bootspec: correct log level for fatal errors 2024-07-12 06:30:22 +02:00
Lennart Poettering 35451a3204 bootspec: implement sorting by tries left/done, to match what sd-boot does 2024-07-12 06:30:22 +02:00
Lennart Poettering 764faf6040 boot: compare filename suffixes without case
This is VFAT world after all.
2024-07-12 06:29:45 +02:00
Lennart Poettering 8c6a7fa6d9 vmspawn: get rid of an unnecessary local variable 2024-07-12 06:27:45 +02:00
Lennart Poettering 862c68a914 vmspawn: rework how AF_VSOCK/SOCK_STREAM notifications are read
Stream sockets are stream sockets, i.e. they won#t give us the full data
right-away, we must buffer locally and read until we hit EOF. Hence do
so.

moreover, make sure to close the fd once we are done, otherwise the
sender might block on us.
2024-07-12 06:27:45 +02:00
Lennart Poettering 7eedec7307 manager: move is-system check into manager_enable_special_signals()
It's usually how we do this: make the functions robust to be called in
any context, and validate the context in the functions themselves early,
instead of in the caller.
2024-07-12 04:47:19 +02:00
Lennart Poettering 5202ee42d5 import-creds: when we hit ENOENT on SMBIOS 11 do not even debug log
We'll *always* hit ENEOENT when iterating through SMBIOS type #11
fields, on the last one. it's very confusing to debug log about that,
let's just not do it.
2024-07-12 04:45:29 +02:00
Mike Yuan 99a1cdc951 core/execute-serialize: drop duplicate serialization of _ignore flags
These are indicated by the leading '-' in corresponding
label fields already.
2024-07-11 23:36:39 +02:00
Mike Yuan a4eb462fa1 core/meson.build: move various -setup sources out of libcore
They're only used in main.c, i.e. pid1.
2024-07-11 23:34:07 +02:00
Daan De Meyer a86211b7ca mkosi: Switch back to code.opensuse.org for opensuse
The commits on src.opensuse.org keep disappearing so let's switch
back to code.opensuse.org.
2024-07-11 14:12:59 +02:00
Léane GRASSER 5a3f04bcee po: Translated using Weblate (French)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2024-07-11 13:47:04 +02:00
Daan De Meyer 14fb6354f1 Merge pull request #33636 from DaanDeMeyer/ext4
Various integration test improvements
2024-07-10 21:33:23 +02:00
Mike Yuan 8288417b74 Merge pull request #33559 from YHNdnzj/reenable-now
systemctl: support reenable --now plus some other cleanups
2024-07-10 19:14:25 +02:00
Daan De Meyer eb6f177ae4 mkosi: update opensuse commit reference
*   8c025c3bdf Accepting request 1184267 from Base:System
|\
| * 735f8c4ba4 - Import commit 5a8eadd0c021758337a020c423f25a353bdb9b3c (merge of v255.8)   For a complete list of changes, visit:   https://github.com/openSUSE/systemd/compare/603cd1d4d81147d4f2eccd5e352064a4215119b4...5a8eadd0c021758337a020c423f25a353bdb9b3c - Drop 5003-Revert-run-pass-the-pty-slave-fd-to-transient-servic.patch as v255.8   contains the workaround (commit 639c922ede9485) for the broken commit   28459ba1f4.
* | 37853fecc3 Accepting request 1183029 from Base:System
|/
* 638de11012 - Don't automatically clean unmodified config files up (bsc#1226415)
* 369c023c24 reorder one more time...
* ffa9f0ac80 reorder the runtime deps of the testsuite package so the format_spec_file thingy stop screwing up the spec file...
* 12c1190a79 fix rev 1529: the devel packages are really needed by the testsuite script to install the dlopened libs into the image
* ca8e7f54ce - systemd.spec: move a misplaced %endif in the testsuite sub-package.
* b7944f5b14 - Merge systemd-coredump back into the main package (bsc#1091684)
* 3fa0dea84a - Don't pull the devel packages in when installing the testsuite package.
2024-07-10 18:52:29 +02:00
Daan De Meyer dfea7a8d26 tools/update-distro-hash: Fix path 2024-07-10 18:52:29 +02:00
Daan De Meyer dedd712dd9 TEST-06-SELINUX: Various fixes
- Stop installing the policy in the initramfs as it's not really
supported anyway (https://github.com/fedora-selinux/selinux-policy/issues/2221)
- Stop relabeling on first boot and prefer to do it at image build time
- Disable mkosi relabeling by default but enable it in CI
- Build image as root in CI so the SELinux relabeling works properly
2024-07-10 18:52:29 +02:00
Daan De Meyer 877842ed52 mkosi: Don't fail if /var/log/journal does not exist 2024-07-10 18:52:29 +02:00
Daan De Meyer e842deeac6 test: Switch to ncat instead of nc
ncat is available in CentOS Stream 9 without having to enable EPEL.
2024-07-10 18:52:29 +02:00
Daan De Meyer 3e3a15c06e TEST-55-OOMD: Switch to stress-ng
stress-ng is available in OpenSUSE and in CentOS Stream without needing
EPEL so let's switch to it instead of stress.
2024-07-10 18:52:26 +02:00
Daan De Meyer 00acdb3147 docs: Simplify update commands in HACKING.md
Let's make use of mkosi ssh to give everyone a one liner to run instead
of having to execute two commands (one outside the VM, one inside).
2024-07-10 17:17:42 +02:00
Daan De Meyer d5c3868181 mkosi: Update to latest 2024-07-10 16:52:54 +02:00
Daan De Meyer 0443f7e722 Merge pull request #33683 from DaanDeMeyer/sysext
mkosi: Build a sysext if SYSEXT=1 is specified
2024-07-10 13:21:12 +02:00
Lennart Poettering 035b98b607 Merge pull request #33660 from poettering/mount-tool-tweaks
minor tweaks to "systemd-mount"
2024-07-10 12:00:13 +02:00