Compare commits

..

No commits in common. "557b9716f6fc97afaf71597db509f104473e70a3" and "392a2d51482f4a4bd18e7602c0dbc597f7b98c0f" have entirely different histories.

8 changed files with 19 additions and 60 deletions

14
NEWS
View File

@ -281,20 +281,6 @@ CHANGES WITH 245:
to combine attachment with enablement and invocation, or detachment to combine attachment with enablement and invocation, or detachment
with stopping and disablement. with stopping and disablement.
* UPGRADE ISSUE: a bug where some jobs were trimmed as redundant was
fixed, which in turn exposed bugs in unit configuration of services
which have Type=oneshot and should only run once, but do not have
RemainAfterExit=yes set. Without RemainAfterExit=yes, a one-shot
service may be started again after exiting successfully, for example
as a dependency in another transaction. Affected services included
some internal systemd services (most notably
systemd-vconsole-setup.service, which was updated to have
RemainAfterExit=yes), and plymouth-start.service. Please ensure that
plymouth has been suitably updated or patched before upgrading to
this systemd release. See
https://bugzilla.redhat.com/show_bug.cgi?id=1807771 for some
additional discussion.
Contributions from: AJ Bagwell, Alin Popa, Andreas Rammhold, Anita Contributions from: AJ Bagwell, Alin Popa, Andreas Rammhold, Anita
Zhang, Ansgar Burchardt, Antonio Russo, Arian van Putten, Ashley Davis, Zhang, Ansgar Burchardt, Antonio Russo, Arian van Putten, Ashley Davis,
Balint Reczey, Bart Willems, Bastien Nocera, Benjamin Dahlhoff, Charles Balint Reczey, Bart Willems, Bastien Nocera, Benjamin Dahlhoff, Charles

View File

@ -198,15 +198,6 @@
automatically populate <filename>/etc</filename>, and also <filename>/var</filename> in case of automatically populate <filename>/etc</filename>, and also <filename>/var</filename> in case of
<literal>systemd.volatile=yes</literal>.</para></listitem> <literal>systemd.volatile=yes</literal>.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>systemd.swap</varname></term>
<listitem><para>Takes a boolean argument or enables the option if specified
without an argument. If disabled, causes the generator to ignore
any swap devices configured in <filename>/etc/fstab</filename>.
Defaults to enabled.</para></listitem>
</varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>

View File

@ -18,7 +18,7 @@
<refnamediv> <refnamediv>
<refname>systemd-homed.service</refname> <refname>systemd-homed.service</refname>
<refname>systemd-homed</refname> <refname>systemd-homed</refname>
<refpurpose>Home Area/User Account Manager</refpurpose> <refpurpose>Home Directory/User Account Manager</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
@ -30,14 +30,13 @@
<title>Description</title> <title>Description</title>
<para><command>systemd-homed</command> is a system service that may be used to create, remove, change or <para><command>systemd-homed</command> is a system service that may be used to create, remove, change or
inspect home areas (directories and network mounts and real or loopback block devices with a filesystem, inspect home directories.</para>
optionally encrypted).</para>
<para>Most of <command>systemd-homed</command>'s functionality is accessible through the <para>Most of <command>systemd-homed</command>'s functionality is accessible through the
<citerefentry><refentrytitle>homectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> command.</para> <citerefentry><refentrytitle>homectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> command.</para>
<para>See the <ulink url="https://systemd.io/HOME_DIRECTORY">Home Directories</ulink> documentation for <para>See the <ulink url="https://systemd.io/HOME_DIRECTORY">Home Directories</ulink> documentation for
details about the format and design of home areas managed by details about the format and design of home directories managed by
<filename>systemd-homed.service</filename>.</para> <filename>systemd-homed.service</filename>.</para>
<para>Each home directory managed by <filename>systemd-homed.service</filename> synthesizes a local user <para>Each home directory managed by <filename>systemd-homed.service</filename> synthesizes a local user

View File

@ -70,8 +70,8 @@
either the word <literal>enable</literal> or either the word <literal>enable</literal> or
<literal>disable</literal> followed by a space and a unit name <literal>disable</literal> followed by a space and a unit name
(possibly with shell style wildcards), separated by newlines. (possibly with shell style wildcards), separated by newlines.
Empty lines and lines whose first non-whitespace character is <literal>#</literal> or Empty lines and lines whose first non-whitespace character is # or
<literal>;</literal> are ignored.</para> ; are ignored.</para>
<para>Presets must refer to the "real" unit file, and not to any aliases. See <para>Presets must refer to the "real" unit file, and not to any aliases. See
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>

View File

