Commit graph

40909 commits

Author SHA1 Message Date
Lennart Poettering 9228fef0d6 tree-wide: use empty-to-root a bit more 2019-07-16 12:40:22 +02:00
Lennart Poettering 0e3cb57dae cryptsetup: no need to zero-initialize zero-initialized structures 2019-07-16 12:40:22 +02:00
Lennart Poettering f200a3564c
Merge pull request #13063 from keszybz/cgroup-path-fixes
Cgroup path fixes
2019-07-16 11:53:31 +02:00
Yu Watanabe b8fcdba6db
Merge pull request #13058 from yuwata/network-enter-failed
network: make link enter failed state when a configuration fails
2019-07-16 09:38:39 +09:00
Yu Watanabe 8cec0a5c32 tree-wide: drop duplicated blank lines
```
$ for i in */*.[ch] */*/*.[ch]; do sed -e '/^$/ {N; s/\n$//g}' -i $i; done
$ git checkout HEAD -- basic/linux shared/linux
```
2019-07-15 18:41:27 +02:00
Zbigniew Jędrzejewski-Szmek 95b21cff0e Apply empty_to_root() in three more spots for safety 2019-07-15 18:39:26 +02:00
Zbigniew Jędrzejewski-Szmek 624e4fcffa pid1: fix GetUnitProcesses
This effectively reverts one chunk of 657ee2d82b.

For a while I couldn't figure out why 'systemctl status -- -.slice' fails to
list any processes...
2019-07-15 18:39:26 +02:00
Zbigniew Jędrzejewski-Szmek 107c20518b systemctl: emit warning when we get an invalid process entry from pid1 and continue
Output looks like this:
Invalid process description in GetUnitProcesses reply: cgroup="machine.slice/machine-rawhide.scope/payload/system.slice/systemd-journald.service" pid=638367 command="/usr/lib/systemd/systemd-journald", ignoring: Invalid argument
2019-07-15 18:39:05 +02:00
Yu Watanabe e2aea43f31 test-network: make wait_online() check setup state
Previously, event if link's setup state is in failed, tests may pass,
as systemd-networkd-wait-online success if the state is in failed state.
This makes tests be checked more strictly.
2019-07-16 01:32:24 +09:00
Yu Watanabe 4ff296b024 network: make link enter failed state when a configuration fails
Some path of configuring address, route or etc., go to failed state, but
some do not. E.g., failure in address configuration which is provided by
DHCPv4 goes to failed state, but static address does not.

This is just for consistency. This should not change anything if
everything is fine.

This also voidify manager_rtnl_process_address().
2019-07-15 21:52:06 +09:00
Alan Jenkins 8eb0cafeb0 systemctl: do not suggest passing --all if the user passed --state=
"systemctl --failed" suggested I pass "--all" to see units in the inactive
state as well.  I thought this was not very useful.  If you explicitly
asked for units in a specific state, then you already know you have
narrowed it down.  And if you ran "systemctl --state=inactive", it is even
more strange to see this message.

@keszybz suggests we probably don't want to suggest "list-unit-files"
either :-).  Let's only suggest that if the user passed "--state=inactive".

