]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 months agoimportd: validate local image names with the right helper
Lennart Poettering [Thu, 22 Feb 2024 11:31:03 +0000 (12:31 +0100)] 
importd: validate local image names with the right helper

A while back we introduced image_name_is_valid() for validating image
file names. It's more liberal than hostname_is_valid() in many ways (and
allows version suffixes and such). Since importd deals in offline images
(as opposed to machined otherwise which deals in running machines),
let's hence use the right helper to validate the identifiers.

3 months agoimportlisttransfersxclient
Lennart Poettering [Fri, 1 Mar 2024 15:13:59 +0000 (16:13 +0100)] 
importlisttransfersxclient

3 months agoimportctl: add support for selecting image class to download
Lennart Poettering [Thu, 22 Feb 2024 09:16:43 +0000 (10:16 +0100)] 
importctl: add support for selecting image class to download

3 months agoimportd: tighten checks in fds passed to us
Lennart Poettering [Thu, 22 Feb 2024 10:47:34 +0000 (11:47 +0100)] 
importd: tighten checks in fds passed to us

3 months agoimportd: add support for downloading sysext/confext/portable images too
Lennart Poettering [Thu, 22 Feb 2024 08:43:01 +0000 (09:43 +0100)] 
importd: add support for downloading sysext/confext/portable images too

This adds "Ex" versions of all bus calls import implements, that make
two changes:

