]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 hours agoMerge pull request #32755 from yuwata/test-network-cleanups main
Luca Boccassi [Fri, 10 May 2024 20:06:39 +0000 (22:06 +0200)] 
Merge pull request #32755 from yuwata/test-network-cleanups

test-network: several cleanups

5 hours agotest-network: simplify and unify waiting loop 32755/head
Yu Watanabe [Fri, 10 May 2024 17:00:21 +0000 (02:00 +0900)] 
test-network: simplify and unify waiting loop

Also,
- drop unused fail_assert arguments,
- use wait_links() and check_networkd_log() in wait_activated().

5 hours agotest-network: make link_exists() take multiple arguments
Yu Watanabe [Fri, 10 May 2024 16:58:06 +0000 (01:58 +0900)] 
test-network: make link_exists() take multiple arguments

This also improves performance of test_delete_links().

7 hours agoFix Positivo N14EPE and N15EPE key toggle touchpad and search key
Lucas Salles [Fri, 10 May 2024 13:59:52 +0000 (10:59 -0300)] 
Fix Positivo N14EPE and N15EPE key toggle touchpad and search key

9 hours agolibcrypt-util: fix wrong errno value assignment
Yu Watanabe [Fri, 10 May 2024 12:06:24 +0000 (21:06 +0900)] 
libcrypt-util: fix wrong errno value assignment

Follow-up for 9de324c3c919f20fd49e1d25579f5a66cac0eaa0.

9 hours agoMerge pull request #32747 from YHNdnzj/tmpfiles-ret-gather
Luca Boccassi [Fri, 10 May 2024 13:04:30 +0000 (15:04 +0200)] 
Merge pull request #32747 from YHNdnzj/tmpfiles-ret-gather

tmpfiles: some cleanups/follow-up

10 hours agoMerge pull request #32748 from yuwata/test-network-improvements
Daan De Meyer [Fri, 10 May 2024 12:31:03 +0000 (14:31 +0200)] 
Merge pull request #32748 from yuwata/test-network-improvements

test-network: several more improvements

11 hours agotest-network: check existence of kernel bug 32748/head
Yu Watanabe [Fri, 10 May 2024 11:38:06 +0000 (20:38 +0900)] 
test-network: check existence of kernel bug

This adds checks for the kernel bug caused by
https://github.com/torvalds/linux/commit/3ddc2231c8108302a8229d3c5849ee792a63230d,
it will be fixed by
https://patchwork.kernel.org/project/netdevbpf/patch/20240510072932.2678952-1-edumazet@google.com/

11 hours agotest-network: introduce --no-journal option
Yu Watanabe [Fri, 10 May 2024 11:18:57 +0000 (20:18 +0900)] 
test-network: introduce --no-journal option

This should be useful when the test run as a service, e.g.
running on a mkosi image.

11 hours agoMerge pull request #32738 from yuwata/trivial-cleanups
Mike Yuan [Fri, 10 May 2024 11:07:42 +0000 (19:07 +0800)] 
Merge pull request #32738 from yuwata/trivial-cleanups

Trivial follow-ups for recent changes

11 hours agoNEWS: update for latest changes
Luca Boccassi [Fri, 10 May 2024 11:05:36 +0000 (12:05 +0100)] 
NEWS: update for latest changes

12 hours agoMerge pull request #32491 from yuwata/journalctl-fix-boot
Luca Boccassi [Fri, 10 May 2024 11:00:22 +0000 (13:00 +0200)] 
Merge pull request #32491 from yuwata/journalctl-fix-boot

journalctl: several fixes and cleanups for --boot= option handling

12 hours agotmpfiles: use RET_GATHER more, add missing assertions 32747/head
Mike Yuan [Wed, 8 May 2024 09:54:54 +0000 (17:54 +0800)] 
tmpfiles: use RET_GATHER more, add missing assertions

Note that item_do() now aborts on OOM, since it's
pretty pointless to iterate further if memory allocation
doesn't work.

12 hours agotmpfiles: don't compare errno with negative value
Mike Yuan [Fri, 10 May 2024 10:16:31 +0000 (18:16 +0800)] 
tmpfiles: don't compare errno with negative value

Follow-up for 677430b3c7fcd1b352eb66f19b8746741459b91a

