summaryrefslogtreecommitdiffstats
path: root/factory (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-03-29hwdb: Add mic mute key mapping for HP Elite x360Andy Chi1-0/+2
On the new Elite x360 2 in 1 HP laptops, the microphone mute hotkey is "Fn+F8" and the scancode for this hotkey is 0x81, but this scancode was mapped to fn_esc in the HP generic keymap section. To fix this problem, we add a machine specific keymap section to add the correct keymap rule.
2022-03-29udev: do not call sd_event_source_disable_unref() in workers for event ↵Yu Watanabe1-2/+4
sources created by the main process Fixes a bug introduced by 9612da361a825d70a9fd392f3ee5a53bf8896887.
2022-03-29inotify-util: fix wrong warnings in FOREACH_INOTIFY_EVENT()Yu Watanabe1-7/+4
Follow-up for 00adc340bb15bc9d634db6caa48f1c964b99f79a. This fixes the wrong "Received invalid inotify event, ignoring." warnings caused by the missing curly brackets and the priorities of `&&` and `?:`. This also replaces the ternary operators with `||`.
2022-03-28build: include status of TPM2 in the feature string show by --versionFranck Bui1-0/+6
2022-03-28veritysetup: fix typo (#22886)Gaël PORTAY1-1/+1
2022-03-28fix typoYu Watanabe3-3/+3
2022-03-28Update NEWSYu Watanabe1-99/+135
- categorize entries - add several news for networkd and udevd
2022-03-28time-util: assume CLOCK_BOOTTIME always existsLennart Poettering46-176/+122
Let's raise our supported baseline a bit: CLOCK_BOOTTIME started to work with timerfd in kernel 3.15 (i.e. back in 2014), let's require support for it now. This will raise our baseline only modestly from 3.13 → 3.15.
2022-03-28network: rename netdev kind virtual-wlan -> wlanYu Watanabe6-15/+14
The Kind= setting in [Match] section of .network files takes "wlan". This makes the same setting in .netdev files matches the one in .network files.
2022-03-28bootspec: normalize function names/parameter listsLennart Poettering6-21/+21
This normalizes naming of functions operating on BootConfig objects. Let's always call them boot_config_xyz(), like our usual way to name stuff. moreover, move the BootConfig parameter to the beginning, as it's not a return value (which we typically move to the end of the parameter list), but simply an object, that even happens to be initialized already. With these changes the functions are more like our usual way to call things, and less surprises are good.
2022-03-28bootspec: don't needlessly inline boot_config_find_entry()Lennart Poettering2-11/+13
the function contains a loop and if expressions and whatnot. Let's define it as regular function, to make the header easier to read and let the compiler more freedom on whether to inline this or not.
2022-03-28bootctl: use boot_config_default_entry() where appropriateLennart Poettering2-1/+4
2022-03-28bootspec: assess default/selected entries *after* we augmented entry list ↵Lennart Poettering6-13/+41
with entries from loader Fixes: #22580
2022-03-28bootspec: normalize oom handling in boot_load_efi_entry_pointers()Lennart Poettering1-15/+12
OOM should usually be fatal, hence make it so here, too.
2022-03-28bootspec: rename type1 parsers to say "type1" explicitly in the nameLennart Poettering1-5/+5
This just got too confusing for me. With this change we'll now have _unified as common suffix for stuff loading unified kernels (i.e. type 1), and _type1 as common suffix for type1 entries. Just some renaming.
2022-03-28bootspec: try harder to suppress duplicate enumerated entriesLennart Poettering2-13/+69
For testing purposes I run one of my system symlinking /boot/loader/ to /efi/loader/. This triggers annoying behaviour in boot entry enumeration: the code ends up iterating through the 'entries' subdir of both, thinking one was actually in the ESP and the other in XBOOTLDR, and thus distinct. This would result in duplicate entries. Let's address that, and filter out duplicates via their inode numbers: never process the same inode twice. This should protect us from any confusion effectively, regardless which inodes are symlinked (or even bind mounted).
2022-03-28bootspec: pass around BootConfig struct instead of entries/n_entries fields onlyLennart Poettering1-21/+16
This simplifies the parameter lists quite a bit, at zero change in behaviour.
2022-03-28bootspec: don't use conf_files_list() for finding type #1 entriesLennart Poettering1-27/+59
We can't really use conf_files_list() for finding type #1 entries, since it is case-sensitive, but type #1 entries are typically placed on VFAT, i.e. are case-insensitive. hence, use readdir_all() instead, which is quite similar, but gives us all files, and allows us to do a case-insensitive check. While we are at it, use openat() on the open dir to open the file, and pass that around, to make things a tiny bit more race-free.
2022-03-28bootctl: optionally, output entries in JSON formatLennart Poettering2-2/+55
Replaces: #18387 Fixes: #18094
2022-03-28Use new default-user-shell option instead of hard-coding bash in nspawn and ↵наб4-4/+13
user-record Defaults to /bin/bash, no changes in the default configuration The fallback shell for non-root users is as-specified, and the interactive shell for nspawn sessions is started as exec(default-user-shell, "-" + basename(default-user-shell), ...) before falling through to bash and sh
2022-03-28docs: use native type instead of byte stream in COREDUMP_PACKAGE_METADATALuca Boccassi1-3/+3
The first three fields of a note are binary, so they are subject to flipping due to endianess. Instead of a stream of bytes, just use the native 4-bytes type so that it gets encoded automatically. Implemented in the tools via: https://github.com/systemd/package-notes/pull/31
2022-03-28missing-syscall: define MOVE_MOUNT_T_EMPTY_PATH if missingRomain Naour1-0/+4
MOVE_MOUNT_T_EMPTY_PATH has been added to systemd 250 by [1] but it's defined in kernel headers since version 5.2. [1] c7bf079bbc19e3b409acc0c7acc3e14749211fe2
2022-03-26portable: clarify error when detach fails to match to existing unitLuca Boccassi1-2/+12
Clarify that it's looking at attached units, not at units inside the referenced image. Also take into account extensions.
2022-03-25NEWS: tweaksZbigniew Jędrzejewski-Szmek1-3/+3
2022-03-25basic: update the Arch tuples for LoongArchXiaotian Wu2-3/+24
2022-03-25journal-file: if we are going down, don't use event loop to schedule postLennart Poettering1-0/+7
The event loop is already shutting down, hence no point in using it anymore, it's not going to run any further iteration.
2022-03-25journald: make sure SIGTERM handling doesn't get starved outLennart Poettering1-3/+73
Fixes: #22642
2022-03-25journal: don't talk about -1 in context of unsigned valuesLennart Poettering1-1/+1
2022-03-25journal-file: merge compress/seal bool args into a single flags paramLennart Poettering19-115/+143
Just some modernization/refactoring. No change in behaviour, just let's do how we do things these days: use flags param instead of list of bools.
2022-03-25journal-remote: constify a few parametersLennart Poettering2-6/+6
2022-03-25xdg-autostart-service: Fix binary escaping and simplify code a bitBenjamin Berg2-19/+8
Instead of escaping each component separately, we can instead use quote_command_line. Doing so simplifies the code and fixes an issue where spaces inside the executable name were not escaped. Co-Authored-By: David Edmundson <kde@davidedmundson.co.uk>
2022-03-25efi-loader: drop harmful assertionYu Watanabe1-2/+0
This fixes a bug introduced by 7be4b23649c02df33e4292f37ffc8aecf512955a. The function `efi_loader_get_device_part_uuid()` handles NULL gracefully, and it is called with NULL in gpt-auto-generator. Fixes #22862.
2022-03-25test: use flock when calling mkfs.btrfsFrantisek Sumsal2-4/+47
As stated in https://github.com/systemd/systemd/issues/21819#issuecomment-1064377645 `mkfs.btrfs` doesn't hold the lock for the whole duration of `mkfs.btrfs`, thus causing unexpected races & test fails. Let's wrap the `mkfs.btrfs` calls in an flock wrapper to mitigate this. Hopefully fixes: #21819
2022-03-25Revert "test: temporary workaround for #21819"Frantisek Sumsal1-8/+3
This reverts commit 95e35511bbdb7810c00c2e4a6cbda5b187192f74.
2022-03-25udev: assume block device is not locked when a new event is queuedYu Watanabe1-1/+38
Then, hopefully, previously requeued events are processed earlier.
2022-03-25udev: split worker_lock_block_device() into twoYu Watanabe1-13/+41
This also makes return value initialized when these function return 0 to follow our coding style. Just a preparation for later commits.
2022-03-25udev: requeue event when the corresponding block device is locked by another ↵Yu Watanabe1-57/+97
process Previously, if a block device is locked by another process, then the corresponding worker skip to process the corresponding event, and does not broadcast the uevent to libudev listners. This causes several issues: - During a period of a device being locked by a process, if a user trigger an event with `udevadm trigger --settle`, then it never returned. - When there is a delay between close and unlock in a process, then the synthesized events triggered by inotify may not be processed. This can happens easily by wrapping mkfs with flock. This causes severe issues e.g. new devlinks are not created, or old devlinks are not removed. This commit makes events are requeued with a tiny delay when the corresponding block devices are locked by other processes. With this way, the triggered uevent may be delayed but is always processed by udevd. Hence, the above issues can be solved. Also, it is not necessary to watch a block device unconditionally when it is already locked. Hence, the logic is dropped.
2022-03-25udev: store action in struct EventYu Watanabe1-6/+9
2022-03-25udev: introduce device_broadcast() helper functionYu Watanabe1-10/+18
2022-03-25udev: drop unnecessary clone of received sd-device objectYu Watanabe1-17/+4
As the sd-device object received through sd-device-monitor is sealed, so the corresponding udev database or uevent file will not be read.
2022-03-25inotify-util: declare iterator in FOREACH_INOTIFY_EVENT()Yu Watanabe8-15/+27
This also makes the macro check if the event is actually in the buffer, and if it is not, then log about that and finish the loop.
2022-03-24update NEWSLuca Boccassi1-4/+9
Fix typo and list all user session settings that now are documented to work
2022-03-24update NEWSLennart Poettering1-3/+45
2022-03-24hostnamed: properly reset hw model/vendor props before re-reading themLennart Poettering1-1/+3
Follow-up for 4fc7e4f374bf4401330e90e267227267abf1dcac
2022-03-24machine-info: rename VENDOR=/MODEL= → HARDWARE_VENDOR=/HARDWARE_MODEL=Lennart Poettering3-18/+20
Let's be more precise here. Otherwise people might think this describes the software system or so. We already expose this via hostnamed as HardwareVendor/HardwareModel hence use the exact same wording. (Note that the relevant props on the dmi device are just VENDOR/MODEL, but that's OK given that DMI really is about hardware anyway, unconditionally, hence no chance of confusion there.) Follow-up for 4fc7e4f374bf4401330e90e267227267abf1dcac
2022-03-24NEWS: various tweaksLennart Poettering1-56/+71
2022-03-24udev: try to reload selinux label database less frequentlyYu Watanabe1-4/+4
Previously, `event_run()` was called repeatedly in one `event_queue_start()` invocation. Hence, the SELinux label database is reloaded many times needlessly. Other settings, e.g. udev rules or hwdata, are tried to be reloaded in the beginning of `event_queue_start()`. Let's also do so for the SELinux database.
2022-03-24udev: assume there is no blocker when failed to check event dependenciesYu Watanabe1-8/+5
Previously, if udevd failed to resolve event dependency, the event is ignored and libudev listeners did not receive the event. This is inconsistent with the case when a worker failed to process a event, in that case, the original uevent sent by the kernel is broadcasted to listeners.
2022-03-24udev: only ignore ENOENT or friends which suggest the block device is not existYu Watanabe1-2/+4
The ENOENT, ENXIO, and ENODEV error can happen easily when a block device appears and soon removed. So, it is reasonable to ignore the error. But other errors should not occur here, and hence let's handle them as critical.
2022-03-24errno-util: add ERRNO_IS_DEVICE_ABSENT() macroLennart Poettering4-5/+14
Inspired by: https://github.com/systemd/systemd/pull/22717#discussion_r834254495