systemd/.git
17 months agomkosi: Enable hyperscale-packages-experimental for CentOS
Daan De Meyer [Thu, 27 Jun 2024 10:49:59 +0000 (12:49 +0200)]
mkosi: Enable hyperscale-packages-experimental for CentOS

This gets us a kernel with btrfs support.

(cherry picked from commit 6f1f13ca9f8db424c613332ec4739e53b2db6fdf)

17 months agomkosi: Drop leftover systemd-coredump-debuginfo package for opensuse
Daan De Meyer [Thu, 27 Jun 2024 08:14:32 +0000 (10:14 +0200)]
mkosi: Drop leftover systemd-coredump-debuginfo package for opensuse

The package was merged into the main systemd package in
https://src.opensuse.org/rpm/systemd/commit/23bfa9d83b6e24a5395a704b816a351f3dc5b5316e580cacedd1b5d9e068c117.

(cherry picked from commit 21942c008e6540f2ff905a2c6de35475037e734b)

17 months agomkosi: Drop s390x console patch from opensuse spec
Daan De Meyer [Thu, 27 Jun 2024 07:49:40 +0000 (09:49 +0200)]
mkosi: Drop s390x console patch from opensuse spec

This patch does not apply anymore on upstream, so let's remove it
from the spec before building until the spec is fixed.

(cherry picked from commit f92a005cd13ee1df95f3ea16e421f7757fb0f424)

17 months agomkosi: use new standalone-shutdown package for debian's exitrd
Luca Boccassi [Wed, 26 Jun 2024 14:21:33 +0000 (15:21 +0100)]
mkosi: use new standalone-shutdown package for debian's exitrd

(cherry picked from commit efd5314c5036cc41f3dde0e2ef33c3cbd4314e3f)

17 months agomkosi: update debian commit reference
Daan De Meyer [Tue, 25 Jun 2024 14:18:02 +0000 (16:18 +0200)]
mkosi: update debian commit reference

3b4368d4b8 d/not-installed: fix shutdown.standalone path
2de05155e8 Update changelog for 256.1-2 release
cd98bcef06 autopkgtest: add dependency on libcryptsetup-dev in unit-tests suite
e220ce22f1 Bump breaks/replaces to conflicts for DEP17

(cherry picked from commit 0d40269e5a71d56734eeb30e41fc74c3c0bea7d4)

17 months agomkosi: bump Debian Salsa commit to latest
Luca Boccassi [Sun, 23 Jun 2024 09:20:27 +0000 (10:20 +0100)]
mkosi: bump Debian Salsa commit to latest

(cherry picked from commit 8a91a43197b63e84f6a7439585204a36c70040ba)

17 months agomkosi: install new split-out systemd packages
Luca Boccassi [Sun, 23 Jun 2024 09:10:26 +0000 (10:10 +0100)]
mkosi: install new split-out systemd packages

repart and cryptsetup tools were moved out of the main package
to reduce dependencies.

(cherry picked from commit 621a7fe0647eca4ced4914c1c9beb569678b304b)

17 months agomkosi: update arch commit reference
Daan De Meyer [Wed, 3 Jul 2024 06:23:29 +0000 (08:23 +0200)]
mkosi: update arch commit reference

d74b24c7c6 meson options: vcs-tag=false
7424fedef0 upgpkg: 256.1-1: new upstream release
6016864c99 upgpkg: 256-3: rebuild to fix man pages...
6f6d48b221 upgpkg: 256-2: update shells
b9ce44e766 drop systemd-stable repository, build from main one
baf4803252 upgpkg: 256-1: new upstream release
1d75e7ddaa add an install hint on NEWS
6f17a23127 Ups, inverted...
d76029f7cc update meson options
6e7929dd98 upgpkg: 256rc4-1: new upstream pre-release - testing only!
7b70e7b0e7 upgpkg: 256rc3-2: fast-forward to current git main, non-official testing
a438b879e2 upgpkg: 256rc3-1: new upstream pre-release, non-official testing
ff30a600c9 upgpkg: 256rc2-1: new upstream pre-release, non-official testing

(cherry picked from commit cd98453908a9a2e2c7c0dc3064599c8b2184431a)

17 months agomkosi: switch opensuse to devel branch
Luca Boccassi [Wed, 26 Jun 2024 14:52:23 +0000 (15:52 +0100)]
mkosi: switch opensuse to devel branch

The factory branch seems to have been reset to 9 years ago, switch
to devel

(cherry picked from commit 582718d959c66e3e7108310662ec8ae587ae6862)

17 months agomkosi: update fedora commit reference
Daan De Meyer [Wed, 3 Jul 2024 06:21:31 +0000 (08:21 +0200)]
mkosi: update fedora commit reference

f9fe17dbde Use vmlinux.h from kernel-devel
9cbad936a6 Pull in openssl-devel-engine
8ae009f929 Only add Requires on python3-zstd on Fedora
750e910c7c Drop BuildRequires on python3-zstd

(cherry picked from commit 6bd14bf4b3ec85101ba6ce75a4292d61066a5e68)

17 months agomkosi: update fedora commit reference
Daan De Meyer [Tue, 25 Jun 2024 14:34:28 +0000 (16:34 +0200)]
mkosi: update fedora commit reference

8153d9b0f9 Revert "Remove tmpfiles snippet for /home and /srv"
a76669ee22 Remove tmpfiles snippet for /home and /srv
b3e1d52cb4 Soft-disable tmpfiles --purge until a good use case comes up
4a29ab3f3b Version 256.1
ebf352d292 disable auto-features when bootstrapping
1ae0516ae7 Version 256
b32641170e Restore patch to drop varlink method call
421f0041b3 Version 256~rc4
65d9b49791 Fix typo
c56891fb68 Drop sysusers.d/basic.conf
69472997b9 Renumber sources and make order more consistent