12 hours agotmpfiles: clean up hardlinks_vulnerable a bit
Mike Yuan [Fri, 10 May 2024 09:53:44 +0000 (17:53 +0800)] 
tmpfiles: clean up hardlinks_vulnerable a bit

dangerous_hardlinks() -> hardlinks_protected(),
and the meaning of the function is now in line
with fs.protected_hardlinks value.

Plus, We ship 50-default.conf where the sysctl
is enabled. Mention it in the comment.

12 hours agoMerge pull request #32741 from yuwata/network-dhcp4-route-to-dns
Luca Boccassi [Fri, 10 May 2024 10:40:30 +0000 (12:40 +0200)] 
Merge pull request #32741 from yuwata/network-dhcp4-route-to-dns

network/dhcp4: fix assignment of routes to DNS or NTP servers

12 hours agoMerge pull request #32739 from yuwata/vmspawn-journal-forward
Luca Boccassi [Fri, 10 May 2024 10:37:56 +0000 (12:37 +0200)] 
Merge pull request #32739 from yuwata/vmspawn-journal-forward

vmspawn: fix journal forwarding

13 hours agomkosi: Update centos submodule to latest
Daan De Meyer [Fri, 10 May 2024 08:51:43 +0000 (10:51 +0200)] 
mkosi: Update centos submodule to latest

13 hours agoMerge pull request #32743 from yuwata/test-network-for-mkosi
Luca Boccassi [Fri, 10 May 2024 09:27:14 +0000 (11:27 +0200)] 
Merge pull request #32743 from yuwata/test-network-for-mkosi

test-network: several improvements for running with mkosi

13 hours agocore/unit: use FOREACH_ELEMENT() to add dependencies for journal namespace instances 32738/head
Yu Watanabe [Fri, 10 May 2024 01:21:48 +0000 (10:21 +0900)] 
core/unit: use FOREACH_ELEMENT() to add dependencies for journal namespace instances

Follow-up for 06c0f569e94cc7406886079d241f1c1f82711937.

15 hours agotest: wait for network interface reconfigured after updating config
Yu Watanabe [Fri, 10 May 2024 05:21:10 +0000 (14:21 +0900)] 
test: wait for network interface reconfigured after updating config

Otherwise, at this stage, the interface may be in e.g. initialized or
pending state, and the drop-in file introduced by the previous command
may not be registered to the state file for the interface.

Fixes #32685.

16 hours agotest-network: do not fail when /etc/protocols does not exist 32743/head
Yu Watanabe [Fri, 10 May 2024 06:15:22 +0000 (15:15 +0900)] 
test-network: do not fail when /etc/protocols does not exist

Also this makes several checks more strict.

17 hours agotest-network: do not fail test_macvlan() with old kernel or ip command
Yu Watanabe [Fri, 10 May 2024 05:36:38 +0000 (14:36 +0900)] 
test-network: do not fail test_macvlan() with old kernel or ip command

17 hours agotest-network: do not fail if macvlan module is not available
Yu Watanabe [Fri, 10 May 2024 05:33:38 +0000 (14:33 +0900)] 
test-network: do not fail if macvlan module is not available

18 hours agonetwork/dhcp4: do not set gateway if DNS server or friends is in the acquired prefix 32741/head
Yu Watanabe [Fri, 10 May 2024 03:49:50 +0000 (12:49 +0900)] 
network/dhcp4: do not set gateway if DNS server or friends is in the acquired prefix

Previously, even if a DNS server is in the acquired prefix, the route to the
server might have gateway address.
This makes the prefix route, which is always configured, is also handled
as same as static routes, and do not use any gateway if the prefix route
is the most suitable route to access the destination.
The same change is also applied to route to NTP servers and semi-static
routes.

Fixes a regression introduced by 0ce86f5eeb0921b44a9782260a8c88aafb15ffde.

Fixes #32715.

18 hours agotest: add basic tests for in_addr_prefix_covers_full()
Yu Watanabe [Fri, 10 May 2024 03:17:10 +0000 (12:17 +0900)] 
test: add basic tests for in_addr_prefix_covers_full()

20 hours agojournalctl: make --list-boots support -n/--lines= option 32491/head
Yu Watanabe [Fri, 26 Apr 2024 04:40:40 +0000 (13:40 +0900)] 
journalctl: make --list-boots support -n/--lines= option

Also mention that -r/--reverse is supported by the command.

