Commit Graph

33792 Commits

Author SHA1 Message Date
Michael Prokop 7fc97da0f8 man: fix typo 2018-06-06 12:22:47 +09:00
Peter Jones 3f9a490cb1 Fix DPI for Logitech M185, M510, and M705. (#9182)
The DPI for three logitech models, the M185, M510, and M705, appear to
have always been different here than what logitech's given specs say.
With my M510, this results in jumpy behavior when transitioning from
fast motion to slow motion, making clicking specific buttons or
highlighting specific text *very* frustrating.

This patch changes those 3 mice to the published resolution, which
resolves the problem with my M510.  I have chosen to fix those 3 simply
because they were already grouped together, and all incorrect as
compared to logitech's web site, and as such I have not tried other mice
or investigated if there are other non-matching values in the database
as well.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-06-06 08:15:58 +10:00
Lennart Poettering 8cd0356e9e util: tighten on_tty() check a bit, also check stderr
Let's detect output redirection a bit better, cover both stdout and
stderr.

Fixes: #9192
2018-06-06 00:01:22 +02:00
Lennart Poettering 44cf5fdd55
Merge pull request #9148 from poettering/tidy-late
make PID watching a bit less expensive
2018-06-06 00:00:58 +02:00
Lennart Poettering b91ada2a61 core: watch PIDs of scope units right after starting them
Scope units don't have a main or control process we can watch, hence
let's explicitly watch the PIDs contained in them early on, just to make
things more robust and have at least something to watch.
2018-06-05 22:06:48 +02:00
Lennart Poettering 50be4f4a46 core: rework how we track service and scope PIDs
This reworks how systemd tracks processes on cgroupv1 systems where
cgroup notification is not reliable. Previously, whenever we had reason
to believe that new processes showed up or got removed we'd scan the
cgroup of the scope or service unit for new processes, and would tidy up
the list of PIDs previously watched. This scanning is relatively slow,
and does not scale well. With this change behaviour is changed: instead
of scanning for new/removed processes right away we do this work in a
per-unit deferred event loop job. This event source is scheduled at a
very low priority, so that it is executed when we have time but does not
starve other event sources. This has two benefits: this expensive work is
coalesced, if events happen in quick succession, and we won't delay
SIGCHLD handling for too long.

This patch basically replaces all direct invocation of
unit_watch_all_pids() in scope.c and service.c with invocations of the
new unit_enqueue_rewatch_pids() call which just enqueues a request of
watching/tidying up the PID sets (with one exception: in
scope_enter_signal() and service_enter_signal() we'll still do
unit_watch_all_pids() synchronously first, since we really want to know
all processes we are about to kill so that we can track them properly.

Moreover, all direct invocations of unit_tidy_watch_pids() and
unit_synthesize_cgroup_empty_event() are removed too, when the
unit_enqueue_rewatch_pids() call is invoked, as the queued job will run
those operations too.

All of this is done on cgroupsv1 systems only, and is disabled on
cgroupsv2 systems as cgroup-empty notifications are reliable there, and
we do not need SIGCHLD events to track processes there.

Fixes: #9138
2018-06-05 22:06:48 +02:00
Lennart Poettering 19a691a9fd cgroup: tiny log message tweak, say that we ignore one kind of failure 2018-06-05 22:04:39 +02:00
Zbigniew Jędrzejewski-Szmek 79e221d078
Merge pull request #9158 from poettering/notify-auto-reload
trigger OnFailure= only if Restart= is not in effect
2018-06-05 13:51:07 +02:00
Zbigniew Jędrzejewski-Szmek 7a8aa0ec0a man: use entities for fedora number and update URL
Fedora 28 is out already, let's advertise it. While at it, drop "container"
from "f28container" — it's a subdirectory under /var/lib/machines, it's pretty
obvious that's it a container.

To make the switch easier in the future, define the number as an entity.
2018-06-05 11:04:01 +02:00
Evegeny Vereshchagin d5a650d2c3 travis: use Fedora 27 as a base image
It was confirmed experimentally that Fedora 27 is more suitable
for running cov-build than Fedora 28:
https://github.com/systemd/systemd/issues/9186#issuecomment-394577877.
2018-06-05 12:03:18 +03:00
Evegeny Vereshchagin 707fe958b7 travis: get python installed while building a docker image
coverity.sh tries to run python, so it should be installed
to make everything work.

According to https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3#Current_status,
python seems to be the right name of the package.

Closes https://github.com/systemd/systemd/issues/9186.
2018-06-05 02:03:05 +03:00
Evgeny Vereshchagin d460333bb2
Merge pull request #9184 from msekletar/travis-followups
Travis CI follow ups
2018-06-04 20:53:20 +03:00
Michal Sekletar 2777cf4848 travis: drop ccache requirement 2018-06-04 19:44:07 +02:00
Michal Sekletar f0b19a0376 travis: DOCKER_REPOSITORY is no longer set. Don't require it. 2018-06-04 19:40:34 +02:00
Michal Sekletar 3f4b547a55 travis: use Travis CI only for running scheduled Coverity scans
Building and testing of systemd on Fedora Rawhide is now handled by
dedicated Fedora CI. We don't need to duplicate this in Travis CI.
2018-06-04 20:14:37 +03:00
Yu Watanabe c0d72c4313 conf-parser: fix memleak (#9177)
Fixes CID#1391437.

Closes #9180.
2018-06-04 15:18:28 +03:00
Marcel Hoppe 312fe35a57 Update 60-sensor.hwdb
add chuwi hibook with newer bios version

[zj: remove duplicate matrix]
2018-06-04 13:46:40 +02:00
Zbigniew Jędrzejewski-Szmek a1230ff972 basic/log: add the log_struct terminator to macro
This way all callers do not need to specify it.
Exhaustively tested by running test-log under valgrind ;)
2018-06-04 13:46:03 +02:00
Lennart Poettering 4055a62faf
Merge pull request #9176 from keszybz/flags-set
Macro to check if flags are set
2018-06-04 13:45:29 +02:00
Lennart Poettering b5b74e4b12
Merge pull request #9167 from keszybz/ellipsization
Ellipsization fixes based on unit-testing and fuzzing
2018-06-04 13:45:03 +02:00
Lennart Poettering 0be9b12be2
Merge pull request #9147 from keszybz/runtime-enablement
Runtime enablement
2018-06-04 11:58:21 +02:00
Zbigniew Jędrzejewski-Szmek 5c270a18da basic/path-util: use FLAGS_SET in one more place 2018-06-04 11:50:44 +02:00
Zbigniew Jędrzejewski-Szmek d94a24ca2e Add macro for checking if some flags are set
This way we don't need to repeat the argument twice.
I didn't replace all instances. I think it's better to leave out:
- asserts
- comparisons like x & y == x, which are mathematically equivalent, but
  here we aren't checking if flags are set, but if the argument fits in the
  flags.
2018-06-04 11:50:44 +02:00
Zbigniew Jędrzejewski-Szmek 00bfe67f6b coccinelle: add option to make changes in place 2018-06-04 11:48:52 +02:00
Zbigniew Jędrzejewski-Szmek 31d31f2021 coccinelle: run spatch just on version-controlled files
Also, allow run-cocinnelle.sh to be started from any directory.

Unfortunately set -x does not work nicely anymore, because the list is
too verbose. Replace it by an echo line.
2018-06-04 11:48:50 +02:00
Lennart Poettering ec5b1452ac core: go to failure state if the main service process fails and RemainAfterExit=yes (#9159)
Previously, we'd not care about failures that were seen earlier and
remain in "exited" state. This could be triggered if the main process of
a service failed while ExecStartPost= was still running, as in that case
we'd not immediately act on the main process failure because we needed
to wait for ExecStartPost= to finish, before acting on it.

Fixes: #8929
2018-06-04 11:35:25 +02:00
Alan Jenkins 8150acb160 login: log session state "closing" (as well as New/Removed)
Let's show a message at the time of logout i.e. entering the "closing"
state, not just e.g. once the user closes `tmux` and the session can be
removed completely.  (At least when KillUserProcesses=no applies.  My
thinking was we can spare the log noise if we're killing the processes
anyway).

These are two independent events.  I think the logout event is quite
significant in the session lifecycle.  It will be easier for a user who
does not know logind details to understand why "Removed session" doesn't
appear at logout time, if we have a specific message we can show at this
time :).

Tested using tmux and KillUserProcesses=no.  I can also confirm the extra
message doesn't show when using KillUserProcesses=yes.  Maybe it looks a
bit mysterious when you use KillOnlyUsers= / KillExcludeUsers=, but
hopefully not alarmingly so.


I was looking at systemd-logind messages on my system, because I can
reproduce two separate problems with Gnome on Fedora 28 where
sessions are unexpectedly in state "closing".  (One where a GUI session
limps along in a degraded state[1], and another where spice-vdagent is left
alive after logout, keeping the session around[2]).  It logged when
sessions were created and removed, but it didn't log when the session
entered the "closing" state.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1583240#c1
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1583261

Closes #9096
2018-06-04 11:31:11 +02:00
Zbigniew Jędrzejewski-Szmek 2a13fafd89
Merge pull request #9173 from jwrdegoede/hwdb-sensors3
Hwdb sensors3
2018-06-04 11:02:25 +02:00
Zbigniew Jędrzejewski-Szmek cb747347ac
Merge pull request #9149 from yuwata/fix-9107
path-util: introduce path_simplify()
2018-06-04 10:13:40 +02:00
Yu Watanabe a6dffbb7e7 test: fix function name 2018-06-04 09:33:45 +02:00
Yu Watanabe d3c8afd092 man: RuntimeDirectory= or friends accept dot contained paths 2018-06-04 01:44:04 +09:00
Yu Watanabe f106314c89 conf-parser: remove redundant utf8-validity check 2018-06-04 01:38:54 +09:00
Yu Watanabe 97b9c506cf conf-parse: use free_and_replace()
Also removes unnecessary empty lines.
2018-06-04 00:30:42 +09:00
Yu Watanabe 78d17fa099 conf-parser: reject utf8-invalid lines 2018-06-04 00:30:18 +09:00
Yu Watanabe 2b633119a0 test: add test for trailing dot in WorkingDirectory= and RuntimeDirectory= 2018-06-03 23:59:51 +09:00
Yu Watanabe 2f4d31c117 load-fragment: use path_simplify_and_warn() where applicable 2018-06-03 23:59:42 +09:00
Yu Watanabe cd4f53c5b5 conf-parse: use path_simplify_and_warn() in config_parse_path() 2018-06-03 23:57:30 +09:00
Yu Watanabe 58a53adde5 path-util: introduce path_simplify_and_warn() 2018-06-03 23:54:55 +09:00
Yu Watanabe 4805426279 path-util: make path_make_relative() support path including dots 2018-06-03 23:54:32 +09:00
Yu Watanabe 858d36c1ec path-util: introduce path_simplify()
The function is similar to path_kill_slashes() but also removes
initial './', trailing '/.', and '/./' in the path.
When the second argument of path_simplify() is false, then it
behaves as the same as path_kill_slashes(). Hence, this also
replaces path_kill_slashes() with path_simplify().
2018-06-03 23:39:26 +09:00
Zbigniew Jędrzejewski-Szmek aff4430136 network: avoid temporary variables for parsing, use TAKE_PTR (#9166)
We don't need a temporary variable when parsing just one number, because
our parsing functions do not touch the output variable on error.

TAKE_PTR is more expressive than 'n = NULL'.
2018-06-03 11:18:23 +09:00
Zbigniew Jędrzejewski-Szmek 9924aef690 test-ellipsize: add tests for ellipsize_mem, fix bugs
First, ellipsize() and ellipsize_mem() should not read past the input
buffer. Those functions take an explicit length for the input data, so they
should not assume that the buffer is terminated by a nul.

Second, ellipsization was off in various cases where wide on multi-byte
characters were used.

We had some basic test for ellipsize(), but apparently it wasn't enough to
catch more serious cases.

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8686.
2018-06-02 21:53:25 +02:00
Zbigniew Jędrzejewski-Szmek ae03775f56 basic/string-util: make ellipsize() inline
Once the redundant check is removed, it's a very simple wrapper around
ellipsize_mem().
2018-06-02 21:53:25 +02:00
Zbigniew Jędrzejewski-Szmek 4dae3ef6c0
Merge pull request #9156 from shr-project/jansa/gcc8
time-util: fix build with gcc8 -Werror=format-truncation=
2018-06-02 16:18:59 +02:00
Hans de Goede 3ecb1077be hwdb: Add accelerometer orientation quirk for the Onda V891w tablet
Add accelerometer orientation quirk for the Onda V891w tablet, this
does a partial match on the BIOS version because the other strings are
somewhat generic.

The BIOS match is done for both the W89* and D89* BIOS versions which are
for the Windows only and Dual boot versions respectively.
2018-06-02 15:48:48 +02:00
Hans de Goede fb5881bf17 hwdb: Add accelerometer orientation quirk for the Nuvision/TMAX TM800W560L
Add accelerometer orientation quirk for the Nuvision/TMAX TM800W560L
8" Windows signature edition tablet.
2018-06-02 12:10:33 +02:00
Yu Watanabe 40352cf0c1 netdev: fix parser for VRF.Table=
This effectively reverts f98dd1e707 (#6704).

Fixes #9150.
2018-06-02 11:15:37 +02:00
Hans de Goede b0488902dd hwdb: Add accelerometer orientation quirk for the Archos 80 Cesium tablet.
Add accelerometer orientation quirk for the Archos 80 Cesium 8" windows
tablet.
2018-06-02 10:57:19 +02:00
Hans de Goede b870058f6b hwdb: Extend Point of View TAB-P800W accelerometer quirk for another version
Extend the accelerometer quirk for the Point of View TAB-P800W to also
match the BIOS info on the Point of View TAB-P800W (v2.0).
2018-06-02 10:57:19 +02:00
Zbigniew Jędrzejewski-Szmek f1880a4b02 test-time-util: print names of test functions
This makes it easier to find the right spot in the long output.
2018-06-02 10:41:26 +02:00