1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
Commit Graph

37739 Commits

Author SHA1 Message Date
Yu Watanabe
af182e786c hwdb: drop unused imported object 2018-12-10 03:06:58 +09:00
Yu Watanabe
a9f2655dbe hwdb: drop comment 2018-12-10 03:06:44 +09:00
Alexey Bogdanenko
1e5548c0e0 udev-test: fix missing directory test/run
Fixes the following error:

    Failed to mount test /run: No such file or directory

By the time command "./test-udev check" calls function "fake_filesystems",
directory "test/run" must be present.
2018-12-09 20:53:11 +03:00
Alexey Bogdanenko
7935dae547 udev-test: fix test skip condition
When there is a failure to setup the environment, the following happens:

1. Command "./test-udev check" exits with non-zero code.
2. Perl function "system" returns the code.
3. The code is evaluated as true by Perl.

Then we stop the test.
2018-12-09 19:22:47 +03:00
Evgeny Vereshchagin
a01eb97b6c
Merge pull request #11095 from evverx/use-systemd-as-pid1-yolo
travis: use systemd as PID1 in debian containers
2018-12-09 16:53:03 +03:00
Zbigniew Jędrzejewski-Szmek
6e076600d0
Merge pull request #10931 from yuwata/daemon-util
sd-daemon: add notify_on_cleanup() helper function and use it where applicable
2018-12-09 12:10:57 +01:00
Zbigniew Jędrzejewski-Szmek
503a1bd37f
Merge pull request #11097 from jwrdegoede/hwdb-sensors5
Hwdb sensors5
2018-12-09 11:50:39 +01:00
Evgeny Vereshchagin
f413cd0a6a travis: mount tmpfs on /tmp before running the tests
To judge from https://api.travis-ci.org/v3/job/465547774/log.txt,
overlayfs on Travis CI is having trouble delivering inotify events,
which is why `test-path` and `test-event` are failing there.
2018-12-09 11:46:23 +01:00
Evgeny Vereshchagin
ee6776b41a travis: use systemd as PID1 in debian containers
Turns out some tests like `test-execute` are tightly coupled with
systemd as PID1 (which should be fixed of course). In the meantime,
let's see how it goes.
2018-12-09 11:31:01 +01:00
Lennart Poettering
be24321f3d mount-point: honour AT_SYMLINK_FOLLOW correctly
Fixes: #11092
2018-12-08 22:43:55 +01:00
Hans de Goede
84e8548313 hwdb: Add accelerometer orientation quirk for the PoV P1005W-232 tablet
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2018-12-08 22:11:39 +01:00
Hans de Goede
76efe240b8 hwdb: Add accelerometer orientation quirk for the Prowise PT301 tablet 2018-12-08 22:11:39 +01:00
Zbigniew Jędrzejewski-Szmek
c90ee83400 coding style: reduce text width to 109 characters
Patches are shown on github with a fixed width (no matter how wide the window
is). When line numbers are high (we have some files with 5 digit line numbers),
the diff does not fit, and horizontal scrolling must be used when viewing the
patch. This is super annoying. Let's reduce the width a bit. I think 109 is
still very wide, but at least the github issue should be alleviated.
2018-12-08 10:14:28 +01:00
Yu Watanabe
d8dd35fd31 journal-remote: define main through macro
Also, this fixes memleaks on failure.
2018-12-08 18:09:40 +09:00
Yu Watanabe
94952201e1 journal-remote: destroy RemoteServer object by using _cleanup_ attribute 2018-12-08 18:09:40 +09:00
Yu Watanabe
f36bb1e182 journal-upload: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
c9ed608679 journal-upload: use _cleanup_ attribute to clear uploader 2018-12-08 18:09:40 +09:00
Yu Watanabe
29cd4c8ffb journal-gateway: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
0d2a1a2085 journal-gateway: use _cleanup_ attribute to stop microhttpd daemon 2018-12-08 18:09:40 +09:00
Yu Watanabe
c03a80c419 wait-online: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
82310c7981 timesync: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
2362a8f547 network: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
1e88b8199b resolve: define main through macro 2018-12-08 18:09:40 +09:00
Yu Watanabe
c157884f09 sd-daemon: add notify_start() and notify_on_cleanup() helper function 2018-12-08 18:09:25 +09:00
Yu Watanabe
1437822638 meson: rename sd_event_c to sd_event_sources 2018-12-08 18:06:45 +09:00
Lennart Poettering
99b5b0d0ef
Merge pull request #11055 from poettering/resolved-close-fix
a number of resolved fixes
2018-12-08 00:23:43 +01:00
Lennart Poettering
e474bf118c
Merge pull request #10980 from poettering/mount-no-extras
mount and swap improvements
2018-12-08 00:23:15 +01:00
Lennart Poettering
06721f39f6 swap: always add in extras when we load a swap unit
Much like for the mount units we need fields such as the slice
initialized by the time we activate the swap, hence when the kernel
let's us know about a new swap that appeared we need to initialize the
slice in any Swap object we allocated for that right-away, even if we
can't read the real unit file for the swap device.
2018-12-07 17:35:32 +01:00
Lennart Poettering
a0a424083f swap: drop return value
We don't actually return any valid 'r' here, let's explicitly return 0
here hence instead.
2018-12-07 17:35:32 +01:00
Lennart Poettering
eb04385dc5 swap: don't propagate issues with processing /proc/swaps
This follows similar recent changes in mount.c: error should be consider
local, and not be propagated.
2018-12-07 17:35:32 +01:00
Lennart Poettering
46f944802c swap: when loading a unit from /proc/swaps, mark its load state as good
This follows similar logic in the mount unit.
2018-12-07 17:35:32 +01:00
Lennart Poettering
15332d738f swap: split out code adding in additional unit props into a function of its own
This adds swap_add_extras() similar to mount_add_extras().