20 hours agojournalctl: fail and show error message when no boot ID found
Yu Watanabe [Thu, 25 Apr 2024 05:22:41 +0000 (14:22 +0900)] 
journalctl: fail and show error message when no boot ID found

No boot ID in journal should be definitly spurious.
Let's warn about that and exit with failure.

20 hours agologs-show: use GREEDY_REALLOC_APPEND()
Yu Watanabe [Fri, 26 Apr 2024 02:31:48 +0000 (11:31 +0900)] 
logs-show: use GREEDY_REALLOC_APPEND()

20 hours agologs-show: fix stored timestamp when advance_older is true
Yu Watanabe [Fri, 26 Apr 2024 02:30:34 +0000 (11:30 +0900)] 
logs-show: fix stored timestamp when advance_older is true

Currently, the parsed timestamp is only used when advance_older is
false. Hence, this does not change any behavior. But, let's fix it anyway.

20 hours agojournalctl: fix support of --boot=ID±offset format
Yu Watanabe [Fri, 26 Apr 2024 02:27:12 +0000 (11:27 +0900)] 
journalctl: fix support of --boot=ID±offset format

Fixes a regression introduced by e44f06065bf20e8d0e4adacff61350ebd36f299e.

After the offending commit, if a boot ID suffixed with an offset is
specified to --boot=, the boot ID was ignored.
This fixes the issue.

To fix the issue, this merges journal_find_boot_by_id() and
journal_find_boot_by_offset().

20 hours agologs-show: flush matches before and after finding boots
Yu Watanabe [Fri, 26 Apr 2024 03:10:39 +0000 (12:10 +0900)] 
logs-show: flush matches before and after finding boots

Otherwise, if several matches already set, then the first seek to head
or tail may move the cursor to an invalid place, hence they provide
wrong ID(s). Also, reading journal after calling these function may
provide unexpected data.

Currently, the caller does not install any matches before calling the
functions, and does not read any journal entry after journal_get_boots()
succeeds or journal_find_boot_by_offset() succeeds with 0. Hence, this
should not change any behavior. Just for safety.

20 hours agojournalctl: fix --boot=0 with --file=- (from stdin)
Yu Watanabe [Fri, 26 Apr 2024 00:40:26 +0000 (09:40 +0900)] 
journalctl: fix --boot=0 with --file=- (from stdin)

Follow-up for 592855c3189549fed93b1060b72299910c6ab1d0.

20 hours agojournalctl: split out journal_acquire_boot() from add_boot()
Yu Watanabe [Thu, 25 Apr 2024 04:05:13 +0000 (13:05 +0900)] 
journalctl: split out journal_acquire_boot() from add_boot()

No functional change, just refactoring and prepration for later changes.

20 hours agovmspawn: fix finding systemd-journal-remote binary 32739/head
Yu Watanabe [Fri, 10 May 2024 02:36:24 +0000 (11:36 +0900)] 
vmspawn: fix finding systemd-journal-remote binary

Follow-up for 258d26940fb6bfa1b5b8acf03cc4a37f2657e4ac.

Fixes https://github.com/systemd/systemd/pull/31218#discussion_r1596168449.

20 hours agovmspawn: trivial cleanups for start_systemd_journal_remote()
Yu Watanabe [Fri, 10 May 2024 02:27:48 +0000 (11:27 +0900)] 
vmspawn: trivial cleanups for start_systemd_journal_remote()

- prefix argument for storing result with 'ret_',
- align arguments for strv_new().

21 hours agocore/service: shorten code a bit
Yu Watanabe [Fri, 10 May 2024 01:12:40 +0000 (10:12 +0900)] 
core/service: shorten code a bit

Follow-up for 026335e9aab5ccf1fc9477215beadd0acef94073.

21 hours agotime-util: define TIMESPEC_OMIT
Yu Watanabe [Fri, 10 May 2024 01:10:48 +0000 (10:10 +0900)] 
time-util: define TIMESPEC_OMIT

Follow-up for 34c3d574742e867ef97e79509e4051a82f1b7d9b.

22 hours agojournalctl: several cleanups for parse_boot_descriptor()
Yu Watanabe [Sat, 27 Apr 2024 08:44:49 +0000 (17:44 +0900)] 
journalctl: several cleanups for parse_boot_descriptor()

- rename to parse_id_descriptor(), to make it usable for other kind of
  ID later.
- add missing assertions,
- prefix arguments for storing results with 'ret_',
- drop unnecessary 'else'.

