]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoMerge pull request #17738 from keszybz/hwdb-news-update-v247 v247
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2020 18:00:50 +0000 (19:00 +0100)] 
Merge pull request #17738 from keszybz/hwdb-news-update-v247

Update hwdb and news for v247

3 years agoshared/seccomp-util: address family filtering is broken on ppc
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2020 10:23:54 +0000 (11:23 +0100)] 
shared/seccomp-util: address family filtering is broken on ppc

This reverts the gist of da1921a5c396547261c8c7fcd94173346eb3b718 and
0d9fca76bb69e162265b2d25cb79f1890c0da31b (for ppc).

Quoting #17559:
> libseccomp 2.5 added socket syscall multiplexing on ppc64(el):
> https://github.com/seccomp/libseccomp/pull/229
>
> Like with i386, s390 and s390x this breaks socket argument filtering, so
> RestrictAddressFamilies doesn't work.
>
> This causes the unit test to fail:
> /* test_restrict_address_families */
> Operating on architecture: ppc
> Failed to install socket family rules for architecture ppc, skipping: Operation canceled
> Operating on architecture: ppc64
> Failed to add socket() rule for architecture ppc64, skipping: Invalid argument
> Operating on architecture: ppc64-le
> Failed to add socket() rule for architecture ppc64-le, skipping: Invalid argument
> Assertion 'fd < 0' failed at src/test/test-seccomp.c:424, function test_restrict_address_families(). Aborting.
>
> The socket filters can't be added so `socket(AF_UNIX, SOCK_DGRAM, 0);` still
> works, triggering the assertion.

Fixes #17559.

3 years agoNEWS: fix kernel version number reference 17738/head
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2020 13:01:09 +0000 (14:01 +0100)] 
NEWS: fix kernel version number reference

Fixes #17736.

3 years agoNEWS: version 247
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2020 12:45:06 +0000 (13:45 +0100)] 
NEWS: version 247

3 years agohwdb: update chromiumos autosuspend rules
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2020 12:54:08 +0000 (13:54 +0100)] 
hwdb: update chromiumos autosuspend rules

3 years agohwdb: update for v247
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2020 12:53:03 +0000 (13:53 +0100)] 
hwdb: update for v247

Only some small changes, because we updated recently. As usual, it seems that there are mostly
additions with a smaller amount of corrections, no big removals.

3 years agodocs/RELEASE: clarify which steps are done when
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2020 12:48:35 +0000 (13:48 +0100)] 
docs/RELEASE: clarify which steps are done when

3 years agotest: use cap_last_cap() for max supported cap number, not capability_list_length()
Dan Streetman [Wed, 25 Nov 2020 20:22:24 +0000 (15:22 -0500)] 
test: use cap_last_cap() for max supported cap number, not capability_list_length()

This test assumes capability_list_length() is an invalid cap number,
but that isn't true if the running kernel supports more caps than we were
compiled with, which results in the test failing.

Instead use cap_last_cap() + 1.

If cap_last_cap() is 63, there are no more 'invalid' cap numbers to test with,
so the invalid cap number test part is skipped.

3 years agoTranslated using Weblate (Chinese (Simplified))
Whired Planck [Thu, 26 Nov 2020 11:35:55 +0000 (12:35 +0100)] 
Translated using Weblate (Chinese (Simplified))

Currently translated at 83.9% (157 of 187 strings)

Co-authored-by: Whired Planck <fungdaat31@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/zh_CN/
Translation: systemd/master

3 years agoMerge pull request #17622 from yuwata/udev-database-set-udev-version
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2020 11:48:05 +0000 (12:48 +0100)] 
Merge pull request #17622 from yuwata/udev-database-set-udev-version

sd-device: make sd_device_has_current_tag() compatible with udev database generated by older udevd

3 years agoadd touchpad-edge-detect output for the Lenovo Thinkpad Extreme to evdev.hwdb
Lee Whalen [Thu, 26 Nov 2020 04:31:47 +0000 (20:31 -0800)] 
add touchpad-edge-detect output for the Lenovo Thinkpad Extreme to evdev.hwdb

3 years agoMerge pull request #17709 from yuwata/test-seccomp-skip
Yu Watanabe [Thu, 26 Nov 2020 00:31:10 +0000 (09:31 +0900)] 
Merge pull request #17709 from yuwata/test-seccomp-skip

test: skip several tests in test-seccomp when running under valgrind or ASAN

3 years agosd-device: make sd_device_has_current_tag() and friends compatible with database... 17622/head
Yu Watanabe [Mon, 16 Nov 2020 10:47:42 +0000 (19:47 +0900)] 
sd-device: make sd_device_has_current_tag() and friends compatible with database version 0

