Commit Graph

30744 Commits

Author SHA1 Message Date
Lennart Poettering 5962e9db5e update TODO 2017-11-21 11:54:08 +01:00
Lennart Poettering 3c7416b6ca core: unify common code for preparing for forking off unit processes
This introduces a new function unit_prepare_exec() that encapsulates a
number of calls we do in preparation for spawning off some processes in
all our unit types that do so.

This allows us to neatly unify a bit of code between unit types and
shorten our code.
2017-11-21 11:54:08 +01:00
Lennart Poettering 6925a0de4e cgroup-util: move Set* allocation into cg_kernel_controllers()
Previously, callers had to do this on their own. Let's make the call do
that instead, making the caller code a bit shorter.
2017-11-21 11:54:08 +01:00
Lennart Poettering bf516294c8 nspawn: minor optimization
no need to prepare the target path if we quite the loop anyway one step
later.
2017-11-21 11:54:08 +01:00
Lennart Poettering d7c9693a3e nspawn-mount: rework get_controllers() a bit
Let's rename get_controllers() → get_process_controllers(), in order to
underline the difference to cg_kernel_controllers(). After all, one
returns the controllers available to the process, the other the
controllers enabled in the kernel at all).

Let's also update the code to use read_line() and set_put_strdup() to
shorten the code a bit, and make it more robust.
2017-11-21 11:54:08 +01:00
Lennart Poettering ea9053c5f8 nspawn: rework mount_systemd_cgroup_writable() a bit
We shouldn't call alloca() as part of function calls, that's not really
defined in C. Hence, let's first do our stack allocations, and then
invoke functions.

Also, some coding style fixes, and minor shuffling around.

