]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agopid1: use a cache for all unit aliases
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2019 11:11:28 +0000 (13:11 +0200)] 
pid1: use a cache for all unit aliases

This reworks how we load units from disk. Instead of chasing symlinks every
time we are asked to load a unit by name, we slurp all symlinks from disk
and build two hashmaps:
1. from unit name to either alias target, or fragment on disk
   (if an alias, we put just the target name in the hashmap, if a fragment
    we put an absolute path, so we can distinguish both).
2. from a unit name to all aliases

Reading all this data can be pretty costly (40 ms) on my machine, so we keep it
around for reuse.

The advantage is that we can reliably know what all the aliases of a given unit
are. This means we can reliably load dropins under all names. This fixes #11972.

4 years agoshared/unit-file: add a function to validate unit alias symlinks
Zbigniew Jędrzejewski-Szmek [Tue, 2 Apr 2019 09:22:56 +0000 (11:22 +0200)] 
shared/unit-file: add a function to validate unit alias symlinks

It turns out most possible symlinks are invalid, because the type has to match,
and template units can only be linked to template units.

I'm not sure if the existing code made the same checks consistently. At least
I don't see the same rules expressed in a single place.

4 years agoTEST-15-DROPIN: add test for details of unit aliasing
Zbigniew Jędrzejewski-Szmek [Tue, 30 Jul 2019 10:28:48 +0000 (12:28 +0200)] 
TEST-15-DROPIN: add test for details of unit aliasing

I adjusted the tests to pass. I don't think the behaviour makes much sense,
even if we ignore the issue with "lazy loading" of aliases. E.g. in the
last section, the fact that dropins for yup@.service and yup@3.service are
not loaded seems to be a plain old bug.

4 years agotest: use "ln -fs"
Zbigniew Jędrzejewski-Szmek [Tue, 30 Jul 2019 07:33:58 +0000 (09:33 +0200)] 
test: use "ln -fs"

Without this, repeated runs of "make -C TEST/... setup" fail when trying
to create the symlink.

4 years agoshared/install: typo
Zbigniew Jędrzejewski-Szmek [Sat, 27 Jul 2019 11:55:29 +0000 (13:55 +0200)] 
shared/install: typo

4 years agotest-fs-util: call test functions in order of declaration 13096/head
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2019 11:11:44 +0000 (13:11 +0200)] 
test-fs-util: call test functions in order of declaration

4 years agoCreate src/shared/unit-file.[ch] for unit-file related ops
Zbigniew Jędrzejewski-Szmek [Thu, 4 Jul 2019 13:46:16 +0000 (15:46 +0200)] 
Create src/shared/unit-file.[ch] for unit-file related ops

So far we put such functinos in install.[ch], but that is tied too closely
to enable/disable. Let's start moving things to a place with a better name.

4 years agoshared/dropin: rename function for clarity
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jul 2019 14:04:34 +0000 (16:04 +0200)] 
shared/dropin: rename function for clarity

The caller looks for directories and is called "..._find_dirs()". Here, there
is no "finding" going on, so I found the old name confusing.

4 years agoshared/dropin: use TAKE_PTR in one more place
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jul 2019 13:56:21 +0000 (15:56 +0200)] 
shared/dropin: use TAKE_PTR in one more place

4 years agobasic/path-util: move two path_simplify* functions to be adjacent
Zbigniew Jędrzejewski-Szmek [Tue, 9 Jul 2019 09:40:19 +0000 (11:40 +0200)] 
basic/path-util: move two path_simplify* functions to be adjacent

No functional change.

4 years agopid1: get rid of unit_supported() helper
Zbigniew Jędrzejewski-Szmek [Mon, 8 Jul 2019 15:43:14 +0000 (17:43 +0200)] 
pid1: get rid of unit_supported() helper

Another case where "open code" is easier to read than the helper.

4 years agobasic/set: constify operations which don't modify Set
Zbigniew Jędrzejewski-Szmek [Mon, 8 Jul 2019 15:31:30 +0000 (17:31 +0200)] 
basic/set: constify operations which don't modify Set

No functional change, but it's nicer to the reader.

4 years agopid1: do not say "(null)" if no disabled controllers
Zbigniew Jędrzejewski-Szmek [Fri, 5 Jul 2019 11:49:43 +0000 (13:49 +0200)] 
pid1: do not say "(null)" if no disabled controllers