1. A "class" parameter is added that allows choosing between
   machine/sysext/confext/portable images to download. Depending on the
   chose class the target directory is selected differently (i.e. not
   just /var/lib/machines/, but alternatively /var/lib/portables/,
   /var/lib/extensions/, /var/lib/confexts/.

2. The boolean flags are replaced by a 64bit flags parameter.

3 months agoimport: merge PullFlags enum into ImportFlags
Lennart Poettering [Thu, 22 Feb 2024 12:32:35 +0000 (13:32 +0100)] 
import: merge PullFlags enum into ImportFlags

The two enums are mostly the same, the former is just an extension of
the latter. Let's merge them, to simplify things. This is particularly
useful as we then can reuse this systematically as D-Bus method call
flags too, in a generic fashion that works for both imports and pulls
the same.

Pretty much just renaming of flags.

3 months agoimportctl: port tabular output for format-table.h APIs
Lennart Poettering [Wed, 21 Feb 2024 15:42:40 +0000 (16:42 +0100)] 
importctl: port tabular output for format-table.h APIs

3 months agoimportctl: modernize signal handling
Lennart Poettering [Fri, 16 Feb 2024 17:55:21 +0000 (18:55 +0100)] 
importctl: modernize signal handling

3 months agoimportctl: add standalone client to importd
Lennart Poettering [Fri, 16 Feb 2024 17:40:47 +0000 (18:40 +0100)] 
importctl: add standalone client to importd

This is pretty much a 1:1 copy of the importd specific part of
machinectl.

We turn this into a separate tool, so that we can eventually make the
tool generic to also download other DDIs, not just machine images.

3 months agoimportd: modernize signal handling a bit
Lennart Poettering [Fri, 16 Feb 2024 17:20:51 +0000 (18:20 +0100)] 
importd: modernize signal handling a bit

3 months agoimportd: trivial modernizations
Lennart Poettering [Fri, 16 Feb 2024 17:20:36 +0000 (18:20 +0100)] 
importd: trivial modernizations

3 months agoimportd: switch to pidref
Lennart Poettering [Fri, 16 Feb 2024 17:20:24 +0000 (18:20 +0100)] 
importd: switch to pidref

3 months agocurl-util: fix downloads from file:// URLs
Lennart Poettering [Fri, 23 Feb 2024 17:22:40 +0000 (18:22 +0100)] 
curl-util: fix downloads from file:// URLs

if we try to open file:// URLs that don't exist, we'll not get IO/timer
events about it, hence it is not sufficient to check for completion in
these events. Let's add a defer event, to deal with that.

Also, curl_multi_info_read() is a queue, make sure to handle all events
that might be queued.

3 months agosd-event: make return code of sd_event_get_exit_code() optional
Lennart Poettering [Fri, 23 Feb 2024 20:51:02 +0000 (21:51 +0100)] 
sd-event: make return code of sd_event_get_exit_code() optional

3 months agofd-util: O_DIRECTORY is fine in fd_verify_safe_flags() too
Lennart Poettering [Fri, 23 Feb 2024 21:46:04 +0000 (22:46 +0100)] 
fd-util: O_DIRECTORY is fine in fd_verify_safe_flags() too

3 months agotest74: create ssh empty dir all at the same place
Lennart Poettering [Fri, 1 Mar 2024 14:10:56 +0000 (15:10 +0100)] 
test74: create ssh empty dir all at the same place

A follow up for 8fddb50fd4de43993c4906baf19dae89ff8a021b, which mirrors
the change also in test 74.

3 months agomachinectl: mention -V in --help text
Lennart Poettering [Fri, 1 Mar 2024 14:22:13 +0000 (15:22 +0100)] 
machinectl: mention -V in --help text

Follow-up for f82dcc3fc35883a73c8a03ad82d35abffc458676

3 months agobusctl: don't hit an assert if we call invalid bus method names
Lennart Poettering [Fri, 1 Mar 2024 13:42:34 +0000 (14:42 +0100)] 
busctl: don't hit an assert if we call invalid bus method names

We should validate this explicitly and generate a clear error string,
rather then hit an assert() later in the code.

3 months agovmspawn: actually pass UUID down to qemu
Lennart Poettering [Fri, 1 Mar 2024 13:47:57 +0000 (14:47 +0100)] 
vmspawn: actually pass UUID down to qemu

qemu then adds this to SMBIOS product uuid, and we can actually read it
from the payload.

Followup for b0dc766852b2022080f123ac52aa90f2692c12e2

3 months agoCI: free up diskspace before mkosi jobs
Luca Boccassi [Fri, 1 Mar 2024 16:53:50 +0000 (16:53 +0000)] 
CI: free up diskspace before mkosi jobs

The runner has a lot of useless things installed, taking ~10GB, and
jobs have started to fail when booting images due to lack of disk
space, so delete some directories to make room.

2024-02-27T20:20:58.0998709Z ##[warning]You are running out of disk space. The runner will stop working when the machine runs out of disk space. Free space left: 0 MB

Co-authored-by: Daan De Meyer <daan.j.demeyer@gmail.com>
3 months agouser-record: Add preferredSession{Type,Launcher}
Adrian Vovk [Mon, 5 Feb 2024 00:21:29 +0000 (19:21 -0500)] 
user-record: Add preferredSession{Type,Launcher}

These will be used by display managers to pre-select the user's
preferred desktop environment and display server type. On homed, the
display manager will also be able to set these fields to cache the
user's last selection.

3 months agotree-wide: switch dlopen hooks over to DLSYM_PROTOTYPE()/DLSYM_FUNCTION()
Lennart Poettering [Fri, 1 Mar 2024 09:12:48 +0000 (10:12 +0100)] 
tree-wide: switch dlopen hooks over to DLSYM_PROTOTYPE()/DLSYM_FUNCTION()

We have these pretty macros, let's use them everywhere (so far we mostly
used them for newer additions only).

This PR is mostly an excercise in "perl -p -i -e", but there are some
special cases:

* idn-util.c exposes a function whose prototype in the official library
  headers is marked with the "const" attribute, and this apparently does
  not propagate along typeof() correctly and then
  __builtin_types_compatible_p() fails later because it detects that
  prototype and original function don't match in prototype.

* libbpf removed some symbols in newer versions, hence we need to define
  some prototypes manually to still be able to build.

* libcryptsetup marked a symbol as deprecated we want to use (knowing it
  is deprecated). By using the macros this is detected by the compiler.
  We work around it via the usual warning off macros.

Note by using these macros we assume that all symbols are known during
build time. Which might not be the case. We might need to revert this
commit for some symbols if this trips up builds on older distros.

3 months agouki: Support zboot efistub kernel
Xiaotian Wu [Thu, 16 Nov 2023 12:01:50 +0000 (20:01 +0800)] 
uki: Support zboot efistub kernel

Generic EFI zboot added since kernel 6.1
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/efi/libstub/Makefile.zboot?h=v6.1
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/efi/libstub/zboot-header.S?h=v6.1

