1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00
Commit Graph

61473 Commits

Author SHA1 Message Date
uerdogan
d8100dd17e
Update 60-evdev.hwdb (#25704)
This solves Debian Bug report 1008760:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008760.

Solution was inspired by this kernel bug report message:
https://bugzilla.kernel.org/show_bug.cgi?id=204967#c15.

My measured pad dimensions with a ruler were 85x44mm.
But I decided to take the 2x size reported by the current kernel
when invoking the touchpad-edge-detector command from the
libdev-tools package. Because this comment claims that the old
vs new kernel reportings differ by factor 2:
https://bugzilla.kernel.org/show_bug.cgi?id=204967#c3 .

Therefore I have used this command to get the new entry to 60-evdev.hwdb:

"root@pb:~# touchpad-edge-detector 80x34 /dev/input/event2
Touchpad ETPS/2 Elantech Touchpad on /dev/input/event2

Move one finger around the touchpad to detect the actual edges
Kernel says:	x [0..1254], y [0..528]
Touchpad sends:	x [0..2472], y [-524..528] -^C

Touchpad size as listed by the kernel: 40x17mm
User-specified touchpad size: 80x34mm
Calculated ranges: 2472/1052

Suggested udev rule:
# <Laptop model description goes here>
evdev:name:ETPS/2 Elantech Touchpad:dmi:bvnPackardBell:bvrV1.21:bd08/09/2012:br21.240:svnPackardBell:pnEasyNoteTS11HR:pvrV1.21:rvnPackardBell:rnSJV50_HR:rvrBaseBoardVersion:cvnPackardBell:ct10:cvrV1.21:*
 EVDEV_ABS_00=0:2472:31
 EVDEV_ABS_01=-524:528:31
 EVDEV_ABS_35=0:2472:31
 EVDEV_ABS_36=-524:528:31
"
2022-12-12 20:46:50 +00:00
Zbigniew Jędrzejewski-Szmek
f8717d2a72 udevadm: emit deprecation notice in udevadm hwdb
This tool was "deprecated" back in 65eb4378c3,
but only by removing documentation. This is somewhat surprising, but udevadm
hwdb --update and systemd-hwdb update generate different databases. udevadm
runs in compat mode and (as far as I have been able to figure out from a quick
look), it omits filename information and does some other changes to the
datastructures. The consuming code (udev) is the same in both cases, so this
"compatibility mode" seems very strange. But I don't think it's worth trying to
figure out why things were done this way. Let's just push people towards the
new code.

Inspired by https://github.com/systemd/systemd/issues/25698#issuecomment-1346298094.
2022-12-12 21:45:28 +01:00
Will Fancher
01fdfbb82c sysroot: Support x-systemd.makefs 2022-12-12 21:45:06 +01:00
Luca Boccassi
b8b84c6e5e
Merge pull request #25646 from yuwata/sd-id128-enomedium
sd-id128: make sd_id128_get_machine() return -ENOMEDIUM when not initialized
2022-12-12 21:42:36 +01:00
Lennart Poettering
e591cd5c8a update TODO 2022-12-12 15:44:29 +01:00
Luca Boccassi
de1b92ebe1
Merge pull request #25615 from DaanDeMeyer/mkosi-kconfig
mkosi: Rework kconfig handling
2022-12-12 15:30:07 +01:00
Luca Boccassi
97ad3e6a2c
Merge pull request #25692 from yuwata/resolve-rr-txt
resolve: drop recurstion from TXT field handling
2022-12-12 14:13:16 +01:00
Yu Watanabe
b40c8ebdc8 sd-id128: fold do_sync flag into Id128FormatFlag 2022-12-12 22:07:48 +09:00
Yu Watanabe
c576920e67 man: mention that sd_id128_get_boot() and friend may return -ENOSYS
And drop to mention sd_id128_get_boot_app_specific() may return -ENOENT
or -ENOMEDIUM. The function does not read /etc/machine-id. But reads a
file in the procfs, which is a kind of the kernel API. Hence the
failures are caused only when the system has wrong setup.
2022-12-12 22:06:35 +09:00
Yu Watanabe
e2720340e9 sd-id128: make sd_id128_get_boot() and friend return -ENOSYS when /proc/ is not mounted 2022-12-12 22:04:53 +09:00
Yu Watanabe
9be90c401e sd-id128: make sd_id128_get_boot() and friend return -ENOMEDIUM 2022-12-12 22:04:53 +09:00
Yu Watanabe
a237c6e0b0 man: mention sd_id128_get_machine() or friend may return -ENOPKG 2022-12-12 21:57:31 +09:00
Yu Watanabe
66c7949e08 test: add tests for "uninitialized" string handling by id128_read_fd() 2022-12-12 21:57:31 +09:00
Yu Watanabe
057bf780e9 sd-id128: make id128_read() or friends return -ENOPKG when the file contents is "uninitialized"
Then, this drops ID128_PLAIN_OR_UNINIT. Also, this renames
Id128Format -> Id128FormatFlag, and make it bitfield.

Fixes #25634.
2022-12-12 21:57:31 +09:00
Yu Watanabe
28bf2de201 sd-id128: several cleanups
- use SD_ID128_STRING_MAX or friend,
- use sizeof(sd_id128_t),
- use newly introduced ascii_ishex().
2022-12-12 21:48:47 +09:00
Yu Watanabe
0ce8870f19 string-util: introduce ascii_ishex() 2022-12-12 21:47:22 +09:00
Luca Boccassi
30338b8b66
Merge pull request #25707 from yuwata/sd-device-fix-double-free
sd-device: fix double-free
2022-12-12 13:26:42 +01:00
Lennart Poettering
a0bccdd375 update TODO 2022-12-12 12:59:30 +01:00
Yu Watanabe
733529d812 test: name_assign_type sysattr never exists for enumerated devices
As we filtered out network devices in the test.
2022-12-12 15:04:39 +09:00
Yu Watanabe
eb18e7b782 sd-device: fix double-free
If an attribute is read but the value is not used (i.e. ret_value is NULL),
then sd_device_get_sysattr_value() mistakenly frees the read data even though
it is cached internally.

Fixes a bug introduced by acfc2a1d15.

Fixes #25702.
2022-12-12 14:20:47 +09:00
Hugo Carvalho
4113a3e0f3 po: Translated using Weblate (Portuguese)
Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Hugo Carvalho <hugokarvalho@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pt/
Translation: systemd/main
2022-12-12 13:26:55 +09:00
Lycowolf
67065750c5 Add mount matrix for VisionBook 12Wr Tab 2022-12-12 13:24:00 +09:00
Lennart Poettering
09e917ea4d repart: support erofs
So, i think "erofs" is probably the better, more modern alternative to
"squashfs". Many of the benefits don't matter too much to us I guess,
but there's one thing that stands out: erofs has a UUID in the
superblock, squashfs has not. Having an UUID in the superblock matters
if the file systems are used in an overlayfs stack, as overlayfs uses
the UUIDs to robustly and persistently reference inodes on layers in
case of metadata copy-up.

Since we probably want to allow such uses in overlayfs as emplyoed by
sysext (and the future syscfg) we probably should ramp up our erofs game
early on. Hence let's natively support erofs, test it, and in fact
mention it in the docs before squashfs even.
2022-12-10 11:26:36 +01:00
jcg
5e5fce3e91 mount-setup: don't need to mount /sys/fs/pstore if there is no ENABLE_PSTORE 2022-12-10 12:02:25 +09:00
Yu Watanabe
068ef623bd resolve: add missing assertion 2022-12-10 10:32:29 +09:00
Yu Watanabe
14822ede9f resolve: shorten code a bit 2022-12-10 10:32:29 +09:00
Yu Watanabe
494ef16743 resolve: drop recursion in TXT field handling
Fixes #25683.
2022-12-10 10:32:09 +09:00
Daan De Meyer
52c602d4c6 ci: Labeler improvements
- Mention "/please-review" in the contributing guide
- Remove "needs-rebase" on push
- Don't add "please-review" if a green label is set
- Don't add please-review label to draft PRs
- Add please-review when a PR moves out of draft
2022-12-09 15:37:43 +01:00
Zbigniew Jędrzejewski-Szmek
7aebbdcfa9
Merge pull request #25636 from thom311/th/wcast-align-fixes
all: avoid various "-Wcast-align=strict" warnings
2022-12-09 15:03:45 +01:00
Thomas Haller
6759b62720
all: avoid various "-Wcast-align=strict" warnings 2022-12-09 08:58:07 +01:00
Zbigniew Jędrzejewski-Szmek
7b37aea98c
Merge pull request #25653 from yuwata/base64_append
hexdecoct: several fixes for base64_append()
2022-12-08 21:22:32 +01:00
Yu Watanabe
029a7f5a0e fuzz: shorten filename of testcase
Follow-up for 46dc071985 and
76519cecc7.
2022-12-09 05:01:04 +09:00
Yu Watanabe
b9152f2d63 resolve: optimize conversion of TXT fields to json
Fixes oss-fuzz#54080 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54080).

Fixes #25654.
2022-12-09 04:59:49 +09:00
Yu Watanabe
7d34567444 hexdecoct: fix NULL pointer dereferences in hexmem()
Fixes oss-fuzz#54090 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54090).

Fixes #25655.
2022-12-09 04:55:47 +09:00
Yu Watanabe
45655e776f hexdecoct: add missing NULL check
Fixes oss-fuzz#54065 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54065).

Fixes #25650.
2022-12-09 04:54:43 +09:00
Yu Watanabe
6b0df52e58 test: add tests for base64_append() 2022-12-09 04:53:50 +09:00
Yu Watanabe
c21b316964 hexdecoct: several cleanups for base64_append()
- add missing assertions,
- use size_t for buffser size or memory index,
- handle empty input more gracefully,
- return the length or the result string,
- fix off-by-one issue when the prefix is already long enough.
2022-12-09 04:53:50 +09:00
Edson Juliano Drosdeck
1feb9743d0
hwdb: add Positivo-vaio Pro PW key toggle touchpad (#25669) 2022-12-09 04:51:09 +09:00
Daan De Meyer
8fc78e6845 ci: Add/Drop labels on pull request activity and comment
When a pull request is opened/updated, add "please-review" and
remove a few other labels.

When a comment is made with /please-review on a PR. Add the
"please-review" label to the PR.
2022-12-09 04:50:13 +09:00
Lennart Poettering
b6256af75e socket-util: add CMSG_TYPED_DATA() as type-safe wrapper around CMSG_DATA() 2022-12-08 17:48:34 +01:00
Thomas Haller
86bdf11714 fundamental: add CAST_ALIGN_PTR() macro 2022-12-08 17:34:20 +01:00
Lennart Poettering
d20ea2c515
Merge pull request #25662 from msizanoen1/s2h-nosuspend-user-proc
sleep: always thaw user.slice even if freezing failed
2022-12-08 17:24:52 +01:00
Lennart Poettering
93c1baa0c8
Merge pull request #25667 from poettering/sha256-align-fix
sha256 alignment fixes/rework
2022-12-08 17:24:17 +01:00
Lennart Poettering
39a72c13b8
Merge pull request #25665 from poettering/dissect-memory
dissect: add a mode for operating on an in-memory copy of a DDI, inst…
2022-12-08 17:23:15 +01:00
Yu Watanabe
340bc268c8 fs-util: make chmod_and_chown_at() work with empty path and AT_FDCWD
Follow-up for 7d000133c2.

Fixes CID#1500608.
2022-12-08 15:57:33 +01:00
Lennart Poettering
a0ccc18e89 sha256: port to new generic IS_ALIGNED32() macro
This drops the special casing for s390 and other archs, which was
cargo-culted from glibc. Given it's not obvious why it exists, and is at
best an optimization let's simply avoid it, in particular as the archs
are relatively non-mainstream.

Inspired by: #25636
2022-12-08 15:30:41 +01:00
Lennart Poettering
4f07388360 macro: add generic IS_ALIGNED32() anf friends
Let's generalize (and invert) the UNALIGNED32_P() macro from the sha256
code, and let's add a test for it.
2022-12-08 15:30:31 +01:00
Lennart Poettering
22e339761b sha256: move to unaligned_write_ne32() 2022-12-08 15:18:47 +01:00
Lennart Poettering
d8007e7aac fundamental: split out unaligned_{read|write}_ne{16,32,64}() helpers into unaligned-fundamental.h
Let's allow using this in code shared between userspace and EFI mode.

Also, don't implement these functions via endianness conversions given
we don't actually want to convert endianess here.
2022-12-08 15:18:47 +01:00
Lennart Poettering
17b296a118 sha256: external headers should be included with <> 2022-12-08 15:18:46 +01:00