Commit Graph

45650 Commits

Author SHA1 Message Date
Lennart Poettering 5c236388c3 update TODO 2020-06-30 17:13:38 +02:00
Zbigniew Jędrzejewski-Szmek 6c3a19d5b3
Merge pull request #16313 from yuwata/network-move-ipv6ll-gen-mode
network: move IPv6LinkLocalAddressGenerationMode= to [Network] section
2020-06-30 17:13:02 +02:00
Luca Boccassi 7233e91af0 core: store timestamps of unit load attempts
When the system is under heavy load, it can happen that the unit cache
is refreshed for an unrelated reason (in the test I simulate this by
attempting to start a non-existing unit). The new unit is found and
accounted for in the cache, but it's ignored since we are loading
something else.
When we actually look for it, by attempting to start it, the cache is
up to date so no refresh happens, and starting fails although we have
it loaded in the cache.

When the unit state is set to UNIT_NOT_FOUND, mark the timestamp in
u->fragment_loadtime. Then when attempting to load again we can check
both if the cache itself needs a refresh, OR if it was refreshed AFTER
the last failed attempt that resulted in the state being
UNIT_NOT_FOUND.

Update the test so that this issue reproduces more often.
2020-06-30 16:50:00 +02:00
Zbigniew Jędrzejewski-Szmek f93dd4b940
Merge pull request #16282 from poettering/repart-copy-blocks
repart: add new CopyBlocks= setting
2020-06-30 15:26:06 +02:00
Yu Watanabe 437b9a7f75 backlight: read current backlight brightness from 'actual_brightness' attribute
Closes #16302.
2020-06-30 22:19:21 +09:00
Yu Watanabe daa227a320 backlight: call log_setup_service() before logging 2020-06-30 22:19:21 +09:00
Yu Watanabe 74f1bb5c9f backlight: use SYNTHETIC_ERRNO() macro 2020-06-30 22:19:21 +09:00
Lennart Poettering 40af3d020f shared: split out property get helpers
No code changes, just some refactoring.
2020-06-30 15:10:17 +02:00
Lennart Poettering 9176326ba2 shared: split out code for printing properties
No code changes, just some refactoring.
2020-06-30 15:09:56 +02:00
Lennart Poettering 807542bece shared: split out code that maps properties to local structs
Just some refactoring, no code changes.
2020-06-30 15:09:35 +02:00
Lennart Poettering 9b71e4ab90 shared: actually move all BusLocator related calls to bus-locator.c 2020-06-30 15:09:19 +02:00
Lennart Poettering c664cf5607 shared: split out BusObjectImplementor APIs
Just some refactoring, no code changes
2020-06-30 15:08:35 +02:00
Amos Bird 7aee1e7304
hwdb: adjust touchpad edge detection for X1Tab3 (#16310) 2020-06-30 19:04:08 +09:00
Yu Watanabe aa0b850bca NEWS: minor fixes 2020-06-30 19:00:18 +09:00
Yu Watanabe 6f6296b93f network: move IPv6LinkLocalAddressGenerationMode= to [Network] section
This also moves and renames variables and functions.

Follow-ups for a6f1848a23.
2020-06-30 18:58:52 +09:00
Yu Watanabe 3ea58e010d NEWS: add several entries about networkd 2020-06-30 11:29:14 +02:00
Zbigniew Jędrzejewski-Szmek 26b0fda9b7 test-repart: allow the test to pass on non-amd64 architectures
We specified type=root and expected to always get root-x86-64, which obviously
cannot work.
2020-06-30 11:06:48 +02:00
Yu Watanabe e4f8d5e01f shell-completion: add missing verbs for networkctl 2020-06-30 08:56:36 +02:00
Frantisek Sumsal 8f843190ff test: bump the timeout for systemd-hwdb-update.service under ASan
Since the hwdb update from a79be2f807
the systemd-hwdb-update service started timing out under ASan when
compiled with gcc, as we started tripping over the 3 minutes timeout.

This affects only gcc runs, since the current gcc on Arch still suffers
from the detect_stack_use_after_return performance penalty[0]. Until
the fixed gcc is present in the respective repositories, let's bump
the timeout to 4 minutes, as we might not be able to upgrade right
away, due to systemd/systemd#16199.

Before the hwdb update:
[ 7958.292540] systemd[63]: systemd-hwdb-update.service: Executing: /usr/bin/time systemd-hwdb update
[ 7958.304005] systemd[1]: systemd-journald.service: Got notification message from PID 44 (FDSTORE=1)
[ 7958.314434] systemd[1]: systemd-journald.service: Added fd 3 (n/a) to fd store.
[ 8008.520082] systemd[1]: systemd-journald.service: Got notification message from PID 44 (WATCHDOG=1)
[ 8068.520151] systemd[1]: systemd-journald.service: Got notification message from PID 44 (WATCHDOG=1)
[ 8125.682843] time[63]: 84.47user 82.92system 2:47.50elapsed 99%CPU (0avgtext+0avgdata 811512maxresident)k
[ 8125.682843] time[63]: 0inputs+19680outputs (0major+25000853minor)pagefaults 0swaps

After the hwdb update:
[ 6215.491958] systemd[63]: systemd-hwdb-update.service: Executing: /usr/bin/time systemd-hwdb update
[ 6215.503380] systemd[1]: systemd-journald.service: Got notification message from PID 44 (FDSTORE=1)
[ 6215.514172] systemd[1]: systemd-journald.service: Added fd 3 (n/a) to fd store.
[ 6329.392918] systemd[1]: systemd-journald.service: Got notification message from PID 44 (WATCHDOG=1)
[ 6394.920205] time[63]: 89.48user 89.98system 2:59.55elapsed 99%CPU (0avgtext+0avgdata 812764maxresident)k
[ 6394.920205] time[63]: 0inputs+20568outputs (0major+27318354minor)pagefaults 0swaps

[0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94910
2020-06-29 16:07:11 +02:00
Zbigniew Jędrzejewski-Szmek 0e31a6c2ad
Merge pull request #16142 from poettering/random-seed-cmdline
pid1: add support for allowing to pass in random seed via kernel cmdline
2020-06-26 22:42:51 +02:00
Lennart Poettering bed0b7dfc0
pid1: warn if people use User=nobody (#16293) 2020-06-26 22:36:39 +02:00
Luca Boccassi 7143b95552 efi: define cache functions inside EFI_ENABLE ifdef
../src/shared/efi-loader.c:738:5: error: redefinition of 'efi_loader_get_config_timeout_one_shot'
 int efi_loader_get_config_timeout_one_shot(usec_t *ret) {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/shared/efi-loader.c:9:
../src/shared/efi-loader.h:85:19: note: previous definition of 'efi_loader_get_config_timeout_one_shot' was here
 static inline int efi_loader_get_config_timeout_one_shot(usec_t *ret) {
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/shared/efi-loader.c:776:5: error: redefinition of 'efi_loader_update_entry_one_shot_cache'
 int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat) {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/shared/efi-loader.c:9:
../src/shared/efi-loader.h:89:19: note: previous definition of 'efi_loader_update_entry_one_shot_cache' was here
 static inline int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat) {
2020-06-26 22:34:22 +02:00
Frantisek Sumsal cb713f1696 tree-wide: spellcheck fixes
Most of them were reported by Fossies.org
2020-06-26 22:33:56 +02:00
Zbigniew Jędrzejewski-Szmek 7f56c26d10 NEWS: reorder entries with some minor additions
Let's make this easier for readers by grouping common subjects together.

Roughly: pid1 features, unit file changes, general syntax changes, kernel
options, general defaults, udevd features, networkd and .network/.netdev
features, networkctl, resolved, systemctl, systemd-run, journald, journalctl,
various other tools, low-level dbus and library stuff, documentation.
2020-06-26 19:51:34 +02:00
Luca Boccassi 0cffae953a core: add device mapper to allow-list with DevicePolicy=closed and RootImage
To set up a verity/cryptsetup RootImage the forked child needs to
ioctl /dev/mapper/control and create a new mapper.
If PrivateDevices=yes and/or DevicePolicy=closed are used, this is
blocked by the cgroup setting, so add an exception like it's done
for loop devices (and also add a dependency on the kernel modules
implementing them).
2020-06-26 18:39:45 +02:00
Lennart Poettering b47261e5cb update TODO 2020-06-26 18:04:52 +02:00
Lennart Poettering e78228b1b0 update TODO 2020-06-26 15:43:36 +02:00
Lennart Poettering 10f9436c2d
Merge pull request #16281 from poettering/logind-cache-more-efi
logind: cache two more EFI variables in logind
2020-06-26 15:12:57 +02:00
Gaoyi 0090b551e6 Add quotes for -n
According to SC2070, -n doesn't work with unquoted arguments
https://github.com/koalaman/shellcheck/wiki/SC2070

Signed-off-by: Gaoyi <ymuemc@163.com>
2020-06-26 15:12:29 +02:00
Lennart Poettering 22aa58adc9 JOURNAL_FILE_FORMAT: minor markdown fixes 2020-06-26 13:55:18 +02:00
Lennart Poettering 1f19ae0ffb NEWS: add more items for 246 2020-06-26 13:54:54 +02:00
Lennart Poettering af2697e83d logind: also cache LoaderEntryOneShot EFI variable
With this we are now caching all EFI variables that we expose as
property in logind. Thus a client invoking GetAllProperties() should
only trgger a single read of each variable, but never repeated ones.

Obsoletes: #16190
Fixes: #14828
2020-06-26 10:43:42 +02:00
Lennart Poettering e8df4eee65 efi-loader: cache LoaderConfigTimeoutOneShot too
The data from this EFI variable is exposed as dbus property, and gdbus
clients are happy to issue GetAllProperties() as if it was free. Hence
make sure it's actually free and cache LoaderConfigTimeoutOneShot, since
it's easy.
2020-06-26 10:43:42 +02:00
Lennart Poettering 6eea6e30ab tmpfile-util: typo fixes 2020-06-26 10:41:52 +02:00
Yu Watanabe 95fc17bf46 util: add missing header guard 2020-06-26 08:02:21 +02:00
Zbigniew Jędrzejewski-Szmek 12d14b7373
Merge pull request #16096 from poettering/journal-hash-fix
journal file hash table hardening + zstd support
2020-06-26 07:27:05 +02:00
Zbigniew Jędrzejewski-Szmek a79be2f807 hwdb: update for v246
As usual, it seems that there are mostly additions with a smaller amount
of corrections, no big removals.
2020-06-26 05:20:50 +09:00
Lennart Poettering 7caaf44777 update TODO 2020-06-25 18:53:16 +02:00
Lennart Poettering 757bc2e4c1 repart: add new CopyBlocks= setting
This allows copying in arbitrary file systems on the block level into
newly created partitions.

Usecase: simple replicating OS installers or OS image builders.
2020-06-25 18:52:52 +02:00
Zbigniew Jędrzejewski-Szmek 3f11426f52
Merge pull request #16275 from yuwata/network-deprecate-netdevsim
network: deprecate netdevsim support
2020-06-25 18:41:49 +02:00
Łukasz Stelmach fdf3e48c44 udev: split attribute assignment for MMC cards
Some cards have names consisting only of whitespace characters which
prevents the original rule from matching and assigning ID_SERIAL
properly. With the split rules ID_SERIAL and ID_NAME are assigned
independently and the symlink is created only if both are available the
same way it has worked for partitions.
2020-06-25 18:40:45 +02:00
Luca Boccassi 6d88513e6b portabled: create temp file for unit, not directory
open_tmpfile_linkable is used to create a temporary file in the same
directory as the target, but portabled uses the name of the parent
directory instead of the file it intends to create.
In other words, it creats a tmp for /etc/systemd/system.attached instead
of /etc/systemd/system.attached/foo.service.
It still works because it's later moved in the right place.
But as a side effect, it tries the create the file in the parent directory
which is /etc/systemd, and it case of read-only filesystems it fails.
2020-06-25 18:40:19 +02:00
Christian Göttsche 823e917f13 selinux: check mac_selinux_init() in tests
Since bc8d57f290 mac_selinux_init() is checked and considered fatal
tree-wide.

Coverity complains about it not being checked in the test code.

Follow-up of: #16223
Fixes: CID 1429975
2020-06-25 18:39:42 +02:00
Zbigniew Jędrzejewski-Szmek 0986bb9b95
Merge pull request #16278 from keszybz/fix-man-links
Fix html links
2020-06-25 18:38:37 +02:00
Zbigniew Jędrzejewski-Szmek 66ed28d332
Merge pull request #15624 from poettering/hostnamed-instant
hostnamed: stop caching so much
2020-06-25 18:36:56 +02:00
Zbigniew Jędrzejewski-Szmek 98506a41fe
Merge pull request #15697 from OhNoMoreGit/fix-path-units
Recheck PathExists=, PathExistsGlob=, DirectoryNotEmpty= when triggered unit terminates
2020-06-25 18:23:47 +02:00
Lennart Poettering 5c0102f83f update TODO 2020-06-25 15:03:22 +02:00
Lennart Poettering c85cf04fa3 compress: do something roughly reasonable when building without compressor 2020-06-25 15:03:18 +02:00
Lennart Poettering 3afe5c00a5 coredump: use log_error_errno() where appropriate 2020-06-25 15:03:13 +02:00
Lennart Poettering d80b051cea tree-wide: add new HAVE_COMPRESSION compile time flag
let's simplify the checks for ZSTD/LZ4/XZ

As suggested:

https://github.com/systemd/systemd/pull/16096#discussion_r440705585
2020-06-25 15:02:45 +02:00