]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoman: various issues reported in #22432 22608/head
Zbigniew Jędrzejewski-Szmek [Tue, 22 Feb 2022 21:54:23 +0000 (22:54 +0100)] 
man: various issues reported in #22432

Fixes #22432.

3 years agoman/systemd-network: reword descriptions of DHCPPrefixDelegation= and dst-host
Zbigniew Jędrzejewski-Szmek [Tue, 22 Feb 2022 21:56:10 +0000 (22:56 +0100)] 
man/systemd-network: reword descriptions of DHCPPrefixDelegation= and dst-host

3 years agoman/systemd-analyze: split out example to a separate section
Zbigniew Jędrzejewski-Szmek [Tue, 22 Feb 2022 21:55:42 +0000 (22:55 +0100)] 
man/systemd-analyze: split out example to a separate section

It turns out we can't have an Example nested in a list, and every
combination of nesting I tried looked bad either in troff or in html.
The whole example is moved to a separate section.

3 years agoman: adjust command for Fedora installations
Zbigniew Jędrzejewski-Szmek [Thu, 17 Feb 2022 19:34:14 +0000 (20:34 +0100)] 
man: adjust command for Fedora installations

glibc now has Suggests:glibc-minimal-langpack, so we don't
need to mention it ourselves.

--repo=… is a nicer alternative to --disablerepo=* --enablerepo=….
It also avoids the issue with quoting.

Let's exclude weak deps, but install systemd-networkd, so the container
can configure networking if necessary.

3 years agoudev-util: add parentheses to make coverity silent
Yu Watanabe [Fri, 18 Feb 2022 05:06:31 +0000 (14:06 +0900)] 
udev-util: add parentheses to make coverity silent

Fixes CID#1474365.

3 years agohwdb: 60-keyboard: Support the buttons on CZC P10T tablet
Lubomir Rintel [Sat, 21 Jul 2018 22:25:51 +0000 (00:25 +0200)] 
hwdb: 60-keyboard: Support the buttons on CZC P10T tablet

The machine has tree buttons connected to an EC that acts as a regular
AT-compatible keyboard controller. It can be either in "Windows 7" or
"Android" mode. It boots up with the earlier, but the Android build on
the tablet switches it on bootup (Windows presumably leaves it as-is).

