Commit graph

37591 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 3f9a0a522f 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.
2018-12-14 11:17:52 +01:00
Thomas Haller 1a35985264 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: ba91431154
2018-12-14 11:15:36 +01:00
Bruce Zhang 0b1093018b 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>
2018-12-14 09:16:36 +01:00
Lennart Poettering 838894b0c6 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.
2018-12-14 09:12:17 +01:00
Zbigniew Jędrzejewski-Szmek 57db447ebf
Merge pull request #11147 from yuwata/bash-completion-machinectl
bash-completion: adds import-fs for machinectl and suggest more
2018-12-14 08:57:03 +01:00
Yu Watanabe f675a1f005 bash-completion: busctl: support --json and -j option 2018-12-14 08:55:38 +01:00
Zbigniew Jędrzejewski-Szmek 58493c6671
Merge pull request #11145 from yuwata/bash-completion-bootctl
bash-completion: bootctl: support set-default and set-oneshot
2018-12-14 08:54:44 +01:00
Yu Watanabe 5cd6711621 sd-netlink: set destroy_callback only if asynchronous call succeeds 2018-12-14 08:50:51 +01:00
Zbigniew Jędrzejewski-Szmek 40d70ca07c
Merge pull request #11152 from keszybz/meson-user-unit-symlinks
Fix future installation of user unit symlinks by meson
2018-12-14 08:31:50 +01:00
Lennart Poettering 9a6f746fb6 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.
2018-12-14 08:22:54 +01:00
Lennart Poettering fd0ec39d38
Merge pull request #11046 from keszybz/generator-mains
Macroify generators a bit more
2018-12-13 22:39:23 +01:00
Lennart Poettering ffd1a3f688 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().
2018-12-13 22:33:47 +01:00
Michael Scherer 41fc3fab1c man: Use the proper option name in documentation 2018-12-13 20:30:58 +01:00
Zbigniew Jędrzejewski-Szmek 634cc94f47 units: replace symlinks in units/user/ by real files
We already *install* those as real files since de78fa9ba0.
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.
2018-12-13 20:23:43 +01:00
Zbigniew Jędrzejewski-Szmek df13444339 units: drop units/user/busnames.target
It seems this was missed in 0ba8987337.
2018-12-13 20:23:43 +01:00
Yu Watanabe ff1cf894d2 bash-completion: nspawn: support recently added options 2018-12-14 03:18:33 +09:00
Yu Watanabe 223f58ba8d bash-completion: run: support recently added options 2018-12-14 03:18:33 +09:00
Yu Watanabe 2e68a49dc8 bash-completion: systemctl: use --output=help to show suggestions 2018-12-14 02:33:21 +09:00
Yu Watanabe fdc33681ae bash-completion: journalctl: use --output=help to show suggestions 2018-12-14 02:33:21 +09:00
Yu Watanabe d104486ab6 bash-completion: journalctl: drop deprecated --new-id128 option 2018-12-14 02:33:21 +09:00
Yu Watanabe 3b59e2cbed bash-completion: loginctl: suggest argument for --machine option 2018-12-14 02:22:40 +09:00
Yu Watanabe dfeebf55d9 bash-completion: loginctl: suggest argument for --output option 2018-12-14 02:18:35 +09:00
Yu Watanabe fad73e9deb bash-completion: machinectl: suggest arguments for --verify and --format
This also changes to use '--output=help' for suggesting arguments of
--output option.
2018-12-14 02:18:24 +09:00
Yu Watanabe 0e5bea97e9 bash-completion: machinectl: support import-fs 2018-12-14 01:52:48 +09:00
Yu Watanabe a73b2f4ab3 bash-completion: bootctl: support set-default and set-oneshot 2018-12-14 01:26:52 +09:00
Yu Watanabe ed0c5a6f89 bash-completion: bootctl: suggest argument for --path option 2018-12-14 01:26:25 +09:00
Yu Watanabe 8ed22786aa bash-completion: bootctl: add one missing option 2018-12-14 01:25:31 +09:00
Zbigniew Jędrzejewski-Szmek 421e3b45f0 NEWS: typos and wording adjustments 2018-12-13 11:10:07 +01:00
Franck Bui d610d20125 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.
2018-12-13 08:30:20 +01:00
Chris Down 0c17c00433
Merge pull request #11131 from poettering/make-lucab-happy
optionally relabel additional files/dirs for selinux after loading policy
2018-12-12 23:17:39 +00:00
Zbigniew Jędrzejewski-Szmek a3e7ea0282 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.
2018-12-12 21:58:00 +01:00
Zbigniew Jędrzejewski-Szmek 9d22f97b87 getty-generator: use the new main function definer
I changed the nulstr loop to a normal FOREACH_STRING loop. It seems clearer
this way.
2018-12-12 21:58:00 +01:00
Zbigniew Jędrzejewski-Szmek ec6e959750 gpt-auto-generator: use the new main function definer
The first error is now returned.
2018-12-12 21:58:00 +01:00
Zbigniew Jędrzejewski-Szmek bd020018f2 system-update-generator: use the new main function definer 2018-12-12 21:58:00 +01:00
Zbigniew Jędrzejewski-Szmek 7a44c7e31f 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
053254e3cb because the run generator was merged
around the same time.
2018-12-12 21:58:00 +01:00
Lennart Poettering 6b1ab752c2 NEWS: initialy version of NEWS
Needs lots of updates still, but let's get the party started.
2018-12-12 21:31:01 +01:00
Sam Morris 4b987478b0 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.
2018-12-12 21:21:04 +01:00
Chris Down cb5e3bc37d 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.
2018-12-12 20:50:10 +01:00
tibbling 2cf0b2fe2d 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.
2018-12-12 20:49:04 +01:00
Chris Down e92aaed30e 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()

As mentioned by @jlebon in #11131.
2018-12-12 20:47:40 +01:00
Lennart Poettering 70a74ec645 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.
2018-12-12 20:46:07 +01:00
Lennart Poettering c4217b43d1 mount-setup: use FOREACH_STRING where appropriate 2018-12-12 20:46:07 +01:00
Lennart Poettering 65e183d789 mount-setup: optionally, relabel a configured set of files/dirs after loading policy
Fixes: #10466
2018-12-12 20:46:07 +01:00
Zbigniew Jędrzejewski-Szmek 9be3c60570
Merge pull request #10892 from mbiebl/revert-systemctl-runtime-unmask-breakage
Revert "systemctl: when removing enablement or mask symlinks, cover both /run and /etc
2018-12-12 14:23:04 +01:00
Lennart Poettering c108ee33bc
Merge pull request #11121 from poettering/daemon-reload-race-fix
daemon reload race fix
2018-12-12 13:47:07 +01:00
Lennart Poettering a95c0505ad core: extend comments regarding coldplug() vs. catchup() 2018-12-12 11:20:53 +01:00
Lennart Poettering a1c7334b61 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
2018-12-12 11:15:07 +01:00
Lennart Poettering 16c74914d2 core: split out all logic that updates a Job on a unit's unit_notify() invocation
Just some refactoring, no change in behaviour.
2018-12-12 11:15:07 +01:00
Lennart Poettering b17c9620c8 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.
2018-12-12 11:15:07 +01:00
Lennart Poettering 48235ad6b7 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.
2018-12-12 11:15:07 +01:00