22 hours agologs-show: add missing strempty()
Yu Watanabe [Sat, 27 Apr 2024 08:50:49 +0000 (17:50 +0900)] 
logs-show: add missing strempty()

Follow-up for 8e976dc9209853d5d4d2db3016289f2a5ab99fd9.

22 hours agologs-show: drop uid argument from add_matches_for_user_units()
Yu Watanabe [Thu, 25 Apr 2024 03:44:49 +0000 (12:44 +0900)] 
logs-show: drop uid argument from add_matches_for_user_units()

It is always equivalent to getuid(). Let's call getuid() in the
function instead.

33 hours agobasic/linux: Copy netfilter.h to the source tree
Florian Fainelli [Mon, 6 May 2024 17:40:29 +0000 (10:40 -0700)] 
basic/linux: Copy netfilter.h to the source tree

This fixes build with old toolchains prior to Linux < 4.2 which do not
have a definition for NFPROTO_NETDEV.

35 hours agoshell-completion: on zsh, systemd-cat is a precommand
hydrargyrum [Tue, 30 Apr 2024 14:02:22 +0000 (16:02 +0200)] 
shell-completion: on zsh, systemd-cat is a precommand

_precommand lets zsh complete other commands and their arguments
e.g. it can complete grep with "systemd-cat gr" and complete grep options
with "systemd-cat grep -"

35 hours agonetwork: Add missing IPv6AcceptRA to list of config sections
Daan De Meyer [Tue, 7 May 2024 09:00:57 +0000 (11:00 +0200)] 
network: Add missing IPv6AcceptRA to list of config sections

35 hours agoMerge pull request #32689 from YHNdnzj/cred-missing
Luca Boccassi [Thu, 9 May 2024 11:21:44 +0000 (13:21 +0200)] 
Merge pull request #32689 from YHNdnzj/cred-missing

core/exec-credential: complain louder if inherited credential is missing

35 hours agoMerge pull request #32694 from weblate/weblate-systemd-main
Luca Boccassi [Thu, 9 May 2024 11:12:37 +0000 (13:12 +0200)] 
Merge pull request #32694 from weblate/weblate-systemd-main

Translations update from Fedora Weblate

36 hours agoMerge pull request #32733 from YHNdnzj/core-some-cleanup
Daan De Meyer [Thu, 9 May 2024 10:45:50 +0000 (12:45 +0200)] 
Merge pull request #32733 from YHNdnzj/core-some-cleanup

core: minor cleanups

36 hours agopo: Added translation using Weblate (Hindi) 32694/head
Scrambled 777 [Wed, 8 May 2024 20:02:52 +0000 (22:02 +0200)] 
po: Added translation using Weblate (Hindi)

Co-authored-by: Scrambled 777 <weblate.scrambled777@simplelogin.com>
36 hours agopo: Translated using Weblate (German)
Jarne Förster [Wed, 8 May 2024 20:02:51 +0000 (22:02 +0200)] 
po: Translated using Weblate (German)

Currently translated at 97.8% (228 of 233 strings)

Co-authored-by: Jarne Förster <fedora@mymailclient.de>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main

37 hours agomkosi: Drop usage of updates-testing for Fedora 40
Daan De Meyer [Thu, 9 May 2024 08:21:01 +0000 (10:21 +0200)] 
mkosi: Drop usage of updates-testing for Fedora 40

The util-linux update we need has migrated to the stable repositories.

37 hours agoTEST-46-HOMED: Ignore "Disk Usage" field as well
Daan De Meyer [Thu, 9 May 2024 07:40:16 +0000 (09:40 +0200)] 
TEST-46-HOMED: Ignore "Disk Usage" field as well

This can change between the call to homectl inspect and userdbctl
user so let's ignore it along with the other disk fields.

Fixes #32727

37 hours agocore/namespace: take char* const* for strv, use FOREACH_ARRAY 32733/head
Mike Yuan [Thu, 9 May 2024 08:48:26 +0000 (16:48 +0800)] 
core/namespace: take char* const* for strv, use FOREACH_ARRAY

37 hours agopath-util: take char* const* for strv where appropriate
Mike Yuan [Thu, 9 May 2024 08:46:48 +0000 (16:46 +0800)] 
path-util: take char* const* for strv where appropriate

