1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
Commit Graph

32757 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
04b9d5f975 hwdb: update
usb.ids are not updated, because linux-usb.org is down.

It seems that the updates are corrections and new entries, to major
removal of existing entries.
2018-03-02 12:12:04 +01:00
futpib
ae934a7325 hwdb: add accelerometer mount matrix for Asus TP300LD (#8327) 2018-03-02 12:11:28 +01:00
Lennart Poettering
2589472712
Merge pull request #8237 from sourcejedi/timer_suspend
core: let OnCalendar= timer units expire during suspend (#8231)
2018-03-02 12:11:06 +01:00
Zbigniew Jędrzejewski-Szmek
558ad9cbc8 hwdb: ignore whitespace in downloaded files 2018-03-02 12:09:52 +01:00
Zbigniew Jędrzejewski-Szmek
299597f8d5 tools/hwdb-update: allow downloads to fail
sf.net is down, and linux-usb.org which is hosted there also fails.
That's not nice, but there's not we can do about it now.
2018-03-02 12:06:32 +01:00
Lennart Poettering
340aff15f8 logind: fix typo in comment 2018-03-02 11:56:15 +01:00
Lennart Poettering
4d3900f1b7 logind: open device if needed
Fixes: #8291
2018-03-02 11:55:51 +01:00
Lennart Poettering
4804600b6a logind: cast away return value we don't care about 2018-03-02 11:55:33 +01:00
Lennart Poettering
a3ddf73c0e logind: voidify a function we never check the return value of 2018-03-02 11:55:16 +01:00
Zbigniew Jędrzejewski-Szmek
4af1aea411 tools/hwdb-update: print what is being executed 2018-03-02 11:50:43 +01:00
Lennart Poettering
96fcc89ab5 fd-util: drop stdio_unset_cloexec(), it's not used anymore 2018-03-02 11:42:10 +01:00
Lennart Poettering
40164c2ceb sd-bus: let's better not invade stdio territory when duplicating fds 2018-03-02 11:42:10 +01:00
Lennart Poettering
2b33ab0957 tree-wide: port various places over to use new rearrange_stdio() 2018-03-02 11:42:10 +01:00
Lennart Poettering
8bb2db738e terminal-util: port some generic code over to rearrange_stdio() 2018-03-02 11:42:10 +01:00
Lennart Poettering
aa11e28bf2 fd-util: add new call rearrange_stdio()
Quite often we need to set up a number of fds as stdin/stdout/stderr of
a process we are about to start. Add a generic implementation for a
routine doing that that takes care to do so properly:

1. Can handle the case where stdin/stdout/stderr where previously
   closed, and the fds to set as stdin/stdout/stderr hence likely in the
   0..2 range.  handling this properly is nasty, since we need to first
   move the fds out of this range in order to later move them back in, to
   make things fully robust.

2. Can optionally open /dev/null in case for one or more of the fds, in
   a smart way, sharing the open file if possible between multiple of
   the fds.

3. Guarantees that O_CLOEXEC is not set on the three fds, even if the fds
   already were in the 0..2 range and hence possibly weren't moved.
2018-03-02 11:42:10 +01:00
Zbigniew Jędrzejewski-Szmek
47920c4a26
Merge pull request #8316 from yuwata/fix-8315
sysusers: do not create duplicated groups when create users
2018-03-02 11:32:25 +01:00
Zbigniew Jędrzejewski-Szmek
3ab74d0a43
Merge pull request #8330 from filbranden/masked1
Detect masked unit with drop-ins
2018-03-02 11:24:31 +01:00
Zbigniew Jędrzejewski-Szmek
f7c5427c28 meson: use dashes in colour names 2018-03-02 09:09:29 +01:00
Alexander F Rødseth
96164a3936 Add build-time option to change the color of the "OK" status text 2018-03-02 09:00:44 +01:00
Alexander F Rødseth
6d1d8f66e0 Organize the ANSI codes and add missing colors
For consistency.
2018-03-02 08:58:02 +01:00
Yu Watanabe
69b0740785 test-execute: add tests with user/group daemon
The nobody user/group may not synthesized by systemd.
To run tests the functionalities in such situation, this adds tests
by user/group by daemon, as it is expected to exists all environments.
2018-03-02 16:42:53 +09:00
Filipe Brandenburger
67348e791d test: masked unit with drop-ins 2018-03-01 21:14:13 -08:00
Filipe Brandenburger
9639b1752c install: detect masked unit with drop-ins
Before this fix, a unit with drop-ins will not be reported as masked by
`systemctl is-enabled` or `systemctl list-unit-files`.
2018-03-01 21:11:35 -08:00
Yu Watanabe
d4f0412de4 sysusers: do not implicitly create group by 'm' if 'u' with the same name exists
The commit e2c2060f7b makes 'm' lines
disturb 'u' lines.
This fixes the disturbance.
2018-03-02 07:38:28 +09:00
Yu Watanabe
fb5dfbc2d8 test: add a test for sysusers
The test cases for sysusers did not cover the situation reported in
issue #8315. Let's add one more test case.
2018-03-02 07:12:40 +09:00
Yu Watanabe
b5327d0a65 sysusers: do not create duplicated groups when create users
The commit e2c2060f7b introduces
the issue #8315.

Fixes #8315.
2018-03-02 07:12:38 +09:00
Zbigniew Jędrzejewski-Szmek
671f0f8de0 Remove /sbin from paths if split-bin is false (#8324)
Follow-up for 157baa87e4.
2018-03-01 21:48:36 +01:00
Lennart Poettering
9711b1adc7 update TODO 2018-03-01 15:30:24 +01:00
Lennart Poettering
7df4b832d0
Merge pull request #8319 from keszybz/yet-another-symlink-installation-tweak
meson: fix symlink creation when sbin is symlink to bin
2018-03-01 15:06:02 +01:00
Lennart Poettering
3896a17bdc
Merge pull request #8293 from dobyrch/master
tree-wide: fix inconsistencies in option parsing
2018-03-01 15:03:19 +01:00
Lennart Poettering
94c047203b
Merge pull request #8322 from keszybz/doc-tweak
man: document that link-ed files must be on /
2018-03-01 14:58:12 +01:00
Douglas Christman
6c1a6df375 udevadm: prevent segfault in blkid builtin when offset not specified
"--offset" takes an optional argument; if none is specified,
stroull() will attempt to parse a NULL pointer. For example:

$ udevadm test-builtin 'blkid --offset' /sys/dev/block/8:1

Update "--offset" to require an argument; also verify that the
offset is not negative.
2018-03-01 21:50:38 +08:00
Douglas Christman
3a6a6889e1 analyze: fix typo in error message 2018-03-01 21:50:38 +08:00
Douglas Christman
63547675a4 test-libudev: make "-m" equivalent to "--monitor"
"-m" is specified as a short form of "--monitor" in the option struct,
but not included in getopt_long's optstring.  Update the optstring
to be consistent with the option struct.
2018-03-01 21:50:38 +08:00
Douglas Christman
68da321f66 systemctl: remove redundant option parsing code
"-f" used to be overloaded to mean both "--force" and "--follow";
aae9a96d removed "--follow", leaving behind some duplicate code.
2018-03-01 21:50:38 +08:00
Douglas Christman
2de6b06b27 journalctl: make journalctl -g work as documented
Add "g" to optstring so both "--grep" and "-g" work with journalctl
2018-03-01 21:50:38 +08:00
Zbigniew Jędrzejewski-Szmek
2f3828e5c6 man: document that link-ed files must be on /
Fixes #8307.
2018-03-01 13:11:00 +01:00
Zbigniew Jędrzejewski-Szmek
157baa87e4 meson: support both separate and merged sbin-bin directories
Follow-up for ba7f4ae617.

By default, we detect if the real root has a separate /usr/sbin directory, but
this can be overrides with -Dsplit-bin=true|false. The check assumes that
/usr/sbin is split if it is not a symlink, so it'll return a false negative
with some more complicated setups. But that's OK, in those cases this should be
configured explicitly.

This will copy the structure of the directories in the root file system to
$DESTDIR. If a directory is a directory in $DESTDIR but a symlink in the root
file system, this script will fail. This means that it's not possible to reuse
a $DESTDIR from between ba7f4ae61 and this patch.
2018-03-01 12:27:33 +01:00
Zbigniew Jędrzejewski-Szmek
2675413e39 meson: autodetect split-usr
Also move the status from "features" to the paths section. This is more of an
anti-feature.
2018-03-01 12:23:00 +01:00
Lennart Poettering
16a4f265e4 procfs-util: drop unnecessary zero initializations (#8321)
Follow-up for #8149.
2018-03-01 11:27:06 +01:00
Lennart Poettering
902c8502ad
Merge pull request #8149 from poettering/fake-root-cgroup
Properly synthesize CPU+memory accounting data for the root cgroup
2018-03-01 11:10:24 +01:00
Franck Bui
acc8059129 units: delegate "memory" instead of "cpu" by default for user instances (#8320)
CPU accounting has a too bad impact on performance to be enabled by
default. Therefore we should not delegate "cpu" for now.

OTOH since commit e0c46a7364, memory accounting
has been turned on for all units by default so it makes sense to delegate this
controller by default.
2018-03-01 10:58:03 +01:00
Lennart Poettering
fba03e3ab4
Merge pull request #8318 from keszybz/doc-tweak
A small man page update
2018-03-01 10:44:17 +01:00
Yu Watanabe
d2f95a223f test-execute: add a test for the case that NOBODY_GROUP_NAME is nogroup 2018-03-01 18:31:26 +09:00
Yu Watanabe
57c2efa0c3 test-execute: check nobody user and group are configured correctly
Several tests request nobody user or group. If they are badly
configured, then tests may fail.

This makes test-execute check nobody user and group are configured
correctly before running such tests.

Fixes #8276.
2018-03-01 18:29:28 +09:00
Zbigniew Jędrzejewski-Szmek
9177fa9f2b basic/cgroup-util: simplify cg_get_keyed_attribute(), add test
I didn't like the nested loop where we'd count what we have acquired already,
since we should always know that.
2018-03-01 09:34:33 +01:00
Zbigniew Jędrzejewski-Szmek
ee4e9a1090 gitignore .pot file
It is created by "ninja systemd-pot", and we don't want to include it
in git.
2018-03-01 08:05:27 +01:00
Lennart Poettering
649a5ffba8
Merge pull request #8171 from poettering/sd-bus-queue-limit
try not to overload pid1's bus message write queue
2018-02-28 18:15:40 +01:00
Alan Jenkins
13f512d324 core: don't freeze OnCalendar= timer units when the clock goes back a lot
E.g. if you have a monthly event and you set the computer clock back one
year, we can allow the next 12 monthly events to happen naturally.  In fact
we already do this when you start a Persistent=yes timer, we just need to
apply the same logic when it's running and we notice the system clock
being set backwards.
2018-02-28 17:00:07 +00:00
Alan Jenkins
9ea9faff78 core: let OnCalendar= timer units expire during suspend (#8231)
On timejumps, including suspend, timer_time_change() calls for a
re-calculation of the next elapse.  Sadly I'm not quite sure what the
intended effect of this was!  Because it was not managing to fire
OnCalendar= timers which fired during the suspend... unless the timer had
already fired once before.

Reported, entirely correctly as far as I can see, on stackexchange:
https://unix.stackexchange.com/questions/351829/systemd-timer-that-expired-while-suspended

 /* If we know the last time this was
  * triggered, schedule the job based relative
- * to that. If we don't just start from
- * now. */
+ * to that. If we don't, just start from
+ * the activation time. */

The same code is called for both the initial calculation and this
re-calculation.  If we're _not_ already active, then this is before the
activation time has been recorded in the unit, so just use the current
time as before.  The new code is mechanically adapted from the same
logic for `OnActiveSec=` (case TIMER_ACTIVE in the code which follows).

Tested with `date --set`.

Motivations:

* Rotate monitoring data from Atop into files which are named per-day.
  Fedora currently implements this with a cron job that runs at midnight,
  but that didn't handle suspend correctly either.

* unbound-anchor.timer on Fedora, is used to update DNSSEC "root trust
  anchor" daily, before the TTL expires.  It uses OnCalendar=daily
  AccuracySec=24h.  Which is a bit suspect because the TTL is 2 days, but I
  think it has the right general idea.

  None of the other timer settings are correct, because they would not
  account for time spent in suspend.  Unless you set WakeSystem
  (this feature is currently undocumented).

* So in general, we can expect to see people using OnCalendar= for the same
  cases as cron.daily and cron.monthly.  Which use anacron to keep track of
  jobs which should be run even if the system was down at the time.

  Timers which are configured to run more frequently than that, are
  unlikely to mind if they get run slightly more often that the writer
  realized, relative to the amount of time the system was really running.

* From the user report above: "I only want to use remind to show a desktop
  notification, it seems excessive to wake up the computer for that. Also,
  I would like to get the reminder first thing in the morning, so the
  OnActiveSec doesn't help with that."
2018-02-28 16:12:22 +00:00