(jsc#PED-8734, util-linux-lib-netlink.patch and util-linux-agetty-netlink.patch) and upstream fixes (util-linux-lib-netlink-fix1.patch, util-linux-lib-netlink-fix2.patch, util-linux-lib-netlink-fix3.patch and util-linux-agetty-netlink-fix4.patch). - Fix configs library use in agetty (replace util-linux-issuedir-usr-lib.patch by upstream util-linux-lib-configs-fix1.patch, add util-linux-lib-configs-fix2.patch, util-linux-lib-configs-fix3.patch, util-linux-lib-configs-fix4.patch, util-linux-lib-configs-fix5.patch and util-linux-lib-configs-fix6.patch). - Fix agetty erase of escape characters (relevant to bsc#1194818, util-linux-agetty-escape-erase.patch). - Own /usr/lib/issue.d directory. - Perform migration from issue-generator (jsc#PED-8734). - Drop util-linux-agetty-ssh-host-keys.patch. This feature is not used in MicroOS any more. - Remove Provides/Obsoletes for s390-32, upgrade from SLE11 SP1 is no more supported. OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=607
79 lines
2.7 KiB
Diff
79 lines
2.7 KiB
Diff
From d1cf7efb17869d0fdf132bb3581d9b74a459bb87 Mon Sep 17 00:00:00 2001
|
|
From: Stefan Schubert <schubi@suse.de>
|
|
Date: Wed, 17 Sep 2025 13:43:55 +0200
|
|
Subject: [PATCH 2/8] agetty: using configs lib for parsing issue files
|
|
|
|
---
|
|
term-utils/agetty.c | 39 +++++++++++++++++++++++----------------
|
|
1 file changed, 23 insertions(+), 16 deletions(-)
|
|
|
|
Index: util-linux-2.41.2/term-utils/agetty.c
|
|
===================================================================
|
|
--- util-linux-2.41.2.orig/term-utils/agetty.c
|
|
+++ util-linux-2.41.2/term-utils/agetty.c
|
|
@@ -122,10 +122,11 @@
|
|
#ifdef SYSV_STYLE
|
|
# define ISSUE_SUPPORT
|
|
# if defined(HAVE_SCANDIRAT) && defined(HAVE_OPENAT)
|
|
+# include "configs.h"
|
|
# include <dirent.h>
|
|
# define ISSUEDIR_SUPPORT
|
|
-# define ISSUEDIR_EXT ".issue"
|
|
-# define ISSUEDIR_EXTSIZ (sizeof(ISSUEDIR_EXT) - 1)
|
|
+# define ISSUEDIR_EXT "issue"
|
|
+# define ISSUEDIR_EXTSIZ sizeof(ISSUEDIR_EXT)
|
|
# endif
|
|
#endif
|
|
|
|
@@ -1683,7 +1684,7 @@ static int issuedir_filter(const struct
|
|
|
|
namesz = strlen(d->d_name);
|
|
if (!namesz || namesz < ISSUEDIR_EXTSIZ + 1 ||
|
|
- strcmp(d->d_name + (namesz - ISSUEDIR_EXTSIZ), ISSUEDIR_EXT) != 0)
|
|
+ strcmp(d->d_name + (namesz - ISSUEDIR_EXTSIZ), "." ISSUEDIR_EXT) != 0)
|
|
return 0;
|
|
|
|
/* Accept this */
|
|
@@ -1930,22 +1931,28 @@ skip:
|
|
goto done;
|
|
}
|
|
|
|
- /* The default /etc/issue and optional /etc/issue.d directory as
|
|
- * extension to the file. The /etc/issue.d directory is ignored if
|
|
- * there is no /etc/issue file. The file may be empty or symlink.
|
|
+#ifdef ISSUEDIR_SUPPORT
|
|
+ struct list_head file_list;
|
|
+ struct list_head *current = NULL;
|
|
+ char *name = NULL;
|
|
+
|
|
+ /* Reading all issue files and concatinating all contents to one content.
|
|
+ * The ordering rules are defineded in:
|
|
+ * https://github.com/uapi-group/specifications/blob/main/specs/configuration_files_specification.md
|
|
*/
|
|
- if (access(_PATH_ISSUE, F_OK|R_OK) == 0) {
|
|
- issuefile_read(ie, _PATH_ISSUE, op, tp);
|
|
- issuedir_read(ie, _PATH_ISSUEDIR, op, tp);
|
|
+ ul_configs_file_list(&file_list,
|
|
+ NULL,
|
|
+ _PATH_ETC_ISSUEDIR,
|
|
+ _PATH_USR_ISSUEDIR,
|
|
+ _PATH_ISSUE_FILENAME,
|
|
+ ISSUEDIR_EXT);
|
|
+
|
|
+ while (ul_configs_next_filename(&file_list, ¤t, &name) == 0) {
|
|
+ issuefile_read(ie, name, op, tp);
|
|
}
|
|
|
|
- /* Fallback @runstatedir (usually /run) */
|
|
- issuefile_read(ie, _PATH_RUNSTATEDIR "/" _PATH_ISSUE_FILENAME, op, tp);
|
|
- issuedir_read(ie, _PATH_RUNSTATEDIR "/" _PATH_ISSUE_DIRNAME, op, tp);
|
|
-
|
|
- /* Fallback @sysconfstaticdir (usually /usr/lib)*/
|
|
- issuefile_read(ie, _PATH_SYSCONFSTATICDIR "/" _PATH_ISSUE_FILENAME, op, tp);
|
|
- issuedir_read(ie, _PATH_SYSCONFSTATICDIR "/" _PATH_ISSUE_DIRNAME, op, tp);
|
|
+ ul_configs_free_list(&file_list);
|
|
+#endif
|
|
|
|
done:
|
|
if (ie->output) {
|