37 hours agocore/unit: use FOREACH_ARRAY at one more place
Mike Yuan [Thu, 9 May 2024 06:28:25 +0000 (14:28 +0800)] 
core/unit: use FOREACH_ARRAY at one more place

37 hours agocore/unit: cast unused retval to void
Mike Yuan [Thu, 9 May 2024 06:25:24 +0000 (14:25 +0800)] 
core/unit: cast unused retval to void

37 hours agocore/dbus-unit: correct argument alignment for SD_BUS_METHOD_WITH_ARGS
Mike Yuan [Wed, 8 May 2024 16:58:42 +0000 (00:58 +0800)] 
core/dbus-unit: correct argument alignment for SD_BUS_METHOD_WITH_ARGS

38 hours agoMerge pull request #32729 from DaanDeMeyer/kernel-command-line
Luca Boccassi [Thu, 9 May 2024 08:53:40 +0000 (10:53 +0200)] 
Merge pull request #32729 from DaanDeMeyer/kernel-command-line

mkosi: Extend kernel command line

38 hours agoMerge pull request #32701 from bluca/vmspawn/machinectl-shell
Zbigniew Jędrzejewski-Szmek [Thu, 9 May 2024 08:23:42 +0000 (10:23 +0200)] 
Merge pull request #32701 from bluca/vmspawn/machinectl-shell

vmspawn: implement machinectl shell for vm class machines and send termination signal via D-Bus-over-SSH

39 hours agomkosi: Make sure the kernel fails loudly on oops/panic/softlockup 32729/head
Daan De Meyer [Thu, 9 May 2024 07:57:12 +0000 (09:57 +0200)] 
mkosi: Make sure the kernel fails loudly on oops/panic/softlockup

Helps with noticing kernel related failures.

39 hours agomkosi: Add raid=noautodetect to kernel command line
Daan De Meyer [Thu, 9 May 2024 07:56:06 +0000 (09:56 +0200)] 
mkosi: Add raid=noautodetect to kernel command line

Should speed up boot times a little.

2 days agovmspawn: forward signals to VM PID 1 via D-BUS when available 32701/head
Sam Leonard [Thu, 25 Apr 2024 16:16:20 +0000 (17:16 +0100)] 
vmspawn: forward signals to VM PID 1 via D-BUS when available

Allow to gracefully shutdown by initiating the operation from
the guest

2 days agovmspawn: register with io.systemd.Machine.Register
Sam Leonard [Tue, 9 Apr 2024 16:27:21 +0000 (17:27 +0100)] 
vmspawn: register with io.systemd.Machine.Register

When available, use varlink to register the VM, so that we can talk
over SSH to the guest. Enables 'machinectl shell' for vmspawn guests.

2 days agovmspawn: add a dropin override to sshd-vsock@.service
Sam Leonard [Wed, 10 Apr 2024 15:21:12 +0000 (16:21 +0100)] 
vmspawn: add a dropin override to sshd-vsock@.service

2 days agosystemctl-show: make show_memory_available cover memory_available itself
Mike Yuan [Wed, 8 May 2024 17:12:17 +0000 (01:12 +0800)] 
systemctl-show: make show_memory_available cover memory_available itself

Follow-up for f380473edfa899706d630bb64750ab50c5c04961

This cleans up the code a bit. Also, before this commit,
if MemoryAvailable is set but show_memory_available
is false, and we have nothing else to output, empty
parenthesis is shown. This can be easily reproduced
on -.slice:

> systemctl status -- -.slice
> ...
> Memory: 1.8G ()
> ...

2 days agoMerge pull request #32717 from keszybz/very-important-fixes
Luca Boccassi [Wed, 8 May 2024 15:21:27 +0000 (17:21 +0200)] 
Merge pull request #32717 from keszybz/very-important-fixes

Whitespace adjustments and comments

2 days agodocs,man: Avoid some ambiguous uses of "may not"
Colin Watson [Wed, 8 May 2024 14:01:01 +0000 (15:01 +0100)] 
docs,man: Avoid some ambiguous uses of "may not"

Like much English text, the systemd documentation uses "may not" in the
sense of both "will possibly not" and "is forbidden to".  In many cases
this is OK because the context makes it clear, but in others I felt it
was possible to read the "is forbidden to" sense by mistake: in
particular, I tripped over "the target file may not exist" in
systemd.unit(5) before realizing the correct interpretation.

Use "might not" or "may choose not to" in these cases to make it clear
which sense we mean.