It looks like we made a mistake. The list is just empty, that's all.

4 years agopid1: simplify timestamp buffer declaration
Zbigniew Jędrzejewski-Szmek [Fri, 5 Jul 2019 11:44:31 +0000 (13:44 +0200)] 
pid1: simplify timestamp buffer declaration

4 years agoRename test-unit-file to test-load-fragment
Zbigniew Jędrzejewski-Szmek [Mon, 8 Jul 2019 22:27:18 +0000 (00:27 +0200)] 
Rename test-unit-file to test-load-fragment

This file was testing a mix of functions from src/core/load-fragment.c and some
from src/shared/install.c. Let's name it more appropriately. I want to add
tests for the new unit-file.c too.

4 years agotest-unit-file: move some tests to new test-env-file.c
Zbigniew Jędrzejewski-Szmek [Thu, 4 Jul 2019 14:06:30 +0000 (16:06 +0200)] 
test-unit-file: move some tests to new test-env-file.c

4 years agotest-hashmap: move tests which should also apply to ordered hashmaps and add comment
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jul 2019 11:59:30 +0000 (13:59 +0200)] 
test-hashmap: move tests which should also apply to ordered hashmaps and add comment

Effectively this does two more tests also for ordered hashmaps.
This setup is a bit confusing, let's add a comment.

4 years agobasic/hashmap: add hashops variant that does strdup/freeing on its own
Zbigniew Jędrzejewski-Szmek [Thu, 11 Apr 2019 16:08:57 +0000 (18:08 +0200)] 
basic/hashmap: add hashops variant that does strdup/freeing on its own

So far, we'd use hashmap_free_free to free both keys and values along with
the hashmap. I think it's better to make this more encapsulated: in this variant
the way contents are freed can be decided when the hashmap is created, and
users of the hashmap can always use hashmap_free.

4 years agotest-strv: add function headers
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jul 2019 11:31:45 +0000 (13:31 +0200)] 
test-strv: add function headers

4 years agosysusers,strv: export the hash ops to map char* → strv
Zbigniew Jędrzejewski-Szmek [Thu, 28 Mar 2019 16:28:48 +0000 (17:28 +0100)] 
sysusers,strv: export the hash ops to map char* → strv

Also make string_strv_hashmap_put return 0 only if the entry already existed.

4 years agobasic/unit-name: allow unit_name_to_instance() to be used to classify units
Zbigniew Jędrzejewski-Szmek [Tue, 2 Apr 2019 09:05:44 +0000 (11:05 +0200)] 
basic/unit-name: allow unit_name_to_instance() to be used to classify units

This could already be done by calling unit_name_is_*(), but if we don't know
if the argument is a valid unit name, it is more convenient to have a single
function which returns the type or possibly an error if the unit name is not
valid.

The values in the enum are sorted "by length". Not really important, but it
seems more natural to me.

4 years agobasic/unit-name: drop unused function
Zbigniew Jędrzejewski-Szmek [Tue, 2 Apr 2019 08:55:25 +0000 (10:55 +0200)] 
basic/unit-name: drop unused function

4 years agopath-util: add path_startswith_strv()
Zbigniew Jędrzejewski-Szmek [Thu, 28 Mar 2019 21:35:46 +0000 (22:35 +0100)] 
path-util: add path_startswith_strv()

4 years agotest-path-util: add function headers
Zbigniew Jędrzejewski-Szmek [Thu, 28 Mar 2019 16:59:26 +0000 (17:59 +0100)] 
test-path-util: add function headers

4 years agosystemctl: call the unit dbus path dbus_path everywhere
Zbigniew Jędrzejewski-Szmek [Sun, 24 Mar 2019 20:36:29 +0000 (21:36 +0100)] 
systemctl: call the unit dbus path dbus_path everywhere

Similar variables had differing names: unit, path, unit_path. We also
have file system paths in surrounding code. Let's make this easier for
the reader and use "dbus_path" consistently.

4 years agopid1: kill unit_file_find_dropin_paths() helper
Zbigniew Jędrzejewski-Szmek [Sun, 24 Mar 2019 19:49:00 +0000 (20:49 +0100)] 
pid1: kill unit_file_find_dropin_paths() helper

