Commit Graph

35370 Commits

Author SHA1 Message Date
Yu Watanabe dd75c133d8 test: replace duplicated Makefile by symbolic link 2018-10-09 19:11:21 +09:00
Yu Watanabe ad931fee50 test: make install_keymaps() optionally install more keymaps 2018-10-09 19:11:21 +09:00
Yu Watanabe 83a7051ee1 test: add paths of keymaps in install_keymaps()
It seems that the paths of directories storing keymaps are changed.
2018-10-09 19:11:21 +09:00
Yu Watanabe 7d10ec1cda test: introduce install_zoneinfo()
But it is not called by default.
2018-10-09 19:11:21 +09:00
Yu Watanabe e3d3dada24 test: install libraries required by tests 2018-10-09 19:11:21 +09:00
Lennart Poettering cb5491ee4d
Merge pull request #10324 from poettering/audit-serialize-bool
properly serialize in_audit boolean
2018-10-09 11:59:05 +02:00
Yu Watanabe f6d783ac3d meson: use same compilers to build fuzzers 2018-10-09 11:54:10 +02:00
Lennart Poettering b37469d7d1 nspawn: add comments explaining the namespacing situation and the inner/outer children 2018-10-09 10:52:17 +02:00
Lennart Poettering e1a7ab0952
Merge pull request #10323 from keszybz/test-udev-cleanup
Small cleanup for test-udev
2018-10-09 10:30:35 +02:00
Lennart Poettering da22bdbc05 ptyfwd: when we can't copy the window size from caller, use $LINES and $COLUMNS
This way users can directly influence the tty size if they like when
nspawn is invoked as a service and thus stdin/stdout/stderr are not
connected to a TTY.
2018-10-09 10:28:42 +02:00
Franck Bui c6885f5f36 core: introduce systemd.early_core_pattern= kernel cmdline option
Until a core dump handler is installed by systemd-sysctl, the generation of
core dump for services is turned OFF which can make the debugging of the early
boot process harder especially since there's no easy way to restore the core
dump generation.

This patch introduces a new kernel command line option which specifies an
absolute path where the kernel should write the core dump file when an early
process crashes.