2 days agopidfd: properly detect if libc offers pidfd syscalls and make use of them then
Lennart Poettering [Wed, 8 May 2024 10:27:38 +0000 (12:27 +0200)] 
pidfd: properly detect if libc offers pidfd syscalls and make use of them then

We never updated the meson checks when glibc finally learned about these
syscalls, address that.

2 days agonspawn: whitespace 32717/head
Zbigniew Jędrzejewski-Szmek [Wed, 8 May 2024 12:59:14 +0000 (14:59 +0200)] 
nspawn: whitespace

2 days agorepart,measure: reword help descriptions
Zbigniew Jędrzejewski-Szmek [Wed, 8 May 2024 10:57:33 +0000 (12:57 +0200)] 
repart,measure: reword help descriptions

This is a follow-up/extension for ec361ea9ce0344321a6877d4d69a85db0c5bca4a.

2 days agoshared: fix comment
Zbigniew Jędrzejewski-Szmek [Wed, 8 May 2024 10:40:31 +0000 (12:40 +0200)] 
shared: fix comment

Follow-up for 90db1582a97d048769198ee1c0f367d003eeb130.

2 days agovmspawn: indentation
Zbigniew Jędrzejewski-Szmek [Wed, 8 May 2024 10:05:41 +0000 (12:05 +0200)] 
vmspawn: indentation

2 days agofirewall-util-iptables: update ELF note to mention "iptables"
Mike Yuan [Wed, 8 May 2024 12:13:19 +0000 (20:13 +0800)] 
firewall-util-iptables: update ELF note to mention "iptables"

Follow-up for cd7c2077954d86d23eafdedf3e258b365622779d

2 days agoMerge pull request #32709 from bluca/machined_ssh
Luca Boccassi [Wed, 8 May 2024 12:37:55 +0000 (14:37 +0200)] 
Merge pull request #32709 from bluca/machined_ssh

machined: add GetMachineSSHInfo method and varlink interface to register machines

2 days agoMerge pull request #32708 from DaanDeMeyer/fix-race
Luca Boccassi [Wed, 8 May 2024 12:21:37 +0000 (14:21 +0200)] 
Merge pull request #32708 from DaanDeMeyer/fix-race

Fix race conditions in tests

2 days agohwdb: Add a Logitech MX Master 3S (connected via Bolt Receiver)
Maciej S. Szmigiero [Tue, 7 May 2024 20:51:46 +0000 (22:51 +0200)] 
hwdb: Add a Logitech MX Master 3S (connected via Bolt Receiver)

The mouse technically has settable DPI between 200 and 8000, with a step of
50, but 1000 DPI is the default setting.
And if someone customizes the mouse DPI setting they can make a custom hwdb
rule too.

2 days agoMerge pull request #32705 from YHNdnzj/hibernate-error
Luca Boccassi [Wed, 8 May 2024 12:19:07 +0000 (14:19 +0200)] 
Merge pull request #32705 from YHNdnzj/hibernate-error

hibernate-util: differentiate some errors from the generic ENOSPC; systemctl: adjust the fallback behavior for sleep operations

2 days agoMerge pull request #32710 from YHNdnzj/debug-generator-cleanup
Daan De Meyer [Wed, 8 May 2024 12:09:56 +0000 (14:09 +0200)] 
Merge pull request #32710 from YHNdnzj/debug-generator-cleanup

debug-generator: several cleanups

2 days agoMerge pull request #32234 from poettering/dlopen-name-elf-note
Luca Boccassi [Wed, 8 May 2024 11:56:34 +0000 (13:56 +0200)] 
Merge pull request #32234 from poettering/dlopen-name-elf-note

Expose dlopen() dependencies in an ELF section, and add spec for it

2 days agoUse the correct name of CEL
MaxHearnden [Wed, 8 May 2024 06:02:52 +0000 (07:02 +0100)] 
Use the correct name of CEL

It's Canonical Event Format, not Common

2 days agomachined: add varlink interface for registering machines 32709/head
Sam Leonard [Tue, 23 Apr 2024 09:26:59 +0000 (10:26 +0100)] 
machined: add varlink interface for registering machines

This commit adds the new varlink interface io.systemd.Machine at
/run/systemd/machine/io.systemd.Machine with a single method Register

It supports all combinations of RegisterMachine[WithSSH,WithNetwork] all
under the same method.