It had two users, but it is just a very thin wrapper around
unit_file_find_dropin_paths(), so using it seems more complicated than directly
invoking unit_file_find_dropin_paths() twice.

4 years agoman: rework the description of Aliases and .wants/.requires directories
Zbigniew Jędrzejewski-Szmek [Sun, 24 Mar 2019 19:10:35 +0000 (20:10 +0100)] 
man: rework the description of Aliases and .wants/.requires directories

The description of Alias= wasn't incorrect, but it sounded like Alias= creates
a different type of dependency, while it's just a glorified way to create
symlinks. Also recommend 'preset' in addition to 'enable'.

Describe .wants/.requires dirs as equals, without implying that the [Install]
section can only be used for .wants.

The text was partially out of date (systemd-networkd.service now creates as
alias in /etc, not /usr/lib, let's just not say anything about the full path).

4 years agoMerge pull request #12675 from yuwata/network-set-dns
Lennart Poettering [Wed, 17 Jul 2019 10:07:39 +0000 (12:07 +0200)] 
Merge pull request #12675 from yuwata/network-set-dns

resolvectl: support to modify interfaces managed by networkd

4 years agomount-util: bind_remount: avoid calling statvfs
Jakob Unterwurzacher [Tue, 16 Jul 2019 21:09:07 +0000 (23:09 +0200)] 
mount-util: bind_remount: avoid calling statvfs

The commit
"util: Do not clear parent mount flags when setting up namespaces"
introduced a statvfs call read the flags of the original mount
and have them applied to the bind mount.

This has two problems:

(1) The mount flags returned by statvfs(2) do not match the flags
accepted by mount(2). For example, the value 4096 means ST_RELATIME
when returned by statvfs(2), but means MS_BIND when passed to mount(2).

(2) A call to statvfs blocks indefinitely when ran against a disconnected
network drive ( https://github.com/systemd/systemd/issues/12667 ).

We already use libmount to parse `/proc/self/mountinfo` but did not use the
mount flag information from there. This patch changes that to use the mount
flags parsed by libmount instead of calling statvfs. Only if getting the
flags through libmount fails we call statvfs.

Fixes https://github.com/systemd/systemd/issues/12667

4 years agocore: ExecCondition= for services
Anita Zhang [Sat, 29 Jun 2019 00:02:30 +0000 (17:02 -0700)] 
core: ExecCondition= for services

Closes #10596

4 years agoMerge pull request #12927 from fbuihuu/coredump-cleanup-part-2
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 07:14:20 +0000 (09:14 +0200)] 
Merge pull request #12927 from fbuihuu/coredump-cleanup-part-2

Coredump cleanup part 2

4 years agoMerge pull request #13082 from ddstreet/minor
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 06:44:01 +0000 (08:44 +0200)] 
Merge pull request #13082 from ddstreet/minor

Minor fixes in test framework

4 years agotest/test-functions: fix install_dmeventd to correctly install bin/libs
Dan Streetman [Sun, 14 Jul 2019 03:03:26 +0000 (23:03 -0400)] 
test/test-functions: fix install_dmeventd to correctly install bin/libs

4 years agoFree up some resources on Azure Pipelines
Evgeny Vereshchagin [Wed, 17 Jul 2019 02:48:02 +0000 (02:48 +0000)] 
Free up some resources on Azure Pipelines

Let's drop the tests we also run on CentOS CI to free up some resources
for something more useful.

4 years agotest/test-functions: instmods call to find should use -type f 13082/head
Dan Streetman [Sun, 14 Jul 2019 01:39:03 +0000 (21:39 -0400)] 
test/test-functions: instmods call to find should use -type f

without using -type f, the logs print an error such as:

E:  E: modprobe: FATAL: Module asymmetric_keys not found in directory /lib/modules/4.15.0-54-generic

while this doesn't appear to cause problems, it can be extremely
distracting when trying to debug real failures.

4 years agotest: when stripping binaries, ignore case in suppressing "File format not recognized"
Dan Streetman [Sat, 13 Jul 2019 17:29:48 +0000 (13:29 -0400)] 
test: when stripping binaries, ignore case in suppressing "File format not recognized"

The grep -v matches all lowercase, but "file" is captialized; just ignore case so
it's suppressed for either all lowercase or capital File.