3 months agobuild(deps): bump meson from 1.3.1 to 1.3.2 in /.github/workflows
dependabot[bot] [Fri, 1 Mar 2024 09:59:59 +0000 (09:59 +0000)] 
build(deps): bump meson from 1.3.1 to 1.3.2 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.3.1...1.3.2)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agobuild(deps): bump actions/upload-artifact from 4.3.0 to 4.3.1
dependabot[bot] [Fri, 1 Mar 2024 09:18:57 +0000 (09:18 +0000)] 
build(deps): bump actions/upload-artifact from 4.3.0 to 4.3.1

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/26f96dfa697d77e81fd5907df203aa23a56210a8...5d5d22a31266ced268874388b861e4b58bb5c2f3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agotest: enable PAM debug logs in TEST-46-HOMED
Luca Boccassi [Thu, 29 Feb 2024 20:47:46 +0000 (20:47 +0000)] 
test: enable PAM debug logs in TEST-46-HOMED

3 months agobuild(deps): bump github/codeql-action from 3.22.12 to 3.24.6
dependabot[bot] [Fri, 1 Mar 2024 09:19:02 +0000 (09:19 +0000)] 
build(deps): bump github/codeql-action from 3.22.12 to 3.24.6

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.22.12 to 3.24.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/012739e5082ff0c22ca6d6ab32e07c36df03c4a4...8a470fddafa5cbb6266ee11b37ef4d8aae19c571)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agobuild(deps): bump redhat-plumbers-in-action/differential-shellcheck
dependabot[bot] [Fri, 1 Mar 2024 09:19:11 +0000 (09:19 +0000)] 
build(deps): bump redhat-plumbers-in-action/differential-shellcheck

Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.0.2 to 5.1.0.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/91e2582e40236f831458392d905578d680baa138...b9df2a9417f69c056e0aeaf870abd9a2065a403e)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agoMerge pull request #31498 from ssahani/bond
Yu Watanabe [Fri, 1 Mar 2024 03:45:52 +0000 (12:45 +0900)] 
Merge pull request #31498 from ssahani/bond

netdev: bond - add support for peer_notif_delay

3 months agoMerge pull request #31502 from yuwata/network-lldp-json
Yu Watanabe [Fri, 1 Mar 2024 03:18:53 +0000 (12:18 +0900)] 
Merge pull request #31502 from yuwata/network-lldp-json

network: support to dump LLDP neighbors in JSON format

3 months agoMerge pull request #31555 from yuwata/sd-ndisc-trivial-cleanups
Yu Watanabe [Fri, 1 Mar 2024 03:18:19 +0000 (12:18 +0900)] 
Merge pull request #31555 from yuwata/sd-ndisc-trivial-cleanups

sd-ndisc: trivial cleanups

3 months agosd-ndisc: drop unused sd_ndisc_router_get_raw() 31555/head
Yu Watanabe [Thu, 29 Feb 2024 03:37:26 +0000 (12:37 +0900)] 
sd-ndisc: drop unused sd_ndisc_router_get_raw()

3 months agosd-ndisc: use _packed_ attribute
Yu Watanabe [Thu, 29 Feb 2024 03:46:48 +0000 (12:46 +0900)] 
sd-ndisc: use _packed_ attribute

3 months agoMerge pull request #31551 from keszybz/rpm-macro-kernel-install
Luca Boccassi [Fri, 1 Mar 2024 00:44:52 +0000 (00:44 +0000)] 
Merge pull request #31551 from keszybz/rpm-macro-kernel-install

New rpm macro %_kernel_install_dir

3 months agoicmp6-packet: check the alignment of struct nd_opt_hdr for safety
Yu Watanabe [Fri, 1 Mar 2024 00:21:55 +0000 (09:21 +0900)] 
icmp6-packet: check the alignment of struct nd_opt_hdr for safety

Addresses https://github.com/systemd/systemd/pull/31492#discussion_r1507481748.

3 months agotest-network: add more test cases for LLDP 31502/head
Yu Watanabe [Mon, 26 Feb 2024 02:46:55 +0000 (11:46 +0900)] 
test-network: add more test cases for LLDP

3 months agosd-lldp-rx: drop unused functions
Yu Watanabe [Mon, 26 Feb 2024 06:48:49 +0000 (15:48 +0900)] 
sd-lldp-rx: drop unused functions

These are not used anymore.

3 months agonetwork/lldp: do not save LLDP neighbors under /run/systemd
Yu Watanabe [Mon, 26 Feb 2024 06:47:46 +0000 (15:47 +0900)] 
network/lldp: do not save LLDP neighbors under /run/systemd