2 days agodebug-generator: clean up logging and such for units passed from creds 32710/head
Mike Yuan [Wed, 8 May 2024 10:18:33 +0000 (18:18 +0800)] 
debug-generator: clean up logging and such for units passed from creds

2 days agodebug-generator: don't eat up error if we can't write drop-in
Mike Yuan [Wed, 8 May 2024 10:13:29 +0000 (18:13 +0800)] 
debug-generator: don't eat up error if we can't write drop-in

While at it, prepend the drop-in text with
our usual "Automatically generated by ...".

2 days agodebug-generator: drop unneeded empty_to_root
Mike Yuan [Wed, 8 May 2024 10:41:54 +0000 (18:41 +0800)] 
debug-generator: drop unneeded empty_to_root

2 days agodebug-generator: use RET_GATHER where appropriate
Mike Yuan [Wed, 8 May 2024 10:05:15 +0000 (18:05 +0800)] 
debug-generator: use RET_GATHER where appropriate

2 days agodebug-generator: enclose function call in if statement when retval
Mike Yuan [Wed, 8 May 2024 09:57:28 +0000 (17:57 +0800)] 
debug-generator: enclose function call in if statement when retval
is not used

2 days agoTEST-04-JOURNAL: Sleep more in delegated cgroup filtering script 32708/head
Daan De Meyer [Wed, 8 May 2024 09:44:28 +0000 (11:44 +0200)] 
TEST-04-JOURNAL: Sleep more in delegated cgroup filtering script

We already changed logs-filtering.service to sleep 2 seconds before
exiting to combat flakyness, let's do the same for the delegated
cgroup filtering payload.

Fixes #32696 (hopefully)

2 days agoTEST-81-GENERATORS: Do a lazy unmounts
Daan De Meyer [Wed, 8 May 2024 09:41:04 +0000 (11:41 +0200)] 
TEST-81-GENERATORS: Do a lazy unmounts

Otherwise we might fail if PID 1 is currently accessing these files.

Fixes #32692 (hopefully)

2 days agossh-generator: fix pointer cast type
Mike Yuan [Wed, 8 May 2024 10:12:35 +0000 (18:12 +0800)] 
ssh-generator: fix pointer cast type

2 days agotree-wide: add dlopen ELF notes to all dlopen() deps of ours 32234/head
Lennart Poettering [Thu, 11 Apr 2024 15:50:41 +0000 (17:50 +0200)] 
tree-wide: add dlopen ELF notes to all dlopen() deps of ours

Use 'recommended' priority for the default compression library, to
indicate that it should be prioritized over the other ones, as it
will be used to compress journals/core files.
Also use 'recommended' for kmod, as systems will likely fail to boot
if it's missing from the initrd.
Use 'suggested' for everything else.

There is one dlopen'ed TPM library that has the name generated
at runtime (depending on the driver), so that cannot be added, as it
needs to be known at build time.
Also when we support multiple ABI versions list them all, as for the
same reason we cannot know which one will be used at build time.

$ dlopen-notes.py build/libsystemd.so.0.39.0 build/src/shared/libsystemd-shared-256.so
libarchive.so.13 suggested
libbpf.so.0 suggested
libbpf.so.1 suggested
libcryptsetup.so.12 suggested
libdw.so.1 suggested
libelf.so.1 suggested
libfido2.so.1 suggested
libgcrypt.so.20 suggested
libidn2.so.0 suggested
libip4tc.so.2 suggested
libkmod.so.2 recommended
liblz4.so.1 suggested
liblzma.so.5 suggested
libp11-kit.so.0 suggested
libpcre2-8.so.0 suggested
libpwquality.so.1 suggested
libqrencode.so.3 suggested
libqrencode.so.4 suggested
libtss2-esys.so.0 suggested
libtss2-mu.so.0 suggested
libtss2-rc.so.0 suggested
libzstd.so.1 recommended

Co-authored-by: Luca Boccassi <bluca@debian.org>
2 days agodlfcn: add macro for exporting dlopen() module names in ELF sections
Lennart Poettering [Thu, 11 Apr 2024 15:45:17 +0000 (17:45 +0200)] 
dlfcn: add macro for exporting dlopen() module names in ELF sections

This allows code to declare "weak" dlopen() style deps via an ELF
section following the just added specification.

