2025-06-06 20:32:23 +00:00
committed by Git OBS Bridge
15 changed files with 748 additions and 45 deletions

View File

@@ -1,4 +0,0 @@
mtime: 1732123801
commit: 1f607dd355d8ca2a0fa48e4d3662cad355a81b877985b076ecc7a1527d45771c
url: https://src.opensuse.org/jengelh/util-linux
revision: master

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:61a765e8d466450446dd85c699160cfc02aab7dfe35927dbede2111c3afe94f2
size 256

View File

@@ -14,12 +14,11 @@ Signed-off-by: Martin Wilck <mwilck@suse.com>
libmount/src/context_mount.c | 41 ++++++++++++++++++++++++++++++++----
1 file changed, 37 insertions(+), 4 deletions(-)
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
index f914c9b..a48483f 100644
--- a/libmount/src/context_mount.c
+++ b/libmount/src/context_mount.c
@@ -1423,6 +1423,32 @@ done:
return rc;
diff -ur util-linux-2.41.orig/libmount/src/context_mount.c util-linux-2.41/libmount/src/context_mount.c
--- util-linux-2.41.orig/libmount/src/context_mount.c 2025-03-04 19:14:02.587173600 +0100
+++ util-linux-2.41/libmount/src/context_mount.c 2025-04-08 14:03:59.173505340 +0200
@@ -1469,6 +1469,32 @@
}
}
+/*
@@ -51,7 +50,7 @@ index f914c9b..a48483f 100644
int mnt_context_get_mount_excode(
struct libmnt_context *cxt,
int rc,
@@ -1670,10 +1696,17 @@ int mnt_context_get_mount_excode(
@@ -1772,10 +1798,17 @@
case ENODEV:
if (!buf)
break;
@@ -73,6 +72,3 @@ index f914c9b..a48483f 100644
snprintf(buf, bufsz, _("unknown filesystem type"));
break;
--
2.19.2

View File

@@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmeFCjYACgkQ5LcdXuw5
woQOfw//e1E0K/KQutqIhO4bl+gnpmq8lTP/2Bn3eCrrpoyM5V+FTh/gxVUbsU6H
uTUw7LZVAb1Ihwp6j3XnkqjzhOQ5yBe6iv2H5pfYQS6mSemIuIBoMd9PyCvNgh90
mW4jC6WnSdaH71QW9lAPPjog45v6WXR/8UwhTGf/0tKkxurwUyyIaAktG5FtGnlW
xVQ4tOyqAgcGdTtNFrD3pgO3rydYZIo/JMwL0mTpfcgzgbKZ1aJVx1J2mdRVZ5N9
MMLU6/6qAmxEy8EUb2AmlTCFjXNC2J7eRZGvRF1WzNbFBh6cShl/825OY/9Kvmzv
IWIfuFBvyLa6VPEDDw2U0dtrHXXGeSs7ACSKE+0aMDTrznPy6WuA4XRFIm5AuOt3
Gb/95ZK4udrijg5cquMZMzs5yFCiDNGYpwMWMAwHglNfPtwSKZ6tno0k1YrE/Y0P
9+dq2rjjpREHO5itFigLAJQVHVop3rp8EfRLONgXy4Sh/j7mUjjACE4DWwzBsJEQ
fEwTbb91oHJ2WtiTj3P2nOyVUMOv9PX3p8V/V0RXQcLe7gfCa198evEcA5Swcihm
aym4FE58Trr7FBRyQcRuU5B74i7VW5a+22yLpvG0l0jL8Aer8iAaG86yJjogTUHi
uQJKHnc2ZBtBB8XKht1KsqMs/5qlo6aoalo+bR9cewuoAJZNoa8=
=gB1/
-----END PGP SIGNATURE-----

BIN
util-linux-2.40.4.tar.xz (Stored with Git LFS)

Binary file not shown.

16
util-linux-2.41.tar.sign Normal file
View File

@@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmfZc3oACgkQ5LcdXuw5
woQyhA//XMgc3x05h1j6fgHXQOkt/cDFBu26K1VFSGGny+JwOWjPs0Cu45PzPFUK
0fcNENyrjlJdHT9HJlwXqPNJczsOoOR+yrYN8bmD1kG0hQ/tg4CpueFMhR/o2/nT
JaDjY7d4l3tKZXM6XDwM5VW1MTwAZNncAW+n+zQ5g372ZRbS4CU/72ecT4nyhHf2
MmTpBJyh3wagKo1I3EG3pAo/NcOULam8gVFvNNNuIX8G4UAgfT4EEsao8gsvkZkd
QzjmV9jw1rV5phAEQhDfaihEMbx+32K3Vwqn32F4voYQQFxp50f+s9OKpSo+YDOe
lAxkvBTXavhRaRKAZft57YUnFm3RGAP7Si4IS/wy9RIDZhu4y1CK0r0AIqeeMXxW
FYRkPYapHdhopg7YP06mPJpMIOZbrNuSDQRsdt/KA6X7nwEiI4bJnA9MP1ZUzl6I
FOBfFU5fvKlX6TV3fgEog4PlVkJtOmeiTgqI2+ULlioER3VtiRJSO74plEUq1U1t
MQg0vRj0JWuUbzXJPNVi0mlqBJPBRRJWV7/Br9gO1kyoHYpzyTnZbulmwsLwXbGt
UGfHKPXfJLAqV67D+OcJxv9bGQKd0DxGsGSIie1qZnFyJhZqhKCJHJ6qB5KMWnHU
macyxeCbgK5MTOUWx+Vp+YPxjkMkI1KQRAuc/r34OROul1gIUYo=
=VobI
-----END PGP SIGNATURE-----

BIN
util-linux-2.41.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,34 @@
From 284527cff2bd22da2924881a4a4833049dca0d2e Mon Sep 17 00:00:00 2001
From: Stanislav Brabec <sbrabec@suse.cz>
Date: Fri, 16 May 2025 03:10:14 +0200
Subject: [PATCH] libblkid: Fix crash while parsing config with libeconf
As the whole econf_file structure is freed by econf_free(file) at the end
of blkid_read_config(), econf_file structure cannot be defined as static
and initialized only once. The econf_free() is not robust enough and keeps
a pointer to the garbage after the first call of blkid_read_config(). And
if /etc/blkid.conf does not exist, it is called second time.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Stefan Schubert <schubi@suse.de>
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1242705
---
libblkid/src/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libblkid/src/config.c b/libblkid/src/config.c
index 934d28d65..39024b42e 100644
--- a/libblkid/src/config.c
+++ b/libblkid/src/config.c
@@ -154,7 +154,7 @@ struct blkid_config *blkid_read_config(const char *filename)
#else /* !HAVE_LIBECONF */
- static econf_file *file = NULL;
+ econf_file *file = NULL;
char *line = NULL;
bool uevent = false;
econf_err error;
--
2.48.1