The "Windows 7" mode, the behavior is very inconvenient: the Home button
emits multiple key presses that presumably do something in Windws 7 while
the second button toggles the RF Kill Switch in addition to producing a
scancode (it's labeled "Back" on Android version of the tablet).

The "Android" mode just sends the good ol' scan codes and this patch
handles them. On mainline Linux, the "x86-android-tablets" driver makes
sure we're in the correct mode.

3 years agomkosi: Add more packages required to run systemd-networkd-tests.py
Daan De Meyer [Thu, 17 Feb 2022 15:41:58 +0000 (15:41 +0000)] 
mkosi: Add more packages required to run systemd-networkd-tests.py

Let's also add the required packages to run systemd-networkd-tests.py
for Ubuntu and Debian. The Fedora and Arch lists are also updated to
include python which is also required to run the tests.

3 years agoMerge pull request #22545 from yuwata/network-match-kind
Yu Watanabe [Thu, 17 Feb 2022 16:20:18 +0000 (01:20 +0900)] 
Merge pull request #22545 from yuwata/network-match-kind

network, udev: introduce Kind= setting in [Match] section

3 years agopackit: drop unnumbered patches as well
Frantisek Sumsal [Thu, 17 Feb 2022 13:02:04 +0000 (14:02 +0100)] 
packit: drop unnumbered patches as well

3 years agotest: set `ReadWritePaths=` only for units from TEST-20
Frantisek Sumsal [Wed, 16 Feb 2022 14:55:09 +0000 (15:55 +0100)] 
test: set `ReadWritePaths=` only for units from TEST-20

as setting it system-wide has some undesirable side-effects.

Follow-up to b6fc524.

3 years agonetwork,udev/net: add Kind= settings in [Match] section 22545/head
Yu Watanabe [Thu, 17 Feb 2022 12:06:12 +0000 (21:06 +0900)] 
network,udev/net: add Kind= settings in [Match] section

This may be useful for writing .network or .link files matching with
virtual interfaces.

Closes #22541.

3 years agoMerge pull request #22540 from yuwata/network-call-ethtool-after-initialized
Yu Watanabe [Thu, 17 Feb 2022 13:59:24 +0000 (22:59 +0900)] 
Merge pull request #22540 from yuwata/network-call-ethtool-after-initialized

network: call ethtool after link is initialized by udevd

3 years agoresolve: refuse AF_UNSPEC when resolving address
Yu Watanabe [Fri, 11 Feb 2022 00:49:13 +0000 (09:49 +0900)] 
resolve: refuse AF_UNSPEC when resolving address

Fixes #22480.

3 years agonetworkctl: show netdev kind
Yu Watanabe [Thu, 17 Feb 2022 12:14:36 +0000 (21:14 +0900)] 
networkctl: show netdev kind

3 years agonetwork: call ethtool after link is initialized by udevd 22540/head
Yu Watanabe [Wed, 16 Feb 2022 20:24:26 +0000 (05:24 +0900)] 
network: call ethtool after link is initialized by udevd

Fixes #22538.

3 years agonetwork: use udev_available() where applicable
Yu Watanabe [Thu, 17 Feb 2022 09:55:24 +0000 (18:55 +0900)] 
network: use udev_available() where applicable

3 years agoudev-util: introduce udev_available() helper function
Yu Watanabe [Thu, 17 Feb 2022 09:47:26 +0000 (18:47 +0900)] 
udev-util: introduce udev_available() helper function

3 years agoMerge pull request #22535 from poettering/dbusctl-range-display
Yu Watanabe [Thu, 17 Feb 2022 07:45:39 +0000 (16:45 +0900)] 
Merge pull request #22535 from poettering/dbusctl-range-display

userdbctl: show UID ranges in output too

3 years agosd-dhcp-server: do not offer server address
Yu Watanabe [Wed, 16 Feb 2022 15:49:21 +0000 (00:49 +0900)] 
sd-dhcp-server: do not offer server address

The server address may be in the pool.

3 years agoMerge pull request #22543 from poettering/logind-fix-bus-bool-prop
Yu Watanabe [Thu, 17 Feb 2022 07:44:51 +0000 (16:44 +0900)] 
Merge pull request #22543 from poettering/logind-fix-bus-bool-prop

logind: fix some sd-bus int/bool/unsigned mixups

3 years agouserdbctl: add a dash of color to users of different dispositions 22535/head
Lennart Poettering [Wed, 16 Feb 2022 14:51:53 +0000 (15:51 +0100)] 
userdbctl: add a dash of color to users of different dispositions

3 years agouserdbctl: show min/max UID boundaries in userdbctl output
Lennart Poettering [Wed, 16 Feb 2022 14:51:20 +0000 (15:51 +0100)] 
userdbctl: show min/max UID boundaries in userdbctl output

3 years agologind: fix bool/int confusion for KillUserProcesses bus property 22543/head
Lennart Poettering [Wed, 16 Feb 2022 21:58:19 +0000 (22:58 +0100)] 
logind: fix bool/int confusion for KillUserProcesses bus property

sd-bus for compat with old C expects "int" for booleans. Internally we
prefer to use C99 "bool" however. When pointing a pointer to it, we need
to handle the fact that they are typically differently sized, hence use
te right accessors for it.

3 years agologind: fix internal types used for EnableWallMessages
Lennart Poettering [Wed, 16 Feb 2022 21:56:47 +0000 (22:56 +0100)] 
logind: fix internal types used for EnableWallMessages

The value is used as a boolean, but stored in an unsigned. It's exposed
with sd-bus default boolean handling which however expects a (signed)
int. Let's clear this up, and use "bool" for this everywhere in
non-local scope, and make sure that when we pass it to sd-bus we
properly pass an "int".

3 years agouser-util: move homed/nspawn map UID_MIN/UID_MAX define into user-util.h
Lennart Poettering [Wed, 16 Feb 2022 13:53:57 +0000 (14:53 +0100)] 
user-util: move homed/nspawn map UID_MIN/UID_MAX define into user-util.h

Let's have them at a common place, so that we have the ranges altogether
at a minimal set of places.

3 years agoglyph-util: add new glyphs for up/down arrows
Lennart Poettering [Wed, 16 Feb 2022 13:53:34 +0000 (14:53 +0100)] 
glyph-util: add new glyphs for up/down arrows

3 years agoMerge pull request #22531 from poettering/mempcpy-cocci
Lennart Poettering [Wed, 16 Feb 2022 21:20:33 +0000 (22:20 +0100)] 
Merge pull request #22531 from poettering/mempcpy-cocci

coccinelle: add semantic patch for using more mempcpy() instead of memcpy()

3 years agoRevert "resolved: filter out our own stub resolvers when parsing servers"
Lennart Poettering [Wed, 2 Feb 2022 14:45:59 +0000 (15:45 +0100)] 
Revert "resolved: filter out our own stub resolvers when parsing servers"

This reverts commit 0ad4efb14beea9148838a0d974821e3b98cafc47.

See
https://github.com/systemd/systemd/pull/20559#issuecomment-1028011030
for reasoning. Quoting:

> I think it should be OK to advertise extra stub listeners to local
> clients, but you prohibit this now. i.e. there are two different
> concepts here, and we shouldn't mix them up:
>
> 1. tracking configured dns servers and advertise them to local programs
> 2. actually using them ourselves
>
> I am pretty sure that our own stubs are OK for 1 but not OK for 2,
> hence we should filter at the time of use not at the time of parse.

3 years agoMerge pull request #22498 from yuwata/cgroup-threaded-mode
Luca Boccassi [Wed, 16 Feb 2022 18:59:06 +0000 (18:59 +0000)] 
Merge pull request #22498 from yuwata/cgroup-threaded-mode

cgroup: ignore error in attaching process when threaded mode is used

3 years agovirt: Fix Xen Dom0 detection logic to no longer report as VM
Richard Neill [Wed, 2 Feb 2022 18:18:46 +0000 (18:18 +0000)] 
virt: Fix Xen Dom0 detection logic to no longer report as VM

Fixes regression introduced in 599be274c13c503806c85073d7beb1a155ac27bd

Moving the Xen check before the CPUID check, in order to handle the case where
a Xen domain is nested within a hypervisor which can be detected by via the
CPUID check, had an unintended consequence of causing Dom0 to report as a Xen
VM when it is not nested.

This patch stops further checks once it has been determined that Dom0 is not
nested within another hypervisor, meaning that the non-nested case matches its
previous logic (where it does not report as a VM).

Also, tidy the conditionals for the Xen and UML checks by removing handling of
a VIRTUALIZATION_VM_OTHER result, which has no code path.

Fixes #22511

3 years agotree-wide: some coccinelle fixes 22531/head
Lennart Poettering [Wed, 16 Feb 2022 10:50:48 +0000 (11:50 +0100)] 
tree-wide: some coccinelle fixes

3 years agococcinelle: automatically switch some uses of memcpy() → mempcpy()
Lennart Poettering [Wed, 16 Feb 2022 09:52:51 +0000 (10:52 +0100)] 
coccinelle: automatically switch some uses of memcpy() → mempcpy()

Inspired by #22520, let's add a coccinelle script that converts this
automatically.

3 years agotimesync: add missing setting in template
Yu Watanabe [Wed, 16 Feb 2022 14:14:39 +0000 (23:14 +0900)] 
timesync: add missing setting in template

Follow-up for e81a44bf5faa80ec6ca2ef835d559a65c7e27c35.

3 years agoMerge pull request #22526 from poettering/homed-container-uid-range
Lennart Poettering [Wed, 16 Feb 2022 15:36:25 +0000 (16:36 +0100)] 
Merge pull request #22526 from poettering/homed-container-uid-range

homed: map container UID range for homed home directories

3 years agoMerge pull request #22502 from yuwata/udev-net-virtual-wlan-interface
Yu Watanabe [Wed, 16 Feb 2022 14:03:52 +0000 (23:03 +0900)] 
Merge pull request #22502 from yuwata/udev-net-virtual-wlan-interface

network: add virtual wlan interface support

3 years agoMerge pull request #22520 from yuwata/sd-dhcp6-client-cosmetic-follow-ups
Yu Watanabe [Wed, 16 Feb 2022 14:02:51 +0000 (23:02 +0900)] 
Merge pull request #22520 from yuwata/sd-dhcp6-client-cosmetic-follow-ups

sd-dhcp6-client: several cosmetic follow-ups

3 years agoMerge pull request #22271 from keszybz/manager-reexec-freeze
Yu Watanabe [Wed, 16 Feb 2022 14:02:21 +0000 (23:02 +0900)] 
Merge pull request #22271 from keszybz/manager-reexec-freeze

Freeze manager if reexec fails

3 years agoNEWS: update excerpt on container UID/GID mappings 22526/head
Lennart Poettering [Tue, 15 Feb 2022 21:40:34 +0000 (22:40 +0100)] 
NEWS: update excerpt on container UID/GID mappings

3 years agodocs: document homed's use of the container UID mapping
Lennart Poettering [Tue, 15 Feb 2022 21:40:29 +0000 (22:40 +0100)] 
docs: document homed's use of the container UID mapping

3 years agohomed: when using id mapping on the home dirs, also do an identity mapping for the...
Lennart Poettering [Tue, 15 Feb 2022 17:22:37 +0000 (18:22 +0100)] 
homed: when using id mapping on the home dirs, also do an identity mapping for the container UID ranges

Apparently people really want to put high UIDs in their homedirs. Let's
add some minimal support for that.

Further discussion: https://github.com/systemd/systemd/pull/22239#issuecomment-1040421552

Inspired by, based on, and replacing #22239 by Christian Brauner.

3 years agoTODO
Lennart Poettering [Wed, 16 Feb 2022 09:53:54 +0000 (10:53 +0100)] 
TODO

3 years agoman: fix virtualization table
Lennart Poettering [Wed, 16 Feb 2022 09:14:59 +0000 (10:14 +0100)] 
man: fix virtualization table

The count of VM types got out of sync, let's fix that.

Follow-up for b6eca3731dd92b009b182f188936e1c2544574da which forgot to
increase the count by one.

3 years agosd-dhcp6-client: use mempcpy() or mempcpy_safe() 22520/head
Yu Watanabe [Tue, 15 Feb 2022 14:51:28 +0000 (23:51 +0900)] 
sd-dhcp6-client: use mempcpy() or mempcpy_safe()

3 years agomemory-util: introdyce mempcpy_safe()
Yu Watanabe [Tue, 15 Feb 2022 14:50:14 +0000 (23:50 +0900)] 
memory-util: introdyce mempcpy_safe()

3 years agodhcp-identifier: use offsetof()
Yu Watanabe [Tue, 15 Feb 2022 14:43:15 +0000 (23:43 +0900)] 
dhcp-identifier: use offsetof()

Also use appropriate place to store UUID.

3 years agomanager: add {} around cpu sets, use range formatting 22271/head
Zbigniew Jędrzejewski-Szmek [Wed, 16 Feb 2022 07:07:02 +0000 (08:07 +0100)] 
manager: add {} around cpu sets, use range formatting

We would print "Setting NUMA policy to bind, with nodes .".
This is not very clear, change it to "… with nodes {}.".

Also use range formatting for masks to make output shorter.

3 years agomanager: add few ", ignoring" and adjust level in one message
Zbigniew Jędrzejewski-Szmek [Tue, 15 Feb 2022 15:23:04 +0000 (16:23 +0100)] 
manager: add few ", ignoring" and adjust level in one message

3 years agoMerge pull request #22523 from DaanDeMeyer/systemd-networkd-tests-fixes
Yu Watanabe [Wed, 16 Feb 2022 07:04:14 +0000 (16:04 +0900)] 
Merge pull request #22523 from DaanDeMeyer/systemd-networkd-tests-fixes

mkosi: Support running systemd-networkd-tests.py in QEMU

3 years agocore/execute: warn when threaded mode is detected 22498/head
Yu Watanabe [Sun, 13 Feb 2022 11:52:53 +0000 (20:52 +0900)] 
core/execute: warn when threaded mode is detected

Prompted by #22486.

3 years agocgroup-util: introduce cg_is_threaded()
Yu Watanabe [Sun, 13 Feb 2022 11:39:04 +0000 (20:39 +0900)] 
cgroup-util: introduce cg_is_threaded()

3 years agotests: allow running all the services with SYSTEMD_LOG_LEVEL
Evgeny Vereshchagin [Tue, 15 Feb 2022 01:13:10 +0000 (01:13 +0000)] 
tests: allow running all the services with SYSTEMD_LOG_LEVEL

It should make it easier to figure out what exactly services do there.
For example, with SYSTEMD_LOG_LEVEL=debug userdbd (v249) prints
```
varlink-5: New incoming message: {"method":"io.systemd.UserDatabase.GetUserRecord","parameters":{}}
```
before it crashes and systemd-resolved prints
```
varlink-21: New incoming message: {"method":"io.systemd.Resolve.ResolveAddress","parameters":{"address":[127,0,0,1],"flags":0,"ifindex":1000000,"family":0}}
```
and those messages are helpful (especially when scripts causing them
aren't clever enough to keep track of random stuff they send to systemd
:-))