The idea is that any user of dlopen() will place ELF_NOTE_DLOPEN(…)
somewhere close which will synthesize the note.

Tools such as rpm/dpkg package builders as well as initrd generators
(such as dracut) can then automatically pick up these weak deps of
suggested dependencies for their purposes.

Co-authored-by: Luca Boccassi <bluca@debian.org>
2 days agodocs: add specification for ELF dlopen metadata
Luca Boccassi [Sun, 5 May 2024 15:45:21 +0000 (16:45 +0100)] 
docs: add specification for ELF dlopen metadata

Tool to parse it and to use it for Debian packaging available at
https://github.com/systemd/package-notes

Add 3 levels of priority like Debian does, but using terminology
from RPM as it seems more apt.
We will very likely never use 'required', as we use this functionality
for optional features, but it is worth having it in the spec nonetheless
as we want it to be generalized.

2 days agotmpfiles: Don't fail if file does not exist in item_do()
Daan De Meyer [Wed, 8 May 2024 09:35:21 +0000 (11:35 +0200)] 
tmpfiles: Don't fail if file does not exist in item_do()

If the file was removed by some other program, we should just go
to the next one without failing. item_do() is only used for recursive
globs instead of fixed paths so skipping on missing files makes sense
(unlike if the path was fixed where we should probably fail).

Fixes #32691 (hopefully)

2 days agoTEST-74-AUX-UTILS: Make more robust
Daan De Meyer [Wed, 8 May 2024 09:21:42 +0000 (11:21 +0200)] 
TEST-74-AUX-UTILS: Make more robust

Let's run mkfs on the file we create instead of the loop device and
let's use udevadm wait --settle to wait for udev to settle before
doing anything with the loop device

Fixes #32680 (hopefully)

2 days agomachined: add GetMachineSSHInfo method
Sam Leonard [Wed, 24 Apr 2024 17:08:13 +0000 (18:08 +0100)] 
machined: add GetMachineSSHInfo method

Also adds three properties:
- VsockCid: the VSOCK CID of the VM
- SshAddress: the address of the VM in a format SSH can connect to
- SshPrivateKeyPath: the path to the SSH private key to use to connect
  to the VM.

GetMachineSSHInfo is essentially a convenience method to query both the
SshAddress and SshPrivateKeyPath properties at once.

2 days agomachined: split manager linking out of machine_new into machine_link
Sam Leonard [Wed, 24 Apr 2024 08:57:18 +0000 (09:57 +0100)] 
machined: split manager linking out of machine_new into machine_link

2 days agomachined: expose machine_freep in machine.h
Sam Leonard [Mon, 22 Apr 2024 15:23:13 +0000 (16:23 +0100)] 
machined: expose machine_freep in machine.h

2 days agoshared/json: add json_dispatch_absolute_path
Sam Leonard [Tue, 23 Apr 2024 14:03:34 +0000 (15:03 +0100)] 
shared/json: add json_dispatch_absolute_path

2 days agoTEST-07-PID1: Fix race in aux-scope subtest
Daan De Meyer [Wed, 8 May 2024 08:20:20 +0000 (10:20 +0200)] 
TEST-07-PID1: Fix race in aux-scope subtest

Currently test-aux-scope.service can get killed by the test before
it's had a chance to setup its signal handler. Make it Type=notify
to fix the race.

Fixes #32670 (hopefully)

2 days agoman/run0: remove the --user example for --machine=
Mike Yuan [Wed, 8 May 2024 05:55:00 +0000 (13:55 +0800)] 
man/run0: remove the --user example for --machine=

run0's --user= option is different from other tools,
and the whole point of run0 is to connect to the system
manager. So the example is spurious.

2 days agopreset-all: continue on errors, report more errors
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2024 16:54:24 +0000 (18:54 +0200)] 
preset-all: continue on errors, report more errors

Firstly, if we encounter an error when iterating over the directory, gather
the error but continue. This is unlikely to happen, but if it happens, then
it doesn't seem very useful to break the preset processing at a random
point. If we can't process a unit — too bad, but since we already might
have processed some units earlier, we might as well try to process the
remaining ones.

Secondly, add missing error codes for units that are in a bad state to the
exclusion list. Those, we report them in the changes list, but consider the
whole operation a success. (-ETXTBSY and -ENOLINK were missing.)

Thirdly, add a message generator for -ENOLINK.

Fixes https://github.com/systemd/systemd/issues/21224.