Commit graph

71386 commits

Author SHA1 Message Date
Sam Leonard b0dc766852
vmspawn: support machined registration 2024-02-28 17:49:00 +00:00
Lennart Poettering 6aa14b283b
Merge pull request #31514 from CodethinkLabs/ptyfwd_issues
ptyfwd/terminal-util: improve edge case handling
2024-02-28 18:36:50 +01:00
Frantisek Sumsal 78816ce72e
Merge pull request #31444 from bluca/semaphore
semaphore: set upstream build profile and set default branch to debian/master
2024-02-28 15:03:11 +01:00
Luca Boccassi 0cad991c4c
Merge pull request #31293 from ragazenta/netdev_rps
udevd: Add ReceivePacketSteeringCPUMask for systemd.link
2024-02-28 13:37:28 +00:00
Lennart Poettering 6a145157eb resolved: exit function if varlink_dispatch() returns > 0
varlink_dispatch() returns > 0 if it already replied to the method call,
hence this is reason to return from the handler function, and not
proceed.
2024-02-28 13:35:47 +00:00
Lennart Poettering f9f5ce61fa userbdb: pass log level from main daemon to worker 2024-02-28 12:42:06 +00:00
Sam Leonard d848a94998
shared/ptyfwd: detect String Terminator or BEL when parsing an OSC sequence 2024-02-28 11:50:18 +00:00
Sam Leonard 9eb118eea7
shared/ptyfwd: allow window title but not background color as a valid state
Previously if a PTYForward instance had the window title set but no
background color set then it would crash in an assertion as
pty_forward_ansi_process didn't require both to be present.

systemd-vmspawn could get into this state if it failed to get the
terminal tint color.

Now any method that would have called background_color_sequence now
becomes just a NOP if the background color is not set.