3 years agotest: Prefix all network/netdev config files used by systemd-networkd-tests.py 22523/head
Daan De Meyer [Tue, 15 Feb 2022 17:58:15 +0000 (17:58 +0000)] 
test: Prefix all network/netdev config files used by systemd-networkd-tests.py

Let's make sure these take preference over any generic network config files shipped
by the OS (in this case specifically, mkosi).

3 years agotest: Skip test_macsec() until kernel panic is fixed
Daan De Meyer [Tue, 15 Feb 2022 21:56:10 +0000 (21:56 +0000)] 
test: Skip test_macsec() until kernel panic is fixed

3 years agomkosi: Support running systemd-networkd-tests.py in QEMU
Daan De Meyer [Tue, 15 Feb 2022 18:02:36 +0000 (18:02 +0000)] 
mkosi: Support running systemd-networkd-tests.py in QEMU

This commit adds the necessary packages for Fedora and Arch.

3 years agodocs: Correct WantedBy= regarding template units
Max Gautier [Sun, 13 Feb 2022 14:16:05 +0000 (15:16 +0100)] 
docs: Correct WantedBy= regarding template units

3 years agosd-dhcp6-client: add comment about ia_na and ia_pd
Yu Watanabe [Tue, 15 Feb 2022 14:36:45 +0000 (23:36 +0900)] 
sd-dhcp6-client: add comment about ia_na and ia_pd