Now LLDP neighbors are exposed through varlink. Hence, it is not
necessary to save to a file.

3 months agonetworkctl: use varlink method to dump LLDP neighbors
Yu Watanabe [Sun, 25 Feb 2024 06:31:23 +0000 (15:31 +0900)] 
networkctl: use varlink method to dump LLDP neighbors

`networkctl lldp` and `networkctl status INTERFACE` now use varlink
call to the networkd to query LLDP neighbors.

Then, this allows to dump LLDP neighbors in JSON format.

Co-authored-by: Tomáš Pecka <tomas.pecka@cesnet.cz>
3 months agonetworkctl: rename check_netns_match() -> varlink_connect_networkd()
Yu Watanabe [Mon, 26 Feb 2024 01:32:51 +0000 (10:32 +0900)] 
networkctl: rename check_netns_match() -> varlink_connect_networkd()

Then optionally return the varlink connection to the caller.

3 months agonetwork/varlink: add varlink method to get LLDP neighbors
Yu Watanabe [Sun, 25 Feb 2024 05:16:47 +0000 (14:16 +0900)] 
network/varlink: add varlink method to get LLDP neighbors

The method provides the list of LLDP neighbors.

Co-authored-by: Tomáš Pecka <tomas.pecka@cesnet.cz>
3 months agosd-lldp-rx: serialize LLDP neighbors to JSON format
Tomáš Pecka [Thu, 7 Oct 2021 09:16:57 +0000 (11:16 +0200)] 
sd-lldp-rx: serialize LLDP neighbors to JSON format

Add functions serializing LLDP neighbors to JSON (JsonVariant).

The entry contains a chassis id, system name and port id of the remote
neighbor. Also it possibly contains an integer coding the enabled system
capabilities and port description.

3 months agoMerge pull request #31492 from yuwata/icmp6-packet
Yu Watanabe [Fri, 1 Mar 2024 00:18:52 +0000 (09:18 +0900)] 
Merge pull request #31492 from yuwata/icmp6-packet

sd-ndisc: introduce ICMP6Packet and relevant functions, and use them

3 months agofix the value of default shells to use /bin and not /usr/bin
Eli Schwartz [Wed, 21 Feb 2024 02:59:13 +0000 (21:59 -0500)] 
fix the value of default shells to use /bin and not /usr/bin

Partially reverts commit b0d3095fd6cc1791a38f57a1982116b4475244ba.

While it is generally worthwhile for systemd to drop split-usr support,
these options are NOT about split-usr support. The universal location of
POSIX sh is always /bin/sh. Bash is pretty reasonably standardized there
too.

This happens irrespective of /bin being a symlink to /usr/bin.
Ramifications of this change include things like:

- portably running shell scripts that might run very nearly anywhere
- /etc/shells support

For standardization and compatibility reasons, these commands with these
paths need to be consistently found on any system, and thus distros make
sure this works, although even on split-usr systems /usr/bin/bash may be
a symlink to /bin/bash.

Embedding the *access path* of bash as /usr/bin/bash in systemd, for
example in libnss_systemd.so, means that login shells must agree with
systemd on how they invoke the shell. End result: users fail to login
because of access violations.

This cannot be fixed by "fixing PAM" because PAM does not follow
symlinks by design: one example is that it needs to treat rbash as
different from bash.

Fixes: https://bugs.gentoo.org/919749
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
3 months agossh-generator: don't do AF_VSOCK stuff if we run in a container
Lennart Poettering [Thu, 29 Feb 2024 17:19:07 +0000 (18:19 +0100)] 
ssh-generator: don't do AF_VSOCK stuff if we run in a container

Tighten our VM check: whether we run in a VM is not enough to do
AF_VSOCK. We also need to check if we are run in a container, because if
we run in a container inside a VM then we should *not* do the AF_VSOCK
stuff, but leave the port free for the VM itself.

As discussed here:

https://github.com/systemd/systemd/pull/31544#issuecomment-1971455401

3 months agorpm/macros: add %_kernel_install_dir 31551/head
Zbigniew Jędrzejewski-Szmek [Thu, 29 Feb 2024 20:38:03 +0000 (21:38 +0100)] 
rpm/macros: add %_kernel_install_dir