4 years agotest: ignore errors during test cleanup, so cleanup can finish
Dan Streetman [Fri, 12 Jul 2019 18:09:48 +0000 (14:09 -0400)] 
test: ignore errors during test cleanup, so cleanup can finish

Also move TESTDIR and STATEFILE removal into test_cleanup

4 years agotest: add create_empty_image_rootdir() to simplify testcase setup
Dan Streetman [Fri, 12 Jul 2019 15:47:26 +0000 (11:47 -0400)] 
test: add create_empty_image_rootdir() to simplify testcase setup

Almost all tests were manually mounting/unmounting $TESTDIR/root
from the loopback image; this moves all that into test-functions
so the test setup functions are simplier.

Also add test_setup_cleanup() function, to cleanup what is mounted
by create_empty_image_rootdir()

4 years agotest-network: drop warn_about_firewalld() as it is not necessary any more 12675/head
Yu Watanabe [Tue, 16 Jul 2019 01:12:35 +0000 (10:12 +0900)] 
test-network: drop warn_about_firewalld() as it is not necessary any more

4 years agotest-network: stop firewalld in setUpModule()
Yu Watanabe [Tue, 16 Jul 2019 01:12:05 +0000 (10:12 +0900)] 
test-network: stop firewalld in setUpModule()

4 years agotest-network: add tests for link state file vs resolvectl or timedatectl
Yu Watanabe [Mon, 3 Jun 2019 22:05:07 +0000 (07:05 +0900)] 
test-network: add tests for link state file vs resolvectl or timedatectl

4 years agoresolve: fix memleak
Yu Watanabe [Fri, 12 Jul 2019 05:19:36 +0000 (14:19 +0900)] 
resolve: fix memleak

4 years agobash-completion: support ntp-servers and revert command for timedatectl
Yu Watanabe [Tue, 28 May 2019 03:48:46 +0000 (12:48 +0900)] 
bash-completion: support ntp-servers and revert command for timedatectl

4 years agotimedatectl: add 'ntp-servers' and 'revert' commands to modify link NTP servers
Yu Watanabe [Tue, 28 May 2019 03:07:47 +0000 (12:07 +0900)] 
timedatectl: add 'ntp-servers' and 'revert' commands to modify link NTP servers

4 years agoresolvectl: support networkd managed interfaces
Yu Watanabe [Mon, 27 May 2019 01:50:52 +0000 (10:50 +0900)] 
resolvectl: support networkd managed interfaces

Closes #9808.

4 years agonetwork: implement DBus methods to set DNS related properties
Yu Watanabe [Sun, 26 May 2019 23:52:27 +0000 (08:52 +0900)] 
network: implement DBus methods to set DNS related properties

4 years agoresolve: expose dns_server_address_valid()
Yu Watanabe [Sun, 26 May 2019 23:35:28 +0000 (08:35 +0900)] 
resolve: expose dns_server_address_valid()

4 years agonetwork: introduce GetLinkByName and GetLinkByIndex bus methods
Yu Watanabe [Fri, 12 Jul 2019 02:11:08 +0000 (11:11 +0900)] 
network: introduce GetLinkByName and GetLinkByIndex bus methods

4 years agonetwork: implement ListLinks DBus method
Yu Watanabe [Sun, 26 May 2019 20:35:52 +0000 (05:35 +0900)] 
network: implement ListLinks DBus method

4 years agonetwork: move manager dbus prototypes to networkd-manager-bus.h
Yu Watanabe [Tue, 2 Jul 2019 14:26:03 +0000 (23:26 +0900)] 
network: move manager dbus prototypes to networkd-manager-bus.h

4 years agoMerge pull request #13069 from yuwata/network-do-not-set-routes-when-carrier-lost
Yu Watanabe [Tue, 16 Jul 2019 21:56:32 +0000 (06:56 +0900)] 
Merge pull request #13069 from yuwata/network-do-not-set-routes-when-carrier-lost

network: do not configure routes when dropping addresses

4 years agopid1: make sure to restore correct default values for some rlimits
Franck Bui [Wed, 10 Jul 2019 15:00:46 +0000 (17:00 +0200)] 
pid1: make sure to restore correct default values for some rlimits