3 years agotest: Stop using TextTestRunner in systemd-networkd-tests.py
Daan De Meyer [Tue, 15 Feb 2022 11:50:31 +0000 (11:50 +0000)] 
test: Stop using TextTestRunner in systemd-networkd-tests.py

If we assign our own test runner, passing arguments stops working
as unittest won't instantiate its own test runner after it parses
the arguments from sys.argv.

Consequence is that the tests will write to stderr now instead of
stdout since it doesn't seem possible to configure the stream that
unittest.main() will instantiate its test runner with so it'll
default to sys.stderr.

3 years agonetwork: add support to create wlan virtual interface 22502/head
Yu Watanabe [Mon, 14 Feb 2022 17:09:21 +0000 (02:09 +0900)] 
network: add support to create wlan virtual interface

Closes #18977.

3 years agoMerge pull request #22516 from keszybz/bit-and-pieces
Lennart Poettering [Tue, 15 Feb 2022 14:20:16 +0000 (15:20 +0100)] 
Merge pull request #22516 from keszybz/bit-and-pieces

Post-review fixups and other tiny improvements

3 years agoRevert "man: fix description of --force in halt(8) (#7392)"
Ludwig Nussel [Tue, 15 Feb 2022 10:49:26 +0000 (11:49 +0100)] 
Revert "man: fix description of --force in halt(8) (#7392)"