This makes it easier for people packaging kernel-install plugins
to get the path right.

E.g. https://src.fedoraproject.org/rpms/python-virt-firmware/pull-request/3
fixes an issue where %{_libdir}/kernel/install.d was used,
which gives incorrect results on 64-bit architectures.
%_kernel_install_dir will make this even easier.

3 months agorpm/macros: drop compat define with a typo
Zbigniew Jędrzejewski-Szmek [Thu, 29 Feb 2024 20:32:10 +0000 (21:32 +0100)] 
rpm/macros: drop compat define with a typo

Search on sourcegraph.com doesn't yield any users. And each
use would emit a warning, so I think it's safe to assume that
it has no users.

3 months agoMerge pull request #31544 from mrc0mmand/more-test-tweaks
Luca Boccassi [Thu, 29 Feb 2024 20:29:24 +0000 (20:29 +0000)] 
Merge pull request #31544 from mrc0mmand/more-test-tweaks

A couple of fixlets for TEST-46-HOMED's ssh tests

3 months agossh-generator: handle gracefully if AF_VSOCK works, but /dev/vsock doesn't
Lennart Poettering [Thu, 29 Feb 2024 14:56:24 +0000 (15:56 +0100)] 
ssh-generator: handle gracefully if AF_VSOCK works, but /dev/vsock doesn't

Apparently this case exists, let's handle it gracefully.

Prompted by: https://github.com/systemd/systemd/pull/31544#issuecomment-1971241397

3 months agoRevert "options" rename in json bootctl output
Ludwig Nussel [Tue, 20 Feb 2024 13:25:12 +0000 (14:25 +0100)] 
Revert "options" rename in json bootctl output

Revert the rename from "options" to "finalCmdline" in 122650b4a0
while the bigger https://github.com/systemd/systemd/pull/31339 is still
under review.

3 months agotest: create sshd's runtime directory (Debian variant) 31544/head
Frantisek Sumsal [Thu, 29 Feb 2024 12:06:28 +0000 (13:06 +0100)] 
test: create sshd's runtime directory (Debian variant)

sshd.service on Debian uses RuntimeDirectory=sshd, without which sshd
complains:

[ 4065.834904] sshd[711]: Missing privilege separation directory: /run/sshd
[ 4065.835785] systemd[1]: mysshserver@0-127.0.0.1:4711-127.0.0.1:58232.service: Deactivated successfully.
[ 4065.836433] testsuite-46.sh[708]: kex_exchange_identification: read: Connection reset by peer
[ 4065.836433] testsuite-46.sh[708]: Connection reset by 127.0.0.1 port 4711

Resolves: #31518

3 months agotest: avoid SIGPIPE from ssh | tail -n 1
Frantisek Sumsal [Thu, 29 Feb 2024 10:57:04 +0000 (11:57 +0100)] 
test: avoid SIGPIPE from ssh | tail -n 1

Addresses: https://github.com/systemd/systemd/issues/31518#issuecomment-1968295678

3 months agotest: use ECDSA keys for ssh-related tests
Frantisek Sumsal [Thu, 29 Feb 2024 10:43:57 +0000 (11:43 +0100)] 
test: use ECDSA keys for ssh-related tests

This should make the test faster, especially on machines without
acceleration.

3 months agotest: shell & cleanup cleanup
Frantisek Sumsal [Thu, 29 Feb 2024 10:37:29 +0000 (11:37 +0100)] 
test: shell & cleanup cleanup

3 months agoMerge pull request #31430 from CodethinkLabs/vmspawn/machinectl_vmspawn_support
Luca Boccassi [Thu, 29 Feb 2024 11:27:02 +0000 (11:27 +0000)] 
Merge pull request #31430 from CodethinkLabs/vmspawn/machinectl_vmspawn_support

machinectl: initial vmspawn support

3 months agoDrop build-api support
Michael Biebl [Wed, 28 Feb 2024 15:11:14 +0000 (16:11 +0100)] 
Drop build-api support

It appears the build-api effort at
https://github.com/cgwalters/build-api hasn't really caught on.
systemd appears one of the very few projects actually supporting it.

It does confuse certain tools though. E.g. debhelper by finding a
configure script wrongly assumes this is an autoconf project and thus
needs to be told explicitly that this is in fact a Meson project [1].

Given that Meson is an established build system by now, it appears ok to
drop this compat layer, which will never be fully complete anyway.

