Commit graph

73591 commits

Author SHA1 Message Date
Luca Boccassi 5387e4c832 NEWS: update for latest changes 2024-05-10 12:05:54 +01:00
Luca Boccassi cf2b044c5e
Merge pull request #32491 from yuwata/journalctl-fix-boot
journalctl: several fixes and cleanups for --boot= option handling
2024-05-10 13:00:22 +02:00
Luca Boccassi 1df2c9a597
Merge pull request #32741 from yuwata/network-dhcp4-route-to-dns
network/dhcp4: fix assignment of routes to DNS or NTP servers
2024-05-10 12:40:30 +02:00
Luca Boccassi b1975df814
Merge pull request #32739 from yuwata/vmspawn-journal-forward
vmspawn: fix journal forwarding
2024-05-10 12:37:56 +02:00
Daan De Meyer 5b29919b91 mkosi: Update centos submodule to latest 2024-05-10 11:33:15 +02:00
Luca Boccassi 086b277dc7
Merge pull request #32743 from yuwata/test-network-for-mkosi
test-network: several improvements for running with mkosi
2024-05-10 11:27:14 +02:00
Yu Watanabe b2062ee2d9 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.
2024-05-10 09:16:21 +02:00
Yu Watanabe 24e37929ed test-network: do not fail when /etc/protocols does not exist
Also this makes several checks more strict.
2024-05-10 15:16:20 +09:00
Yu Watanabe 2a4f9139d9 test-network: do not fail test_macvlan() with old kernel or ip command 2024-05-10 14:36:38 +09:00
Yu Watanabe e97bb361a0 test-network: do not fail if macvlan module is not available 2024-05-10 14:33:38 +09:00
Yu Watanabe 0f3116f039 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 0ce86f5eeb.

Fixes #32715.
2024-05-10 13:46:39 +09:00
Yu Watanabe 4591efffc0 test: add basic tests for in_addr_prefix_covers_full() 2024-05-10 13:46:39 +09:00
Yu Watanabe d0936a7266 journalctl: make --list-boots support -n/--lines= option
Also mention that -r/--reverse is supported by the command.
2024-05-10 11:43:57 +09:00
Yu Watanabe 5da5d848f9 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.
2024-05-10 11:43:57 +09:00
Yu Watanabe 8f2bcb1fb2 logs-show: use GREEDY_REALLOC_APPEND() 2024-05-10 11:43:57 +09:00
Yu Watanabe afcd9c60fe 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.
2024-05-10 11:43:57 +09:00
Yu Watanabe a467515519 journalctl: fix support of --boot=ID±offset format
Fixes a regression introduced by e44f06065b.

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().
2024-05-10 11:43:57 +09:00
Yu Watanabe 87dfaba7e9 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.
2024-05-10 11:43:57 +09:00
Yu Watanabe ae0e6de918 journalctl: fix --boot=0 with --file=- (from stdin)
Follow-up for 592855c318.
2024-05-10 11:43:57 +09:00
Yu Watanabe 781ddf1477 journalctl: split out journal_acquire_boot() from add_boot()
No functional change, just refactoring and prepration for later changes.
2024-05-10 11:43:53 +09:00
Yu Watanabe e8357737c6 vmspawn: fix finding systemd-journal-remote binary
Follow-up for 258d26940f.