This reverts commit 5d9adb5b60b815b477ba9e6b19ef0fd7e1854a38.

3 years agoMerge pull request #22412 from yuwata/sd-dhcp6-client-cleanups
Lennart Poettering [Tue, 15 Feb 2022 13:18:55 +0000 (14:18 +0100)] 
Merge pull request #22412 from yuwata/sd-dhcp6-client-cleanups

sd-dhcp6-client: several fixes and cleanups

3 years agomanager: if we are reexecuting, do not invoke any fallbacks
Zbigniew Jędrzejewski-Szmek [Thu, 27 Jan 2022 14:03:27 +0000 (15:03 +0100)] 
manager: if we are reexecuting, do not invoke any fallbacks

For https://bugzilla.redhat.com/show_bug.cgi?id=1986176:
if we are trying to reexecute, and this fails for any reason, we shouldn't
try to execute /sbin/init or /bin/sh. It is better to just freeze.
If we freeze it is easier to diagnose what happened, but if we execute
one of the fallbacks, we don't really know what will happen. In particular
the new init might just return, causing the machine to shut down. Or we
may successfully spawn /bin/sh, which could leave the machine open.

3 years agomanager: do not ignore the return value from the main loop
Zbigniew Jędrzejewski-Szmek [Thu, 27 Jan 2022 13:14:24 +0000 (14:14 +0100)] 
manager: do not ignore the return value from the main loop