[1] https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/rules?ref_type=heads#L281

3 months agosemaphore: speed up build
Luca Boccassi [Wed, 28 Feb 2024 23:46:15 +0000 (23:46 +0000)] 
semaphore: speed up build

- avoid stripping debug symbols and creating dbgsym packages
- avoid LTO, slows down build a lot
- avoid compressing packages, they are thrown out immediately after use
- avoid building udeb packages, not needed

3 months agodissect-image: fix build
Lennart Poettering [Wed, 28 Feb 2024 21:49:29 +0000 (22:49 +0100)] 
dissect-image: fix build

PRs #31531 and #31524 were merged in quick succession. They are fine
both on their own. But in combination they break the build. Fix it.

3 months agovmspawn: only add to cmdline if tpm was started
Sam Leonard [Wed, 28 Feb 2024 17:39:05 +0000 (17:39 +0000)] 
vmspawn: only add to cmdline if tpm was started

3 months agoMerge pull request #31531 from poettering/verity-userspace-optional
Lennart Poettering [Wed, 28 Feb 2024 21:04:58 +0000 (22:04 +0100)] 
Merge pull request #31531 from poettering/verity-userspace-optional

dissect: make use of userspace verity keyring optional

3 months agoMerge pull request #31524 from poettering/secure-getenv-naming-fix
Luca Boccassi [Wed, 28 Feb 2024 18:01:52 +0000 (18:01 +0000)] 
Merge pull request #31524 from poettering/secure-getenv-naming-fix

change naming order getenv_xyz_secure() → secure_getenv_xyz() to match glibc

3 months agoMerge pull request #31526 from poettering/proc-cmdline-underscorify
Luca Boccassi [Wed, 28 Feb 2024 17:59:46 +0000 (17:59 +0000)] 
Merge pull request #31526 from poettering/proc-cmdline-underscorify

make sure we use underscores for kernel cmdline option names, not dashes

3 months agomachinectl: support vmspawn as a backend 31430/head
Sam Leonard [Tue, 20 Feb 2024 13:14:52 +0000 (13:14 +0000)] 
machinectl: support vmspawn as a backend

3 months agovmspawn: support machined registration
Sam Leonard [Tue, 20 Feb 2024 13:13:16 +0000 (13:13 +0000)] 
vmspawn: support machined registration

3 months agoMerge pull request #31514 from CodethinkLabs/ptyfwd_issues
Lennart Poettering [Wed, 28 Feb 2024 17:36:50 +0000 (18:36 +0100)] 
Merge pull request #31514 from CodethinkLabs/ptyfwd_issues

ptyfwd/terminal-util: improve edge case handling

3 months agodissect: condition usespace verity keyring via kernel cmdline option + env var 31531/head
Lennart Poettering [Wed, 28 Feb 2024 15:16:30 +0000 (16:16 +0100)] 
dissect: condition usespace verity keyring via kernel cmdline option + env var

3 months agodissect-image: add flag for explicitly enabling userspace verity signature checking
Lennart Poettering [Wed, 28 Feb 2024 12:17:03 +0000 (13:17 +0100)] 
dissect-image: add flag for explicitly enabling userspace verity signature checking

let's make userspace verity signature checking optional. This adds a
dissection flag to enable the logic and patches through all our users to
enable it by default, thus effectively not changing anything from the
status quo ante. However, know we have a knob to turn this off in
certain scenarios.

3 months agoenv-util: also rename getenv_uint64_secure() → secure_getenv_uint64() 31524/head
Lennart Poettering [Wed, 28 Feb 2024 13:59:31 +0000 (14:59 +0100)] 
env-util: also rename getenv_uint64_secure() → secure_getenv_uint64()

As in the previous commit, let's not change the order of the words
compared to the underlying glibc API.

3 months agoenv-util: rename getenv_bool_secure() → secure_getenv_bool()
Lennart Poettering [Wed, 28 Feb 2024 13:57:35 +0000 (14:57 +0100)] 
env-util: rename getenv_bool_secure() → secure_getenv_bool()

The glibc API is behind the wrapper is called "secure_getenv()", hence
our wrapper really should keep the order too, otherwise things are just
too confusing.

