1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-27 01:55:32 +03:00
Commit Graph

32920 Commits

Author SHA1 Message Date
David Tardon
3de8ff5a69 journald: bump rate limits (#8660)
Apparently, it is quite common to hit a problem, where systemd-journald
would drop messages because service is logging too fast.
2018-04-05 13:06:59 +02:00
Lennart Poettering
6064de2de8
Merge pull request #8617 from keszybz/tmpfiles-relax
Do not exit with error when systemd-tmpfiles --boot fails
2018-04-05 11:54:02 +02:00
Lennart Poettering
ba45959cb2
Merge pull request #8656 from yuwata/random-fixes
use TAKE_PTR() and TAKE_FD() macros, and small fixes
2018-04-05 10:19:12 +02:00
Zbigniew Jędrzejewski-Szmek
c79b89e6eb tmpfiles: ignore "operational" errors during setup
We still get the errors logged, but we don't fail the service. This
is better for users because rerunning tmpfiles-setup.service a second
time is dangerous (c.f. cd9f5b68ce).
Note that this only touches sd-tmpfiles-setup.service and
sd-tmpfiles-setup-dev.service. sd-tmpfiles-clean.service is as before.

https://bugzilla.redhat.com/show_bug.cgi?id=1539341
2018-04-05 08:13:53 +02:00
Zbigniew Jędrzejewski-Szmek
bb9947be2f tmpfiles: add a new return code for "operational failure" when processing
Things can fail, and we have no control over it:
- file system issues (immutable bits, file system errors, MAC refusals, etc)
- kernel refusing certain arguments when writing to /proc/sys or /sys
Let's add a new code for the case where we parsed configuration but failed
to execute it because of external errors.
2018-04-05 08:13:53 +02:00
Yu Watanabe
0dfb0a0abd core/device: trivial simplification 2018-04-05 14:26:34 +09:00
Yu Watanabe
1cc6c93a95 tree-wide: use TAKE_PTR() and TAKE_FD() macros 2018-04-05 14:26:26 +09:00
Yu Watanabe
3d282fff06 network: fix typo in log message 2018-04-05 10:20:13 +09:00
Yu Watanabe
393a256bbb meson: sort source files 2018-04-05 10:20:08 +09:00
Yu Watanabe
9629659f60 bus-util: fix a meaningless assertion 2018-04-05 10:19:57 +09:00
Zbigniew Jędrzejewski-Szmek
c0f9017c11
Merge pull request #8605 from poettering/drop-in-name-fix
Fix validation of unit file drop-in naming in install.c.
2018-04-04 11:52:14 +02:00
Filipe Brandenburger
edb3ca0d61 test-path: Set umask explicitly (#8616)
Running `test-path` under an umask such as 027 fails with:

  Assertion '(s.st_mode & S_IRWXO) == 0004' failed at ../src/test/test-path.c:247, function test_path_makedirectory_directorymode(). Aborting.

Looking at directory /tmp/test-path_makedirectory, it was indeed created
with mode 0740, applying the umask to the requested 0744.

Set an explicit umask for this test, to ensure reproducible results.
2018-04-04 11:17:19 +02:00
Filipe Brandenburger
add384dd4d units: use systemctl exit to kill the user manager (#8648)
Use `systemctl --user --force exit` to implement the systemd-exit
user service.

This removes our dependence on an external `kill` binary and the
concerns about whether they recognize SIGRTMIN+n by name or what their
interpretation of SIGRTMIN is.

Tested: `systemctl --user start systemd-exit.service` kills the
  `systemd --user` instance for my user.
2018-04-04 11:14:37 +02:00
Feng Sun
709e86f18f fix missed bracket of exec-personality-ppc64le.service (#8650)
Signed-off-by: Neil Sun <neilsun@yunify.com>
2018-04-04 11:10:42 +02:00
Zbigniew Jędrzejewski-Szmek
29ac24d2f4
Merge pull request #8624 from yuwata/fix-8371
bash-completion: fixes for busctl
2018-04-04 09:39:10 +02:00
Filipe Brandenburger
63554ed907 oss-fuzz: Fallback to ninja-build when available (#8641)
The ninja binary is deployed as `ninja-build` in older distros such as
RHEL 7/CentOS 7.  Detect that and use `ninja-build` instead of `ninja`
when it's available.
2018-04-04 09:32:59 +02:00
Evgeny Vereshchagin
68b04721dc
Merge pull request #8643 from poettering/coding-style-fixlets
Trivial CODING_STYLE additions
2018-04-04 02:13:05 +03:00
Lennart Poettering
25ac900ad7 CODING_STYLE: document suggested suffixes to use in documentation 2018-04-03 15:22:26 +02:00
Lennart Poettering
46f8867372 CODING_STYLE: two minor additions 2018-04-03 15:22:26 +02:00
Lennart Poettering
4afbb9004c CODING_STYLE: mention that we ship .editconfig/.vimrc/.dir-locals.el in our repo 2018-04-03 15:22:26 +02:00
Lennart Poettering
53c70a2706 update TODO 2018-04-03 15:22:25 +02:00
Ricardo Salveti de Araujo
2ef5de1bd9 tmpfiles: fix directory removal with force symlink (#8619)
symlink_atomic returns -EISDIR when the target symlink path is a
directory.

Fixes #7447

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
2018-04-03 15:05:11 +02:00
Evgeny Vereshchagin
f6c63f6fc9 core: skip the removal of cgroups in the TEST_RUN_MINIMAL mode (#8622)
When `systemd` is run in the TEST_RUN_MINIMAL mode, it doesn't really
set up cgroups, so it shouldn't try to remove anything.

Closes https://github.com/systemd/systemd/issues/8474.
2018-04-03 15:04:22 +02:00
João Paulo Rechi Vita
cde942f61b dissect: Don't count RPMB and boot partitions (#8609)
Filter-out RPMB partitions and boot partitions from MMC devices when
counting partitions enumerated by the kernel. Also factor out the now
duplicated code into a separate function.

This complement the previous fixes to the problem reported in
https://github.com/systemd/systemd/issues/5806
2018-04-03 14:51:18 +02:00
Lennart Poettering
bd6ae7e6f0
Merge pull request #8628 from jwrdegoede/hwdb-sensors2
Hwdb sensors2
2018-04-03 14:49:39 +02:00
Radostin Stoyanov
fcc7ce4c8e man: machinectl: update fedora exmple URL (#8642) 2018-04-03 12:06:53 +09:00
Alexander Kurtz
61f1196085 coccinelle: fix typo in file name (#8640) 2018-04-02 23:30:26 +09:00
Lennart Poettering
34bfb98ace
Merge pull request #8626 from floppym/initctl
sysvinit-2.89 compatibility fixes
2018-03-31 12:56:58 +02:00
Will Dietz
203690537b generate-af-list.sh: slightly generalize pattern, fix w/musl (#8629)
Accept definitions to other AF_ constants, not just PF_ ones,
such as:

  #define AF_LINUX AF_LOCAL

It may not be necessary to impose any restriction on the
definitions of the macros extracted, but for now
keep most of that requirement but match AF_* as well.
2018-03-31 12:55:45 +02:00
Hans de Goede
86f8fd7141 hwdb: Add accelerometer orientation quirk for the Pipo W4 tablet
Add an accelerometer orientation quirk for the Pipo W4 tablet.
2018-03-30 23:39:29 +02:00
Mike Gilbert
83c76e8c38 systemctl: try opening /run/initctl before /dev/initctl
This ensures compatability with old/new sysvinit.

http://git.savannah.nongnu.org/cgit/sysvinit.git/commit/?id=80dbcf3de3c1b83aeaa713a8fe5b8d35d8649af2
2018-03-30 16:52:14 -04:00
Mike Gilbert
4d8c7c1b3a units: initctl: move the fifo to /run/initctl to match sysvinit
The fifo location was moved in sysvinit-2.89.

http://git.savannah.nongnu.org/cgit/sysvinit.git/commit/?id=80dbcf3de3c1b83aeaa713a8fe5b8d35d8649af2
2018-03-30 16:52:14 -04:00
Hans de Goede
d167ea9886 hwdb: Add accelerometer orientation quirk for the Lenovo Ideapad Miix 310
Add an accelerometer orientation quirk for the Lenovo Ideapad Miix 310.
Note this quirk is limited to the production batches which ship with a
portrait panel, rather then with a landscape panel (recognized by the
different BIOS version these 2 variants use).
2018-03-30 20:00:27 +02:00
Hans de Goede
366b21efed hwdb: Add accelerometer orientation quirk for the MSI S100 2-in-1
Add an accelerometer orientation quirk for the MSI S100 2-in-1.
2018-03-30 17:11:17 +02:00
Hans de Goede
fd2f44a2f9 hwdb: Add accelerometer orientation quirk for the Yours Y8W81 tablet
Add an accelerometer orientation quirk for the Yours Y8W81 8" tablet.

For future reference: this tablet has the same case and mostly the same
internals as the Chuwi Vi8. Both seem to be from an ODM called inet-tek.
Both are labelled: "INET-I86M-REVxx" on the PCB, with the Chuwi Vi8 being
REV03 (and having a ALC5640 audio codec) and the Yours Y8W81 being REV21
(and having a ALC5651 audio codec).
2018-03-30 17:11:17 +02:00
Hans de Goede
03994fa227 hwdb: Add accelerometer orientation entry for the I.T.Works TW701 tablet
Add accelerometer orientation entry for the I.T.Works TW701 7"
windows tablet, note this is the same hardware/PCB as the Trekstor
ST70416-6 for which we already have the same quirk.
2018-03-30 17:11:17 +02:00
Hans de Goede
839e7ac2de hwdb: 60-sensors: Fix alphabetic sorting by vendor name
The Cytrix entry was added at the end instead of sorted alphabetically
by vendor name.
2018-03-30 17:10:51 +02:00
Yu Watanabe
7f9c3ecad8 bash-completion: busctl: make variables local 2018-03-30 17:13:52 +09:00
Yu Watanabe
4cbb7c500a bash-completion: busctl: do not suggest "-" for signature
Fixes #8371.
2018-03-30 17:08:14 +09:00
Yu Watanabe
1e58b1dc40 bash-completion: busctl: suggests only writable properties for set-property 2018-03-30 17:06:50 +09:00
Yu Watanabe
3e85ec0721 timesync: on network event do not establish connection when NTP servers are not changed (#8611)
Fixes #8603.
2018-03-29 16:15:56 +02:00
Zbigniew Jędrzejewski-Szmek
56fbd7187a sd-bus: allow description to be set for system/user busses (#8594)
sd_bus_open/sd_bus_open_system/sd_bus_open_user are convenient, but
don't allow the description to be set. After they return, the bus is
is already started, and sd_bus_set_description() fails with -EBUSY.
It would be possible to allow sd_bus_set_description() to update the
description "live", but messages are already emitted from sd_bus_open
functions, so it's better to allow the description to be set in
sd_bus_open/sd_bus_open_system/sd_bus_open_user.

Fixes message like:
Bus n/a: changing state UNSET → OPENING
2018-03-29 16:14:11 +02:00
Lennart Poettering
1e7fa6f57d bus-unit-util: one less newline 2018-03-29 15:45:07 +02:00
Lennart Poettering
d04a93864d install: don't enforce that .d/ dropin files (and their symlink chain elements) for units must have names that qualify as unit names
The names of drop-in files can be anything as long as they are suffixed
in ".conf", hence don't be stricter than necessary when validating the
names used in symlink chains of such drop-in files.

Also, drop-in files should not be ale to change the type of unit file
itself, i.e. not affect whether it is considered masked or an alias as a
whole.

This adds a flag SEARCH_DROPIN that is passed whenever we load a drop-in
rather the main unit file, and in that case loosen checks and behaviour
we otherwise enforce for the unit file itself. Specifically:

1. If SEARCH_DROPIN is passed we won't change the unit's info->type
   field anymore, as that field (which can be REGULAR, MASKED, SYMLINK)
   should not be affected by drop-ins, but only by the unit file itself.

2. If SEARCH_DROPIN is passed we will shortcut following of symlink
   chains, and not validate the naming of each element in the chain,
   since that's irrelevant for drop-ins, and only matters for the unit
   file itself.

Or in other words, without this:

1. A symlink /etc/systemd/system/foobar.service.d/20-quux.conf →
   /dev/null might have caused the whole of foobar.service to be
   considered "masked".

2. A symlink /etc/systemd/system/foobar.service.d/20-quux.conf →
   /tmp/miepf might have caused the whole loading of foobar.service to
   fail as EINVAL, as "miepf" is not a valid unit name.
2018-03-29 15:45:02 +02:00
Lennart Poettering
244d2f07b4 fs-util: add shortcut for chase_symlinks() when it is called like open(O_PATH)
Let's optimize things, and let the kernel chase the paths if none of the
features chase_symlinks() offers are actually used.
2018-03-29 15:33:12 +02:00
Lennart Poettering
36952d1919 dissect: port code to chase_symlinks_and_open() 2018-03-29 15:33:12 +02:00
Lennart Poettering
21c692e9bf fs-util: add calls that combine chase_symlinks() and open()/opendir() in one
This is useful when opening files within disk images, as we'll then take
the relative root directory properly into account.
2018-03-29 15:33:12 +02:00
Lennart Poettering
f2324783ce fd-util: introduce fd_reopen() helper for reopening an fd
We have the same code for this in place at various locations, let's
unify that. Also, let's repurpose test-fs-util.c as a test for this new
helper cal..
2018-03-29 15:33:12 +02:00
Yu Watanabe
c75436067f tree-wide: remove unused variables (#8612) 2018-03-29 12:50:50 +02:00
Zbigniew Jędrzejewski-Szmek
3d5b4aaad3
Merge pull request #8606 from dell/rename-suspend-to-hibernate
Rename suspend-to-hibernate to suspend-then-hibernate
2018-03-29 12:30:18 +02:00