Commit fb39af4ce42d7ef9af63009f271f404038703704 forgot to restore the default
rlimit values (RLIMIT_NOFILE and RLIMIT_MEMLOCK) while PID1 is reloading.

This patch extracts the code in charge of initializing the default values for
those rlimits in order to create dedicated functions, which take care of their
initialization.

These functions are then called in parse_configuration() so we make sure that
the default values for these rlimits get restored every time PID1 is reloading
its configuration.

4 years agoMerge pull request #12851 from evverx/test-01-basic-asan
Frantisek Sumsal [Tue, 16 Jul 2019 18:51:59 +0000 (18:51 +0000)] 
Merge pull request #12851 from evverx/test-01-basic-asan

tests: run TEST-01-BASIC under ASAN+UBSan again

4 years agoMerge pull request #13077 from poettering/activate-n-fds
Frantisek Sumsal [Tue, 16 Jul 2019 18:46:30 +0000 (18:46 +0000)] 
Merge pull request #13077 from poettering/activate-n-fds

activate: move array allocation to heap

4 years agoMerge pull request #13076 from keszybz/pr/13062
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 18:02:26 +0000 (20:02 +0200)] 
Merge pull request #13076 from keszybz/pr/13062

Timer formatting fixes

4 years agotest-network: extend sleep time 13069/head
Yu Watanabe [Tue, 16 Jul 2019 16:01:07 +0000 (01:01 +0900)] 
test-network: extend sleep time

Even if addresses provided by DHCP is assigned, the state file may not
be written yet, or resolved may not receive the state change signal
yet, or resolved may not process the signal yet...

4 years agonetwork: do not configure routes when dropping addresses
Yu Watanabe [Tue, 16 Jul 2019 04:02:38 +0000 (13:02 +0900)] 
network: do not configure routes when dropping addresses

Follow-up for 4ff296b02411bb4f0dc38f48cbab06f8645d2a08.

4 years agocoredump: (void)ify all calls of iovw_put_string_field() where we ignore failure... 12927/head
Franck Bui [Fri, 5 Jul 2019 13:35:47 +0000 (15:35 +0200)] 
coredump: (void)ify all calls of iovw_put_string_field() where we ignore failure on purpose

All those calls are dealing with optional metadata.

4 years agocoredump: gather all process metadata in iovecs first and then cache them
Franck Bui [Thu, 27 Jun 2019 16:23:01 +0000 (18:23 +0200)] 
coredump: gather all process metadata in iovecs first and then cache them

Now we first gather all process metadata and populate the process info cache
with them. In this way, the cache only references metadata recorded in iovecs[]
so there's no need to bother freeing (part of) cached metadata later.

The other advantage is that the coredump handler mode and the service mode are
more similar as the cache is populated in the same way for both cases.

It also renames the array indexes so it becomes clear which metadata are passed
by the kernel and which ones are retrieved from the runtime environment.

4 years agocoredump: use 'input_fd' name for the pipe fd passed by the kernel everywhere
Franck Bui [Fri, 28 Jun 2019 04:52:07 +0000 (06:52 +0200)] 
coredump: use 'input_fd' name for the pipe fd passed by the kernel everywhere

'input_fd' variable name is used mostly everywhere except in process_socket()
where it's named 'coredump_fd', which is pretty confusing since 'coredump_fd'
is used for the coredump filename in submit_coredump().

So let's use 'input_fd' consistently as name for the pipe fd passed by the
kernel.

No functional changes.

4 years agoMerge pull request #13038 from poettering/pam-fixes
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 15:09:29 +0000 (17:09 +0200)] 
Merge pull request #13038 from poettering/pam-fixes

tmpfiles factory PAM tweaks

4 years agotests: bump up QEMU_MEM 12851/head
Evgeny Vereshchagin [Tue, 16 Jul 2019 15:01:26 +0000 (15:01 +0000)] 
tests: bump up QEMU_MEM

4 years agotests: run TEST-01-BASIC under ASAN+UBSan again
Evgeny Vereshchagin [Tue, 16 Jul 2019 15:01:04 +0000 (15:01 +0000)] 
tests: run TEST-01-BASIC under ASAN+UBSan again

Not that `journalctl --flush` is no longer flaky, it should be
safe to bring the test back.

