summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS70
-rw-r--r--hwdb/60-keyboard.hwdb5
-rw-r--r--man/systemd-timedated.service.xml49
-rw-r--r--man/timedatectl.xml31
-rw-r--r--meson.build7
-rw-r--r--src/shared/pretty-print.c5
-rw-r--r--src/systemd/sd-daemon.h2
-rw-r--r--src/timedate/timedated.c72
-rw-r--r--src/timesync/80-systemd-timesync.list1
-rw-r--r--src/timesync/meson.build2
-rw-r--r--units/systemd-timesyncd.service.in1
11 files changed, 186 insertions, 59 deletions
diff --git a/NEWS b/NEWS
index 9ba689a3d6..ced3b5c044 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ CHANGES WITH 243 in spe:
* Previously, filters defined with SystemCallFilter= would have the
effect that an calling an offending system call would terminate the
calling thread. This behaviour never made much sense, since killing
- individual threads of unexpecting processes is likely to create more
+ individual threads of unsuspecting processes is likely to create more
problems than it solves. With this release the default action changed
from killing the thread to killing the whole process. For this to
work correctly both a kernel version (>= 4.14) and a libseccomp
@@ -112,8 +112,8 @@ CHANGES WITH 243 in spe:
interfaces should really be matched.
* A new setting NUMAPolicy= may be used to set process memory
- allocation policy. Setting can be specified in system.conf and
- hence will set the default policy for PID1. Default policy can be
+ allocation policy. Setting can be specified in system.conf and hence
+ will set the default policy for PID1. Default policy can be
overridden on per-service basis. Related setting NUMAMask= is used to
specify NUMA node mask that should be associated with the selected
policy.
@@ -178,12 +178,13 @@ CHANGES WITH 243 in spe:
* systemd-resolved gained support for a new 'strict' DNS-over-TLS mode.
- * systemd-resolved "Cache=" configuration option in resolved.conf has been extended
- to also accept the 'no-negative' value. Previously,
- only a boolean option was allowed (yes/no), having yes as the default.
- If this option is set to 'no-negative', negative answers are skipped
- from being cached while keeping the same cache heuristics for positive answers.
- The default remains as "yes" (i. e. caching is enabled).
+ * systemd-resolved "Cache=" configuration option in resolved.conf has
+ been extended to also accept the 'no-negative' value. Previously,
+ only a boolean option was allowed (yes/no), having yes as the
+ default. If this option is set to 'no-negative', negative answers
+ are skipped from being cached while keeping the same cache heuristics
+ for positive answers. The default remains as "yes" (i. e. caching is
+ enabled).
* The predictable naming scheme for network devices now supports
generating predictable names for "netdevsim" devices.
@@ -204,7 +205,15 @@ CHANGES WITH 243 in spe:
send a DHCP RELEASE message when terminating.
* systemd-networkd's DHCPv4 and DHCPv6 stacks can now be configured
- seperately in the [DHCPv4] and [DHCPv6] sections.
+ separately in the [DHCPv4] and [DHCPv6] sections.
+
+ * systemd-networkd's DHCP support will now optionally create an
+ implicit host route to the DNS server specified in the DHCP lease, in
+ addition to the routes listed explicitly in the lease. This should
+ ensure that in multi-homed systems DNS traffic leaves the systems on
+ the interface that acquired the DNS server information even if other
+ routes such as default routes exist. This behaviour may be turned on
+ with the new RoutesToDNS= option.
* systemd-networkd's VXLAN support gained a new option
GenericProtocolExtension= for enabling VXLAN Generic Protocol
@@ -224,7 +233,7 @@ CHANGES WITH 243 in spe:
* systemd-networkd's bridging support gained two new options ProxyARP=
and ProxyARPWifi= for configuring proxy ARP behaviour as well as
- MulticastRouter= for configureing multicast routing behaviour.
+ MulticastRouter= for configuring multicast routing behaviour.
* systemd-networkd's FooOverUDP support gained the ability to configure
local and peer IP addresses via Local= and Peer=. A new option
@@ -249,6 +258,10 @@ CHANGES WITH 243 in spe:
been renamed to LinkLayerAddress=, and it now allows configuration of
IP addresses, too.
+ * A new tool systemd-network-generator has been added that may generate
+ .network, .netdev and .link files from IP configuration specified on
+ the kernel command line, compatible with the format Dracut expects.
+
* The CriticalConnection= setting in .network files is now deprecated,
and replaced by a new KeepConfiguration= setting which allows more
detailed configuration of the IP configuration to keep in place.
@@ -303,7 +316,40 @@ CHANGES WITH 243 in spe:
(for exit codes 1 through 254), or stop execution and fail the unit
(for exit code 255 or cases of abnormal termination).
- …
+ * A new service systemd-pstore.service has been added that pulls data
+ from from /sys/fs/pstore/ and saves it to /var/lib/pstore for later
+ review.
+
+ * timedatectl gained new verbs for configuring per-interface NTP
+ service configuration for systemd-timesyncd.
+
+ * "localectl list-locales" won't list non-UTF-8 locales anymore. It's
+ 2019. (You can set non-UTF-8 locales though, if you know there name.)
+
+ Contributions from: Aaron Barany, Adrian Bunk, Alan Jenkins, Andrej
+ Valek, Anita Zhang, Arian van Putten, Balint Reczey, Ben Boeckel,
+ Benjamin Robin, camoz, Chen Qi, Chris Chiu, Chris Down, Connor Reeder,
+ Daniele Medri, Dan Streetman, Dave Reisner, Dave Ross, David Art, David
+ Tardon, Dominick Grift, Donald Buczek, Douglas Christman, Eric
+ DeVolder, Evgeny Vereshchagin, Feldwor, Felix Riemann, Florian
+ Dollinger, Franck Bui, Frantisek Sumsal, Franz Pletz, Hans de Goede,
+ Insun Pyo, Ivan Shapovalov, Iwan Timmer, Jack, Jakob Unterwurzacher,
+ Jan Klötzke, Jan Pokorný, Jan Synacek, Jeka Pats, Jérémy Rosen, Jiri
+ Pirko, Joe Lin, Joerg Behrmann, Joe Richey, Jóhann B. Guðmundsson,
+ Johannes Schmitz, Jonathan Rouleau, Jorge Niedbalski, Kai Lüke, Karel
+ Zak, Kashyap Chamarthy, Krayushkin Konstantin, Lennart Poettering,
+ Lubomir Rintel, Luca Boccassi, Luís Ferreira, Marc-André Lureau, Markus
+ Felten, Martin Pitt, Michael Biebl, Michael Olbrich, Michael Prokop,
+ Michael Stapelberg, Michael Zhivich, Michal Koutný, Michal Sekletar,
+ Mike Gilbert, Milan Broz, mpe85, Oliver Harley, pan93412, Paul Menzel,
+ pEJipE, Peter A. Bigot, Philip Withnall, Piotr Drąg, Rafael Fontenelle,
+ Roberto Santalla, root, RussianNeuroMancer, Sebastian Jennen, Simon
+ Schricker, Susant Sahani, Thadeu Lima de Souza Cascardo, Theo
+ Ouzhinski, Thomas Weißschuh, Tomas Mraz, Topi Miettinen, ven, Wieland
+ Hoffmann, Xi Ruoyao, Yuri Chornoivan, Yu Watanabe, Zach Smith, Zbigniew
+ Jędrzejewski-Szmek, Zhang Xianwei
+
+ – Somewhere, SOME-TI-ME
CHANGES WITH 242:
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 62957d2725..8edd5d1959 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -1693,6 +1693,11 @@ evdev:input:b0003v046Dp4002*
KEYBOARD_LED_NUMLOCK=0
KEYBOARD_LED_CAPSLOCK=0
+# PFU Limited HHKB Professional JP
+evdev:input:b0003v04FEp000D*
+ KEYBOARD_LED_NUMLOCK=0
+ KEYBOARD_LED_CAPSLOCK=0
+
# Lenovo ThinkPad T430s
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT430s
KEYBOARD_LED_CAPSLOCK=0
diff --git a/man/systemd-timedated.service.xml b/man/systemd-timedated.service.xml
index 3626e8bc51..f981848cb2 100644
--- a/man/systemd-timedated.service.xml
+++ b/man/systemd-timedated.service.xml
@@ -31,7 +31,7 @@
<para><filename>systemd-timedated</filename> is a system service
that may be used as a mechanism to change the system clock and
- timezone, as well as to enable/disable NTP time synchronization.
+ timezone, as well as to enable/disable network time synchronization.
<filename>systemd-timedated</filename> is automatically activated
on request and terminates itself when it is unused.</para>
@@ -46,25 +46,36 @@
</refsect1>
<refsect1>
- <title>Environment</title>
-
- <variablelist class='environment-variables'>
- <varlistentry>
- <term><varname>$SYSTEMD_TIMEDATED_NTP_SERVICES</varname></term>
-
- <listitem><para>Colon-separated list of unit names of NTP client services.
- If not set, then
- <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
- is used. See the entries of NTP related commands of
- <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
- for details about this.</para>
-
- <para>Example:
- <programlisting>SYSTEMD_TIMEDATED_NTP_SERVICES=ntpd.service:chronyd.service:systemd-timesyncd.service</programlisting>
- </para></listitem>
- </varlistentry>
- </variablelist>
+ <title>List of network time synchronization services</title>
+
+ <para><command>systemd-timesyncd</command> will look for files with a <literal>.list</literal> extension
+ in <filename>ntp-units.d/</filename> directories. Each file is parsed as a list of unit names, one per
+ line. Empty lines and lines with comments (<literal>#</literal>) are ignored. Files are read from
+ <filename>/usr/lib/systemd/ntp-units.d/</filename> and the corresponding directories under
+ <filename>/etc/</filename>, <filename>/run/</filename>, <filename>/usr/local/lib/</filename>. Files in
+ <filename>/etc/</filename> override files with the same name in <filename>/run/</filename>,
+ <filename>/usr/local/lib/</filename>, and <filename>/usr/lib/</filename>. Files in
+ <filename>/run/</filename> override files with the same name under <filename>/usr/</filename>. Packages
+ should install their configuration files in <filename>/usr/lib/</filename> (distribution packages) or
+ <filename>/usr/local/lib/</filename> (local installs).</para>
+
+ <example>
+ <title><filename>ntp-units.d/</filename> entry for <command>systemd-timesyncd</command></title>
+ <programlisting># /usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
+systemd-timesyncd.service
+</programlisting>
+ </example>
+
+ <para>If the environment variable <varname>$SYSTEMD_TIMEDATED_NTP_SERVICES</varname> is set,
+ <command>systemd-timesyncd</command> will parse the contents of that variable as a colon-separated list
+ of unit names. When set, this variable overrides the file-based list described above.</para>
+
+ <example>
+ <title>An override that specifies that <command>chronyd</command> should be used if available</title>
+ <programlisting>SYSTEMD_TIMEDATED_NTP_SERVICES=chronyd.service:systemd-timesyncd.service</programlisting>
+ </example>
</refsect1>
+
<refsect1>
<title>See Also</title>
<para>
diff --git a/man/timedatectl.xml b/man/timedatectl.xml
index 262b9126e7..f797e0cd67 100644
--- a/man/timedatectl.xml
+++ b/man/timedatectl.xml
@@ -23,22 +23,25 @@
<refsynopsisdiv>
<cmdsynopsis>
- <command>timedatectl <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg></command>
+ <command>timedatectl</command>
+ <arg choice="opt" rep="repeat">OPTIONS</arg>
+ <arg choice="req">COMMAND</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
- <para><command>timedatectl</command> may be used to query and
- change the system clock and its settings.</para>
+ <para><command>timedatectl</command> may be used to query and change the system clock and its settings,
+ and enable or disable time synchronization services.</para>
<para>Use
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to initialize the system time zone for mounted (but not booted)
system images.</para>
- <para><command>timedatectl</command> may be used to show the current status of
+ <para><command>timedatectl</command> may be used to show the current status of time synchronization
+ services, for example
<citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
@@ -123,11 +126,8 @@
<varlistentry>
<term><command>status</command></term>
- <listitem><para>Show current settings of the system clock and RTC,
- including whether network time synchronization through
- <filename>systemd-timesyncd.service</filename> is active. Even if it is
- inactive, a different service might still synchronize the clock.
- If no command is specified, this is the implied default.
+ <listitem><para>Show current settings of the system clock and RTC, including whether network time
+ synchronization is active. If no command is specified, this is the implied default.
</para></listitem>
</varlistentry>
@@ -193,11 +193,11 @@
<varlistentry>
<term><command>set-ntp [BOOL]</command></term>
- <listitem><para>Takes a boolean argument. Controls whether network time synchronization is active
- and enabled (if available). If the argument is true, this enables and starts the first existed
- service listed in the environment variable <varname>$SYSTEMD_TIMEDATED_NTP_SERVICES</varname>
- of <filename>systemd-timedated.service</filename>. If the argument is false, then this disables and
- stops the all services listed in <varname>$SYSTEMD_TIMEDATED_NTP_SERVICES</varname>.</para></listitem>
+ <listitem><para>Takes a boolean argument. Controls whether network time synchronization is active and
+ enabled (if available). If the argument is true, this enables and starts the first existing network
+ synchronization service. If the argument is false, then this disables and stops the known network
+ synchronization services. The way that the list of services is built is described below.</para>
+ </listitem>
</varlistentry>
</variablelist>
@@ -250,8 +250,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success, 0 is returned, a non-zero failure
- code otherwise.</para>
+ <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
</refsect1>
<xi:include href="less-variables.xml" />
diff --git a/meson.build b/meson.build
index 04a830cdfa..76b3d53391 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1+
project('systemd', 'c',
- version : '242',
+ version : '243',
license : 'LGPLv2+',
default_options: [
'c_std=gnu99',
@@ -12,8 +12,8 @@ project('systemd', 'c',
meson_version : '>= 0.46',
)
-libsystemd_version = '0.26.0'
-libudev_version = '1.6.14'
+libsystemd_version = '0.27.0'
+libudev_version = '1.6.15'
# We need the same data in two different formats, ugh!
# Also, for hysterical reasons, we use different variable
@@ -157,6 +157,7 @@ systemdstatedir = join_paths(localstatedir, 'lib/systemd')
catalogstatedir = join_paths(systemdstatedir, 'catalog')
randomseeddir = join_paths(localstatedir, 'lib/systemd')
profiledir = join_paths(rootlibexecdir, 'portable', 'profile')
+ntpservicelistdir = join_paths(rootprefixdir, 'lib/systemd/ntp-units.d')
docdir = get_option('docdir')
if docdir == ''
diff --git a/src/shared/pretty-print.c b/src/shared/pretty-print.c
index c602e036eb..96e74a758f 100644
--- a/src/shared/pretty-print.c
+++ b/src/shared/pretty-print.c
@@ -247,6 +247,11 @@ static int guess_type(const char **name, bool *is_usr, bool *is_collection, cons
if (path_equal(n, "kernel/install.d"))
ext = ".install";
+ if (path_equal(n, "systemd/ntp-units.d")) {
+ coll = true;
+ ext = ".list";
+ }
+
if (PATH_IN_SET(n, "systemd/system-preset", "systemd/user-preset")) {
coll = true;
ext = ".preset";
diff --git a/src/systemd/sd-daemon.h b/src/systemd/sd-daemon.h
index 860961e2ba..62b0f723c7 100644
--- a/src/systemd/sd-daemon.h
+++ b/src/systemd/sd-daemon.h
@@ -260,7 +260,7 @@ int sd_notify(int unset_environment, const char *state);
sd_notifyf(0, "STATUS=Failed to start up: %s\n"
"ERRNO=%i",
- strerror_safe(errno),
+ strerror(errno),
errno);
See sd_notifyf(3) for more information.
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 57bbefc0c1..074ba3c079 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -15,7 +15,9 @@
#include "bus-error.h"
#include "bus-util.h"
#include "clock-util.h"
+#include "conf-files.h"
#include "def.h"
+#include "fd-util.h"
#include "fileio-label.h"
#include "fileio.h"
#include "fs-util.h"
@@ -36,6 +38,8 @@
#define NULL_ADJTIME_UTC "0.0 0 0\n0\nUTC\n"
#define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n"
+#define UNIT_LIST_DIRS (const char* const*) CONF_PATHS_STRV("systemd/ntp-units.d")
+
typedef struct UnitStatusInfo {
char *name;
char *load_state;
@@ -117,20 +121,17 @@ static int context_add_ntp_service(Context *c, const char *s) {
return 0;
}
-static int context_parse_ntp_services(Context *c) {
+static int context_parse_ntp_services_from_environment(Context *c) {
const char *env, *p;
int r;
assert(c);
env = getenv("SYSTEMD_TIMEDATED_NTP_SERVICES");
- if (!env) {
- r = context_add_ntp_service(c, "systemd-timesyncd.service");
- if (r < 0)
- log_warning_errno(r, "Failed to add NTP service \"systemd-timesyncd.service\", ignoring: %m");
-
+ if (!env)
return 0;
- }
+
+ log_debug("Using list of ntp services from environment variable $SYSTEMD_TIMEDATED_NTP_SERVICES.");
for (p = env;;) {
_cleanup_free_ char *word = NULL;
@@ -150,7 +151,62 @@ static int context_parse_ntp_services(Context *c) {
log_warning_errno(r, "Failed to add NTP service \"%s\", ignoring: %m", word);
}
- return 0;
+ return 1;
+}
+
+static int context_parse_ntp_services_from_disk(Context *c) {
+ _cleanup_strv_free_ char **files = NULL;
+ char **f;
+ int r;
+
+ r = conf_files_list_strv(&files, ".list", NULL, CONF_FILES_FILTER_MASKED, UNIT_LIST_DIRS);
+ if (r < 0)
+ return log_error_errno(r, "Failed to enumerate .list files: %m");
+
+ STRV_FOREACH(f, files) {
+ _cleanup_fclose_ FILE *file = NULL;
+
+ log_debug("Reading file '%s'", *f);
+
+ r = fopen_unlocked(*f, "re", &file);
+ if (r < 0) {
+ log_error_errno(r, "Failed to open %s, ignoring: %m", *f);
+ continue;
+ }
+
+ for (;;) {
+ _cleanup_free_ char *line = NULL;
+ const char *word;
+
+ r = read_line(file, LINE_MAX, &line);
+ if (r < 0) {
+ log_error_errno(r, "Failed to read %s, ignoring: %m", *f);
+ continue;
+ }
+ if (r == 0)
+ break;
+
+ word = strstrip(line);
+ if (isempty(word) || startswith("#", word))
+ continue;
+
+ r = context_add_ntp_service(c, word);
+ if (r < 0)
+ log_warning_errno(r, "Failed to add NTP service \"%s\", ignoring: %m", word);
+ }
+ }
+
+ return 1;
+}
+
+static int context_parse_ntp_services(Context *c) {
+ int r;
+
+ r = context_parse_ntp_services_from_environment(c);
+ if (r != 0)
+ return r;
+
+ return context_parse_ntp_services_from_disk(c);
}
static int context_ntp_service_is_active(Context *c) {
diff --git a/src/timesync/80-systemd-timesync.list b/src/timesync/80-systemd-timesync.list
new file mode 100644
index 0000000000..d5959ade89
--- /dev/null
+++ b/src/timesync/80-systemd-timesync.list
@@ -0,0 +1 @@
+systemd-timesyncd.service
diff --git a/src/timesync/meson.build b/src/timesync/meson.build
index b79ef08277..e5c118c8db 100644
--- a/src/timesync/meson.build
+++ b/src/timesync/meson.build
@@ -32,6 +32,8 @@ if conf.get('ENABLE_TIMESYNCD') == 1
install_dir : dbuspolicydir)
install_data('org.freedesktop.timesync1.service',
install_dir : dbussystemservicedir)
+ install_data('80-systemd-timesync.list',
+ install_dir : ntpservicelistdir)
endif
############################################################
diff --git a/units/systemd-timesyncd.service.in b/units/systemd-timesyncd.service.in
index 2d8d14f6de..2136a85b35 100644
--- a/units/systemd-timesyncd.service.in
+++ b/units/systemd-timesyncd.service.in
@@ -15,6 +15,7 @@ ConditionVirtualization=!container
DefaultDependencies=no
After=systemd-remount-fs.service systemd-sysusers.service
Before=time-set.target sysinit.target shutdown.target
+Conflicts=chronyd.service ntpd.service
Conflicts=shutdown.target
Wants=time-set.target time-sync.target