3 years agosd-device: introduce database version and save it in udev database V field
Yu Watanabe [Wed, 25 Nov 2020 21:23:14 +0000 (06:23 +0900)] 
sd-device: introduce database version and save it in udev database V field

3 years agosd-device: make device_add_property_internal() inline
Yu Watanabe [Mon, 16 Nov 2020 10:28:40 +0000 (19:28 +0900)] 
sd-device: make device_add_property_internal() inline

3 years agoman: slightly update the man page of sd_bus_message_read_basic()
Yu Watanabe [Wed, 25 Nov 2020 13:20:48 +0000 (22:20 +0900)] 
man: slightly update the man page of sd_bus_message_read_basic()

Follow-up for 73a1d7d2433edd1872ec53db3e804009298ebb1d.

3 years agoman: Fixed an incomplete sentence
igo95862 [Wed, 25 Nov 2020 13:15:33 +0000 (16:15 +0300)] 
man: Fixed an incomplete sentence

3 years agoman: Specify that sd_bus_message_read_basic returns 0 if end of array had been reached.
igo95862 [Wed, 25 Nov 2020 12:53:52 +0000 (15:53 +0300)] 
man: Specify that sd_bus_message_read_basic returns 0 if end of array had been reached.

3 years agodocs: document what VPNs should do to systemd-resolved.service
Lennart Poettering [Fri, 20 Nov 2020 11:33:16 +0000 (12:33 +0100)] 
docs: document what VPNs should do to systemd-resolved.service