4 years agoMerge pull request #12925 from yuwata/network-generator
Lennart Poettering [Tue, 16 Jul 2019 14:23:42 +0000 (16:23 +0200)] 
Merge pull request #12925 from yuwata/network-generator

network-generator: introduce new tool systemd-network-generator

4 years agoMerge pull request #13074 from poettering/format-tree-many
Lennart Poettering [Tue, 16 Jul 2019 14:03:54 +0000 (16:03 +0200)] 
Merge pull request #13074 from poettering/format-tree-many

table_add_many() improvements

4 years agoMerge pull request #13073 from poettering/variety-galore
Lennart Poettering [Tue, 16 Jul 2019 13:59:31 +0000 (15:59 +0200)] 
Merge pull request #13073 from poettering/variety-galore

Variety galore

4 years agojournal: properly read unaligned le64 integers 13077/head
Lennart Poettering [Tue, 16 Jul 2019 13:22:26 +0000 (15:22 +0200)] 
journal: properly read unaligned le64 integers

Fixes: #13051
Replaces: #13064

4 years agoactivate: move array allocation to heap
Lennart Poettering [Tue, 16 Jul 2019 12:52:07 +0000 (14:52 +0200)] 
activate: move array allocation to heap

In theory 'n' could get quite large, and some sanitizers notice that,
let's hence avoid the stack, and use the heap instead.

Moreover, there's no need to include the first 3 fds in the array,
close_all() excludes those anyway.

See: #13064

4 years agowait-online: change log level
Yu Watanabe [Tue, 16 Jul 2019 01:21:18 +0000 (10:21 +0900)] 
wait-online: change log level

During boot, systemd-networkd-wait-online writes following logs many
times:
```
systemd-networkd-wait-online[753]: lo: link is ignored
```

4 years agoMerge pull request #13067 from yuwata/news-network-section
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 12:38:24 +0000 (14:38 +0200)] 
Merge pull request #13067 from yuwata/news-network-section

NEWS: update section name

4 years agodoc: update explanation of IPv6AcceptRA=
Yu Watanabe [Tue, 16 Jul 2019 01:46:27 +0000 (10:46 +0900)] 
doc: update explanation of IPv6AcceptRA=

4 years agotree-wide: use lowercase table headers 13076/head
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 11:32:51 +0000 (13:32 +0200)] 
tree-wide: use lowercase table headers

https://github.com/systemd/systemd/pull/13062#discussion_r303847484
> the formatter uppercases them anyway, and this way the JSON output of the
> formatter is nicer as it uses the table header fields 1:1 for the json
> output.

4 years agopid1: split out another helper func for two similar code paths
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 11:08:41 +0000 (13:08 +0200)] 
pid1: split out another helper func for two similar code paths

4 years agopid1: split out helper func for two similar code paths
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 10:54:05 +0000 (12:54 +0200)] 
pid1: split out helper func for two similar code paths

4 years agorun: move comment to appropriate place
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 10:22:37 +0000 (12:22 +0200)] 
run: move comment to appropriate place

4 years agosystemctl: print non-elapsing timers as "n/a" not "(null)"
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 }

4 years agoMerge pull request #13062 from yuwata/analyze-use-table
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 11:28:34 +0000 (13:28 +0200)] 
Merge pull request #13062 from yuwata/analyze-use-table

systemd-analyze: use Table

4 years agoanalyze: port over one part of systemd-analyze to use new table_add_many() concepts 13074/head
Lennart Poettering [Tue, 16 Jul 2019 10:45:38 +0000 (12:45 +0200)] 
analyze: port over one part of systemd-analyze to use new table_add_many() concepts

4 years agoformat-table: add some minimal testing for new table_add_many() features
Lennart Poettering [Tue, 16 Jul 2019 10:45:13 +0000 (12:45 +0200)] 
format-table: add some minimal testing for new table_add_many() features

4 years agoformat-table: add ability to set cell attributes within table_add_many()
Lennart Poettering [Tue, 16 Jul 2019 10:43:42 +0000 (12:43 +0200)] 
format-table: add ability to set cell attributes within table_add_many()

table_add_many() is so much shorter and easier to read than
table_add_cell() with its accessors. Let's teach table_add_many() more
tricks, so that reverting to table_add_cell() is not needed that often
anymore.

