1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00
Commit Graph

35490 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
4c187c5258
Merge pull request #10136 from yuwata/run-unit-tests
test: run unit tests under containers
2018-10-09 15:33:49 +02:00
Zbigniew Jędrzejewski-Szmek
64d14b7e23 README.testsuite: update the documentation for meson 2018-10-09 15:31:00 +02:00
Zbigniew Jędrzejewski-Szmek
dd76367d3b
Merge pull request #10307 from poettering/portable-path
finishing touches to portable services, and let's move portablectl to /usr/bin to make it official
2018-10-09 14:58:22 +02:00
Yu Watanabe
1e35734480 sd-hwdb: update error log a bit 2018-10-09 14:46:19 +02:00
Yu Watanabe
9c57a73b13 tree-wide: use CMP() macros where applicable 2018-10-09 14:45:55 +02:00
Zhang Xianwei
b7c09eaf1c hwdb: Map 45 to bookmarks on the ThinkPad L380
The ThinkPad L380 has a F12(Favorate) key. The keycode 0x45 is mapped
to KEY_FAVORITES(0x16c) in kernel thinkpad_acpi driver, but this
keycode is too big for xorg to handle.
xkeyboard-config mapped KEY_BOOKMARKS to XF86Favorites:

keycodes/evdev:
    <I164> = 164;   // #define KEY_BOOKMARKS           156

symbols/inet:
    key <I164>   {      [ XF86Favorites         ]       };

So map 45 to bookmarks to correct keycode.

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
2018-10-09 14:44:09 +02:00
Zbigniew Jędrzejewski-Szmek
a90c04b6b7 test-execute: filter out ip6tnl0@ and ip6gre0@ interfaces
Those interfaces are created automatically when ip6_tunnel and ip6_gre loaded.
They break the test with exec-privatenetwork-yes.service.

C.f. 6b08180ca6.
2018-10-09 14:08:09 +02:00
Yu Watanabe
3f6f58e03a test: add TEST-24-UNIT-TESTS running all basic tests under containers 2018-10-09 19:11:21 +09:00
Yu Watanabe
0013fac248 test: do not use global variable to pass error 2018-10-09 19:11:21 +09:00
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