SHA256
1
0
forked from pool/systemd

1 Commits

Author SHA256 Message Date
14a882d8e3 Sync changes to SLFO-1.2 branch 2025-08-20 13:41:36 +02:00
23 changed files with 1413 additions and 600 deletions

View File

@@ -1,4 +1,4 @@
From 72d766c5a17fc31902b367e949c4d90193f823b9 Mon Sep 17 00:00:00 2001
From 91fa48c2d1aac250728379a0c0430f9f7a3c8351 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Fri, 22 Mar 2024 12:07:34 +0100
Subject: [PATCH 1/1] Drop support for efivar SystemdOptions
@@ -11,15 +11,15 @@ disabled.
[fbui: fixes bsc#1220338]
---
src/basic/efivars.c | 27 ++++++--------------------
src/boot/bootctl-systemd-efi-options.c | 4 ++++
src/basic/efivars.c | 27 +++++------------------
src/bootctl/bootctl-systemd-efi-options.c | 4 ++++
2 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/src/basic/efivars.c b/src/basic/efivars.c
index 9011ae29a3..01ab7e5092 100644
index 5e04c32212..78bdd28263 100644
--- a/src/basic/efivars.c
+++ b/src/basic/efivars.c
@@ -351,29 +351,14 @@ SecureBootMode efi_get_secure_boot_mode(void) {
@@ -368,29 +368,14 @@ SecureBootMode efi_get_secure_boot_mode(void) {
}
static int read_efi_options_variable(char **ret) {
@@ -36,7 +36,7 @@ index 9011ae29a3..01ab7e5092 100644
- /* Let's be helpful with the returned error and check if the variable exists at all. If it
- * does, let's return a recognizable error (EPERM), and if not ENODATA. */
-
- if (access(EFIVAR_PATH(EFI_SYSTEMD_VARIABLE(SystemdOptions)), F_OK) < 0)
- if (access(EFIVAR_PATH(EFI_SYSTEMD_VARIABLE_STR("SystemdOptions")), F_OK) < 0)
- return errno == ENOENT ? -ENODATA : -errno;
-
- return -EPERM;
@@ -44,21 +44,21 @@ index 9011ae29a3..01ab7e5092 100644
+ /* For SUSE distros, support for SystemdOptions has already been dropped as it might be a security
+ * concern for systems with unattended disk unlock and with disabled secure boot. */
- r = efi_get_variable_string(EFI_SYSTEMD_VARIABLE(SystemdOptions), ret);
- r = efi_get_variable_string(EFI_SYSTEMD_VARIABLE_STR("SystemdOptions"), ret);
- if (r == -ENOENT)
- return -ENODATA;
- return r;
+ if (access(EFIVAR_PATH(EFI_SYSTEMD_VARIABLE(SystemdOptions)), F_OK) < 0)
+ if (access(EFIVAR_PATH(EFI_SYSTEMD_VARIABLE_STR("SystemdOptions")), F_OK) < 0)
+ return errno == ENOENT ? -ENODATA : -errno;
+
+ return log_warning_errno(SYNTHETIC_ERRNO(EPERM), "Boot options passed via SystemdOptions EFI variable is no more supported, ignoring: %m");
}
int cache_efi_options_variable(void) {
diff --git a/src/boot/bootctl-systemd-efi-options.c b/src/boot/bootctl-systemd-efi-options.c
index 7f8308fc3d..216b99546f 100644
--- a/src/boot/bootctl-systemd-efi-options.c
+++ b/src/boot/bootctl-systemd-efi-options.c
diff --git a/src/bootctl/bootctl-systemd-efi-options.c b/src/bootctl/bootctl-systemd-efi-options.c
index d626d87abc..32b79bd1e1 100644
--- a/src/bootctl/bootctl-systemd-efi-options.c
+++ b/src/bootctl/bootctl-systemd-efi-options.c
@@ -6,6 +6,7 @@
#include "efi-loader.h"
@@ -76,5 +76,5 @@ index 7f8308fc3d..216b99546f 100644
+#endif
}
--
2.35.3
2.43.0

View File

@@ -0,0 +1,538 @@
From 39bbd48fee33d820ba3a2ed52067234b623e13c4 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Fri, 13 Sep 2024 12:16:12 +0200
Subject: [PATCH] udev: restore some legacy symlinks to maintain backward
compatibility
Extracted from the openSUSE git repository, branch "compats/udev-compat-symlinks",
commit aa2d840a3b149497a0de95049482eb9f1c667a38.
- 2025-01-29: port to sd_device while trying to minimize the number of behavior changes.
---
rules.d/61-persistent-storage-compat.rules | 137 +++++++++
rules.d/meson.build | 1 +
src/udev/compat/meson.build | 8 +
src/udev/compat/path_id_compat.c | 329 +++++++++++++++++++++
src/udev/meson.build | 2 +
5 files changed, 477 insertions(+)
create mode 100644 rules.d/61-persistent-storage-compat.rules
create mode 100644 src/udev/compat/meson.build
create mode 100644 src/udev/compat/path_id_compat.c
diff --git a/rules.d/61-persistent-storage-compat.rules b/rules.d/61-persistent-storage-compat.rules
new file mode 100644
index 0000000000..bd229f619b
--- /dev/null
+++ b/rules.d/61-persistent-storage-compat.rules
@@ -0,0 +1,137 @@
+# Do not edit this file, it will be overwritten on update.
+
+# This file contains *depecrated* rules kept only for backward
+# compatibility reasons. Indeed upstream has the bad habit to change
+# symlink naming schemes hence breaking systems using the old schemes.
+#
+# If your system uses one of the symlinks generated by these compat
+# rules (usually in /etc/fstab), we encourage you to replace the
+# relevant paths with the new ones (symlinks generated by
+# 60-persistent-storage.rules).
+#
+# You might check if your system relies on one of those compat symlinks
+# by disabling their creation at boot time. To do so, append
+# "udev.compat_symlink_generation=0" to the kernel command line. If
+# your system works flawlessly, there's a good chance that your system
+# doesn't rely on them and they could be disabled permanently.
+#
+# Thanks !
+#
+# Note: this rules file can rely on all ID_* variables (set by
+# 60-persistent-storage.rule) but should not overwrite them, see
+# bsc#1048679 for details.
+
+ACTION=="remove", GOTO="persistent_storage_end"
+
+SUBSYSTEM!="block", GOTO="persistent_storage_end"
+KERNEL!="nvme*|sd*", GOTO="persistent_storage_end"
+
+# ignore partitions that span the entire disk
+TEST=="whole_disk", GOTO="persistent_storage_end"
+
+#
+# The compat symlink generation number can be specified through the kernel
+# command line and in that case it will take precedence.
+#
+# Note: any non-supported values (including "0") will disable all generations
+# whereas no values specified will be equivalent to a value "1" and therefore
+# will request the creation of all compat symlinks (whatever their age).
+#
+IMPORT{cmdline}="udev.compat_symlink_generation"
+ENV{COMPAT_SYMLINK_GENERATION}="$env{udev.compat_symlink_generation}"
+
+#
+# Systems without the compat-symlinks-generation file are systems
+# installed before compat rules were created. They might be using
+# one of those compat symlinks (can be any generation).
+#
+ENV{COMPAT_SYMLINK_GENERATION}!="?*", IMPORT{file}="/usr/lib/udev/compat-symlink-generation"
+ENV{COMPAT_SYMLINK_GENERATION}!="?*", ENV{COMPAT_SYMLINK_GENERATION}="1"
+
+#
+# Generation #1
+#
+ENV{COMPAT_SYMLINK_GENERATION}!="1", GOTO="generation_2"
+
+# NVMe symlinks were introduced by a SUSE specific commit (bsc#944132) which
+# relied on scsi_id (unfortunately) and hence used the NVMe SCSI translation
+# layer. Later upstream added (by-id) symlinks for NVMe as well but reads the
+# device properties from its sysfs attributes instead. The symlinks names
+# generated in both cases are not identical so we still have to generate the
+# old ones for backward compatibly reasons.
+#
+# The SCSI translation layer for NVMe devices has been removed from the kernel
+# since 4.13, therefore we had to drop the use of scsi_id and use the sysfs
+# interface to mimic scsi_id and continue to generate the old compat symlinks.
+#
+# The rules below hopefully mimics the main cases only as it's impossible to
+# re-implement the exact behavior of scsi_id via udev rules.
+#
+# scsi_id acted differently depending on the NVMe revision implemented by a
+# device, which can lead to problems if the device firmware is
+# updated. Therefore symlinks for all NVMe revisions are generated now.
+#
+# Extra care is needed for whitespace handling. For example we can't use
+# %s{model} to retrieve the model string because udev strips any trailing
+# whitespaces and some plateforms (QEMU does that) might append such chars. In
+# those cases scsi_id was replacing them with a single trailing '_'. Therefore
+# the currently code retrieves the model string manually making sure to
+# preserve all characters so trailing whitespaces are still converted when the
+# symlink is created.
+
+KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_EUI_COMPAT}!="?*", ATTRS{eui}=="?*", ATTRS{eui}!="0000000000000000", \
+ PROGRAM=="/bin/sh -c 'eui=\"%s{eui}\"; echo $${eui// /}", ENV{ID_NVME_EUI_COMPAT}="2%c"
+
+KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_NGUID_COMPAT}!="?*", ATTRS{nguid}=="?*", \
+ PROGRAM=="/bin/sh -c 'nguid=\"%s{nguid}\"; echo $${nguid//-/}", ENV{ID_NVME_NGUID_COMPAT}="%c"
+
+KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_SERIAL_COMPAT}!="?*", ATTRS{model}=="?*", ATTRS{serial}=="?*", \
+ PROGRAM=="/bin/sh -c ' \
+ cd /sys/%p; \
+ while ! [ -f model ]; do \
+ cd ..; \
+ [ $$(pwd) = %S ] && exit 1; \
+ done; \
+ cut -c 1-16 model'", ENV{ID_NVME_SERIAL_COMPAT}="SNVMe_%c%s{serial}"
+
+KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_EUI_COMPAT}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_NVME_EUI_COMPAT}"
+KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_NGUID_COMPAT}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_NVME_NGUID_COMPAT}"
+KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_SERIAL_COMPAT}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_NVME_SERIAL_COMPAT}"
+
+KERNEL=="nvme*", ENV{DEVTYPE}=="partition", ENV{ID_NVME_EUI_COMPAT}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_NVME_EUI_COMPAT}-part%n"
+KERNEL=="nvme*", ENV{DEVTYPE}=="partition", ENV{ID_NVME_NGUID_COMPAT}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_NVME_NGUID_COMPAT}-part%n"
+KERNEL=="nvme*", ENV{DEVTYPE}=="partition", ENV{ID_NVME_SERIAL_COMPAT}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_NVME_SERIAL_COMPAT}-part%n"
+
+# Leap 42.3 ISO has a version of udev which suffers from bsc#1048679
+# (ID_SERIAL is set by the upstream rules making ID_BUS empty instead
+# of "nvme"). This lead to those odd symlinks with the "nvme" prefix
+# missing (bsc#1063249).
+#
+# They are actually only used by systems with Leap 42.3 initially
+# installed and with NVMe encrypted partitions.
+KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/-$env{ID_SERIAL}"
+KERNEL=="nvme*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/-$env{ID_SERIAL}-part%n"
+
+# SCSI compat links for ATA devices, removed by f6ba1a468cea (boo#769002)
+KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM=="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}"
+KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n"
+
+# by-path (parent device path, compat version, only for ATA/NVMe/SAS bus) (bnc#916420)
+ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata|nvme|scsi", DEVPATH!="*/virtual/*", IMPORT{program}="path_id_compat --compat=1 %p"
+ENV{DEVTYPE}=="disk", ENV{ID_PATH_COMPAT1}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH_COMPAT1}"
+ENV{DEVTYPE}=="partition", ENV{ID_PATH_COMPAT1}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH_COMPAT1}-part%n"
+
+# This restores the symlinks for SAS disks removed by 66bba0e701b95dc42e (bsc#1040153)
+ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata|nvme|scsi", DEVPATH!="*/virtual/*", IMPORT{program}="path_id_compat --compat=2 %p"
+ENV{DEVTYPE}=="disk", ENV{ID_PATH_COMPAT2}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH_COMPAT2}"
+ENV{DEVTYPE}=="partition", ENV{ID_PATH_COMPAT2}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH_COMPAT2}-part%n"
+
+#
+# Generation #2
+#
+LABEL="generation_2"
+ENV{COMPAT_SYMLINK_GENERATION}!="1|2", GOTO="persistent_storage_end"
+
+# Currently no compat links of generation 2
+
+LABEL="persistent_storage_end"
diff --git a/rules.d/meson.build b/rules.d/meson.build
index 3040fae8a4..ca07be282c 100644
--- a/rules.d/meson.build
+++ b/rules.d/meson.build
@@ -21,6 +21,7 @@ rules = [
'60-persistent-v4l.rules',
'60-sensor.rules',
'60-serial.rules',
+ '61-persistent-storage-compat.rules',
'70-camera.rules',
'70-joystick.rules',
'70-mouse.rules',
diff --git a/src/udev/compat/meson.build b/src/udev/compat/meson.build
new file mode 100644
index 0000000000..d624229bd1
--- /dev/null
+++ b/src/udev/compat/meson.build
@@ -0,0 +1,8 @@
+executable('path_id_compat',
+ 'path_id_compat.c',
+ include_directories : includes,
+ dependencies : [userspace],
+ c_args : ['-DLOG_REALM=LOG_REALM_UDEV'],
+ link_with : libshared,
+ install : true,
+ install_dir : udevlibexecdir)
diff --git a/src/udev/compat/path_id_compat.c b/src/udev/compat/path_id_compat.c
new file mode 100644
index 0000000000..c5839916ea
--- /dev/null
+++ b/src/udev/compat/path_id_compat.c
@@ -0,0 +1,329 @@
+/*
+ * path_id_compat.c: compose persistent device path (compat version)
+ *
+ * Copyright (C) 2009 Kay Sievers <kay.sievers@vrfy.org>
+ *
+ * Logic based on Hannes Reinecke's shell script.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <getopt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <dirent.h>
+
+#include "device-util.h"
+#include "dirent-util.h"
+#include "fd-util.h"
+#include "parse-util.h"
+#include "sd-device.h"
+#include "string-util.h"
+
+#define PATH_SIZE 16384
+#define SYSFS_PATH "/sys"
+
+static const char *compat_version_str = NULL;
+static unsigned compat_version;
+
+static int path_prepend(char **path, const char *fmt, ...) {
+ va_list va;
+ char *old;
+ char *pre;
+ int err;
+
+ old = *path;
+
+ va_start(va, fmt);
+ err = vasprintf(&pre, fmt, va);
+ va_end(va);
+ if (err < 0)
+ return err;
+
+ if (old != NULL) {
+ err = asprintf(path, "%s-%s", pre, old);
+ if (err < 0)
+ return err;
+ free(pre);
+ } else {
+ *path = pre;
+ }
+
+ free(old);
+ return 0;
+}
+
+/*
+** Linux only supports 32 bit luns.
+** See drivers/scsi/scsi_scan.c::scsilun_to_int() for more details.
+*/
+static int format_lun_number(sd_device *dev, char **path) {
+ unsigned long lun;
+ const char *sysnum;
+
+ (void) sd_device_get_sysnum(dev, &sysnum);
+
+ lun = strtoul(sysnum, NULL, 10);
+ if (lun < 256) /* address method 0, peripheral device addressing with bus id of zero */
+ return path_prepend(path, "lun-%d", lun);
+
+ /* handle all other lun addressing methods by using a variant of the original lun format */
+ return path_prepend(path, "lun-0x%04x%04x00000000", (lun & 0xffff), (lun >> 16) & 0xffff);
+}
+
+static sd_device *skip_subsystem(sd_device *dev, const char *subsys) {
+ for (sd_device *parent = dev; ; ) {
+ if (!device_in_subsystem(parent, subsys))
+ break;
+
+ dev = parent;
+ if (sd_device_get_parent(dev, &parent) < 0)
+ break;
+ }
+
+ return dev;
+}
+
+static sd_device *handle_scsi_default(sd_device *parent, char **path) {
+ sd_device *hostdev;
+ int host, bus, target, lun;
+ const char *sysname, *base, *pos;
+ _cleanup_closedir_ DIR *dir = NULL;
+ int basenum = -1;
+
+ if (sd_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host", &hostdev) < 0)
+ return NULL;
+
+ if (sd_device_get_sysname(parent, &sysname) < 0)
+ return NULL;
+ if (sscanf(sysname, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4)
+ return NULL;
+
+ /* rebase host offset to get the local relative number */
+ if (sd_device_get_syspath(hostdev, &base) < 0)
+ return NULL;
+ pos = strrchr(base, '/');
+ if (!pos)
+ return NULL;
+
+ base = strndupa_safe(base, pos - base);
+ dir = opendir(base);
+ if (!dir)
+ return NULL;
+
+ FOREACH_DIRENT_ALL(dent, dir, break) {
+ char *rest;
+ int i;
+
+ if (dent->d_name[0] == '.')
+ continue;
+ if (dent->d_type != DT_DIR && dent->d_type != DT_LNK)
+ continue;
+ if (strncmp(dent->d_name, "host", 4) != 0)
+ continue;
+ i = strtoul(&dent->d_name[4], &rest, 10);
+ if (rest[0] != '\0')
+ continue;
+ if (basenum == -1 || i < basenum)
+ basenum = i;
+ }
+ if (basenum == -1)
+ return NULL;
+ host -= basenum;
+
+ path_prepend(path, "scsi-%u:%u:%u:%u", host, bus, target, lun);
+ return hostdev;
+}
+
+static sd_device *handle_ata(sd_device *parent, char **path) {
+ sd_device *hostdev;
+ int host, bus, target, lun;
+ const char *name;
+
+ if (sd_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host", &hostdev) < 0)
+ return NULL;
+
+ if (sd_device_get_sysname(parent, &name) < 0)
+ return NULL;
+ if (sscanf(name, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4)
+ return NULL;
+
+ path_prepend(path, "scsi-%u:%u:%u:%u", host, bus, target, lun);
+ return hostdev;
+}
+
+static sd_device *handle_scsi_sas(sd_device *parent, char **path) {
+ _cleanup_closedir_ DIR *dir = NULL;
+ _cleanup_(sd_device_unrefp) sd_device *sasdev = NULL;
+ sd_device *targetdev, *target_parent, *portdev;
+ const char *sas_address, *syspath, *sysname;
+ int tmp_phy_id, phy_id = 255;
+ _cleanup_free_ char *lun = NULL;
+
+ if (sd_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target", &targetdev) < 0)
+ return NULL;
+
+ if (sd_device_get_parent(targetdev, &target_parent) < 0)
+ return NULL;
+
+ if (sd_device_get_parent(target_parent, &portdev) < 0)
+ return NULL;
+
+ if (sd_device_get_syspath(portdev, &syspath) < 0)
+ return NULL;
+ dir = opendir(syspath);
+ if (!dir)
+ return NULL;
+
+ FOREACH_DIRENT_ALL(dent, dir, break) {
+ const char *name = dent->d_name;
+ char *phy_id_str;
+
+ if (dent->d_type != DT_LNK)
+ continue;
+
+ if (strncmp(dent->d_name, "phy", 3) != 0)
+ continue;
+
+ phy_id_str = strstr(name, ":");
+ if (phy_id_str == NULL)
+ continue;
+
+ phy_id_str++;
+
+ tmp_phy_id = atoi(phy_id_str);
+ if (tmp_phy_id >= 0 && tmp_phy_id < phy_id)
+ phy_id = tmp_phy_id;
+ }
+
+ if (phy_id == 255)
+ return NULL;
+
+ if (sd_device_get_sysname(target_parent, &sysname) < 0)
+ return NULL;
+
+ if (sd_device_new_from_subsystem_sysname(&sasdev, "sas_device", sysname) < 0)
+ return NULL;
+
+ if (sd_device_get_sysattr_value(sasdev, "sas_address", &sas_address) < 0)
+ return NULL;
+
+ if (format_lun_number(parent, &lun) < 0)
+ return NULL;
+
+ switch (compat_version) {
+ case 1:
+ path_prepend(path, "sas-phy%d-%s-%s", phy_id, sas_address, lun);
+ break;
+ case 2:
+ path_prepend(path, "sas-%s-%s", sas_address, lun);
+ break;
+ }
+
+ return parent;
+}
+
+static sd_device *handle_scsi(sd_device *parent, char **path) {
+ const char *devtype;
+ const char *name;
+ int r;
+
+ r = sd_device_get_devtype(parent, &devtype);
+ if (r < 0 || strcmp(devtype, "scsi_device") != 0)
+ return parent;
+
+ /* lousy scsi sysfs does not have a "subsystem" for the transport */
+ (void) sd_device_get_syspath(parent, &name);
+
+ if (strstr(name, "/end_device-") != NULL)
+ return handle_scsi_sas(parent, path);
+
+ if (strstr(name, "/ata") != NULL)
+ return handle_ata(parent, path);
+
+ return handle_scsi_default(parent, path);
+}
+
+int main(int argc, char **argv) {
+ static const struct option options[] = {
+ { "compat", required_argument, NULL, 'V' },
+ };
+ _cleanup_(sd_device_unrefp) sd_device *dev = NULL;
+ _cleanup_free_ char *path = NULL;
+ char syspath[PATH_SIZE];
+ int r = 1;
+
+ for (;;) {
+ int option;
+
+ option = getopt_long(argc, argv, "v:", options, NULL);
+ if (option == -1)
+ break;
+
+ switch (option) {
+ case 'V':
+ compat_version_str = optarg;
+ break;
+ }
+ }
+
+ if (compat_version_str) {
+ if (safe_atou(compat_version_str, &compat_version) < 0) {
+ fprintf(stderr, "--compat takes an integer.\n");
+ return 1;
+ }
+ }
+
+ if (argv[optind] == NULL) {
+ fprintf(stderr, "No device specified\n");
+ return 2;
+ }
+
+ snprintf(syspath, PATH_SIZE, "%s%s", SYSFS_PATH, argv[optind]);
+ if (sd_device_new_from_syspath(&dev, syspath) < 0) {
+ fprintf(stderr, "unable to access '%s'\n", argv[optind]);
+ return 3;
+ }
+
+ /* walk up the chain of devices and compose path */
+ for (sd_device *parent = dev; parent; ) {
+ const char *sysname;
+
+ if (sd_device_get_sysname(parent, &sysname) < 0)
+ ;
+ else if (device_in_subsystem(parent, "scsi"))
+ parent = handle_scsi(parent, &path);
+ else if (device_in_subsystem(parent, "pci")) {
+ path_prepend(&path, "pci-%s", sysname);
+ parent = skip_subsystem(parent, "pci");
+ }
+
+ if (!parent)
+ break;
+ if (sd_device_get_parent(parent, &parent) < 0) /* return -ENOENT when no more parent */
+ break;
+ }
+
+ if (path) {
+ printf("ID_PATH_COMPAT%s=%s\n", strempty(compat_version_str), path);
+ r = 0;
+ }
+
+ return r;
+}
diff --git a/src/udev/meson.build b/src/udev/meson.build
index 3535551e74..59073f33d7 100644
--- a/src/udev/meson.build
+++ b/src/udev/meson.build
@@ -273,3 +273,5 @@ udev_pc = custom_target(
if install_sysconfdir
install_emptydir(sysconfdir / 'udev/rules.d')
endif
+
+subdir('compat')
--
2.43.0

View File

@@ -1,7 +1,8 @@
From 745ab2ac0f5424b0c04d9c38234bb9babcbd90ef Mon Sep 17 00:00:00 2001
From 09184a555aec3ef612425ba6fe596cf05383ca09 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Fri, 10 Jun 2016 15:19:57 +0200
Subject: [PATCH] pid1: handle console specificities/weirdness for s390 arch
Subject: [PATCH 1/1] pid1: handle console specificities/weirdness for s390
arch
The 3270 console on S/390 can do color but not the 3215 console.
@@ -13,29 +14,32 @@ imported from upsteam made them uneeded.
The remaining bits are probably hackish but at least they are now
minimal.
It was an attempt to address bnc#860937. And yes turning the console
color mode off by passing $TERM=dumb via the kernel command line would
have been much more easier and enough.
This is actually implemented by recent systemd. There's also another
command line option: systemd.log_color=off.
It was an attempt to address bnc#860937 to automatically turn the console color
mode off by passing $TERM=dumb when the specified terminal device is other than
"3270". For more details, see
https://www.ibm.com/docs/en/linux-on-systems?topic=setup-kernel-parameters.
See also a short discussion which happened on @systemd-maintainers
whose $subject is "[PATCH] support conmode setting on command line".
[fbui: fixes bsc#860937]
Don't warn if "conmode=" is missing as this option should not be passed on
s390x KVM.
[fbui: fixes bsc#1236725]
---
src/basic/terminal-util.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
src/basic/terminal-util.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
index 3355b749cc..e96b053217 100644
index 409f2abb45..630fc81836 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -784,7 +784,20 @@ bool tty_is_vc_resolve(const char *tty) {
@@ -912,7 +912,19 @@ bool tty_is_vc_resolve(const char *tty) {
}
const char *default_term_for_tty(const char *tty) {
const char* default_term_for_tty(const char *tty) {
- return tty && tty_is_vc_resolve(tty) ? "linux" : "vt220";
+ if (tty && tty_is_vc_resolve(tty))
+ return "linux";
@@ -44,9 +48,8 @@ index 3355b749cc..e96b053217 100644
+ if (tty && tty_is_console(tty)) {
+ _cleanup_free_ char *mode = NULL;
+
+ /* Simply return "dumb" in case of OOM. */
+ /* Returns "dumb" in case of OOM. */
+ (void) proc_cmdline_get_key("conmode", 0, &mode);
+ (void) proc_cmdline_value_missing("conmode", mode);
+ return streq_ptr(mode, "3270") ? "ibm327x" : "dumb";
+ }
+#endif
@@ -55,5 +58,5 @@ index 3355b749cc..e96b053217 100644
int fd_columns(int fd) {
--
2.35.3
2.43.0

View File

@@ -0,0 +1,67 @@
From 1c7f2d5dc44c0e2075bb7d1cc16f085589b5b5d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 9 Jan 2024 11:28:04 +0100
Subject: [PATCH 1001/1001] journal: again create user journals for users with
high uids
This effectively reverts a change in 115d5145a257c1a27330acf9f063b5f4d910ca4d
'journald: move uid_for_system_journal() to uid-alloc-range.h', which slipped
in an additional check of uid_is_container(uid). The problem is that that change
is not backwards-compatible at all and very hard for users to handle.
There is no common agreement on mappings of high-range uids. Systemd declares
ownership of a large range for container uids in https://systemd.io/UIDS-GIDS/,
but this is only a recent change and various sites allocated those ranges
in a different way, in particular FreeIPA uses (used?) uids from this range
for human users. On big sites with lots of users changing uids is obviously a
hard problem. We generally assume that uids cannot be "freed" and/or changed
and/or reused safely, so we shouldn't demand the same from others.
This is somewhat similar to the situation with SYSTEM_ALLOC_UID_MIN /
SYSTEM_UID_MAX, which we tried to define to a fixed value in our code, causing
huge problems for existing systems with were created with a different
definition and couldn't be easily updated. For that case, we added a
configuration time switch and we now parse /etc/login.defs to actually use the
value that is appropriate for the local system.
Unfortunately, login.defs doesn't have a concept of container allocation ranges
(and we don't have code to parse and use those nonexistent names either), so we
can't tell users to adjust logind.defs to work around the changed definition.
login.defs has SUB_UID_{MIN,MAX}, but those aren't really the same thing,
because they are used to define where the add allocations for subuids, which is
generally a much smaller range. Maybe we should talk with other folks about
the appropriate allocation ranges and define some new settings in login.defs.
But this would require discussion and coordination with other projects first.
Actualy, it seems that this change was needed at all. The code in the container
does not log to the outside journal. It talks to its own journald, which does
journal splitting using its internal logic based on shifted uids. So let's
revert the change to fix user systems.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2251843.
Upstream PR: https://github.com/systemd/systemd/pull/30846
rhel-only: bugfix
Resolves: RHEL-70103
[fbui: fixes bsc#1242938]
---
src/basic/uid-classification.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/basic/uid-classification.c b/src/basic/uid-classification.c
index e2d2cebc6d..2c8b06c0d3 100644
--- a/src/basic/uid-classification.c
+++ b/src/basic/uid-classification.c
@@ -127,5 +127,5 @@ bool uid_for_system_journal(uid_t uid) {
/* Returns true if the specified UID shall get its data stored in the system journal. */
- return uid_is_system(uid) || uid_is_dynamic(uid) || uid == UID_NOBODY || uid_is_container(uid);
+ return uid_is_system(uid) || uid_is_dynamic(uid) || uid == UID_NOBODY;
}
--
2.43.0

View File

@@ -0,0 +1,88 @@
From a0d557e0aebe9ad2e27e0f22822207f231c8e726 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Fri, 9 May 2025 16:32:19 +0200
Subject: udev: persistent net rules support
This patch reintroduces the ability to rename a NIC even if the new name is
currently in use by another NIC. In such cases, udev waits until the new name
becomes available, while the previously named NIC is renamed in turn.
This is needed to support upgrades from older systems relying on persistent net
rules.
[fbui: fixes bsc#1241190]
---
src/libsystemd/sd-netlink/netlink-util.c | 44 +++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/src/libsystemd/sd-netlink/netlink-util.c b/src/libsystemd/sd-netlink/netlink-util.c
index 90616094bc..794e8983b1 100644
--- a/src/libsystemd/sd-netlink/netlink-util.c
+++ b/src/libsystemd/sd-netlink/netlink-util.c
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <linux/if.h>
+
#include "sd-netlink.h"
#include "fd-util.h"
@@ -159,7 +161,7 @@ int rtnl_resolve_ifname_full(
return -ENODEV;
}
-static int set_link_name(sd_netlink **rtnl, int ifindex, const char *name) {
+static int do_set_link_name(sd_netlink **rtnl, int ifindex, const char *name) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *message = NULL;
int r;
@@ -186,6 +188,46 @@ static int set_link_name(sd_netlink **rtnl, int ifindex, const char *name) {
return sd_netlink_call(*rtnl, message, 0, NULL);
}
+static int do_set_link_name_wait(sd_netlink **rtnl, int ifindex, const char *name) {
+ char tmp[IFNAMSIZ];
+ int r;
+
+ log_debug("ifindex %i: waiting for name %s to be released", ifindex, name);
+
+ /* free our own name, another process may wait for us */
+ snprintf(tmp, IFNAMSIZ, "rename%d", ifindex);
+ r = do_set_link_name(rtnl, ifindex, tmp);
+ if (r < 0)
+ return r;
+
+ log_debug("ifindex %i: while waiting, renamed to %s to release our own name", ifindex, tmp);
+
+ /* wait a maximum of 90 seconds for our target to become available */
+ for(int loop = 90 * 20; loop; loop--) {
+ const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 };
+
+ nanosleep(&duration, NULL);
+
+ r = do_set_link_name(rtnl, ifindex, name);
+ if (r >= 0)
+ break;
+ if (r != -EEXIST)
+ break;
+ }
+
+ return r;
+}
+
+static int set_link_name(sd_netlink **rtnl, int ifindex, const char *name) {
+ int r;
+
+ r = do_set_link_name(rtnl, ifindex, name);
+ if (r >= 0 || r != -EEXIST)
+ return r;
+
+ return do_set_link_name_wait(rtnl, ifindex, name);
+}
+
int rtnl_rename_link(sd_netlink **rtnl, const char *orig_name, const char *new_name) {
_cleanup_(sd_netlink_unrefp) sd_netlink *our_rtnl = NULL;
int r, ifindex;
--
2.43.0

View File

@@ -1,4 +1,4 @@
From d624ceb7f2e6e286cf876f2ff9bf90532166c7f9 Mon Sep 17 00:00:00 2001
From f847d3d3b73c22c674bb713f179522cef8ddabb7 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Fri, 12 Jan 2024 10:54:57 +0100
Subject: [PATCH 5001/5002] Revert "udev: update devlink with the newer device
@@ -10,10 +10,10 @@ This reverts commit 277cb24ffb7a520f640eb36d11340f11bf0c7c4f.
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c
index e12c26ce5a..6ba38087dc 100644
index 673f723ff2..6e2fff72e9 100644
--- a/src/udev/udev-node.c
+++ b/src/udev/udev-node.c
@@ -467,13 +467,13 @@ static int link_update(sd_device *dev, const char *slink, bool add) {
@@ -457,13 +457,13 @@ static int link_update(sd_device *dev, const char *slink, bool add) {
/* The devlink priority is downgraded. Another device may have a higher
* priority now. Let's find the device node with the highest priority. */
} else {
@@ -29,9 +29,9 @@ index e12c26ce5a..6ba38087dc 100644
- * create the devlink to our device node. */
+ /* This device has a higher priority than the current. Let's create the
+ * devlink to our device node. */
return node_symlink(dev, NULL, slink);
return node_create_symlink(dev, /* devnode = */ NULL, slink);
}
--
2.35.3
2.43.0

View File

@@ -1,51 +0,0 @@
From 437ea859ca6fa13e1b4b5075c85f6a5ebe93cd01 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Wed, 17 Jul 2024 11:02:03 +0200
Subject: [PATCH 5003/5003] core: when switching root remove /run/systemd
before executing the binary specified by init=
It's important if the binary specified by the init= boot option is not systemd
otherwise it confuses systemctl that incorrectly assumes that systemd is still
the init system due to the presence of /run/systemd/system.
Also some tools might also check the presence of /run/systemd/private to test
if systemd is running as pid1.
(cherry picked from commit 8c28dd24427598214d4464565192ec3f3b1a74a4)
---
src/core/main.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/core/main.c b/src/core/main.c
index 4b8a315d86..ae8272d7e7 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -80,6 +80,7 @@
#include "psi-util.h"
#include "random-util.h"
#include "rlimit-util.h"
+#include "rm-rf.h"
#include "seccomp-util.h"
#include "selinux-setup.h"
#include "selinux-util.h"
@@ -2037,6 +2038,17 @@ static int do_reexecute(
arg_serialization = safe_fclose(arg_serialization);
fds = fdset_free(fds);
+ /* Drop /run/systemd directory. Some of its content can be used as a flag indicating that systemd is
+ * the init system but we might be replacing it with something different. If systemd is used again it
+ * will recreate the directory and its content anyway. */
+ r = rm_rf("/run/systemd.pre-switch-root", REMOVE_ROOT|REMOVE_MISSING_OK);
+ if (r < 0)
+ log_warning_errno(r, "Failed to prepare /run/systemd.pre-switch-root/, ignoring: %m");
+
+ r = RET_NERRNO(rename("/run/systemd", "/run/systemd.pre-switch-root"));
+ if (r < 0)
+ log_warning_errno(r, "Failed to move /run/systemd/ to /run/systemd.pre-switch-root/, ignoring: %m");
+
/* Reopen the console */
(void) make_console_stdio();
--
2.35.3

View File

@@ -1,4 +1,5 @@
From: Michal Koutný <mkoutny@suse.com>
From 88d0e79a7e4de9df6460ed4af694f15caedc3014 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com>
Date: Wed, 24 Jul 2024 14:20:17 +0200
Subject: Disable session freeze
@@ -9,22 +10,55 @@ task upon suspend) since the benefit of user.slice freezing does not outweight
the breakage caused by cgroup freezing implementation.
[1] https://github.com/systemd/systemd/issues/33083
[fbui: rebased on top of v257]
---
src/home/homework.c | 7 ++++---
src/sleep/sleep.c | 8 +++++---
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/home/homework.c b/src/home/homework.c
index 00e74894b3..d1de98e7b6 100644
--- a/src/home/homework.c
+++ b/src/home/homework.c
@@ -1880,7 +1880,7 @@ static int user_session_freezer_new(uid_t uid, UnitFreezer **ret) {
r = getenv_bool("SYSTEMD_HOME_LOCK_FREEZE_SESSION");
if (r < 0 && r != -ENXIO)
log_warning_errno(r, "Cannot parse value of $SYSTEMD_HOME_LOCK_FREEZE_SESSION, ignoring: %m");
- else if (r == 0) {
+ else if (r == 0 || r == -ENXIO) { /* Do not freeze by default unless requested */
*ret = NULL;
return 0;
}
@@ -1922,8 +1922,9 @@ static int home_lock(UserRecord *h) {
if (r < 0)
return r;
} else
- log_notice("Session remains unfrozen on explicit request ($SYSTEMD_HOME_LOCK_FREEZE_SESSION=0).\n"
- "This is not recommended, and might result in unexpected behavior including data loss!");
+ log_notice("Session remains unfrozen (add $SYSTEMD_HOME_LOCK_FREEZE_SESSION=1 to override).\n"
+ "This is a temporary downstream workaround for https://github.com/systemd/systemd/issues/33083.\n"
+ "Home locking is thus experimental and might result in unexpected behavior including data loss!");
r = home_lock_luks(h, &setup);
if (r < 0) {
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 181bb4ccef..0181bcabc9 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -603,12 +603,14 @@ static int run(int argc, char *argv[]) {
@@ -612,6 +612,8 @@ static int run(int argc, char *argv[]) {
r = getenv_bool("SYSTEMD_SLEEP_FREEZE_USER_SESSIONS");
if (r < 0 && r != -ENXIO)
log_warning_errno(r, "Cannot parse value of $SYSTEMD_SLEEP_FREEZE_USER_SESSIONS, ignoring.");
log_warning_errno(r, "Cannot parse value of $SYSTEMD_SLEEP_FREEZE_USER_SESSIONS, ignoring: %m");
+ if (r == -ENXIO)
+ r = 0; /* Do not freeze by default unless requested */
if (r != 0)
(void) unit_freezer_new_freeze(SPECIAL_USER_SLICE, &user_slice_freezer);
else
if (r != 0) {
r = unit_freezer_new(SPECIAL_USER_SLICE, &user_slice_freezer);
if (r < 0)
@@ -619,9 +621,9 @@ static int run(int argc, char *argv[]) {
(void) unit_freezer_freeze(user_slice_freezer);
} else
- log_notice("User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).\n"
- "This is not recommended, and might result in unexpected behavior, particularly\n"
- "in suspend-then-hibernate operations or setups with encrypted home directories.");
@@ -34,20 +68,6 @@ the breakage caused by cgroup freezing implementation.
switch (arg_operation) {
--- a/src/home/homework.c
+++ b/src/home/homework.c
@@ -1879,10 +1879,11 @@ static int user_session_freezer(uid_t ui
r = getenv_bool("SYSTEMD_HOME_LOCK_FREEZE_SESSION");
if (r < 0 && r != -ENXIO)
log_warning_errno(r, "Cannot parse value of $SYSTEMD_HOME_LOCK_FREEZE_SESSION, ignoring: %m");
- else if (r == 0) {
+ else if (r == 0 || r == -ENXIO) { /* Do not freeze by default unless requested */
if (freeze_now)
- log_notice("Session remains unfrozen on explicit request ($SYSTEMD_HOME_LOCK_FREEZE_SESSION=0).\n"
- "This is not recommended, and might result in unexpected behavior including data loss!");
+ log_notice("Session remains unfrozen (add $SYSTEMD_HOME_LOCK_FREEZE_SESSION=1 to override).\n"
+ "This is a temporary downstream workaround for https://github.com/systemd/systemd/issues/33083.\n"
+ "Home locking is thus experimental and might result in unexpected behavior including data loss!");
--
2.43.0
*ret = NULL;
return 0;

View File

@@ -5,9 +5,7 @@
%{_bindir}/systemd-nspawn
%if %{without bootstrap}
%{_datadir}/bash-completion/completions/systemd-nspawn
%endif
%{_datadir}/polkit-1/actions/io.systemd.mount-file-system.policy
%if %{without bootstrap}
%{_datadir}/zsh/site-functions/_systemd-nspawn
%{_mandir}/man1/systemd-nspawn.1.gz
%{_mandir}/man5/systemd.nspawn.5.gz
@@ -19,7 +17,6 @@
%{_mandir}/man8/systemd-nsresourced.service.8.gz
%endif
%if %{with networkd}
%{_systemd_util_dir}/network/80-container-host0.network
%{_systemd_util_dir}/network/80-container-vb.link
%{_systemd_util_dir}/network/80-container-vb.network
%{_systemd_util_dir}/network/80-container-ve.link
@@ -82,12 +79,16 @@
%{_mandir}/man5/org.freedesktop.import1.5.gz
%{_mandir}/man8/systemd-importd.8.gz
%{_mandir}/man8/systemd-importd.service.8.gz
%{_mandir}/man8/systemd-import-generator.8.gz
%{_systemd_util_dir}/import-pubring.gpg
%{_systemd_util_dir}/systemd-export
%{_systemd_util_dir}/systemd-import
%{_systemd_util_dir}/systemd-import-fs
%{_systemd_util_dir}/systemd-importd
%{_systemd_util_dir}/systemd-pull
%{_systemdgeneratordir}/systemd-import-generator
%{_unitdir}/dbus-org.freedesktop.import1.service
%{_unitdir}/sockets.target.wants/systemd-importd.socket
%{_unitdir}/systemd-importd.service
%{_unitdir}/systemd-importd.socket
%endif

View File

@@ -120,7 +120,9 @@
%{_mandir}/man3/sd-hwdb.3.gz
%{_mandir}/man3/sd-id128.3.gz
%{_mandir}/man3/sd-journal.3.gz
%{_mandir}/man3/sd-json.3.gz
%{_mandir}/man3/sd-login.3.gz
%{_mandir}/man3/sd-varlink.3.gz
%{_mandir}/man3/sd_booted.3.gz
%{_mandir}/man3/sd_bus_add_fallback.3.gz
%{_mandir}/man3/sd_bus_add_fallback_vtable.3.gz
@@ -357,6 +359,7 @@
%{_mandir}/man3/sd_bus_path_decode_many.3.gz
%{_mandir}/man3/sd_bus_path_encode.3.gz
%{_mandir}/man3/sd_bus_path_encode_many.3.gz
%{_mandir}/man3/sd_bus_pending_method_calls.3.gz
%{_mandir}/man3/sd_bus_process.3.gz
%{_mandir}/man3/sd_bus_query_sender_creds.3.gz
%{_mandir}/man3/sd_bus_query_sender_privilege.3.gz
@@ -434,12 +437,18 @@
%{_mandir}/man3/sd_bus_unref.3.gz
%{_mandir}/man3/sd_bus_unrefp.3.gz
%{_mandir}/man3/sd_bus_wait.3.gz
%{_mandir}/man3/sd_device_enumerator_new.3.gz
%{_mandir}/man3/sd_device_enumerator_ref.3.gz
%{_mandir}/man3/sd_device_enumerator_unref.3.gz
%{_mandir}/man3/sd_device_enumerator_unrefp.3.gz
%{_mandir}/man3/sd_device_get_device_id.3.gz
%{_mandir}/man3/sd_device_get_devname.3.gz
%{_mandir}/man3/sd_device_get_devnum.3.gz
%{_mandir}/man3/sd_device_get_devpath.3.gz
%{_mandir}/man3/sd_device_get_devtype.3.gz
%{_mandir}/man3/sd_device_get_diskseq.3.gz
%{_mandir}/man3/sd_device_get_driver.3.gz
%{_mandir}/man3/sd_device_get_driver_subsystem.3.gz
%{_mandir}/man3/sd_device_get_ifindex.3.gz
%{_mandir}/man3/sd_device_get_subsystem.3.gz
%{_mandir}/man3/sd_device_get_sysname.3.gz

View File

@@ -1,6 +1,10 @@
#
# Please keep the list sorted (with `LC_ALL=C sort`).
#
# the ssh proxy will likely be promoted to systemd-container
%dir %{_distconfdir}/ssh
%dir %{_distconfdir}/ssh/ssh_config.d
%dir %{_prefix}/lib/pcrlock.d
%dir %{_prefix}/lib/pcrlock.d/400-secureboot-separator.pcrlock.d
%dir %{_prefix}/lib/pcrlock.d/500-separator.pcrlock.d
@@ -27,9 +31,13 @@
%{_datadir}/dbus-1/system.d/org.freedesktop.oom1.conf
%{_datadir}/zsh/site-functions/_oomctl
%{_datadir}/zsh/site-functions/_run0
%{_distconfdir}/ssh/ssh_config.d/20-systemd-ssh-proxy.conf
%{_mandir}/man1/oomctl.1.gz
%{_mandir}/man1/run0.1.gz
%{_mandir}/man1/systemd-keyutil.1.gz
%{_mandir}/man1/systemd-measure.1.gz
%{_mandir}/man1/systemd-sbsign.1.gz
%{_mandir}/man1/systemd-ssh-proxy.1.gz
%{_mandir}/man1/systemd-vmspawn.1.gz
%if %{with sd_boot}
%{_mandir}/man1/ukify.1.gz
@@ -40,6 +48,7 @@
%{_mandir}/man5/systemd.pcrlock.5.gz
%{_mandir}/man5/systemd.pcrlock.d.5.gz
%{_mandir}/man5/sysupdate.d.5.gz
%{_mandir}/man5/sysupdate.features.5.gz
%{_mandir}/man8/systemd-bsod.8.gz
%{_mandir}/man8/systemd-bsod.service.8.gz
%{_mandir}/man8/systemd-oomd.8.gz
@@ -61,6 +70,7 @@
%{_mandir}/man8/systemd-pcrphase-sysinit.service.8.gz
%{_mandir}/man8/systemd-pcrphase.service.8.gz
%endif
%{_mandir}/man8/systemd-ssh-generator.8.gz
%{_mandir}/man8/systemd-storagetm.8.gz
%{_mandir}/man8/systemd-storagetm.service.8.gz
%{_mandir}/man8/systemd-sysupdate-reboot.service.8.gz
@@ -73,9 +83,12 @@
%{_mandir}/man8/systemd-tpm2-setup-early.service.8.gz
%{_mandir}/man8/systemd-tpm2-setup.8.gz
%{_mandir}/man8/systemd-tpm2-setup.service.8.gz
%{_prefix}/lib/kernel/install.d/60-ukify.install
%endif
%{_pam_vendordir}/systemd-run0
%if %{with sd_boot}
%{_prefix}/lib/kernel/install.d/60-ukify.install
%endif
%{_prefix}/lib/kernel/uki.conf
%{_prefix}/lib/pcrlock.d/350-action-efi-application.pcrlock
%{_prefix}/lib/pcrlock.d/400-secureboot-separator.pcrlock.d/300-0x00000000.pcrlock
%{_prefix}/lib/pcrlock.d/400-secureboot-separator.pcrlock.d/600-0xffffffff.pcrlock
@@ -91,21 +104,23 @@
%{_prefix}/lib/pcrlock.d/990-final.pcrlock
%{_systemd_util_dir}/oomd.conf
%{_systemd_util_dir}/systemd-bsod
%{_systemd_util_dir}/systemd-keyutil
%{_systemd_util_dir}/systemd-measure
%{_systemd_util_dir}/systemd-oomd
%if %{with sd_boot}
%{_systemd_util_dir}/systemd-pcrextend
%endif
%{_systemd_util_dir}/systemd-pcrlock
%{_systemd_util_dir}/systemd-sbsign
%{_systemd_util_dir}/systemd-ssh-proxy
%{_systemd_util_dir}/systemd-storagetm
%{_systemd_util_dir}/systemd-sysupdate
%if %{with sd_boot}
%{_systemd_util_dir}/systemd-tpm2-setup
%endif
%{_systemd_util_dir}/systemd-userwork
%if %{with sd_boot}
%{_systemd_util_dir}/ukify
%endif
# ssh-generator: in the futur to be moved to the main package
%{_systemdgeneratordir}/systemd-ssh-generator
%{_systemdgeneratordir}/systemd-tpm2-generator
%{_sysusersdir}/systemd-oom.conf
%{_unitdir}/initrd.target.wants/systemd-bsod.service
@@ -154,17 +169,3 @@
%{_unitdir}/systemd-tpm2-setup.service
%endif
%{_unitdir}/systemd-vmspawn@.service
# ssh-generator: in the futur to be moved to the main package
%{_systemdgeneratordir}/systemd-ssh-generator
%if %{without bootstrap}
%{_mandir}/man8/systemd-ssh-generator.8.gz
%endif
# the ssh proxy will likely be promoted to systemd-container
%dir %{_distconfdir}/ssh
%dir %{_distconfdir}/ssh/ssh_config.d
%{_distconfdir}/ssh/ssh_config.d/20-systemd-ssh-proxy.conf
%{_systemd_util_dir}/systemd-ssh-proxy
%if %{without bootstrap}
%{_mandir}/man1/systemd-ssh-proxy.1.gz
%endif

View File

@@ -1,7 +1,6 @@
#
# Please keep the list sorted (with `LC_ALL=C sort`).
#
%if %{with networkd}
%dir %{_sysconfdir}/systemd/network
%dir %{_sysconfdir}/systemd/networkd.conf.d
%dir %{_systemd_util_dir}/network
@@ -33,6 +32,7 @@
%{_systemd_util_dir}/network/80-6rd-tunnel.link
%{_systemd_util_dir}/network/80-6rd-tunnel.network
%{_systemd_util_dir}/network/80-auto-link-local.network.example
%{_systemd_util_dir}/network/80-container-host0.network
%{_systemd_util_dir}/network/80-container-host0-tun.network
%{_systemd_util_dir}/network/80-vm-vt.link
%{_systemd_util_dir}/network/80-vm-vt.network
@@ -50,34 +50,3 @@
%{_unitdir}/systemd-networkd-wait-online@.service
%{_unitdir}/systemd-networkd.service
%{_unitdir}/systemd-networkd.socket
%endif
%if %{with resolved}
%dir %{_sysconfdir}/systemd/resolved.conf.d
%{_bindir}/resolvectl
%{_bindir}/systemd-resolve
%{_datadir}/bash-completion/completions/resolvectl
%{_datadir}/bash-completion/completions/systemd-resolve
%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.DnssdService.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.Link.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.Manager.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service
%{_datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf
%{_datadir}/polkit-1/actions/org.freedesktop.resolve1.policy
%{_datadir}/zsh/site-functions/_resolvectl
%{_libdir}/libnss_resolve.so.2
%{_mandir}/man1/resolvectl.1.gz
%{_mandir}/man5/org.freedesktop.resolve1.5.gz
%{_mandir}/man5/resolved.conf.5.gz
%{_mandir}/man5/resolved.conf.d.5.gz
%{_mandir}/man8/libnss_resolve.so.2.8.gz
%{_mandir}/man8/nss-resolve.8.gz
%{_mandir}/man8/systemd-resolved.8.gz
%{_mandir}/man8/systemd-resolved.service.8.gz
%{_systemd_util_dir}/resolv.conf
%{_systemd_util_dir}/resolved.conf
%{_systemd_util_dir}/systemd-resolved
%{_sysusersdir}/systemd-resolve.conf
%{_tmpfilesdir}/systemd-resolve.conf
%{_unitdir}/systemd-resolved.service
%endif

30
files.resolved Normal file
View File

@@ -0,0 +1,30 @@
#
# Please keep the list sorted (with `LC_ALL=C sort`).
#
%dir %{_sysconfdir}/systemd/resolved.conf.d
%{_bindir}/resolvectl
%{_bindir}/systemd-resolve
%{_datadir}/bash-completion/completions/resolvectl
%{_datadir}/bash-completion/completions/systemd-resolve
%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.DnssdService.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.Link.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.Manager.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service
%{_datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf
%{_datadir}/polkit-1/actions/org.freedesktop.resolve1.policy
%{_datadir}/zsh/site-functions/_resolvectl
%{_libdir}/libnss_resolve.so.2
%{_mandir}/man1/resolvectl.1.gz
%{_mandir}/man5/org.freedesktop.resolve1.5.gz
%{_mandir}/man5/resolved.conf.5.gz
%{_mandir}/man5/resolved.conf.d.5.gz
%{_mandir}/man8/libnss_resolve.so.2.8.gz
%{_mandir}/man8/nss-resolve.8.gz
%{_mandir}/man8/systemd-resolved.8.gz
%{_mandir}/man8/systemd-resolved.service.8.gz
%{_systemd_util_dir}/resolv.conf
%{_systemd_util_dir}/resolved.conf
%{_systemd_util_dir}/systemd-resolved
%{_sysusersdir}/systemd-resolve.conf
%{_tmpfilesdir}/systemd-resolve.conf
%{_unitdir}/systemd-resolved.service

View File

@@ -2,6 +2,7 @@
# Please keep the list sorted (with `LC_ALL=C sort`).
#
%dir %{_binfmtdir}
%if %{without bootstrap}
%dir %{_datadir}/bash-completion
@@ -154,6 +155,7 @@
%{_datadir}/bash-completion/completions/systemd-cgls
%{_datadir}/bash-completion/completions/systemd-cgtop
%{_datadir}/bash-completion/completions/systemd-confext
%{_datadir}/bash-completion/completions/systemd-creds
%{_datadir}/bash-completion/completions/systemd-delta
%{_datadir}/bash-completion/completions/systemd-detect-virt
%{_datadir}/bash-completion/completions/systemd-dissect
@@ -228,6 +230,9 @@
%{_datadir}/zsh/site-functions/_systemd-tmpfiles
%{_datadir}/zsh/site-functions/_timedatectl
%{_datadir}/zsh/site-functions/_varlinkctl
%endif
%{_distconfdir}/profile.d/70-systemd-shell-extra.sh
%if %{without bootstrap}
%{_journalcatalogdir}/systemd.catalog
%{_libdir}/libnss_myhostname.so.2
%{_libdir}/libnss_systemd.so.2
@@ -477,6 +482,7 @@
%{_systemd_util_dir}/systemd-user-sessions
%if %{without bootstrap}
%{_systemd_util_dir}/systemd-userdbd
%{_systemd_util_dir}/systemd-userwork
%endif
%{_systemd_util_dir}/systemd-xdg-autostart-condition
%{_systemd_util_dir}/user-preset/90-systemd.preset

View File

@@ -79,6 +79,7 @@
%{_mandir}/man5/integritytab.5.gz
%{_mandir}/man5/iocost.conf.5.gz
%{_mandir}/man5/modules-load.d.5.gz
%{_mandir}/man5/org.freedesktop.timesync1.5.gz
%{_mandir}/man5/pstore.conf.5.gz
%{_mandir}/man5/pstore.conf.d.5.gz
%{_mandir}/man5/repart.d.5.gz
@@ -167,7 +168,7 @@
%endif
%{_prefix}/lib/udev/ata_id
%{_prefix}/lib/udev/cdrom_id
%ifarch %{arm} aarch64 %{ix86} x86_64 ia64 mips
%ifarch %{arm} aarch64 %{ix86} x86_64 ia64 mips riscv64
# dmi_memory_id is only relevant on arches with DMI
%{_prefix}/lib/udev/dmi_memory_id
%endif
@@ -175,6 +176,7 @@
%{_prefix}/lib/udev/iocost
%{_prefix}/lib/udev/iocost.conf
%{_prefix}/lib/udev/mtd_probe
%{_prefix}/lib/udev/path_id_compat
%{_prefix}/lib/udev/scsi_id
%{_prefix}/lib/udev/udev.conf
%{_prefix}/lib/udev/v4l_id
@@ -268,6 +270,7 @@
%{_udevhwdbdir}/70-mouse.hwdb
%{_udevhwdbdir}/70-pda.hwdb
%{_udevhwdbdir}/70-pointingstick.hwdb
%{_udevhwdbdir}/70-software-radio.hwdb
%{_udevhwdbdir}/70-sound-card.hwdb
%{_udevhwdbdir}/70-touchpad.hwdb
%{_udevhwdbdir}/80-ieee1394-unit-function.hwdb
@@ -289,10 +292,11 @@
%{_udevrulesdir}/60-persistent-v4l.rules
%{_udevrulesdir}/60-sensor.rules
%{_udevrulesdir}/60-serial.rules
%{_udevrulesdir}/61-persistent-storage-compat.rules
%{_udevrulesdir}/64-btrfs.rules
%{_udevrulesdir}/70-camera.rules
%{_udevrulesdir}/70-joystick.rules
%ifarch %{arm} aarch64 %{ix86} x86_64 ia64 mips
%ifarch %{arm} aarch64 %{ix86} x86_64 ia64 mips riscv64
%{_udevrulesdir}/70-memory.rules
%endif
%{_udevrulesdir}/70-mouse.rules
@@ -343,6 +347,8 @@
%{_unitdir}/sysinit.target.wants/cryptsetup.target
%{_unitdir}/sysinit.target.wants/integritysetup.target
%{_unitdir}/sysinit.target.wants/kmod-static-nodes.service
%endif
%if %{with sd_boot}
%{_unitdir}/sysinit.target.wants/systemd-hibernate-clear.service
%endif
%{_unitdir}/sysinit.target.wants/systemd-hwdb-update.service
@@ -370,7 +376,7 @@
%{_unitdir}/systemd-fsck@.service
%{_unitdir}/systemd-growfs-root.service
%{_unitdir}/systemd-growfs@.service
%if %{without bootstrap}
%if %{with sd_boot}
%{_unitdir}/systemd-hibernate-clear.service
%endif
%{_unitdir}/systemd-hibernate-resume.service

View File

@@ -23,6 +23,7 @@
%{_systemd_util_dir}/boot/efi/systemd-boot*.efi
%{_systemd_util_dir}/systemd-bless-boot
%{_systemdgeneratordir}/systemd-bless-boot-generator
%{_tmpfilesdir}/20-systemd-stub.conf
%{_unitdir}/sysinit.target.wants/systemd-boot-random-seed.service
%{_unitdir}/systemd-bless-boot.service
%{_unitdir}/systemd-boot-random-seed.service

View File

@@ -4,215 +4,6 @@
# updated.
#
# /etc/sysconfig/console | /etc/vconsole.conf
# -------------------------+---------------------
# CONSOLE_FONT | FONT
# CONSOLE_SCREENMAP | FONT_MAP
# CONSOLE_UNICODEMAP | FONT_UNIMAP
migrate_locale () {
local migrated=""
if ! test -f /etc/sysconfig/console; then
return
fi
source /etc/sysconfig/console || return
if test -f /etc/vconsole.conf; then
source /etc/vconsole.conf || return
fi
if test -n "$CONSOLE_FONT" && test -z "$FONT"; then
echo "FONT=$CONSOLE_FONT" >>/etc/vconsole.conf
migrated+="CONSOLE_FONT "
fi
if test -n "$CONSOLE_SCREENMAP" && test -z "$FONT_MAP"; then
echo "FONT_MAP=$CONSOLE_SCREENMAP" >>/etc/vconsole.conf
migrated+="CONSOLE_SCREENMAP "
fi
if test -n "$CONSOLE_UNICODEMAP" && test -z "$FONT_UNIMAP"; then
echo "FONT_UNIMAP=$CONSOLE_UNICODEMAP" >>/etc/vconsole.conf
migrated+="CONSOLE_UNICODEMAP "
fi
if test -n "$migrated"; then
echo >&2 "The following variables from /etc/sysconfig/console have been migrated"
echo >&2 "into /etc/vconsole.conf:"
echo >&2
for v in $migrated; do echo " - $v=${!v}"; done
echo >&2
echo >&2 "Please edit /etc/vconsole.conf if you need to tune these settings"
echo >&2 "as /etc/sysconfig/console won't be considered anymore."
echo >&2
fi
}
# /etc/sysconfig/keyboard | /etc/vconsole.conf
# -------------------------+---------------------
# KEYTABLE | KEYMAP
migrate_keyboard () {
local migrated=""
if ! test -f /etc/sysconfig/keyboard; then
return
fi
source /etc/sysconfig/keyboard || return
if test -f /etc/vconsole.conf; then
source /etc/vconsole.conf || return
fi
if test -n "$KEYTABLE" && test -z "$KEYMAP"; then
echo "KEYMAP=$KEYTABLE" >>/etc/vconsole.conf
migrated+="KEYTABLE "
fi
if test -n "$migrated"; then
echo >&2 "The following variables from /etc/sysconfig/keyboard have been migrated"
echo >&2 "into /etc/vconsole.conf:"
echo >&2
for v in $migrated; do echo " - $v=${!v}"; done
echo >&2
echo >&2 "Please use localectl(1) if you need to tune these settings since"
echo >&2 "/etc/sysconfig/keyboard won't be considered anymore."
echo >&2
fi
}
# According to
# https://www.suse.com/documentation/sles-12/book_sle_admin/data/sec_suse_l10n.html,
# variables in /etc/sysconfig/language are supposed to be passed to the users'
# shell *only*. However it seems that there has been some confusion and they
# ended up configuring the system-wide locale as well. The logic followed by
# systemd was implemented in commit 01c4b6f4f0d951d17f6873f68156ecd7763429c6,
# which was reverted. The code below follows the same logic to migrate content
# of /etc/sysconfig/language into locale.conf.
migrate_language () {
local lang=
local migrated=false
if ! test -f /etc/sysconfig/language; then
return
fi
source /etc/sysconfig/language || return
lang=$(grep ^LANG= /etc/locale.conf 2>/dev/null)
lang=${lang#LANG=}
case "$ROOT_USES_LANG" in
yes)
if test -z "$lang" && test -n "$RC_LANG"; then
echo "LANG=$RC_LANG" >>/etc/locale.conf
migrated=true
fi
;;
ctype)
if ! grep -q ^LC_CTYPE= /etc/locale.conf 2>/dev/null; then
: ${lc_ctype:="$lang"}
: ${lc_ctype:="$RC_LC_CTYPE"}
: ${lc_ctype:="$RC_LANG"}
if test -n "$lc_ctype"; then
echo "LC_CTYPE=$lc_ctype" >>/etc/locale.conf
migrated=true
fi
fi
;;
esac
if $migrated; then
echo >&2 "The content of /etc/sysconfig/language has been migrated into"
echo >&2 "/etc/locale.conf. The former file is now only used for setting"
echo >&2 "the locale used by user's shells. The system-wide locale is"
echo >&2 "only read from /etc/locale.conf since now."
echo >&2
echo >&2 "Please only use localectl(1) or YaST if you need to change the"
echo >&2 "settings of the *system-wide* locale from now."
fi
}
#
# Migrate old i18n settings previously configured in /etc/sysconfig to the new
# locations used by systemd (/etc/locale.conf, /etc/vconsole.conf, ...). Recent
# versions of systemd parse the new locations only.
#
# This is needed both at package updates and package installations because we
# might be upgrading from a system which was running SysV init (systemd package
# is being installed).
#
# Note: run only once.
#
migrate_sysconfig_i18n() {
local tagfile=/var/lib/systemd/rpm/systemd-i18n_migrated
local -i rv=0
if [ -e $tagfile ]; then
return 0
fi
# The marker could have been incorrectly put in /usr/lib.
mv /usr/lib/systemd/scripts/.migrate-sysconfig-i18n.sh~done $tagfile &>/dev/null
# The tag files have been moved to /var/lib/systemd/rpm later.
mv /var/lib/systemd/i18n-migrated $tagfile &>/dev/null
if [ -e $tagfile ]; then
return 0
fi
touch $tagfile
migrate_locale; rv+=$?
migrate_keyboard; rv+=$?
migrate_language; rv+=$?
if [ $rv -gt 0 ]; then
echo >&2 "Failed to migrate i18n settings from /etc/sysconfig, ignoring."
fi
return $rv
}
#
# This function is supposed to be called from the %post section of the main
# package. It contains all the fixups needed when the system was running a
# version of systemd older than v210.
#
# All hacks can potentially break the admin settings since they work in /etc.
#
fix_pre_210() {
local tagfile=/var/lib/systemd/rpm/systemd-pre_210_fixed
if [ -e $tagfile ]; then
return 0
fi
touch $tagfile
#
# During migration from sysvinit to systemd, we used to set the systemd
# default target to one of the 'runlevel*.target' after reading the
# default runlevel from /etc/inittab. We don't do that anymore because
# in most cases using the graphical.target target, which is the default,
# will do the right thing. Moreover the runlevel targets are considered
# as deprecated, so we convert them into "true" systemd targets instead
# here.
#
if target=$(readlink /etc/systemd/system/default.target); then
target=$(basename $target)
case "$target" in
runlevel?.target)
echo "Default target is '$target' but use of runlevels is deprecated, converting"
systemctl --no-reload set-default $target
esac
fi
#
# Migrate any symlink which may refer to the old path (ie /lib/systemd).
#
for f in $(find /etc/systemd/system -type l -xtype l); do
new_target="/usr$(readlink $f)"
[ -f "$new_target" ] && ln -s -f "$new_target" "$f"
done
}
#
# /etc/machine-id might have been created writeable incorrectly (boo#1092269).
#
@@ -303,8 +94,6 @@ EOF
r=0
fix_machine_id_perms || r=1
fix_pre_210 || r=1
migrate_sysconfig_i18n || r=1
fix_bsc_1020601 || r=1
fix_issue_11329 || r=1
drop_after_local_support || r=1

BIN
systemd-257.7+suse.19.ga0dfd5de4c.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -12,77 +12,118 @@ shift
command -v systemctl >/dev/null || exit 0
case "$command" in
mark-install-system-units)
mkdir -p /run/systemd/rpm/needs-preset
UPDATE_HELPER_USER_TIMEOUT_SEC=15
do_mark_install_units() {
mode=$1
shift
mkdir -p /run/systemd/rpm/$mode/{needs-preset,dont-disable}
for unit in "$@" ; do
if [ ! -e /usr/lib/systemd/system/"$unit" ]; then
touch /run/systemd/rpm/needs-preset/"$unit"
fi
done
;;
# Clean any leftovers that might remain from a previous transaction
# which exited abnormally.
rm -f /run/systemd/rpm/$mode/*/"$unit"
install-system-units)
if [ ! -e /usr/lib/systemd/$mode/"$unit" ]; then
# The unit is being introduced: remember we need to apply preset on
# this new unit regardless of whether it's a package update or
# installation.
touch /run/systemd/rpm/$mode/needs-preset/"$unit"
fi
# All passed units are part of a package being installed or updated and
# therefore should not be disabled by the removal of a different package
# part of the same rpm transaction. This can happen when the package
# shipping the unit is being renamed (e.g. from "A" to "B"), where "A"
# is installed first, followed by the removal "B". In that case, "B" is
# removed and its %preun scriptlet runs %systemd_preun on the unit.
touch /run/systemd/rpm/$mode/dont-disable/"$unit"
done
}
do_install_units() {
mode=$1
shift
units=()
for unit in "$@" ; do
if [ -e /run/systemd/rpm/needs-preset/"$unit" ]; then
rm /run/systemd/rpm/needs-preset/"$unit"
if [ -e /run/systemd/rpm/$mode/needs-preset/"$unit" ]; then
units+=("$unit")
fi
done
[ ${#units[*]} -gt 0 ] &&
systemctl --no-reload preset "${units[@]}"
;;
[ ${#units[*]} -gt 0 ] && {
case $mode in
system)
systemctl --no-reload preset "${units[@]}" ;;
user)
systemctl --no-reload preset --global "${units[@]}" ;;
esac
}
}
mark-install-user-units)
mkdir -p /run/systemd/rpm/needs-user-preset
for unit in "$@" ; do
if [ ! -e /usr/lib/systemd/user/"$unit" ]; then
touch /run/systemd/rpm/needs-user-preset/"$unit"
fi
done
;;
install-user-units)
do_remove_units() {
mode=$1
shift
units=()
for unit in "$@" ; do
if [ -e /run/systemd/rpm/needs-user-preset/"$unit" ]; then
rm /run/systemd/rpm/needs-user-preset/"$unit"
if [ ! -e /run/systemd/rpm/$mode/dont-disable/"$unit" ]; then
units+=("$unit")
fi
done
[ ${#units[*]} -gt 0 ] &&
systemctl --no-reload preset --global "$@" || :
;;
[ ${#units[*]} -eq 0 ] && return
remove-system-units)
case $mode in
system)
if [ -d /run/systemd/system ]; then
systemctl --no-reload disable --now --no-warn "$@"
systemctl --no-reload disable --now --no-warn "${units[@]}"
else
systemctl --no-reload disable --no-warn "$@"
systemctl --no-reload disable --no-warn "${units[@]}"
fi
;;
user)
systemctl --global disable --no-warn "${units[@]}"
remove-user-units)
systemctl --global disable --no-warn "$@"
[ -d /run/systemd/system ] || exit 0
[ -d /run/systemd/system ] || return
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
for user in $users; do
SYSTEMD_BUS_TIMEOUT=15s \
systemctl --user -M "$user@" disable --now --no-warn "$@" &
SYSTEMD_BUS_TIMEOUT=${UPDATE_HELPER_USER_TIMEOUT_SEC}s \
systemctl --user -M "$user@" disable --now --no-warn "${units[@]}" &
done
wait
;;
esac
}
mark-restart-system-units)
case "$command" in
mark-install-system-units) # called from %pre (on install or upgrade)
do_mark_install_units system "$@"
;;
mark-install-user-units)
do_mark_install_units user "$@"
;;
install-system-units) # called from %post (on install or upgrade)
do_install_units system "$@"
;;
install-user-units)
do_install_units user "$@"
;;
remove-system-units) # called from %preun (on removal)
do_remove_units system "$@"
;;
remove-user-units)
do_remove_units user "$@"
;;
mark-restart-system-units) # called from %postun (on upgrade)
[ -d /run/systemd/system ] || exit 0
for unit in "$@"; do
@@ -97,19 +138,23 @@ case "$command" in
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
for user in $users; do
for unit in "$@"; do
SYSTEMD_BUS_TIMEOUT=15s \
SYSTEMD_BUS_TIMEOUT=${UPDATE_HELPER_USER_TIMEOUT_SEC}s \
systemctl --user -M "$user@" set-property "$unit" Markers=+needs-restart &
done
done
wait
;;
system-reload-restart|system-reload|system-restart)
system-reload-restart|system-reload|system-restart) # called from %transfiletriggerin
if [ -n "$*" ]; then
echo >&2 "Unexpected arguments for '$command': $*"
exit 2
fi
# Clean up all flags created during executions of %pre (i.e. on
# install/upgrade/rename) at the very end of the transaction.
rm -fr /run/systemd/rpm/system
[ -d /run/systemd/system ] || exit 0
if [[ "$command" =~ reload ]]; then
@@ -121,50 +166,37 @@ case "$command" in
fi
;;
user-reexec)
user-reload-restart|user-reload|user-restart|user-reexec) # called from %transfiletriggerin
if [ -n "$*" ]; then
echo >&2 "Unexpected arguments for '$command': $*"
exit 2
fi
[ -d /run/systemd/system ] || exit 0
# Reexecute user manager instances (if any). It is asynchronous but it
# shouldn't be a problem in practice because systemd main package is not
# shipping any user services currently. A problem would arise only if a
# new version of a user service relied on an option that would be only
# understood by the latest version of the user manager and the user unit
# would be restarted before the user manager get reexecuted.
systemctl kill --kill-who=main --signal=SIGRTMIN+25 "user@*.service"
;;
user-reload-restart|user-reload|user-restart)
if [ -n "$*" ]; then
echo >&2 "Unexpected arguments for '$command': $*"
exit 2
fi
# Clean up all flags created during executions of %pre (i.e. on
# install/upgrade/rename) at the very end of the transaction.
rm -fr /run/systemd/rpm/user
[ -d /run/systemd/system ] || exit 0
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
if [[ "$command" =~ reload ]]; then
for user in $users; do
SYSTEMD_BUS_TIMEOUT=15s \
systemctl --user -M "$user@" daemon-reload &
done
wait
if [[ "$command" =~ reexec|reload ]]; then
SYSTEMD_BUS_TIMEOUT=${UPDATE_HELPER_USER_TIMEOUT_SEC}s systemctl reload "user@*.service"
fi
if [[ "$command" =~ restart ]]; then
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
for user in $users; do
SYSTEMD_BUS_TIMEOUT=15s \
SYSTEMD_BUS_TIMEOUT=${UPDATE_HELPER_USER_TIMEOUT_SEC}s \
systemctl --user -M "$user@" reload-or-restart --marked &
done
wait
fi
;;
clean-state)
# Not used anymore, to be removed
;;
*)
echo >&2 "Unknown verb '$command'"
exit 3

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9918938a00543b868d243937852b6997b8f7b695df0116c59525db97c1ea7653
size 11235560

View File

@@ -1,3 +1,331 @@
-------------------------------------------------------------------
Thu Jul 31 14:32:25 UTC 2025 - Franck Bui <fbui@suse.com>
- Remove the script used to help migrating the language and locale settings
located in /etc/sysconfig/language on old systems to the systemd default
locations (bsc#1247074)
The script was introduced more than 7 years ago and all systems running TW
should have been migrated since then. Moreover the installer supports the
systemd default locations since approximately SLE15.
-------------------------------------------------------------------
Tue Jul 15 17:44:09 UTC 2025 - Franck Bui <fbui@suse.com>
- systemd-update-helper: fix regression introduced when support for package
renaming/splitting was added (bsc#1245551)
The cleanup of the flags in /run/systemd/rpm was previously handled in the
%pretrans/%posttrans sections of the systemd main package. However, this
method was ineffective if systemd was not part of the transaction. The cleanup
is now run in %transfiletriggerin instead.
-------------------------------------------------------------------
Fri Jul 4 12:50:39 UTC 2025 - Franck Bui <fbui@suse.com>
- triggers.systemd: skip update of hwdb, journal-catalog if executed during an
offline update.
-------------------------------------------------------------------
Tue Jul 1 10:31:41 UTC 2025 - Franck Bui <fbui@suse.com>
- Import commit a0dfd5de4cdc3f97ef2ad23396904f3e20769317 (merge of v257.7)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/1e42ecf5a145589954df77da05937ee69619f3e5...a0dfd5de4cdc3f97ef2ad23396904f3e20769317
-------------------------------------------------------------------
Thu Jun 19 15:36:28 UTC 2025 - Franck Bui <fbui@suse.com>
- Import commit 1e42ecf5a145589954df77da05937ee69619f3e5
1e42ecf5a1 firstboot: make sure labelling is enabled
3bdb2efbe0 tmpfiles: fix symlink creation when replacing
61c228d2cc firstboot: use WRITE_STRING_FILE_LABEL more
f5148acf37 env-file: port write_env_file() to label_ops_pre()
bbff8b5523 fs-util: replace symlink_atomic_full_label() by a flag to symlinkat_atomic_full() (bsc#1244237)
2b39393efa env-file: rework write_env_file() to make use of O_TMPFILE
-------------------------------------------------------------------
Mon Jun 2 08:17:20 UTC 2025 - Franck Bui <fbui@suse.com>
- Import commit c929295b4c1fb3cd6b9963bc7588fbc3e597ab86 (merge of v257.6)
This merge includes the following fix:
c58a8a6ec9 coredump: use %d in kernel core pattern (bsc#1243935 CVE-2025-4598)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/8e9840a2897e36ae3f926f8d10a2b0d7e4102c67...c929295b4c1fb3cd6b9963bc7588fbc3e597ab86
-------------------------------------------------------------------
Fri May 16 11:06:10 UTC 2025 - Franck Bui <fbui@suse.com>
- Import commit 8e9840a2897e36ae3f926f8d10a2b0d7e4102c67 (bsc#1243280)
8e9840a289 bless-boot: never try to rename an entry file onto itself
5b5cde8866 bless-boot: in "status" output report bad state from prev boot as "dirty"
49949fa9fb bless-boot: switch from last_path_component() to path_find_last_component()
-------------------------------------------------------------------
Thu May 15 12:04:47 UTC 2025 - Fabian Vogt <fvogt@suse.com>
- systemd-update-helper: Fix invalid use of "break" in case statement
-------------------------------------------------------------------
Fri May 9 14:38:03 UTC 2025 - Franck Bui <fbui@suse.com>
- Add 1002-udev-persistent-net-rules-support.patch (bsc#1241190)
This re-adds back the support for persistent net name rule. This is needed to
support upgrades from older systems relying on persistent net rules.
-------------------------------------------------------------------
Fri May 9 14:06:08 UTC 2025 - Franck Bui <fbui@suse.com>
- systemd-update-helper: do not stop or disable services when they are migrated
to other packages. This can occur during package renaming or splitting.
-------------------------------------------------------------------
Fri May 9 14:00:17 UTC 2025 - Franck Bui <fbui@suse.com>
- Add 1001-journal-again-create-user-journals-for-users-with-hi.patch (bsc#1242938)
Don't write messages sent from users with UID falling into the container UID
range to the system journal. Daemons in the container don't talk to the
outside journald as they talk to the inner one directly, which does its
journal splitting based on shifted uids.
-------------------------------------------------------------------
Wed Apr 16 14:21:26 UTC 2025 - Franck Bui <fbui@suse.com>
- Split systemd-network into two new sub-packages: systemd-networkd and
systemd-resolved (bsc#1224386 jsc#PED-12669)
-------------------------------------------------------------------
Thu Apr 10 13:07:55 UTC 2025 - Franck Bui <fbui@suse.com>
- Import commit c10a66fb4dd34b86d42fa92501bd88db63df479a (merge of v257.5)
This merge includes the following fix:
9b52c10986 test-network: replace symlink to 99-default.link with a copy
d7577221b8 man/pstore.conf: pstore.conf template is not always installed in /etc
62071a984d man: coredump.conf template is not always installed in /etc (bsc#1237496)
18dde3dd2a umount: do not move busy network mounts (bsc#1236177)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/f133e5974e69708d7491d4823780690c913f7bda...c10a66fb4dd34b86d42fa92501bd88db63df479a
-------------------------------------------------------------------
Mon Mar 17 10:52:55 UTC 2025 - Franck Bui <fbui@suse.com>
- Maintain the network device naming scheme used on SLE15 (jsc#PED-12317)
-------------------------------------------------------------------
Thu Mar 13 13:24:50 UTC 2025 - Franck Bui <fbui@suse.com>
- triggers.systemd: more posix.fork() conversion (bsc#1238566)
-------------------------------------------------------------------
Wed Mar 12 17:46:55 UTC 2025 - Franck Bui <fbui@suse.com>
- Import commit f133e5974e69708d7491d4823780690c913f7bda (merge of v257.4)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/e03ffd74c4a30c1c75e05874ce18d31e503437b7...f133e5974e69708d7491d4823780690c913f7bda
-------------------------------------------------------------------
Fri Feb 14 15:05:52 UTC 2025 - Franck Bui <fbui@suse.com>
- Import commit e03ffd74c4a30c1c75e05874ce18d31e503437b7 (merge of v257.3)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/47794646786ae4ddb6d3deb2030e2761447999ec...e03ffd74c4a30c1c75e05874ce18d31e503437b7
-------------------------------------------------------------------
Fri Feb 14 13:38:22 UTC 2025 - Franck Bui <fbui@suse.com>
- Import commit 47794646786ae4ddb6d3deb2030e2761447999ec
4779464678 import-pubring.gpg: add openSUSE build key (bsc#1236751)
2c8382881f systemd-pull: support .asc and .sha256.* signature (bsc#1236887)
-------------------------------------------------------------------
Thu Feb 6 08:20:18 UTC 2025 - Franck Bui <fbui@suse.com>
- triggers.systemd: convert posix.fork() and posix.exec() to rpm.execute() (bsc#1236741)
-------------------------------------------------------------------
Thu Feb 6 08:15:34 UTC 2025 - Franck Bui <fbui@suse.com>
- Update 0009-pid1-handle-console-specificities-weirdness-for-s390.patch to not
warn when "conmode=" is not specified on s390x (bsc#1236725).
-------------------------------------------------------------------
Tue Feb 4 09:01:53 UTC 2025 - Franck Bui <fbui@suse.com>
- Move systemd-userwork from the experimental sub-package to the main package (bsc#1236643)
It is likely an oversight from when systemd-userdb was migrated from the
experimental package to the main one.
-------------------------------------------------------------------
Wed Jan 29 16:48:05 UTC 2025 - Franck Bui <fbui@suse.com>
- Port path_id_compat to the sd_device API
-------------------------------------------------------------------
Thu Jan 9 10:37:48 UTC 2025 - Franck Bui <fbui@suse.com>
- Upgrade systemd with systemd v257.2 from Base:System (revision:1574)
- Rename 0001-udev-restore-some-legacy-symlinks-to-maintain-backwa.patch into
0003-udev-restore-some-legacy-symlinks-to-maintain-backwa.patch
Given that SLE16 will be based on SLFO, we have no choice but to continue
supporting these compat symlinks. This compatibility code is no longer
maintained in the Git repository though, as we primarily backport upstream
commits these days. Additionally, the compat code rarely changes and often
causes conflicts when merged into recent versions of systemd.
- Drop 5003-99-systemd.rules-rework-SYSTEMD_READY-logic-for-devi.patch, it's
part of systemd v256.
- Drop 5004-udev-allow-denylist-for-reading-sysfs-attributes-whe.patch, it's
part of systemd v256.
-------------------------------------------------------------------
Wed Jan 8 16:43:48 UTC 2025 - Franck Bui <fbui@suse.com>
- Import commit 7fa3b5018bfffa176c77a2a5794dce792eebadcb (merge of v257.2)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/47eea9ee9f46537bc18d6a64fa21fd9c50538e13...7fa3b5018bfffa176c77a2a5794dce792eebadcb
-------------------------------------------------------------------
Thu Dec 26 11:15:21 UTC 2024 - Franck Bui <fbui@suse.com>
- systemd-update-helper: backport commit 2d0af8bc354f4a1429ce
Since user@.service has `Type=notify-reload` (making the reloading process
synchronous) and reloading implies reexecuting with `ReloadSignal=RTMIN+25`,
reexecuting user managers synchronously can be achieved with `systemctl reload
user@*.service" now.
-------------------------------------------------------------------
Thu Dec 26 10:07:33 UTC 2024 - Franck Bui <fbui@suse.com>
- Upgrade to v257.1 (commit 47eea9ee9f46537bc18d6a64fa21fd9c50538e13)
See https://github.com/openSUSE/systemd/blob/SUSE/v257/NEWS for details.
- This upgrade includes the following bug fixes:
- commit 9258e27f4a1ddf2834d0cadd66770ad65e55e066 (boo#1233752, bsc#1234313)
- commit 423de11f046cc2c9b6904e4eff71d6a48cd661c9 (boo#1233752, bsc#1234313)
- commit 2ae79a31b7c7947e2c16e18eb85ac5607ebc40b6 (bsc#1232844)
- Drop 5006-tpm2-util-Also-retry-unsealing-after-policy_pcr-retu.patch and
5005-Revert-boot-Make-initrd_prepare-semantically-equival.patch
These two patches have bee merged upstream and are included in v257.1, see
above.
- Our testsuite sub-package has been broken by upstream after they decided to
remove the bash test runner, see https://github.com/systemd/systemd/pull/34271
for details. For running the testsuite, the systemd git repository has to be
cloned for now. We'll try to adapt the testsuite sub-package these changes.
-------------------------------------------------------------------
Sun Dec 22 17:31:07 UTC 2024 - Franck Bui <fbui@suse.com>
- Import commit f962392e1e0d5683a2adebf09698b5fda02f9cfc (merge of v256.10)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/290170c8550bf2de4b5085ecdf7f056769944444...f962392e1e0d5683a2adebf09698b5fda02f9cfc
-------------------------------------------------------------------
Mon Dec 16 18:11:24 UTC 2024 - Fabian Vogt <fvogt@suse.com>
- Add 5006-tpm2-util-Also-retry-unsealing-after-policy_pcr-retu.patch
Backport of https://github.com/systemd/systemd/pull/35657, which fixes
https://github.com/systemd/systemd/issues/35490 (boo#1233752, bsc#1234313).
-------------------------------------------------------------------
Tue Dec 3 14:27:15 UTC 2024 - Franck Bui <fbui@suse.com>
- Add 5005-Revert-boot-Make-initrd_prepare-semantically-equival.patch
Revert commit d64193a2a652b15db9cb9ed10c6b77a17ca46cd2 until the regression it
caused, reported at https://github.com/systemd/systemd/issues/35439, is fixed
(see also bsc#1233752 for its downstream counterpart).
-------------------------------------------------------------------
Tue Dec 3 09:39:39 UTC 2024 - Franck Bui <fbui@suse.com>
- Disable EFI support on architectures that are not EFI-compliant
-------------------------------------------------------------------
Tue Dec 3 08:52:48 UTC 2024 - Franck Bui <fbui@suse.com>
- Import commit 290170c8550bf2de4b5085ecdf7f056769944444 (merge of v256.9)
This merge includes the following fix:
cf7b3cc182 pid1: make clear that $WATCHDOG_USEC is set for the shutdown binary, noone else (bsc#1232227)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/c7671762b39ead7f8f9e70064256f5efaccedeca...290170c8550bf2de4b5085ecdf7f056769944444
-------------------------------------------------------------------
Mon Nov 4 10:18:04 UTC 2024 - Franck Bui <fbui@suse.com>
- Import commit aee28e4c20a053ea27f8be69f2ea981e43bcb0b6
aee28e4c20 udev-builtin-path_id: SAS wide ports must have num_phys > 1 (bsc#1231610)
280989cfa4 core: when switching root remove /run/systemd before executing the binary specified by init= (bsc#1227580)
- Drop 5003-core-when-switching-root-remove-run-systemd-before-e.patch, this
patch has been integrated in branch 'SUSE/v256', see above.
-------------------------------------------------------------------
Tue Oct 8 16:21:49 UTC 2024 - Franck Bui <fbui@suse.com>
- Import commit c7671762b39ead7f8f9e70064256f5efaccedeca (merge of v256.7)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/8a0ae4d90aff1d067a125ff9366eafc7dd5d4701...c7671762b39ead7f8f9e70064256f5efaccedeca
-------------------------------------------------------------------
Wed Oct 2 12:03:48 UTC 2024 - Franck Bui <fbui@suse.com>
- Clean up some remnants from when homed was in the experimental sub-package (bsc#1231048)
-------------------------------------------------------------------
Wed Sep 18 09:31:40 UTC 2024 - Franck Bui <fbui@suse.com>
- Import commit 8a0ae4d90aff1d067a125ff9366eafc7dd5d4701 (merge of v256.6)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/bef0958f4db1b774c23505e93537ffe16f1b3894...8a0ae4d90aff1d067a125ff9366eafc7dd5d4701
-------------------------------------------------------------------
Tue Aug 27 08:04:14 UTC 2024 - Franck Bui <fbui@suse.com>
- Don't try to restart the udev socket units anymore (bsc#1228809)
There's currently no way to restart a socket activable service and its socket
units "atomically" and safely.
-------------------------------------------------------------------
Mon Aug 26 10:51:51 UTC 2024 - Franck Bui <fbui@suse.com>
- Move 80-container-host0.network back to the network sub-package (bsc#1229098)
Rev 428 mistakenly moved it to the container sub-package.
-------------------------------------------------------------------
Mon Aug 19 15:00:19 UTC 2024 - Franck Bui <fbui@suse.com>
@@ -85,6 +413,13 @@ Thu Jul 4 09:07:28 UTC 2024 - Franck Bui <fbui@suse.com>
See https://github.com/openSUSE/systemd/blob/SUSE/v256/NEWS for details.
- This includes the following bug fixes:
- commit 3b2e7dc5a285edbbb1bf6aed2d88b889d801613f (bsc#1234015)
- commit c072860593329293e19580b337504adb52248462 (bsc#1229518)
- commit cfbf7538d87023840c5574fa5b0452e5b0f42149 (bsc#1229228)
- commit 3c85d3fda50f71755aa276cfa60807c315bfc04b (bsc#1236886)
- Added pam.systemd-run0
-------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,12 +26,12 @@
%define systemd_release %{?release_override}%{!?release_override:0}
%define archive_version %{nil}
%else
%define systemd_version 256.5
%define systemd_version 257.7
%define systemd_release 0
%define archive_version +suse.7.gbef0958f4d
%define archive_version +suse.19.ga0dfd5de4c
%endif
%define systemd_major %{sub %systemd_version 1 3}
%define systemd_major 257
%define _testsuitedir %{_systemd_util_dir}/tests
%define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit
@@ -182,7 +182,7 @@ Provides: systemd-analyze = %{version}-%{release}
Obsoletes: pm-utils <= 1.4.1
Obsoletes: suspend <= 1.0
Obsoletes: systemd-analyze < 201
Source0: systemd-v%{version}%{archive_version}.tar.xz
Source0: systemd-%{version}%{archive_version}.tar.xz
Source1: systemd-rpmlintrc
Source3: systemd-update-helper
%if %{with sysvcompat}
@@ -201,11 +201,12 @@ Source101: fixlet-systemd-post.sh
Source200: files.systemd
Source201: files.udev
Source202: files.container
Source203: files.network
Source203: files.networkd
Source204: files.devel
Source205: files.sysvcompat
Source206: files.uefi-boot
Source207: files.experimental
Source208: files.resolved
Source209: files.homed
Source210: files.lang
Source211: files.journal-remote
@@ -216,29 +217,37 @@ Source213: files.devel-doc
# All changes backported from upstream are tracked by the git repository, which
# can be found at: https://github.com/openSUSE/systemd.
#
# Patches listed below are openSUSE specific ones and should be kept at its
# minimum. We try hard to push our changes to upstream but sometimes they are
# only relevant for SUSE distros. Special rewards for those who will manage to
# get rid of one of them !
# The patches listed below are specific to openSUSE and should be kept to a
# minimum. We strive to push our changes upstream, but sometimes they are only
# relevant for SUSE distributions. Special rewards for those who manage to
# eliminate any of them!
#
# Upstream CI builds run from latest upstream main, and as such patches will not
# apply due to fuzz, so skip all of them. Ensure all patches are always listed
# inside the following if block.
#
%if %{without upstream}
Patch: 0001-Drop-support-for-efivar-SystemdOptions.patch
Patch: 0003-udev-restore-some-legacy-symlinks-to-maintain-backwa.patch
%if %{with sysvcompat}
Patch: 0002-rc-local-fix-ordering-startup-for-etc-init.d-boot.lo.patch
Patch: 0008-sysv-generator-translate-Required-Start-into-a-Wants.patch
%endif
%if %{without upstream}
Patch: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch
# Patches listed below are put in quarantine. Normally all changes must go to
# upstream first and then are cherry-picked in the SUSE git repository. But for
# very few cases, some stuff might be broken in upstream and need to be fixed or
# worked around quickly. In these cases, the patches are added temporarily and
# will be removed as soon as a proper fix will be merged by upstream.
# Patches listed below are SLE specific.
Patch: 1001-journal-again-create-user-journals-for-users-with-hi.patch
Patch: 1002-udev-persistent-net-rules-support.patch
# The patches listed below are in quarantine. Normally, all changes must be
# pushed to upstream first and then cherry-picked into the SUSE git
# repository. However, in few cases, some issues might take too much time to be
# solved by upstream. In these cases, these patches are temporarily added here
# and will be removed as soon as a proper fix is merged by upstream.
Patch: 5001-Revert-udev-update-devlink-with-the-newer-device-nod.patch
Patch: 5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch
Patch: 5004-disable-session-freeze.patch
%endif
Patch: 5003-core-when-switching-root-remove-run-systemd-before-e.patch
%description
Systemd is a system and service manager, compatible with SysV and LSB
@@ -471,9 +480,32 @@ UID/GIDs ranges used by containers to useful names.
To activate this NSS module, you will need to include it in /etc/nsswitch.conf,
see nss-mymachines(8) manpage for more details.
%if %{with networkd} || %{with resolved}
%package network
Summary: Systemd Network And Network Name Resolution Managers
%if %{with networkd}
%package networkd
Summary: Systemd Network Manager
License: LGPL-2.1-or-later
Requires: %{name} = %{version}-%{release}
%systemd_requires
Obsoletes: systemd-network < %{version}-%{release}
Provides: systemd-network = %{version}-%{release}
Provides: systemd-network:/usr/lib/systemd/systemd-networkd
# Workaround for bsc#1241513: ensure systemd-resolved is always installed before
# systemd-network when the latter is replaced by both systemd-resolved and
# systemd-networkd. The systemd-update-helper script logic depends on that.
Suggests: systemd-resolved
%description networkd
systemd-networkd is a system service that manages networks. It detects and
configures network devices as they appear, as well as manages network addresses
and routes for any link for which it finds a .network file, see
systemd.network(5). It can also create virtual network devices based on their
description given by systemd.netdev(5) files. It may be controlle by
networkctl(1).
%endif
%if %{with resolved}
%package resolved
Summary: Systemd Network Name Resolution Manager
License: LGPL-2.1-or-later
Requires: %{name} = %{version}-%{release}
%systemd_requires
@@ -483,17 +515,9 @@ BuildRequires: pkgconfig(libidn2)
BuildRequires: pkgconfig(openssl)
Obsoletes: nss-resolve < %{version}-%{release}
Provides: nss-resolve = %{version}-%{release}
Provides: systemd:/usr/lib/systemd/systemd-networkd
Provides: systemd:/usr/lib/systemd/systemd-resolved
%description network
systemd-networkd is a system service that manages networks. It detects and
configures network devices as they appear, as well as manages network addresses
and routes for any link for which it finds a .network file, see
systemd.network(5). It can also create virtual network devices based on their
description given by systemd.netdev(5) files. It may be controlle by
networkctl(1).
Provides: systemd-network:/usr/lib/systemd/systemd-resolved
%description resolved
systemd-resolved is a system service that provides network name resolution to
local applications. It implements a caching and validating DNS/DNSSEC stub
resolver, as well as an LLMNR and MulticastDNS resolver and responder. It may be
@@ -615,7 +639,6 @@ Requires: libcap-progs
Requires: lz4
Requires: make
Requires: mtools
Requires: netcat
Requires: python3-pexpect
Requires: qemu
Requires: quota
@@ -659,7 +682,7 @@ Requires: systemd-homed
Requires: systemd-journal-remote
%endif
%if %{with networkd}
Requires: systemd-network
Requires: systemd-networkd
%endif
%if %{with portabled}
Requires: systemd-portable
@@ -684,7 +707,7 @@ Or to run one specific integration test:
$ NO_BUILD=1 TEST_NESTED_VM=1 make -C %{_testsuitedir}/integration-tests/TEST-01-BASIC clean setup run
For more details on the available options to run the extended testsuite, please
refer to %{_testsuitedir}/integration-tests/README.testsuite.
refer to %{_testsuitedir}/integration-tests/README.md.
%endif
%if %{with experimental}
@@ -728,7 +751,7 @@ for the C APIs.
%endif
%prep
%autosetup -p1 -n systemd-v%{version}%{archive_version}
%autosetup -p1 -n systemd-%{version}%{archive_version}
%build
%meson \
@@ -746,8 +769,11 @@ for the C APIs.
-Dutmp=false \
-Ddefault-hierarchy=unified \
-Ddefault-kill-user-processes=false \
-Dextra-net-naming-schemes=sle15-sp3=v238+bridge_no_slot,sle15-sp4=sle15-sp3+slot_function_id+16bit_index \
-Ddefault-net-naming-scheme=sle15-sp4 \
-Dpamconfdir=no \
-Dpamlibdir=%{_pam_moduledir} \
-Dshellprofiledir=%{_distconfdir}/profile.d \
-Dxinitrcdir=%{xinitconfdir}/xinitrc.d \
-Drpmmacrosdir=no \
-Dcertificate-root=%{_sysconfdir}/pki/systemd \
@@ -782,7 +808,6 @@ for the C APIs.
-Daudit=%{disabled_with bootstrap} \
-Dbpf-framework=%{disabled_with bootstrap} \
-Dbzip2=%{enabled_with importd} \
-Defi=%{when_not bootstrap} \
-Delfutils=%{disabled_with bootstrap} \
-Dfdisk=%{disabled_with bootstrap} \
-Dgcrypt=%{disabled_with bootstrap} \
@@ -834,6 +859,7 @@ for the C APIs.
-Dselinux=%{enabled_with selinux} \
\
-Dbootloader=%{enabled_with sd_boot} \
-Defi=%{when sd_boot} \
-Defi-color-highlight="black,green" \
\
-Dsbat-distro="%{?sbat_distro}" \
@@ -1051,15 +1077,12 @@ cat %{SOURCE14} >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map
# -Dinstall_test took care of installing the unit tests only (those in
# src/tests) and testdata directory. Here we copy the integration tests
# including also all related scripts used to prepare and run the integration
# tests in dedicated VMs. During the copy, all symlinks are replaced by the
# files they point to making sure we won't try to embed dangling symlinks.
# tests in a dedicated VMs.
mkdir -p %{buildroot}%{_testsuitedir}/integration-tests
tar -cO \
--dereference \
--exclude=testdata \
--exclude-vcs \
--exclude-vcs-ignores \
-C test/ . | tar -xC %{buildroot}%{_testsuitedir}/integration-tests
-C test/integration-tests/ . | tar -xC %{buildroot}%{_testsuitedir}/integration-tests/
%endif
%if %{without bootstrap}
@@ -1150,8 +1173,6 @@ journalctl --update-catalog || :
%systemd_postun_with_restart systemd-userdbd.service
%pre -n udev%{?mini}
# Units listed below can be enabled at installation accoding to their preset
# setting.
%systemd_pre remote-cryptsetup.target
%systemd_pre systemd-pstore.service
%systemd_pre systemd-timesyncd.service
@@ -1182,22 +1203,8 @@ fi
%postun -n udev%{?mini}
%regenerate_initrd_post
# The order of the units being restarted is important here because there's
# currently no way to queue multiple jobs into a single transaction
# atomically. Therefore systemctl will create 3 restart jobs that can be handled
# by PID1 separately and if the jobs for the sockets are being handled first
# then starting them again will fail as the service is still active hence the
# sockets held by udevd. However if the restart job for udevd is handled first,
# there should be enough time to queue the socket jobs before the stop job for
# udevd is processed. Hence PID1 will automatically sort the restart jobs
# correctly by stopping the service then the sockets and then by starting the
# sockets and the unit.
#
# Note that when systemd-udevd is restarted, there will always be a short time
# frame where no socket will be listening to the events sent by the kernel, no
# matter if the socket unit is restarted in first or not.
%systemd_postun_with_restart systemd-udevd.service systemd-udevd-{control,kernel}.socket
# Restarting udev socket units along with udevd is not safe (bsc#1228809).
%systemd_postun_with_restart systemd-udevd.service
%systemd_postun_with_restart systemd-timesyncd.service
%systemd_postun systemd-pstore.service
@@ -1267,53 +1274,47 @@ fi
%systemd_postun_with_restart systemd-journal-upload.service
%endif
%if %{with networkd} || %{with resolved}
%pre network
%if %{with networkd}
%pre networkd
%systemd_pre systemd-networkd.service
%systemd_pre systemd-networkd-wait-online.service
%endif
%if %{with resolved}
%systemd_pre systemd-resolved.service
%endif
%post network
%if %{with networkd}
%post networkd
%if %{without filetriggers}
%sysusers_create systemd-network.conf
%tmpfiles_create systemd-network.conf
%endif
%systemd_post systemd-networkd.service
%systemd_post systemd-networkd-wait-online.service
%preun networkd
%systemd_preun systemd-networkd.service
%systemd_preun systemd-networkd-wait-online.service
%postun networkd
%systemd_postun systemd-networkd.service
%systemd_postun systemd-networkd-wait-online.service
%endif
%if %{with resolved}
%pre resolved
%systemd_pre systemd-resolved.service
%post resolved
%ldconfig
%if %{without filetriggers}
%sysusers_create systemd-resolve.conf
%tmpfiles_create systemd-resolve.conf
%endif
%systemd_post systemd-resolved.service
%endif
%preun network
%if %{with networkd}
%systemd_preun systemd-networkd.service
%systemd_preun systemd-networkd-wait-online.service
%endif
%if %{with resolved}
%preun resolved
%systemd_preun systemd-resolved.service
%endif
%postun network
%if %{with networkd}
%systemd_postun systemd-networkd.service
%systemd_postun systemd-networkd-wait-online.service
%endif
%if %{with resolved}
%postun resolved
%ldconfig
%systemd_postun systemd-resolved.service
%endif
%endif
%if %{with homed}
%pre homed
@@ -1354,22 +1355,18 @@ fi
%if %{with experimental}
%pre experimental
%systemd_pre systemd-homed.service
%systemd_pre systemd-oomd.service systemd-oomd.socket
%post experimental
%if %{without filetriggers}
%sysusers_create systemd-oom.conf
%endif
%systemd_post systemd-homed.service
%systemd_post systemd-oomd.service systemd-oomd.socket
%preun experimental
%systemd_preun systemd-homed.service
%systemd_preun systemd-oomd.service systemd-oomd.socket
%postun experimental
%systemd_postun systemd-homed.service
%systemd_postun systemd-oomd.service systemd-oomd.socket
%endif
@@ -1392,11 +1389,16 @@ fi
%files container
%include %{SOURCE202}
%if %{with networkd} || %{with resolved}
%files network
%if %{with networkd}
%files networkd
%include %{SOURCE203}
%endif
%if %{with resolved}
%files resolved
%include %{SOURCE208}
%endif
%files devel
%license LICENSE.LGPL2.1
%include %{SOURCE204}
@@ -1442,7 +1444,7 @@ fi
%if %{with testsuite}
%files testsuite
%doc %{_testsuitedir}/integration-tests/README.testsuite
%doc %{_testsuitedir}/integration-tests/README.md
%{_testsuitedir}
%endif

View File

@@ -6,27 +6,17 @@
# The contents of this are an example to be copied into systemd.spec.
#
# Minimum rpm version supported: 4.14.0
# Minimum rpm version supported: 4.15.0
%transfiletriggerin -P 900900 -p <lua> -- /usr/lib/systemd/system /etc/systemd/system
-- This script will run after any package is initially installed or
-- upgraded. We care about the case where a package is initially
-- installed, because other cases are covered by the *un scriptlets,
-- so sometimes we will reload needlessly.
pid = posix.fork()
if pid == 0 then
assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "system-reload-restart"))
elseif pid > 0 then
posix.wait(pid)
end
assert(rpm.execute("/usr/lib/systemd/systemd-update-helper", "system-reload-restart"))
%transfiletriggerin -P 900899 -p <lua> -- /usr/lib/systemd/user /etc/systemd/user
pid = posix.fork()
if pid == 0 then
assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "user-reload-restart"))
elseif pid > 0 then
posix.wait(pid)
end
assert(rpm.execute("/usr/lib/systemd/systemd-update-helper", "user-reload-restart"))
%transfiletriggerpostun -P 1000100 -p <lua> -- /usr/lib/systemd/system /etc/systemd/system
-- On removal, we need to run daemon-reload after any units have been
@@ -34,45 +24,25 @@ end
-- On upgrade, we need to run daemon-reload after any new unit files
-- have been installed, but before %postun scripts in packages get
-- executed.
pid = posix.fork()
if pid == 0 then
assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "system-reload"))
elseif pid > 0 then
posix.wait(pid)
end
assert(rpm.execute("/usr/lib/systemd/systemd-update-helper", "system-reload"))
%transfiletriggerpostun -P 1000100 -p <lua> -- /usr/lib/systemd/system /etc/systemd/system
%transfiletriggerpostun -P 1000100 -p <lua> -- /usr/lib/systemd/user /etc/systemd/user
-- Execute daemon-reload in user managers.
pid = posix.fork()
if pid == 0 then
assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "user-reload"))
elseif pid > 0 then
posix.wait(pid)
end
assert(rpm.execute("/usr/lib/systemd/systemd-update-helper", "user-reload"))
%transfiletriggerpostun -P 10000 -p <lua> -- /usr/lib/systemd/system /etc/systemd/system
-- We restart remaining system services that should be restarted here.
pid = posix.fork()
if pid == 0 then
assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "system-restart"))
elseif pid > 0 then
posix.wait(pid)
end
assert(rpm.execute("/usr/lib/systemd/systemd-update-helper", "system-restart"))
%transfiletriggerpostun -P 9999 -p <lua> -- /usr/lib/systemd/user /etc/systemd/user
-- We restart remaining user services that should be restarted here.
pid = posix.fork()
if pid == 0 then
assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "user-restart"))
elseif pid > 0 then
posix.wait(pid)
end
assert(rpm.execute("/usr/lib/systemd/systemd-update-helper", "user-restart"))
%transfiletriggerin -P 1000700 -p <lua> -- /usr/lib/sysusers.d
-- This script will process files installed in /usr/lib/sysusers.d to create
-- specified users automatically. The priority is set such that it
-- will run before the tmpfiles file trigger.
-- Note: /run is never mounted during transactional updates.
-- Note: this should be skipped during offline updates.
if posix.access("/run/systemd/system") then
assert(rpm.execute("systemd-sysusers"))
end
@@ -81,31 +51,32 @@ end
%transfiletriggerin -P 1000700 -n udev -p <lua> -- /usr/lib/udev/hwdb.d
-- This script will automatically invoke hwdb update if files have been
-- installed or updated in /usr/lib/udev/hwdb.d.
assert(rpm.execute("systemd-hwdb", "update"))
-- Note: this should be skipped during offline updates.
if posix.access("/run/systemd/system") then
assert(rpm.execute("systemd-hwdb", "update"))
end
%endif
%transfiletriggerin -P 1000700 -p <lua> -- /usr/lib/systemd/catalog
-- This script will automatically invoke journal catalog update if files
-- have been installed or updated in /usr/lib/systemd/catalog.
assert(rpm.execute("journalctl", "--update-catalog"))
-- Note: this should be skipped during offline updates.
if posix.access("/run/systemd/system") then
assert(rpm.execute("journalctl", "--update-catalog"))
end
%transfiletriggerin -P 1000700 -p <lua> -- /usr/lib/binfmt.d
-- This script will automatically apply binfmt rules if files have been
-- installed or updated in /usr/lib/binfmt.d.
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
assert(posix.exec("/usr/lib/systemd/systemd-binfmt"))
elseif pid > 0 then
posix.wait(pid)
end
assert(rpm.execute("/usr/lib/systemd/systemd-binfmt"))
end
%transfiletriggerin -P 1000600 -p <lua> -- /usr/lib/tmpfiles.d
-- This script will process files installed in /usr/lib/tmpfiles.d to create
-- tmpfiles automatically. The priority is set such that it will run
-- after the sysusers file trigger, but before any other triggers.
-- Note: /run is never mounted during transactional updates.
-- Note: this should be skipped during offline updates.
if posix.access("/run/systemd/system") then
assert(rpm.execute("systemd-tmpfiles", "--create"))
end
@@ -122,11 +93,7 @@ end
%transfiletriggerin -P 1000500 -p <lua> -- /usr/lib/sysctl.d
-- This script will automatically apply sysctl rules if files have been
-- installed or updated in /usr/lib/sysctl.d.
-- Note: this should be skipped if executed in a chroot environment.
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
assert(posix.exec("/usr/lib/systemd/systemd-sysctl"))
elseif pid > 0 then
posix.wait(pid)
end
assert(rpm.execute("/usr/lib/systemd/systemd-sysctl"))
end