Luca Boccassi [Wed, 19 Feb 2025 18:12:19 +0000 (18:12 +0000)]
repart: add parameter to attach offline verity signature (#36405)
Add --join-signature=hash:sig - when a verity signature partition
has been deferred in a previous run, this allows attaching a signature
that was created offline, for example on a build system like OBS where
the private key is not available to the build process.
Can be specified multiple times, the right partition to act upon will
be selected by matching the data+verity partitions UUIDs with the
provided roothash(es)
Luca Boccassi [Mon, 3 Feb 2025 15:05:46 +0000 (16:05 +0100)]
repart: add parameter to attach offline verity signatures
Add --join-signature=hash:sig - when a verity signature partition
has been deferred in a previous run, this allows attaching a signature
that was created offline, for example on a build system like OBS where
the private key is not available to the build process.
Can be specified multiple times, the right partition to act upon will
be selected by matching the data+verity partitions UUIDs with the
provided roothash(es)
xinpeng wang [Mon, 17 Feb 2025 07:01:22 +0000 (15:01 +0800)]
logind: save seat before applying acl
udev will trigger the uaccess program in 73-seat-late.rules, which
may modify the device's acl permissions. In some cases, udev triggers
the uaccess program when logind is started and active is being set.
At this time, 1) logind sets the user's acl permissions, 2) uaccess
obtains active and sets acl permissions; 3) logind updates seat's
stat_file and writes active. This situation will cause the device to
not have the correct acl permissions, resulting in abnormal situations
such as a black screen. Therefore, it is necessary to write active to
seat's stat file before setting acl.
Daan De Meyer [Wed, 19 Feb 2025 12:46:47 +0000 (13:46 +0100)]
mkosi: update fedora commit reference
* 6c7c4a510d Do not use dynamic spec generation for non-upstream builds
* 6201755b36 Allow co-installation of systemd-sysusers-standalone and systemd
* eba1721678 Split out -sysusers and -shared
* ac9c438e27 Use dynamic spec generation for triggers
* 3671a5cc79 Move more auxiliary files into subpackages
* 5c40e08728 Remove patch that is already upstream
* 49ec9f3286 Move some files into subpackages
* 2c0b984bf4 Version 257.3
* d66f997915 Add explicit BR: libxcrypt-devel
* 1ffa7bf7c7 Make Georgian mapping patch downstream-only
* de4ae54a34 Backport PR #36194 to add Georgian mapping to kbd-model-map
* cc9bce7893 Drop override of $PATH in the user manager
* d0973df863 Backport patch to emit audit events from systemd-sysusers
* e54ec2f978 Trim changelog entries that are not relevant to users
Yu Watanabe [Tue, 18 Feb 2025 17:09:58 +0000 (02:09 +0900)]
nspawn: unconditionally enable FUSE and use FOREACH_ARRAY() (#36407)
- FUSE is unconditionally enabled in the container, as our kernel base
line (v5.4) supports userns-safe FUSE, which is supported since v4.18.
- Create /dev/net/tun only when it is accessible.
- Replaces several loops with FOREACH_ARRAY().
Steve Ramage [Tue, 18 Feb 2025 17:08:16 +0000 (09:08 -0800)]
network: doc and code typo fixes (#36422)
This fixes some typos in the documentation, both grammar as well as
incorrect field names.
It also changes the casing of CheckSum to Checksum in L2TP to match
other casings.
Yu Watanabe [Tue, 18 Feb 2025 15:58:19 +0000 (00:58 +0900)]
journal-remote: modernize source_free()
- make it return NULL,
- suppress log message about reference counter of writer unless trace
logging is enabled,
- introduce cleanup function for RemoteSource.
When DevicePolicy= is enabled, but DeviceAllow= for /dev/net/tun is not
specified, bind-mounting the device node from the host system is
meaningless, as it cannot be used in the container anyway.
Let's check the device node is accessible before creating or
bind-mounting.
Yu Watanabe [Mon, 17 Feb 2025 06:06:10 +0000 (15:06 +0900)]
nspawn: enable FUSE unconditionally
FUSE is userns-safe since kernel v4.18 (da315f6e03988a7127680bbc26e1028991b899b8),
and now our kernel base line is 5.4. Let's drop the logic of checking
the version of FUSE, and unconditionally enable FUSE.
Yu Watanabe [Mon, 17 Feb 2025 17:11:17 +0000 (02:11 +0900)]
network: introduce link_should_mark_config()
This split-out common logic from link_drop_routes() and friends.
This is mostly a refactoring, and not change behavior in most cases.
But slightly change behavior for how foreign nexthops and routing
policy rules are managed.
E.g. when KeepConfiguration=static, previously all foreign nexthops and
routing policy rules were kept, but now only foreign nexthops and rules
with RTPROT_STATIC are kept and others are dropped.
Similary, when KeepConfiguration=dynamic, previously all foreign nexthops
and rules were removed, but now foreign configs with a dynamic protocol
e.g. RTPROT_DHCP are kept, and still configs with RTPROT_STATIC are
dropped.
Currently, we do not set/get/manage protocol for neighbor entries.
Hence, the logic of managing foreign neighbor entries is unchanged.
Yu Watanabe [Mon, 17 Feb 2025 17:08:10 +0000 (02:08 +0900)]
network/route: do not remove any foreign routes when KeepConfiguration=yes
Without this change, only foreign routes with RTPROT_KERNEL, RTPROT_STATIC,
RTPROT_DHCP, RTPROT_RA, and RTPROT_REDIRECT are kept, and foreign routes with
other protocol e.g. RTPROT_BOOT are removed even if KeepConfiguration=yes.
Daan De Meyer [Tue, 18 Feb 2025 13:16:54 +0000 (14:16 +0100)]
mkosi: update opensuse commit reference
* 9002a773f0 Update systemd to version 257.3 / rev 441 via SR 1245900
* 7545891f58 Update systemd to version 257.2 / rev 440 via SR 1243303
* c14020ba43 Update systemd to version 257.2 / rev 439 via SR 1241438
* 3137d3ab3d update 2025-02-06 19:07
mount-tool: add explicitly control of path canonicalization
With this the default canonicalization of paths can be turned off,
giving users explicit control on what shall happen if symlinks are
encountered within a path.
mount-tool: modernize umount and make sure it works for bind mounted files
So far, "systemd-umount" executed on a bind mounted file would assume it
is supposed to unmount a loopback mounted file system. Let's address
that by instead checking if the file is a mount.
core: port mount unit inode creation to make_mount_point_inode_from_mode() too
This also ports over things to use chase() to create/pin the underlying
to mount, and in particular checks that the path does not contain any
symlinks. That's crucial since we cannot allow mounts to be established
with that, since it would mean we couldn't recognize the entries in
/proc/self/mountinfo anymore.
This replaces make_mount_point_inode_from_stat() by
make_mount_point_inode_from_mode() and makes it take a single mode_t
rather than a "struct stat". Moreover, at an "atfd" style directory
parameter.
Then port all users over to new feature, and in particular make use of
the directory fd: use chase() to create and pin parent directories first where
needed.
terminal-util: output newline at end of "Press any key to proceed" message
So far we'd leave the cursor at the end of the Press any key to proceed
message as long as the user didn't type in anything yet, and generated
the newline only after.
Let's switch this around: let's output the newline before.
This should make boot-time output nicer since it means concurrent output
while we wait will start at the beginning of line, and not in the middle.
homectl: don't show --enforce-password-policy= recommendation in first-boot invocation
The hint is not useful, since this is after all invoked as part of the
boot process, and not from an interactive shell, where the user could
directly retry with the changed switch. Hence let's simply suppress the
hint for those cases.
1. Make the message a bit more visible, by adding ANSI color. This
matters in particular during boot, where the message otherwise might
be overprinted by other output
2. Let's turn off terminal echo so that whatever key is entered is not
made visible on screen, and we can handle newline and other keys
reasonably uniformly.
Luca Boccassi [Sun, 16 Feb 2025 23:25:43 +0000 (23:25 +0000)]
mkosi: update debian commit reference
* 08eb5e1eff Set tty device node mode to 0600
* e3955d1ca2 initramfs-tools: copy hwdb.bin to initramfs
* aff03b8933 d/rules: fix bpftool path discovery on ubuntu
* cab4f15666 Update changelog for 257.3-1 release
* 9bfeffe2a3 autopkgtest: fix mkosi config section
* 44487bfe02 ukify: depend on python3-zstandard and recommend python3-lz4
* 0a20294f18 d/rules: adjust vmlinux.h path for Ubuntu
* 94fa0939ed Drop fallback for missing linux-bpf-dev package
* b0b75e3f4b systemd-boot: check that bootvar really points to sd-boot
* 464453cbd6 systemd-boot: fix creating bootvar on arm64
* ce4a878ef7 systemd-boot: warn if efibootmgr is not installed
* cce6971f68 Install new udev rule for hidraw
* 0c483fbd26 d/t/control: do not pull in gdm3 on loong64
* 52451a0c14 d/t/control: depend on debian-archive-keyring and ubuntu-keyring
Yu Watanabe [Sun, 16 Feb 2025 20:26:25 +0000 (05:26 +0900)]
network/routing-policy-rule: assume FRA_PROTOCOL attribute is always set
Since kernel v4.17 (1b71af6053af1bd2f849e9fda4f71c1e3f145dcf), the
attribute is always set in each netlink message for routing policy rule.
Now, our base line is v5.4. Hence, we can drop the workaround.
Yu Watanabe [Sun, 9 Feb 2025 20:29:12 +0000 (05:29 +0900)]
journal-upload: several follow-ups for Accept-Encoding header handling
This makes,
- When a wildcard value '*' is specified, use the first supported
compression algorithm,
- disable compression if Accept-Encoding header is unspecified or
no supported compression algorithm specified in the header,
- ignore all errors in parsing the header.
- use OrderedHashmap to manage configured compression algorithms, then
drop CompressionArgs,
- rename CompressionOpts -> CompressionConfig,
- refuse 'none' in Compression= setting, but accept boolean false, which
disables compression,
- when Compression= option is unspecified, enable all supported compression
algorithms by default,
- do not set 'none' to the Accept-Encoding header.
Daan De Meyer [Sat, 15 Feb 2025 23:24:52 +0000 (00:24 +0100)]
repart: Delay private key and certificate check until actual use
For many reasons, we might not actually sign a verity signature
partition, even if ope is specified in the partition definition files.
It might already exist, it might be deferred, it might be excluded, ...
Since we cannot check if partition already exists when reading the
configuration, let's delay the check for whether a certificate and
key have been provided until we're actually about to sign a roothash.
Daan De Meyer [Sat, 15 Feb 2025 20:47:50 +0000 (21:47 +0100)]
mkosi: Install systemd in Fedora build image
rpm pulls in systemd-standalone-sysusers now by default to get
systemd-sysusers which causes a conflict later on during the prepare
script when systemd is pulled in as a dependency of device-mapper so
let's install systemd in the initial transaction so systemd provides
systemd-sysusers and systemd-standalone-sysusers is never installed
in the first place.
Luca Boccassi [Fri, 14 Feb 2025 20:02:45 +0000 (20:02 +0000)]
mkosi: Fix mkosi.clangd (#36387)
- Add missing '--' delimiter
- Use the new BuildSubdirectory JSON field to figure out the build
subdirectory.
- Remove the /usr/include path mapping for now. This means we can't
jump into system headers anymore if they don't exist on the host,
we can find a way to add this back later if it turns out to be
crucial.
Daan De Meyer [Fri, 14 Feb 2025 14:22:05 +0000 (15:22 +0100)]
mkosi: Fix mkosi.clangd
- Add missing '--' delimiter
- Use the new BuildSubdirectory JSON field to figure out the build
subdirectory.
- Remove the /usr/include path mapping for now. This means we can't
jump into system headers anymore if they don't exist on the host,
we can find a way to add this back later if it turns out to be
crucial.