Fixes https://github.com/systemd/systemd/pull/31218#discussion_r1596168449.
2024-05-10 11:37:24 +09:00
Yu Watanabe f607dd58bd vmspawn: trivial cleanups for start_systemd_journal_remote()
- prefix argument for storing result with 'ret_',
- align arguments for strv_new().
2024-05-10 11:37:24 +09:00
Yu Watanabe fdd325fbb8 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'.
2024-05-10 09:35:24 +09:00
Yu Watanabe 131701d10a logs-show: add missing strempty()
Follow-up for 8e976dc920.
2024-05-10 09:35:24 +09:00
Yu Watanabe 8ac0810f6c 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.
2024-05-10 09:35:24 +09:00
Florian Fainelli 41a94ae670 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.
2024-05-09 15:27:23 +02:00
hydrargyrum 5ebd945cda 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 -"
2024-05-09 13:25:32 +02:00
Daan De Meyer 50e0509ccf network: Add missing IPv6AcceptRA to list of config sections 2024-05-09 13:22:42 +02:00
Luca Boccassi 7e10dfae96
Merge pull request #32689 from YHNdnzj/cred-missing
core/exec-credential: complain louder if inherited credential is missing
2024-05-09 13:21:44 +02:00
Luca Boccassi 0c65d4dbf7
Merge pull request #32694 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-05-09 13:12:37 +02:00
Daan De Meyer 7a655d6f6f
Merge pull request #32733 from YHNdnzj/core-some-cleanup
core: minor cleanups
2024-05-09 12:45:50 +02:00
Scrambled 777 df38c7de6b po: Added translation using Weblate (Hindi)
Co-authored-by: Scrambled 777 <weblate.scrambled777@simplelogin.com>
2024-05-09 12:44:59 +02:00
Jarne Förster 6c16724ed8 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
2024-05-09 12:44:59 +02:00
Daan De Meyer 1781de18ab mkosi: Drop usage of updates-testing for Fedora 40
The util-linux update we need has migrated to the stable repositories.
2024-05-09 11:03:39 +02:00
Daan De Meyer 6c5d4f0645 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
2024-05-09 11:02:45 +02:00
Mike Yuan d99511add4
core/namespace: take char* const* for strv, use FOREACH_ARRAY 2024-05-09 17:02:19 +08:00
Mike Yuan 63a0e57724
path-util: take char* const* for strv where appropriate 2024-05-09 17:02:19 +08:00
Mike Yuan 7b89efda6f
core/unit: use FOREACH_ARRAY at one more place 2024-05-09 17:02:19 +08:00
Mike Yuan d08070f4e9
core/unit: cast unused retval to void 2024-05-09 17:02:18 +08:00
Mike Yuan 696a8ec0ff
core/dbus-unit: correct argument alignment for SD_BUS_METHOD_WITH_ARGS 2024-05-09 17:02:18 +08:00
Luca Boccassi b46fe64dbf
Merge pull request #32729 from DaanDeMeyer/kernel-command-line
mkosi: Extend kernel command line
2024-05-09 10:53:40 +02:00
Zbigniew Jędrzejewski-Szmek 2019f68683
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
2024-05-09 10:23:42 +02:00
Daan De Meyer ff45d26de0 mkosi: Make sure the kernel fails loudly on oops/panic/softlockup
Helps with noticing kernel related failures.
2024-05-09 09:57:40 +02:00
Daan De Meyer f1d2dc187f mkosi: Add raid=noautodetect to kernel command line
Should speed up boot times a little.
2024-05-09 09:57:04 +02:00
Sam Leonard 521e9286aa vmspawn: forward signals to VM PID 1 via D-BUS when available
Allow to gracefully shutdown by initiating the operation from
the guest
2024-05-08 23:25:02 +01:00
Sam Leonard 1e83cfff8d 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.
2024-05-08 23:24:54 +01:00
Sam Leonard 506aa3713b vmspawn: add a dropin override to sshd-vsock@.service 2024-05-08 23:24:54 +01:00
Mike Yuan 8f9acf8e10 systemctl-show: make show_memory_available cover memory_available itself
Follow-up for f380473edf

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 ()
> ...
2024-05-08 21:20:05 +02:00
Luca Boccassi d2fa7f1310
Merge pull request #32717 from keszybz/very-important-fixes
Whitespace adjustments and comments
2024-05-08 17:21:27 +02:00
Colin Watson 566491c971 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.
2024-05-08 17:14:32 +02:00