No change in behaviour, just some refactoring.
2018-12-07 17:35:32 +01:00
Lennart Poettering
ba6fbb2cee swap: fix misplaced comment 2018-12-07 17:35:32 +01:00
Lennart Poettering
31135818e4 swap: flush out state when activating a unit, not when deactivating it
This is similar to the previous commit which did the same change for
mount units.
2018-12-07 17:35:32 +01:00
Lennart Poettering
7eba1463de mount: flush out cycle state on DEAD→MOUNTED only, not the other way round
For services (and other units) we generally follow the rule that at the
beginning of each cycle, i.e. when the INACTIVE/FAILED state is left for
ACTIVATING/ACTIVE we flush out various state variables. Mount units
handled this differently so far when the unit state change was effected
outside of systemd: in that case these variables would be flushed out
when going back to INACTIVE/FAILED already.

Let's fix that, and flush out this state always during the activating
transition, not during the deactivating transition.
2018-12-07 17:35:32 +01:00
Lennart Poettering
ec88d1ea05 mount: replace three closely related mount flags into a proper flags enum
We pass these flags around, and even created a structure for them. Let's
fix things properly, and make them a flags value of its own.
2018-12-07 17:35:32 +01:00
Lennart Poettering
b6418dc94e mount: strdup() device paths we collect
We never know what the changes triggered by mount_set_state() do to the
unit. Let's be safe and copy the device path into our set, so that we
are safe against that.
2018-12-07 17:35:32 +01:00
Lennart Poettering
f8064c4fda mount: when the kernel reports a mount to be established reset all kinds of load failures
It doesn't matter what kind of precise failure we had earlier with
loading the unit, let's report that it loaded successfully now, after
all the kernel is an OK source for that, like any other.
2018-12-07 17:35:32 +01:00
Lennart Poettering
a37422045f mount: regenerate all deps whenever a mount's parameters changes
Whenever we notice a change on an existing /proc/self/mountinfo line,
let's update the deps generated from it. For that, let's flush out the
old deps generated this way, and add in the new ones.

This takes benefit of the fact that today (unlike a comment this patch
removes says) we can remove deps in a somewhat reasonable way.
2018-12-07 17:35:32 +01:00
Lennart Poettering
6d7e89b070 mount: when allocating a Mount object based on /proc/self/mountinfo mark it so
Let's set 'from_proc_self_mountinfo' right away, since we know its from
there. This is important so that when the load queue is dispatched (and
thus mount_load() called) this
fact is already known.
2018-12-07 17:35:32 +01:00
Lennart Poettering
26e35b164b mount: let mount_add_extras() take care of remote-fs.target deps
In a previous commit we added logic that mount_add_extras() (or more
precisely mount_add_default_dependencies()) adds in dependencies on
remote-fs.target and local-fs.target, hence we can drop this from
mount_setup_new_unit() and let the usual load queue dispatching take
care of this.
2018-12-07 17:34:29 +01:00
Lennart Poettering
e10fe04266 mount: use free_and_strdup() over plain strdup()
Let's initialize two fields with free_and_strdup() rather than directly
with strdup(). The fields should not be initialized so far, but it's
still nicer to be prepared for futzre code changes and always free
what's stored before replacing it.
2018-12-07 17:34:29 +01:00
Lennart Poettering
60b8c203f8 mount: generate error message matching the error location 2018-12-07 17:34:29 +01:00
Lennart Poettering
839ee05838 mount: move allocation of Unit object into mount_setup_new_unit()
This should encapsulate things in a nicer way.
2018-12-07 17:34:29 +01:00
Lennart Poettering
bbee24bc96 mount: add a common helper for filling in info from /proc/self/mountinfo 2018-12-07 17:30:14 +01:00
Lennart Poettering
ba0d56f55f mount: don't propagate errors from mount_setup_unit() further up
If we can't process a specific line in /proc/self/mountinfo we should
log about it (which we do), but this should not affect other lines, nor
further processing of mount units. Let's keep these failures local.

Fixes: #10874
2018-12-07 17:30:14 +01:00
Lennart Poettering
3f459cd96e mount: simplify de-serialization of control PID a bit 2018-12-07 17:30:14 +01:00
Lennart Poettering
2c09fb818f mount: serialize umount retry counter across reloads/reexec 2018-12-07 17:30:14 +01:00
Lennart Poettering
780ae0221a mount: make sure mount_add_extras() is always invoked when we load a mount unit
We need to make sure that the slice property is initialized whenever
mount_load() is invoked, even if we fail to load things properly off
disk. This is important since we generally don't allow changing the
slice after a unit has been started. But given that we must track the
state of external objects with mount units we must hence initialize the
property no matter what.
2018-12-07 17:30:14 +01:00
Lennart Poettering
1f73647647 mount: document that mount_add_extras() must work with active units, too 2018-12-07 17:30:14 +01:00