]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoman: document support for drop-in files in systemd-repart 24294/head
Richard Phibel [Fri, 12 Aug 2022 17:09:07 +0000 (19:09 +0200)] 
man: document support for drop-in files in systemd-repart

3 years agoman: document support for list of definitions directories in systemd-repart
Richard Phibel [Fri, 12 Aug 2022 16:13:30 +0000 (18:13 +0200)] 
man: document support for list of definitions directories in systemd-repart

3 years agorepart: add support for list of definitions directories
Richard Phibel [Thu, 11 Aug 2022 18:20:40 +0000 (20:20 +0200)] 
repart: add support for list of definitions directories

3 years agoMerge pull request #24273 from lnussel/refactor_sysuser_creds
Lennart Poettering [Fri, 12 Aug 2022 12:32:06 +0000 (14:32 +0200)] 
Merge pull request #24273 from lnussel/refactor_sysuser_creds

Refactor sysuser creds

3 years agoMerge pull request #24286 from yuwata/test-sd-device-monitor
Yu Watanabe [Fri, 12 Aug 2022 12:24:40 +0000 (21:24 +0900)] 
Merge pull request #24286 from yuwata/test-sd-device-monitor

test-sd-device-monitor: several fixlets

3 years agosd-device-enumerator: drop noisy log messages
Yu Watanabe [Thu, 11 Aug 2022 18:18:49 +0000 (03:18 +0900)] 
sd-device-enumerator: drop noisy log messages

These are not for failed tasks, and provide almost no information.

3 years agoMerge pull request #24288 from yuwata/sd-device-monitor-fixlets
Yu Watanabe [Fri, 12 Aug 2022 12:23:24 +0000 (21:23 +0900)] 
Merge pull request #24288 from yuwata/sd-device-monitor-fixlets

sd-device-monitor: two fixlets

3 years agorepart: add test for drop-in files
Richard Phibel [Mon, 8 Aug 2022 15:47:22 +0000 (17:47 +0200)] 
repart: add test for drop-in files

3 years agorepart: Add support for drop-in overrides
Richard Phibel [Sat, 6 Aug 2022 13:00:49 +0000 (15:00 +0200)] 
repart: Add support for drop-in overrides

3 years agoconfig-parser: Add list of drop-in files as return argument of config_parse_many
Richard Phibel [Mon, 8 Aug 2022 13:40:46 +0000 (15:40 +0200)] 
config-parser: Add list of drop-in files as return argument of config_parse_many

This will be used to save the list of drop-in files for each partition

3 years agoudev: net_id: Use devicetree aliases when available
Sean Anderson [Tue, 9 Aug 2022 17:38:26 +0000 (13:38 -0400)] 
udev: net_id: Use devicetree aliases when available

Devicetree firmware contains an "aliases" node, containing various
aliases for devices described by the firmware. For ethernet devices,
these are named "ethernet0", "ethernet1", etc. They provide a convenient
means of numbering ethernet devices, especially on systems with no other
stable number other than the address. In particular, U-Boot already uses
these aliases to name its ethernet devices.

Previously, there have been attempts (such as [1]) to add support for
these aliases to Linux. However, these patches have been rejected
because it is the maintainers' view that naming policy be left to
userspace. Well, systemd is userspace, so here we are.

In terms of implementation, apparently there can be multiple device
trees at once. I have decided to dodge this problem for now, and just
use /proc/device-tree. If it is desired to support multiple device trees
later, then the scheme can be modified to include the device tree's
index. For example, /sys/firmware/devicetree/base2/aliases/ethernet3
might be named enb2d3.

For the moment we only support "ethernetX" aliases. Future patches might
want to also handle "canX" and "wifiX".

It is common on boards with only one ethernet device to use an alias of
just "ethernet". In this case, the index is an implicit 0. In case the
author of the firmware made a mistake, we check to ensure that aliases
of "ethernet" and "ethernet0" do not both exist.

[1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/1399390594-1409-1-git-send-email-boris.brezillon@free-electrons.com/

Closes: #17625
3 years agoMerge pull request #24280 from mrc0mmand/fix-semaphore
Luca Boccassi [Thu, 11 Aug 2022 20:29:54 +0000 (21:29 +0100)] 
Merge pull request #24280 from mrc0mmand/fix-semaphore

A couple of Semaphore CI fixes for recent fails

3 years agosd-device-monitor: actually refuse to send invalid devices 24288/head
Yu Watanabe [Thu, 11 Aug 2022 19:19:27 +0000 (04:19 +0900)] 
sd-device-monitor: actually refuse to send invalid devices

Fixes an issue introduced by 9e79123884a36ce095b98d1c0fe247dddf02dbec.

3 years agosd-device-monitor: fix inversed condition
Yu Watanabe [Thu, 11 Aug 2022 19:16:56 +0000 (04:16 +0900)] 
sd-device-monitor: fix inversed condition

Fixes an issue introduced by b3d06b9226db96fddb6bb45a4708e2e8d413d91d.

3 years agotest: do not fill up receiver buffer 24286/head
Yu Watanabe [Thu, 11 Aug 2022 18:02:04 +0000 (03:02 +0900)] 
test: do not fill up receiver buffer

If a system has many devices, then the receiver buffer may be filled up.

Hopefully fixes https://bugzilla.redhat.com/show_bug.cgi?id=2095750

3 years agotest: add fake action and seqnum
Yu Watanabe [Thu, 11 Aug 2022 18:12:03 +0000 (03:12 +0900)] 
test: add fake action and seqnum

Otherwise, the receiver refuses the devices. See device_verify().

3 years agocore/cgroup: CPUWeight/CPUShares support idle input
wineway [Sat, 6 Aug 2022 11:14:44 +0000 (19:14 +0800)] 
core/cgroup: CPUWeight/CPUShares support idle input

Signed-off-by: wineway <wangyuweihx@gmail.com>
3 years agosemaphore: run autopkgtest with sudo 24280/head
Frantisek Sumsal [Thu, 11 Aug 2022 11:36:15 +0000 (13:36 +0200)] 
semaphore: run autopkgtest with sudo

Otherwise it can't access the newly create LXC container:

```
autopkgtest-virt-lxc: DBG: wait_booted: detecting init system failed, retrying...
autopkgtest-virt-lxc: DBG: stderr: lxc-attach: autopkgtest-lxc-trjmpu: tools/lxc_attach.c: main: 302 You lack access to /home/semaphore/.local/share/lxc
```

3 years agodocs: mention qemu fw_cfg size limitation 24273/head
Ludwig Nussel [Wed, 10 Aug 2022 12:21:50 +0000 (14:21 +0200)] 
docs: mention qemu fw_cfg size limitation

3 years agocreds: refactor reading user password
Ludwig Nussel [Tue, 9 Aug 2022 09:07:34 +0000 (11:07 +0200)] 
creds: refactor reading user password

Share code between firstboot and sysusers

3 years agoMerge pull request #24260 from systemd/coverity-update
Evgeny Vereshchagin [Thu, 11 Aug 2022 09:39:53 +0000 (12:39 +0300)] 
Merge pull request #24260 from systemd/coverity-update

ci: fetch the latest Coverity build script

3 years agosemaphore: drop the --keyserver= parameter for the download template
Frantisek Sumsal [Thu, 11 Aug 2022 09:32:21 +0000 (11:32 +0200)] 
semaphore: drop the --keyserver= parameter for the download template

since it's no longer supported/necessary.

See: https://github.com/lxc/lxc/commit/58520263041b6864cadad96278848f9b8ce78ee9

3 years agoci: lint the Coverity script 24260/head
Frantisek Sumsal [Thu, 11 Aug 2022 08:36:02 +0000 (10:36 +0200)] 
ci: lint the Coverity script

as we now use our own custom script for it.

3 years agoci: simplify the Coverity script a bit
Frantisek Sumsal [Tue, 9 Aug 2022 12:43:28 +0000 (14:43 +0200)] 
ci: simplify the Coverity script a bit

Also, address https://github.com/systemd/systemd/pull/24252#issuecomment-1208747320
by using a pre-defined e-mail address stored in the GH Action secrets.

3 years agoresolvctl: only remove protocol after last dot when mangling ifname for resolvconf
exploide [Wed, 10 Aug 2022 15:35:21 +0000 (17:35 +0200)] 
resolvctl: only remove protocol after last dot when mangling ifname for resolvconf

ifname_resolvconf_mangle is supposed to remove protocol suffixes like .dhcp
from interface names. But this removed also valid parts of the ifname like
VLAN IDs, e.g. enp2s0u4.72.dhcp -> enp2s0u4 instead of enp2s0u4.72

After this change, everything behind the last dot is removed instead of the first.

3 years agooomd: notify via dbus what have been killed
Oleg Solovyov [Tue, 2 Aug 2022 07:10:54 +0000 (10:10 +0300)] 
oomd: notify via dbus what have been killed

3 years agocore/scope: Add oom-kill status for scope units (#24269)
gtwang01 [Thu, 11 Aug 2022 03:19:43 +0000 (20:19 -0700)] 
core/scope: Add oom-kill status for scope units (#24269)

Closes #23557.

3 years agoMerge pull request #24264 from DaanDeMeyer/mkosi-dirs
Luca Boccassi [Wed, 10 Aug 2022 19:52:46 +0000 (20:52 +0100)] 
Merge pull request #24264 from DaanDeMeyer/mkosi-dirs

mkosi settings tweaks

3 years agoMerge pull request #24271 from yuwata/oom-log-message-m
Anita Zhang [Wed, 10 Aug 2022 18:02:28 +0000 (11:02 -0700)] 
Merge pull request #24271 from yuwata/oom-log-message-m

oom: drop invalid %m in the log message

3 years agoMerge pull request #24256 from systemd/wip/hadess/greaseweazle
Yu Watanabe [Wed, 10 Aug 2022 13:27:49 +0000 (22:27 +0900)] 
Merge pull request #24256 from systemd/wip/hadess/greaseweazle

hwdb: Add Greaseweazle "drives" to the list of analyzers

3 years agooom: drop invalid %m in the log message 24271/head
Yu Watanabe [Wed, 10 Aug 2022 10:26:42 +0000 (19:26 +0900)] 
oom: drop invalid %m in the log message

Fixes https://github.com/systemd/systemd/issues/23785#issuecomment-1210030100.

3 years agoMerge pull request #23848 from yuwata/core-device-systemd-wants
Lennart Poettering [Wed, 10 Aug 2022 12:43:25 +0000 (14:43 +0200)] 
Merge pull request #23848 from yuwata/core-device-systemd-wants

core: fix SYSTEMD_WANTS and StopWhenUnneeded=

3 years agotree-wide: fix typo
Yu Watanabe [Wed, 10 Aug 2022 10:43:38 +0000 (19:43 +0900)] 
tree-wide: fix typo

3 years agomeson: Test correct efi linker for supported args
Jan Janssen [Tue, 9 Aug 2022 08:32:41 +0000 (10:32 +0200)] 
meson: Test correct efi linker for supported args

Fixes: #24241
3 years agopo: Translated using Weblate (Hungarian)
Balázs Meskó [Tue, 9 Aug 2022 20:19:15 +0000 (22:19 +0200)] 
po: Translated using Weblate (Hungarian)

Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Balázs Meskó <meskobalazs@mailbox.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/hu/
Translation: systemd/main

3 years agomeson: use 'not in'
Yu Watanabe [Tue, 9 Aug 2022 05:48:14 +0000 (14:48 +0900)] 
meson: use 'not in'

Follow-ups for 60f97fee2d2f948c8e8963ea8ff767008cb93cae and
32963344736004e01ff4dd9dca079faabaf58cf2.

3 years agomkosi: Don't use InstallDirectory by default 24264/head
Daan De Meyer [Tue, 9 Aug 2022 18:31:29 +0000 (20:31 +0200)] 
mkosi: Don't use InstallDirectory by default

While this provides some marginal speedup, the disadvantage is
that files are never removed when doing cached builds, which can
sometimes lead to hard to debug issues. So let's not do this by
default.

3 years agomkosi: Use mkosi.output/ as output directory by default
Daan De Meyer [Tue, 9 Aug 2022 18:30:45 +0000 (20:30 +0200)] 
mkosi: Use mkosi.output/ as output directory by default

Better than creating a mess of output files in the root directory.

3 years agoMerge pull request #24222 from yuwata/test-network-units
Frantisek Sumsal [Tue, 9 Aug 2022 17:08:50 +0000 (17:08 +0000)] 
Merge pull request #24222 from yuwata/test-network-units

network: wait for teql netdev before setting qdisc

3 years agosleep: support multiple battery instead of only BAT0
Sonali Srivastava [Wed, 27 Jul 2022 06:23:21 +0000 (11:53 +0530)] 
sleep: support multiple battery instead of only BAT0

3 years agohwdb: Add Greaseweazle "drives" to the list of analyzers 24256/head
Bastien Nocera [Thu, 21 Apr 2022 09:11:22 +0000 (11:11 +0200)] 
hwdb: Add Greaseweazle "drives" to the list of analyzers

They're floppy disk flux readers and writers used in digital
preservation and can be broadly considered to be "analyzers" of magnetic
fluxes.

This will have the intended side-effect of giving access to the device
to users at the console, obsoleting:
https://github.com/keirf/greaseweazle/blob/master/scripts/49-greaseweazle.rules

3 years agohwdb: Allow users access to USB serial for analysers
Bastien Nocera [Tue, 9 Aug 2022 16:09:32 +0000 (18:09 +0200)] 
hwdb: Allow users access to USB serial for analysers

Allow users at the console access to the USB serial interface for USB
analysers.

See 9e2dbfef479060ed850ccdd9cd82d3f0cda2b5c0

3 years agohwdb: analyzers: Clarify the type of devices we want listed
Bastien Nocera [Tue, 9 Aug 2022 16:08:24 +0000 (18:08 +0200)] 
hwdb: analyzers: Clarify the type of devices we want listed

3 years agoNEWS: add entries for v252
Zbigniew Jędrzejewski-Szmek [Tue, 9 Aug 2022 13:21:10 +0000 (15:21 +0200)] 
NEWS: add entries for v252

3 years agotest-network: split out qdisc and wait-online tests from NetworkdNetworkTests 24222/head
Yu Watanabe [Sat, 6 Aug 2022 03:36:41 +0000 (12:36 +0900)] 
test-network: split out qdisc and wait-online tests from NetworkdNetworkTests

3 years agotest-network: split test_qdisc() and test_qdisc2()
Yu Watanabe [Sat, 6 Aug 2022 02:22:06 +0000 (11:22 +0900)] 
test-network: split test_qdisc() and test_qdisc2()

And check module availability in each tests.

This also sorts qdisc tests.

3 years agotest-network: check qdisc feature by module existence
Yu Watanabe [Fri, 5 Aug 2022 23:22:52 +0000 (08:22 +0900)] 
test-network: check qdisc feature by module existence

3 years agotest-network: rename tun99 and tap99
Yu Watanabe [Fri, 5 Aug 2022 22:04:19 +0000 (07:04 +0900)] 
test-network: rename tun99 and tap99

The names seem to be used in AWS.

This also merges test_tun() and test_tap().

3 years agotest-network: show stdout and stderr on failure in check_output()
Yu Watanabe [Fri, 5 Aug 2022 21:40:46 +0000 (06:40 +0900)] 
test-network: show stdout and stderr on failure in check_output()

3 years agotest-network: drop unused text= arguments
Yu Watanabe [Fri, 5 Aug 2022 21:20:28 +0000 (06:20 +0900)] 
test-network: drop unused text= arguments

3 years agotest-network: also run timesyncd under sanitizer or valgrind
Yu Watanabe [Fri, 15 Jul 2022 02:00:29 +0000 (11:00 +0900)] 
test-network: also run timesyncd under sanitizer or valgrind

3 years agotest-network: use timedatectl in build directory
Yu Watanabe [Fri, 15 Jul 2022 00:47:41 +0000 (09:47 +0900)] 
test-network: use timedatectl in build directory

3 years agonetwork/teql: wait for corresponding teql interface to be available
Yu Watanabe [Sat, 6 Aug 2022 03:32:23 +0000 (12:32 +0900)] 
network/teql: wait for corresponding teql interface to be available

3 years agonetwork/qdisc: introduce is_ready() in qdisc vtable
Yu Watanabe [Sat, 6 Aug 2022 03:16:56 +0000 (12:16 +0900)] 
network/qdisc: introduce is_ready() in qdisc vtable

Preparation for next commit.

3 years agocore/cgroup: use bus locator (#24251)
josh-gordon-fb [Tue, 9 Aug 2022 07:20:07 +0000 (00:20 -0700)] 
core/cgroup: use bus locator (#24251)

3 years agotree-wide: use bus locator (#24252)
gtwang01 [Tue, 9 Aug 2022 07:19:09 +0000 (00:19 -0700)] 
tree-wide: use bus locator (#24252)

This modifies some sd_bus calls to equivalent bus calls.

3 years agosysusers: properly process user entries with an explicit GID
Luca BRUNO [Mon, 8 Aug 2022 15:56:06 +0000 (15:56 +0000)] 
sysusers: properly process user entries with an explicit GID

This tweaks user creation logic to properly take into consideration
an explicitly requested GID.
It fixes a bug where the creation flow would mistakenly fall back
to use the username instead, resulting in wrong lookups in case of
users and groups using the same name.

3 years agosysusers: only check whether the requested GID is available
Luca BRUNO [Mon, 8 Aug 2022 15:52:33 +0000 (15:52 +0000)] 
sysusers: only check whether the requested GID is available

This relaxes the availability check when creating a group, if an
explicit GID has been requested.
It avoids mixing up users and groups entries with valid and unique
UIDs/GIDs, but each having the same ID number.

3 years agoMerge pull request #24244 from yuwata/device-enumerator
Yu Watanabe [Mon, 8 Aug 2022 19:57:48 +0000 (04:57 +0900)] 
Merge pull request #24244 from yuwata/device-enumerator

sd-device-enumerator: fix sysattr match

3 years agokmod-setup: load dmi-sysfs if it's a module
Ludwig Nussel [Mon, 8 Aug 2022 14:54:58 +0000 (16:54 +0200)] 
kmod-setup: load dmi-sysfs if it's a module

3 years agotest: add tests for sd_device_enumerator_add_match_sysattr/property() 24244/head
Yu Watanabe [Mon, 8 Aug 2022 14:22:52 +0000 (23:22 +0900)] 
test: add tests for sd_device_enumerator_add_match_sysattr/property()

3 years agosd-device-enumerator: FOREACH_DEVICE_PROPERTY() does not provide NULL value
Yu Watanabe [Mon, 8 Aug 2022 14:19:49 +0000 (23:19 +0900)] 
sd-device-enumerator: FOREACH_DEVICE_PROPERTY() does not provide NULL value

Hence, when sd_device_enumerator_add_match_property() called with NULL
for value, then the filter always unmatches with the device.

3 years agosd-device-enumerator,monitor: fix sysattr match
Yu Watanabe [Mon, 8 Aug 2022 13:03:35 +0000 (22:03 +0900)] 
sd-device-enumerator,monitor: fix sysattr match

Previously, if sd_device_enumerator_add_match_sysattr() is called for
the same sysattr with different values, then no device passed the filter.

Now, the accepted values (or patterns) are stored in strv, and if the
sysattr value of a device matches with the strv, then the device passes
the filter.

3 years agocryptsetup: support keyfile-timeout for using a device as the key file
Chih-Hsuan Yen [Thu, 4 Aug 2022 16:45:33 +0000 (00:45 +0800)] 
cryptsetup: support keyfile-timeout for using a device as the key file

Closes https://github.com/systemd/systemd/issues/21993

3 years agoMerge pull request #24221 from yuwata/dhcp-client-cleanups
Yu Watanabe [Mon, 8 Aug 2022 14:59:58 +0000 (23:59 +0900)] 
Merge pull request #24221 from yuwata/dhcp-client-cleanups

dhcp: use struct hw_addr_data

3 years agohash-funcs: introduce string_hash_ops_free_strv_free
Yu Watanabe [Mon, 8 Aug 2022 13:02:53 +0000 (22:02 +0900)] 
hash-funcs: introduce string_hash_ops_free_strv_free

3 years agoMerge pull request #23511 from diabonas/tpm2-pin-systemd-gpt-auto-generator
Lennart Poettering [Mon, 8 Aug 2022 13:40:03 +0000 (15:40 +0200)] 
Merge pull request #23511 from diabonas/tpm2-pin-systemd-gpt-auto-generator

cryptsetup: make systemd-gpt-auto-generator work with TPM2 and PIN

3 years agoMerge pull request #24220 from yuwata/on-ac-power
Lennart Poettering [Mon, 8 Aug 2022 13:35:55 +0000 (15:35 +0200)] 
Merge pull request #24220 from yuwata/on-ac-power

udev-util: assume running on AC power when no battery found

3 years agostub: Use EfiLoaderCode for kernel memory
Jan Janssen [Mon, 8 Aug 2022 09:50:01 +0000 (11:50 +0200)] 
stub: Use EfiLoaderCode for kernel memory

Fixes: #24237
3 years agoMerge pull request #24044 from dtardon/default-device-timeout
Lennart Poettering [Mon, 8 Aug 2022 13:32:55 +0000 (15:32 +0200)] 
Merge pull request #24044 from dtardon/default-device-timeout

Add a configuration option for setting default device timeout

3 years agoFix issue with system time set back (#24131)
João Loureiro [Mon, 8 Aug 2022 13:32:19 +0000 (15:32 +0200)] 
Fix issue with system time set back (#24131)

Fixes #6036

3 years agoshared/generator: Ensure growfs unit runs after repart
undef [Sat, 6 Aug 2022 05:47:03 +0000 (05:47 +0000)] 
shared/generator: Ensure growfs unit runs after repart

When deploying an image using systemd-repart and systemd-growfs one
should have the image expanded entirely and ready to use after the first
boot. This ensures that growfs does not occur before repart, thus
requiring a second boot.

3 years agoupdate TODO
Lennart Poettering [Mon, 8 Aug 2022 11:50:08 +0000 (13:50 +0200)] 
update TODO

3 years agodhcp: add assertions about client state 24221/head
Yu Watanabe [Wed, 3 Aug 2022 02:40:00 +0000 (11:40 +0900)] 
dhcp: add assertions about client state

3 years agodocs: mkosi-13 or newer required
Sonali Srivastava [Mon, 8 Aug 2022 10:43:00 +0000 (16:13 +0530)] 
docs: mkosi-13 or newer required

3 years agoboot: Build with at least -O1 as workaround 24233/head
Jan Janssen [Sat, 6 Aug 2022 07:07:47 +0000 (09:07 +0200)] 
boot: Build with at least -O1 as workaround

Fixes: #24202
3 years agodhcp: fix potential buffer overflow
Yu Watanabe [Sat, 6 Aug 2022 04:05:59 +0000 (13:05 +0900)] 
dhcp: fix potential buffer overflow

Fixes a bug introduced by 324f818781a250b60f2fcfa74ff1c9101d2d1315.

This also renames several macros for DHCP packet size.

3 years agodhcp: make dhcp_network_bind_raw_socket() take struct hw_addr_data
Yu Watanabe [Tue, 2 Aug 2022 07:25:20 +0000 (16:25 +0900)] 
dhcp: make dhcp_network_bind_raw_socket() take struct hw_addr_data

3 years agodhcp: make dhcp_identifier_set_duid() take struct hw_addr_data
Yu Watanabe [Tue, 2 Aug 2022 06:45:03 +0000 (15:45 +0900)] 
dhcp: make dhcp_identifier_set_duid() take struct hw_addr_data

3 years agodhcp: make dhcp_identifier_set_iaid() take struct hw_addr_data
Yu Watanabe [Tue, 2 Aug 2022 06:34:42 +0000 (15:34 +0900)] 
dhcp: make dhcp_identifier_set_iaid() take struct hw_addr_data

3 years agosd-dhcp6-client: use hw_addr_set()
Yu Watanabe [Tue, 2 Aug 2022 06:22:16 +0000 (15:22 +0900)] 
sd-dhcp6-client: use hw_addr_set()

3 years agosd-dhcp-client: use struct hw_addr_data to store MAC and broadcast address
Yu Watanabe [Tue, 2 Aug 2022 06:07:26 +0000 (15:07 +0900)] 
sd-dhcp-client: use struct hw_addr_data to store MAC and broadcast address

3 years agoether-addr-util: introduce hw_addr_set() helper function
Yu Watanabe [Tue, 2 Aug 2022 06:04:50 +0000 (15:04 +0900)] 
ether-addr-util: introduce hw_addr_set() helper function

3 years agodhcp4: stop client before updating MAC address
Yu Watanabe [Tue, 2 Aug 2022 06:04:24 +0000 (15:04 +0900)] 
dhcp4: stop client before updating MAC address

3 years agosd-netlink: rename NLType and friends
Yu Watanabe [Mon, 25 Jul 2022 05:11:00 +0000 (14:11 +0900)] 
sd-netlink: rename NLType and friends

In sd-netlink, we use 'type' for naming many variables with different type,
and worst of all, function like `type_get_type()` exists. That makes the
code hard to understood.

Let's rename
- NLType -> NLAPolicy
- NLTypeSystem -> NLAPolicySet
- NLTypeSystemUnion -> NLAPolicySetUnion
- type_get_type() -> policy_get_type()
- type_get_type_system() -> policy_get_policy_set(), and so on.

This also changes the type of attribute taken by e.g.
`sd_netlink_message_append_string()` from `unsigned short` -> `uint16_t`
to make the variable size clearer.

3 years agoudev-util: assume system is running on AC power when no battery found 24220/head
Yu Watanabe [Fri, 5 Aug 2022 18:42:29 +0000 (03:42 +0900)] 
udev-util: assume system is running on AC power when no battery found

Fixes #24214.

3 years agoudev-util: align string table
Yu Watanabe [Fri, 5 Aug 2022 18:35:04 +0000 (03:35 +0900)] 
udev-util: align string table

3 years agoMerge pull request #23340 from yuwata/network-check-sr-iov-pf-state
Yu Watanabe [Fri, 5 Aug 2022 18:18:30 +0000 (03:18 +0900)] 
Merge pull request #23340 from yuwata/network-check-sr-iov-pf-state

network: check SR-IOV PF state

3 years agoMerge pull request #23508 from yuwata/core-device
Yu Watanabe [Fri, 5 Aug 2022 18:18:14 +0000 (03:18 +0900)] 
Merge pull request #23508 from yuwata/core-device

core/device: fix devlink handling

3 years agomkosi: Add package libfdisk to Ubuntu dependencies (#24211)
Richard Phibel [Fri, 5 Aug 2022 17:40:17 +0000 (19:40 +0200)] 
mkosi: Add package libfdisk to Ubuntu dependencies (#24211)

* mkosi: Add package libfdisk to Ubuntu dependencies

The libfdisk package is needed by systemd-repart.

3 years agobus: use inline trace argument for ANONYMOUS auth
David Rheinsberg [Wed, 29 Jun 2022 11:37:40 +0000 (13:37 +0200)] 
bus: use inline trace argument for ANONYMOUS auth

Rather than using a separate DATA round to transmit the trace-string of
the ANONYMOUS authentication scheme, transmit it inline as argument.
This requires a refactor of the client-side SASL parser, as we now have
a different set of replies depending on the mode used.

This fixes an issue where libdbus-1 does not query for trace-strings if
not transmit inline as AUTH-ANONYMOUS argument. It is unclear from the
wording of the spec whether this is a violation by libdbus-1. However,
we can work around it by simply changing our mode of transmittal.

3 years agoMerge pull request #24216 from poettering/ispowerof2
Luca Boccassi [Fri, 5 Aug 2022 15:38:58 +0000 (16:38 +0100)] 
Merge pull request #24216 from poettering/ispowerof2

add ISPOWEROF2() macro and use it

3 years agoman,journalctl: introduce man/--help sections
Lennart Poettering [Thu, 4 Aug 2022 13:15:52 +0000 (15:15 +0200)] 
man,journalctl: introduce man/--help sections

So far the --help text and the man page of journactl were mostly a large
pile of options shown next to each other. Let's add some basic
structure, and group switches by sections such as "Filtering Options",
"Output Options" and so on.

Do this the same way in the --help text and in the man page.

Since this moves everything around anyway, I also opted to rebreak all
paragraphs in the man page. This makes the patch larger than necessary,
but given that this whole patch doesn't really change contents besides
section titles I figured this would be OK.

3 years agoman: update dbus docs 24044/head
David Tardon [Sat, 16 Jul 2022 10:36:06 +0000 (12:36 +0200)] 
man: update dbus docs

3 years agoman: document DefaultDeviceTimeoutSec=
David Tardon [Sat, 16 Jul 2022 08:16:41 +0000 (10:16 +0200)] 
man: document DefaultDeviceTimeoutSec=

3 years agocore/device: add comments for boolean arguments 23508/head
Yu Watanabe [Fri, 5 Aug 2022 13:16:58 +0000 (22:16 +0900)] 
core/device: add comments for boolean arguments

3 years agocore/device: always accept syspath change
Yu Watanabe [Thu, 28 Apr 2022 18:14:44 +0000 (03:14 +0900)] 
core/device: always accept syspath change

When multiple devices have the same devlink, then
adding/updating/removing one of the device may cause syspath change.

Fixes the following issue in
https://github.com/systemd/systemd/issues/23208#issue-1217909746
> the above shows an inconsistency between udev's and systemd's handling
> of the two different devices having the same alias. While udev replaces
> the by-uuid symlink which now points to sdh1 rather than sdd1, systemd
> keeps the previous mapping to sdd1 and emits a warning. This is not the
> problem cause but worth mentioning.

3 years agocore/device: move several functions
Yu Watanabe [Thu, 28 Apr 2022 18:12:17 +0000 (03:12 +0900)] 
core/device: move several functions

No functional change. A preparation for later commits.

3 years agocore/device: store the original path
Yu Watanabe [Fri, 29 Apr 2022 17:35:16 +0000 (02:35 +0900)] 
core/device: store the original path

The unit name may be hashed. Hence, we cannot obtain the original path
from the unit name.

The path will be used in the later commits.

3 years agocore: replace m->honor_device_enumeration with MANAGER_IS_SWITCHING_ROOT()
Franck Bui [Thu, 5 May 2022 09:11:57 +0000 (11:11 +0200)] 
core: replace m->honor_device_enumeration with MANAGER_IS_SWITCHING_ROOT()