]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
6 months agohomectl: when taking a JSON user record as input, strip secttions we don't want rathe...
Lennart Poettering [Wed, 22 Nov 2023 12:13:59 +0000 (13:13 +0100)] 
homectl: when taking a JSON user record as input, strip secttions we don't want rather than complain about them

This makes it easier to take a user record from one host and create an
identical user on another.

6 months agocreds-util: add helper for opening the credentials directory
Lennart Poettering [Wed, 22 Nov 2023 09:57:20 +0000 (10:57 +0100)] 
creds-util: add helper for opening the credentials directory

6 months agoMerge pull request #30479 from keszybz/man-pages-synopsis-layout
Lennart Poettering [Mon, 18 Dec 2023 09:44:58 +0000 (10:44 +0100)] 
Merge pull request #30479 from keszybz/man-pages-synopsis-layout

Man pages synopsis layout

6 months agoMerge pull request #30482 from YHNdnzj/ferror-handling
Mike Yuan [Mon, 18 Dec 2023 06:42:22 +0000 (14:42 +0800)] 
Merge pull request #30482 from YHNdnzj/ferror-handling

A few fixes for ferror() handling

6 months agoMerge pull request #30494 from keszybz/trivial-cleanups
Yu Watanabe [Sun, 17 Dec 2023 23:25:02 +0000 (08:25 +0900)] 
Merge pull request #30494 from keszybz/trivial-cleanups

Trivial cleanups

6 months agoAdd Bosto BT-12HD series to hwdb
QuonXF [Sat, 16 Dec 2023 17:58:12 +0000 (21:58 +0400)] 
Add Bosto BT-12HD series to hwdb

6 months agoresolved-util: NUL-terminate host label
Ronan Pigott [Sat, 16 Dec 2023 19:45:07 +0000 (12:45 -0700)] 
resolved-util: NUL-terminate host label

In case the host has a 63-byte hostname, we must have enough space for a
NUL terminator as well.

6 months agomeson: make lines more consistent
Diego Viola [Thu, 14 Dec 2023 21:35:00 +0000 (18:35 -0300)] 
meson: make lines more consistent

6 months agomachine: also clean up gid_map fscanf error handling 30482/head
Mike Yuan [Thu, 14 Dec 2023 15:57:26 +0000 (23:57 +0800)] 
machine: also clean up gid_map fscanf error handling

6 months agotest-systemctl-enable: fix typo 30494/head
Zbigniew Jędrzejewski-Szmek [Fri, 15 Dec 2023 15:01:35 +0000 (16:01 +0100)] 
test-systemctl-enable: fix typo

Follow-up for fe6e0cfa19dd1de4ac599ae207182fd556adcfa7.

6 months agoNEWS: fix version
Zbigniew Jędrzejewski-Szmek [Fri, 15 Dec 2023 14:52:37 +0000 (15:52 +0100)] 
NEWS: fix version

6 months agoman: use <simplelist> for two more lists 30479/head
Zbigniew Jędrzejewski-Szmek [Fri, 15 Dec 2023 13:32:50 +0000 (14:32 +0100)] 
man: use <simplelist> for two more lists

6 months agoman: use <simplelist> for file lists in synopsis
Zbigniew Jędrzejewski-Szmek [Thu, 14 Dec 2023 11:52:03 +0000 (12:52 +0100)] 
man: use <simplelist> for file lists in synopsis

With <para><filename>…</filename></para>, we get a separate "paragraph" for
each line, i.e. entries separated by empty lines. This uses up a lot of space
and was only done because docbook makes it hard to insert a newline. In some
other places, <literallayout> was used, but then we cannot indent the source
text (because the whitespace would end up in the final page). We can get the
desired result with <simplelist>.

With <simplelist> the items are indented in roff output, but not in html
output. In some places this looks better then no indentation, and in others it
would probably be better to have no indent. But this is a minor issue and we
cannot control that.

(I didn't convert all spots. There's a bunch of other man pages which have two
lines, e.g. an executable and service file, and it doesn't matter there so
much.)

6 months agobasic/uid-range: add uid_map_read_one helper
Mike Yuan [Thu, 14 Dec 2023 15:55:43 +0000 (23:55 +0800)] 
basic/uid-range: add uid_map_read_one helper