4 years agotest: make sure colors don't confuse our test
Lennart Poettering [Tue, 16 Jul 2019 10:42:43 +0000 (12:42 +0200)] 
test: make sure colors don't confuse our test

4 years agoformat-table: fix parameter name
Lennart Poettering [Tue, 16 Jul 2019 10:42:19 +0000 (12:42 +0200)] 
format-table: fix parameter name

4 years agoshared: no need to check result of strndupa() 13073/head
Lennart Poettering [Tue, 16 Jul 2019 10:09:02 +0000 (12:09 +0200)] 
shared: no need to check result of strndupa()

4 years agotree-wide: use empty-to-root a bit more
Lennart Poettering [Tue, 16 Jul 2019 10:08:47 +0000 (12:08 +0200)] 
tree-wide: use empty-to-root a bit more

4 years agocryptsetup: no need to zero-initialize zero-initialized structures
Lennart Poettering [Tue, 16 Jul 2019 09:54:12 +0000 (11:54 +0200)] 
cryptsetup: no need to zero-initialize zero-initialized structures

4 years agoMerge pull request #13063 from keszybz/cgroup-path-fixes
Lennart Poettering [Tue, 16 Jul 2019 09:53:31 +0000 (11:53 +0200)] 
Merge pull request #13063 from keszybz/cgroup-path-fixes

Cgroup path fixes

4 years agoNEWS: update section name 13067/head
Yu Watanabe [Tue, 16 Jul 2019 01:30:47 +0000 (10:30 +0900)] 
NEWS: update section name

4 years agoMerge pull request #13058 from yuwata/network-enter-failed
Yu Watanabe [Tue, 16 Jul 2019 00:38:39 +0000 (09:38 +0900)] 
Merge pull request #13058 from yuwata/network-enter-failed

network: make link enter failed state when a configuration fails

4 years agoanalyze: fix formatting of timestamps with 0 µs
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.

4 years agotree-wide: drop duplicated blank lines
Yu Watanabe [Sun, 14 Jul 2019 16:59:14 +0000 (01:59 +0900)] 
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
```

4 years agoApply empty_to_root() in three more spots for safety 13063/head
Zbigniew Jędrzejewski-Szmek [Mon, 15 Jul 2019 16:16:03 +0000 (18:16 +0200)] 
Apply empty_to_root() in three more spots for safety

4 years agopid1: fix GetUnitProcesses
Zbigniew Jędrzejewski-Szmek [Mon, 15 Jul 2019 15:29:56 +0000 (17:29 +0200)] 
pid1: fix GetUnitProcesses

This effectively reverts one chunk of 657ee2d82b73818d0ee8c3c5962c1cb2dbd52b76.

For a while I couldn't figure out why 'systemctl status -- -.slice' fails to
list any processes...

4 years agosystemctl: emit warning when we get an invalid process entry from pid1 and continue
Zbigniew Jędrzejewski-Szmek [Mon, 15 Jul 2019 15:27:26 +0000 (17:27 +0200)] 
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

4 years agotest-network: make wait_online() check setup state 13058/head
Yu Watanabe [Mon, 15 Jul 2019 05:18:06 +0000 (14:18 +0900)] 
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.

4 years agobash-completion: add missing 'systemd-analyze timestamp' 13062/head
Yu Watanabe [Mon, 15 Jul 2019 16:15:57 +0000 (01:15 +0900)] 
bash-completion: add missing 'systemd-analyze timestamp'

4 years agoanalyze: format output of 'systemd-analyze timestamp' by using Table
Yu Watanabe [Mon, 15 Jul 2019 16:14:20 +0000 (01:14 +0900)] 
analyze: format output of 'systemd-analyze timestamp' by using Table

4 years agoanalyze: format output of 'systemd-analyze timespan' 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

4 years agoanalyze: format output of 'systemd-analyze calendar' 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

4 years agoformat-table: add TABLE_TIMESTAMP_UTC and _RELATIVE
Yu Watanabe [Mon, 15 Jul 2019 15:44:14 +0000 (00:44 +0900)] 
format-table: add TABLE_TIMESTAMP_UTC and _RELATIVE

4 years agoanalyze: format output of 'systemd-analyze blame' by using Table
Yu Watanabe [Mon, 15 Jul 2019 15:19:59 +0000 (00:19 +0900)] 
analyze: format output of 'systemd-analyze blame' by using Table