Finally, this means the output for "systemctl --failed" could be just
"0 loaded units listed".  In this case, we don't need any highlight on that
text, to distinguish it from the hint.  This matches "list-unit-files".
This also means we happen to avoid using red highlight, when there are zero
failed units, as if that itself was a failure.  @kesbyz pointed out that
old behaviour was a bit weird.
2019-07-15 13:37:29 +02:00
Yu Watanabe 0f44806d8e
Merge pull request #13054 from yuwata/network-dhcp-use-domains-8174
network:dhcp4: request domain search list if UseDomains=yes
2019-07-15 03:29:19 +09:00
Yu Watanabe ca420b6201 network: show known route protocol name nicely in debugging logs 2019-07-15 02:05:40 +09:00
Yu Watanabe e0c1341df2 test-network: add tests for DHCPv4.UseDomains= 2019-07-15 00:43:15 +09:00
Boucman eebaa72446 Update NEWS 2019-07-14 23:46:19 +09:00
Lennart Poettering 2875a36b77 NEWS: add some notes for v243
Let's get this ball rolling.
2019-07-14 22:16:01 +09:00
Yu Watanabe a0cd6da5bb network: honor IPv6AcceptRA.UseDomains= setting 2019-07-14 22:08:29 +09:00
Yu Watanabe 150d3b8ea7 network:dhcp4: request domain search list if UseDomains=yes
Closes #8174.
2019-07-14 22:08:29 +09:00
Lennart Poettering b9adb191a1
Merge pull request #13042 from poettering/locale-utf8-fix
Locale utf8 fix
2019-07-14 13:31:40 +02:00
Michael Zhivich a18d83c264 man: offline-updates: make dependence on system-update.target explicit
Current operation of system-update-cleanup.service (removing /system-update
symlink and rebooting) implies that any update must complete *before*
system-update.target is reached.

Update recommendations to include explicitly setting
Before=system-update.target in services that use offline-updates mode.

Signed-off-by: Michael Zhivich <mzhivich@akamai.com>
2019-07-14 13:25:56 +02:00
Lennart Poettering a7d9fccd0e locale-util: suppress non-UTF-8 locales when enumerating them
Let's hide non-UTF-8 locales by default. It's 2019 after all.

Let's add an undocumented env var to reenable listing them though.

This should substantially shorten the list of choices we offer users,
and only show realistic choices.

note that only firstboot and localectl make use of this information, and
both allow configuration of values outside of these lists, hence all
this change does is hide legacy options, but they are still available if
you know what you do, and that's how it should be.
2019-07-14 11:05:34 +02:00
Lennart Poettering 13f4580626 locale-util: normalize UTF-8 locale names
Let's generate out lists in the format people expect.
2019-07-14 11:05:34 +02:00
Yu Watanabe b425c3ae02 network: do not change to configuring state needlessly
When DHCP or any other dynamic addresses are changed, then
link_request_set_routes() is invoked, and even if no static routes
are configured, the operational state is needlessly changed to
configuring state.
This makes the state is changed only when static routes are configured.
2019-07-14 07:37:12 +02:00
Johannes Schmitz e869ba5dcb po: Fix typo in German translation 2019-07-14 00:07:40 +02:00
Piotr Drąg 25524e48f3 po: update Polish translation 2019-07-14 00:07:18 +02:00
Yu Watanabe f7f196adfa
Merge pull request #13037 from poettering/shutdown-log-fixes
Shutdown log fixes
2019-07-13 23:00:12 +09:00
Yu Watanabe 3f127e3981
Merge pull request #13041 from poettering/firstboot-fixes
two systemd-firstboot fixes
2019-07-13 22:59:43 +09:00
Yu Watanabe 56637e5c20 udev: make Match.OriginalName=* matches all interfaces
Fixes #13035.
2019-07-13 18:29:37 +09:00
Yu Watanabe 94e016650d
Merge pull request #13043 from poettering/strip-tab-ansi-no-static-size
util-lib: [static] array argument sizes are apparently not OK for NUL…
2019-07-13 18:12:39 +09:00
Lennart Poettering 4aeadec7e6 firstboot: use color in welcome text 2019-07-13 11:07:51 +02:00
Lennart Poettering bdd7cd264a firstboot: suppress locale menu if there's nothing to choose from 2019-07-13 11:07:51 +02:00
Lennart Poettering 56e8419aa8 main: use sysctl_writef() where appropriate 2019-07-13 11:05:07 +02:00
Lennart Poettering e7ac08e4e0 shutdown: merge variable declaration lines a bit 2019-07-13 11:05:07 +02:00
Lennart Poettering 9a75c65248 shutdown: bump kmsg log level to LOG_WARNING only
Fixes: #12337
2019-07-13 11:05:07 +02:00
Lennart Poettering 477851f5d6 shutdown: rework bump_sysctl_printk_log_level() to use sysctl_writef() 2019-07-13 11:05:07 +02:00
Lennart Poettering 6a47f2a714 sysctl: add sysctl_writef() helper 2019-07-13 11:05:07 +02:00
Lennart Poettering 701f6af6b9 shutdown: use "int" for log level type
Let's remove some unnecessary confusion around signed/unsigned types for
log levels. Let's just stick to signed, because that is what glibc
generally appears to use.