6 months agocgroup-util: check ferror() first
Mike Yuan [Thu, 14 Dec 2023 15:41:06 +0000 (23:41 +0800)] 
cgroup-util: check ferror() first

Also, there's no need to set use errno_or_else(), since fscanf() is
documented to set errno on error.

6 months agofsck: use correct errno
Mike Yuan [Thu, 14 Dec 2023 15:38:39 +0000 (23:38 +0800)] 
fsck: use correct errno

6 months agoMerge pull request #30484 from mrc0mmand/test-tweaks
Luca Boccassi [Fri, 15 Dec 2023 11:20:35 +0000 (12:20 +0100)] 
Merge pull request #30484 from mrc0mmand/test-tweaks

A couple of test-related tweaks

6 months agoFix a typo in the org.freedesktop.systemd1 man page
Andrew Sayers [Thu, 14 Dec 2023 16:31:09 +0000 (16:31 +0000)] 
Fix a typo in the org.freedesktop.systemd1 man page

6 months agotest: tell delv to load anchors from /etc/bind.keys explicitly 30484/head
Frantisek Sumsal [Thu, 14 Dec 2023 15:59:21 +0000 (16:59 +0100)] 
test: tell delv to load anchors from /etc/bind.keys explicitly

Since [0] delv no longer does that automagically, so we have to that
explicitly with each delv invocation.

Resolves: #30477

[0] https://github.com/isc-projects/bind9/commit/c144fd2871206d209ccdb916f5959a3ceab1d44c

6 months agotest: don't check for -Dinstall-tests=true with NO_BUILD=1
Frantisek Sumsal [Thu, 14 Dec 2023 14:06:46 +0000 (15:06 +0100)] 
test: don't check for -Dinstall-tests=true with NO_BUILD=1

6 months agotest: install empty directories with NO_BUILD=1
Frantisek Sumsal [Thu, 14 Dec 2023 14:06:12 +0000 (15:06 +0100)] 
test: install empty directories with NO_BUILD=1

Resolves: #30478

6 months agotest: update comment style & drop one extraneous newline
Frantisek Sumsal [Thu, 14 Dec 2023 10:40:13 +0000 (11:40 +0100)] 
test: update comment style & drop one extraneous newline

Follow-up to 9fb2a61830.

6 months agotest: forward journal messages to console during sd-bsod tests
Frantisek Sumsal [Thu, 14 Dec 2023 10:36:52 +0000 (11:36 +0100)] 
test: forward journal messages to console during sd-bsod tests

Since we nuke the journal multiple times during that, which makes
potential fails undebugable.

6 months agoMerge pull request #30440 from yuwata/network-nexthop-cleanups-2
Yu Watanabe [Thu, 14 Dec 2023 12:44:02 +0000 (21:44 +0900)] 
Merge pull request #30440 from yuwata/network-nexthop-cleanups-2

network/nexthop: several cleanups

6 months agoman/tmpfiles: update summary
Zbigniew Jędrzejewski-Szmek [Thu, 14 Dec 2023 10:08:50 +0000 (11:08 +0100)] 
man/tmpfiles: update summary

It hasn't been just about "volatile" and "files" for a long time.

6 months agosd-netlink: the kernel ignores NLM_F_APPEND in RTM_NEWNEXTHOP message but uses NLM_F_... 30440/head
Yu Watanabe [Wed, 13 Dec 2023 06:37:06 +0000 (15:37 +0900)] 
sd-netlink: the kernel ignores NLM_F_APPEND in RTM_NEWNEXTHOP message but uses NLM_F_REPLACE

See insert_nexthop() in net/ipv4/nexthop.c of the kernel.

6 months agonetwork/nexthop: check existing nexthop can be replaced with requested one
Yu Watanabe [Wed, 13 Dec 2023 06:33:13 +0000 (15:33 +0900)] 
network/nexthop: check existing nexthop can be replaced with requested one

6 months agonetwork/nexthop: do not add NextHop object to Link on requesting
Yu Watanabe [Tue, 12 Dec 2023 18:55:45 +0000 (03:55 +0900)] 
network/nexthop: do not add NextHop object to Link on requesting

Then, all nexthops managed by networkd really exist (unless the kernel
silently removes a nexthop).

This is the same for nexthop already done by
3c283289aefb3cfb8bfa5c759209368b63d1692c and
0a0c2672dbd22dc85d660e5baa7e1bef701beb88 (for address), and
5d098f5d3614d1c0be7c825925637e9ab3d904fb (for neighbor).