3 months agoman: add a few missing entries to kernel-command-line man page 31526/head
Lennart Poettering [Wed, 28 Feb 2024 14:33:16 +0000 (15:33 +0100)] 
man: add a few missing entries to kernel-command-line man page

3 months agotree-wide: use "_" rather than "-" as separator in kernel cmdline options
Lennart Poettering [Wed, 28 Feb 2024 14:31:27 +0000 (15:31 +0100)] 
tree-wide: use "_" rather than "-" as separator in kernel cmdline options

Most of our kernel cmdline options use underscores as word separators in
kernel cmdline options, but there were some exceptions. Let's fix those,
and also use underscores.

Since our /proc/cmdline parsers don't distinguish between the two
characters anyway this should not break anything, but makes sure our own
codebase (and in particular docs and log messages) are internally
consistent.

3 months agoMerge pull request #31444 from bluca/semaphore
Frantisek Sumsal [Wed, 28 Feb 2024 14:03:11 +0000 (15:03 +0100)] 
Merge pull request #31444 from bluca/semaphore

semaphore: set upstream build profile and set default branch to debian/master

3 months agoMerge pull request #31293 from ragazenta/netdev_rps
Luca Boccassi [Wed, 28 Feb 2024 13:37:28 +0000 (13:37 +0000)] 
Merge pull request #31293 from ragazenta/netdev_rps

udevd: Add ReceivePacketSteeringCPUMask for systemd.link

3 months agoresolved: exit function if varlink_dispatch() returns > 0
Lennart Poettering [Wed, 28 Feb 2024 10:29:04 +0000 (11:29 +0100)] 
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.

3 months agouserbdb: pass log level from main daemon to worker
Lennart Poettering [Wed, 28 Feb 2024 08:43:02 +0000 (09:43 +0100)] 
userbdb: pass log level from main daemon to worker

3 months agotest-network: Add test for bond peer_notif_delay 31498/head
Susant Sahani [Mon, 26 Feb 2024 13:35:12 +0000 (19:05 +0530)] 
test-network: Add test for bond peer_notif_delay

3 months agonetdev: bond - add support for peer_notif_delay
Susant Sahani [Mon, 26 Feb 2024 13:26:57 +0000 (18:56 +0530)] 
netdev: bond - add support for peer_notif_delay

 Specify the delay, in milliseconds, between each peer
notification (gratuitous ARP and unsolicited IPv6
Neighbor Advertisement) when they are issued after
a failover event. This delay should be a multiple of
the MII link monitor interval (miimon).

 The valid range is 0 - 300s. The default value is 0,
which means to match the value of the MII link monitor interval.

3 months agoshared/ptyfwd: detect String Terminator or BEL when parsing an OSC sequence 31514/head
Sam Leonard [Tue, 27 Feb 2024 16:08:09 +0000 (16:08 +0000)] 
shared/ptyfwd: detect String Terminator or BEL when parsing an OSC sequence

3 months agoshared/ptyfwd: allow window title but not background color as a valid state
Sam Leonard [Tue, 27 Feb 2024 15:08:37 +0000 (15:08 +0000)] 
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.

3 months agobasic/terminal-util: accept ST or BEL to end escape sequence queries
Sam Leonard [Tue, 27 Feb 2024 14:35:14 +0000 (14:35 +0000)] 
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.

3 months agobasic/terminal-util: add check for poll timeout in get_default_background_color
Sam Leonard [Tue, 27 Feb 2024 11:12:39 +0000 (11:12 +0000)] 
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.

3 months agonetwork/ndisc: drop redundant sd_ndisc_router_get_icmp6_ratelimit()
Yu Watanabe [Tue, 27 Feb 2024 10:31:26 +0000 (19:31 +0900)] 
network/ndisc: drop redundant sd_ndisc_router_get_icmp6_ratelimit()

This effectively reverts 9175002864d8876f375e0df089d142d239282528.

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

Let's deprecate the option, and drop the redundant functions.

3 months agonspawn: minor coding style tweaks to nspawn-register.c
Lennart Poettering [Wed, 28 Feb 2024 10:07:39 +0000 (11:07 +0100)] 
nspawn: minor coding style tweaks to nspawn-register.c

3 months agoMerge pull request #31511 from jamacku/prepare-for-diff-shellcheck
Zbigniew Jędrzejewski-Szmek [Wed, 28 Feb 2024 09:28:56 +0000 (10:28 +0100)] 
Merge pull request #31511 from jamacku/prepare-for-diff-shellcheck