@ -1995,21 +1995,21 @@ static int do_queue_default_job(
const char **ret_error_message) { const char **ret_error_message) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
const char *unit; const char* default_unit;
Job *job; Job *default_unit_job;
Unit *target; Unit *target = NULL;
int r; int r;
if (arg_default_unit) if (arg_default_unit)
unit = arg_default_unit; default_unit = arg_default_unit;
else if (in_initrd()) else if (in_initrd())
unit = SPECIAL_INITRD_TARGET; default_unit = SPECIAL_INITRD_TARGET;
else else
unit = SPECIAL_DEFAULT_TARGET; default_unit = SPECIAL_DEFAULT_TARGET;
log_debug("Activating default unit: %s", unit); log_debug("Activating default unit: %s", default_unit);
r = manager_load_startable_unit_or_warn(m, unit, NULL, &target); r = manager_load_startable_unit_or_warn(m, default_unit, NULL, &target);
if (r < 0 && in_initrd() && !arg_default_unit) { if (r < 0 && in_initrd() && !arg_default_unit) {
/* Fall back to default.target, which we used to always use by default. Only do this if no /* Fall back to default.target, which we used to always use by default. Only do this if no
* explicit configuration was given. */ * explicit configuration was given. */
@ -2031,13 +2031,13 @@ static int do_queue_default_job(
assert(target->load_state == UNIT_LOADED); assert(target->load_state == UNIT_LOADED);
r = manager_add_job(m, JOB_START, target, JOB_ISOLATE, NULL, &error, &job); r = manager_add_job(m, JOB_START, target, JOB_ISOLATE, NULL, &error, &default_unit_job);
if (r == -EPERM) { if (r == -EPERM) {
log_debug_errno(r, "Default target could not be isolated, starting instead: %s", bus_error_message(&error, r)); log_debug_errno(r, "Default target could not be isolated, starting instead: %s", bus_error_message(&error, r));
sd_bus_error_free(&error); sd_bus_error_free(&error);
r = manager_add_job(m, JOB_START, target, JOB_REPLACE, NULL, &error, &job); r = manager_add_job(m, JOB_START, target, JOB_REPLACE, NULL, &error, &default_unit_job);
if (r < 0) { if (r < 0) {
*ret_error_message = "Failed to start default target"; *ret_error_message = "Failed to start default target";
return log_emergency_errno(r, "Failed to start default target: %s", bus_error_message(&error, r)); return log_emergency_errno(r, "Failed to start default target: %s", bus_error_message(&error, r));
@ -2046,12 +2046,9 @@ static int do_queue_default_job(
} else if (r < 0) { } else if (r < 0) {
*ret_error_message = "Failed to isolate default target"; *ret_error_message = "Failed to isolate default target";
return log_emergency_errno(r, "Failed to isolate default target: %s", bus_error_message(&error, r)); return log_emergency_errno(r, "Failed to isolate default target: %s", bus_error_message(&error, r));
} else }
log_info("Queued %s job for default target %s.",
job_type_to_string(job->type),
unit_status_string(job->unit));
m->default_unit_job_id = job->id; m->default_unit_job_id = default_unit_job->id;
return 0; return 0;
} }

View File

@ -40,7 +40,6 @@ typedef enum MountpointFlags {
static const char *arg_dest = NULL; static const char *arg_dest = NULL;
static const char *arg_dest_late = NULL; static const char *arg_dest_late = NULL;
static bool arg_fstab_enabled = true; static bool arg_fstab_enabled = true;
static bool arg_swap_enabled = true;
static char *arg_root_what = NULL; static char *arg_root_what = NULL;
static char *arg_root_fstype = NULL; static char *arg_root_fstype = NULL;
static char *arg_root_options = NULL; static char *arg_root_options = NULL;
@ -99,11 +98,6 @@ static int add_swap(
assert(what); assert(what);
assert(me); assert(me);
if (!arg_swap_enabled) {
log_info("Swap unit generation disabled on kernel command line, ignoring fstab swap entry for %s.", what);
return 0;
}
if (access("/proc/swaps", F_OK) < 0) { if (access("/proc/swaps", F_OK) < 0) {
log_info("Swap not supported, ignoring fstab swap entry for %s.", what); log_info("Swap not supported, ignoring fstab swap entry for %s.", what);
return 0; return 0;
@ -902,14 +896,6 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
arg_volatile_mode = m; arg_volatile_mode = m;
} else } else
arg_volatile_mode = VOLATILE_YES; arg_volatile_mode = VOLATILE_YES;
} else if (streq(key, "systemd.swap")) {
r = value ? parse_boolean(value) : 1;
if (r < 0)
log_warning("Failed to parse systemd.swap switch %s. Ignoring.", value);
else
arg_swap_enabled = r;
} }
return 0; return 0;

View File

@ -469,7 +469,7 @@ int ask_password_tty(
(void) loop_write(ttyfd, message, strlen(message), false); (void) loop_write(ttyfd, message, strlen(message), false);
(void) loop_write(ttyfd, " ", 1, false); (void) loop_write(ttyfd, " ", 1, false);
if (!(flags & ASK_PASSWORD_SILENT) && !(flags & ASK_PASSWORD_ECHO)) { if (!(flags & ASK_PASSWORD_SILENT)) {
if (use_color) if (use_color)
(void) loop_write(ttyfd, ANSI_GREY, STRLEN(ANSI_GREY), false); (void) loop_write(ttyfd, ANSI_GREY, STRLEN(ANSI_GREY), false);
(void) loop_write(ttyfd, PRESS_TAB, strlen(PRESS_TAB), false); (void) loop_write(ttyfd, PRESS_TAB, strlen(PRESS_TAB), false);

View File

@ -8,7 +8,7 @@
# (at your option) any later version. # (at your option) any later version.
[Unit] [Unit]
Description=Home Area Manager Description=Home Manager
Documentation=man:systemd-homed.service(8) Documentation=man:systemd-homed.service(8)
RequiresMountsFor=/home RequiresMountsFor=/home