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

40616 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
cae90de3d3 Reindent some things for readability 2019-06-28 11:19:24 +02:00
Lubomir Rintel
844d5a87c9 cryptsetup-generator: fix luks-* entry parsing from crypttab
This reverts a part of commit 49fe5c0996 ('tree-wide: port various places
over to STARTSWITH_SET()') that replaced a pair of startswith() calls
with STARTSWITH_SET().

They were in fact for a different strings (device vs. name), botching
the crypttap parsing.
2019-06-28 10:18:59 +02:00
Yu Watanabe
cc82851c0d bash-completion: support systemd-analyze condition 2019-06-28 10:04:38 +02:00
Yu Watanabe
22800b473e
Merge pull request #12889 from keszybz/analyze-condition
Add systemd-analyze condition
2019-06-28 02:37:20 +09:00
Zbigniew Jędrzejewski-Szmek
dc2c231684
Merge pull request #12760 from zachsmith/systemd-sleep_resume_offset
systemd-sleep: use resume_offset value if set
2019-06-27 13:37:27 +02:00
Zbigniew Jędrzejewski-Szmek
9266f31e61 core: skip whitespace after "|" and "!" in the condition parser
We'd skip any whitespace immediately after "=", but then we'd treat whitespace
that is between "|" or "!" and the value as significant. This is rather
confusing, let's ignore it too.
2019-06-27 10:54:37 +02:00
Zbigniew Jędrzejewski-Szmek
e3b52014e2 shared/condition: fix printing of ConditionNull=
ConditionNull= is the only condition where parameter==NULL is allowed,
and we'd print ConditionNull=(null) or ConditionNull=!(null).
2019-06-27 10:54:37 +02:00
Zbigniew Jędrzejewski-Szmek
edfea9fe0d analyze: add 'condition' verb
We didn't have a straightforward way to parse and evaluate those strings.
Prompted by #12881.
2019-06-27 10:54:37 +02:00
Zbigniew Jędrzejewski-Szmek
a93c6ed342
Merge pull request #12894 from stapelberg/patch-1
cryptsetup: comment: crypt_setup → crypt_format
2019-06-27 10:43:48 +02:00
Michael Prokop
d238709c14 docs: fix typos and duplicate words
s/and and/and/
s/explicity/explicitly/
s/that that/that/
s/the the/the/
s/is is/it is/
s/overriden/overridden/
2019-06-27 10:43:21 +02:00
Michael Stapelberg
307472654c
cryptsetup: comment: crypt_setup → crypt_format 2019-06-27 09:38:30 +02:00
Zbigniew Jędrzejewski-Szmek
f9d269e14d
Merge pull request #12890 from yuwata/fix-conf-parser-12883
conf-parse: fix continuation handling
2019-06-27 08:13:14 +02:00
Zach Smith
64602c843b systemd-sleep: refuse to calculate swapfile offset on Btrfs
If hibernation is requested but /sys/power/resume and
/sys/power/resume_offset are not configured correctly, systemd-sleep
attempts to calculate swapfile offset using fstat and fiemap.
Btrfs returns virtual device number for stat and a virtual offset
for fiemap which results in incorrect offset calculations. In the
case where offset would be calculated and the user is using Btrfs,
log a debug message and fail to write device and offset values.
2019-06-26 22:04:59 -07:00
Zach Smith
2002d8cdae systemd-sleep: (bug) use resume_offset value if set
Use hibernation configuration as defined in
/sys/power/resume and /sys/power/resume_offset
if present before inspecting /proc/swaps and
attempting to calculate swapfile offset
2019-06-26 22:04:59 -07:00
Evgeny Vereshchagin
a7c5865098
Merge pull request #12892 from yuwata/fix-test-format-util-12891
test: fix argument type of test_format_bytes_one()
2019-06-27 07:56:59 +03:00
Yu Watanabe
fd8c6b46c9 test: fix argument type of test_format_bytes_one()
Closes #12891.
2019-06-27 10:31:55 +09:00
Yu Watanabe
71d7a8218d util,test: rename variable non_iec -> si 2019-06-27 10:17:20 +09:00
Yu Watanabe
3d5d346aa5 test: add testcase for issue #12883 2019-06-27 03:03:45 +09:00
Yu Watanabe
0ef69585d8 conf-parser: fix continuation handling
Before this commit, empty lines cannot break continuation.
The bug was introduced by 9adbfeb38a.

Closes #12883.
2019-06-27 03:00:26 +09:00
Zbigniew Jędrzejewski-Szmek
b1d5246d29 core: do not enumerate units in MANAGER_TEST_RUN_MINIMAL mode
In this mode we are not supposed to "interact with the environment", so loading
all units and printing warnings about syntax errors and /var/run usage seems
inappropriate.
2019-06-26 16:25:36 +02:00
Zbigniew Jędrzejewski-Szmek
bbd199c438 man: move description of how conditions are combined to the beginning
Originally the description of conditions was brief, so it was acceptable
to put this part at the end. But now we have a myriad conditions, and
this crucial bit of information is easy to miss.
2019-06-26 16:24:48 +02:00
Zbigniew Jędrzejewski-Szmek
48f48b8c7c core: move assert before actual use of the variable
No point in using u->id first, and doing assert(u) later.
-std=c89 strikes again.
2019-06-26 16:24:48 +02:00
Michal Sekletar
33fe9e3fd0 execute: drop SYNTHETIC_ERRNO because error code was received from the apply_numa_policy() 2019-06-25 21:52:28 +02:00
Yu Watanabe
7f474ed78d network: further log message update
Follow-up for 44e891bbf6.
2019-06-26 00:56:51 +09:00
Joerg Behrmann
fa97f63067 core: factor root_directory application out of apply_working_directory
Fixes: #12498
2019-06-25 22:53:33 +09:00
Frantisek Sumsal
a07a7324ad core: move config_parse_* functions to a shared module
Apart from making the code a little bit more clean, it should allow us
to write a fuzzer around the config-parsing functions in the future
2019-06-25 22:35:02 +09:00
INSUN PYO
c13fb25734 man: change true/false to yes/no for DefaultDependencies. 2019-06-25 21:55:38 +09:00
Lennart Poettering
12a9fbe649
Merge pull request #12877 from poettering/dynamic-user-re-migrate2
DynamicUser=1 → = 0 migration follow-up
2019-06-25 12:20:26 +02:00
Lennart Poettering
b5bd7a29f9 some CODING_STYLE additions 2019-06-25 10:56:15 +02:00
Lennart Poettering
33a5137cf0 man: say D-Bus, not dbus 2019-06-25 10:47:46 +02:00
Lennart Poettering
cc9ba15efe man: improve --test documentation
Incorporates some suggestions from:

https://github.com/systemd/systemd/pull/12868#discussion_r296738370
cd69e88ba3 (commitcomment-34060775)
2019-06-25 10:47:46 +02:00
Lennart Poettering
528c365658 test: add test for DynamicUser=0 → =1 migration (and back) 2019-06-25 10:47:46 +02:00
Lennart Poettering
2193f17c08 core: mention why we do migration for everything but ConfigurationDirectory= 2019-06-25 10:47:46 +02:00
Lennart Poettering
cf52c45d6b core: log when we convert from DynamicUser=1 to =0 or vice versa 2019-06-25 10:47:46 +02:00
camoz
9a02707561 systemd-nspawn(1): update example section
Remove the retired flag -d from Example 4. "Boot a minimal Arch Linux
distribution in a container". It has been retired here:
https://git.archlinux.org/arch-install-scripts.git/commit/pacstrap.in?id=0af6884aca68dcb7eed0b85fbc2960903df3d968
2019-06-25 10:47:32 +02:00
Lennart Poettering
c7e42ceb7a
Merge pull request #12869 from poettering/dynamic-user-re-migrate
DynamicUser=1 state directory back migration
2019-06-25 10:06:03 +02:00
Kai Lüke
fab347489f bpf-firewall: custom BPF programs through IP(Ingress|Egress)FilterPath=
Takes a single /sys/fs/bpf/pinned_prog string as argument, but may be
specified multiple times. An empty assignment resets all previous filters.

Closes https://github.com/systemd/systemd/issues/10227
2019-06-25 09:56:16 +02:00
Lennart Poettering
2d901d33a9
Merge pull request #12874 from yuwata/ethtool-make-ubsan-quiet
ethtool: make UBSan quiet and add missing link modes
2019-06-25 09:28:21 +02:00
Lennart Poettering
05b2ace147
Merge pull request #12870 from yuwata/tree-wide-further-path-join-cleanups
tree-wide: further path_join() and path_joina() cleanups
2019-06-25 09:27:01 +02:00
Yu Watanabe
01a619a6ac
Merge pull request #12871 from keszybz/various-printing-fixes
Various printing/logging fixes
2019-06-25 13:02:33 +09:00
Yu Watanabe
6d02888935 ethtool: reindent link mode table 2019-06-25 11:55:59 +09:00
Yu Watanabe
72dda93acb ethtool: add missing link mode 2019-06-25 11:55:04 +09:00
Yu Watanabe
d16c272844 ethtool-util: fix returned value when ethtool_cmd_speed() is SPEED_UNKNOWN 2019-06-25 11:44:19 +09:00
Yu Watanabe
ffba064ae4 linux: make UBSAN quiet 2019-06-25 11:44:08 +09:00
Yu Watanabe
2824ed64a1 linux: update kernel headers 2019-06-25 11:29:13 +09:00
Zbigniew Jędrzejewski-Szmek
9dae4c8a26 bootctl: fix display of options with embedeed newlines
I have an .efi image with embedded newlinews. Now I don't even remember if it
was created for testing or by accident, but it doesn't really matter. We should
display such files correctly.

(This isn't a problem with normal BLS entries, because input is split into lines
so newlines are consumed.)
2019-06-25 10:30:58 +09:00
Lubomir Rintel
c4f885e7e0 sd-device: don't accept /sys as a device path
Because it's not a device path and (slightly) bad things happen if it
gets confused with one:

  $ udevadm info /sys/
  Assertion 'device->devpath[0] == '/'' failed at
      ../src/libsystemd/sd-device/sd-device.c:958,
      function sd_device_get_devpath(). Aborting.
  Aborted (core dumped)
2019-06-25 10:22:18 +09:00
Lubomir Rintel
f053fc337e udevd: fix a reversed conditional on global property set
# udevadm control --property=HELLO=WORLD
  Received udev control message (ENV), unsetting 'HELLO'
  # udevadm control --property=HELLO=
  Received udev control message (ENV), setting 'HELLO='

Oh no, it's busted. Let's try removing this one little negation real quick
to see if it helps...

  # udevadm control --property=HELLO=WORLD
  Received udev control message (ENV), setting 'HELLO=WORLD'
  # udevadm control --property=HELLO=
  Received udev control message (ENV), unsetting 'HELLO'

Feels much better now.
2019-06-25 10:20:48 +09:00
Lennart Poettering
330703fb22 man: beef up systemd.exec(5)
Prompted by:

https://lists.freedesktop.org/archives/systemd-devel/2019-May/042773.html
2019-06-24 18:31:36 +02:00
Yu Watanabe
270384b2d4 tree-wide: replace strjoina() with prefix_roota() 2019-06-25 01:31:26 +09:00