Prepare for new version of Differential ShellCheck & scanning of shell completion scripts

3 months agocgroup-setup: clarify '<=' is evaluated earlier
Yu Watanabe [Wed, 28 Feb 2024 02:51:04 +0000 (11:51 +0900)] 
cgroup-setup: clarify '<=' is evaluated earlier

Follow-up for 31323f21bb0ae7c712f43500c42997c91a6d20bf.

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

Closes CID#1534787.

3 months agotest-network: Add test for rps_cpu_mask option 31293/head
Renjaya Raga Zenta [Fri, 16 Feb 2024 07:01:47 +0000 (14:01 +0700)] 
test-network: Add test for rps_cpu_mask option

3 months agoudevd: Add ReceivePacketSteeringCPUMask for systemd.link
Renjaya Raga Zenta [Tue, 13 Feb 2024 14:15:24 +0000 (21:15 +0700)] 
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

3 months agoTODO: fix typo
Yu Watanabe [Wed, 28 Feb 2024 02:46:07 +0000 (11:46 +0900)] 
TODO: fix typo

Follow-up for 666a348d1c98873c55115924751e6f2d3bdb7435.

3 months agotest-network: fix typo
Yu Watanabe [Wed, 28 Feb 2024 02:44:17 +0000 (11:44 +0900)] 
test-network: fix typo

Follow-up for a663ddc04e43a9234e00e47aed98bf2bbeb1573a.

3 months agosd-ndisc: ignore Router Advertisement messages sent by the same interface 31492/head
Yu Watanabe [Mon, 26 Feb 2024 04:26:52 +0000 (13:26 +0900)] 
sd-ndisc: ignore Router Advertisement messages sent by the same interface

3 months agosd-ndisc: use ICMP6Packet and ndisc_option_parse()
Yu Watanabe [Tue, 27 Feb 2024 04:47:01 +0000 (13:47 +0900)] 
sd-ndisc: use ICMP6Packet and ndisc_option_parse()

3 months agosd-ndisc: introduce ndisc_option_parse() helper function
Yu Watanabe [Thu, 22 Feb 2024 22:27:55 +0000 (07:27 +0900)] 
sd-ndisc: introduce ndisc_option_parse() helper function

3 months agoicmp6-packet: introduce ICMP6Packet and several relevant functions
Yu Watanabe [Thu, 22 Feb 2024 07:43:04 +0000 (16:43 +0900)] 
icmp6-packet: introduce ICMP6Packet and several relevant functions

3 months agosemaphore: set upstream build profile and set default branch to debian/master 31444/head
Luca Boccassi [Thu, 22 Feb 2024 10:07:24 +0000 (10:07 +0000)] 
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

3 months agosemaphore: enable backports to get new dependencies
Luca Boccassi [Thu, 22 Feb 2024 10:18:32 +0000 (10:18 +0000)] 
semaphore: enable backports to get new dependencies

Required due to building with debian/master branch

3 months agotest/README: document how to add a new empty release to the PPA to migrate the CI...
Luca Boccassi [Thu, 22 Feb 2024 14:19:08 +0000 (14:19 +0000)] 
test/README: document how to add a new empty release to the PPA to migrate the CI to a new version

3 months agotest/README: update ubuntu IRC channel for CI help
Luca Boccassi [Thu, 22 Feb 2024 14:15:30 +0000 (14:15 +0000)] 
test/README: update ubuntu IRC channel for CI help

3 months agoinstall: fix compiler warning about empty directive argument
Luca Boccassi [Sat, 24 Feb 2024 12:05:44 +0000 (12:05 +0000)] 
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.",

3 months agoMerge pull request #31515 from keszybz/small-cleanups-after-review-of-stable-batch
Luca Boccassi [Tue, 27 Feb 2024 20:07:18 +0000 (20:07 +0000)] 
Merge pull request #31515 from keszybz/small-cleanups-after-review-of-stable-batch

Small cleanups after review of stable batch

3 months agoMerge pull request #31442 from YHNdnzj/towards-cgroup-v1-deprecation
Luca Boccassi [Tue, 27 Feb 2024 19:21:35 +0000 (19:21 +0000)] 
Merge pull request #31442 from YHNdnzj/towards-cgroup-v1-deprecation

core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE