]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agodocs: Fixing typo in systemd.device man page and README.
alexlzhu [Wed, 29 Sep 2021 20:41:23 +0000 (13:41 -0700)] 
docs: Fixing typo in systemd.device man page and README.

systemd-udevd.service listens to kernel uevents and is needed for device
units to be available.

systemd-udevd.service is misspelled as systemd-udev.service in a couple places.

Fixing typo.

2 years agoMerge pull request #20876 from poettering/openssl3-creds
Yu Watanabe [Wed, 29 Sep 2021 19:01:57 +0000 (04:01 +0900)] 
Merge pull request #20876 from poettering/openssl3-creds

creds-util: switch to OpenSSL 3.0 APIs

2 years agoMerge pull request #20883 from bluca/bpf_header_license
Luca Boccassi [Wed, 29 Sep 2021 17:05:28 +0000 (18:05 +0100)] 
Merge pull request #20883 from bluca/bpf_header_license

headers: update bpf_insn.h to dual license

2 years agoMerge pull request #20219 from khfeng/use-intel-hid-rfkill
Lennart Poettering [Wed, 29 Sep 2021 16:53:22 +0000 (18:53 +0200)] 
Merge pull request #20219 from khfeng/use-intel-hid-rfkill

hwdb: Remove intel-hid rfkill mask

2 years agodocs: mention that contributed code must be compatible with GPL-2.0-or-later explicitly 20883/head
Luca Boccassi [Wed, 29 Sep 2021 16:42:51 +0000 (17:42 +0100)] 
docs: mention that contributed code must be compatible with GPL-2.0-or-later explicitly

2 years agoheaders: update bpf_insn.h to dual license
Luca Boccassi [Wed, 29 Sep 2021 16:40:52 +0000 (17:40 +0100)] 
headers: update bpf_insn.h to dual license

This header is copied from the kernel. It was relicensed from GPL-2.0-only
to GPL-2.0-only OR BSD-2-Clause, so update our SPDX tag accordingly.

For more details and ACKS from all copyright holders authorizing the
license change see:

https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=d75fe9cb1dd062684c9fb8a4581738170365dc06

2 years agocore/mount: add implicit unit dependencies even if when mount unit is generated from...
Yu Watanabe [Sun, 29 Aug 2021 12:20:43 +0000 (21:20 +0900)] 
core/mount: add implicit unit dependencies even if when mount unit is generated from /proc/self/mountinfo

Hopefully fixes #20566.

2 years agoMerge pull request #20824 from yuwata/sd-dhcp6-client-cleanups
Yu Watanabe [Wed, 29 Sep 2021 15:08:16 +0000 (00:08 +0900)] 
Merge pull request #20824 from yuwata/sd-dhcp6-client-cleanups

sd-dhcp6-client: several cleanups for parsing options

2 years agoMerge pull request #20226 from yuwata/network-introduce-source-and-status
Yu Watanabe [Wed, 29 Sep 2021 15:06:17 +0000 (00:06 +0900)] 
Merge pull request #20226 from yuwata/network-introduce-source-and-status

network: introduce NetworkConfigSource and NetworkConfigState

2 years agoMerge pull request #20871 from mrc0mmand/udevadm-property-value
Yu Watanabe [Wed, 29 Sep 2021 15:05:02 +0000 (00:05 +0900)] 
Merge pull request #20871 from mrc0mmand/udevadm-property-value

udev: teach udevadm --property=NAME and --value options

2 years agoMerge pull request #20877 from yuwata/network-test-mode
Yu Watanabe [Wed, 29 Sep 2021 15:04:41 +0000 (00:04 +0900)] 
Merge pull request #20877 from yuwata/network-test-mode

network: do not update state files when running in test mode

