Commit Graph

48132 Commits

Author SHA1 Message Date
Yu Watanabe 8dc1ad04c2 backlight: add several debug logs and adjust log level of non critical error
This may help to investigate issues.
2020-11-23 14:35:14 +01:00
Jörg Thalheim 1d370b2c18 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
2020-11-23 13:56:48 +01:00
vanou 207194c67f 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.
2020-11-23 13:49:53 +01:00
Jérémy Nouhaud 18f3bc96f9
hwdb: set fuzz value for lenovo x240 touchpad to improve cursor precision (#17659) 2020-11-23 09:30:08 +10:00
Yu Watanabe f9c443b7a4 logs-show: use localtime_or_gmtime_r() 2020-11-21 04:38:41 +09:00
Yu Watanabe 56b0ef2fc2 timedate: use localtime_or_gmtime_r() and mktime_or_timegm() 2020-11-21 04:28:45 +09:00
Yu Watanabe 435b5ba8d5 meson: set CURL_NO_OLDIES in developer mode 2020-11-21 01:55:41 +09:00
Yu Watanabe 2d052a0a48 curl-util: fix type CURL -> CURLM 2020-11-21 01:55:31 +09:00
Franck Bui 07ccf434e7 units: restore sysfs conditions in sys-fs-fuse-connections.mount and sys-kernel-config.mount
Commit 42cc2855ba 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 42cc2855ba.
2020-11-21 01:10:17 +09:00
Yu Watanabe db39a62784 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.
2020-11-20 16:41:40 +01:00
Franck Bui 428a9f6f1d 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.
2020-11-20 15:57:59 +01:00
Yu Watanabe 6ca4a07077 man: to make MACAddress= take effect, MACAddressPolicy= must be "none" 2020-11-20 23:07:21 +09:00
Yu Watanabe a7a12bf404 link-config: warn when MACAddress= is set with MACAddressPolicy=persistent or random 2020-11-20 22:59:12 +09:00
Yu Watanabe d03cb6b85d link-config: make MACAddressPolicy= accept an empty string 2020-11-20 22:59:12 +09:00
Lennart Poettering eebd1c3ad2
Merge pull request #17649 from yuwata/resolve-dnssd-template-name
resolve: ignore invalid service template name
2020-11-20 14:56:59 +01:00
Lennart Poettering cd580a31ae
Merge pull request #17658 from jwrdegoede/hwdb-accel-work
hwdb accel work
2020-11-20 14:49:41 +01:00
Yu Watanabe e23baae0da systemctl: fix potential pointer overflow 2020-11-20 21:58:47 +09:00
Yu Watanabe 45752a2495 tools: drop unnecessary "else" after for loop 2020-11-20 19:47:11 +09:00
Yu Watanabe 48b11b09ab ask-passwd: drop a condition which is always false 2020-11-20 19:42:38 +09:00
Yu Watanabe 283ec78963 resolvectl: drop a condition which is always true 2020-11-20 19:39:49 +09:00
Yu Watanabe 1058390d20 pstore: use log_oom() 2020-11-20 02:59:02 +09:00
Yu Watanabe 0aa8730edc coccinelle: always use SYNTHETIC_ERRNO() macro 2020-11-20 02:59:00 +09:00
Yu Watanabe fed66db05d tree-wide: use return value of log_xxx_errno() 2020-11-20 02:58:27 +09:00
Yu Watanabe a61c0bdf39 coccinelle: add one more rule to use return value of log_xxx_errno() 2020-11-20 02:57:26 +09:00
Lennart Poettering 5abede3247 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.
2020-11-19 16:44:50 +01:00
Zbigniew Jędrzejewski-Szmek bca0618705
Merge pull request #17667 from fbuihuu/fix-module-loading-from-udev-rule
Fix module loading from udev rule
2020-11-19 16:35:32 +01:00
Lennart Poettering bb4cbb25d4 man: suffix settings name with = and enclose in <varname> 2020-11-19 16:16:17 +01:00
Franck Bui 42cc2855ba 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.
2020-11-19 11:50:52 +01:00
Franck Bui b3e32582f6 Revert "units: skip modprobe@.service if the unit appears to be already loaded"
This reverts commit 9cbf1e58f9.

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.
2020-11-19 09:49:42 +01:00
Hans de Goede 86de5e4239 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.
2020-11-18 21:23:35 +01:00
Hans de Goede 565849429d hwdb: Add accel orientation quirk for Voyo Winpad A15 tablet
Add a quirk to fix the accelerometer orientation on the
Voyo Winpad A15 tablet.
2020-11-18 21:23:35 +01:00
Hans de Goede 169cd66baa 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.
2020-11-18 21:23:35 +01:00
Hans de Goede 21b58655f3 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.
2020-11-18 21:23:35 +01:00
Hans de Goede 276ede0740 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.
2020-11-18 21:23:34 +01:00
Hans de Goede b24e437ab0 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.
2020-11-18 21:20:21 +01:00
Yu Watanabe f56a9cbf9c khash: fix structured initializer
Fixes #17646.
2020-11-18 11:15:05 +01:00
igo95862 0e577869f3 man: Fix sd_bus_message_append_array_space function signature 2020-11-18 18:26:14 +09:00
Zbigniew Jędrzejewski-Szmek e0300086ba
Merge pull request #17651 from yuwata/the-the
tree-wide: fix "the the" and "that that"
2020-11-18 09:32:09 +01:00
Vito Caputo e3500e9d21 JOURNAL_FILE_FORMAT: fixup typos and punctuation
No significant changes
2020-11-18 09:29:58 +01:00
Yu Watanabe 273d76f4f8 tree-wide: update "that that" 2020-11-18 17:23:00 +09:00
Yu Watanabe 10f3484950 man,NEWS: fix "the the" 2020-11-18 16:27:14 +09:00
Yu Watanabe b9cbb08e0a sd-device: drop unwanted newline in netlink message 2020-11-18 05:32:44 +09:00
Zbigniew Jędrzejewski-Szmek d407638382 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.
2020-11-18 03:50:17 +09:00
Yu Watanabe dd2e9e1d0e resolve: ignore invalid service template name
Let's fiest test the template name, and then assign it.
2020-11-18 03:32:40 +09:00
Yu Watanabe 0c949643b8 resolve: make config_parse_dnssd_service_name() accepts an empty string 2020-11-18 03:23:32 +09:00
Yu Watanabe a37eb63ffa resolve: add a short comment about difference between dnssd_render_instance_name() and config_parse_dnssd_service_name() 2020-11-18 03:22:56 +09:00
Yu Watanabe d63542bc02 resolve: wrap long line 2020-11-18 03:20:30 +09:00
Roman Beranek 07e4a8dc23 Revert "resolve: check DNSSD service name template before assigning it"
This reverts commit 34136e1503.

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.
2020-11-18 03:16:57 +09:00
Zbigniew Jędrzejewski-Szmek 478f5aac07 hwdb/60-keyboard: untabify and move comments to the same column
Follow-up for b0a3a3ff5d.
2020-11-18 02:14:32 +09:00
Zbigniew Jędrzejewski-Szmek 1598b07da3
Merge pull request #17640 from keszybz/meson-test-c++20
Also test headers against c++20
2020-11-17 17:14:49 +01:00