If manager_loop() fails, we would print an error message, but then actually
ignore the error in main(), and potentially execute the shutdown binary.
I'm not sure how likely this is to happen in practice, but it seems sloppy.
So let's do the cleanup, but actually freeze() if manager_loop() returned
an error.

invoke_main_loop() is refactored to return the manager objective. This way
we don't need to pass a separate parameter to specify whether we are
reexecuting. Subsequent patch will make further use of the returned objective.

3 years agohomework: avoid runtime formatting of a fixed string 22516/head
Zbigniew Jędrzejewski-Szmek [Tue, 15 Feb 2022 09:50:43 +0000 (10:50 +0100)] 
homework: avoid runtime formatting of a fixed string

Follow-up for fe9bd5ad3670f6a34f9ea9b4e2c16bec6000ce11.
I checked that the formatted string has the same dashes as
before fe9bd5ad3670f6a34f9ea9b4e2c16bec6000ce11.

3 years agoshare/gpt: add stringified defines for GPT partition types
Zbigniew Jędrzejewski-Szmek [Tue, 15 Feb 2022 09:46:35 +0000 (10:46 +0100)] 
share/gpt: add stringified defines for GPT partition types

3 years agoNEWS: minor grammar adjustment
Zbigniew Jędrzejewski-Szmek [Tue, 15 Feb 2022 09:30:35 +0000 (10:30 +0100)] 
NEWS: minor grammar adjustment

Follow-up for e41dcb822167116c8924e56b39640536df894bbd.

3 years agosystemctl: expand error message
Zbigniew Jędrzejewski-Szmek [Sun, 13 Feb 2022 11:11:52 +0000 (12:11 +0100)] 
systemctl: expand error message

3 years agodocs: more internal links
Zbigniew Jędrzejewski-Szmek [Fri, 21 Jan 2022 12:26:56 +0000 (13:26 +0100)] 
docs: more internal links

3 years agowifi-util: introduce nl80211_iftype_from_string()
Yu Watanabe [Sun, 13 Feb 2022 18:19:29 +0000 (03:19 +0900)] 
wifi-util: introduce nl80211_iftype_from_string()

3 years agonetwork: manage WLAN phy
Yu Watanabe [Mon, 14 Feb 2022 17:06:29 +0000 (02:06 +0900)] 
network: manage WLAN phy

3 years agonetwork: netdev: add flag to skip kind check
Yu Watanabe [Mon, 14 Feb 2022 19:24:44 +0000 (04:24 +0900)] 
network: netdev: add flag to skip kind check

It will be used in later commit.

3 years agonetwork: netdev: use request queue to create independent netdevs
Yu Watanabe [Mon, 14 Feb 2022 18:28:18 +0000 (03:28 +0900)] 
network: netdev: use request queue to create independent netdevs

3 years agonetwork: netdev: increment reference counter on request
Yu Watanabe [Mon, 14 Feb 2022 18:26:16 +0000 (03:26 +0900)] 
network: netdev: increment reference counter on request

Otherwise, it may be freed on reload.

3 years agonetwork: netdev: make netdev_is_ready_to_create() return negative errno on fatal...
Yu Watanabe [Mon, 14 Feb 2022 18:24:27 +0000 (03:24 +0900)] 
network: netdev: make netdev_is_ready_to_create() return negative errno on fatal error

3 years agonetwork: rename REQUEST_TYPE_STACKED_NETDEV -> REQUEST_TYPE_NETDEV_STACKED
Yu Watanabe [Mon, 14 Feb 2022 17:20:36 +0000 (02:20 +0900)] 
network: rename REQUEST_TYPE_STACKED_NETDEV -> REQUEST_TYPE_NETDEV_STACKED

3 years agomeson: sort listed files
Yu Watanabe [Mon, 14 Feb 2022 17:05:06 +0000 (02:05 +0900)] 
meson: sort listed files

3 years agotest: set `ReadWritePaths=$BUILD_DIR` when running w/ coverage
Frantisek Sumsal [Mon, 14 Feb 2022 19:19:51 +0000 (20:19 +0100)] 
test: set `ReadWritePaths=$BUILD_DIR` when running w/ coverage

otherwise units using `DynamicUser=yes` won't be able to write the
coverage stats (currently affecting TEST-20-MAINPIDGAMES).

`DynamicUser=yes` implies `ProtectSystem=strict` and
`ProtectHome=read-only` and can't be overridden hence we need to
utilize `ReadWritePaths=` to work around that.

3 years agoMerge pull request #22487 from poettering/bootspec-source-flags
Yu Watanabe [Mon, 14 Feb 2022 19:45:59 +0000 (04:45 +0900)] 
Merge pull request #22487 from poettering/bootspec-source-flags

bootctl: show all discovered entries, but show state + type in details

3 years agoMerge pull request #22508 from poettering/stat-ino-compare
Yu Watanabe [Mon, 14 Feb 2022 19:45:31 +0000 (04:45 +0900)] 
Merge pull request #22508 from poettering/stat-ino-compare

stat-util: add new stat_inode_same() helper

3 years agoMerge pull request #22507 from poettering/id128-compare-tweaks
Yu Watanabe [Mon, 14 Feb 2022 19:40:53 +0000 (04:40 +0900)] 
Merge pull request #22507 from poettering/id128-compare-tweaks

sd-id128: comparison tweaks

3 years agodocs: make clear that if you use threaded cgroups you need to do that two levels...
Lennart Poettering [Mon, 14 Feb 2022 17:05:31 +0000 (18:05 +0100)] 
docs: make clear that if you use threaded cgroups you need to do that two levels down from your delegated cgroup

Prompted by: #22486

3 years agosd-daemon: use path_join() instead of manual path concat 22508/head
Lennart Poettering [Mon, 14 Feb 2022 16:23:35 +0000 (17:23 +0100)] 
sd-daemon: use path_join() instead of manual path concat

3 years agocoredump: fix inode check
Lennart Poettering [Mon, 14 Feb 2022 16:22:27 +0000 (17:22 +0100)] 
coredump: fix inode check

When checking if we look at the root directory we actually need to
compare both st_dev *and* st_ino. The existing check only checked the
latter. Fix that.

3 years agofd-util: use ERRNO_IS_XYZ() macros where appropriate
Lennart Poettering [Mon, 14 Feb 2022 16:22:18 +0000 (17:22 +0100)] 
fd-util: use ERRNO_IS_XYZ() macros where appropriate

3 years agotree-wide: port various places over to new stat_inode_same() helper
Lennart Poettering [Mon, 14 Feb 2022 16:21:41 +0000 (17:21 +0100)] 
tree-wide: port various places over to new stat_inode_same() helper

3 years agostat-util: add helper stat_inode_same() for comparing stat's st_dev/st_ino in one
Lennart Poettering [Mon, 14 Feb 2022 16:18:32 +0000 (17:18 +0100)] 
stat-util: add helper stat_inode_same() for comparing stat's st_dev/st_ino in one

We do this all over the place, hence let's add a simple helper that does
this and particularly carefully and thoroughly.

3 years agoMerge pull request #22506 from poettering/devnum-zero-btrfs-block-dev
Luca Boccassi [Mon, 14 Feb 2022 16:17:04 +0000 (16:17 +0000)] 
Merge pull request #22506 from poettering/devnum-zero-btrfs-block-dev

gpt-auto: some (primarily cosmetic) fixes to backing block device detection in gpt-auto-generator/sd-device

3 years agoMerge pull request #22445 from lnussel/logind
Luca Boccassi [Mon, 14 Feb 2022 16:16:39 +0000 (16:16 +0000)] 
Merge pull request #22445 from lnussel/logind

logind: post review fixes

3 years agobootspec: avoid zero size VLA 22487/head
Lennart Poettering [Fri, 11 Feb 2022 21:36:00 +0000 (22:36 +0100)] 
bootspec: avoid zero size VLA

apparently some checkers don't like that. Let's be entirely safe here,
and use malloc() based allocation, given that the entries are user
controlled.

3 years agoboot: suppress XBOOTLDR if same device as ESP when enumerating entries
Lennart Poettering [Fri, 11 Feb 2022 21:23:37 +0000 (22:23 +0100)] 
boot: suppress XBOOTLDR if same device as ESP when enumerating entries

On my local system I linked up the ESP and XBOOTLDR partitions, and
ended up with duplicate entries being listed. Try hard to detect that
and only enumerate entries in the ESP if it turns out that both dirs
have the same dev_t.

This should detect both bind mounted and symlinked cases and should make
our list output less confusing.

3 years agobootspec: make sure all return values are initialized on return of find_esp_and_warn()
Lennart Poettering [Fri, 11 Feb 2022 21:19:35 +0000 (22:19 +0100)] 
bootspec: make sure all return values are initialized on return of find_esp_and_warn()

THis makes sure that find_esp_and_warn() + find_xbootldr_and_warn()
follow our usual coding style that on success all return values are
initialized. We got that right in most successful codepaths out of these
functions, but missed the one where the paths are manually overwritten
via env vars.

3 years agobootctl: show more information about boot entry state in list
Lennart Poettering [Fri, 11 Feb 2022 20:15:22 +0000 (21:15 +0100)] 
bootctl: show more information about boot entry state in list

Let's improve display of boot entries and show what type they have (i.e.
boot loader spec type 1, or type 2, or auto-discovered or reported by
boot loader), and in particular mark entries the boot loader discovered
but we can't find (i.e. that likely vanished, or possibly couldn't be
found due to a misconfiguration) and that the boot loader didn't find
but we see (which are new, or possibly also the result of
misconfiguraiton).

This is supposed to be a replacement for #22161, but instead of hiding
vanished entries, highlights them, which I think is more appropriate for
a low-level tool such bootctl.

Replaces: #22161 #22398

3 years agobootspec: also collect/mark the "selected" boot entry (i.e. the one currently booted)
Lennart Poettering [Fri, 11 Feb 2022 13:41:00 +0000 (14:41 +0100)] 
bootspec: also collect/mark the "selected" boot entry (i.e. the one currently booted)

it's helpful and easy, so let's do it

3 years agobootspec: also parse new 'beep' loader.conf variable
Lennart Poettering [Fri, 11 Feb 2022 13:18:18 +0000 (14:18 +0100)] 
bootspec: also parse new 'beep' loader.conf variable

3 years agobootspec: parse/show devicetree-overlay field too
Lennart Poettering [Fri, 11 Feb 2022 13:12:09 +0000 (14:12 +0100)] 
bootspec: parse/show devicetree-overlay field too

It has been defined in the boot loader spec, and is the only field we
currently don't parse, hence fix that.

3 years agoupdate TODO
Lennart Poettering [Fri, 11 Feb 2022 13:05:15 +0000 (14:05 +0100)] 
update TODO

3 years agobootspec: port one more use of basename() to path_extract_filename()
Lennart Poettering [Fri, 11 Feb 2022 13:05:01 +0000 (14:05 +0100)] 
bootspec: port one more use of basename() to path_extract_filename()

3 years agoRevert "bootctl: Ignore boot entries (continue #22041)"
Lennart Poettering [Thu, 3 Feb 2022 15:27:33 +0000 (16:27 +0100)] 
Revert "bootctl: Ignore boot entries (continue #22041)"

3 years agoveritysetup: whitespace fix 22507/head
Lennart Poettering [Mon, 14 Feb 2022 13:59:03 +0000 (14:59 +0100)] 
veritysetup: whitespace fix

3 years agohomed: use SD_ID128_TO_UUID_STRING() at one more place
Lennart Poettering [Mon, 14 Feb 2022 13:56:52 +0000 (14:56 +0100)] 
homed: use SD_ID128_TO_UUID_STRING() at one more place