This allows keeping the functionality to set window titles even if the
terminal doesn't support the background coloring.
2024-02-28 11:50:18 +00:00
Sam Leonard 73a72e3a7b
basic/terminal-util: accept ST or BEL to end escape sequence queries
Currently scan_background_color_response only accepts BEL (\x07) to end
a response, however some terminals (namely kitty in my case) will reply
with the string terminator (ST - https://en.wikipedia.org/wiki/ANSI_escape_code).

This commit changes the behaviour to now accept either ending.
2024-02-28 11:50:18 +00:00
Sam Leonard 9924d3c595
basic/terminal-util: add check for poll timeout in get_default_background_color
Currently the return value 0 is not checked for, this indicates a
timeout and should be handled to prevent doing a blocking read on a file
descriptor with no data ready.
2024-02-28 11:50:17 +00:00
Yu Watanabe 39af486a7f network/ndisc: drop redundant sd_ndisc_router_get_icmp6_ratelimit()
This effectively reverts 9175002864.

The retrans time field in RA message is for neighbor solicitation,
and the commit d4c8de21a0 makes the value
assigned to the correct sysctl property.

Let's deprecate the option, and drop the redundant functions.
2024-02-28 11:05:00 +00:00
Lennart Poettering 29eddf0ea4 nspawn: minor coding style tweaks to nspawn-register.c 2024-02-28 11:07:58 +01:00
Zbigniew Jędrzejewski-Szmek ab95ba1558
Merge pull request #31511 from jamacku/prepare-for-diff-shellcheck
Prepare for new version of Differential ShellCheck & scanning of shell completion scripts
2024-02-28 10:28:56 +01:00
Yu Watanabe 9398ef0786 cgroup-setup: clarify '<=' is evaluated earlier
Follow-up for 31323f21bb.

The code is correct, but let's silence Coverity.

Closes CID#1534787.
2024-02-28 14:11:43 +08:00
Renjaya Raga Zenta a6f5673c99 test-network: Add test for rps_cpu_mask option 2024-02-28 11:37:18 +07:00
Renjaya Raga Zenta 0f30bf5886 udevd: Add ReceivePacketSteeringCPUMask for systemd.link
Takes a list of CPU indices or ranges separated by either whitespace or commas. Alternatively,
takes the special value "all" in which will include all available CPUs in the mask.
CPU ranges are specified by the lower and upper CPU indices separated by a dash (e.g. "2-6").
This option may be specified more than once, in which case the specified CPU affinity masks are merged.
If an empty string is assigned, the mask is reset, all assignments prior to this will have no effect.
Defaults to unset and RPS CPU list is unchanged. To disable RPS when it was previously enabled, use the
special value "disable".

Currently, this will set CPU mask to all `rx` queue of matched device (if it has multiple queues).

The `/sys/class/net/<dev>/queues/rx-<n>/rps_cpus` only accept cpu bitmap mask in hexadecimal.

Fix: #30323
2024-02-28 11:35:36 +07:00
Yu Watanabe 630023e2e4 TODO: fix typo
Follow-up for 666a348d1c.
2024-02-28 11:46:21 +09:00
Yu Watanabe c4047829bb test-network: fix typo
Follow-up for a663ddc04e.
2024-02-28 11:44:20 +09:00
Luca Boccassi d6e98b3d16 semaphore: set upstream build profile and set default branch to debian/master
Leave TEST_UPSTREAM=1 for now in case we switch branches via the hook
2024-02-28 01:08:57 +00:00
Luca Boccassi 4117a0d5e6 semaphore: enable backports to get new dependencies
Required due to building with debian/master branch
2024-02-28 01:08:57 +00:00
Luca Boccassi 132f785429 test/README: document how to add a new empty release to the PPA to migrate the CI to a new version 2024-02-28 01:08:57 +00:00
Luca Boccassi f6387e7e3f test/README: update ubuntu IRC channel for CI help 2024-02-28 01:08:57 +00:00
Luca Boccassi 8040fa55a1 install: fix compiler warning about empty directive argument
On ppc64el with gcc 13.2 on Ubuntu 24.04:

3s In file included from ../src/basic/macro.h:386,
483s                  from ../src/basic/alloc-util.h:10,
483s                  from ../src/shared/install.c:12:
483s ../src/shared/install.c: In function ‘install_changes_dump’:
483s ../src/shared/install.c:432:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
483s   432 |                         err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",
483s       |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
483s ../src/shared/install.c:432:75: note: format string is defined here
483s   432 |                         err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",
2024-02-28 01:08:56 +00:00
Luca Boccassi 47c2a6e958
Merge pull request #31515 from keszybz/small-cleanups-after-review-of-stable-batch
Small cleanups after review of stable batch
2024-02-27 20:07:18 +00:00
Luca Boccassi 5b0addafab
Merge pull request #31442 from YHNdnzj/towards-cgroup-v1-deprecation
core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE
2024-02-27 19:21:35 +00:00
Štěpán Němec 0f1a5ecc1a tmpfiles.d: avoid deprecated, undocumented syntax (s/F/f+/)
Fixes: eccebf4b0d ("systemd-tmpfiles: deprecate F for f+")
2024-02-27 19:21:06 +00:00
Antonio Alvarez Feijoo 532de87f74 core: remove duplicate serialization of cpu_sched_reset_on_fork
`c->cpu_sched_reset_on_fork` is serialized using
`exec-context-cpu-sched-reset-on-fork` and
`exec-context-cpu-scheduling-reset-on-fork`. Let's keep only the second one, to
serialize the value only if `cpu_sched_set` is true.
2024-02-27 19:20:44 +00:00
Jan Engelhardt 4094130b6f test: drop route from test-functions
I do not see `route` being exercised anywhere else, everything seems
to be on `ip route` already.
2024-02-27 17:51:56 +00:00
Zbigniew Jędrzejewski-Szmek f7364e1a51 shared/pam-util: fix awkward tense in log message 2024-02-27 18:32:51 +01:00
Zbigniew Jędrzejewski-Szmek 2dc65c32b2 virt: wrap comment, add missing punctuation 2024-02-27 18:32:21 +01:00
Zbigniew Jędrzejewski-Szmek 3e6b040bec man/sd_bus_service_reconnect.c: normalize whitespace
For man pages, we generally indent with 2 spaces and wrap to ~80 columns.
2024-02-27 18:15:51 +01:00
Štěpán Němec c959e17823 man, shell-completion: fix a few typos/language issues 2024-02-27 16:57:33 +00:00
Lennart Poettering b96df6fa09 bootspec: don't complain about valid loader.conf settings
Let's not complain about various valid loader.conf settings we more
recently added. At the same time let's remove the half-assed userspace
parsers for the fields we actually do support but don't actually really
care about in userspace. There's really no point in storing strings away
that we are not using at all, hence just don#t.

Fixes: #31487
2024-02-27 16:57:19 +00:00
Jan Macku c1631d4e49 ci(labeler): add rule for shell-completion label 2024-02-27 15:26:45 +00:00
Frantisek Sumsal cc48d93870 test: use socat in unidirectional mode
By default socat open a separate r/w channel for each specified address,
and terminates the connection after .5s from receiving EOF on _either_
side. And since one side of that connection is an empty stdin, we reach
that EOF pretty quickly. Let's avoid this by using socat in
"reversed unidirectional" mode, where the first address is used only for
writing, and the second one is used only for reading.

Addresses:
  - https://github.com/systemd/systemd/issues/31500
  - https://github.com/systemd/systemd/issues/31493

Follow-up for 3456c89ac2.
2024-02-27 15:24:23 +00:00
Mike Yuan 6b19d5f021
NEWS: announce cgroup v1 deprecation 2024-02-27 23:10:50 +08:00
Mike Yuan 31323f21bb
meson: drop default-hierarchy= option, always use unified 2024-02-27 23:10:49 +08:00
Mike Yuan f2512de82d
core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE
Also, add a 30s sleep even if cgroup v1 is forced.

Closes #30852
2024-02-27 23:10:49 +08:00
Mike Yuan f4f3efa4d7
shared/cgroup-setup: introduce cg_is_legacy_force_enabled 2024-02-27 23:08:59 +08:00
Mike Yuan fbc8d90bd5
shared/mount-setup: split out mount_cgroup_legacy_controllers 2024-02-27 23:03:43 +08:00
Mike Yuan 72a9f4fa45
shared/mount-setup: minor modernization 2024-02-27 23:03:43 +08:00
Mike Yuan 821333263c
core/cgroup: remove obsolete TODO 2024-02-27 23:03:42 +08:00
Mike Yuan 62b5bd3c8a
core: mark JoinControllers= as DISABLED_LEGACY rather than _CONFIGURATION
Follow-up for 143fadf369
2024-02-27 23:03:39 +08:00
Jan Macku 464b03d23c ci(lint): temporarily disable ShellCheck for bash-completion
This commit should be reverted once bash completion is in better shape when it comes to ShellCheck.
2024-02-27 15:41:28 +01:00
Jan Macku f8457290c4 fix(SC2148): add ShellCheck directive to bash completion scripts 2024-02-27 15:41:28 +01:00
Jan Macku b2e0caf882 ci(lint): exclude zsh completion from ShellCheck
zsh is not supported by ShellCheck
2024-02-27 15:41:28 +01:00
Štěpán Němec da9e1f8322 zsh/_journalctl: complete -g, --case-sensitive, 'help' (pseudo-)facility 2024-02-27 13:50:15 +00:00
Lennart Poettering 666a348d1c update TODO 2024-02-27 14:40:31 +01:00
Yu Watanabe 2706065514 sysext: fix typo 2024-02-27 13:28:02 +09:00
Luca Boccassi e5191faf44
Merge pull request #31000 from flatcar-hub/krnowak/mutable-overlays
systemd-sysext: Implement optional mutability for extensions
2024-02-26 16:17:11 +00:00