Frantisek Sumsal
842a9d5f91
test: kill the machine on oops/panic/soft_lockup
...
Otherwise the machine will hang on the panic until the timeout happens,
which might waste quite a considerable amount of time in certain cases.
2022-09-30 18:46:30 +09:00
Lennart Poettering
acf2de5217
manager: make clear internal Dump() logic is debugging only.
2022-09-30 11:32:24 +02:00
Lennart Poettering
0df8512124
man: document the Dump() calls of the PID 1 D-Bus interface, and what they are
2022-09-30 11:32:24 +02:00
Adam Williamson
950aeeb8ff
kbd-model-map: correct variants for cz-qwerty to include comma
...
As explained by @poncovka , the 'xvariant' string should contain
the same number of comma-separated elements as 'xlayout'. When
we have two layouts we need two items in xvariant, in this case
one of them is empty.
See https://github.com/rhinstaller/anaconda/pull/4355#pullrequestreview-1119913870
for @poncovka's full explanation.
Signed-off-by: Adam Williamson <awilliam@redhat.com >
2022-09-29 23:53:26 +01:00
Frantisek Sumsal
9b2e40a885
Merge pull request #24865 from yuwata/udevadm-tweaks
...
udevadm: fix misleading error message
2022-09-30 00:01:48 +02:00
JeroenHD
792c779f7d
Add special keyboard combos for Thinkpad P1 Gen 3 ( #24862 )
...
* Add special keyboard combos for Thinkpad P1 Gen 3
These are based on the key codes I've found with evtest. See issue
https://github.com/systemd/systemd/issues/24814 for more details.
I'm not entirely sure what some of these keys are supposed to do,
notably Fn+RShift; this doesn't seem to do anything in Windows on
my machine. Binding them to prog# makes them available to desktop
managers' key bindings at least, in case someone wishes to make
use of this extra keybind possibility.
2022-09-29 21:23:42 +01:00
Yu Watanabe
ad8c442a0b
test-64-udev-storage: use wait command instead of hackish "udevadm lock true"
...
Otherwise, "udevadm lock true" may lock a block device earlier than
"udevadm lock sfdisk &".
2022-09-30 03:42:05 +09:00
Yu Watanabe
4273a041f1
udevadm: do not try to find device unit when a path like string is provided
...
Otherwise, we provide misleading error message.
Before:
---
$ udevadm info /sys/class/foo
Bad argument "/sys/class/foo", expected an absolute path in /dev/ or /sys/ or a unit name: Invalid argument
---
After:
---
$ udevadm info /sys/class/foo
Unknown device "/sys/class/foo": No such device
---
2022-09-30 02:05:09 +09:00
Zbigniew Jędrzejewski-Szmek
3efadceb9e
docs/CONTRIBUTING: explain various labels and add link to "reviewable" PRs
...
The linked filter gives an up-to-date list of pull requests that need review.
(Yes, there's too many.) We used to set 'needs-review' label, but that is
not available to non-members, and also every pull requests which is not labeled
'reviewed/needs-rework'/'ci-fails/needs-rework'/'needs-rebase' can and should
be reviewed.
If this is merged, I'll drop the 'needs-review' label.
2022-09-30 01:23:30 +09:00
Frantisek Sumsal
fa21a2cf9f
test: bump the reattach timeout when running w/ plain QEMU
...
As it might sometimes take slightly longer without the acceleration:
```
[ 176.805681] testsuite-29.sh[534]: + cp /usr/share/app1.raw /tmp/app1_2.raw
[ 176.885365] testsuite-29.sh[534]: + timeout 30 portablectl reattach --now --runtime --extension /tmp/app1_2.raw /usr/share/minimal_1.raw app1
[ 177.053358] portablectl[993]: (Matching unit files with prefixes 'app1'.)
[ 177.138770] kernel: loop0: detected capacity change from 0 to 2965504
[ 177.343137] kernel: loop1: detected capacity change from 0 to 4096
...
[ 201.932062] systemd[1]: app1.service: Deactivated successfully.
[ 202.009310] systemd[1]: Stopped app1.service.
[ 202.053776] systemd[1]: app1.service: Consumed 2.183s CPU time.
[ 202.125061] systemd[1]: Stopping app1.service...
[ 202.611760] systemd[1]: Starting modprobe@dm_mod.service...
[ 202.851031] systemd[1]: Starting modprobe@dm_verity.service...
[ 202.909352] systemd[1]: Starting modprobe@loop.service ...
[ 203.198918] systemd[1]: Starting app1.service...
[ 207.145494] kernel: audit: type=1130 audit(1663770336.105:428): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=testsuite-29 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
[ 207.652545] systemd[1]: testsuite-29.service: Main process exited, code=exited, status=124/n/a
[ 207.665088] systemd[1]: testsuite-29.service: Failed with result 'exit-code'.
[ 207.830522] systemd[1]: Failed to start testsuite-29.service.
...
[ 208.889449] script1.sh[1035]: ID="centos"
[ 208.889449] script1.sh[1035]: VERSION_ID="8"
[ 208.889449] script1.sh[1035]: SYSEXT_SCOPE=portable
[ 208.889449] script1.sh[1035]: PORTABLE_PREFIXES=app1
...
[ 214.155097] systemd[1]: app1.service: Deactivated successfully.
```
Spotted in Ubuntu CI and CentOS CI.
Follow-up to 706c9a30ac .
2022-09-30 00:16:45 +09:00
Jan Janssen
957dfcc96d
stub: Remove unused function parameter
2022-09-29 10:30:37 +02:00
Lennart Poettering
1aefb25f37
resolved: paranoia: restrict socket mode as much as we can
2022-09-29 00:42:14 +01:00
Frantisek Sumsal
5ad1513845
test: wrap ls and stat to make it work w/ sanitizers in specific cases
...
When `/etc/nsswitch.conf` uses `systemd` together with `[SUCCESS=merge]`,
`ls -l` will pull in `libnss_systemd` causing `SIGABRT`, as `ls` is not
instrumented (by default):
```
-bash-5.1# strace -f -e %file ls -l /dev
execve("/usr/bin/ls", ["ls", "-l", "/dev"], 0x7ffc3bb211c8 /* 24 vars*/) = 0
...
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=1896, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=359, ...}, 0) = 0
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=965, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10779, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/lib/libnss_systemd.so.2", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=16195176, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/lib/libasan.so.8", O_RDONLY|O_CLOEXEC) = 3
...
readlink("/proc/self/exe", "/usr/bin/ls", 4096) = 11
open("/proc/self/cmdline", O_RDONLY) = 3
open("/proc/self/environ", O_RDONLY) = 3
==620==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=620, si_uid=0} ---
+++ killed by SIGABRT (core dumped) +++
Aborted (core dumped)
```
This also happens with `stat`. Let's add both `ls` and `stat` to the "wrap list"
to work around this.
Spotted on Arch Linux.
2022-09-28 22:39:18 +01:00
Lennart Poettering
5cf4b2e597
resolvectl: add line breaks for readability
2022-09-28 23:03:58 +02:00
Lennart Poettering
411d095d79
resolved: don't access sshfp fields from tlsa printer
2022-09-28 22:52:05 +02:00
Lennart Poettering
43bd70d584
resolved: return regular varlink invalid parameter error if more is not specified on monitor call
...
No point in returning EINVAL if we can just return a proper varlink
invalid parameter error
2022-09-28 22:51:51 +02:00
Lennart Poettering
63fe457c1b
resolved: fix parameter reuse in DNS_ANSWER_FOREACH_ITEM() iterator macro
2022-09-28 22:51:36 +02:00
Frantisek Sumsal
07faa4990f
test: fix a copy-paste error
2022-09-28 14:03:03 +02:00
Daan De Meyer
4c35aed7f0
Merge pull request #24837 from yuwata/kernel-install
...
kernel-install: two fixlets
2022-09-28 10:50:55 +02:00
Zbigniew Jędrzejewski-Szmek
470c9768c1
coredump: print build-id only when package version is missing
...
The build-id is quite verbose, and probably not very useful to a user when they
already know the nvra of the package.
2022-09-28 10:48:25 +02:00
Zbigniew Jędrzejewski-Szmek
1a0281a3eb
coredump: shorten output about package metadata to one line
...
We would print the whole thing in extenso. Users generally don't care,
and would likely prefer to just get the compact identifier of the package
that they can use in a bug report or package manager commands.
Before:
systemd-coredump[40645]: [🡕] Process 1975 (gnome-shell) of user 1000 dumped core.
Module /usr/bin/gnome-shell (deleted) with build-id aafdb7d69a7efca937e490080ad9348541fc57d8
Metadata for module /usr/bin/gnome-shell (deleted) owned by FDO found: {
"type" : "rpm",
"name" : "gnome-shell",
"version" : "43~rc-3.fc37",
"architecture" : "x86_64",
"osCpe" : "cpe:/o:fedoraproject:fedora:37"
}
Module /usr/lib64/gnome-shell/libgvc.so (deleted) with build-id 56cbb9862e1ee84ca1549b94f2b4cda03537613e
Metadata for module /usr/lib64/gnome-shell/libgvc.so (deleted) owned by FDO found: {
"type" : "rpm",
"name" : "gnome-shell",
"version" : "43~rc-2.fc37",
"architecture" : "x86_64",
"osCpe" : "cpe:/o:fedoraproject:fedora:37"
}
Module /usr/lib64/libLLVM-14.so (deleted) with build-id ffa7e43f48eb4c189304c0241b1862710de4c3a4
Metadata for module /usr/lib64/libLLVM-14.so (deleted) owned by FDO found: {
"type" : "rpm",
"name" : "gnome-shell",
"version" : "43~rc-2.fc37",
"architecture" : "x86_64",
"osCpe" : "cpe:/o:fedoraproject:fedora:37"
}
After:
systemd-coredump[235218]: [🡕] Process 235216 (bash) of user 1000 dumped core.
Module libtinfo.so.6 from rpm ncurses-6.3-3.20220501.fc37.x86_64, build-id=71a04d23fd572525eb6efc47026c379725e06d96
Module bash from rpm bash-5.1.16-3.fc37.x86_64, build-id=6c936aff95a2ccda04a3fb685a81a84a0a8d10da
Stack trace of thread 235216:
#0 0x00007fa409ec8d8b kill (libc.so.6 + 0x38d8b)
#1 0x0000560d35e366b1 kill_builtin (bash + 0xad6b1)
#2 0x0000560d35dd7227 execute_builtin.lto_priv.0 (bash + 0x4e227)
#3 0x0000560d35dd0459 execute_simple_command (bash + 0x47459)
#4 0x0000560d35dd1de0 execute_command_internal (bash + 0x48de0)
#5 0x0000560d35e307aa parse_and_execute (bash + 0xa77aa)
#6 0x0000560d35e91b08 run_one_command.isra.0 (bash + 0x108b08)
#7 0x0000560d35dba07c main (bash + 0x3107c)
#8 0x00007fa409eb3510 __libc_start_call_main (libc.so.6 + 0x23510)
#9 0x00007fa409eb35c9 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x235c9)
#10 0x0000560d35dbad85 _start (bash + 0x31d85)
2022-09-28 10:47:42 +02:00
Yu Watanabe
4f0ad43e24
loop-util: re-introduce loop_device_open() which takes sd_device object
...
Then, this makes loop_device_open_from_fd() or _from_path() be wrappers
of loop_device_open() with block_device_new_from_fd() or _from_path(),
respectively.
2022-09-28 17:42:37 +09:00
Yu Watanabe
de3b7f168e
loop-util: rename loop_device_open() -> loop_device_open_from_path()
...
No functional changes, just preparation for later commits.
2022-09-28 17:42:37 +09:00
Yu Watanabe
fd690a4b7f
blockdev-util: introduce block_device_new_from_fd() and block_device_new_from_path()
...
These are possible replacements of get_block_device(),
get_block_device_harder(), path_get_whole_disk(), and friends.
2022-09-28 17:42:23 +09:00
Yu Watanabe
612fc70fc0
blockdev-util: re-implement block_get_originating() by using sd_device
...
And split out the core logic as block_device_get_originating().
Hopefully, this changes no behavior. Just refactoring and preparation
for later commits.
2022-09-28 17:41:09 +09:00
Yu Watanabe
446f8db66b
blockdev-util: reopen file descriptor only when O_PATH is set
...
Prompted by 13879c54d4 .
2022-09-28 17:41:09 +09:00
Yu Watanabe
7e4a0387c4
blockdev-util: split-out fd_get_devnum()
...
No functional changes, just preparation for later commits.
2022-09-28 17:41:09 +09:00
Zbigniew Jędrzejewski-Szmek
87707784c7
coredump: when parsing json, optionally copy the string first
2022-09-28 09:38:13 +02:00
Yu Watanabe
c5654483dc
fuzz: tighten acceptable data size
...
Fixes oss-fuzz#51887 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51887 ).
Fixes #24833 .
2022-09-28 09:12:36 +02:00
Sarah Brofeldt
f8151a707c
docs/NETWORK_ONLINE: systemd.network hyperlink fix
2022-09-28 15:48:39 +09:00
Yu Watanabe
c561c78063
kernel-install: do not fail if a plugin exits with 77
2022-09-28 13:36:38 +09:00
Yu Watanabe
46f347ada3
kernel-install: do not fail if $layout is not "bls"
...
Fixes #24836 .
2022-09-28 13:36:29 +09:00
msizanoen1
b49e029a99
resolve: persist DNSOverTLS configuration in state file
...
Currently, NetworkManager will set DNSOverTLS according to its
`connection.dnsovertls` configuration only once during connection,
instead of every single restart of systemd-resolved, causing resolved to
lose the configuration on restart.
Fix this by persisting DNSOverTLS in the runtime state file, which will
also make it more consistent with other interface-specific settings.
2022-09-28 08:09:06 +09:00
Edson Juliano Drosdeck
f58ab54a2b
hwdb: fix Positivo-vaio FE14 V2 key toggle touchpad #24822 ( #24825 )
2022-09-28 08:06:34 +09:00
Luca Boccassi
0e26016e3d
resolved notifications: follow-up fixes
...
Further review comments from: https://github.com/systemd/systemd/pull/22845
2022-09-27 22:34:17 +01:00
Yu Watanabe
8aeccfdedf
mkosi: install fdisk for test-loop-block
2022-09-28 03:06:27 +09:00
Yu Watanabe
baf0ab691c
test: add test for dissect_image_file()
2022-09-28 03:06:27 +09:00
Yu Watanabe
08f14be417
dissect-image: introduce dissect_image_file() which works for regular file
2022-09-28 03:06:27 +09:00
Yu Watanabe
698bb074a3
dissect-image: split-out dissected_image_probe_filesystem()
...
No functional changes, just preparation for later commits.
2022-09-28 03:06:27 +09:00
Yu Watanabe
a13231a904
Merge pull request #24832 from mrc0mmand/more-TEST-64-tweaks
...
A couple of performance tweaks for TEST-64 under QEMU
2022-09-28 02:26:55 +09:00
Zbigniew Jędrzejewski-Szmek
1401882fdd
tmpfiles: downgrade message about unitialized-/etc
...
If we're running with --root, or in a chroot (*), it's expected that machine-id
and other specifiers will be unresolvable, so downgrade the warning to debug.
Fixes #24655 .
(*) sd_booted() in principle means more than that, but nowadays systemd
dominates and those others things are infrequently seen.
2022-09-27 16:59:24 +02:00
Zbigniew Jędrzejewski-Szmek
6db980988f
tmpfiles: fix detection of unitialized-/etc
...
In 6ec4c852c9 I changed specifier_machine_id() to
return EUNATCH, but the code catching in tmpfiles wasn't adjusted.
Instead of translating errors at various levels, let the "original" errno value
(whatever was returned by the low-level reading function) propagate all the way
to the logging function, and only check which errnos to suppress there. This
makes it easier to follow the flow of data through all the layers. Also, we
don't need to provide wrapper functions for each place where we want to do the
supression.
The common set of errnos that have similar meaning are are caught using
ERRNO_IS_NOINFO(). It is more managable to use a wider net than to figure out
which errors could be returned in specific cases.
2022-09-27 16:48:46 +02:00
Frantisek Sumsal
998fb5c5e3
test: use fewer partitions/LVs when running with plain QEMU
2022-09-27 15:10:18 +02:00
Frantisek Sumsal
90743af65d
test: make the symlink helpers a bit more quiet
...
and show only errors/warnings.
2022-09-27 15:10:18 +02:00
Frantisek Sumsal
d6ef4ebbda
test: ignore tty* devices when checking device units
...
This lower the runtime of `check_device_units()` in a plain QEMU VM from
~45 seconds to ~25 seconds.
2022-09-27 15:10:18 +02:00
Frantisek Sumsal
dd2b99ee7f
test: lower the # of iterations when running with plain QEMU
2022-09-27 15:10:18 +02:00
Frantisek Sumsal
d9e1cb288f
test: support open-iscsi >= 2.1.2
...
Since open-iscsi 2.1.2 [0] the initiator name should be generated via
a one-time service instead of distro package's post-install scripts.
However, some distros still use this approach even after this patch,
so prefer the already existing initiatorname.iscsi file if it exists.
[0] https://github.com/open-iscsi/open-iscsi/commit/f37d5b653f9f251845db3f29b1a3dcb90ec89731
2022-09-27 13:24:32 +02:00
Lennart Poettering
dd51b0f952
Merge pull request #24805 from yuwata/sd-network
...
sd-network: several cleanups
2022-09-27 11:28:25 +02:00
Richard Phibel
8aa3894eae
systemctl: add support for --image option
...
All tools that support --root= should also learn --image=
so that they can operate on disk images directly.
2022-09-27 09:47:01 +02:00
Yu Watanabe
b577d5569d
Merge pull request #24812 from yuwata/udev-drop-netlink
...
udev: drop workaround for slow read of phys_port_name sysattr
2022-09-27 14:10:02 +09:00