Commit Graph
74922 Commits
Author SHA1 Message Date
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
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
Daan De Meyer 612a98a065 mkosi: Build a sysext if SYSEXT=1 is specified 2024-07-10 10:55:33 +02:00
Lennart Poettering 40d9c16d1e man: some fixes
Addons are called addons, say so. And some other fixes.
2024-07-10 10:08:59 +02:00
Daan De Meyer 73b3179a53 mkosi: Check for configured build directory if WIPE=1
Otherwise trying to use --wipe might fail if the build directory
has not been configured but is not empty either.
2024-07-10 10:08:20 +02:00
Daan De Meyer ece66c01cf mkosi: Install erofs-utils 2024-07-10 10:05:59 +02:00
Lennart Poettering c4ecc0231f update TODO 2024-07-10 09:35:31 +02:00
Lennart Poettering 5b37c4cf86 mount-tool: show diskseq in --list output
Let's expose the diskseq a bit more prominently.
2024-07-10 09:35:31 +02:00
Lennart Poettering 3d41dfe447 mount-tool: use the usual coloring in --help text 2024-07-10 09:35:31 +02:00
Lennart Poettering 66f4f49c8f mount-tool: add support for a --json= output mode
Let's add a JSON output mode, like we have it for so many of our tools.
2024-07-10 09:35:31 +02:00
Lennart Poettering 070a43ced4 mount-tool: use lowercase table column names
The "systemd-mount" tool is the one outlier in our codebase to specify
upper case column names. And it's quite pointless given that our table
output logic uppercases this anyway on output. Hence, let's fix that.

(This would be a compat break, if we'd support JSON output of this
table, but we do not currently. JSON fields use the literal column
name after all.)
2024-07-10 09:35:31 +02:00
Kuntal Majumder f9572d2b89 man: fix typo in unit options section
Fixes #32918
2024-07-09 22:47:25 +02:00
Luca Boccassi aaa7b36bd1 test: install split-out sshd-session binary if present
Archlinux split out one ssh binary, install it in the legacy test
setup if present for the tests that need ssh
2024-07-09 21:29:08 +02:00
Luca Boccassi bbb0b72849 fsck: do not pull down mount units on soft-reboot
Otherwise they will pull down the disk too, which we don't want on soft-reboot
2024-07-09 20:59:35 +02:00
Mike Yuan 98aedce914 systemctl-enable: support reenable --now
Also, instead of silently continuing when template units
are specified with enable --now, print a warning and skip them.

Closes #31541
2024-07-09 16:46:13 +02:00