2 years agodoc: network: Move "Independent=" flag to the VXLAN section (#20881)
Marcel Menzel [Wed, 29 Sep 2021 14:19:20 +0000 (16:19 +0200)] 
doc: network: Move "Independent=" flag to the VXLAN section (#20881)

2 years agoMerge pull request #20823 from mrc0mmand/test-storage-iscsi
Yu Watanabe [Wed, 29 Sep 2021 14:17:43 +0000 (23:17 +0900)] 
Merge pull request #20823 from mrc0mmand/test-storage-iscsi

test: iSCSI-related udev tests

2 years agohwdb: sensors: Fix some modalias matches no longer working with newer kernels
Hans de Goede [Tue, 31 Aug 2021 13:49:33 +0000 (15:49 +0200)] 
hwdb: sensors: Fix some modalias matches no longer working with newer kernels

Kernels >= 5.8 have added new fields to the dmi/id/modalias file in the
middle of the modalias (instead of adding them at the end).

Specifically new ":br<value>:" and (optional) ":efr<value>:" fields have
been added between the ":bd<value>:" and ":svn<value>:" fields.

Note the 5.13.0 and 5.14.0 kernels also added a new ":sku<value>:" field
between the ":pvr<value>:" and ":rvn<value>:" fields, this has been fixed
in later 5.13.y and 5.14.y releases, by moving the sku field to the end:
https://lore.kernel.org/lkml/20210831130508.14511-1-hdegoede@redhat.com/

Unfortunately the same cannot be done for the new br and efr fields since
those have been added more then a year ago and hwdb even already has some
newer entries relying on the new br field being there (and thus not working
with older kernels).

Fix the issue with the br and efr fields through the following changes:

1. Replace any matches on ":br<value>" from newer entries with an '*'
2. Replace "bd<value>:svn<value>" matches with: "bd<value>:*svn<value>"
   inserting an '*' where newer kernels will have the new br + efr fields

This makes these matches working with old as well as new kernels.

Link: https://github.com/systemd/systemd/issues/20550
Link: https://github.com/systemd/systemd/pull/20562
2 years agoRevert "ci: temporarily set -Wno-deprecated-declarations in Packit" 20876/head
Lennart Poettering [Wed, 29 Sep 2021 12:40:34 +0000 (14:40 +0200)] 
Revert "ci: temporarily set -Wno-deprecated-declarations in Packit"

This reverts commit af861917c5118cb9f1490f407d86f40fd5e01437.

2 years agoopenssl-util: use EVP API to get RSA bits
Lennart Poettering [Wed, 29 Sep 2021 13:03:44 +0000 (15:03 +0200)] 
openssl-util: use EVP API to get RSA bits

2 years agocreds-util: switch to OpenSSL 3.0 APIs
Lennart Poettering [Wed, 29 Sep 2021 07:47:08 +0000 (09:47 +0200)] 
creds-util: switch to OpenSSL 3.0 APIs

Let's switch from the low-level SHA256 APIs to EVP APIs. The former are
deprecated on OpenSSL 3.0, the latter are supported both by old
OpenSSL and by OpenSSL 3.0, hence are the better choice.

Fixes: #20775
2 years agobasic/unit-file: don't filter out names starting with dot
Anita Zhang [Wed, 29 Sep 2021 06:52:39 +0000 (23:52 -0700)] 
basic/unit-file: don't filter out names starting with dot

Fixes #20859
Reverts 3796bdc55d6ba499d1049f749072218879e619a7

2 years agocore: drop "const" from NeedsDaemonReload unit dbus property
Lennart Poettering [Wed, 29 Sep 2021 08:30:17 +0000 (10:30 +0200)] 
core: drop "const" from NeedsDaemonReload unit dbus property

It's not "const", it can change any time if people change the fs, and we
don#t send out notifications for it. Hence don't claim it was const.
(Otherwise clients might cache it, but they should not)

Prompted-by: #20792
2 years agoresolvconf-compat: make "-u" operation a NOP
Lennart Poettering [Wed, 29 Sep 2021 08:48:24 +0000 (10:48 +0200)] 
resolvconf-compat: make "-u" operation a NOP

According to the various man pages of "resolvconf" the -u switch is for:

"-u Just run the update scripts (if updating is enabled)."

"-u Force resolvconf to update all its subscribers. resolvconf does not
    update the subscribers when adding a resolv.conf that matches what
    it already has for that interface."

We have no "subscribers", we ourselves are the only "subscriber" we
support. Hence it's probably better to ignore such a request and make it
a NOP, then to fail.

Fixes: #20748
2 years agoRevert "CI: run unit tests in a network namespace" 20877/head
Yu Watanabe [Wed, 29 Sep 2021 08:37:21 +0000 (17:37 +0900)] 
Revert "CI: run unit tests in a network namespace"

This reverts commit 8b036b223a40fac9e53189db05d3798ec11eb475.

2 years agonetwork: do not configure anything when running in test mode
Yu Watanabe [Wed, 29 Sep 2021 09:19:38 +0000 (18:19 +0900)] 
network: do not configure anything when running in test mode

2 years agonetwork: do not update state files when running in test mode
Yu Watanabe [Wed, 29 Sep 2021 08:32:55 +0000 (17:32 +0900)] 
network: do not update state files when running in test mode

Fixes #20862.

2 years agoMerge pull request #20802 from yuwata/network-receive-nl80211-multicast-messages
Yu Watanabe [Wed, 29 Sep 2021 11:49:38 +0000 (20:49 +0900)] 
Merge pull request #20802 from yuwata/network-receive-nl80211-multicast-messages

network: receive nl80211 multicast messages

2 years agoudev: teach udevadm --property=NAME and --value options 20871/head
Frantisek Sumsal [Tue, 28 Sep 2021 19:18:08 +0000 (21:18 +0200)] 
udev: teach udevadm --property=NAME and --value options

which allows limiting the properties listed by the `--query=property` option
(and optionally listing only the respective values).

2 years agobasic: introduce test_strv_split_and_extend()
Frantisek Sumsal [Wed, 29 Sep 2021 10:46:11 +0000 (12:46 +0200)] 
basic: introduce test_strv_split_and_extend()

2 years agoCI: run GCC unit test job on push to main
Luca Boccassi [Wed, 29 Sep 2021 10:36:22 +0000 (11:36 +0100)] 
CI: run GCC unit test job on push to main

Allows to get coverage data on coveralls.io

2 years agoudev: sort the options alphabetically
Frantisek Sumsal [Tue, 28 Sep 2021 18:08:05 +0000 (20:08 +0200)] 
udev: sort the options alphabetically

2 years agotest: iSCSI-related udev tests 20823/head
Frantisek Sumsal [Wed, 22 Sep 2021 17:26:45 +0000 (19:26 +0200)] 
test: iSCSI-related udev tests

2 years agotest: save journals of only failing test cases in TEST-64
Frantisek Sumsal [Wed, 22 Sep 2021 09:24:48 +0000 (11:24 +0200)] 
test: save journals of only failing test cases in TEST-64

2 years agotest: explicitly report if we fail to install a file into the image
Frantisek Sumsal [Wed, 22 Sep 2021 08:59:52 +0000 (10:59 +0200)] 
test: explicitly report if we fail to install a file into the image

2 years agotest: add an iSCSI helper
Frantisek Sumsal [Tue, 21 Sep 2021 19:32:30 +0000 (21:32 +0200)] 
test: add an iSCSI helper

2 years agotest: sort the features alphabetically
Frantisek Sumsal [Tue, 21 Sep 2021 18:56:24 +0000 (20:56 +0200)] 
test: sort the features alphabetically

2 years agoMerge pull request #20676 from gogsbread/sysctl-minimize-sideeffect
Lennart Poettering [Wed, 29 Sep 2021 07:17:48 +0000 (09:17 +0200)] 
Merge pull request #20676 from gogsbread/sysctl-minimize-sideeffect

sysctl: minimize side effects when running `systemd-sysctl`

2 years agonetwork: receive genl multicast messages about wlan connections 20802/head
Yu Watanabe [Mon, 20 Sep 2021 19:57:43 +0000 (04:57 +0900)] 
network: receive genl multicast messages about wlan connections

2 years agonetwork: move error handling of enumerating configs to caller side
Yu Watanabe [Tue, 21 Sep 2021 23:25:36 +0000 (08:25 +0900)] 
network: move error handling of enumerating configs to caller side

2 years agonetwork: make manager_enumerate_internal() take sd_netlink object
Yu Watanabe [Mon, 20 Sep 2021 19:44:00 +0000 (04:44 +0900)] 
network: make manager_enumerate_internal() take sd_netlink object

Preparation for dumping information through generic netlink.

2 years agonetwork: split manager_new() into two part
Yu Watanabe [Tue, 21 Sep 2021 23:36:11 +0000 (08:36 +0900)] 
network: split manager_new() into two part

Initialize dbus or netlink is not necessary for fuzzers.

2 years agowifi-util: introduce nl80211_cmd_to_string()
Yu Watanabe [Tue, 21 Sep 2021 06:14:59 +0000 (15:14 +0900)] 
wifi-util: introduce nl80211_cmd_to_string()

2 years agonetwork: rename wifi_iftype -> wlan_iftype
Yu Watanabe [Mon, 20 Sep 2021 21:29:29 +0000 (06:29 +0900)] 
network: rename wifi_iftype -> wlan_iftype

2 years agowifi-util: move, rename, and expose wifi_iftype_to_string()
Yu Watanabe [Mon, 20 Sep 2021 21:25:53 +0000 (06:25 +0900)] 
wifi-util: move, rename, and expose wifi_iftype_to_string()

2 years agosd-netlink: add several attributes for nl80211
Yu Watanabe [Mon, 20 Sep 2021 18:18:50 +0000 (03:18 +0900)] 
sd-netlink: add several attributes for nl80211

2 years agosd-netlink, wifi-util: fix attribute type of NL80211_ATTR_SSID
Yu Watanabe [Tue, 21 Sep 2021 17:30:03 +0000 (02:30 +0900)] 
sd-netlink, wifi-util: fix attribute type of NL80211_ATTR_SSID

2 years agowifi-util: add "ret_" prefix for arguments which store results
Yu Watanabe [Tue, 21 Sep 2021 17:49:29 +0000 (02:49 +0900)] 
wifi-util: add "ret_" prefix for arguments which store results

2 years agosd-netlink: introduce sd_netlink_message_read_data_suffix0()
Yu Watanabe [Tue, 21 Sep 2021 17:17:11 +0000 (02:17 +0900)] 
sd-netlink: introduce sd_netlink_message_read_data_suffix0()

2 years agosd-netlink: make sd_genl_message_new() or friends return -EOPNOTSUPP if a module...
Yu Watanabe [Wed, 22 Sep 2021 05:06:31 +0000 (14:06 +0900)] 
sd-netlink: make sd_genl_message_new() or friends return -EOPNOTSUPP if a module is not supported by the kernel

2 years agosd-netlink: also check multicast group to find suitable match callback
Yu Watanabe [Tue, 21 Sep 2021 07:22:29 +0000 (16:22 +0900)] 
sd-netlink: also check multicast group to find suitable match callback

2 years agosd-netlink: allow to set dump flag for genl or netfilter messages
Yu Watanabe [Mon, 20 Sep 2021 20:05:39 +0000 (05:05 +0900)] 
sd-netlink: allow to set dump flag for genl or netfilter messages

2 years agosd-netlink: add type safe macro for sd_genl_add_match()
Yu Watanabe [Mon, 20 Sep 2021 19:42:37 +0000 (04:42 +0900)] 
sd-netlink: add type safe macro for sd_genl_add_match()

2 years agosd-netlink: minor coding style fixes
Yu Watanabe [Tue, 21 Sep 2021 06:27:13 +0000 (15:27 +0900)] 
sd-netlink: minor coding style fixes

2 years agobasic/linux: update nl80211.h
Yu Watanabe [Tue, 21 Sep 2021 06:10:56 +0000 (15:10 +0900)] 
basic/linux: update nl80211.h

2 years agosd-dhcp6-client: rename dhcp6_lease_set_dns() -> dhcp6_lease_add_dns() 20824/head
Yu Watanabe [Fri, 24 Sep 2021 12:03:24 +0000 (21:03 +0900)] 
sd-dhcp6-client: rename dhcp6_lease_set_dns() -> dhcp6_lease_add_dns()

As it is allowed that multiple DNS server options appear in the message.

2 years agosd-dhcp6-client: do not merge NTP and SNTP options
Yu Watanabe [Fri, 24 Sep 2021 06:00:43 +0000 (15:00 +0900)] 
sd-dhcp6-client: do not merge NTP and SNTP options

Previously, SNTP option is ignored when it appears after NTP option(s),
but merged later NTP options when it appears first.
This makes split the NTP and SNTP addresses, and use SNTP addresses only
when no NTP option is provided.

2 years agosd-dhcp6-client: support multiple NTP server options
Yu Watanabe [Fri, 24 Sep 2021 05:09:14 +0000 (14:09 +0900)] 
sd-dhcp6-client: support multiple NTP server options

Also, it is allowed that the suboption appears multiple times, and each
suboption contains one NTP server.

2 years agosd-dhcp6-client: support multiple domains
Yu Watanabe [Fri, 24 Sep 2021 05:16:44 +0000 (14:16 +0900)] 
sd-dhcp6-client: support multiple domains

2 years agosd-dhcp6-client: make dhcp6_lease_free() accepts NULL
Yu Watanabe [Fri, 24 Sep 2021 14:45:13 +0000 (23:45 +0900)] 
sd-dhcp6-client: make dhcp6_lease_free() accepts NULL

2 years agosd-dhcp6-client: drop domains_count and ntp_fqdn_count
Yu Watanabe [Fri, 24 Sep 2021 05:05:29 +0000 (14:05 +0900)] 
sd-dhcp6-client: drop domains_count and ntp_fqdn_count

2 years agosd-dhcp6-client: use dhcp6_option_parse() in client_parse_message()
Yu Watanabe [Fri, 24 Sep 2021 04:35:36 +0000 (13:35 +0900)] 
sd-dhcp6-client: use dhcp6_option_parse() in client_parse_message()

2 years agosd-dhcp6-client: constify several arguments
Yu Watanabe [Fri, 24 Sep 2021 04:34:14 +0000 (13:34 +0900)] 
sd-dhcp6-client: constify several arguments

2 years agosd-dhcp6-client: slightly modernize dhcp6_option_parse_domainname()/domainname_list()
Yu Watanabe [Thu, 23 Sep 2021 18:49:14 +0000 (03:49 +0900)] 
sd-dhcp6-client: slightly modernize dhcp6_option_parse_domainname()/domainname_list()

2 years agosd-dhcp6-client: fix buffer size calculation in dhcp6_option_parse_ip6addrs()
Yu Watanabe [Thu, 23 Sep 2021 16:24:52 +0000 (01:24 +0900)] 
sd-dhcp6-client: fix buffer size calculation in dhcp6_option_parse_ip6addrs()

GREEDY_REALLOC() takes number of elements, not buffer size.

This also rename dhcp6_option_parse_ip6addrs() to
dhcp6_option_parse_addresses().

2 years agosd-dhcp6-client: modernize dhcp6_option_parse_ia()
Yu Watanabe [Thu, 23 Sep 2021 15:50:01 +0000 (00:50 +0900)] 
sd-dhcp6-client: modernize dhcp6_option_parse_ia()

This makes
- the function not update the arguments for storing results on error,
- use dhcp6_option_parse() to parse sub options,
- ignore all errors, except for -ENOMEM, in parsing sub options,
- update log messages.

2 years agosd-dhcp6-client: make dhcp6_option_parse_status() also parse error message
Yu Watanabe [Thu, 23 Sep 2021 07:30:40 +0000 (16:30 +0900)] 
sd-dhcp6-client: make dhcp6_option_parse_status() also parse error message

This also introduce dhcp6_option_parse_ia_options(). Currently, it is
assumed that each IA address or PD prefix may contain a status sub-option.
But it is not prohibited that other sub-options or multiple status
options are contained.

2 years agotest: add tests for reading unaligned data
Yu Watanabe [Mon, 27 Sep 2021 15:48:59 +0000 (00:48 +0900)] 
test: add tests for reading unaligned data

2 years agosd-dhcp6-client: modernize dhcp6_option_parse()
Yu Watanabe [Thu, 23 Sep 2021 05:58:28 +0000 (14:58 +0900)] 
sd-dhcp6-client: modernize dhcp6_option_parse()

- merge dhcp6_option_parse() with option_parse_hdr().
- do not assign/update any values on error.
- use assert() instead of assert_return(), as the assertions cannot
  be triggered by a library user.

2 years agosd-dhcp6-client: constify one argument
Yu Watanabe [Thu, 23 Sep 2021 05:57:29 +0000 (14:57 +0900)] 
sd-dhcp6-client: constify one argument

2 years agosysctl-util: minimize side-effects when running `systemd-sysctl` 20676/head
Antony Deepak Thomas [Wed, 29 Sep 2021 04:07:42 +0000 (13:07 +0900)] 
sysctl-util: minimize side-effects when running `systemd-sysctl`

Currently `systemd-sysctl` binary is used in `systemd-sysctl.service`
which is mostly configured as `oneshot`. There are situations where one
would like to use systemd to maintain Sysctl configurations on a host,
using a configuration managers such as Chef or Puppet, by apply
configurations every X duration.
The problem with using `systemd-sysctl` is that it writes all the Sysctl
settings, even if the values for those settings have not changed. From
experience, we have observed that some Sysctl settings cause actions in
the kernel upon writing(like dropping caches) which in turn cause
undesired side effects.
This patch tries to minimize such side effects by comparing values
before writing.

2 years agofileio: introduce new mode to suppress writing the same value
Antony Deepak Thomas [Wed, 29 Sep 2021 04:06:25 +0000 (13:06 +0900)] 
fileio: introduce new mode to suppress writing the same value

2 years agostring-util: introduce streq_skip_trailing_chars()
Antony Deepak Thomas [Wed, 29 Sep 2021 03:57:30 +0000 (12:57 +0900)] 
string-util: introduce streq_skip_trailing_chars()

2 years agofileio: introduce read_virtual_file_fd()
Antony Deepak Thomas [Wed, 29 Sep 2021 03:47:49 +0000 (12:47 +0900)] 
fileio: introduce read_virtual_file_fd()

2 years agoMerge pull request #20865 from keszybz/meson-net-naming-definitions
Yu Watanabe [Wed, 29 Sep 2021 03:29:14 +0000 (12:29 +0900)] 
Merge pull request #20865 from keszybz/meson-net-naming-definitions

Allow defining new naming scheme entries as configuration time

2 years agocore: fix the return type for xxx_running_timeout() functions
Frantisek Sumsal [Tue, 28 Sep 2021 21:08:32 +0000 (23:08 +0200)] 
core: fix the return type for xxx_running_timeout() functions

otherwise we might return an invalid value, since `usec_t` is 64-bit,
whereas `int` might not be.

Follow-up to: 5918a93
Fixes: #20872
2 years agoMerge pull request #20860 from yuwata/libsystemd-network-get-ifname-negative-errno
Yu Watanabe [Wed, 29 Sep 2021 03:27:01 +0000 (12:27 +0900)] 
Merge pull request #20860 from yuwata/libsystemd-network-get-ifname-negative-errno

libsystemd-network: make sd_dhcp_client_get_ifname() or friends return negative errno

2 years agoMerge pull request #20870 from jwrdegoede/hwdb-2-accel-quirks
Lennart Poettering [Tue, 28 Sep 2021 21:13:54 +0000 (23:13 +0200)] 
Merge pull request #20870 from jwrdegoede/hwdb-2-accel-quirks

Hwdb 2 accel quirks

2 years agoMerge pull request #20691 from poettering/gpt-sig
Lennart Poettering [Tue, 28 Sep 2021 18:52:01 +0000 (20:52 +0200)] 
Merge pull request #20691 from poettering/gpt-sig

dissect: add support for GPT images with embedded dm-verity signatures

2 years agolibsystemd-network: make sd_dhcp_client_get_ifname() or friends return negative errno... 20860/head
Yu Watanabe [Tue, 28 Sep 2021 13:04:52 +0000 (22:04 +0900)] 
libsystemd-network: make sd_dhcp_client_get_ifname() or friends return negative errno on error

2 years agotree-wide: make format_ifname() or friends return negative errno on failure
Yu Watanabe [Tue, 28 Sep 2021 12:19:07 +0000 (21:19 +0900)] 
tree-wide: make format_ifname() or friends return negative errno on failure

Also,
- drop unnecessary +1 from buffer size, as IF_NAMESIZE or IFNAMSIZ
  includes the nul at the end.
- format_ifname() does not update buffer on failure,
- introduces format_ifname_alloc(), FORMAT_IFNAME(), and their friends.

2 years agohwdb: Add accel orientation quirk for the Cyberbook T116 tablet 20870/head
Hans de Goede [Tue, 28 Sep 2021 17:49:38 +0000 (19:49 +0200)] 
hwdb: Add accel orientation quirk for the Cyberbook T116 tablet

Add a quirk for the accelerometer orientation for the
Cyberbook T116 rugged tablet.

2 years agohwdb: Add accel orientation quirk for the Chuwi Hi10 Plus (CWI527)
Hans de Goede [Fri, 24 Sep 2021 13:26:43 +0000 (15:26 +0200)] 
hwdb: Add accel orientation quirk for the Chuwi Hi10 Plus (CWI527)

Add a quirk for the accelerometer orientation for the
Chuwi Hi10 Plus (CWI527) tablet.

2 years agoupdate TODO 20691/head
Lennart Poettering [Thu, 9 Sep 2021 16:18:53 +0000 (18:18 +0200)] 
update TODO

2 years agotests: extend TEST-50-DISSECT to look for verity signatures
Lennart Poettering [Tue, 28 Sep 2021 14:49:16 +0000 (16:49 +0200)] 
tests: extend TEST-50-DISSECT to look for verity signatures

2 years agodocs: document the three new env vars for tweaking GPT dissection/validation
Lennart Poettering [Fri, 10 Sep 2021 09:01:09 +0000 (11:01 +0200)] 
docs: document the three new env vars for tweaking GPT dissection/validation

2 years agodocs: document the new Verity signature partition type, and its UUIDs
Lennart Poettering [Fri, 10 Sep 2021 08:32:00 +0000 (10:32 +0200)] 
docs: document the new Verity signature partition type, and its UUIDs

2 years agodissect-image: optionally, validate dm-verity signatures in userspace
Lennart Poettering [Thu, 9 Sep 2021 15:55:36 +0000 (17:55 +0200)] 
dissect-image: optionally, validate dm-verity signatures in userspace

Getting certificates for dm-verity roothash signing into the trusted
kernel keychain is a royal PITA (means recompiling or rebooting with
shim), hence let's add a minimal userspace PKCS7 validation as well.

The mechanism is really simple and compatible with the verification the
kernel does. The only difference is that the certificates are searched
in /etc/verity.d/*.crt (and similar dirs in /usr/lib/, …).

We'll first try validation by passing the PKCS#7 data to the kernel, but
if that doesn't work we'll see if one of the certificates found that way
works and then attempt to attach the image without passing the PKCS#7
data to the kernel.

This makes it very easy to have fully validated GPT disk images. For
example, just copy the 'mkosi.secure-boot.crt' file you have in your
mkosi build dir to /etc/verity.d/ and things should just work.

2 years agodissect-image: add env var for disabling "sidecar" loading of verity params
Lennart Poettering [Thu, 9 Sep 2021 14:04:00 +0000 (16:04 +0200)] 
dissect-image: add env var for disabling "sidecar" loading of verity params

Just to make debugging easier.

2 years agodissect-image: load embedded verity signature info from image
Lennart Poettering [Thu, 9 Sep 2021 11:46:01 +0000 (13:46 +0200)] 
dissect-image: load embedded verity signature info from image

This adds support for actually using embedded signature data from
partitions.

2 years agodissect-image: discover verity signature partitions
Lennart Poettering [Thu, 9 Sep 2021 09:43:13 +0000 (11:43 +0200)] 
dissect-image: discover verity signature partitions

This doesn't make use of the discovered partitions yet, but it finds
them at least.

2 years agogpt: add partition type for PKCS#7 signatures for root hashes
Lennart Poettering [Tue, 31 Aug 2021 15:29:34 +0000 (17:29 +0200)] 
gpt: add partition type for PKCS#7 signatures for root hashes

2 years agocryptsetup: handle more gracefully if "keyslots" LUKS2 JSON header field is invalid
Lennart Poettering [Tue, 28 Sep 2021 10:11:53 +0000 (12:11 +0200)] 
cryptsetup: handle more gracefully if "keyslots" LUKS2 JSON header field is invalid

The field is not owned by us (even though is in our JSON objects) but by
the LUKS2 spec. Hence let's handle this a bit more gracefully: let's not
get confused by it, just warn and skip over it.

Fixes: #20847
2 years agocore: implement RuntimeMaxDeltaSec directive
Albert Brox [Tue, 13 Jul 2021 17:38:08 +0000 (13:38 -0400)] 
core: implement RuntimeMaxDeltaSec directive

2 years agomkosi: Remove build script umask workaround
Daan De Meyer [Tue, 28 Sep 2021 10:16:43 +0000 (11:16 +0100)] 
mkosi: Remove build script umask workaround

A fix for this landed in meson 3 years ago so the workaround in the
build script can now be removed (https://github.com/mesonbuild/meson/pull/3225).

2 years agocore: Add ExecSearchPath parameter to specify the directory relative to which binarie...
alexlzhu [Fri, 9 Jul 2021 00:10:47 +0000 (17:10 -0700)] 
core: Add ExecSearchPath parameter to specify the directory relative to which binaries executed by Exec*= should be found

Currently there does not exist a way to specify a path relative to which
all binaries executed by Exec should be found. The only way is to
specify the absolute path.

This change implements the functionality to specify a path relative to which
binaries executed by Exec*= can be found.

Closes #6308

2 years agomeson: allow extra net naming schemes to be defined during configuration 20865/head
Zbigniew Jędrzejewski-Szmek [Tue, 28 Sep 2021 08:12:36 +0000 (10:12 +0200)] 
meson: allow extra net naming schemes to be defined during configuration

In upstream, we have a linearly-growing list of net-naming-scheme defines;
we add a new one for every release where we make user-visible changes to the
naming scheme.

But the general idea was that downstream distributions could define their
own combinations (or even just their own names for existing combinations),
so provide stability for their users. So far this required patching of the
netif-naming-scheme.c and .h files to add the new lines.

With this patch, patching is not required:

$ meson configure build \
  -Dextra-net-naming-schemes=gargoyle=v238+npar_ari+allow_rerenames,gargoyle2=gargoyle+nspawn_long_hash \
  -Ddefault-net-naming-scheme=gargoyle2

or even

$ meson configure build \
  -Dextra-net-naming-schemes=gargoyle=v238+npar_ari+allow_rerenames,gargoyle2=gargoyle+nspawn_long_hash,latest=v249 \
  -Ddefault-net-naming-scheme=gargoyle2

The syntax is a comma-separated list of NAME=name+name+…
This syntax is a bit scary, but any typos result in compilation errors,
so I think it should be OK in practice.

With this approach, we don't allow users to define arbitrary combinations:
what is allowed is still defined at compilation time, so it's up to the
distribution maintainers to provide reasonable combinations. In this regard,
the only difference from status quo is that it's much easier to do (and harder
to do incorrectly, for example by forgetting to add a name to one of the
maps).

2 years agomeson: drop the list of valid net naming schemes
Zbigniew Jędrzejewski-Szmek [Tue, 28 Sep 2021 07:33:30 +0000 (09:33 +0200)] 
meson: drop the list of valid net naming schemes

We used 'combo' type for the scheme list. For a while we forgot to add
new names, and recently aa0a23ec86 added v241, v243, v245, and v247.
I want to allow defining new values during configuration, which means
that we can't use meson to verify the list of options. So any value is
allowed, but then two tests are added: one that will fail compilation if some
invalid name is given (other than "latest"), and one that converts
DEFAULT_NET_NAMING_SCHEME to a NamingScheme pointer.

2 years agoMerge pull request #20837 from bluca/coveralls
Zbigniew Jędrzejewski-Szmek [Tue, 28 Sep 2021 11:45:59 +0000 (13:45 +0200)] 
Merge pull request #20837 from bluca/coveralls

CI: add code coverage reports via lcov and coveralls.io

2 years agoMerge pull request #20861 from yuwata/sd-lldp-rx-cleanups
Yu Watanabe [Tue, 28 Sep 2021 11:22:21 +0000 (20:22 +0900)] 
Merge pull request #20861 from yuwata/sd-lldp-rx-cleanups

sd-lldp-rx: several trivial cleanups

2 years agonetif-naming: inline one iterator variable
Zbigniew Jędrzejewski-Szmek [Tue, 28 Sep 2021 06:55:18 +0000 (08:55 +0200)] 
netif-naming: inline one iterator variable

2 years agosd-lldp-rx: make lldp_rx_free() and lldp_neighbor_free() accept NULL 20861/head
Yu Watanabe [Tue, 28 Sep 2021 06:51:59 +0000 (15:51 +0900)] 
sd-lldp-rx: make lldp_rx_free() and lldp_neighbor_free() accept NULL

2 years agosd-lldp-rx: sd_event should be attached when lldp_rx_start_timer() is called
Yu Watanabe [Tue, 28 Sep 2021 06:41:19 +0000 (15:41 +0900)] 
sd-lldp-rx: sd_event should be attached when lldp_rx_start_timer() is called

2 years agosd-lldp-rx: do not enable timer event source in sd_lldp_rx_get_neighbors()
Yu Watanabe [Tue, 28 Sep 2021 06:38:50 +0000 (15:38 +0900)] 
sd-lldp-rx: do not enable timer event source in sd_lldp_rx_get_neighbors()

It must be just a simple getter.