1
0
mirror of https://github.com/systemd/systemd synced 2025-11-14 22:34:46 +01:00

Compare commits

..

No commits in common. "f8293452b65551c75534a35af8e6202a45837299" and "7547c3e06abfe1ddebf0457625f686e3dd55b91c" have entirely different histories.

7 changed files with 43 additions and 55 deletions

8
NEWS
View File

@ -2,14 +2,6 @@ systemd System and Service Manager
CHANGES WITH 259 in spe:
Announcements of Future Feature Removals and Incompatible Changes:
* The parsing of RootImageOptions= and the mount image parameters of
ExtensionImages= and MountImages= will be changed so that the last
duplicated definition for a given partition wins and is applied,
rather than the first, to keep these options coherent with other
unit settings.
* The cgroup2 file system is now mounted with the
"memory_hugetlb_accounting" mount option, supported since kernel 6.6.
This means that HugeTLB memory usage is now counted towards the

View File

@ -1534,19 +1534,10 @@ conf.set('DEFAULT_DNSSEC_MODE',
'DNSSEC_' + default_dnssec.underscorify().to_upper())
conf.set_quoted('DEFAULT_DNSSEC_MODE_STR', default_dnssec)
have = get_option('importd').require(
conf.get('HAVE_LIBCURL') == 1 and
conf.get('HAVE_OPENSSL') == 1 and
conf.get('HAVE_ZLIB') == 1 and
conf.get('HAVE_XZ') == 1,
error_message : 'curl, openssl, zlib and xz required').allowed()
conf.set10('ENABLE_IMPORTD', have)
have = get_option('sysupdate').require(
conf.get('ENABLE_IMPORTD') == 1 and
conf.get('HAVE_OPENSSL') == 1 and
conf.get('HAVE_LIBFDISK') == 1,
error_message : 'systemd-importd, fdisk, and openssl required').allowed()
error_message : 'fdisk and openssl required').allowed()
conf.set10('ENABLE_SYSUPDATE', have)
have2 = get_option('sysupdated')
@ -1565,6 +1556,14 @@ conf.set10('ENABLE_SYSUPDATED', have2)
conf.set10('ENABLE_STORAGETM', get_option('storagetm'))
have = get_option('importd').require(
conf.get('HAVE_LIBCURL') == 1 and
conf.get('HAVE_OPENSSL') == 1 and
conf.get('HAVE_ZLIB') == 1 and
conf.get('HAVE_XZ') == 1,
error_message : 'curl, openssl/grypt, zlib and xz required').allowed()
conf.set10('ENABLE_IMPORTD', have)
have = get_option('homed').require(
conf.get('HAVE_OPENSSL') == 1 and
conf.get('HAVE_LIBFDISK') == 1 and

View File

@ -187,18 +187,6 @@ static int connect_journal_socket(
return r;
}
static bool exec_output_forward_to_console(ExecOutput o) {
return IN_SET(o,
EXEC_OUTPUT_JOURNAL_AND_CONSOLE,
EXEC_OUTPUT_KMSG_AND_CONSOLE);
}
static bool exec_output_forward_to_kmsg(ExecOutput o) {
return IN_SET(o,
EXEC_OUTPUT_KMSG,
EXEC_OUTPUT_KMSG_AND_CONSOLE);
}
static int connect_logger_as(
const ExecContext *context,
const ExecParameters *params,
@ -231,20 +219,20 @@ static int connect_logger_as(
(void) fd_inc_sndbuf(fd, SNDBUF_SIZE);
if (dprintf(fd,
"%s\n"
"%s\n"
"%i\n"
"%i\n"
"%i\n"
"%i\n"
"%i\n",
context->syslog_identifier ?: ident,
params->flags & EXEC_PASS_LOG_UNIT ? params->unit_id : "",
context->syslog_priority,
!!context->syslog_level_prefix,
false,
exec_output_forward_to_kmsg(output),
exec_output_forward_to_console(output)) < 0)
"%s\n"
"%s\n"
"%i\n"
"%i\n"
"%i\n"
"%i\n"
"%i\n",
context->syslog_identifier ?: ident,
params->flags & EXEC_PASS_LOG_UNIT ? params->unit_id : "",
context->syslog_priority,
!!context->syslog_level_prefix,
false,
exec_output_is_kmsg(output),
exec_output_is_terminal(output)) < 0)
return -errno;
return move_fd(TAKE_FD(fd), nfd, false);
@ -1249,10 +1237,7 @@ static int exec_context_get_tty_for_pam(const ExecContext *context, char **ret)
return 1;
}
/* Do not implicitly configure TTY unless TTYPath= or StandardInput=tty is specified. See issue
* #39334. Note, exec_context_tty_path() returns "/dev/console" when TTYPath= is unspecified, hence
* explicitly check context->tty_path here. */
if (!context->tty_path && !exec_input_is_terminal(context->std_input)) {
if (!IN_SET(context->std_input, EXEC_INPUT_TTY, EXEC_INPUT_TTY_FAIL, EXEC_INPUT_TTY_FORCE)) {
*ret = NULL;
return 0;
}

View File

@ -470,6 +470,19 @@ static inline bool exec_input_is_terminal(ExecInput i) {
EXEC_INPUT_TTY_FAIL);
}
static inline bool exec_output_is_terminal(ExecOutput o) {
return IN_SET(o,
EXEC_OUTPUT_TTY,
EXEC_OUTPUT_KMSG_AND_CONSOLE,
EXEC_OUTPUT_JOURNAL_AND_CONSOLE);
}
static inline bool exec_output_is_kmsg(ExecOutput o) {
return IN_SET(o,
EXEC_OUTPUT_KMSG,
EXEC_OUTPUT_KMSG_AND_CONSOLE);
}
static inline bool exec_context_has_tty(const ExecContext *context) {
assert(context);

View File

@ -509,7 +509,7 @@ static SD_VARLINK_DEFINE_STRUCT_TYPE(
SD_VARLINK_DEFINE_FIELD(Model, SD_VARLINK_STRING, SD_VARLINK_NULLABLE),
SD_VARLINK_FIELD_COMMENT("DNS servers configured for this interface"),
SD_VARLINK_DEFINE_FIELD_BY_TYPE(DNS, DNS, SD_VARLINK_ARRAY|SD_VARLINK_NULLABLE),
/* FIXME: DNR Addresses field (json array or arrays) is incompatible with Varlink type system */
/* FIXME: DNR Addresses fied (json array or arrays) is incompatible with Varlink type system */
SD_VARLINK_FIELD_COMMENT("Discovery of Network-designated Resolvers (RFC9463)"),
SD_VARLINK_DEFINE_FIELD(DNR, SD_VARLINK_OBJECT, SD_VARLINK_ARRAY|SD_VARLINK_NULLABLE),
SD_VARLINK_FIELD_COMMENT("NTP servers configured for this interface"),

View File

@ -18,7 +18,6 @@ TMP_DIR=$(mktemp -d)
# service stdout will not contain _SYSTEMD_INVOCATION_ID field.
SAVED_LOG_LEVEL=$(systemctl log-level)
systemctl log-level info
journalctl --rotate
# Note, if the service exits extremely fast, journald cannot find the source of the
# stream. Hence, we need to call 'journalctl --sync' before service exits.

View File

@ -75,16 +75,16 @@ check_elapse_timestamp() {
systemctl restart "$UNIT_NAME.timer"
check_elapse_timestamp
# Bump the system date to exactly the original calendar timer time (without any random delay!) - systemd
# should recalculate the next elapse timestamp with a new randomized delay, but it should use the original
# inactive exit timestamp as a "base", so the final timestamp should not end up beyond the original calendar
# timestamp + randomized delay range.
# Bump the system date to 1 minute after the original calendar timer would've expired (without any random
# delay!) - systemd should recalculate the next elapse timestamp with a new randomized delay, but it should
# use the original inactive exit timestamp as a "base", so the final timestamp should not end up beyond the
# original calendar timestamp + randomized delay range.
#
# Similarly, do the same check after doing daemon-reload, as that also forces systemd to recalculate the next
# elapse timestamp (this goes through a slightly different codepath that actually contained the original
# issue).
: "Next elapse timestamp after time jump"
date -s "tomorrow 00:10"
date -s "tomorrow 00:11"
check_elapse_timestamp
: "Next elapse timestamp after daemon-reload"