Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 10:22:37 +0000 (12:22 +0200)]
run: move comment to appropriate place
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 10:16:24 +0000 (12:16 +0200)]
systemctl: print non-elapsing timers as "n/a" not "(null)"
TimersCalendar={ OnCalendar=1970-01-01 00:00:00 UTC ; next_elapse=(null) }
↓
TimersCalendar={ OnCalendar=1970-01-01 00:00:00 UTC ; next_elapse=n/a }
Zbigniew Jędrzejewski-Szmek [Mon, 15 Jul 2019 17:11:16 +0000 (19:11 +0200)]
analyze: fix formatting of timestamps with 0 µs
There is a rule that "%.0d" formats 0 as "". There is no such rule for
"%0d" and 0 :(. The output had an extra 0 if usec was 0.
Yu Watanabe [Mon, 15 Jul 2019 16:15:57 +0000 (01:15 +0900)]
bash-completion: add missing 'systemd-analyze timestamp'
Yu Watanabe [Mon, 15 Jul 2019 16:14:20 +0000 (01:14 +0900)]
analyze: format output of 'systemd-analyze timestamp' by using Table
Yu Watanabe [Mon, 15 Jul 2019 16:07:31 +0000 (01:07 +0900)]
analyze: format output of 'systemd-analyze timespan' by using Table
Yu Watanabe [Mon, 15 Jul 2019 15:45:05 +0000 (00:45 +0900)]
analyze: format output of 'systemd-analyze calendar' by using Table
Yu Watanabe [Mon, 15 Jul 2019 15:44:14 +0000 (00:44 +0900)]
format-table: add TABLE_TIMESTAMP_UTC and _RELATIVE
Yu Watanabe [Mon, 15 Jul 2019 15:19:59 +0000 (00:19 +0900)]
analyze: format output of 'systemd-analyze blame' by using Table
Yu Watanabe [Mon, 15 Jul 2019 15:09:39 +0000 (00:09 +0900)]
format-table: add TABLE_TIMESPAN_MSEC
Alan Jenkins [Tue, 4 Dec 2018 17:31:51 +0000 (17:31 +0000)]
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.
Yu Watanabe [Sun, 14 Jul 2019 18:29:19 +0000 (03:29 +0900)]
Merge pull request #13054 from yuwata/network-dhcp-use-domains-8174
network:dhcp4: request domain search list if UseDomains=yes
Yu Watanabe [Sun, 14 Jul 2019 00:51:54 +0000 (09:51 +0900)]
network: show known route protocol name nicely in debugging logs
Yu Watanabe [Sun, 14 Jul 2019 01:46:16 +0000 (10:46 +0900)]
test-network: add tests for DHCPv4.UseDomains=
Boucman [Sun, 14 Jul 2019 14:41:19 +0000 (16:41 +0200)]
Update NEWS
Lennart Poettering [Sun, 14 Jul 2019 11:18:37 +0000 (13:18 +0200)]
NEWS: add some notes for v243
Let's get this ball rolling.
Yu Watanabe [Sun, 14 Jul 2019 01:30:24 +0000 (10:30 +0900)]
network: honor IPv6AcceptRA.UseDomains= setting
Yu Watanabe [Sun, 14 Jul 2019 01:29:40 +0000 (10:29 +0900)]
network:dhcp4: request domain search list if UseDomains=yes
Closes #8174.
Lennart Poettering [Sun, 14 Jul 2019 11:31:40 +0000 (13:31 +0200)]
Merge pull request #13042 from poettering/locale-utf8-fix
Locale utf8 fix
Michael Zhivich [Fri, 12 Jul 2019 16:22:30 +0000 (12:22 -0400)]
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>
Lennart Poettering [Fri, 12 Jul 2019 11:38:43 +0000 (13:38 +0200)]
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.
Lennart Poettering [Fri, 12 Jul 2019 11:37:13 +0000 (13:37 +0200)]
locale-util: normalize UTF-8 locale names
Let's generate out lists in the format people expect.
Yu Watanabe [Sat, 13 Jul 2019 15:02:44 +0000 (00:02 +0900)]
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.
Johannes Schmitz [Sat, 13 Jul 2019 12:43:54 +0000 (14:43 +0200)]
po: Fix typo in German translation
Piotr Drąg [Sat, 13 Jul 2019 12:43:13 +0000 (14:43 +0200)]
po: update Polish translation
Yu Watanabe [Sat, 13 Jul 2019 14:00:12 +0000 (23:00 +0900)]
Merge pull request #13037 from poettering/shutdown-log-fixes
Shutdown log fixes
Yu Watanabe [Sat, 13 Jul 2019 13:59:43 +0000 (22:59 +0900)]
Merge pull request #13041 from poettering/firstboot-fixes
two systemd-firstboot fixes
Yu Watanabe [Fri, 12 Jul 2019 14:47:27 +0000 (23:47 +0900)]
udev: make Match.OriginalName=* matches all interfaces
Fixes #13035.
Yu Watanabe [Sat, 13 Jul 2019 09:12:39 +0000 (18:12 +0900)]
Merge pull request #13043 from poettering/strip-tab-ansi-no-static-size
util-lib: [static] array argument sizes are apparently not OK for NUL…
Lennart Poettering [Fri, 12 Jul 2019 11:52:01 +0000 (13:52 +0200)]
firstboot: use color in welcome text
Lennart Poettering [Fri, 12 Jul 2019 11:43:31 +0000 (13:43 +0200)]
firstboot: suppress locale menu if there's nothing to choose from
Lennart Poettering [Fri, 12 Jul 2019 09:04:12 +0000 (11:04 +0200)]
main: use sysctl_writef() where appropriate
Lennart Poettering [Fri, 12 Jul 2019 08:42:31 +0000 (10:42 +0200)]
shutdown: merge variable declaration lines a bit
Lennart Poettering [Fri, 12 Jul 2019 08:41:28 +0000 (10:41 +0200)]
shutdown: bump kmsg log level to LOG_WARNING only
Fixes: #12337
Lennart Poettering [Fri, 12 Jul 2019 08:41:06 +0000 (10:41 +0200)]
shutdown: rework bump_sysctl_printk_log_level() to use sysctl_writef()
Lennart Poettering [Fri, 12 Jul 2019 08:34:04 +0000 (10:34 +0200)]
sysctl: add sysctl_writef() helper
Lennart Poettering [Fri, 12 Jul 2019 08:25:28 +0000 (10:25 +0200)]
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.
Lennart Poettering [Fri, 12 Jul 2019 08:24:00 +0000 (10:24 +0200)]
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.
Lennart Poettering [Fri, 12 Jul 2019 15:09:09 +0000 (17:09 +0200)]
alloc-util: drop _alloc_ decorator from memdup_suffix0()
Fixes: https://github.com/systemd/systemd/pull/13034#issuecomment-
510801671
Evgeny Vereshchagin [Fri, 12 Jul 2019 00:08:15 +0000 (02:08 +0200)]
semaphore: avoid running autopkgtest with --apt-upgrade
by getting rid of the cache and upgrading images once every
time they are built from scratch.
Lennart Poettering [Fri, 12 Jul 2019 14:39:07 +0000 (16:39 +0200)]
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.
Lennart Poettering [Fri, 12 Jul 2019 14:17:51 +0000 (16:17 +0200)]
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
Zbigniew Jędrzejewski-Szmek [Fri, 12 Jul 2019 14:28:24 +0000 (16:28 +0200)]
Merge pull request #13036 from poettering/more-doc-fixes
Six documentation fixes
Lennart Poettering [Fri, 12 Jul 2019 07:55:05 +0000 (09:55 +0200)]
man: add example for setting multiple properties at once
Fixes: #4908
Lennart Poettering [Fri, 12 Jul 2019 07:54:40 +0000 (09:54 +0200)]
man: CPUShares= is so 2015
Let's update our example to the brave new cgroupsv2 world, and use
CPUWeight= in our example.
Lennart Poettering [Fri, 12 Jul 2019 07:45:21 +0000 (09:45 +0200)]
man: document that WakeSystem= requires privs
Fixes: #11677
Lennart Poettering [Fri, 12 Jul 2019 07:36:17 +0000 (09:36 +0200)]
man: document that "systemd-analyze blame/critical-chain" is not useful to track down job latency
Fixes: #12272
Lennart Poettering [Fri, 12 Jul 2019 07:25:22 +0000 (09:25 +0200)]
man: be more explicit that Type=oneshot services are not "active" after starting
Fixes: #13000
Lennart Poettering [Fri, 12 Jul 2019 07:18:59 +0000 (09:18 +0200)]
man: document that the supplementary groups list is initialized from User='s database entry
Fixes: #12936
Lennart Poettering [Fri, 12 Jul 2019 12:11:31 +0000 (14:11 +0200)]
Merge pull request #13034 from poettering/memdup-suffix0-multiply-fixo
memdup_suffix0_multiply fix
Lennart Poettering [Fri, 12 Jul 2019 06:49:53 +0000 (08:49 +0200)]
util-lib: fix comment
As suggested by @ralt.
Fixes: #12896
Lennart Poettering [Fri, 12 Jul 2019 07:10:13 +0000 (09:10 +0200)]
test: modernize test-alloc-util.c test a bit
Lennart Poettering [Fri, 12 Jul 2019 07:06:28 +0000 (09:06 +0200)]
alloc-util: drop _alloc_(2, 3) decorator from memdup_suffix0_multiply()
This decorator tells compilers that the memory we return is shorter than
it actually is, thus triggering misleading bad memory access complaints.
Fixes: #13026
Lennart Poettering [Fri, 12 Jul 2019 05:37:44 +0000 (07:37 +0200)]
Merge pull request #13022 from keszybz/coverity-cleanups
Coverity cleanups
Yu Watanabe [Fri, 12 Jul 2019 05:31:50 +0000 (14:31 +0900)]
Merge pull request #13031 from yuwata/network-route-type-local-12975-2
network: make Route.Type= support local or friends
Lennart Poettering [Thu, 11 Jul 2019 17:14:16 +0000 (19:14 +0200)]
tree-wide: get rid of strappend()
It's a special case of strjoin(), so no need to keep both. In particular
as typing strjoin() is even shoert than strappend().
Yu Watanabe [Sun, 7 Jul 2019 12:57:22 +0000 (21:57 +0900)]
test-network: add tests for route with type local, multicast, anycast, or broadcast
Yu Watanabe [Tue, 9 Jul 2019 15:18:53 +0000 (00:18 +0900)]
network: also show route protocol in debugging logs
Yu Watanabe [Mon, 8 Jul 2019 11:36:19 +0000 (20:36 +0900)]
network: use string table for route protocol
Yu Watanabe [Mon, 8 Jul 2019 11:19:28 +0000 (20:19 +0900)]
network: use string table to parse route table or scope
Yu Watanabe [Sun, 7 Jul 2019 12:50:05 +0000 (21:50 +0900)]
network: show route scope, table, and type in debugging logs
Yu Watanabe [Sun, 7 Jul 2019 11:34:54 +0000 (20:34 +0900)]
Yu Watanabe [Sun, 7 Jul 2019 00:40:17 +0000 (09:40 +0900)]
network: make Route.Type= support local, broadcast, anycast, multicast, nat, and xresolve
Closes #12975.
Yu Watanabe [Sat, 6 Jul 2019 23:43:33 +0000 (08:43 +0900)]
network: use string table to parse route type
Yu Watanabe [Sat, 6 Jul 2019 22:46:08 +0000 (07:46 +0900)]
test-network: test more bridge properties
Imported from networkd-test.py
Yu Watanabe [Fri, 12 Jul 2019 00:36:16 +0000 (09:36 +0900)]
Merge pull request #12971 from yuwata/network-reassign-static-routes
network: reassign static routes and process reply address messages
Yu Watanabe [Fri, 12 Jul 2019 00:33:21 +0000 (09:33 +0900)]
Merge pull request #13024 from poettering/errno-or-else
Errno or else
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 07:00:49 +0000 (09:00 +0200)]
shared/ask-password-api: backspace all chars at once
We'd call loop_write() separately for each char. Let's be nice to
serial console users, and write the full string in one go.
Coverity was complaining that we're not checking the return value
from loop_write(). Rework the code a bit and add voidify.
CID#1402323.
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 06:47:41 +0000 (08:47 +0200)]
test-process-util: invert reporting to make sure that we're not dividing by 0
CID#1402334.
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 06:43:45 +0000 (08:43 +0200)]
udevd: add helper with error handling to synthesize "change" events
Coverity was unhappy that we ignore the return value from write_string_file().
We should at least warn. CID#1302373.
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 05:54:04 +0000 (07:54 +0200)]
test: minor modernization
Coverity was complaining that read() does not terminate the data. But
we did that termination earlier, so covirity is wrong (CID#1402306, CID#1402340).
Let's modernize the style a bit nevertheless.
(size_t) cast is needed to avoid the warning about comparison, iff
the value is not a constant.
Lennart Poettering [Thu, 11 Jul 2019 13:42:14 +0000 (15:42 +0200)]
tree-wide: make use of errno_or_else() everywhere
Lennart Poettering [Thu, 4 Jul 2019 15:55:36 +0000 (17:55 +0200)]
errno-util: add new errno_or_else() helper
Frantisek Sumsal [Thu, 11 Jul 2019 19:55:55 +0000 (19:55 +0000)]
Merge pull request #13025 from poettering/tmpfiles-fixo
unbreak the build
Lennart Poettering [Thu, 11 Jul 2019 17:23:29 +0000 (19:23 +0200)]
Merge pull request #13017 from yuwata/network-neighbor-lladdr-13015
network: rename Neighbor.MACAddress= and also support IPv4 address
Lennart Poettering [Thu, 11 Jul 2019 16:42:26 +0000 (18:42 +0200)]
tmpfiles: use path_join() where it makes sense
Lennart Poettering [Thu, 11 Jul 2019 16:41:14 +0000 (18:41 +0200)]
tmpfiles: fix build
After I merged #12750 we don't build anymore, since the merged PR (which
passed CI) uses prefix_root() which doesn't exist anymore. Let's fix
that.
Evgeny Vereshchagin [Thu, 11 Jul 2019 13:32:05 +0000 (15:32 +0200)]
tests: turn on the "object-size" UBSan check on Fuzzit
Now that
2eb1c19881678851a7e is merged it should be safe.
Lennart Poettering [Thu, 11 Jul 2019 16:13:19 +0000 (18:13 +0200)]
Merge pull request #12750 from keszybz/tmpfiles-c-copy
Make tmpfiles C use --root
Yu Watanabe [Thu, 27 Jun 2019 18:18:22 +0000 (03:18 +0900)]
udevadm: ensure 'udevadm info -w' show updated result
This seems not necessary, but just for safety.
Lennart Poettering [Thu, 11 Jul 2019 14:43:58 +0000 (16:43 +0200)]
Merge pull request #12461 from Werkov/fix-job-ordering
Refactor job ordering implementation (and fix cycle detection)
Yu Watanabe [Sat, 6 Jul 2019 00:34:35 +0000 (09:34 +0900)]
test-network: add test for route reassignment
Yu Watanabe [Sat, 6 Jul 2019 00:04:10 +0000 (09:04 +0900)]
network: re-assign static routes when dynamic address is updated
Follow-up for
b5799eeb0787deacb30d5984f6ac78f88f23b97e.
Closes #7354.
Yu Watanabe [Sat, 6 Jul 2019 00:03:02 +0000 (09:03 +0900)]
network: process address reply message
Yu Watanabe [Sat, 6 Jul 2019 02:17:48 +0000 (11:17 +0900)]
network: rework route_scope_from_address()
Yu Watanabe [Sat, 6 Jul 2019 02:14:43 +0000 (11:14 +0900)]
util: introduce in4_addr_equal()
Yu Watanabe [Fri, 5 Jul 2019 23:47:24 +0000 (08:47 +0900)]
network: route_configure() do nothing when it returns 0
Yu Watanabe [Wed, 10 Jul 2019 18:26:30 +0000 (03:26 +0900)]
test-network: add testcase that Neighbor.LinkLayerAddress= is IP address
Yu Watanabe [Wed, 10 Jul 2019 17:25:21 +0000 (02:25 +0900)]
test-network: use Neighbor.LinkLayerAddress= instead of deprecated Neighbor.MACAddress=
Yu Watanabe [Thu, 11 Jul 2019 01:48:41 +0000 (10:48 +0900)]
network: fdb: use ether_addr_from_string()
Yu Watanabe [Thu, 11 Jul 2019 01:44:36 +0000 (10:44 +0900)]
network: fdb: do not allocate separated memory for lladdr
Yu Watanabe [Wed, 10 Jul 2019 18:08:31 +0000 (03:08 +0900)]
network: drop invalid [Neighbor] section earlier
Yu Watanabe [Wed, 10 Jul 2019 17:23:41 +0000 (02:23 +0900)]
network: rename Neighbor.MACAddress= to Neighbor.LinkLayerAddress=
And make it support IPv4 address.
Closes #13015.
Yu Watanabe [Thu, 11 Jul 2019 01:17:30 +0000 (10:17 +0900)]
network: NDA_LLADDR attribute can also take struct in_addr
Yu Watanabe [Thu, 11 Jul 2019 01:12:35 +0000 (10:12 +0900)]
sd-netlink: make sd_netlink_message_read() returns size of read data
Lennart Poettering [Thu, 11 Jul 2019 13:12:02 +0000 (15:12 +0200)]
Merge pull request #12176 from poettering/clean-dir2
add "systemctl clean" operation for clearing out StateDirectory=, CacheDirectory=, … of a service unit
Lennart Poettering [Thu, 11 Jul 2019 09:15:06 +0000 (11:15 +0200)]
json: always allocate at least sizeof(JsonVariant) bytes
ubsan apparently doesn't like us being too smart here. Given the
difference is just a few bytes, let's avoid the noise.
Fixes: #13020
Lennart Poettering [Mon, 1 Apr 2019 17:42:03 +0000 (19:42 +0200)]
update TODO
Lennart Poettering [Mon, 1 Apr 2019 15:28:29 +0000 (17:28 +0200)]
man: document new "systemctl clean…" operation
Lennart Poettering [Mon, 1 Apr 2019 14:51:55 +0000 (16:51 +0200)]
test: add testcase for new CleanUnit logic