No functional changes.
2017-11-21 11:54:08 +01:00
Lennart Poettering 68ac0d05a9 cgroup: move cgroup controller names def.h → cgroup-util.h
These definitions are clearly cgroup specific, hence let's move them out
of def.h
2017-11-21 11:54:08 +01:00
Susant Sahani 8ad93cacf0 networkd: cleanup do not call link_enter_set_routes after label is set. (#6935)
Remove link_enter_set_routes after label is set.
2017-11-21 11:54:14 +01:00
Susant Sahani 762e2659b9 networkd: support incoming/outgoing device for rule matching (#7223)
Closes #7210
2017-11-21 11:51:50 +01:00
Shawn Landden 172378e01b shared: silence gcc warning (#7402)
[346/1860] Compiling C object 'src/shared/systemd-shared-235@sha/firewall-util.c.o'.
../src/shared/firewall-util.c: In function ‘entry_fill_basics’:
../src/shared/firewall-util.c:81:79: warning: logical ‘and’ of equal expressions [-Wlogical-op]
[543/1860] Compiling C object 'src/shared/systemd-shared-235@sta/firewall-util.c.o'.
../src/shared/firewall-util.c: In function ‘entry_fill_basics’:
../src/shared/firewall-util.c:81:79: warning: logical ‘and’ of equal expressions [-Wlogical-op]
2017-11-21 08:24:12 +01:00
Shawn Landden 23d37367ed NEWS: fix minor error (#7399) 2017-11-21 11:05:57 +09:00
lukas d8bd96ab54 hwdb: Add ACCEL_MOUNT_MATRIX for the Acer Aspire Switch 10 convertible
SW5-012 (#7394)
2017-11-20 20:26:38 +01:00
Zbigniew Jędrzejewski-Szmek 7624e721c8 test: fall back to /boot if bootctl -p fails (#7397)
It doesn't really matter why.
2017-11-20 20:08:11 +01:00
Susant Sahani 444b017046 networkd: configure link even if no routes have been received by dhcp (#6886)
Fixes #3752

 networkctl
IDX LINK             TYPE               OPERATIONAL SETUP
  1 lo               loopback           carrier     unmanaged
  2 eth0             ether              no-carrier  configuring
  5 host             ether              routable    configured <==========

5 links listed.
2017-11-20 19:23:34 +01:00
Lennart Poettering 8c6f6a2f91
Merge pull request #6910 from ssahani/issue-6359
networkd: For IPv6 addresses do not treat IFA_F_DEPRECATED as not ready. (Fix #6359)
2017-11-20 19:21:36 +01:00
Lennart Poettering 4ff971ac08
Merge pull request #6918 from ssahani/issue-5625
networkd: ndisc - do not stop ndisc client incase of conf error.
2017-11-20 19:20:23 +01:00
Susant Sahani e87e2b78f7 networkd: address - support for /31 IPv4 addresses (rfc3021) (#6938)
When configuring a network address with /31 using networkd, a /31 without a
broadcast specified should be present.

 A /31 which has neither a network nor a broadcast address. See
https://tools.ietf.org/html/rfc3021

Fixes #4038
2017-11-20 19:16:01 +01:00
Susant Sahani a63e5daaa3 networkd: Do not send requests to create netdevs if they exists. (#6973)
If the netdev already exists we should not send requests to
kernel to create them.

fixes #5448
2017-11-20 18:58:06 +01:00
Susant Sahani 8a9b3a23fd networkd: Set RoutingPolicyRule in link_configure (#7235)
The RoutingPolicyRules are not added when we are calling from set_address
the link->message++ and link->message-- never reaches to zero in the callback function
resulting routes are never gets added.

Closes #7200
2017-11-20 17:50:48 +01:00
Zbigniew Jędrzejewski-Szmek 9990ea0e59
Merge pull request #7375 from poettering/readme-updates
some README updates
2017-11-20 14:46:02 +01:00
Zbigniew Jędrzejewski-Szmek 5d9adb5b60 man: fix description of --force in halt(8) (#7392)
https://bugzilla.redhat.com/show_bug.cgi?id=1449751
2017-11-20 14:27:46 +01:00
Lennart Poettering 4ff183d419
Merge pull request #7154 from keszybz/bootspec
List bootspec entries in bootctl and use the default for kexec
2017-11-20 13:06:33 +01:00
Lennart Poettering df8ca63396
Merge pull request #7387 from yuwata/fix-7370
core: load() should fail when the corresponding unit file does not exist
2017-11-20 12:51:40 +01:00
Lennart Poettering 2422bd21c8 README,sysusers: complete and order list of default udev groups we need
Let's make sure the list of default udev groups we need are ordered in
README and in the sysusers.d snippet, and both are complete.
2017-11-20 12:34:28 +01:00
Lennart Poettering 9e93f6f092 README: slightly update the section about split /usr
It's fine if /usr is actually on a separate fs. What matters is that it
is mounted early enough. Say so.
2017-11-20 12:34:28 +01:00
Lennart Poettering 01c8938e54 README: document that prefix *must* be /usr and nss-systemd is not an option
See: #7374
2017-11-20 12:30:57 +01:00
Zbigniew Jędrzejewski-Szmek 18c8db140f meson: add -Wimplicit-fallthrough=3 to compilation options (#7393)
At some point before gcc-7 was released, -Wimplicit-fallthrough=3 was included
in -Wextra. The documentation for gcc-7.2.1-2.fc27.x86_64 still says that, but
empirical testing shows that it's not. The documentation also misstates that
-Wimplicit-fallthrough is equivalent to -Wimplicit-fallthrough=3.

Let's add -Wimplicit-fallthrough=3 explicitly to get the warnings if we regress.

Prompted by #7389.
2017-11-20 12:14:47 +01:00
Zbigniew Jędrzejewski-Szmek f9753b0c79
Merge pull request #7373 from poettering/analyze-calendar
add nifty little "systemd-analyze calendar" command
2017-11-20 11:25:55 +01:00
Lennart Poettering 021723c63e systemctl: elapsation → elapse 2017-11-20 10:57:41 +01:00
Lennart Poettering 4154ce8a85 update TODO 2017-11-20 10:57:41 +01:00
Lennart Poettering 6d86f4bd11 analyze: add new "calendar" command
This little new command can parse, validate, normalize calendar events,
and calculate when they will elapse next. This should be useful for
anyone writing calendar events and who'd like to validate the expression
before running them as timer units.
2017-11-20 10:57:41 +01:00
John Lin e79eabdb1b man: Requires= stops this unit when dependencies get deactivated (#7391)
Fixes: #7372
2017-11-20 10:55:52 +01:00
Lennart Poettering 9a9a4f10e9 util: add new helper in_utc_timezone()
As the name suggests it checks whether we are running in an UTC
timezone.
2017-11-20 10:53:26 +01:00
Lennart Poettering 7c123d49fc calendarspec: rework destructor to return its own type
Let's make it more alike most of our other destructors.
2017-11-20 10:34:43 +01:00
Zbigniew Jędrzejewski-Szmek 86ea8d70fc
meson: bump required meson version to 0.41 (#7385)
We need data_dirs argument for i18n.merge_file, added in 0.40.1-11-g82492f5d76.
2017-11-20 08:08:43 +01:00
Yu Watanabe 3000f85014 core/swap: load() should fail when neither of corresponding unit file nor /proc/swap entry does not exist
It is not necessary to label as loaded to a swap unit when neither of
corresponding unit file nor entry in /proc/swap does not exist.
This makes swap_load() to fail such a case.

Partially fixes #7370.
2017-11-20 09:35:35 +09:00
Yu Watanabe 4a78b63780 core/automount: load() should fail when the unit file does not exist
It is not necessary to label as loaded to automount unit when its unit
file does not exist. So, let's make automount_load() to fail when the
unit file does not exist.

Partially fixes #7370.
2017-11-20 09:35:30 +09:00
Lennart Poettering 0e74bad141
Merge pull request #7376 from keszybz/simplify-root-options
Simplify root configuration options
2017-11-19 19:50:03 +01:00
Lennart Poettering 0133d5553a
Merge pull request #7198 from poettering/stdin-stdout
Add StandardInput=data, StandardInput=file:... and more
2017-11-19 19:49:11 +01:00
Lennart Poettering 0b252fc0be
Merge pull request #7379 from yuwata/follow-up-7309
networkd: small fixes
2017-11-19 19:47:24 +01:00
Lennart Poettering 3219f05c1d
Merge pull request #7386 from keszybz/spdx
Add some missing license headers and add SPDX identifiers
2017-11-19 19:46:52 +01:00
Zbigniew Jędrzejewski-Szmek 3a726fcd08 Add license headers and SPDX identifiers to meson.build files
So far I avoided adding license headers to meson files, but they are pretty
big and important and should carry license headers like everything else.
I added my own copyright, even though other people modified those files too.
But this is mostly symbolic, so I hope that's OK.
2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek 7059062c2f Add SPDX license headers to shell completion scripts 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek d9215cd838 Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek f48f7543ca Add missing headers and SPDX identifiers to man pages 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek a7df2d1e43 Add SPDX license headers to unit files 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek 35df744355 Add SPDX license headers to python scripts 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek d74a9adf93 Add SPDX indentifier to hwdb/parse_hwdb.py 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek 572eb058cf Add SPDX license identifiers to man pages 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek f0465e73f8 Add SPDX license identifiers to catalog and po files 2017-11-19 19:08:15 +01:00