While we are at it, add explicit logging for all error causes.
2019-07-13 11:05:07 +02:00
Lennart Poettering 60cd367649 killall: bump log message about unkilled processes to LOG_WARNING
By raising this, we can raise the kernel kmsg log level safely, and
still see these messages.
2019-07-13 11:05:07 +02:00
Lennart Poettering b65011dad0 alloc-util: drop _alloc_ decorator from memdup_suffix0()
Fixes: https://github.com/systemd/systemd/pull/13034#issuecomment-510801671
2019-07-13 11:04:20 +02:00
Evgeny Vereshchagin 8678837563 semaphore: avoid running autopkgtest with --apt-upgrade
by getting rid of the cache and upgrading images once every
time they are built from scratch.
2019-07-13 01:40:51 +03:00
Lennart Poettering 2caa38e99f tree-wide: some more [static] related fixes
let's add [static] where it was missing so far

Drop [static] on parameters that can be NULL.

Add an assert() around parameters that have [static] and can't be NULL
hence.

Add some "const" where it was forgotten.
2019-07-12 16:40:10 +02:00
Lennart Poettering 6fb0569065 util-lib: [static] array argument sizes are apparently not OK for NULL parameters
Let's drop the 'static' logic when a parameter can be NULL.

I think asan/ubsan are right here, judging by the C99 spec language:

"A declaration of a parameter as ‘‘array of type’’ shall be adjusted to
‘‘qualified pointer to type’’, where the type qualifiers (if any) are
those specified within the [ and ] of the array type derivation. If the
keyword static also appears within the [ and ] of the array type
derivation, then for each call to the function, the value of the
corresponding actual argument shall provide access to the first element
of an array with at least as many elements as specified by the size
expression."

If we specify NULL, then we certainly don't pvode access to any valid
array.

Fixes: #13039
2019-07-12 16:40:10 +02:00
Zbigniew Jędrzejewski-Szmek f90bcf8679
Merge pull request #13036 from poettering/more-doc-fixes
Six documentation fixes
2019-07-12 16:28:24 +02:00
Lennart Poettering 5b792edb68 man: add example for setting multiple properties at once
Fixes: #4908
2019-07-12 16:00:23 +02:00
Lennart Poettering 84f8e250ff man: CPUShares= is so 2015
Let's update our example to the brave new cgroupsv2 world, and use
CPUWeight= in our example.
2019-07-12 16:00:13 +02:00
Lennart Poettering 114b90e10c man: document that WakeSystem= requires privs
Fixes: #11677
2019-07-12 14:25:33 +02:00
Lennart Poettering 15b0fdd5a6 man: document that "systemd-analyze blame/critical-chain" is not useful to track down job latency
Fixes: #12272
2019-07-12 14:25:28 +02:00
Lennart Poettering bfcb9d3a7d man: be more explicit that Type=oneshot services are not "active" after starting
Fixes: #13000
2019-07-12 14:25:28 +02:00
Lennart Poettering b042dd687c man: document that the supplementary groups list is initialized from User='s database entry
Fixes: #12936
2019-07-12 14:25:28 +02:00
Lennart Poettering 5978345750
Merge pull request #13034 from poettering/memdup-suffix0-multiply-fixo
memdup_suffix0_multiply fix
2019-07-12 14:11:31 +02:00