This will take effect until systemd-coredump (or any other handlers) takes
over.
2018-10-09 10:26:23 +02:00
Zbigniew Jędrzejewski-Szmek 065f4d9645 test-udev: sprinkle (void) and assert_se() as necessary
CID #996263.
2018-10-09 10:21:17 +02:00
Zbigniew Jędrzejewski-Szmek ac1a3726be test-udev: remove unsatisfiable conditionals
CID #1396013.
2018-10-09 10:21:15 +02:00
Lennart Poettering 0e699122b7 core: properly serialize "in_audit" per-unit boolean
Fixes: #9962
2018-10-09 10:09:39 +02:00
Lennart Poettering 256f65d045 core: rearrange conditions in unit_notify() a bit
This shouldn't change control flow, with one exception: we won't send
notifications for boot progress to plymouth anymore during reload, which
is something we really shouldn't.
2018-10-09 10:09:39 +02:00
Lennart Poettering d09a71356e terminal-util: extra safety checks when parsing $COLUMNS or $LINES (#10314)
Let's make sure the integers we parse out are not larger than USHRT_MAX.
This is a good idea as the kernel's TIOCSWINSZ ioctl for sizing
terminals can't take larger values, and we shouldn't risk an overflow.
2018-10-09 16:49:04 +09:00
Lennart Poettering 68e16e9c72 machine: use size_t for array sizes (#10309)
Some uses of n_netif already assumed it had time size_t. Others were a
bit sloppy. Let's clean this up.
2018-10-09 16:45:55 +09:00
Lennart Poettering 38b581bc05 logs-show: make highlight parameter const (#10311) 2018-10-09 16:43:47 +09:00
Zbigniew Jędrzejewski-Szmek 304d6b1886
Merge pull request #10175 from poettering/sd-boot-count-bootctl
the bootctl changes from PR #9437 (the boot counting PR)
2018-10-08 23:14:14 +02:00
Lennart Poettering bd2865caf6 bootctl: include boot entries discovered by the boot loader but not in $BOOT in the "list" output
Let's use the new LoaderEntries efi var for this, and show all entries
we couldn't find via the config snippets.
2018-10-08 21:40:44 +02:00
Lennart Poettering d88c96ffe5 bootctl: add new verbs for setting the default boot/oneshot entry
Fixes: #5739 #8574
2018-10-08 21:40:44 +02:00
Lennart Poettering 2c3bf2789a efivars: newer efivarfs sets FS_IMMUTABLE_FL by default, deal with that
On EFI variables that aren't whitelisted in the kernel the
FS_IMMUTABLE_FL is set, as protection against accidental
removal/modification. Since our own variables do not appear in those
whielists, and we are not changing these variables, let's unset the flag
temporarily when needed. We restore the flag after all writes, just in
case.
2018-10-08 21:40:44 +02:00
Lennart Poettering db9a42545a chattr: optionally, return the old flags when updating them 2018-10-08 21:40:44 +02:00
Lennart Poettering 8cbb7d8783 efi: allow ESP validity checks to be turned off
let's add an env var for this, as this really shouldn't be a top-level
feature, as it turning off the validity checks certainly isn't
advisable.

Fixes: #4925
2018-10-08 21:40:44 +02:00
Lennart Poettering 4eb5636b6c man: various updates to the bootctl man page 2018-10-08 21:40:44 +02:00
Lennart Poettering dcb4fe7401 man: document the new --no-pager switch of bootctl
Also, let's move the --help and --version items to the end of the list.
2018-10-08 21:40:44 +02:00
Lennart Poettering 57db6f18d4 bootctl: add auto-paging 2018-10-08 21:40:44 +02:00
Lennart Poettering ba85725324 bootctl: highlight various title/product fields in output 2018-10-08 21:40:44 +02:00
Lennart Poettering 20a28174c5 bootctl: unify the code which we use to show boot loader entries 2018-10-08 21:40:44 +02:00
Lennart Poettering 48184e4391 bootctl: downgrade to log messages that aren't actually errors 2018-10-08 21:40:44 +02:00
Lennart Poettering 7fd66f3c3d bootctl: reword status/list section headers a bit
This is really confusing, let's try to clean this up a bit, in
particular as there are two very similar concepts:

1. The boot loaders, i.e. the category you find systemd-boot, the
   Windows and Apple boot loaders in. These may typically be listed in the
   firmware's EFI variables.

2. The boot loader entries, as defined by the Boot Loader Spec. In this
   category you find the various Linux kernels that are installed, i.e.
   the stuff systemd-boot shows on screen. To make things confusing, the
   Windows and Apple boot loaders can appear both as boot loaders and as
   boot loader entries.

This tries to establish the following nomenclature: "boot loaders" and
"boot loader entries" for these two concepts.
2018-10-08 21:40:44 +02:00
Lennart Poettering 9c4a6c1319 bootspec: access EFI variables on on EFI boots 2018-10-08 21:40:44 +02:00
Lennart Poettering a099e0352c bootctl: show 'Default Boot Entry' header only when we found something 2018-10-08 21:40:44 +02:00
Lennart Poettering f91ed3dc81 bootspec: it's fine if loader.conf is absent
We shouldn't generate an error in that case, as the file is optional.
2018-10-08 21:40:44 +02:00
Lennart Poettering 0de2e1fd2e bootspec: reduce number of functions we export
Let's internalize these four calls as noone else calls them.
2018-10-08 21:40:44 +02:00
Lennart Poettering 21f7a622d5 bootspec: remove redundant logging
boot_loader_read_conf(), boot_entries_find(), boot_entries_load_config()
all log their errors internally, hence no need to log a second or third
time about the same error when they return.
2018-10-08 21:40:44 +02:00
Lennart Poettering 36cd739a78 test: shorten test-boot-timestamps a bit 2018-10-08 21:40:44 +02:00
Lennart Poettering e78c250b00 efivars: some trivial coding style updates 2018-10-08 21:40:44 +02:00
Lennart Poettering 337eed30e4 efivars: check whether we are booted with EFI before reading/writing to variables
We do these checks only for the high-level calls as for the low-level
ones it might make sense in some exotic uses to read the host EFI data
from a container or so.
2018-10-08 21:40:44 +02:00
Lennart Poettering bb161cdc24 efi: detect containers in is_efi_boot()
Let's make sure that we never assume we booted up in EFI mode if we are
run in a container.
2018-10-08 21:40:44 +02:00
Lennart Poettering a36b411ea2 bootctl: tiny shortification 2018-10-08 21:40:44 +02:00
Lennart Poettering e0e8d177c8 bootctl: let's be paranoid and synchronize the ESP in full after all changes
We already synchronize all files we write individually, as well as the
directories they are stored in. Let's also synchronize the ESP as a
whole after our work, just in case.
2018-10-08 21:40:44 +02:00
Lennart Poettering 1634ebb54a
Merge pull request #10262 from keszybz/hibres-disable
Switches to disable hibernation and/or resuming
2018-10-08 21:39:54 +02:00
Lennart Poettering 3ccf61268f mount-util: show mount source in failure log message (#10312) 2018-10-08 11:59:11 -07:00
Lennart Poettering 4b3c721234 ptyfwd: voidify more calls (#10310) 2018-10-08 11:53:35 -07:00
Zbigniew Jędrzejewski-Szmek 29abe1664e
Merge pull request #10159 from poettering/killall-spree-kernel-thread
killall.c fixes regarding kernel thread detection
2018-10-08 20:12:18 +02:00
Zbigniew Jędrzejewski-Szmek ef07c97b0f
Merge pull request #10281 from yuwata/follow-up-10277
meson: add more compile tests
2018-10-08 18:42:47 +02:00
Yu Watanabe 56f56d5ad8 meson: use c_args in generator scripts (#10289)
May be useful in some cases.
2018-10-08 18:37:06 +02:00
Lennart Poettering 1099ceebce nspawn: optionally don't mount a tmpfs over /tmp (#10294)
nspawn: optionally, don't mount a tmpfs on /tmp

Fixes: #10260
2018-10-08 18:32:03 +02:00
Michael Olbrich b9fa9b71c6 meson: only build src/shared/tests.c if tests are enabled
It's only needed for tests and leaks build directories into
libsystemd-shared.
2018-10-08 18:29:36 +02:00