(cherry picked from commit b6a9ad2c62fef8da07d4feb2c0190b4176b2b7b9)

17 months agomkosi: Install zypper in opensuse images
Daan De Meyer [Wed, 3 Jul 2024 20:48:37 +0000 (22:48 +0200)]
mkosi: Install zypper in opensuse images

(cherry picked from commit 18c98a839fc589d80eb256428f9eb091bb028171)

17 months agomkosi: Fix sync script git command
Daan De Meyer [Wed, 3 Jul 2024 20:18:07 +0000 (22:18 +0200)]
mkosi: Fix sync script git command

Let's make sure we actually operate on the packaging git repo.

(cherry picked from commit d1bbeeea4cd9317ad5915c99641aa9d82c4bc37d)

17 months agomkosi: Clean up old packages from the build directory
Daan De Meyer [Wed, 3 Jul 2024 18:20:31 +0000 (20:20 +0200)]
mkosi: Clean up old packages from the build directory

(cherry picked from commit 2f6046f66b61e4f12a53d6d93dcd59f25971ccf6)

17 months agomkosi: remove conflicting deb packages from builddir
Luca Boccassi [Wed, 3 Jul 2024 18:15:03 +0000 (19:15 +0100)]
mkosi: remove conflicting deb packages from builddir

These are not actually needed or installed, so delete them from the
build directory, so that inside an image one can do:

apt install --reinstall /work/build/*.deb

Follow-up for 690a85b1d4e794af62bca6d1ea530ffc530ee58c

(cherry picked from commit ce513c6c6cfbb52dd4736f8074b61d2dfdb2417d)

17 months agomkosi: Copy packages to the build directory as well
Daan De Meyer [Wed, 3 Jul 2024 12:28:21 +0000 (14:28 +0200)]
mkosi: Copy packages to the build directory as well

With the latest mkosi, mkosi -t none can be used to rerun the build
script without messing with a previously built image. This allows
one to run "mkosi -t disk -f qemu" in one terminal to build and boot
an image in qemu and then run "mkosi -t none" in another terminal to
rebuild the packages. If one then has "RuntimeBuildSources=yes" set
in their mkosi configuration, the build directory is mounted into the
virtual machine, which means that one can then run "dnf upgrade
/work/build/*.rpm" from within the VM to install the new packages.

This allows for quickly iterating on changes without having to rebuild
the image all the time.

We'll probably want to document this at some point, but let's start
with making it possible by copying the built packages to the build directory.

(cherry picked from commit 690a85b1d4e794af62bca6d1ea530ffc530ee58c)

17 months agomkosi: Make sure we don't hide errors from git merge-base
Daan De Meyer [Wed, 3 Jul 2024 11:19:34 +0000 (13:19 +0200)]
mkosi: Make sure we don't hide errors from git merge-base

Currently if git merge-base fails we'll hide the error and exit with
exit status 0. Let's make we only exit early if git merge-base exits
with 1 which indicates the current commit is not on the target branch.
Any other error is considered fatal.

(cherry picked from commit 2fe6ad5a64bca187712708d41269091c91500a35)

17 months agomkosi: Install perf
Daan De Meyer [Tue, 2 Jul 2024 13:46:09 +0000 (15:46 +0200)]
mkosi: Install perf

It's already installed on ubuntu via linux-tools-common.

(cherry picked from commit cca8c15599b888fc757d7e17a8a8949bca522447)

17 months agomkosi: Install pciutils
Daan De Meyer [Fri, 28 Jun 2024 11:41:12 +0000 (13:41 +0200)]
mkosi: Install pciutils

(cherry picked from commit 3cdc8da5ad4beb9bdb06e9c6ca3544da410454ce)

17 months agomkosi: move variable to the right scope
Zbigniew Jędrzejewski-Szmek [Thu, 6 Jun 2024 11:23:17 +0000 (13:23 +0200)]
mkosi: move variable to the right scope

(cherry picked from commit 3690971cd0d11749e82bc1cb69d5a1e80284ab46)

17 months agomkosi: Don't touch the packaging checkout if work is being done
Daan De Meyer [Tue, 2 Jul 2024 20:27:01 +0000 (22:27 +0200)]
mkosi: Don't touch the packaging checkout if work is being done

If work is being done in a separate branch, don't touch the packaging
checkout.

(cherry picked from commit 88e92306431bd5928ab4e5c18310e36de9ffa3f6)

17 months agovmspawn: define QEMU_MACHINE_TYPE for loongarch64
Robin Lee [Mon, 24 Jun 2024 05:48:32 +0000 (13:48 +0800)]
vmspawn: define QEMU_MACHINE_TYPE for loongarch64

Use ["virt"](https://www.qemu.org/docs/master/system/loongarch/virt.html) as a commonly used generic platform on loongarch64.

(cherry picked from commit 6efab8c343f0881ad9e1800facb0d08594b025ee)

17 months agovmspawn: define QEMU_MACHINE_TYPE for riscv
Xeonacid [Wed, 19 Jun 2024 09:56:57 +0000 (17:56 +0800)]
vmspawn: define QEMU_MACHINE_TYPE for riscv

Use ["virt"](https://www.qemu.org/docs/master/system/target-riscv.html#board-specific-documentation) as a commonly used generic platform on riscv.

(cherry picked from commit 5f7136a3690cd118eeef3c84dfbd9f5d0df556d6)

17 months agodocs: fix dead link to GNOME documentation
Luca Boccassi [Thu, 27 Jun 2024 16:59:01 +0000 (17:59 +0100)]
docs: fix dead link to GNOME documentation

(cherry picked from commit b22ee1010d4ba2e0049b162483c0f185c367d0bb)

17 months agologs-show: do not use _SOURCE_MONOTONIC_TIMESTAMP field v256.1
Yu Watanabe [Tue, 18 Jun 2024 08:55:31 +0000 (17:55 +0900)]
logs-show: do not use _SOURCE_MONOTONIC_TIMESTAMP field

The timestamp is not in CLOCK_MONOTONIC, but CLOCK_BOOTTIME,
while header monotonic timestamp is in CLOCK_MONOTONIC. Hence, we cannot
adjust timestamp by comparing with header monotonic timestamp and
_SOURCE_MONOTONIC_TIMESTAMP field.

Fixes a regression caused by affde1d7e79a634ee6053dbd4a57b3b51b74c170.
Fixes #33293.

(cherry picked from commit 144498e7e6efe2d90981cb14e3ed462a70a955c6)

17 months agorepart: fix memory leak
Antonio Alvarez Feijoo [Tue, 18 Jun 2024 12:07:50 +0000 (14:07 +0200)]
repart: fix memory leak

(cherry picked from commit a81f5ffd40081441dafc678fe83d185436dde35a)

17 months agomkosi: restrict noble-backports to noble builds
Luca Boccassi [Tue, 18 Jun 2024 12:35:32 +0000 (13:35 +0100)]
mkosi: restrict noble-backports to noble builds

Follow-up for c01cb8cbff8512b65b7903b55f78c8d12661b8d7

(cherry picked from commit f97b243edfcae211aade6ceb2fd89ae9d9209fac)

17 months agotmpfiles: move --purge to command section in --help text where it belongs
Lennart Poettering [Tue, 18 Jun 2024 07:56:15 +0000 (09:56 +0200)]
tmpfiles: move --purge to command section in --help text where it belongs

Also, make contrast between --remove and --purge clearer: one deletes
files marked for deletion, the other deletes files marked for creation.

(cherry picked from commit 69d76823ce6e9c307184946ed55b207eb728e625)

17 months agotmpfiles: insist on at least one configuration file being specified on --purge
Lennart Poettering [Tue, 18 Jun 2024 07:55:20 +0000 (09:55 +0200)]
tmpfiles: insist on at least one configuration file being specified on --purge

Also, extend the man page explanation substantially, matching more
closely what --create says.

Fixes: #33349
(cherry picked from commit 41064a3c97c9a53c97bbe8a1de799a82c4374a2d)

17 months agotmpfiles: honour --dry-run when removing directories
Lennart Poettering [Tue, 18 Jun 2024 07:54:33 +0000 (09:54 +0200)]
tmpfiles: honour --dry-run when removing directories

(cherry picked from commit edeceb80a91e8400e8c22f08a41045a2ba270fe6)

17 months agoinstall: allow removing symlinks even for units that are gone
Luca Boccassi [Fri, 7 Jun 2024 20:39:45 +0000 (21:39 +0100)]
install: allow removing symlinks even for units that are gone

If a symlink is leftover, still allow cleaning it up via 'disable'. This
happens when a unit is stopped and removed, but not disabled, and a reload
has already happened. At that point, cleaning up the old symlinks becomes
impossible through the APIs, and needs to be done manually. Always allow
cleaning up symlinks, if they exist, by only erroring out if there is an
OOM.

Follow-up for f31f10a6207efc9ae9e0b1f73975b5b610914017

(cherry picked from commit 5163c9b1e56293b1bb2803420613c5b374570892)

17 months agoNEWS: fix typo
Carlo Teubner [Tue, 18 Jun 2024 08:41:59 +0000 (09:41 +0100)]
NEWS: fix typo

(cherry picked from commit f6d517f8478bdd83b7d149b242a47d7686235c7e)

17 months agomkosi: bump to latest
Luca Boccassi [Mon, 17 Jun 2024 14:40:10 +0000 (15:40 +0100)]
mkosi: bump to latest

(cherry picked from commit 3001339dc5b3faf8f8edee4c07b14a4abdf3d66f)

17 months agoCI: disable secure boot in mkosi GHA runs
Luca Boccassi [Mon, 17 Jun 2024 16:40:28 +0000 (17:40 +0100)]
CI: disable secure boot in mkosi GHA runs

Booting a guest with secure boot is broken in Azure due to a hypervisor
bug. Disable it for now. Given there's no option, need to edit
the configuration on the fly.

(cherry picked from commit bdd0b45bfd7190bb8eb50c71ff6f50a80d6e6e52)

17 months agotest-network: mention that the captive portal option is supported since v2.20
Yu Watanabe [Mon, 17 Jun 2024 15:09:03 +0000 (00:09 +0900)]
test-network: mention that the captive portal option is supported since v2.20

The current latest release is v2.19, hence the test is typically skipped now.

(cherry picked from commit 4f6d8ab0767e534553bfa130f39dbb07ebb804a4)

17 months agocore/service: fix accept-socket deserialization
Mike Yuan [Mon, 17 Jun 2024 05:47:20 +0000 (07:47 +0200)]
core/service: fix accept-socket deserialization

Follow-up for 45b1017488cef2a5bacdf82028ce900a311c9a1c

(cherry picked from commit 9f5d8c3da4f505346bd1edfae907a2abcdbdc578)

17 months agotest: use 'auto' instead of 'uefi' for automated fallback
Luca Boccassi [Mon, 17 Jun 2024 14:37:43 +0000 (15:37 +0100)]
test: use 'auto' instead of 'uefi' for automated fallback

mkosi will prefer UEFI if the architecture supports it, but fallback
to 'linux' if it doesn't.

(cherry picked from commit 80468db8fa21ffd07dc2f28c656eeaf8f0292367)

17 months agotest: support TEST_NO_QEMU in mkosi integration wrapper
Luca Boccassi [Mon, 17 Jun 2024 13:09:40 +0000 (14:09 +0100)]
test: support TEST_NO_QEMU in mkosi integration wrapper

Same as the old integration test suite, allow skipping tests that
require qemu.
ppc64el's vsock support doesn't appear to work, so we'll skip it,
as it is already done in the legacy framework.

(cherry picked from commit 464d182b3e470e4163ca376145539a537a6e43a2)

17 months agotest: support TEST_NO_KVM
Luca Boccassi [Sun, 16 Jun 2024 18:15:24 +0000 (19:15 +0100)]
test: support TEST_NO_KVM

The shell integration suite allows to manually deselect KVM, so
suppor the same env var for the same purpose in python.

(cherry picked from commit 7d2701e7d1d0a7194026dd371071df6e63f59a82)

17 months agotest: drop obsolete comment
Luca Boccassi [Sun, 16 Jun 2024 18:21:32 +0000 (19:21 +0100)]
test: drop obsolete comment

We want to keep various logic here instead of mkosi, so drop the
temporary comment

(cherry picked from commit 626518ecd5e7b0c0c708ba53d7eb62934506ed54)

17 months agotest: drop unneeded firmware: uefi setting
Luca Boccassi [Sun, 16 Jun 2024 15:08:57 +0000 (16:08 +0100)]
test: drop unneeded firmware: uefi setting

These tests no longer need this, as they are running in nspawn, drop it

(cherry picked from commit f44fc531c95e37c83203375c411189009a01b482)

17 months agotest: check the skip condition before installing additional files
Luca Boccassi [Sun, 16 Jun 2024 12:41:50 +0000 (13:41 +0100)]
test: check the skip condition before installing additional files

(cherry picked from commit e1daedb4be6d8180790e0b303872fb1c87ddc7fc)

17 months agomkosi: install EFI packages only on EFI architectures
Luca Boccassi [Sun, 16 Jun 2024 19:42:12 +0000 (20:42 +0100)]
mkosi: install EFI packages only on EFI architectures

sbsigntool, systemd-boot and systemd-boot-efi do not  exist on other
architectures

(cherry picked from commit 47fe3f29b4ba1b44ae71a7e67c579c4883731dd4)

17 months agomkosi: use ports.ubuntu.com for non-x86 backports
Luca Boccassi [Sun, 16 Jun 2024 14:28:56 +0000 (15:28 +0100)]
mkosi: use ports.ubuntu.com for non-x86 backports

Follow-up for 46368556afee7a1f3a1685609942438ef2d9d6c1

(cherry picked from commit c01cb8cbff8512b65b7903b55f78c8d12661b8d7)

17 months agomkosi: enable unprivileged user ns for integration tests
Luca Boccassi [Sun, 16 Jun 2024 10:16:21 +0000 (11:16 +0100)]
mkosi: enable unprivileged user ns for integration tests

Ubuntu disables them by default in Noble, ship a sysctl to turn them back on
so that tests can use them

(cherry picked from commit 4cfcde024f34b3e5f682364d4e0c6185ef07d467)

17 months agoman,units: drop "temporary" from description of systemd-tmpfiles
Mike Yuan [Sat, 15 Jun 2024 15:27:33 +0000 (17:27 +0200)]
man,units: drop "temporary" from description of systemd-tmpfiles

Historically, systemd-tmpfiles was designed to manager temporary
files, but nowadays it has become a generic tool for managing
all kinds of files. To avoid user confusion, let's remove "temporary"
from the tool's description.

As discussed in #33349

(cherry picked from commit b5c8cc0a3b8e4e2fea0539d6420a76b524ea5735)

17 months agoman: add a bit of a warning to systemd-tmpfiles --purge
Nick Rosbrook [Fri, 14 Jun 2024 21:31:22 +0000 (17:31 -0400)]
man: add a bit of a warning to systemd-tmpfiles --purge

Mention that by default, /home is managed by tmpfiles.d/home.conf, and
recommend that users run systemd-tmpfiles --dry-run --purge first to
see exactly what will be removed.

(cherry picked from commit 9ebcac3b5125a8b0b11f371731ea167cd4684adc)

17 months agofundamental: declare flex array updated for gcc15 and clang 19
Cristian Rodríguez [Thu, 13 Jun 2024 15:59:28 +0000 (11:59 -0400)]
fundamental: declare flex array updated for gcc15 and clang 19

Silly workaround that:
- allowed flexible arrays in unions
- allowed flexible arrays in otherwise empty structs

Is no longer needed since https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=adb1c8a0f167c3a1f7593d75f5a10eb07a5d741a
(GCC15) or clang 19 https://github.com/llvm/llvm-project/commit/14ba782a87e16e9e15460a51f50e67e2744c26d9

(cherry picked from commit 3c2f2146f50c75662987541719bedc4aee9df939)

17 months agoanalyze: show pcrs also in sha384 bank
Lennart Poettering [Tue, 4 Jun 2024 09:02:34 +0000 (11:02 +0200)]
analyze: show pcrs also in sha384 bank

SHA384 is pretty much the bank we actually *want* to use, since it's
faster to calculate than SHA256, hence at the very least, start
considering.

(cherry picked from commit acaca5ab250a51be6ba07768bee80bf0f7b462fa)

17 months agoCODING_STYLE: document "reterr_" return parameters
Lennart Poettering [Wed, 12 Jun 2024 16:31:56 +0000 (18:31 +0200)]
CODING_STYLE: document "reterr_" return parameters

In some recent PRs (e.g. #32628) I started to systematically name return
parameters that shall only be initialized on failure (because they carry
additional error meta information, such as the line/column number of
parse failures or so). Let's make this official in the coding style.

(cherry picked from commit 7811864b08393eda5ff92145ea2776180d9b28ee)

17 months agoshell-completion: only offer devices for completion
David Tardon [Wed, 12 Jun 2024 12:35:34 +0000 (14:35 +0200)]
shell-completion: only offer devices for completion

This skips directories and other stuff like /dev/core, /dev/initctl or
/dev/log.

(cherry picked from commit bde35f4a91663ebb854330f582baeef0f9adcbfb)

17 months agoNEWS: note that new stable releases will be in the main repo
Luca Boccassi [Tue, 11 Jun 2024 22:09:30 +0000 (23:09 +0100)]
NEWS: note that new stable releases will be in the main repo

(cherry picked from commit 40d637bace4041f081088673cb230669c1e34faf)

17 months agorepart: Use CRYPT_ACTIVATE_PRIVATE
Daan De Meyer [Mon, 3 Jun 2024 10:35:29 +0000 (12:35 +0200)]
repart: Use CRYPT_ACTIVATE_PRIVATE

Let's skip udev device scanning when activating a LUKS volume in
systemd-repart as we don't depend on any udev symlinks and don't
expect anything except repart to access the volume.

Suggested by https://github.com/systemd/systemd/issues/33129#issuecomment-2143390941.

(cherry picked from commit 726fc7ae696510b04c24810f691d34f5d20529d6)

17 months agotest: dump a simple summary at the end of TEST-02-UNITTEST
Frantisek Sumsal [Wed, 12 Jun 2024 10:09:25 +0000 (12:09 +0200)]
test: dump a simple summary at the end of TEST-02-UNITTEST

Let's dump a list of skipped tests and logs from failed tests at the end
of TEST-02-UNITTEST to make debugging fails in CI slightly less painful.

(cherry picked from commit 2ac0e52f29eb5f0040882fc46bcfa369893577f3)

17 months agorepart: Use crypt_reencrypt_run() if available
Daan De Meyer [Sun, 2 Jun 2024 14:24:52 +0000 (16:24 +0200)]
repart: Use crypt_reencrypt_run() if available

crypt_reencrypt() is deprecated, so let's look for and prefer
crypt_reencrypt_run() if it is available.

(cherry picked from commit b99b2941276a74878a23470b36c75b0c21dbdd4a)

17 months agoresolved: permit dnssec rrtype questions when we aren't validating
Ronan Pigott [Fri, 8 Mar 2024 20:40:08 +0000 (13:40 -0700)]
resolved: permit dnssec rrtype questions when we aren't validating

This check introduced in 91adc4db33f6 is intended to spare us from
encountering broken resolver behavior we don't want to deal with.
However if we aren't validating we more than likely don't know the state
of the upstream resolver's support for dnssec. Let's let clients try
these queries if they want.

This brings the behavior of sd-resolved in-line with previouly stated
change in the meaning of DNSSEC=no, which now means "don't validate"
rather than "don't validate, because the upstream resolver is declared to
be dnssec-unaware".

Fixes: 9c47b334445a ("resolved: enable DNS proxy mode if client wants DNSSEC")
(cherry picked from commit 364c948707afa097f6ad177b61c2b51a86c0089a)

17 months agotpm2-setup: Don't fail if we can't access the TPM due to authorization failure
Daan De Meyer [Fri, 17 May 2024 14:20:11 +0000 (16:20 +0200)]
tpm2-setup: Don't fail if we can't access the TPM due to authorization failure

The TPM might be password/pin protected for various reasons even if
there is no SRK yet. Let's handle those cases gracefully instead of
failing the unit as it is enabled by default.

(cherry picked from commit d6518003f8ebbfb6f85dbf227736ae05b0961199)

17 months agostrbuf: use GREEDY_REALLOC to grow the buffer
q66 [Thu, 6 Jun 2024 11:45:48 +0000 (13:45 +0200)]
strbuf: use GREEDY_REALLOC to grow the buffer

This allows us to reserve a bunch of capacity ahead of time,
improving the performance of hwdb significantly thanks to not
having to reallocate so many times.

Before:
```
$ sudo time valgrind --leak-check=full ./systemd-hwdb update
==113297== Memcheck, a memory error detector
==113297== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==113297== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info
==113297== Command: ./systemd-hwdb update
==113297==
==113297==
==113297== HEAP SUMMARY:
==113297==     in use at exit: 0 bytes in 0 blocks
==113297==   total heap usage: 1,412,640 allocs, 1,412,640 frees, 117,920,009,195 bytes allocated
==113297==
==113297== All heap blocks were freed -- no leaks are possible
==113297==
==113297== For lists of detected and suppressed errors, rerun with: -s
==113297== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
132.44user 21.15system 2:35.61elapsed 98%CPU (0avgtext+0avgdata 228560maxresident)k
0inputs+25296outputs (0major+6886930minor)pagefaults 0swaps
```

After:
```
$ sudo time valgrind --leak-check=full ./systemd-hwdb update
==112572== Memcheck, a memory error detector
==112572== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==112572== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info
==112572== Command: ./systemd-hwdb update
==112572==
==112572==
==112572== HEAP SUMMARY:
==112572==     in use at exit: 0 bytes in 0 blocks
==112572==   total heap usage: 1,320,113 allocs, 1,320,113 frees, 70,614,501 bytes allocated
==112572==
==112572== All heap blocks were freed -- no leaks are possible
==112572==
==112572== For lists of detected and suppressed errors, rerun with: -s
==112572== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
21.94user 0.19system 0:22.23elapsed 99%CPU (0avgtext+0avgdata 229876maxresident)k
0inputs+25264outputs (0major+57275minor)pagefaults 0swaps
```

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
(cherry picked from commit 621b10fe2c3203c537996e84c7c89b0ff994ad93)

17 months agorules: Limit the number of device units generated for serial ttys
Daan De Meyer [Mon, 10 Jun 2024 10:59:58 +0000 (12:59 +0200)]
rules: Limit the number of device units generated for serial ttys

As per the suggestion in https://github.com/systemd/systemd/issues/33242.

This reduces the number of /dev/ttySXX device units generated in
mkosi from 32 to 4.

(cherry picked from commit dc38f9addd04c34d1fd743efc407bdebb3573d05)

17 months agosd-dhcp-server: clear buffer before receive
Yu Watanabe [Tue, 11 Jun 2024 15:48:56 +0000 (00:48 +0900)]
sd-dhcp-server: clear buffer before receive

I do not think this is necessary, but all other places in
libsystemd-network we clear buffer before receive. Without this,
Coverity warns about use-of-uninitialized-values.
Let's silence Coverity.

Closes CID#1469721.

(cherry picked from commit 40f9fa0af4c3094d93e833e62f7e301cd453da62)

17 months agohostnamed: don't allow hostnamed to exit on idle if varlink connections are still...
Lennart Poettering [Wed, 8 May 2024 08:38:11 +0000 (10:38 +0200)]
hostnamed: don't allow hostnamed to exit on idle if varlink connections are still ongoing

And while we are at it, ongoing PK authorizations are also a reason to
block exit on idle.

(cherry picked from commit ac908152b3b43a49f793d225c075423422cd3e33)

17 months agoman/systemd: reorder content a bit
Zbigniew Jędrzejewski-Szmek [Wed, 5 Jun 2024 09:28:21 +0000 (11:28 +0200)]
man/systemd: reorder content a bit

Section "Description" didn't actually say what systemd does. And we had a giant
"Concepts" section that actually described units types and other details about
them. So let's move the basic description of functionality to "Description" and
rename the following section to "Units".

The link to the Original Design Document is moved to "See Also", it is of
historical interest mostly at this point.

The only actual change is that when talking about API filesystems, /dev is also
mentioned. (I think /sys+/proc+/dev are the canonical set and should be always
listed on one breath.)

(cherry picked from commit f11aaf7dfb295de429b1567282b19caaba036bba)

17 months agoCreate CNAME
Luca Boccassi [Tue, 11 Jun 2024 22:04:12 +0000 (23:04 +0100)]
Create CNAME

17 months agoFinalize NEWS and version for v256 v256
Luca Boccassi [Tue, 11 Jun 2024 21:42:06 +0000 (22:42 +0100)]
Finalize NEWS and version for v256

17 months agoUpdate hwdb
Luca Boccassi [Tue, 11 Jun 2024 17:30:29 +0000 (18:30 +0100)]
Update hwdb

ninja -C build update-hwdb

17 months agotpm2-util: tighten rules on the nvindex handle range we allocate from
Lennart Poettering [Mon, 10 Jun 2024 16:58:54 +0000 (18:58 +0200)]
tpm2-util: tighten rules on the nvindex handle range we allocate from

Let's follow the conventions set by "Registry of Reserved TPM 2.0 Handles
and Localities" and only allocate nvindex currently not assigned to any
vendor.

For details see:

https://trustedcomputinggroup.org/resource/registry/

Section 2.2

17 months agohwdb: add keyboard mappings for the Ayaneo Kun face buttons
Tobias Jakobi [Thu, 6 Jun 2024 21:17:00 +0000 (23:17 +0200)]
hwdb: add keyboard mappings for the Ayaneo Kun face buttons

See comment in hwdb file for details.

17 months agoshared: fix typo: dito -> ditto
Yu Watanabe [Tue, 11 Jun 2024 17:34:11 +0000 (02:34 +0900)]
shared: fix typo: dito -> ditto

Follow-up for bc9e5a4c67f5fff536d122118e16a53dfb592acd and
3572d3df8f822d4cf1601428401a837f723771cf.

17 months agoman: document that separate /usr/local/ must not be used for config
Zbigniew Jędrzejewski-Szmek [Thu, 6 Jun 2024 17:12:17 +0000 (19:12 +0200)]
man: document that separate /usr/local/ must not be used for config

Since we document /usr/local/lib/systemd/ and other paths for various things,
add notes that this is not supported if /usr/local is a separate partition. In
systemd.unit, I tried to add the footnote in the table where
/usr/local/lib/systemd/ is listed, but that get's rendered as '[sup]a[/sup]'
with a mangled footnote at the bottom of the table :( .

Also, split paragraphs in one place where the subject changes without any
transition.

Follow-up for 02f35b1c905ac63ba62f94efebf858412e961fc1.
Replaces https://github.com/systemd/systemd/pull/33231.

17 months agobus-unit-util: extend the bus call timeout for UnitFreezer
Zbigniew Jędrzejewski-Szmek [Tue, 11 Jun 2024 10:19:39 +0000 (12:19 +0200)]
bus-unit-util: extend the bus call timeout for UnitFreezer

Follow-up for 1d617b35fef5f7783287965f766c8bb85e932b8e.
Should fix https://github.com/systemd/systemd/issues/33269.

From the logs in the bug:
Jun 10 22:55:37 systemd-logind[909]: The system will suspend now!
Jun 10 22:55:37 ModemManager[996]: <msg> [sleep-monitor-systemd] system is about to suspend
...
Jun 10 22:55:48 systemd-sleep[422408]: Failed to freeze unit 'user.slice': Connection timed out
Jun 10 22:55:48 systemd-sleep[422408]: Performing sleep operation 'suspend'...

The delay is ~11 s, consistent with the patch that set the timeout to 10 s.
Looks like this is not enough. It's the freeze operation that fails, but
thawing might be slow too, so just bump the timeout again.

17 months agochase: Tighten "." and "./" check
Daan De Meyer [Thu, 6 Jun 2024 20:59:36 +0000 (22:59 +0200)]
chase: Tighten "." and "./" check

Currently the check also succeeds if the input path starts with a dot, whereas
we only want it to succeed for "." and "./". Tighten the check and add a test.

17 months agotest-network: wait a while for addresses to be dropped
Yu Watanabe [Tue, 11 Jun 2024 08:41:28 +0000 (17:41 +0900)]
test-network: wait a while for addresses to be dropped

Hopefully fixes the following failure:
```
======================================================================
FAIL: test_ipv6_token_prefixstable (__main__.NetworkdRATests.test_ipv6_token_prefixstable)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/systemd/tests/testdata/test-network/systemd-networkd-tests.py", line 5705, in test_ipv6_token_prefixstable
    self.assertNotIn('2002:da8:1:0:b47e:7975:fc7a:7d6e/64', output) # the 1st prefixstable
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '2002:da8:1:0:b47e:7975:fc7a:7d6e/64' unexpectedly found in
  '19: veth99@veth-peer: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000\n
       inet6 2002:da8:1:0:b47e:7975:fc7a:7d6e/64 scope global tentative dynamic mngtmpaddr noprefixroute \n
          valid_lft 2100sec preferred_lft 1000sec\n
       inet6 2002:da8:1:0:da5d:e50a:43fd:5d0f/64 scope global dynamic mngtmpaddr noprefixroute \n
          valid_lft 2100sec preferred_lft 1000sec\n
       inet6 fe80::1034:56ff:fe78:9abc/64 scope link proto kernel_ll \n
          valid_lft forever preferred_lft forever'
----------------------------------------------------------------------
```

17 months agoman/systemd-soft-reboot.service: upgrade drop-in to unit file for slice
Zbigniew Jędrzejewski-Szmek [Tue, 11 Jun 2024 08:41:44 +0000 (10:41 +0200)]
man/systemd-soft-reboot.service: upgrade drop-in to unit file for slice

Follow-up for d91c7c91bf5de3b12cc2b29dd8b5ad49f29448ef.
Closes https://github.com/systemd/systemd/issues/33260.

17 months agoshell-completion: update bash completion for networkctl
Yu Watanabe [Tue, 11 Jun 2024 06:44:20 +0000 (15:44 +0900)]
shell-completion: update bash completion for networkctl

17 months agoshell-completion: update bash-completion for udevadm
Yu Watanabe [Tue, 11 Jun 2024 06:19:56 +0000 (15:19 +0900)]
shell-completion: update bash-completion for udevadm

- Add missing options.
- Show device nodes when supported.

Closes #33265.

17 months agohomed: fix typo
Yu Watanabe [Tue, 11 Jun 2024 06:49:04 +0000 (15:49 +0900)]
homed: fix typo

Follow-up for c4b5de7eff3d3b51ae88e74fecba09e4fbea4464.

17 months agologin: re-used -> reused
Yu Watanabe [Tue, 11 Jun 2024 06:50:12 +0000 (15:50 +0900)]
login: re-used -> reused

Suggested by Fossies.

17 months agoMerge pull request #33264 from bluca/mkosi_dlopen_install
Luca Boccassi [Mon, 10 Jun 2024 20:57:04 +0000 (21:57 +0100)]
Merge pull request #33264 from bluca/mkosi_dlopen_install

mkosi: install dlopen optional dependencies for debian/ubuntu builds

17 months agomkosi: install dlopen optional dependencies for debian/ubuntu builds
Luca Boccassi [Mon, 10 Jun 2024 03:06:39 +0000 (04:06 +0100)]
mkosi: install dlopen optional dependencies for debian/ubuntu builds

17 months agomkosi: update to latest
Luca Boccassi [Mon, 10 Jun 2024 13:17:10 +0000 (14:17 +0100)]
mkosi: update to latest

17 months agouser-util: fix fgetxxent_sane on musl
Mike Gilbert [Fri, 7 Jun 2024 16:28:41 +0000 (12:28 -0400)]
user-util: fix fgetxxent_sane on musl

musl's implementation does not set errno to ENOENT when the end of file
is reached. It returns NULL and leaves errno unchanged.

17 months agomkosi.prepare: do not install build dependencies with NO_BUILD
Luca Boccassi [Sun, 9 Jun 2024 19:14:45 +0000 (20:14 +0100)]
mkosi.prepare: do not install build dependencies with NO_BUILD

17 months agoNEWS: fix typo
Luca Boccassi [Sun, 9 Jun 2024 21:08:41 +0000 (22:08 +0100)]
NEWS: fix typo

17 months agoMerge pull request #33241 from DaanDeMeyer/noble
Luca Boccassi [Sat, 8 Jun 2024 22:29:56 +0000 (23:29 +0100)]
Merge pull request #33241 from DaanDeMeyer/noble

ci: Switch to Ubuntu 24.04

17 months agomkosi: Stop using tools tree
Daan De Meyer [Fri, 7 Jun 2024 16:54:17 +0000 (18:54 +0200)]
mkosi: Stop using tools tree

Noble has all the tooling we need so let's stop using a tools tree
and just install the dependencies we need on the host system.

17 months agomkosi: Replace sysusers.d with useradd for test user
Daan De Meyer [Fri, 7 Jun 2024 20:32:08 +0000 (22:32 +0200)]
mkosi: Replace sysusers.d with useradd for test user

sysusers.d is not intended for regular users, so let's use useradd
instead.

17 months agoci: Switch to Ubuntu 24.04
Daan De Meyer [Fri, 7 Jun 2024 08:55:53 +0000 (10:55 +0200)]
ci: Switch to Ubuntu 24.04

17 months agomkosi: Update to latest
Daan De Meyer [Fri, 7 Jun 2024 16:50:54 +0000 (18:50 +0200)]
mkosi: Update to latest

17 months agopresets: Don't enable systemd-homed-firstboot.service by default
Daan De Meyer [Fri, 7 Jun 2024 15:21:48 +0000 (17:21 +0200)]
presets: Don't enable systemd-homed-firstboot.service by default

Enabling this service by default means every CI image without a
regular user now gets stuck on first boot due to the password prompt
from systemd-homed-firstboot.service. Let's not enable the service
by default but instead require users to enable it explicitly if they
want its behavior.

Fixes #33249

17 months agodev-setup: Follow /dev/console symlinks when locking /dev/console
Daan De Meyer [Fri, 7 Jun 2024 13:10:58 +0000 (15:10 +0200)]
dev-setup: Follow /dev/console symlinks when locking /dev/console

systemd-nspawn sets up /dev/console as a symlink to a pty, so let's
make sure we follow the symlink when trying to lock /dev/console so
we don't fail with ELOOP.

17 months agoman: note that templated surviving units need a drop-in for their slice
Luca Boccassi [Thu, 6 Jun 2024 21:10:23 +0000 (22:10 +0100)]
man: note that templated surviving units need a drop-in for their slice

As reported on the mailing list, this is non-obvious, so document it.

https://lists.freedesktop.org/archives/systemd-devel/2024-June/050351.html

17 months agoMerge pull request #33237 from bluca/dlopen_deps
Luca Boccassi [Fri, 7 Jun 2024 10:18:26 +0000 (11:18 +0100)]
Merge pull request #33237 from bluca/dlopen_deps

mkosi: enable noble-backports for ubuntu and update debian packaging commit

17 months agomkosi: update debian packaging commit id
Luca Boccassi [Thu, 6 Jun 2024 22:01:10 +0000 (23:01 +0100)]
mkosi: update debian packaging commit id

17 months agomkosi: enable noble-backports for ubuntu
Luca Boccassi [Thu, 6 Jun 2024 22:00:44 +0000 (23:00 +0100)]
mkosi: enable noble-backports for ubuntu

Required to get the new dh-dlopenlibdeps package

18 months agoUpdate version and finalize NEWS for 256~rc4 v256-rc4
Luca Boccassi [Thu, 6 Jun 2024 19:39:50 +0000 (20:39 +0100)]
Update version and finalize NEWS for 256~rc4

18 months agorun: do not pass the pty slave fd to transient service in a machine
Zbigniew Jędrzejewski-Szmek [Thu, 6 Jun 2024 11:30:09 +0000 (13:30 +0200)]
run: do not pass the pty slave fd to transient service in a machine

Follow-up for 28459ba1f4df824d5ef7f7d1a9acb6953ea24045

The pty path returned by OpenMachinePTY() cannot be opened from outside
the machine, hence let's use the plain Standard{Input,Output,Error}=tty
in such a case. This means if --machine= is specified, #32916 would occur.
A comprehensive fix requires a new dbus method in machined, which shall
be material for v257.

See also: https://github.com/systemd/systemd/pull/33216#discussion_r1628020429

Replaces #33216

Co-authored-by: Mike Yuan <me@yhndnzj.com>
18 months agoMerge pull request #33232 from bluca/chores
Luca Boccassi [Thu, 6 Jun 2024 19:37:11 +0000 (20:37 +0100)]
Merge pull request #33232 from bluca/chores

Chores for RC4

18 months agomkosi: Stop skipping pkcs11 test on opensuse
Daan De Meyer [Thu, 6 Jun 2024 15:29:51 +0000 (17:29 +0200)]
mkosi: Stop skipping pkcs11 test on opensuse

A fix was made to the softhsm package so the test now passes.

18 months agoNEWS: update contributors
Luca Boccassi [Thu, 6 Jun 2024 16:57:47 +0000 (17:57 +0100)]
NEWS: update contributors

18 months agoUpdate syscalls tables
Luca Boccassi [Thu, 6 Jun 2024 16:56:12 +0000 (17:56 +0100)]
Update syscalls tables

ninja -C build update-syscall-tables update-syscall-header