6 months agonetwork/nexthop: manage all nexthops by manager
Yu Watanabe [Tue, 12 Dec 2023 18:43:27 +0000 (03:43 +0900)] 
network/nexthop: manage all nexthops by manager

The kernel manages nexthops by their IDs. Previously networkd manages
nexthops in three ways:
- by the corresponding link, if a nexthop has ifindex,
- by the manager, if a nexthop does not have ifindex,
- by the manager with their IDs.

This unifies the three managements of nexthops into one, and use the
same way as the kernel uses.

This is the one for nexthop already done by
aa9626ee3b96e0d2a9a816b5efd38fd7dc829def for neighbor.

6 months agonetwork/nexthop: rename manager_get_nexthop_by_id() -> nexthop_get_by_id()
Yu Watanabe [Tue, 12 Dec 2023 18:23:50 +0000 (03:23 +0900)] 
network/nexthop: rename manager_get_nexthop_by_id() -> nexthop_get_by_id()

6 months agonetwork/nexthop: rename nexthop_owned_by_link() -> nexthop_bound_to_link()
Yu Watanabe [Tue, 12 Dec 2023 18:20:05 +0000 (03:20 +0900)] 
network/nexthop: rename nexthop_owned_by_link() -> nexthop_bound_to_link()

No functional change.

6 months agonetwork/nexthop: NextHop.id is always positive when nexthop_configure() is called
Yu Watanabe [Tue, 12 Dec 2023 09:40:43 +0000 (18:40 +0900)] 
network/nexthop: NextHop.id is always positive when nexthop_configure() is called

If a nexthop is requested without a valid ID, then nexthop_acquire_id()
assigns an unused ID. So, at the time nexthop_configure() is called, the
ID is always valid.

6 months agonetwork/nexthop: do not assign invalid ID
Yu Watanabe [Mon, 11 Dec 2023 16:59:34 +0000 (01:59 +0900)] 
network/nexthop: do not assign invalid ID

This also reduces the scope of the iterator.

6 months agonetwork/nexthop: split-out nexthop_update_group()
Yu Watanabe [Mon, 11 Dec 2023 16:42:12 +0000 (01:42 +0900)] 
network/nexthop: split-out nexthop_update_group()

No functional change, just refactoring and preparation for later
commits.

6 months agonetwork: do not trigger assertion when link_get_by_index() called with an invalid...
Yu Watanabe [Mon, 11 Dec 2023 16:27:09 +0000 (01:27 +0900)] 
network: do not trigger assertion when link_get_by_index() called with an invalid ifindex

Should not change any behavior. Preparation for later commit.