Fixes: #17588 #17512
Prompted-by: #17529
(Also relevant: #6076)

3 years agocore/mount: mount command may fail after adding the corresponding proc mountinfo...
Yu Watanabe [Tue, 17 Nov 2020 00:13:59 +0000 (09:13 +0900)] 
core/mount: mount command may fail after adding the corresponding proc mountinfo entry

Hopefully fixes #17617.

3 years agoMerge pull request #17715 from yuwata/specifier-follow-ups
Zbigniew Jędrzejewski-Szmek [Wed, 25 Nov 2020 12:22:56 +0000 (13:22 +0100)] 
Merge pull request #17715 from yuwata/specifier-follow-ups

Sort specifiers

3 years agocryptsetup: use log_warning_errno() where we can, instead of log_warning()
Lennart Poettering [Tue, 24 Nov 2020 12:56:48 +0000 (13:56 +0100)] 
cryptsetup: use log_warning_errno() where we can, instead of log_warning()

3 years agoMerge pull request #17721 from poettering/more-strjoin-cryptsetup
Zbigniew Jędrzejewski-Szmek [Wed, 25 Nov 2020 12:20:42 +0000 (13:20 +0100)] 
Merge pull request #17721 from poettering/more-strjoin-cryptsetup

two minor fixes/clean-ups

3 years agomkosi: make sure our mkosi files work with f33
Lennart Poettering [Tue, 17 Nov 2020 17:35:08 +0000 (18:35 +0100)] 
mkosi: make sure our mkosi files work with f33

3 years agotest: skip several tests in test-seccomp when running on asan 17709/head
Yu Watanabe [Tue, 24 Nov 2020 12:07:42 +0000 (21:07 +0900)] 
test: skip several tests in test-seccomp when running on asan

3 years agotest: skip several tests in test-seccomp when running on valgrind
Yu Watanabe [Tue, 24 Nov 2020 11:58:07 +0000 (20:58 +0900)] 
test: skip several tests in test-seccomp when running on valgrind

3 years agoman: clarify DefaultTasksMax doc
Pavel Sapezhko [Wed, 18 Nov 2020 14:54:01 +0000 (17:54 +0300)] 
man: clarify DefaultTasksMax doc

3 years agounits: typo fix /proc/<pid>/exec → /proc/<pid>/exe 17721/head
Lennart Poettering [Wed, 25 Nov 2020 10:20:38 +0000 (11:20 +0100)] 
units: typo fix /proc/<pid>/exec → /proc/<pid>/exe

Fix a pretty relevant typo introduced in
c7faa23235694a1e803ba093cba6d6e0193a093e.

3 years agocryptsetup: use strjoin() for concatenating strings
Lennart Poettering [Wed, 4 Nov 2020 17:14:54 +0000 (18:14 +0100)] 
cryptsetup: use strjoin() for concatenating strings

3 years agounits: document why CAP_SYS_PTRACE is needed by journald
Franck Bui [Wed, 25 Nov 2020 08:47:46 +0000 (09:47 +0100)] 
units: document why CAP_SYS_PTRACE is needed by journald

3 years agotree-wide: fix typo
Yu Watanabe [Wed, 25 Nov 2020 04:50:58 +0000 (13:50 +0900)] 
tree-wide: fix typo

3 years agotree-wide: sort specifiers and move common comments to specifier.h 17715/head
Yu Watanabe [Wed, 25 Nov 2020 06:09:17 +0000 (15:09 +0900)] 
tree-wide: sort specifiers and move common comments to specifier.h

3 years agoman: sort specifiers alphabetically
Yu Watanabe [Wed, 25 Nov 2020 05:39:10 +0000 (14:39 +0900)] 
man: sort specifiers alphabetically

3 years agoman: add missing specifiers supported in [INSTALL] section
Yu Watanabe [Wed, 25 Nov 2020 05:38:50 +0000 (14:38 +0900)] 
man: add missing specifiers supported in [INSTALL] section

3 years agospecifiers: introduce common macros for generating specifier tables
Lennart Poettering [Fri, 20 Nov 2020 14:15:24 +0000 (15:15 +0100)] 
specifiers: introduce common macros for generating specifier tables

In many cases the tables are largely the same, hence define a common set
of macros to generate the common parts.

This adds in a couple of missing specifiers here and there, so is more
thant just refactoring: it actually fixes accidental omissions.

Note that some entries that look like they could be unified under these
macros can't really be unified, since they are slightly different. For
example in the DNSSD service logic we want to use the DNSSD hostname for
%H rather than the unmodified kernel one.

3 years agoMerge pull request #17706 from ddstreet/test-move-pam-systemd-user
Michael Biebl [Tue, 24 Nov 2020 20:45:12 +0000 (21:45 +0100)] 
Merge pull request #17706 from ddstreet/test-move-pam-systemd-user

test/test-functions: copy /usr/lib/pam.d into $initdir

3 years agoNEWS: mention that we intend to retrigger udev devices on package upgrade
Lennart Poettering [Tue, 24 Nov 2020 15:07:39 +0000 (16:07 +0100)] 
NEWS: mention that we intend to retrigger udev devices on package upgrade

Also, mention RISCV GPT partition types have been defined.

3 years agopam_systemd_home: export password as PAM_AUTHTOK
Christoph Ruegge [Mon, 23 Nov 2020 17:06:36 +0000 (18:06 +0100)] 
pam_systemd_home: export password as PAM_AUTHTOK

3 years agoMerge pull request #17680 from yuwata/udev-link-mac-address
Lennart Poettering [Tue, 24 Nov 2020 16:42:45 +0000 (17:42 +0100)] 
Merge pull request #17680 from yuwata/udev-link-mac-address

udev: to make MACAddress= take effect, MACAddressPolicy= must be "none"

3 years agoseccomp: also move munmap into @default syscall filter set
Yu Watanabe [Tue, 24 Nov 2020 09:47:37 +0000 (18:47 +0900)] 
seccomp: also move munmap into @default syscall filter set

Follow-up for 5abede3247591248718026cb8be6cd231de7728b.

3 years agosd-device-enumerator: do not return error when a device is removed
INSUN PYO [Thu, 19 Nov 2020 01:49:04 +0000 (10:49 +0900)] 
sd-device-enumerator: do not return error when a device is removed

If /sys/class/OOO node is created and destroyed during booting (kernle driver initialization fails),
systemd-udev-trigger.service fails due to race condition.

***** race condition ***********************************************************************************
 1. kernel driver create /sys/class/OOO
 2. systemd-udev-trigger.service execues "/usr/bin/udevadm trigger --type=devices --action=add"

 3. device_enumerator_scan_devices() => enumerator_scan_devices_all() => enumerator_scan_dir("class") =>
    opendir("/sys/class") and iterate all subdirs ==> enumerator_scan_dir_and_add_devices("/sys/class/OOO")

 4. kernel driver fails and destroy /sys/class/OOO
 5. enumerator_scan_dir_and_add_devices("/sys/class/OOO") fails in opendir("/sys/class/OOO")

 6. "systemd-udev-trigger.service" fails
 7. udev coldplug fails and some device units not ready
 8. mount units asociated with device units fail
 9. local-fs.target fails
 10. enters emergency mode
********************************************************************************************************

***** status of systemd-udev-trigger.service unit ******************************************************
$ systemctl status systemd-udev-trigger.service
 systemd-udev-trigger.service - udev Coldplug all Devices
   Loaded: loaded (/usr/lib/systemd/system/systemd-udev-trigger.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-01-02 13:16:54 KST; 22min ago
     Docs: man:udev(7)
           man:systemd-udevd.service(8)
  Process: 2162 ExecStart=/usr/bin/udevadm trigger --type=subsystems --action=add (code=exited, status=0/SUCCESS)
  Process: 2554 ExecStart=/usr/bin/udevadm trigger --type=devices --action=add (code=exited, status=1/FAILURE)
  Main PID: 2554 (code=exited, status=1/FAILURE)

  Jan 02 13:16:54 localhost udevadm[2554]: Failed to scan devices: No such file or directory
  Jan 02 13:16:54 localhost systemd[1]: systemd-udev-trigger.service: Main process exited, code=exited, status=1/FAILURE
  Jan 02 13:16:54 localhost systemd[1]: systemd-udev-trigger.service: Failed with result 'exit-code'.
  Jan 02 13:16:54 localhost systemd[1]: Failed to start udev Coldplug all Devices.
*******************************************************************************************************

***** journal log with Environment=SYSTEMD_LOG_LEVEL=debug in systemd-udev-trigger.service  ***********
  Jan 01 21:57:20 localhost udevadm[2039]: sd-device-enumerator: Scanning /sys/bus
  Jan 01 21:57:20 localhost udevadm[2522]: sd-device-enumerator: Scan all dirs
  Jan 01 21:57:20 localhost udevadm[2522]: sd-device-enumerator: Scanning /sys/bus
  Jan 01 21:57:21 localhost udevadm[2522]: sd-device-enumerator: Scanning /sys/class
  Jan 01 21:57:21 localhost udevadm[2522]: sd-device-enumerator: Failed to scan /sys/class: No such file or directory
  Jan 01 21:57:21 localhost udevadm[2522]: Failed to scan devices: No such file or directory
*******************************************************************************************************

3 years agokernel-install: drop redundant "/"
Yu Watanabe [Fri, 20 Nov 2020 09:25:06 +0000 (18:25 +0900)] 
kernel-install: drop redundant "/"

Follow-up for 1cdbff1c844ce46f1d84d8feeed426ebfd550988.

After the commit 1cdbff1c844ce46f1d84d8feeed426ebfd550988, each entry .conf contains
redundant slash like the following:
```
$ cat xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-5.9.8-200.fc33.x86_64.conf
title      Fedora 33 (Thirty Three)
version    5.9.8-200.fc33.x86_64
machine-id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
options    root=/dev/nvme0n1p2 ro rootflags=subvol=system/fedora selinux=0 audit=0
linux      //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/5.9.8-200.fc33.x86_64/linux
initrd     //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/5.9.8-200.fc33.x86_64/initrd
```

3 years agoman: bootctl set-default/oneshot accept an empty string
Yu Watanabe [Fri, 20 Nov 2020 09:43:13 +0000 (18:43 +0900)] 
man: bootctl set-default/oneshot accept an empty string

3 years agoRevert "semaphore: temporarily explicitly use the US image mirror"
Frantisek Sumsal [Thu, 29 Oct 2020 14:29:29 +0000 (15:29 +0100)] 
Revert "semaphore: temporarily explicitly use the US image mirror"

This reverts commit 9ac47d926146ed177aef805bba75f07bd3ed8643.

3 years agotest/test-functions: copy /usr/lib/pam.d into $initdir 17706/head
Dan Streetman [Fri, 20 Nov 2020 18:41:03 +0000 (13:41 -0500)] 
test/test-functions: copy /usr/lib/pam.d into $initdir

The systemd-user file has been moved from /etc/pam.d into /usr/lib/pam.d,
so test-functions needs to copy it from /usr/lib/pam.d instead.

This will copy it from either location.

3 years agounit: update comment about OOM score
Yu Watanabe [Fri, 20 Nov 2020 08:16:44 +0000 (17:16 +0900)] 
unit: update comment about OOM score

Follow-up for 6b2229c6c60d0486f5eb9ed3088f9c780d7c0233.

3 years agoMerge pull request #17669 from yuwata/coccinelle-update
Lennart Poettering [Mon, 23 Nov 2020 21:19:52 +0000 (22:19 +0100)] 
Merge pull request #17669 from yuwata/coccinelle-update

tree-wide: shorten code a bit suggested by coccinelle

3 years agoMerge pull request #17676 from yuwata/lgtm-fixes
Lennart Poettering [Mon, 23 Nov 2020 21:18:28 +0000 (22:18 +0100)] 
Merge pull request #17676 from yuwata/lgtm-fixes

tree-wide: several fixes prompted by LGTM

3 years agogpt: add RISC-V GPT partition typecode uuid
Dimitri John Ledkov [Mon, 23 Nov 2020 14:31:07 +0000 (14:31 +0000)] 
gpt: add RISC-V GPT partition typecode uuid

3 years agocurl-util: fix callback prototype
Etienne Doms [Fri, 20 Nov 2020 16:15:25 +0000 (17:15 +0100)] 
curl-util: fix callback prototype

CURLMOPT_SOCKETFUNCTION callback is an easy handle, not a multi.

3 years agoMerge pull request #17685 from yuwata/curl-no-oldies
Lennart Poettering [Mon, 23 Nov 2020 13:36:05 +0000 (14:36 +0100)] 
Merge pull request #17685 from yuwata/curl-no-oldies

meson: set CURL_NO_OLDIES in developer mode

3 years agoMerge pull request #17687 from yuwata/use-localtime_or_gmtime_r
Lennart Poettering [Mon, 23 Nov 2020 13:35:36 +0000 (14:35 +0100)] 
Merge pull request #17687 from yuwata/use-localtime_or_gmtime_r

use localtime_or_gmtime_r()

3 years agobacklight: add several debug logs and adjust log level of non critical error
Yu Watanabe [Mon, 23 Nov 2020 07:17:04 +0000 (16:17 +0900)] 
backlight: add several debug logs and adjust log level of non critical error

This may help to investigate issues.

3 years agonetworkd/dhcp6: allow layer3 devices without MAC
Jörg Thalheim [Sat, 14 Nov 2020 13:50:39 +0000 (14:50 +0100)] 
networkd/dhcp6: allow layer3 devices without MAC

Devices with multicast but without mac addresses i.e. tun devices
are not getting setuped correctly:

$ ip tuntap add mode tun dev tun0
$ ip addr show tun0
16: tun0: <NO-CARRIER,POINTOPOINT,MULTICAST,NOARP,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 500
    link/none
$ cat /etc/systemd/network/tun0.network
[Match]
Name = tun0

[Network]
Address=192.168.1.1/32
$ ./systemd-networkd
tun0: DHCP6 CLIENT: Failed to set identifier: Invalid argument
tun0: Failed

3 years agoman: Fix misspelling of directive and typos in systemd-coredump man page
vanou [Mon, 23 Nov 2020 12:21:46 +0000 (21:21 +0900)] 
man: Fix misspelling of directive and typos in systemd-coredump man page

This commit fixes
 * misspelling of LimitCORE directive of systemd.exec
 * typos
in systemd-coredump man page.

3 years agohwdb: set fuzz value for lenovo x240 touchpad to improve cursor precision (#17659)
Jérémy Nouhaud [Sun, 22 Nov 2020 23:30:08 +0000 (00:30 +0100)] 
hwdb: set fuzz value for lenovo x240 touchpad to improve cursor precision (#17659)

3 years agologs-show: use localtime_or_gmtime_r() 17687/head
Yu Watanabe [Fri, 20 Nov 2020 19:38:41 +0000 (04:38 +0900)] 
logs-show: use localtime_or_gmtime_r()

3 years agotimedate: use localtime_or_gmtime_r() and mktime_or_timegm()
Yu Watanabe [Fri, 20 Nov 2020 19:28:45 +0000 (04:28 +0900)] 
timedate: use localtime_or_gmtime_r() and mktime_or_timegm()

3 years agomeson: set CURL_NO_OLDIES in developer mode 17685/head
Yu Watanabe [Fri, 20 Nov 2020 16:52:47 +0000 (01:52 +0900)] 
meson: set CURL_NO_OLDIES in developer mode

3 years agocurl-util: fix type CURL -> CURLM
Yu Watanabe [Fri, 20 Nov 2020 16:51:03 +0000 (01:51 +0900)] 
curl-util: fix type CURL -> CURLM

3 years agounits: restore sysfs conditions in sys-fs-fuse-connections.mount and sys-kernel-confi...
Franck Bui [Fri, 20 Nov 2020 10:52:36 +0000 (11:52 +0100)] 
units: restore sysfs conditions in sys-fs-fuse-connections.mount and sys-kernel-config.mount

Commit 42cc2855ba2fe4c6f5d incorrectly removed the condition on sysfs in both
sys-fs-fuse-connections.mount and sys-kernel-config.mount. However there are
still needed in case modprobe of one of these modules is intentionally skipped
(due to lack of privs for example).

This patch restores the 2 conditions which should be safe for the common case,
since all conditions are only checked after all deps ordered before are
complete.

Follow-up for 42cc2855ba2fe4c6f5dc863507a1c843611350a0.

3 years agocore/mount: mount_start() may be called during the state is MOUNT_MOUNTING_DONE
Yu Watanabe [Tue, 17 Nov 2020 01:50:12 +0000 (10:50 +0900)] 
core/mount: mount_start() may be called during the state is MOUNT_MOUNTING_DONE

As, both MOUNT_MOUNTING and MOUNT_MOUNTING_DONE are mapped to
UNIT_ACTIVATING.

Fixes #17570.

3 years agocore: serialize u->pids until the processes have been moved to the scope cgroup
Franck Bui [Mon, 16 Nov 2020 14:12:21 +0000 (15:12 +0100)] 
core: serialize u->pids until the processes have been moved to the scope cgroup

Otherwise if a daemon-reload happens somewhere between the enqueue of the job
start for the scope unit and scope_start() then u->pids might be lost and none
of the processes specified by "PIDs=" will be moved into the scope cgroup.

3 years agoman: to make MACAddress= take effect, MACAddressPolicy= must be "none" 17680/head
Yu Watanabe [Fri, 20 Nov 2020 13:43:45 +0000 (22:43 +0900)] 
man: to make MACAddress= take effect, MACAddressPolicy= must be "none"

3 years agolink-config: warn when MACAddress= is set with MACAddressPolicy=persistent or random
Yu Watanabe [Fri, 20 Nov 2020 13:58:23 +0000 (22:58 +0900)] 
link-config: warn when MACAddress= is set with MACAddressPolicy=persistent or random

3 years agolink-config: make MACAddressPolicy= accept an empty string
Yu Watanabe [Fri, 20 Nov 2020 13:48:59 +0000 (22:48 +0900)] 
link-config: make MACAddressPolicy= accept an empty string

3 years agoMerge pull request #17649 from yuwata/resolve-dnssd-template-name
Lennart Poettering [Fri, 20 Nov 2020 13:56:59 +0000 (14:56 +0100)] 
Merge pull request #17649 from yuwata/resolve-dnssd-template-name

resolve: ignore invalid service template name

3 years agoMerge pull request #17658 from jwrdegoede/hwdb-accel-work
Lennart Poettering [Fri, 20 Nov 2020 13:49:41 +0000 (14:49 +0100)] 
Merge pull request #17658 from jwrdegoede/hwdb-accel-work

hwdb accel work

3 years agosystemctl: fix potential pointer overflow 17676/head
Yu Watanabe [Fri, 20 Nov 2020 10:50:33 +0000 (19:50 +0900)] 
systemctl: fix potential pointer overflow

3 years agotools: drop unnecessary "else" after for loop
Yu Watanabe [Fri, 20 Nov 2020 10:47:11 +0000 (19:47 +0900)] 
tools: drop unnecessary "else" after for loop

3 years agoask-passwd: drop a condition which is always false
Yu Watanabe [Fri, 20 Nov 2020 10:42:38 +0000 (19:42 +0900)] 
ask-passwd: drop a condition which is always false

3 years agoresolvectl: drop a condition which is always true
Yu Watanabe [Fri, 20 Nov 2020 10:39:49 +0000 (19:39 +0900)] 
resolvectl: drop a condition which is always true

3 years agopstore: use log_oom() 17669/head
Yu Watanabe [Thu, 19 Nov 2020 17:50:30 +0000 (02:50 +0900)] 
pstore: use log_oom()

3 years agococcinelle: always use SYNTHETIC_ERRNO() macro
Yu Watanabe [Thu, 19 Nov 2020 17:47:06 +0000 (02:47 +0900)] 
coccinelle: always use SYNTHETIC_ERRNO() macro

3 years agotree-wide: use return value of log_xxx_errno()
Yu Watanabe [Thu, 19 Nov 2020 17:35:24 +0000 (02:35 +0900)] 
tree-wide: use return value of log_xxx_errno()

3 years agococcinelle: add one more rule to use return value of log_xxx_errno()
Yu Watanabe [Thu, 19 Nov 2020 17:34:48 +0000 (02:34 +0900)] 
coccinelle: add one more rule to use return value of log_xxx_errno()

3 years agoseccomp: move brk+mmap+mmap2 into @default syscall filter set
Lennart Poettering [Thu, 19 Nov 2020 10:14:41 +0000 (11:14 +0100)] 
seccomp: move brk+mmap+mmap2 into @default syscall filter set

These three syscalls are internally used by libc's memory allocation
logic, i.e. ultimately back malloc(). Allocating a bit of memory is so
basic, it should just be in the default set.

This fixes a couple of issues with asan/msan and the seccomp tests: when
asan/msan is used some additional, large memory allocations take place
in the background, and unless mmap/mmap2/brk are allowlisted these will
fail, aborting the test prematurely.

3 years agoMerge pull request #17667 from fbuihuu/fix-module-loading-from-udev-rule
Zbigniew Jędrzejewski-Szmek [Thu, 19 Nov 2020 15:35:32 +0000 (16:35 +0100)] 
Merge pull request #17667 from fbuihuu/fix-module-loading-from-udev-rule

Fix module loading from udev rule

3 years agoman: suffix settings name with = and enclose in <varname>
Lennart Poettering [Wed, 18 Nov 2020 12:47:43 +0000 (13:47 +0100)] 
man: suffix settings name with = and enclose in <varname>

3 years agounits: wait until some fs modules are entirely loaded before mounting their correspon... 17667/head
Franck Bui [Thu, 19 Nov 2020 08:17:19 +0000 (09:17 +0100)] 
units: wait until some fs modules are entirely loaded before mounting their corresponding filesystem

udev requests to start the fs mount units when their respective module is
loaded. For that it monitors uevents of type "ADD" for the relevant fs modules.

However the uevent is sent by the kernel too early, ie before the init() of the
module is called hence before directories in /sys/fs/ are created.

This patch workarounds adds "Requires/After=modprobe@<fs-module>.service" to
the mount unit, which means that modprobe(8) will be called once the fs module
is announced to be loaded. This sounds pointless, but given that modprobe only
returns after the initialization of the module is complete, it should
workaround the issue.

As a side effect, the module will be automatically loaded if the mount unit is
started manually.

Fixes #17586.

3 years agoRevert "units: skip modprobe@.service if the unit appears to be already loaded"
Franck Bui [Thu, 19 Nov 2020 07:55:56 +0000 (08:55 +0100)] 
Revert "units: skip modprobe@.service if the unit appears to be already loaded"

This reverts commit 9cbf1e58f9629af5c6b56777ee73dc6320306d6d.

The presence of /sys/module/%I directory can't be used to assert that the load
of a given module is complete and therefore the call to modprobe(8) can be
skipped. Indeed this directory is created before the init() function of the
module is called.

Users of modprobe@.service needs to be sure that once this service returns the
module is fully operational.

3 years agohwdb: Add accel orientation quirk for Acer Aspire Switch 10 SW3-016 2-in-1 17658/head
Hans de Goede [Wed, 18 Nov 2020 16:11:50 +0000 (17:11 +0100)] 
hwdb: Add accel orientation quirk for Acer Aspire Switch 10 SW3-016 2-in-1

Add a quirk to fix the accelerometer orientation on the
Acer Aspire Switch 10 SW3-016 2-in-1.

3 years agohwdb: Add accel orientation quirk for Voyo Winpad A15 tablet
Hans de Goede [Sun, 15 Nov 2020 10:23:04 +0000 (11:23 +0100)] 
hwdb: Add accel orientation quirk for Voyo Winpad A15 tablet

Add a quirk to fix the accelerometer orientation on the
Voyo Winpad A15 tablet.

3 years agohwdb: Add accel orientation quirk for Lenovo ThinkPad Yoga 11e 4th gen
Hans de Goede [Sat, 14 Nov 2020 16:09:04 +0000 (17:09 +0100)] 
hwdb: Add accel orientation quirk for Lenovo ThinkPad Yoga 11e 4th gen

Add a quirk to fix the accelerometer orientation on the Lenovo
ThinkPad Yoga 11e 4th gen 360 degree hinges 2-in-1.

3 years agohwdb: Fix accel orientation quirk Z-axis for Lenovo ThinkPad Yoga 11e 3th gen
Hans de Goede [Sat, 14 Nov 2020 16:10:51 +0000 (17:10 +0100)] 
hwdb: Fix accel orientation quirk Z-axis for Lenovo ThinkPad Yoga 11e 3th gen

The Lenovo ThinkPad Yoga 11e 360 degree hinges style 2-in-1s use 2
accelerometers, 1 in the display and 1 in the base.

Kernel work is under way to also export the second accelerometer in
the base as an iio-device; and userspace work is underway to use
both accelerometers on 360 degree hinges style 2-in-1s (with 2 accels)
to figure out the angle between the 2 halves.

So far most orientation-matrix quirks have not cared much about the
Z-axis being correct, but in these 2 accelerometer setups getting
the Z-axis correct is important too.

3 years agohwdb: Add base accelerometer orientation quirk for base sensor of Medion Akoya E...
Hans de Goede [Wed, 18 Nov 2020 17:48:43 +0000 (18:48 +0100)] 
hwdb: Add base accelerometer orientation quirk for base sensor of Medion Akoya E* series

The KIOX010A and KIOX02A ACPI hw-ids (HIDs) are used in 360 degree hinges
style 2-in-1s which have 2 accelerometers, 1 in the display (as usual) and
a second accelerometer in the base.

So far 60-sensor.hwdb has only defined a mount-matrix for the
sensor with the KIOX010A HID, which is the sensor in the display
half of the device. The reason for this is that sofar userspace has
only cared actually used the sensor in the display (for automatic
display rotation. Work is underway to make userspace use both sensors:
https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/216

Recently an entry was added for the Medion Akoya's E2221T base-sensor,
but that was added to mark it with ACCEL_LOCATION=base and the entry
simply used the identity-matrix for ACCEL_MOUNT_MATRIX since nothing
is using the mount-matrix info for the second accelerometer.
I believe that this entry was added because on some devices the second
accelerometer gets enumerated first and then iio-sensor-proxy will
wrongly use the second sensor for display-rotation, unless it is marked
with ACCEL_LOCATION=base.

Instead of adding info for the second accelerometer on a per device
basis use the same generic dmi matches as used for the first (KIOX010A)
sensor, replacing the special case added for the E2221T and also
update the ACCEL_MOUNT_MATRIX with the actual mount-matrix for the
KIOX020A sensor in the base of these devices.

This was tested on a Medion Akoya E2228T.

3 years agohwdb: Document how to properly set the mount-matrix for the base-accelerometer in...
Hans de Goede [Wed, 18 Nov 2020 20:11:14 +0000 (21:11 +0100)] 
hwdb: Document how to properly set the mount-matrix for the base-accelerometer in 360 degree hinges style 2-in-1s with 2 accelerometers

Document how the mount-matrix for the base-accelerometer must be set on
360 degree hinges style 2-in-1s with 2 sensors (one in the display and
1 in the base).

Note the choice to define the lid being fully closed as an angle of
0 degrees is based on the ACPI tables of devices with a BOSC0200
ACPI device-node describing both sensors. In this case the ACPI
tables contain mount-matrix info (and the kernel will soon support
reading this and exporting it to userspace) and the mount-matrices
defined in these ACPI tables are such that the angle of the G-force
vector measured by the sensors is identical for both sensors when
the laptop's lid is fully closed.

This also feels more natural then defining the laptop being fully
open (180 degrees open) as the home / 0 degree angle position.

3 years agokhash: fix structured initializer
Yu Watanabe [Wed, 18 Nov 2020 07:43:58 +0000 (16:43 +0900)] 
khash: fix structured initializer

Fixes #17646.

3 years agoman: Fix sd_bus_message_append_array_space function signature
igo95862 [Wed, 18 Nov 2020 09:21:37 +0000 (12:21 +0300)] 
man: Fix sd_bus_message_append_array_space function signature

3 years agoMerge pull request #17651 from yuwata/the-the
Zbigniew Jędrzejewski-Szmek [Wed, 18 Nov 2020 08:32:09 +0000 (09:32 +0100)] 
Merge pull request #17651 from yuwata/the-the

tree-wide: fix "the the" and "that that"

3 years agoJOURNAL_FILE_FORMAT: fixup typos and punctuation
Vito Caputo [Tue, 17 Nov 2020 21:23:00 +0000 (13:23 -0800)] 
JOURNAL_FILE_FORMAT: fixup typos and punctuation

No significant changes

3 years agotree-wide: update "that that" 17651/head
Yu Watanabe [Wed, 18 Nov 2020 07:38:49 +0000 (16:38 +0900)] 
tree-wide: update "that that"

3 years agoman,NEWS: fix "the the"
Yu Watanabe [Wed, 18 Nov 2020 07:27:14 +0000 (16:27 +0900)] 
man,NEWS: fix "the the"

3 years agosd-device: drop unwanted newline in netlink message
Yu Watanabe [Mon, 16 Nov 2020 15:51:14 +0000 (00:51 +0900)] 
sd-device: drop unwanted newline in netlink message

3 years agotest/udev-test: gracefully exit when imports fail
Zbigniew Jędrzejewski-Szmek [Tue, 17 Nov 2020 16:13:31 +0000 (17:13 +0100)] 
test/udev-test: gracefully exit when imports fail

In Fedora rawhide various perl modules are now available as separate
packages that are not pulled in by dependencies. If we don't have some
package, skip the tests.

This ugly code is apparently the way to do conditional imports:
https://www.cs.ait.ac.th/~on/O/oreilly/perl/cookbook/ch12_03.htm.

3 years agoresolve: ignore invalid service template name 17649/head
Yu Watanabe [Tue, 17 Nov 2020 18:32:37 +0000 (03:32 +0900)] 
resolve: ignore invalid service template name

Let's fiest test the template name, and then assign it.

3 years agoresolve: make config_parse_dnssd_service_name() accepts an empty string
Yu Watanabe [Tue, 17 Nov 2020 18:23:32 +0000 (03:23 +0900)] 
resolve: make config_parse_dnssd_service_name() accepts an empty string

3 years agoresolve: add a short comment about difference between dnssd_render_instance_name...
Yu Watanabe [Tue, 17 Nov 2020 18:22:56 +0000 (03:22 +0900)] 
resolve: add a short comment about difference between dnssd_render_instance_name() and config_parse_dnssd_service_name()

3 years agoresolve: wrap long line
Yu Watanabe [Tue, 17 Nov 2020 18:20:30 +0000 (03:20 +0900)] 
resolve: wrap long line

3 years agoRevert "resolve: check DNSSD service name template before assigning it"
Roman Beranek [Tue, 17 Nov 2020 04:37:58 +0000 (05:37 +0100)] 
Revert "resolve: check DNSSD service name template before assigning it"

This reverts commit 34136e1503cf60852051adbd8b9a002d6282b750.

Having the "%H" host name specifier in a DNSSD service name template
triggers a failed assertion during name template instantiation as
specifier_dnssd_host_name expects DnssdService in its userdata
pointer but finds NULL instead.