Sync from SUSE:SLFO:Main systemd revision 717f834345a3e9dd5e11966b78076c4b
This commit is contained in:
parent
938aeca38d
commit
0159c86e80
@ -1,18 +1,20 @@
|
||||
From b627d5aae4a8221ccd80dafb592edabfa6cc47cd Mon Sep 17 00:00:00 2001
|
||||
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 1/1] udev: restore some legacy symlinks to maintain backward
|
||||
Subject: [PATCH] udev: restore some legacy symlinks to maintain backward
|
||||
compatibility
|
||||
|
||||
Extracted the openSUSE git repository, branch "compats/udev-compat-symlinks",
|
||||
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/61-persistent-storage-compat.rules | 137 +++++++++
|
||||
rules.d/meson.build | 1 +
|
||||
src/udev/compat/meson.build | 13 +
|
||||
src/udev/compat/path_id_compat.c | 378 +++++++++++++++++++++
|
||||
src/udev/compat/meson.build | 8 +
|
||||
src/udev/compat/path_id_compat.c | 329 +++++++++++++++++++++
|
||||
src/udev/meson.build | 2 +
|
||||
5 files changed, 531 insertions(+)
|
||||
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
|
||||
@ -174,29 +176,24 @@ index 3040fae8a4..ca07be282c 100644
|
||||
'70-mouse.rules',
|
||||
diff --git a/src/udev/compat/meson.build b/src/udev/compat/meson.build
|
||||
new file mode 100644
|
||||
index 0000000000..2f07b6a9c7
|
||||
index 0000000000..d624229bd1
|
||||
--- /dev/null
|
||||
+++ b/src/udev/compat/meson.build
|
||||
@@ -0,0 +1,13 @@
|
||||
+foreach prog : ['path_id_compat.c']
|
||||
+
|
||||
+ executable(prog.split('.')[0],
|
||||
+ prog,
|
||||
+ include_directories : [includes,
|
||||
+ libudev_includes],
|
||||
@@ -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 : [udev_link_with, libudev_basic],
|
||||
+ install_rpath : udev_rpath,
|
||||
+ link_with : libshared,
|
||||
+ install : true,
|
||||
+ install_dir : udevlibexecdir)
|
||||
+endforeach
|
||||
diff --git a/src/udev/compat/path_id_compat.c b/src/udev/compat/path_id_compat.c
|
||||
new file mode 100644
|
||||
index 0000000000..f0d8e189fe
|
||||
index 0000000000..c5839916ea
|
||||
--- /dev/null
|
||||
+++ b/src/udev/compat/path_id_compat.c
|
||||
@@ -0,0 +1,378 @@
|
||||
@@ -0,0 +1,329 @@
|
||||
+/*
|
||||
+ * path_id_compat.c: compose persistent device path (compat version)
|
||||
+ *
|
||||
@ -228,8 +225,11 @@ index 0000000000..f0d8e189fe
|
||||
+#include <errno.h>
|
||||
+#include <dirent.h>
|
||||
+
|
||||
+#include "libudev.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
|
||||
@ -238,8 +238,7 @@ index 0000000000..f0d8e189fe
|
||||
+static const char *compat_version_str = NULL;
|
||||
+static unsigned compat_version;
|
||||
+
|
||||
+static int path_prepend(char **path, const char *fmt, ...)
|
||||
+{
|
||||
+static int path_prepend(char **path, const char *fmt, ...) {
|
||||
+ va_list va;
|
||||
+ char *old;
|
||||
+ char *pre;
|
||||
@ -270,70 +269,61 @@ index 0000000000..f0d8e189fe
|
||||
+** Linux only supports 32 bit luns.
|
||||
+** See drivers/scsi/scsi_scan.c::scsilun_to_int() for more details.
|
||||
+*/
|
||||
+static int format_lun_number(struct udev_device *dev, char **path)
|
||||
+{
|
||||
+ unsigned long lun = strtoul(udev_device_get_sysnum(dev), NULL, 10);
|
||||
+static int format_lun_number(sd_device *dev, char **path) {
|
||||
+ unsigned long lun;
|
||||
+ const char *sysnum;
|
||||
+
|
||||
+ /* address method 0, peripheral device addressing with bus id of zero */
|
||||
+ if (lun < 256)
|
||||
+ (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 struct udev_device *skip_subsystem(struct udev_device *dev, const char *subsys)
|
||||
+{
|
||||
+ struct udev_device *parent = dev;
|
||||
+
|
||||
+ while (parent != NULL) {
|
||||
+ const char *subsystem;
|
||||
+
|
||||
+ subsystem = udev_device_get_subsystem(parent);
|
||||
+ if (subsystem == NULL || strcmp(subsystem, subsys) != 0)
|
||||
+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;
|
||||
+ parent = udev_device_get_parent(parent);
|
||||
+ if (sd_device_get_parent(dev, &parent) < 0)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return dev;
|
||||
+}
|
||||
+
|
||||
+static struct udev_device *handle_scsi_default(struct udev_device *parent, char **path)
|
||||
+{
|
||||
+ struct udev_device *hostdev;
|
||||
+static sd_device *handle_scsi_default(sd_device *parent, char **path) {
|
||||
+ sd_device *hostdev;
|
||||
+ int host, bus, target, lun;
|
||||
+ const char *name;
|
||||
+ char *base;
|
||||
+ char *pos;
|
||||
+ DIR *dir;
|
||||
+ struct dirent *dent;
|
||||
+ int basenum;
|
||||
+ const char *sysname, *base, *pos;
|
||||
+ _cleanup_closedir_ DIR *dir = NULL;
|
||||
+ int basenum = -1;
|
||||
+
|
||||
+ hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
|
||||
+ if (hostdev == NULL)
|
||||
+ if (sd_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host", &hostdev) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ name = udev_device_get_sysname(parent);
|
||||
+ if (sscanf(name, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4)
|
||||
+ 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 */
|
||||
+ basenum = -1;
|
||||
+ base = strdup(udev_device_get_syspath(hostdev));
|
||||
+ if (base == NULL)
|
||||
+ if (sd_device_get_syspath(hostdev, &base) < 0)
|
||||
+ return NULL;
|
||||
+ pos = strrchr(base, '/');
|
||||
+ if (pos == NULL) {
|
||||
+ parent = NULL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ pos[0] = '\0';
|
||||
+ if (!pos)
|
||||
+ return NULL;
|
||||
+
|
||||
+ base = strndupa_safe(base, pos - base);
|
||||
+ dir = opendir(base);
|
||||
+ if (dir == NULL) {
|
||||
+ parent = NULL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) {
|
||||
+ if (!dir)
|
||||
+ return NULL;
|
||||
+
|
||||
+ FOREACH_DIRENT_ALL(dent, dir, break) {
|
||||
+ char *rest;
|
||||
+ int i;
|
||||
+
|
||||
@ -349,68 +339,55 @@ index 0000000000..f0d8e189fe
|
||||
+ if (basenum == -1 || i < basenum)
|
||||
+ basenum = i;
|
||||
+ }
|
||||
+ closedir(dir);
|
||||
+ if (basenum == -1) {
|
||||
+ parent = NULL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (basenum == -1)
|
||||
+ return NULL;
|
||||
+ host -= basenum;
|
||||
+
|
||||
+ path_prepend(path, "scsi-%u:%u:%u:%u", host, bus, target, lun);
|
||||
+out:
|
||||
+ free(base);
|
||||
+ return hostdev;
|
||||
+}
|
||||
+
|
||||
+static struct udev_device *handle_ata(struct udev_device *parent, char **path)
|
||||
+{
|
||||
+ struct udev_device *hostdev;
|
||||
+static sd_device *handle_ata(sd_device *parent, char **path) {
|
||||
+ sd_device *hostdev;
|
||||
+ int host, bus, target, lun;
|
||||
+ const char *name;
|
||||
+
|
||||
+ hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
|
||||
+ if (hostdev == NULL)
|
||||
+ if (sd_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host", &hostdev) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ name = udev_device_get_sysname(parent);
|
||||
+ 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 struct udev_device *handle_scsi_sas(struct udev_device *parent, char **path)
|
||||
+{
|
||||
+ struct udev *udev = udev_device_get_udev(parent);
|
||||
+ struct udev_device *targetdev;
|
||||
+ struct udev_device *target_parent;
|
||||
+ struct udev_device *sasdev;
|
||||
+ struct udev_device *portdev;
|
||||
+ struct dirent *dent;
|
||||
+ DIR *dir;
|
||||
+ const char *sas_address;
|
||||
+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;
|
||||
+ char *lun = NULL;
|
||||
+ _cleanup_free_ char *lun = NULL;
|
||||
+
|
||||
+ targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
|
||||
+ if (!targetdev)
|
||||
+ if (sd_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target", &targetdev) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ target_parent = udev_device_get_parent(targetdev);
|
||||
+ if (!target_parent)
|
||||
+ if (sd_device_get_parent(targetdev, &target_parent) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ portdev = udev_device_get_parent(target_parent);
|
||||
+ if (!portdev)
|
||||
+ if (sd_device_get_parent(target_parent, &portdev) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ dir = opendir(udev_device_get_syspath(portdev));
|
||||
+ if (sd_device_get_syspath(portdev, &syspath) < 0)
|
||||
+ return NULL;
|
||||
+ dir = opendir(syspath);
|
||||
+ if (!dir)
|
||||
+ return NULL;
|
||||
+
|
||||
+ for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) {
|
||||
+ FOREACH_DIRENT_ALL(dent, dir, break) {
|
||||
+ const char *name = dent->d_name;
|
||||
+ char *phy_id_str;
|
||||
+
|
||||
@ -430,23 +407,21 @@ index 0000000000..f0d8e189fe
|
||||
+ if (tmp_phy_id >= 0 && tmp_phy_id < phy_id)
|
||||
+ phy_id = tmp_phy_id;
|
||||
+ }
|
||||
+ closedir(dir);
|
||||
+
|
||||
+ if (phy_id == 255)
|
||||
+ return NULL;
|
||||
+
|
||||
+ sasdev = udev_device_new_from_subsystem_sysname(udev, "sas_device",
|
||||
+ udev_device_get_sysname(target_parent));
|
||||
+ if (sasdev == NULL)
|
||||
+ if (sd_device_get_sysname(target_parent, &sysname) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ sas_address = udev_device_get_sysattr_value(sasdev, "sas_address");
|
||||
+ if (sas_address == NULL) {
|
||||
+ parent = NULL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (sd_device_new_from_subsystem_sysname(&sasdev, "sas_device", sysname) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ format_lun_number(parent, &lun);
|
||||
+ 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:
|
||||
@ -457,51 +432,38 @@ index 0000000000..f0d8e189fe
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (lun)
|
||||
+ free(lun);
|
||||
+out:
|
||||
+ udev_device_unref(sasdev);
|
||||
+ return parent;
|
||||
+}
|
||||
+
|
||||
+static struct udev_device *handle_scsi(struct udev_device *parent, char **path)
|
||||
+{
|
||||
+static sd_device *handle_scsi(sd_device *parent, char **path) {
|
||||
+ const char *devtype;
|
||||
+ const char *name;
|
||||
+ int r;
|
||||
+
|
||||
+ devtype = udev_device_get_devtype(parent);
|
||||
+ if (devtype == NULL || strcmp(devtype, "scsi_device") != 0)
|
||||
+ 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 */
|
||||
+ name = udev_device_get_syspath(parent);
|
||||
+ (void) sd_device_get_syspath(parent, &name);
|
||||
+
|
||||
+ if (strstr(name, "/end_device-") != NULL) {
|
||||
+ parent = handle_scsi_sas(parent, path);
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (strstr(name, "/end_device-") != NULL)
|
||||
+ return handle_scsi_sas(parent, path);
|
||||
+
|
||||
+ if (strstr(name, "/ata") != NULL) {
|
||||
+ parent = handle_ata(parent, path);
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (strstr(name, "/ata") != NULL)
|
||||
+ return handle_ata(parent, path);
|
||||
+
|
||||
+ parent = handle_scsi_default(parent, path);
|
||||
+out:
|
||||
+ return parent;
|
||||
+ return handle_scsi_default(parent, path);
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+int main(int argc, char **argv) {
|
||||
+ static const struct option options[] = {
|
||||
+ { "compat", required_argument, NULL, 'V' },
|
||||
+ };
|
||||
+ struct udev *udev;
|
||||
+ struct udev_device *dev;
|
||||
+ struct udev_device *parent;
|
||||
+ _cleanup_(sd_device_unrefp) sd_device *dev = NULL;
|
||||
+ _cleanup_free_ char *path = NULL;
|
||||
+ char syspath[PATH_SIZE];
|
||||
+ char *path = NULL;
|
||||
+ int rc = 1;
|
||||
+ int r = 1;
|
||||
+
|
||||
+ for (;;) {
|
||||
+ int option;
|
||||
@ -520,63 +482,49 @@ index 0000000000..f0d8e189fe
|
||||
+ if (compat_version_str) {
|
||||
+ if (safe_atou(compat_version_str, &compat_version) < 0) {
|
||||
+ fprintf(stderr, "--compat takes an integer.\n");
|
||||
+ goto exit2;
|
||||
+ return 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (argv[optind] == NULL) {
|
||||
+ fprintf(stderr, "No device specified\n");
|
||||
+ rc = 2;
|
||||
+ goto exit2;
|
||||
+ return 2;
|
||||
+ }
|
||||
+
|
||||
+ udev = udev_new();
|
||||
+ if (udev == NULL)
|
||||
+ goto exit2;
|
||||
+
|
||||
+ snprintf(syspath, PATH_SIZE, "%s%s", SYSFS_PATH, argv[optind]);
|
||||
+ dev = udev_device_new_from_syspath(udev, syspath);
|
||||
+ if (dev == NULL) {
|
||||
+ if (sd_device_new_from_syspath(&dev, syspath) < 0) {
|
||||
+ fprintf(stderr, "unable to access '%s'\n", argv[optind]);
|
||||
+ rc = 3;
|
||||
+ goto exit1;
|
||||
+ return 3;
|
||||
+ }
|
||||
+
|
||||
+ /* walk up the chain of devices and compose path */
|
||||
+ parent = dev;
|
||||
+ while (parent != NULL) {
|
||||
+ const char *subsys;
|
||||
+ for (sd_device *parent = dev; parent; ) {
|
||||
+ const char *sysname;
|
||||
+
|
||||
+ subsys = udev_device_get_subsystem(parent);
|
||||
+
|
||||
+ if (subsys == NULL) {
|
||||
+ if (sd_device_get_sysname(parent, &sysname) < 0)
|
||||
+ ;
|
||||
+ } else if (strcmp(subsys, "scsi") == 0) {
|
||||
+ else if (device_in_subsystem(parent, "scsi"))
|
||||
+ parent = handle_scsi(parent, &path);
|
||||
+ } else if (strcmp(subsys, "pci") == 0) {
|
||||
+ path_prepend(&path, "pci-%s", udev_device_get_sysname(parent));
|
||||
+ else if (device_in_subsystem(parent, "pci")) {
|
||||
+ path_prepend(&path, "pci-%s", sysname);
|
||||
+ parent = skip_subsystem(parent, "pci");
|
||||
+ }
|
||||
+
|
||||
+ parent = udev_device_get_parent(parent);
|
||||
+ if (!parent)
|
||||
+ break;
|
||||
+ if (sd_device_get_parent(parent, &parent) < 0) /* return -ENOENT when no more parent */
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (path != NULL) {
|
||||
+ if (path) {
|
||||
+ printf("ID_PATH_COMPAT%s=%s\n", strempty(compat_version_str), path);
|
||||
+ free(path);
|
||||
+ rc = 0;
|
||||
+ r = 0;
|
||||
+ }
|
||||
+
|
||||
+ udev_device_unref(dev);
|
||||
+
|
||||
+exit1:
|
||||
+ udev_unref(udev);
|
||||
+
|
||||
+exit2:
|
||||
+ return rc;
|
||||
+ return r;
|
||||
+}
|
||||
diff --git a/src/udev/meson.build b/src/udev/meson.build
|
||||
index 3535551e74..d728f512d6 100644
|
||||
index 3535551e74..59073f33d7 100644
|
||||
--- a/src/udev/meson.build
|
||||
+++ b/src/udev/meson.build
|
||||
@@ -273,3 +273,5 @@ udev_pc = custom_target(
|
||||
@ -584,7 +532,7 @@ index 3535551e74..d728f512d6 100644
|
||||
install_emptydir(sysconfdir / 'udev/rules.d')
|
||||
endif
|
||||
+
|
||||
+subdir('compat') # must be after 'src/libudev' for the definition of 'libudev_basic'
|
||||
+subdir('compat')
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b090866bc0e9192224acaeeec875ef4c8846b829 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 1/1] pid1: handle console specificities/weirdness for s390
|
||||
@ -14,26 +14,29 @@ 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 878c1ec06a..355ecdc45f 100644
|
||||
index 409f2abb45..630fc81836 100644
|
||||
--- a/src/basic/terminal-util.c
|
||||
+++ b/src/basic/terminal-util.c
|
||||
@@ -923,7 +923,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) {
|
||||
@ -45,9 +48,8 @@ index 878c1ec06a..355ecdc45f 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
|
||||
|
@ -117,9 +117,6 @@
|
||||
%{_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
|
||||
|
@ -482,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
|
||||
|
BIN
systemd-257.3+suse.3.ge03ffd74c4.tar.xz
(Stored with Git LFS)
Normal file
BIN
systemd-257.3+suse.3.ge03ffd74c4.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
systemd-v257.2.tar.xz
(Stored with Git LFS)
BIN
systemd-v257.2.tar.xz
(Stored with Git LFS)
Binary file not shown.
@ -1,3 +1,43 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
@ -240,6 +280,7 @@ Thu Jul 4 09:07:28 UTC 2024 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- commit 3b2e7dc5a285edbbb1bf6aed2d88b889d801613f (bsc#1234015)
|
||||
- commit c072860593329293e19580b337504adb52248462 (bsc#1229518)
|
||||
- commit cfbf7538d87023840c5574fa5b0452e5b0f42149 (bsc#1229228)
|
||||
|
||||
- Added pam.systemd-run0
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
||||
%define systemd_release %{?release_override}%{!?release_override:0}
|
||||
%define archive_version %{nil}
|
||||
%else
|
||||
%define systemd_version 257.2
|
||||
%define systemd_version 257.3
|
||||
%define systemd_release 0
|
||||
%define archive_version %{nil}
|
||||
%define archive_version +suse.3.ge03ffd74c4
|
||||
%endif
|
||||
|
||||
%define systemd_major 257
|
||||
@ -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}
|
||||
@ -730,7 +730,7 @@ for the C APIs.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n systemd-v%{version}%{archive_version}
|
||||
%autosetup -p1 -n systemd-%{version}%{archive_version}
|
||||
|
||||
%build
|
||||
%meson \
|
||||
|
@ -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,39 +24,19 @@ 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
|
||||
-- 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
|
||||
@ -93,12 +63,7 @@ assert(rpm.execute("journalctl", "--update-catalog"))
|
||||
-- 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user