View File

@@ -15,7 +15,7 @@ echo -n "Checking login.defs variables in util-linux... " >&2
sed -n 's/^.*logindefs_setenv*("[A-Z0-9_]*", "\([A-Z0-9_]*\)".*$/\1/p'
) | LC_ALL=C sort -u >util-linux-login_defs-vars.lst
if test $(sha1sum util-linux-login_defs-vars.lst | sed 's/ .*$//') != 8516ca34e059b2dee1d4421a3ab07e88331b1674 ; then
if test $(sha1sum util-linux-login_defs-vars.lst | sed 's/ .*$//') != 713b442bf6d16353b7f74538ece165b424f90932 ; then
echo "does not match!" >&2
echo "Checksum is: $(sha1sum util-linux-login_defs-vars.lst | sed 's/ .*$//')" >&2
@@ -32,10 +32,13 @@ If it is false positive:
- The same fix is needed in shadow package in shadow-login_defs-check.sh.
If it is true positive:
- Check-out shadow package and call shadow-login_defs-check.sh.
- Compare its output shadow-login_defs-check-util-linux.lst with
util-linux-login_defs-vars.lst in the util-linux build directory.
- Check-out shadow package and call shadow-login_defs-check.sh. If it
fails, check the output.
- Update shadow shadow-login_defs-util-linux.patch, if needed.
- Verify that the new variable is included in FOREIGNDEFS in lib/getdef.c.
If not, add it to shadow-login_defs-util-linux.patch and send the chunk
to the upstream.
- If shadow-login_defs-util-linux.patch was updated, update
login_defs-support-for-util-linux symbol version in both shadow and
util-linux spec files accordingly.

View File