6 months agoAdd $SYSTEMD_HWDB_UPDATE_BYPASS (#30463)
Daan De Meyer [Thu, 14 Dec 2023 09:57:05 +0000 (10:57 +0100)] 
Add $SYSTEMD_HWDB_UPDATE_BYPASS (#30463)

Same as $KERNEL_INSTALL_BYPASS, but for hwdb. This will speed up
cross architecture image builds in mkosi as I can disable package
managers from running the costly hwdb update stuff in qemu user
mode and run it myself with a native systemd-hwdb with --root=.

6 months agomachine-credential: introduce MachineCredentialContext
Mike Yuan [Tue, 12 Dec 2023 10:58:51 +0000 (18:58 +0800)] 
machine-credential: introduce MachineCredentialContext

This allows more straightforward memory management and
the use of static destructor.

Requested (by me) in https://github.com/systemd/systemd/pull/30143#discussion_r1401980763

6 months agoMerge pull request #30417 from YHNdnzj/unit-log-resource
Luca Boccassi [Thu, 14 Dec 2023 08:45:26 +0000 (08:45 +0000)] 
Merge pull request #30417 from YHNdnzj/unit-log-resource

core/unit: clean up unit_log_resources

6 months agoAdd three Dell platforms to sensor accel location base
Artur Pak [Thu, 14 Dec 2023 06:32:54 +0000 (14:32 +0800)] 
Add three Dell platforms to sensor accel location base

6 months agoMerge pull request #30467 from poettering/loop-block-tweaks
Daan De Meyer [Thu, 14 Dec 2023 08:38:17 +0000 (09:38 +0100)] 
Merge pull request #30467 from poettering/loop-block-tweaks

various tweaks to block device ioctls, and loop device mgmt

6 months agorlimit-util: add pid_getrlimit() helper
Lennart Poettering [Fri, 8 Dec 2023 09:25:57 +0000 (10:25 +0100)] 
rlimit-util: add pid_getrlimit() helper

This is gets the resource limits off a specified process, and is very
similar to prlimit() with a NULL new_rlimit argument. In fact, it tries
that first. However, it then falls back to use /proc/$PID/limits. Why?
Simply because Linux prohibits access to prlimit() for processes with a
different UID, but /proc/$PID/limits still works.

This is preparation to allow nspawn to run unprivileged.

6 months agoMerge pull request #30469 from poettering/userdbd-tweaks2
Luca Boccassi [Thu, 14 Dec 2023 08:19:51 +0000 (08:19 +0000)] 
Merge pull request #30469 from poettering/userdbd-tweaks2

userdb: some smaller userdb tweaks

6 months agodocs/CREDENTIALS: Don't write authorized_keys with executable bits
Colin Walters [Thu, 14 Dec 2023 00:58:31 +0000 (19:58 -0500)] 
docs/CREDENTIALS: Don't write authorized_keys with executable bits

No reason to make this file executable.

6 months agomount-util: make sure mount_switch_root() works as clean NOP when '/' is specified...
Lennart Poettering [Wed, 13 Dec 2023 15:48:58 +0000 (16:48 +0100)] 
mount-util: make sure mount_switch_root() works as clean NOP when '/' is specified as target

6 months agouserdbd: split out function to find listener fd 30469/head
Lennart Poettering [Wed, 13 Dec 2023 17:21:18 +0000 (18:21 +0100)] 
userdbd: split out function to find listener fd

no actual code changes, just some refactoring and modernization

6 months agouserbd: modernize process_connection() fd possession logic
Lennart Poettering [Wed, 13 Dec 2023 17:19:42 +0000 (18:19 +0100)] 
userbd: modernize process_connection() fd possession logic

6 months agouserdbd: realign table
Lennart Poettering [Wed, 13 Dec 2023 17:19:20 +0000 (18:19 +0100)] 
userdbd: realign table

6 months agouserdbd: drop redundant empty line
Lennart Poettering [Wed, 13 Dec 2023 17:19:00 +0000 (18:19 +0100)] 
userdbd: drop redundant empty line

6 months agouserdbd: properly close the listener fd on exit
Lennart Poettering [Wed, 13 Dec 2023 17:18:39 +0000 (18:18 +0100)] 
userdbd: properly close the listener fd on exit

6 months agoupdate TODO
Lennart Poettering [Mon, 4 Dec 2023 16:57:06 +0000 (17:57 +0100)] 
update TODO

6 months agouserwork: port to pidref_set_parent()
Lennart Poettering [Fri, 1 Dec 2023 16:16:25 +0000 (17:16 +0100)] 
userwork: port to pidref_set_parent()

6 months agopidref: add pidref_set_parent() for race-freely getting pidref on ppid
Lennart Poettering [Fri, 1 Dec 2023 16:14:33 +0000 (17:14 +0100)] 
pidref: add pidref_set_parent() for race-freely getting pidref on ppid

6 months agodissect-tool: hide device column if it's a short-lived loopback device 30467/head
Lennart Poettering [Mon, 4 Dec 2023 17:27:19 +0000 (18:27 +0100)] 
dissect-tool: hide device column if it's a short-lived loopback device

It's pointless showing info that isn#t going to survive the current
invocation, hence hide it.

The "partition number" column is more useful since it kinda shows the
same information, but without the device node name prefixed that is
local to the currentl invocation.

6 months agodissect-tool: show sector/image size from DissectedImage object
Lennart Poettering [Mon, 4 Dec 2023 17:25:54 +0000 (18:25 +0100)] 
dissect-tool: show sector/image size from DissectedImage object

The information is provided to us already in the structure now, hence
use it.

6 months agodissect-image: also store the image size in DissectedImage
Lennart Poettering [Mon, 4 Dec 2023 17:04:44 +0000 (18:04 +0100)] 
dissect-image: also store the image size in DissectedImage

That way we can easily access it the same way regardless if we operate
on a block device or on a regular file.

6 months agoloop-util: remember if we created the LoopDevice
Lennart Poettering [Mon, 4 Dec 2023 17:02:45 +0000 (18:02 +0100)] 
loop-util: remember if we created the LoopDevice

Let's store in a bool whether a LoopDevice object was created via
loop_device_open() or loop_device_make().

6 months agoloop-util: also store the device size in LoopDevice
Lennart Poettering [Mon, 4 Dec 2023 17:01:39 +0000 (18:01 +0100)] 
loop-util: also store the device size in LoopDevice

That makes the field easily accessible, just as the sector size.

6 months agoblockdev-util: add new helper blockdev_get_device_size()
Lennart Poettering [Mon, 4 Dec 2023 16:58:33 +0000 (17:58 +0100)] 
blockdev-util: add new helper blockdev_get_device_size()

This function is just a wrapper around the BLKGETSIZE64. Which is a
pretty simple ioctl. The only reason to wrap it, is that the headers we
need to call it are a bit messy (as "linux/fs.h" is incompatible with
certain glibc headers). Hence add the simple helper that wraps it and
allows us to do the header mess needed in one file only.

It's also nicely symmetric to blockdev_get_sector_size().

6 months agotest: install all necessary units & generators for LVM on Debian
Frantisek Sumsal [Wed, 13 Dec 2023 11:27:17 +0000 (12:27 +0100)] 
test: install all necessary units & generators for LVM on Debian

And derivates.

Replaces: #30458

6 months agoMerge pull request #30450 from poettering/cgroups-delegate-attr-update
Luca Boccassi [Wed, 13 Dec 2023 13:50:41 +0000 (13:50 +0000)] 
Merge pull request #30450 from poettering/cgroups-delegate-attr-update

cgroup: bring list of delegated cgroup attributes up-to-date with cur…

6 months agoMerge pull request #30232 from keszybz/ukify-imports
Zbigniew Jędrzejewski-Szmek [Wed, 13 Dec 2023 13:38:03 +0000 (14:38 +0100)] 
Merge pull request #30232 from keszybz/ukify-imports

Use exec() to import ukify

6 months agocore/unit: clean up unit_log_resources 30417/head
Mike Yuan [Sun, 10 Dec 2023 17:36:22 +0000 (01:36 +0800)] 
core/unit: clean up unit_log_resources

* Use a unified struct to store accounting fields/suffixes
* Use strextendf_with_separator where appropriate
* Don't mix stack and heap allocation for one iovec array

6 months agocore/unit: raise log level for unit_log_resources on certain memory thresholds
Mike Yuan [Sun, 10 Dec 2023 17:44:13 +0000 (01:44 +0800)] 
core/unit: raise log level for unit_log_resources on certain memory thresholds

We already do this for all other types of accountings. Let's
make this nicer for memory accounting too.

6 months agomacro-fundamental: add U64_{K,M,G}B
Mike Yuan [Wed, 13 Dec 2023 11:25:40 +0000 (19:25 +0800)] 
macro-fundamental: add U64_{K,M,G}B

6 months agoiovec-util: add missing assertion
Mike Yuan [Sun, 10 Dec 2023 16:12:30 +0000 (00:12 +0800)] 
iovec-util: add missing assertion

6 months agotest: test that delegation of some newer attrs that shall be delegated work 30450/head
Lennart Poettering [Wed, 13 Dec 2023 09:10:56 +0000 (10:10 +0100)] 
test: test that delegation of some newer attrs that shall be delegated work

6 months agocgroup: bring list of delegated cgroup attributes up-to-date with current kernels
Lennart Poettering [Tue, 12 Dec 2023 09:54:55 +0000 (10:54 +0100)] 
cgroup: bring list of delegated cgroup attributes up-to-date with current kernels

THis brings the list of attributes to delegate to managers of subcgroups
to the state of kernel 6.6.

We probably should unify this list, and maybe generate it automatically
from /sys/kernel/cgroup/delegate, but let's do that another time.

6 months agovarlink: improve compat with varlink C reference implementation
Lennart Poettering [Fri, 1 Dec 2023 16:59:49 +0000 (17:59 +0100)] 
varlink: improve compat with varlink C reference implementation

The reference implementation seems to set the 'parameters' field for
method calls to 'null' if nothing is specified on its command line. We
so far only could deal if the parameters field was unset or set to the
empty object. Let's also accept the 'null' type.

6 months agoMerge pull request #30433 from yuwata/network-nexthop-cleanups
Yu Watanabe [Wed, 13 Dec 2023 05:16:27 +0000 (14:16 +0900)] 
Merge pull request #30433 from yuwata/network-nexthop-cleanups

network: introduce ManageForeignNextHops=

6 months agoMerge pull request #30453 from poettering/dissect-fixes
Yu Watanabe [Wed, 13 Dec 2023 05:15:05 +0000 (14:15 +0900)] 
Merge pull request #30453 from poettering/dissect-fixes

dissect-image: various fixes

6 months agotest: mask the mdmonitor.service
Frantisek Sumsal [Tue, 12 Dec 2023 22:01:31 +0000 (23:01 +0100)] 
test: mask the mdmonitor.service

It's pulled in by one of the udev rules (63-md-raid-arrays.rules) and it
fails every time, because there's no valid email address in
/etc/mdadm.conf:

[    5.778153] testsuite-64.sh[403]: mdadm: array /dev/md/mdmirror started.
[    5.819137] kernel: md/raid1:md127: not clean -- starting background reconstruction
[    5.819141] kernel: md/raid1:md127: active with 2 out of 2 mirrors
[    5.819159] kernel: md127: detected capacity change from 0 to 129024
[    5.821950] kernel: md: resync of RAID array md127
...
[    5.887192] mdadm[424]: mdadm: No mail address or alert command - not monitoring.
[    5.890772] systemd[1]: Starting mdmonitor.service...
[    5.891718] systemd[1]: Started mdmonitor.service.
[    5.892570] systemd[1]: mdmonitor.service: Main process exited, code=exited, status=1/FAILURE
[    5.892618] systemd[1]: mdmonitor.service: Failed with result 'exit-code'.

And as we (re)assemble the MD devices multiple times, this gets quite
noisy, especially since we later start hitting the service start rate
limit.

Fedora has the mdmonitor.service patched, so it won't start without
/etc/mdadm.conf being present, but Arch uses the upstream unit which
doesn't have such guard.

Let's just mask the service completely, which replaces all that noise
with one warning:

[    6.553583] testsuite-64.sh[294]: + udevadm wait --settle ...
[    6.580700] systemd[1]: sys-devices-virtual-block-md127.device: Failed to enqueue SYSTEMD_WANTS job, ignoring: Unit mdmonitor.service is masked.

6 months agoman: make minor corrections to smbios-type-11(7)
Will Springer [Tue, 12 Dec 2023 22:27:21 +0000 (14:27 -0800)] 
man: make minor corrections to smbios-type-11(7)

- Correct initial version of io.systemd.credential* to 252
- Fix leftover copy-pasted heading

6 months agodissect-tool: right-align the partition number
Lennart Poettering [Mon, 4 Dec 2023 17:07:18 +0000 (18:07 +0100)] 
dissect-tool: right-align the partition number

The right-alignment was applied to the wrong column, because neither
ee8e497d249ab2e2df92aa024274f5b817270114 nor
1474d7ac2d308204e599a2502a8b5625bca76bcc updated the column count as
they should have.

6 months agoopenssl-util: avoid freeing invalid pointer
David Tardon [Tue, 12 Dec 2023 14:47:33 +0000 (15:47 +0100)] 
openssl-util: avoid freeing invalid pointer

6 months agodissect-image: move comment to right place 30453/head
Lennart Poettering [Mon, 4 Dec 2023 17:28:45 +0000 (18:28 +0100)] 
dissect-image: move comment to right place

The image name is extracted from the image path originally passed in,
i.e. not the contents of the image. And the image UUID is directly
retrieved from the partition table, hence also not from the contents.
Let's hence move the comment to separate out the stuff extract from the
file systems (and thus only available when mounting/with privs/with
block devices) from the data available without any of that.

6 months agodissect-image: fix fd leak in dissected_image_acquire_metadata()
Lennart Poettering [Mon, 4 Dec 2023 17:21:23 +0000 (18:21 +0100)] 
dissect-image: fix fd leak in dissected_image_acquire_metadata()

We have to go through the "finish" label to properly close all pipes in
the error path, so that we don't leak them.

6 months agodissect-image: don't try to validate an extension release file with no image name
Lennart Poettering [Mon, 4 Dec 2023 17:20:36 +0000 (18:20 +0100)] 
dissect-image: don't try to validate an extension release file with no image name

Otherwise we might validate the OS release file instead…

6 months agodissect-image: handle 'continue' event in metadata acquisition uniformly
Lennart Poettering [Mon, 4 Dec 2023 17:19:27 +0000 (18:19 +0100)] 
dissect-image: handle 'continue' event in metadata acquisition uniformly

Let's jump to the same label in all cases, that closes the associated
pipe, systematically.

6 months agodissect-image: path[] is now defined for all metadata fields
Lennart Poettering [Mon, 4 Dec 2023 17:18:48 +0000 (18:18 +0100)] 
dissect-image: path[] is now defined for all metadata fields

There's no point in handling a case that never can happen.

6 months agoexecute: improve log message about TTY ownership reset failures
Lennart Poettering [Wed, 6 Dec 2023 15:38:53 +0000 (16:38 +0100)] 
execute: improve log message about TTY ownership reset failures

6 months agotest-network: add test for ManageForeignNextHops=no 30433/head
Yu Watanabe [Mon, 11 Dec 2023 18:13:09 +0000 (03:13 +0900)] 
test-network: add test for ManageForeignNextHops=no

6 months agotest-network: reduce indent for verification
Yu Watanabe [Mon, 11 Dec 2023 18:10:28 +0000 (03:10 +0900)] 
test-network: reduce indent for verification

6 months agotest-network: drop redundant call of tearDown()
Yu Watanabe [Mon, 11 Dec 2023 18:16:49 +0000 (03:16 +0900)] 
test-network: drop redundant call of tearDown()

6 months agonetwork/nexthop: introduce ManageForeignNextHops= boolean setting
Yu Watanabe [Mon, 11 Dec 2023 17:29:25 +0000 (02:29 +0900)] 
network/nexthop: introduce ManageForeignNextHops= boolean setting

Closes #29034.

6 months agotest: "never" is not a valid value for Restart=
Frantisek Sumsal [Tue, 12 Dec 2023 11:43:36 +0000 (12:43 +0100)] 
test: "never" is not a valid value for Restart=

[  154.140565] testsuite-07.sh[1014]: + systemctl start badbin_assert.socket
[  154.738606] testsuite-07.sh[1014]: + socat - ABSTRACT-CONNECT:badbin_assert.socket
[  154.768418] systemd[1]: Cannot find unit for notify message of PID 1021, ignoring.
[  154.812357] systemd[1]: /run/systemd/system/badbin_assert.service:3: Failed to parse service restart specifier, ignoring: never
[  155.347350] testsuite-07.sh[1014]: + timeout 10 sh -c 'while systemctl is-active badbin_assert.service; do sleep .5; done'
[  155.669695] (badbin)[1045]: badbin_assert.service: Failed to execute /tmp/badbin: Exec format error
[  155.676596] systemd[1]: badbin_assert.service: Failed with result 'exit-code'.
[  156.081953] testsuite-07.sh[1051]: failed
[  156.132018] testsuite-07.sh[1054]: ++ systemctl show -P ExecMainStatus badbin_assert.service
[  156.326583] (badbin)[1050]: badbin_assert.service: Failed to execute /tmp/badbin: Exec format error
[  156.343566] systemd[1]: badbin_assert.service: Failed with result 'exit-code'.
[  156.904658] (badbin)[1055]: badbin_assert.service: Failed to execute /tmp/badbin: Exec format error
[  156.913709] systemd[1]: badbin_assert.service: Failed with result 'exit-code'.
[  157.066900] testsuite-07.sh[1014]: + [[ 0 == 203 ]]
[  157.081588] testsuite-07.sh[618]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/testsuite-07.issue-30412.sh failed'

Follow-up for 1eeaa93de36.

6 months agoMerge pull request #30445 from mrc0mmand/networkd-test-skip
Yu Watanabe [Tue, 12 Dec 2023 13:02:44 +0000 (22:02 +0900)] 
Merge pull request #30445 from mrc0mmand/networkd-test-skip

Temporarily skip tests with known issues in the systemd-networkd test suite

6 months agoexecute: handle gracefully if we cannot lock /dev/console when resetting tty due...
Lennart Poettering [Wed, 6 Dec 2023 15:37:18 +0000 (16:37 +0100)] 
execute: handle gracefully if we cannot lock /dev/console when resetting tty due to perms

This is the common case in --user instances, hence handle this
gracefully.

This should be safe since user instances won't get access to
/dev/console-related ttys anyway, but only their own ptys.

6 months agoMerge pull request #30441 from poettering/nspawn-fixlets
Yu Watanabe [Tue, 12 Dec 2023 13:00:35 +0000 (22:00 +0900)] 
Merge pull request #30441 from poettering/nspawn-fixlets

nspawn: two trivial nspawn tweaklets

6 months agoMerge pull request #30437 from YHNdnzj/job-start-msg
Yu Watanabe [Tue, 12 Dec 2023 12:59:34 +0000 (21:59 +0900)] 
Merge pull request #30437 from YHNdnzj/job-start-msg

core/job: emit job start message if we're only waiting for unit state

6 months agohibernate-resume: don't wait forever if hibernate info is from EFI
Mike Yuan [Tue, 12 Dec 2023 08:20:32 +0000 (16:20 +0800)] 
hibernate-resume: don't wait forever if hibernate info is from EFI

6 months agotest: temporarily skip checking NFT sets in test_address_static 30445/head
Frantisek Sumsal [Tue, 12 Dec 2023 11:25:47 +0000 (12:25 +0100)] 
test: temporarily skip checking NFT sets in test_address_static

Until https://github.com/systemd/systemd/issues/30427 is resolved.

6 months agotest: temporarily disable test_sysctl
Frantisek Sumsal [Tue, 12 Dec 2023 11:20:41 +0000 (12:20 +0100)] 
test: temporarily disable test_sysctl

Until https://github.com/systemd/systemd/issues/30056 is resolved.

6 months agonspawn: drop redundant assignments 30441/head
Lennart Poettering [Tue, 12 Dec 2023 10:02:28 +0000 (11:02 +0100)] 
nspawn: drop redundant assignments

6 months agonspawn: suffix some paths in log messages with /, as per coding style
Lennart Poettering [Tue, 12 Dec 2023 09:58:56 +0000 (10:58 +0100)] 
nspawn: suffix some paths in log messages with /, as per coding style

6 months agoMerge pull request #30156 from yuwata/network-mtu
Yu Watanabe [Tue, 12 Dec 2023 10:03:21 +0000 (19:03 +0900)] 
Merge pull request #30156 from yuwata/network-mtu

network: accept arbitrary size of MTU in .network

6 months agoMerge pull request #30426 from mrc0mmand/nft-shenanigans
Yu Watanabe [Tue, 12 Dec 2023 09:56:57 +0000 (18:56 +0900)] 
Merge pull request #30426 from mrc0mmand/nft-shenanigans

network: show the reason why NFT operation failed

6 months agonetwork: actually show the unexpected flags
Frantisek Sumsal [Mon, 11 Dec 2023 15:16:02 +0000 (16:16 +0100)] 
network: actually show the unexpected flags

The original version would yield a slightly _unexpected_ message for
this [Address] section:

[Address]
Address=10.9.3.1/24
HomeAddress=yes
ManageTemporaryAddress=yes

systemd-networkd[68396]: /run/systemd/network/25-address-static.network: unexpected address flags "n/a" were configured. Ignoring [Address] section from line 144.

Let's instead show the unexpected flags:

systemd-networkd[69160]: /run/systemd/network/25-address-static.network: unexpected address flags "home-address,manage-temporary-address" were configured. Ignoring [Address] section from line 144.

6 months agocore/job: emit job start message if we're only waiting for unit state 30437/head
Mike Yuan [Tue, 12 Dec 2023 08:33:13 +0000 (16:33 +0800)] 
core/job: emit job start message if we're only waiting for unit state

Currently, start/stop messages for device units are not used, since
job_perform_on_unit() does nothing and we simply wait for unit status
change. I think we still want some nice log messages explaining what
the start jobs for devices are doing, so let's fix this.

6 months agocore/device: add stopping job message
Mike Yuan [Tue, 12 Dec 2023 08:42:19 +0000 (16:42 +0800)] 
core/device: add stopping job message

The use case for stopping a device unit is indeed narrow,
but we still want to show a clear message.

Preparation for later commits.

6 months agopo: Translated using Weblate (Turkish)
Oğuz Ersen [Mon, 11 Dec 2023 13:43:51 +0000 (14:43 +0100)] 
po: Translated using Weblate (Turkish)

Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/main