lbernstone [Mon, 17 Dec 2018 08:33:35 +0000 (01:33 -0700)]
hwdb: add accelerometer orientation quirk for the Teclast F5 (#11005)
Zbigniew Jędrzejewski-Szmek [Mon, 17 Dec 2018 08:17:35 +0000 (09:17 +0100)]
Merge pull request #11179 from kraj/kraj/pu
Fix issues found with gcc trunk
Lennart Poettering [Sat, 15 Dec 2018 11:25:32 +0000 (12:25 +0100)]
fileio: when reading a full file into memory, refuse inner NUL bytes
Just some extra care to avoid any ambiguities in what we read.
Yu Watanabe [Mon, 17 Dec 2018 01:12:08 +0000 (10:12 +0900)]
NEWS: mention DynamicTransmitLoadBalancing=
Which was added by #11142.
Khem Raj [Mon, 17 Dec 2018 04:58:35 +0000 (20:58 -0800)]
core: Fix use after free case in load_from_path()
ensure that mfree() on filename is called after the logging function
which uses the string pointed by filename
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Mon, 17 Dec 2018 04:53:38 +0000 (20:53 -0800)]
sysctl: Don't pass null directive argument to '%s'
value pointer here is always NULL but subsequent use of that pointer
with a %s format will always be NULL, printing p instead would be a
valid string
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Yu Watanabe [Mon, 17 Dec 2018 01:06:05 +0000 (02:06 +0100)]
Merge pull request #11142 from ssahani/bond-dynamic-tlb
netdev bond: add support to configure tlb_dynamic_lb
Claudius Ellsel [Sun, 16 Dec 2018 14:34:47 +0000 (15:34 +0100)]
Fixed small typo in 70-mouse.hwdb
NeilBrown [Thu, 4 Oct 2018 05:49:22 +0000 (15:49 +1000)]
core/mount: minimize impact on mount storm.
If we create 2000 mounts (on a 1-CPU qemu VM) with
mkdir -p /MNT/{1..2000}
time for i in {1..2000}; do mount --bind /etc /MNT/$i ; done
it takes around 20 seconds to complete. Much of this time is taken up
by systemd repeatedly processing /proc/self/mountinfo.
If I disable the processing, the time drops to about 4 seconds.
I have reports that on a larger system with multiple active user sessions, each
with it's own systemd, the impact can be higher.
One particular use-case where a large number of mounts can be expected in quick
succession is when the "clearcase" SCM starts up.
This patch modifies the handling up events from /proc/self/mountinfo so
that systemd backs off when a storm is detected. Specifically the time to process
mountinfo is measured, and the process will not be repeated until 10 times
that duration has passed. This ensures systemd won't use more than 10% of
real time processing mountinfo.
With this patch, my test above takes about 5 seconds.
Lennart Poettering [Sun, 16 Dec 2018 11:37:07 +0000 (12:37 +0100)]
Merge pull request #11143 from keszybz/enable-symlink
Runtime mask symlink confusion fix
Filipe Brandenburger [Sat, 15 Dec 2018 17:43:18 +0000 (09:43 -0800)]
Revert "lldp: add test coverage for sd_lldp_get_neighbors() with multiple neighbors"
This reverts commit
dd102e4d0c6551e9d39c3bdb6715eceea57c8761.
That test case exposed a memory leak and breaks CI, so let's revert it until
the original issue is fixed, to prevent disruption of automated testing.
Filipe Brandenburger [Sat, 15 Dec 2018 17:27:14 +0000 (09:27 -0800)]
Merge pull request #11137 from poettering/bogus-id128
hostnamed: let's filter out some obviously bogus product UUIDs
Susant Sahani [Sat, 15 Dec 2018 12:47:02 +0000 (18:17 +0530)]
networkd: Bond - AllSlavesActive fix parser
Bond.AllSlavesActive use parser type bool
Susant Sahani [Thu, 13 Dec 2018 09:23:07 +0000 (14:53 +0530)]
netdev bond: add support to configure tlb_dynamic_lb
Closes https://github.com/systemd/systemd/issues/11135
Add test for bond : tlb_dynamic_lb
Lennart Poettering [Sat, 15 Dec 2018 11:12:06 +0000 (12:12 +0100)]
Merge pull request #11140 from filbranden/lldpcmp1
Use ?: to chain comparison functions (for now, in lldp only)
Lennart Poettering [Wed, 12 Dec 2018 19:40:12 +0000 (20:40 +0100)]
hostnamed: filter out all-zero and all-0xFF DMI ProductUUIDs
These UUIDs are considered as wildcard value for "unset" UUIDs
typically, and this even makes sense. Let's suppress them hence.
Lennart Poettering [Fri, 14 Dec 2018 10:46:07 +0000 (11:46 +0100)]
sd-id128: add helpers to check fo all-0xFF ids
Lennart Poettering [Fri, 14 Dec 2018 10:45:21 +0000 (11:45 +0100)]
sd-id128: slightly reorder function prototypes
Let's place the three calls for acquiring the IDs together, and the
calls for getting the app-specific ones separate from them.
Lennart Poettering [Fri, 14 Dec 2018 10:44:43 +0000 (11:44 +0100)]
sd-128: base SD_ID128_MAKE() macro on existing SD_ID128_ARRAY() macro
Lennart Poettering [Wed, 12 Dec 2018 19:38:43 +0000 (20:38 +0100)]
fstab-generator: remove spurious newline
Alexey Bogdanenko [Sat, 15 Dec 2018 05:38:14 +0000 (08:38 +0300)]
mkosi: update libqrencode in Debian config
In Debian unstable package libqrencode-dev is version 4.0.2-1, and the
corresponding runtime library is provided by package libqrencode4.
This change fixes the following error when running journalctl:
root@image:~# journalctl
journalctl: error while loading shared libraries: libqrencode.so.4: cannot
open shared object file: No such file or directory
This change also fixes the following boot failures in
systemd-journal-flush.service and systemd-journal-catalog-update.service:
[FAILED] Failed to start Flush Journal to Persistent Storage.
[FAILED] Failed to start Rebuild Journal Catalog.
See also #4949
Filipe Brandenburger [Thu, 6 Dec 2018 08:02:51 +0000 (00:02 -0800)]
lldp: simplify compare_func, using ?: to chain comparisons
The ?: operator is very useful for chaining comparison functions
(strcmp, memcmp, CMP), since its behavior is to return the result
of the comparison function call if non-zero, or continue evaluating
the chain of comparison functions.
This simplifies the code in that using a temporary `r` variable
to store the function results is no longer necessary and the checks
for non-zero to return are no longer needed either, resulting in a
typical three-fold reduction to the number of lines in the code.
Introduce a new memcmp_nn() to compare two memory buffers in
lexicographic order, taking length in consideration.
Tested: $ ninja -C build/ test
All test cases pass. In particular, test_multiple_neighbors_sorted()
in test-lldp would catch regressions introduced by this commit.
Filipe Brandenburger [Thu, 6 Dec 2018 07:58:58 +0000 (23:58 -0800)]
lldp: add test coverage for sd_lldp_get_neighbors() with multiple neighbors
In particular, check that the order of the results is consistent.
This test coverage will be useful in order to refactor the compare_func
used while sorting the results.
Tested: ninja -C build/ test
Chris Down [Fri, 14 Dec 2018 13:00:28 +0000 (13:00 +0000)]
Merge pull request #11160 from poettering/read-line-more-tests
some tests for read_line() EOL markers that coincide with EOF
Lennart Poettering [Fri, 14 Dec 2018 11:57:32 +0000 (12:57 +0100)]
tests: add a test that checks read_line() properly handles line endings at EOF
As requested here: https://github.com/systemd/systemd/pull/11129#discussion_r241588835
Lennart Poettering [Fri, 14 Dec 2018 11:56:12 +0000 (12:56 +0100)]
fileio: fail early if we can't return the number of bytes we read anymore in an int
This is mostly paranoia, but let's better be safer than sorry. This of
course means there's always an implicit limit to how much we can read at
a time of 2G. But that should be ample.
Zbigniew Jędrzejewski-Szmek [Fri, 14 Dec 2018 07:16:31 +0000 (08:16 +0100)]
pid1: fix free of uninitialized pointer in unit_fail_if_noncanonical()
https://bugzilla.redhat.com/show_bug.cgi?id=1653068
Zbigniew Jędrzejewski-Szmek [Thu, 13 Dec 2018 18:43:55 +0000 (19:43 +0100)]
man: add note about systemd-vconsole-setup.service and tty as input/output
Closes #10019.
Zbigniew Jędrzejewski-Szmek [Fri, 14 Dec 2018 07:26:46 +0000 (08:26 +0100)]
tree-wide: s/time-out/timeout/g
From WordNet (r) 3.0 (2006) [wn]:
time-out
n 1: a brief suspension of play; "each team has two time-outs left"
From The Free On-line Dictionary of Computing (18 March 2015) [foldoc]:
timeout
A period of time after which an error condition is raised if
some event has not occured. A common example is sending a
message. If the receiver does not acknowledge the message
within some preset timeout period, a transmission error is
assumed to have occured.
Thomas Haller [Thu, 13 Dec 2018 18:59:46 +0000 (19:59 +0100)]
in-addr-util: fix undefined result for in4_addr_netmask_to_prefixlen(<0.0.0.0>)
u32ctz() was undefined for zero due to __builtin_ctz() [1].
Explicitly check for zero to make the behavior defined.
Note that this issue only affected in4_addr_netmask_to_prefixlen()
which is the only caller.
It may seem slightly odd, to return 32 (bits) for utz(0). But that
is what in4_addr_netmask_to_prefixlen() needs, and it probably makes
the most sense here.
[1] https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
Fixes:
ba91431154ad7bac82ddf0a540ec1b40db62d782
Bruce Zhang [Mon, 10 Dec 2018 14:33:10 +0000 (22:33 +0800)]
add device hwdb for IdeaPad Miix510-12ISK
add ACCEL_MOUNT_MATRIX for IdeaPad Miix510-12ISK
multiple match expressions for Miix510 series
extend comments for miix510 series
Signed-off-by: Bruce Zhang <zttt183525594@gmail.com>
add device hwdb for IdeaPad Miix510-12ISK
Signed-off-by: Bruce Zhang <zttt183525594@gmail.com>
Lennart Poettering [Wed, 12 Dec 2018 12:41:25 +0000 (13:41 +0100)]
fileio: make read_line() handle various line endings correctly
This adds support for windows line endings.
More importantly though with this change a newline followed by EOF is
considered a single line end.
Zbigniew Jędrzejewski-Szmek [Fri, 14 Dec 2018 07:57:03 +0000 (08:57 +0100)]
Merge pull request #11147 from yuwata/bash-completion-machinectl
bash-completion: adds import-fs for machinectl and suggest more
Yu Watanabe [Thu, 13 Dec 2018 16:37:58 +0000 (01:37 +0900)]
bash-completion: busctl: support --json and -j option
Zbigniew Jędrzejewski-Szmek [Fri, 14 Dec 2018 07:54:44 +0000 (08:54 +0100)]
Merge pull request #11145 from yuwata/bash-completion-bootctl
bash-completion: bootctl: support set-default and set-oneshot
Yu Watanabe [Fri, 14 Dec 2018 01:26:36 +0000 (10:26 +0900)]
sd-netlink: set destroy_callback only if asynchronous call succeeds
Zbigniew Jędrzejewski-Szmek [Fri, 14 Dec 2018 07:31:50 +0000 (08:31 +0100)]
Merge pull request #11152 from keszybz/meson-user-unit-symlinks
Fix future installation of user unit symlinks by meson
Lennart Poettering [Thu, 13 Dec 2018 21:11:32 +0000 (22:11 +0100)]
locale-util: prefix special glyph enum values with SPECIAL_GLYPH_
This has been irritating me for quite a while: let's prefix these enum
values with a common prefix, like we do for almost all other enums.
No change in behaviour, just some renaming.
Lennart Poettering [Thu, 13 Dec 2018 21:39:23 +0000 (22:39 +0100)]
Merge pull request #11046 from keszybz/generator-mains
Macroify generators a bit more
Lennart Poettering [Wed, 12 Dec 2018 11:31:05 +0000 (12:31 +0100)]
man: substantially update the docs regarding hooking sd-bus objects up with external event loops
Prompted by https://lists.freedesktop.org/archives/systemd-devel/2018-December/041817.html
This also drops all references to select() from our manpages. It's 2018
after all, people should use poll(), or ppoll() or epoll().
Michael Scherer [Thu, 13 Dec 2018 18:19:35 +0000 (19:19 +0100)]
man: Use the proper option name in documentation
Zbigniew Jędrzejewski-Szmek [Thu, 13 Dec 2018 19:19:45 +0000 (20:19 +0100)]
units: replace symlinks in units/user/ by real files
We already *install* those as real files since
de78fa9ba0be55b01066ca5a716c6673d76b817b.
Meson will start to copy symlinks as-is, so we would get dangling symlinks in
/usr/lib/systemd/user/.
I considered the layout in our sources to match the layout in the installation
filesystem (i.e. creating units/system/ and moving all files from units/ to
units/system/), but that seems overkill. By using normal files for both we get
some duplication, but those files change rarely, so it's not a big downside in
practice.
Fixes #9906.
Zbigniew Jędrzejewski-Szmek [Thu, 13 Dec 2018 19:18:28 +0000 (20:18 +0100)]
units: drop units/user/busnames.target
It seems this was missed in
0ba89873372c3ab508852b4e0071da0719bcea0a.
Yu Watanabe [Thu, 13 Dec 2018 18:13:30 +0000 (03:13 +0900)]
bash-completion: nspawn: support recently added options
Yu Watanabe [Thu, 13 Dec 2018 17:56:41 +0000 (02:56 +0900)]
bash-completion: run: support recently added options
Yu Watanabe [Thu, 13 Dec 2018 17:32:15 +0000 (02:32 +0900)]
bash-completion: systemctl: use --output=help to show suggestions
Yu Watanabe [Thu, 13 Dec 2018 17:31:04 +0000 (02:31 +0900)]
bash-completion: journalctl: use --output=help to show suggestions
Yu Watanabe [Thu, 13 Dec 2018 17:29:24 +0000 (02:29 +0900)]
bash-completion: journalctl: drop deprecated --new-id128 option
Yu Watanabe [Thu, 13 Dec 2018 17:22:40 +0000 (02:22 +0900)]
bash-completion: loginctl: suggest argument for --machine option
Yu Watanabe [Thu, 13 Dec 2018 17:17:30 +0000 (02:17 +0900)]
bash-completion: loginctl: suggest argument for --output option
Yu Watanabe [Thu, 13 Dec 2018 17:02:27 +0000 (02:02 +0900)]
bash-completion: machinectl: suggest arguments for --verify and --format
This also changes to use '--output=help' for suggesting arguments of
--output option.
Yu Watanabe [Thu, 13 Dec 2018 16:52:48 +0000 (01:52 +0900)]
bash-completion: machinectl: support import-fs
Yu Watanabe [Thu, 13 Dec 2018 16:26:52 +0000 (01:26 +0900)]
bash-completion: bootctl: support set-default and set-oneshot
Yu Watanabe [Thu, 13 Dec 2018 16:26:25 +0000 (01:26 +0900)]
bash-completion: bootctl: suggest argument for --path option
Yu Watanabe [Thu, 13 Dec 2018 16:25:31 +0000 (01:25 +0900)]
bash-completion: bootctl: add one missing option
Zbigniew Jędrzejewski-Szmek [Wed, 12 Dec 2018 21:47:22 +0000 (22:47 +0100)]
NEWS: typos and wording adjustments
Zbigniew Jędrzejewski-Szmek [Thu, 13 Dec 2018 09:46:27 +0000 (10:46 +0100)]
shared/install: ignore symlinks which have lower priority than the unit file
In #10583, a unit file lives in ~/.config/systemd/user, and
'systemctl --runtime --user mask' is used to create a symlink in /run.
This symlink has lower priority than the config file, so
'systemctl --user' will happily load the unit file, and does't care about
the symlink at all.
But when asked if the unit is enabled, we'd look for all symlinks, find the
symlink in the runtime directory, and report that the unit is runtime-enabled.
In this particular case the fact that the symlink points at /dev/null, creates
additional confusion, but it doesn't really matter: *any* symlink (or regular
file) that is lower in the priority order is "covered" by the unit fragment,
and should be ignored.
Fixes #10583.
Zbigniew Jędrzejewski-Szmek [Thu, 13 Dec 2018 07:40:38 +0000 (08:40 +0100)]
shared/install: add some more debugging info
Just to make it easier to understand what is going on.
Franck Bui [Wed, 12 Dec 2018 12:46:32 +0000 (13:46 +0100)]
vconsole-setup: fonts copy will fail if the current terminal is in graphical mode
If the terminal is in graphical mode, the kernel will refuse to copy the fonts
and will return -EINVAL.
Also having the graphical mode in effect probably indicates that the terminal
is in used by another application and we shouldn't interfer in such cases.
Zbigniew Jędrzejewski-Szmek [Wed, 12 Dec 2018 23:57:16 +0000 (00:57 +0100)]
shared/install: remove two conditionals which are always false
The name argument in UnitFileInstallInfo (i->name) should always be a unit
file name, so the conditional always takes the 'else' branch.
The only call chain that links to find_symlinks_fd() is unit_file_lookup_state
→ find_symlinks_in_scope → find_symlinks → find_symlinks_fd. But
unit_file_lookup_state calls unit_name_is_valid(name), and then name is used
to construct the UnitFileInstallInfo object in install_info_discover, which just
uses the name it was given.
Chris Down [Wed, 12 Dec 2018 23:17:39 +0000 (23:17 +0000)]
Merge pull request #11131 from poettering/make-lucab-happy
optionally relabel additional files/dirs for selinux after loading policy
Zbigniew Jędrzejewski-Szmek [Tue, 4 Dec 2018 13:00:19 +0000 (14:00 +0100)]
fstab-generator: fix check for /sys
It would work when the generator was run by systemd, since generators
are always started in "/", but when running the generator for debugging
purposes the result would be ... different.
Zbigniew Jędrzejewski-Szmek [Tue, 4 Dec 2018 10:53:48 +0000 (11:53 +0100)]
getty-generator: use the new main function definer
I changed the nulstr loop to a normal FOREACH_STRING loop. It seems clearer
this way.
Zbigniew Jędrzejewski-Szmek [Tue, 4 Dec 2018 10:52:26 +0000 (11:52 +0100)]
gpt-auto-generator: use the new main function definer
The first error is now returned.
Zbigniew Jędrzejewski-Szmek [Tue, 4 Dec 2018 10:51:06 +0000 (11:51 +0100)]
system-update-generator: use the new main function definer
Zbigniew Jędrzejewski-Szmek [Tue, 4 Dec 2018 10:49:42 +0000 (11:49 +0100)]
generators: define custom main func definer and use it where applicable
There should be no functional difference, except that the error message
is changd from "three or no arguments" to "zero or three arguments". Somehow
the inverted form always seemed strange.
umask() call is also dropped from run-generator. I think it wasn't dropped in
053254e3cb215df3b8c905bc39b920f8817e1c7d because the run generator was merged
around the same time.
Lennart Poettering [Wed, 12 Dec 2018 19:33:02 +0000 (20:33 +0100)]
NEWS: initialy version of NEWS
Needs lots of updates still, but let's get the party started.
Sam Morris [Mon, 8 Oct 2018 11:03:28 +0000 (12:03 +0100)]
resolved: have the stub resolver listen on both TCP and UDP by default
RFC7766 section 4 states that in the absence of EDNS0, a response that
is too large for a 512-byte UDP packet will have the 'truncated' bit
set. The client is expected to retry the query over TCP.
Fixes #10264.
Chris Down [Wed, 12 Dec 2018 10:49:35 +0000 (10:49 +0000)]
cgroup: Don't explicitly check for member in UNIT_BEFORE
The parent slice is always filtered ahead of time from UNIT_BEFORE, so
checking if the current member is the same as the parent unit will never
pass.
I may also write a SLICE_FOREACH_CHILD macro to remove some more of the
parent slice checks, but this requires a bit of a rework and general
refactoring and may not be worth it, so let's just do this for now.
tibbling [Wed, 12 Dec 2018 19:49:04 +0000 (20:49 +0100)]
timedated: Add dbus method to retrieve list of time zones (#11114)
Move function call get_timezones from timedatectl to timedated and
create a dbus method to list timezones.
Chris Down [Wed, 12 Dec 2018 14:58:46 +0000 (14:58 +0000)]
tree-wide: Remove O_CLOEXEC from fdopen
fdopen doesn't accept "e", it's ignored. Let's not mislead people into
believing that it actually sets O_CLOEXEC.
From `man 3 fdopen`:
> e (since glibc 2.7):
> Open the file with the O_CLOEXEC flag. See open(2) for more information. This flag is ignored for fdopen()\ 2
As mentioned by @jlebon in #11131.
Lennart Poettering [Wed, 12 Dec 2018 19:45:24 +0000 (20:45 +0100)]
mount-setup: don't consider it reason to fail if we can't relabel cgroupfs
We usually don't care much about relabel failures, let's not do that
here either.
Lennart Poettering [Wed, 12 Dec 2018 13:41:56 +0000 (14:41 +0100)]
mount-setup: use FOREACH_STRING where appropriate
Lennart Poettering [Wed, 12 Dec 2018 13:02:00 +0000 (14:02 +0100)]
mount-setup: optionally, relabel a configured set of files/dirs after loading policy
Fixes: #10466
Zbigniew Jędrzejewski-Szmek [Wed, 12 Dec 2018 15:50:29 +0000 (16:50 +0100)]
shared/install: mark UnitFileInstallInfo* as const where appropriate
Zbigniew Jędrzejewski-Szmek [Wed, 12 Dec 2018 15:45:33 +0000 (16:45 +0100)]
Mark *data and *userdata params to specifier_printf() as const
It would be very wrong if any of the specfier printf calls modified
any of the objects or data being printed. Let's mark all arguments as const
(primarily to make it easier for the reader to see where modifications cannot
occur).
Zbigniew Jędrzejewski-Szmek [Wed, 12 Dec 2018 13:23:04 +0000 (14:23 +0100)]
Merge pull request #10892 from mbiebl/revert-systemctl-runtime-unmask-breakage
Revert "systemctl: when removing enablement or mask symlinks, cover both /run and /etc
Lennart Poettering [Wed, 12 Dec 2018 12:47:07 +0000 (13:47 +0100)]
Merge pull request #11121 from poettering/daemon-reload-race-fix
daemon reload race fix
Lennart Poettering [Tue, 11 Dec 2018 14:22:10 +0000 (15:22 +0100)]
core: extend comments regarding coldplug() vs. catchup()
Lennart Poettering [Tue, 11 Dec 2018 10:59:39 +0000 (11:59 +0100)]
core: when a unit state changes only propagate to jobs after reloading is complete
Previously, we'd immediately propagate unit state changes into any jobs
pending for them, always. With this we only do this if the manager is
out of the "reload" state. This fixes the problem #8803 tried to
address, by simply not completing jobs until after the reload (and thus
reestablishment of the dbus connection) is complete.
Note that there's no need to later on explicitly catch up with the
missed job state changes (i.e. there's no need to call
unit_process_job() later one explicitly). That's because for jobs in
JOB_WAITING state on deserialization all jobs are requeued into the run
queue anyway, and thus checked again if they can complete now. And for
JOB_RUNNING jobs unit_catchup() phase is going to trigger missed out
state changes *after* the reload complete anyway (after all that's what
distinguishes from unit_coldplug()).
Replaces: #8803
Lennart Poettering [Mon, 10 Dec 2018 19:56:57 +0000 (20:56 +0100)]
core: split out all logic that updates a Job on a unit's unit_notify() invocation
Just some refactoring, no change in behaviour.
Lennart Poettering [Mon, 10 Dec 2018 18:40:37 +0000 (19:40 +0100)]
core: rework how we deserialize jobs
Let's add a helper call unit_deserialize_job() for this purpose, and
let's move registration in the global jobs hash table into
job_install_deserialized() so that it it is done after all superficial
checks are done, and before transitioning into installed states, so that
rollback code is not necessary anymore.
Lennart Poettering [Mon, 10 Dec 2018 18:38:38 +0000 (19:38 +0100)]
job: be more careful when removing job object from jobs hash table
Let's validate that the ID is actually allocated to us before remove a
job.
This is relevant as various bits of code will call job_free() on
partially set up Job objects, and we really shouldn't remove another job
object accidentally from the hash table, when the set up didn't
complete.
Lennart Poettering [Mon, 10 Dec 2018 17:52:28 +0000 (18:52 +0100)]
core: don't track jobs-finishing-during-reload explicitly
Memory management is borked for this, and moreover this is unnecessary
since
f0831ed2a03, i.e. since coldplug() and catchup() are two different
concepts: the former restoring the state from before a reload, the
latter than adjusting it again to the actual status in effect after the
reload.
Fixes: #10716
Mostly reverts: #8803
Lennart Poettering [Mon, 10 Dec 2018 17:52:11 +0000 (18:52 +0100)]
job: update job_free() to follow our usual return-NULL style
Zbigniew Jędrzejewski-Szmek [Tue, 4 Dec 2018 09:56:44 +0000 (10:56 +0100)]
generators: configure logging before the first use
Lennart Poettering [Wed, 12 Dec 2018 09:13:21 +0000 (10:13 +0100)]
Merge pull request #11122 from keszybz/tmpfiles-man
Improvements to tmpfiles.d man page
Zbigniew Jędrzejewski-Szmek [Tue, 11 Dec 2018 22:28:29 +0000 (23:28 +0100)]
meson: make net.naming-scheme= default configurable
This is useful for distributions, where the stability of interface names should
be preseved after an upgrade of systemd. So when some specific release of the
distro is made available, systemd defaults to the latest & greatest naming
scheme, and subsequent updates set the same default. This default may still
be overriden through the kernel and env var options.
A special value "latest" is also allowed. Without a specific name, it is harder
to verride from meson. In case of 'combo' options, meson reads the default
during the initial configuration, and "remembers" this choice. When systemd is
updated, old build/ directories could keep the old default, which would be
annoying. Hence, "latest" is introduced to make it explicit, yet follow the
upstream. This is actually useful for the user too, because it may be used
as an override, without having to actually specify a version.
Lennart Poettering [Mon, 10 Dec 2018 16:10:19 +0000 (17:10 +0100)]
udev: introduce udev net_id "naming schemes"
With this we can stabilize how naming works for network interfaces. A
user can request through a kernel cmdline option or an env var which
scheme to follow. The idea is that installers use this to set into stone
(a very soft stone though) the scheme used during installation so that
interface naming doesn't change afterwards anymore.
Why use env vars and kernel cmdline options, and not a config file of
its own?
Well, first of all there's no obvious existing one to use. But more
importantly: I have the feeling that this logic is kind of an incomplete
hack, and I simply don't want to do advertise this as a perfectly
working solution. So far we used env vars for the non-so-official
options and proper config files for the official stuff. Given how
incomplete this logic is (i.e. the big variable for naming remains the
kernel, which might expose sysfs attributes in newer versions that we
check for and didn't exist in older versions — and other problems like
this), I am simply not confident in giving this first-class exposure in
a primary configuration file.
Fixes: #10448
Zbigniew Jędrzejewski-Szmek [Tue, 11 Dec 2018 21:11:46 +0000 (22:11 +0100)]
man: add a note that /var/run should not be used in tmpfiles
Zbigniew Jędrzejewski-Szmek [Tue, 11 Dec 2018 18:12:38 +0000 (19:12 +0100)]
core: fix typo in comment
Zbigniew Jędrzejewski-Szmek [Tue, 11 Dec 2018 18:09:48 +0000 (19:09 +0100)]
man: rewrite the general description of tmpfiles
We would describe tmpfiles.d through what systemd-tmpfiles does with them, but
I think it's better to start with a geneneral statement what they are. Also,
let's make the description of volatile file systems less prominent.
Also, strenghten the advice to use RuntimeDirectory and mention
{Cache,Logs,Configuration,State}Directory=.
Zbigniew Jędrzejewski-Szmek [Tue, 11 Dec 2018 16:45:34 +0000 (17:45 +0100)]
man: reword tmpfiles.d descriptions to refer less to previous descriptions
I think it is OK if some option is described as "similar to ..., but in
addition ...", as long as the "in addition" part is strictly additive this is
unambiguous. Otherwise, we'd have to repeat a lot of text, and then we'd
probably forget to adjust some of the descriptions when doing changes.
But when the "in addition" part is about replacing or removing parts of
functionality, it is better to avoid this pattern and describe the later option
from scratch.
Some paragraph breaks are added and minor changes made. UID/GID is changed to
user/group, since we generally expect user/group names to be used, not numeric
ids.
Fixes #11115.
Chris Down [Tue, 11 Dec 2018 13:34:01 +0000 (13:34 +0000)]
Always explicitly discard popped stream type from __fsetlocking
No biggie, but I noticed this while looking into bus_match_to_string.
Lennart Poettering [Tue, 11 Dec 2018 16:37:57 +0000 (17:37 +0100)]
Merge pull request #11100 from abogdanenko/udev-test-check-perm
udev-test: check if permitted to create block device nodes
Lennart Poettering [Tue, 11 Dec 2018 16:37:09 +0000 (17:37 +0100)]
Merge pull request #11119 from cdown/news
NEWS: Add some cgroup related updates
Chris Down [Tue, 11 Dec 2018 13:43:29 +0000 (13:43 +0000)]
NEWS: Add DisableControllers= to v240
Chris Down [Tue, 11 Dec 2018 13:41:50 +0000 (13:41 +0000)]
NEWS: Add that CPUAccounting=yes may not enable CPU controller in v240
Alexey Bogdanenko [Tue, 11 Dec 2018 13:55:34 +0000 (16:55 +0300)]
udev-test: check if permitted to create block device nodes
Alexey Bogdanenko [Tue, 11 Dec 2018 13:55:34 +0000 (16:55 +0300)]
udev-test: add message to show why test-udev failed
Before:
Assertion 'mknod(devname, mode, devnum) == 0' failed at ../src/test/test-udev.c:116, function run(). Aborting.
Assertion 'unlink(devname) == 0' failed at ../src/test/test-udev.c:118, function run(). Aborting.
After:
mknod() failed for '/dev/sda': Operation not permitted
unlink('/dev/sda') failed: No such file or directory