@@ -0,0 +1,68 @@
From b1d7b517bccc944d609c0509faa08cfe4d7e96b6 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Tue, 13 May 2025 11:24:48 +0200
Subject: [PATCH 1/4] treewide: add ul_ to parse_range() function name
Signed-off-by: Karel Zak <kzak@redhat.com>
---
disk-utils/partx.c | 2 +-
include/strutils.h | 2 +-
lib/strutils.c | 2 +-
text-utils/column.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/disk-utils/partx.c b/disk-utils/partx.c
index 49d506158..4c8b1f09b 100644
--- a/disk-utils/partx.c
+++ b/disk-utils/partx.c
@@ -864,7 +864,7 @@ int main(int argc, char **argv)
what = ACT_LIST;
break;
case 'n':
- if (parse_range(optarg, &lower, &upper, 0))
+ if (ul_parse_range(optarg, &lower, &upper, 0))
errx(EXIT_FAILURE, _("failed to parse --nr <M-N> range"));
break;
case 'o':
diff --git a/include/strutils.h b/include/strutils.h
index 63cd1c1c6..198d625ba 100644
--- a/include/strutils.h
+++ b/include/strutils.h
@@ -260,7 +260,7 @@ extern int string_to_bitarray(const char *list, char *ary,
extern int string_to_bitmask(const char *list,
unsigned long *mask,
long (*name2flag)(const char *, size_t));
-extern int parse_range(const char *str, int *lower, int *upper, int def);
+extern int ul_parse_range(const char *str, int *lower, int *upper, int def);
extern int streq_paths(const char *a, const char *b);
diff --git a/lib/strutils.c b/lib/strutils.c
index 0cf0da96b..dd098a318 100644
--- a/lib/strutils.c
+++ b/lib/strutils.c
@@ -863,7 +863,7 @@ int string_to_bitmask(const char *list,
*
* Returns: 0 on success, <0 on error.
*/
-int parse_range(const char *str, int *lower, int *upper, int def)
+int ul_parse_range(const char *str, int *lower, int *upper, int def)
{
char *end = NULL;
diff --git a/text-utils/column.c b/text-utils/column.c
index d67251648..a929cd813 100644
--- a/text-utils/column.c
+++ b/text-utils/column.c
@@ -482,7 +482,7 @@ static void apply_columnflag_from_list(struct column_control *ctl, const char *l
}
/* parse range (N-M) */
- if (strchr(*one, '-') && parse_range(*one, &low, &up, 0) == 0) {
+ if (strchr(*one, '-') && ul_parse_range(*one, &low, &up, 0) == 0) {
for (; low <= up; low++) {
if (low < 0)
cl = get_last_visible_column(ctl, (low * -1) -1);
--
2.48.1

View File

@@ -0,0 +1,146 @@
From af82437171e074535ae9d5737126e680008332aa Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Tue, 13 May 2025 11:25:39 +0200
Subject: [PATCH 2/4] treewide: add ul_ to parse_size() function name
Signed-off-by: Karel Zak <kzak@redhat.com>
---
disk-utils/cfdisk.c | 2 +-
disk-utils/fdisk.c | 2 +-
include/strutils.h | 2 +-
lib/strutils.c | 4 ++--
libfdisk/src/gpt.c | 2 +-
libfdisk/src/script.c | 8 ++++----
sys-utils/lscpu-topology.c | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
index e8a8b959a..cdd27f496 100644
--- a/disk-utils/cfdisk.c
+++ b/disk-utils/cfdisk.c
@@ -1955,7 +1955,7 @@ static int ui_get_size(struct cfdisk *cf, /* context */
insec = 1;
buf[len - 1] = '\0';
}
- rc = parse_size(buf, (uintmax_t *)&user, &pwr); /* parse */
+ rc = ul_parse_size(buf, (uintmax_t *)&user, &pwr); /* parse */
}
if (rc == 0) {
diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c
index 7c459c734..42a429c1f 100644
--- a/disk-utils/fdisk.c
+++ b/disk-utils/fdisk.c
@@ -359,7 +359,7 @@ static int ask_offset(struct fdisk_context *cxt,
p++;
}
- rc = parse_size(p, &num, &pwr);
+ rc = ul_parse_size(p, &num, &pwr);
if (rc)
continue;
DBG(ASK, ul_debug("parsed size: %ju", num));
diff --git a/include/strutils.h b/include/strutils.h
index 198d625ba..7aaca5696 100644
--- a/include/strutils.h
+++ b/include/strutils.h
@@ -21,7 +21,7 @@
/* initialize a custom exit code for all *_or_err functions */
extern void strutils_set_exitcode(int exit_code);
-extern int parse_size(const char *str, uintmax_t *res, int *power);
+extern int ul_parse_size(const char *str, uintmax_t *res, int *power);
extern int strtosize(const char *str, uintmax_t *res);
extern uintmax_t strtosize_or_err(const char *str, const char *errmesg);
diff --git a/lib/strutils.c b/lib/strutils.c
index dd098a318..56a53fdbb 100644
--- a/lib/strutils.c
+++ b/lib/strutils.c
@@ -64,7 +64,7 @@ static int do_scale_by_power (uintmax_t *x, int base, int power)
* Note that the function does not accept numbers with '-' (negative sign)
* prefix.
*/
-int parse_size(const char *str, uintmax_t *res, int *power)
+int ul_parse_size(const char *str, uintmax_t *res, int *power)
{
const char *p;
char *end;
@@ -220,7 +220,7 @@ err:
int strtosize(const char *str, uintmax_t *res)
{
- return parse_size(str, res, NULL);
+ return ul_parse_size(str, res, NULL);
}
int isdigit_strend(const char *str, const char **end)
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
index 374246ce6..b11c325f8 100644
--- a/libfdisk/src/gpt.c
+++ b/libfdisk/src/gpt.c
@@ -735,7 +735,7 @@ static int get_script_u64(struct fdisk_context *cxt, uint64_t *num, const char *
if (!str)
return 1;
- rc = parse_size(str, (uintmax_t *) num, &pwr);
+ rc = ul_parse_size(str, (uintmax_t *) num, &pwr);
if (rc < 0)
return rc;
if (pwr)
diff --git a/libfdisk/src/script.c b/libfdisk/src/script.c
index 6bb642f02..e782f37c5 100644
--- a/libfdisk/src/script.c
+++ b/libfdisk/src/script.c
@@ -1024,7 +1024,7 @@ static int parse_start_value(struct fdisk_script *dp, struct fdisk_partition *pa
int pow = 0, sign = skip_optional_sign(&tk);
uint64_t num;
- rc = parse_size(tk, (uintmax_t *) &num, &pow);
+ rc = ul_parse_size(tk, (uintmax_t *) &num, &pow);
if (!rc) {
if (pow) { /* specified as <num><suffix> */
if (!dp->cxt->sector_size) {
@@ -1080,7 +1080,7 @@ static int parse_size_value(struct fdisk_script *dp, struct fdisk_partition *pa,
int pow = 0, sign = skip_optional_sign(&tk);
uint64_t num;
- rc = parse_size(tk, (uintmax_t *) &num, &pow);
+ rc = ul_parse_size(tk, (uintmax_t *) &num, &pow);
if (!rc) {
if (pow) { /* specified as <size><suffix> */
if (!dp->cxt->sector_size) {
@@ -1564,7 +1564,7 @@ int fdisk_apply_script_headers(struct fdisk_context *cxt, struct fdisk_script *d
if (str) {
uintmax_t sz;
- rc = parse_size(str, &sz, NULL);
+ rc = ul_parse_size(str, &sz, NULL);
if (rc == 0)
rc = fdisk_save_user_grain(cxt, sz);
if (rc)
@@ -1591,7 +1591,7 @@ int fdisk_apply_script_headers(struct fdisk_context *cxt, struct fdisk_script *d
if (str) {
uintmax_t sz;
- rc = parse_size(str, &sz, NULL);
+ rc = ul_parse_size(str, &sz, NULL);
if (rc == 0)
rc = fdisk_gpt_set_npartitions(cxt, sz);
}
diff --git a/sys-utils/lscpu-topology.c b/sys-utils/lscpu-topology.c
index 36a217bc7..6e0782f64 100644
--- a/sys-utils/lscpu-topology.c
+++ b/sys-utils/lscpu-topology.c
@@ -509,7 +509,7 @@ static int read_caches(struct lscpu_cxt *cxt, struct lscpu_cpu *cpu)
/* cache size */
if (ul_path_readf_buffer(sys, buf, sizeof(buf),
"cpu%d/cache/index%zu/size", num, i) > 0)
- parse_size(buf, &ca->size, NULL);
+ ul_parse_size(buf, &ca->size, NULL);
else
ca->size = 0;
}
--
2.48.1

View File

@@ -0,0 +1,203 @@
From aa192df7ccfa6dc1f3aa718e488bad477150b6f5 Mon Sep 17 00:00:00 2001
From: Stanislav Brabec <sbrabec@suse.cz>
Date: Tue, 13 May 2025 11:26:49 +0200
Subject: [PATCH 3/4] treewide: add ul_ to parse_switch() function name
Signed-off-by: Karel Zak <kzak@redhat.com>
---
include/strutils.h | 2 +-
lib/strutils.c | 4 ++--
sys-utils/eject.c | 4 ++--
sys-utils/losetup.c | 2 +-
sys-utils/tunelp.c | 8 ++++----
term-utils/setterm.c | 24 ++++++++++++------------
6 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/include/strutils.h b/include/strutils.h
index 7aaca5696..54f0e14da 100644
--- a/include/strutils.h
+++ b/include/strutils.h
@@ -68,7 +68,7 @@ extern int isxdigit_strend(const char *str, const char **end);
#define isxdigit_string(_s) isxdigit_strend(_s, NULL)
-extern int parse_switch(const char *arg, const char *errmesg, ...);
+extern int ul_parse_switch(const char *arg, const char *errmesg, ...);
#ifndef HAVE_MEMPCPY
extern void *mempcpy(void *restrict dest, const void *restrict src, size_t n);
diff --git a/lib/strutils.c b/lib/strutils.c
index 56a53fdbb..330489c41 100644
--- a/lib/strutils.c
+++ b/lib/strutils.c
@@ -247,9 +247,9 @@ int isxdigit_strend(const char *str, const char **end)
}
/*
- * parse_switch(argv[i], "on", "off", "yes", "no", NULL);
+ * ul_parse_switch(argv[i], "on", "off", "yes", "no", NULL);
*/
-int parse_switch(const char *arg, const char *errmesg, ...)
+int ul_parse_switch(const char *arg, const char *errmesg, ...)
{
const char *a, *b;
va_list ap;
diff --git a/sys-utils/eject.c b/sys-utils/eject.c
index 310d6c3df..545642475 100644
--- a/sys-utils/eject.c
+++ b/sys-utils/eject.c
@@ -207,7 +207,7 @@ static void parse_args(struct eject_control *ctl, int argc, char **argv)
switch (c) {
case 'a':
ctl->a_option = 1;
- ctl->a_arg = parse_switch(optarg, _("argument error"),
+ ctl->a_arg = ul_parse_switch(optarg, _("argument error"),
"on", "off", "1", "0", NULL);
break;
case 'c':
@@ -229,7 +229,7 @@ static void parse_args(struct eject_control *ctl, int argc, char **argv)
break;
case 'i':
ctl->i_option = 1;
- ctl->i_arg = parse_switch(optarg, _("argument error"),
+ ctl->i_arg = ul_parse_switch(optarg, _("argument error"),
"on", "off", "1", "0", NULL);
break;
case 'm':
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
index eafab72f3..1f09df601 100644
--- a/sys-utils/losetup.c
+++ b/sys-utils/losetup.c
@@ -818,7 +818,7 @@ int main(int argc, char **argv)
case OPT_DIO:
use_dio = set_dio = 1;
if (optarg)
- use_dio = parse_switch(optarg, _("argument error"), "on", "off", NULL);
+ use_dio = ul_parse_switch(optarg, _("argument error"), "on", "off", NULL);
if (use_dio)
lo_flags |= LO_FLAGS_DIRECT_IO;
break;
diff --git a/sys-utils/tunelp.c b/sys-utils/tunelp.c
index 95a21b39e..9293ad581 100644
--- a/sys-utils/tunelp.c
+++ b/sys-utils/tunelp.c
@@ -189,24 +189,24 @@ int main(int argc, char **argv)
break;
case 'a':
cmds->op = LPABORT;
- cmds->val = parse_switch(optarg, _("argument error"), "on", "off", NULL);
+ cmds->val = ul_parse_switch(optarg, _("argument error"), "on", "off", NULL);
cmds->next = xmalloc(sizeof(struct command));
cmds = cmds->next;
cmds->next = NULL;
break;
case 'q':
- show_irq = parse_switch(optarg, _("argument error"), "on", "off", NULL);
+ show_irq = ul_parse_switch(optarg, _("argument error"), "on", "off", NULL);
break;
case 'o':
cmds->op = LPABORTOPEN;
- cmds->val = parse_switch(optarg, _("argument error"), "on", "off", NULL);
+ cmds->val = ul_parse_switch(optarg, _("argument error"), "on", "off", NULL);
cmds->next = xmalloc(sizeof(struct command));
cmds = cmds->next;
cmds->next = NULL;
break;
case 'C':
cmds->op = LPCAREFUL;
- cmds->val = parse_switch(optarg, _("argument error"), "on", "off", NULL);
+ cmds->val = ul_parse_switch(optarg, _("argument error"), "on", "off", NULL);
cmds->next = xmalloc(sizeof(struct command));
cmds = cmds->next;
cmds->next = NULL;
diff --git a/term-utils/setterm.c b/term-utils/setterm.c
index 801095c87..1941d0ca7 100644
--- a/term-utils/setterm.c
+++ b/term-utils/setterm.c
@@ -559,22 +559,22 @@ static void parse_option(struct setterm_control *ctl, int ac, char **av)
break;
case OPT_CURSOR:
ctl->opt_cursor = set_opt_flag(ctl->opt_cursor);
- ctl->opt_cu_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_cu_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_REPEAT:
ctl->opt_repeat = set_opt_flag(ctl->opt_repeat);
- ctl->opt_rep_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_rep_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_APPCURSORKEYS:
ctl->opt_appcursorkeys = set_opt_flag(ctl->opt_appcursorkeys);
- ctl->opt_appck_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_appck_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_LINEWRAP:
ctl->opt_linewrap = set_opt_flag(ctl->opt_linewrap);
- ctl->opt_li_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_li_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_DEFAULT:
@@ -598,32 +598,32 @@ static void parse_option(struct setterm_control *ctl, int ac, char **av)
break;
case OPT_INVERSESCREEN:
ctl->opt_inversescreen = set_opt_flag(ctl->opt_inversescreen);
- ctl->opt_invsc_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_invsc_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_BOLD:
ctl->opt_bold = set_opt_flag(ctl->opt_bold);
- ctl->opt_bo_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_bo_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_HALF_BRIGHT:
ctl->opt_halfbright = set_opt_flag(ctl->opt_halfbright);
- ctl->opt_hb_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_hb_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_BLINK:
ctl->opt_blink = set_opt_flag(ctl->opt_blink);
- ctl->opt_bl_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_bl_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_REVERSE:
ctl->opt_reverse = set_opt_flag(ctl->opt_reverse);
- ctl->opt_re_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_re_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_UNDERLINE:
ctl->opt_underline = set_opt_flag(ctl->opt_underline);
- ctl->opt_un_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_un_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_STORE:
@@ -632,7 +632,7 @@ static void parse_option(struct setterm_control *ctl, int ac, char **av)
case OPT_CLEAR:
ctl->opt_clear = set_opt_flag(ctl->opt_clear);
if (optarg)
- ctl->opt_cl_all = parse_switch(optarg, _("argument error"),
+ ctl->opt_cl_all = ul_parse_switch(optarg, _("argument error"),
"all", "rest", NULL);
else
ctl->opt_cl_all = 1;
@@ -667,7 +667,7 @@ static void parse_option(struct setterm_control *ctl, int ac, char **av)
break;
case OPT_MSG:
ctl->opt_msg = set_opt_flag(ctl->opt_msg);
- ctl->opt_msg_on = parse_switch(optarg, _("argument error"),
+ ctl->opt_msg_on = ul_parse_switch(optarg, _("argument error"),
"on", "off", NULL);
break;
case OPT_MSGLEVEL:
--
2.48.1

View File

@@ -0,0 +1,138 @@
From a9e56ca936c98bf7845e6637394306376fc46318 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Tue, 13 May 2025 11:32:14 +0200
Subject: [PATCH 4/4] treewide: add ul_ to parse_timestamp() function name
Signed-off-by: Karel Zak <kzak@redhat.com>
---
include/timeutils.h | 2 +-
lib/timeutils.c | 4 ++--
login-utils/last.c | 6 +++---
misc-utils/cal.c | 2 +-
sys-utils/dmesg.c | 4 ++--
sys-utils/hwclock.c | 2 +-
sys-utils/rtcwake.c | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/timeutils.h b/include/timeutils.h
index e3cd252ba..30fa99096 100644
--- a/include/timeutils.h
+++ b/include/timeutils.h
@@ -47,7 +47,7 @@ typedef uint64_t nsec_t;
#define FORMAT_TIMESTAMP_RELATIVE_MAX 256
#define FORMAT_TIMESPAN_MAX 64
-int parse_timestamp(const char *t, usec_t *usec);
+int ul_parse_timestamp(const char *t, usec_t *usec);
int get_gmtoff(const struct tm *tp);
/* flags and masks for strxxx_iso() functions */
diff --git a/lib/timeutils.c b/lib/timeutils.c
index f53ec8fee..2688f60d7 100644
--- a/lib/timeutils.c
+++ b/lib/timeutils.c
@@ -403,7 +403,7 @@ static int parse_timestamp_reference(time_t x, const char *t, usec_t *usec)
return 0;
}
-int parse_timestamp(const char *t, usec_t *usec)
+int ul_parse_timestamp(const char *t, usec_t *usec)
{
return parse_timestamp_reference(time(NULL), t, usec);
}
@@ -872,7 +872,7 @@ int main(int argc, char *argv[])
if (strcmp(argv[1], "--timestamp") == 0) {
usec_t usec = 0;
- r = parse_timestamp(argv[2], &usec);
+ r = ul_parse_timestamp(argv[2], &usec);
if (r)
errx(EXIT_FAILURE, "Can not parse '%s': %s", argv[2], strerror(-r));
ts.tv_sec = (time_t) (usec / USEC_PER_SEC);
diff --git a/login-utils/last.c b/login-utils/last.c
index bdd375063..25d79e09a 100644
--- a/login-utils/last.c
+++ b/login-utils/last.c
@@ -1054,17 +1054,17 @@ int main(int argc, char **argv)
ctl.time_fmt = LAST_TIMEFTM_CTIME;
break;
case 'p':
- if (parse_timestamp(optarg, &p) < 0)
+ if (ul_parse_timestamp(optarg, &p) < 0)
errx(EXIT_FAILURE, _("invalid time value \"%s\""), optarg);
ctl.present = (time_t) (p / 1000000);
break;
case 's':
- if (parse_timestamp(optarg, &p) < 0)
+ if (ul_parse_timestamp(optarg, &p) < 0)
errx(EXIT_FAILURE, _("invalid time value \"%s\""), optarg);
ctl.since = (time_t) (p / 1000000);
break;
case 't':
- if (parse_timestamp(optarg, &p) < 0)
+ if (ul_parse_timestamp(optarg, &p) < 0)
errx(EXIT_FAILURE, _("invalid time value \"%s\""), optarg);
ctl.until = (time_t) (p / 1000000);
break;
diff --git a/misc-utils/cal.c b/misc-utils/cal.c
index 0acf042ff..05991f9ad 100644
--- a/misc-utils/cal.c
+++ b/misc-utils/cal.c
@@ -467,7 +467,7 @@ int main(int argc, char **argv)
if (argc == 1 && !isdigit_string(*argv)) {
usec_t x;
/* cal <timestamp> */
- if (parse_timestamp(*argv, &x) == 0)
+ if (ul_parse_timestamp(*argv, &x) == 0)
now = (time_t) (x / 1000000);
/* cal <monthname> */
else if ((ctl.req.month = monthname_to_number(&ctl, *argv)) > 0)
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index dc9a2877a..cccbd4067 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -1818,13 +1818,13 @@ int main(int argc, char *argv[])
break;
case OPT_SINCE:
{
- if (parse_timestamp(optarg, &ctl.since) < 0)
+ if (ul_parse_timestamp(optarg, &ctl.since) < 0)
errx(EXIT_FAILURE, _("invalid time value \"%s\""), optarg);
break;
}
case OPT_UNTIL:
{
- if (parse_timestamp(optarg, &ctl.until) < 0)
+ if (ul_parse_timestamp(optarg, &ctl.until) < 0)
errx(EXIT_FAILURE, _("invalid time value \"%s\""), optarg);
break;
}
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 9977e0600..d42099d75 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1561,7 +1561,7 @@ int main(int argc, char **argv)
/* minimalistic GPLv2 based parser */
usec_t usec;
- if (parse_timestamp(ctl.date_opt, &usec) == 0)
+ if (ul_parse_timestamp(ctl.date_opt, &usec) == 0)
set_time = (time_t) (usec / 1000000);
#endif
else {
diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c
index d384feb64..49dab17bd 100644
--- a/sys-utils/rtcwake.c
+++ b/sys-utils/rtcwake.c
@@ -516,7 +516,7 @@ int main(int argc, char **argv)
case OPT_DATE:
{ /* alarm time, see timestamp format from manual */
usec_t p;
- if (parse_timestamp(optarg, &p) < 0)
+ if (ul_parse_timestamp(optarg, &p) < 0)
errx(EXIT_FAILURE, _("invalid time value \"%s\""), optarg);
alarm = (time_t) (p / 1000000);
break;
--
2.48.1

View File

@@ -1,3 +1,111 @@
-------------------------------------------------------------------
Thu May 29 15:21:59 UTC 2025 - Stanislav Brabec <sbrabec@suse.com>
- Add ul_ prefix to functions with common names. Fixes btrfsprogs
build failure (gh#util-linux/util-linux#3603,
util-linux-rename-common-symbols-1.patch,
util-linux-rename-common-symbols-2.patch,
util-linux-rename-common-symbols-3.patch,
util-linux-rename-common-symbols-4.patch).
-------------------------------------------------------------------
Tue May 20 14:27:14 UTC 2025 - Stanislav Brabec <sbrabec@suse.com>
- Fix segfault of findmnt (boo#1242705,
gh#util-linux/util-linux#3574,
util-linux-libblkid-econf-parse.patch).
-------------------------------------------------------------------
Thu Apr 17 18:33:03 UTC 2025 - Stanislav Brabec <sbrabec@suse.com>
- Enable mountfd support again (jsc#PED-9752).
BREAKING CHANGE
Mountfd is nearly completely compatible with the old mount. There
is a special case that cannot be handled by mountfd, and it needs
to be handled by applications:
Mountfd discriminates between physical mount layer and virtual
mount layer. Once the physical mount layer is read-only,
read-write mount on the virtual layer is not possible.
If the first mount is read only, then the physical filesystem is
mounted read-only, and later mount of the same file system as
read-write is not possible. To solve this problem, the first
mount needs to be read-only only on the virtual layer, keeping
the physical layer read-write.
The user space fix is simple:
Instead of
mount -oro
use
mount -oro=vfs
This will keep the physical layer read-write, but the virtual
file system layer (and the user space access) will be read-only.
-------------------------------------------------------------------
Mon Apr 7 21:00:58 UTC 2025 - Stanislav Brabec <sbrabec@suse.com>
- Update to version 2.41:
* agetty: Fixed an issue where issue files were not being printed
from additional locations, such as /run or /usr/lib. This
change now allows for the use of local information from /etc,
in addition to generated files from /run and
distribution-specific files from /usr/lib.
* cfdisk and sfdisk: Added support for the --sector-size command
line option.
* sfdisk: Added a new option, --discard-free.
* fdisk: Added a new command, 'T', to discard sectors.
* chrt: The --sched-runtime now supports SCHED_{OTHER,BATCH}
policies.
* column: Can now handle ANSI SGR colors inside OSC 8 hyperlink
escape codes and sequences.
* enosys: Can now dump defined filters.
* libmount:
* Added experimental support for statmount() and listmount()
syscalls.
* This new functionality can be accessed using "findmnt
--kernel=listmount".
* Added a new mount option,
X-mount.nocanonicalize[=source|target].
* Added new mount extensions to the "ro" flag (ro[=vfs,fs]).
* Added a new option, X-mount.noloop, to disable automatic loop
device creation.
* Now supports bind symlinks over symlinks.
* Reads all kernel info/warning/error messages from new API
syscalls (and mount(8) prints them).
* libuuid: Now supports RFC9562 UUIDs.
* findmnt, lsblk, and lsfd: Added a new --hyperlink command line
option to print paths as terminal hyperlinks.
* findmnt: Can now address filesystems using --id and --uniq-id
(requires listmount() kernel support).
* flock: Added support for the --fcntl command line option.
* hardlink: Can now prioritize specified trees on the command
line using --prioritize-trees.
* Can exclude sub-trees using --exclude-subtree or keep them in
the current mount using --mount.
* Duplicates can now be printed using --list-duplicates.
* hwclock: Added a new --param-index option to address position
for RTC_PARAM_{GET,SET} ioctls.
* kill: Can now decode signal masks (e.g. as used in /proc) to
signal names.
* libblkid: Made many changes to improve detection, including
exfat, GPT, LUKS2, bitlocker, etc.
* login: Added support for LOGIN_ENV_SAFELIST in /etc/login.def.
* lsfd: Now supports pidfs and AF_VSOCK sockets.
* lsipc, ipcmk, ipcrm: Now supports POSIX ipc.
* lslogins: Now supports lastlog2.
* lsns: Added support for the --filter option.
* build by meson: Now supports translated man pages and has fixed
many bugs.
* mkswap: The option --file should now be usable on btrfs.
* nsenter: Improved support for pidfd and can now join target
process's socket net namespace.
* scriptlive: Added a new option, --echo <never|always|auto>.
* zramctl: Now supports COMP-RATIO and --algorithm-params.
* Many other new features and fixes. For complete list see
https://kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes
- Update util-linux-login_defs-check.sh:
* Make instructions up to date.
* Update checksum reflecting the shadow update.
- Refresh libmount-print-a-blacklist-hint-for-unknown-filesyst.patch.
-------------------------------------------------------------------
Mon Feb 24 17:16:49 UTC 2025 - Jan Engelhardt <jengelh@inai.de>

View File

@@ -85,18 +85,18 @@ Group: Development/Languages/Python
%endif
# ulbuild == python
Version: 2.40.4
Version: 2.41
Release: 0
License: GPL-2.0-or-later
URL: https://www.kernel.org/pub/linux/utils/util-linux/
Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-%{version}.tar.xz
Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.41/util-linux-%{version}.tar.xz
Source2: util-linux-login_defs-check.sh
Source7: baselibs.conf
Source8: login.pamd
Source9: remote.pamd
Source10: su.pamd
Source11: su.default
Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-%{version}.tar.sign
Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.41/util-linux-%{version}.tar.sign
Source13: %{_name}.keyring
Source14: runuser.pamd
Source15: runuser-l.pamd
@@ -110,6 +110,16 @@ Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch
# PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion.
Patch3: util-linux-bash-completion-su-chsh-l.patch
Patch5: static_lib.patch
# PATCH-FIX-UPSTREAM util-linux-libblkid-econf-parse.patch boo1242705 gh#util-linux/util-linux#3574 sbrabec@suse.com -- Prevent segfault of findmnt caused by incorrect parsing of config file by libeconf.
Patch6: util-linux-libblkid-econf-parse.patch
# PATCH-FIX-UPSTREAM util-linux-rename-common-symbols-1.patch gh#util-linux/util-linux#3603 sbrabec@suse.com -- Add ul_ prefix to functions with common names. Fixes btrfsprogs build failure.
Patch7: util-linux-rename-common-symbols-1.patch
# PATCH-FIX-UPSTREAM util-linux-rename-common-symbols-2.patch gh#util-linux/util-linux#3603 sbrabec@suse.com -- Add ul_ prefix to functions with common names.
Patch8: util-linux-rename-common-symbols-2.patch
# PATCH-FIX-UPSTREAM util-linux-rename-common-symbols-3.patch gh#util-linux/util-linux#3603 sbrabec@suse.com -- Add ul_ prefix to functions with common names.
Patch9: util-linux-rename-common-symbols-3.patch
# PATCH-FIX-UPSTREAM util-linux-rename-common-symbols-4.patch gh#util-linux/util-linux#3603 sbrabec@suse.com -- Add ul_ prefix to functions with common names.
Patch10: util-linux-rename-common-symbols-4.patch
BuildRequires: audit-devel
BuildRequires: bc
BuildRequires: binutils-devel
@@ -185,7 +195,8 @@ Supplements: filesystem(minix)
# All login.defs variables require support from shadow side.
# Upgrade this symbol version only if new variables appear!
# Verify by shadow-login_defs-check.sh from shadow source package.
Recommends: login_defs-support-for-util-linux >= 2.37
# Use downstream version. Upstream may accept the patch later.
Recommends: login_defs-support-for-util-linux >= 4.17.4
%endif
# ulsubset == core
@@ -560,7 +571,6 @@ configure_options="$configure_options --with-systemd "
--enable-fs-paths-default="/sbin:/usr/sbin"\
--enable-static\
--with-vendordir=%{_distconfdir}\
--disable-libmount-mountfd-support\
$configure_options
%make_build
}
@@ -1020,7 +1030,9 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%core %{_bindir}/kill
%core %verify(not mode) %attr(%ul_suid,root,root) %{_bindir}/su
%core %{_bindir}/eject
%core %{_bindir}/bits
%core %{_bindir}/cal
%core %{_bindir}/coresched
%core %{_bindir}/chmem
%core %{_bindir}/choom
%core %{_bindir}/chrt
@@ -1232,6 +1244,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%core %{_mandir}/man1/kill.1.gz
%core %{_mandir}/man1/su.1.gz
%core %{_mandir}/man1/bits.1.gz
%core %{_mandir}/man1/cal.1.gz
%core %{_mandir}/man1/choom.1.gz
%core %{_mandir}/man1/chrt.1.gz
@@ -1239,6 +1252,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%core %{_mandir}/man1/colcrt.1.gz
%core %{_mandir}/man1/colrm.1.gz
%core %{_mandir}/man1/column.1.gz
%core %{_mandir}/man1/coresched.1.gz
%core %{_mandir}/man1/dmesg.1.gz
%core %{_mandir}/man1/enosys.1.gz
%core %{_mandir}/man1/eject.1.gz