From b3f37b0f2b4d749bf2b32d225d16732ba2842fb7bb71c7f8977cf60a67c9446d Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Sun, 5 Jan 2025 01:56:02 +0000 Subject: [PATCH] [info=7c038e86c636e915f24991a04859286d25213a6c34932d623636efffdd11c0c9] OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=578 --- _scmsync.obsinfo | 7 +- build.specials.obscpio | 2 +- util-linux-agetty-prevent-cursor-escape.patch | 44 ----- util-linux-lscpu-skip-aarch64-decode.patch | 158 ------------------ ...t-losetup-lazy-destruction-generated.patch | 22 --- ...inux-umount-losetup-lazy-destruction.patch | 41 ----- util-linux.changes | 21 +-- util-linux.spec | 8 - 8 files changed, 6 insertions(+), 297 deletions(-) delete mode 100644 util-linux-agetty-prevent-cursor-escape.patch delete mode 100644 util-linux-lscpu-skip-aarch64-decode.patch delete mode 100644 util-linux-umount-losetup-lazy-destruction-generated.patch delete mode 100644 util-linux-umount-losetup-lazy-destruction.patch diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo index 3c4811e..617316c 100644 --- a/_scmsync.obsinfo +++ b/_scmsync.obsinfo @@ -1,4 +1,3 @@ -mtime: 1732123801 -commit: 1f607dd355d8ca2a0fa48e4d3662cad355a81b877985b076ecc7a1527d45771c -url: https://src.opensuse.org/jengelh/util-linux -revision: master +mtime: 1729777229 +commit: 7c038e86c636e915f24991a04859286d25213a6c34932d623636efffdd11c0c9 +url: https://src.opensuse.org/pool/util-linux diff --git a/build.specials.obscpio b/build.specials.obscpio index 7d92058..ad4e019 100644 --- a/build.specials.obscpio +++ b/build.specials.obscpio @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61a765e8d466450446dd85c699160cfc02aab7dfe35927dbede2111c3afe94f2 +oid sha256:f313eb3063a9b8684f6f58e30e7400d5d8fbca44677fad05038ed2667ad8d0af size 256 diff --git a/util-linux-agetty-prevent-cursor-escape.patch b/util-linux-agetty-prevent-cursor-escape.patch deleted file mode 100644 index 1b8ba3c..0000000 --- a/util-linux-agetty-prevent-cursor-escape.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 20b405c0fea29675e1fb54b894eb1c18459f9d50 Mon Sep 17 00:00:00 2001 -From: Stanislav Brabec -Date: Sun, 21 Jul 2024 15:01:42 +0200 -Subject: [PATCH] agetty: Prevent cursor escape - -Starting with 5de97519, it is possible to escape the login dialog on the -screen by arrow characters or using escape sequences. - -Since full processing of escape sequences and ignore them would be -complicated, use a work around: instead of sending ESC to output, send a -printable character. - -It could cause a rendering regression in a very obscure condition: compiled -without IUTF8, encoding is ISO-11548-1 and BRAILLE PATTERN DOTS-1245 is -part of login name. I believe that it is out of supported combinations. - -Signed-off-by: Stanislav Brabec ---- - term-utils/agetty.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/term-utils/agetty.c b/term-utils/agetty.c -index b28b197ff..500e0992f 100644 ---- a/term-utils/agetty.c -+++ b/term-utils/agetty.c -@@ -2289,7 +2289,14 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t - if ((size_t)(bp - logname) >= sizeof(logname) - 1) - log_err(_("%s: input overrun"), op->tty); - if ((tp->c_lflag & ECHO) == 0) -- write_all(1, &c, 1); /* echo the character */ -+ /* Visualize escape sequence instead of its execution */ -+ if (ascval == CTL('[')) -+ /* Ideally it should be "\xe2\x90\x9b" -+ * if (op->flags & (F_UTF8)), -+ * but only some fonts contain it */ -+ write_all(1, "^[", 2); -+ else -+ write_all(1, &c, 1); /* echo the character */ - *bp++ = ascval; /* and store it */ - break; - } --- -2.45.2 - diff --git a/util-linux-lscpu-skip-aarch64-decode.patch b/util-linux-lscpu-skip-aarch64-decode.patch deleted file mode 100644 index 0db9e14..0000000 --- a/util-linux-lscpu-skip-aarch64-decode.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 50a3efab6d126b28fcdcc28f1a0cd5cd596ae357 Mon Sep 17 00:00:00 2001 -From: "Pratik R. Sampat" -Date: Mon, 22 Jul 2024 16:00:46 +0000 -Subject: [PATCH] lscpu: Skip aarch64 decode path for rest of the architectures - -lscpu behaves differently when run sudo vs non-sudo on AMD architectures. - -On sudo runs, it adds a BIOS model name and BIOS CPU family which it -does not add for the latter. However since this parsing from the DMI is -primarily catered to aarch64, for AMD platform the BIOS model name is -printed out as follows "AMD XXX Processor *Unknown* CPU @ X.XGHz" due -to the part number is not populated on the platform. - -The issue boils down to an unconditional call to arm_decode() which -attempts to read the DMI path and populate the processor information -such as processor version and part number which is set to Unknown on AMD -CPUs. - -81d6de9 (lscpu: remove the old code) changed the DMI path from -/sys/firmware/dmi/entries/4-0/raw (non-existent) to -/sys/firmware/dmi/tables/dmi (existent) which has brought this latent -issue to light as DMI was starting to be parsed incorrectly. - -Therefore, do not perform aarch64 parsing for other architectures. - -Before ------- -$ lscpu -Vendor ID: AuthenticAMD - Model name: AMD EPYC XXXX X-Core Processor - CPU family: 26 - -$ sudo lscpu -Vendor ID: AuthenticAMD - BIOS Vendor ID: Advanced Micro Devices, Inc. - Model name: AMD EPYC XXXX X-Core Processor - BIOS Model name: AMD EPYC XXXX X-Core Processor Unknown CPU @ X.XGHz - BIOS CPU family: 107 - CPU family: 26 - -After ------ -$ lscpu -Vendor ID: AuthenticAMD - Model name: AMD EPYC XXXX X-Core Processor - CPU family: 26 - -$ sudo lscpu -Vendor ID: AuthenticAMD - Model name: AMD EPYC XXXX X-Core Processor - CPU family: 26 - -Fixes: 81d6de9 ("lscpu: remove the old code") -Co-developed-by: Karel Zak -Signed-off-by: Karel Zak -Signed-off-by: Pratik R. Sampat ---- - sys-utils/lscpu-arm.c | 37 ++++++++++++++++++++++++++++++++++++- - sys-utils/lscpu.c | 3 ++- - sys-utils/lscpu.h | 2 ++ - 3 files changed, 40 insertions(+), 2 deletions(-) - -Contains parts of: -commit 5d1129e6879a05aa9ac5804ffc8ace22cda735c1 -Author: Karel Zak -Date: Mon Jul 29 10:21:28 2024 +0200 - -Index: util-linux-2.39.3/sys-utils/lscpu-arm.c -=================================================================== ---- util-linux-2.39.3.orig/sys-utils/lscpu-arm.c -+++ util-linux-2.39.3/sys-utils/lscpu-arm.c -@@ -332,14 +332,49 @@ static int parse_id(const char *str) - - #define parse_model_id(_cxt) (parse_id((_cxt)->model)) - -+static inline int get_implementer_id(struct lscpu_cputype *ct) -+{ -+ if (ct->vendor_id) -+ return ct->vendor_id; -+ return parse_id(ct->vendor); -+} -+ - static inline int parse_implementer_id(struct lscpu_cputype *ct) - { -+ int id; -+ - if (ct->vendor_id) - return ct->vendor_id; -- ct->vendor_id = parse_id(ct->vendor); -+ id = get_implementer_id(ct); -+ if (id <= 0) -+ return id; -+ -+ ct->vendor_id = id; - return ct->vendor_id; - } - -+int is_arm(struct lscpu_cxt *cxt) -+{ -+ size_t i; -+ -+ if (is_live(cxt)) -+ return strcmp(cxt->arch->name, "aarch64") == 0; -+ -+ /* dump; assume ARM if vendor ID is known */ -+ for (i = 0; i < cxt->ncputypes; i++) { -+ -+ int j, id = get_implementer_id(cxt->cputypes[i]); -+ if (id <= 0) -+ continue; -+ for (j = 0; hw_implementer[j].id != -1; j++) { -+ if (hw_implementer[j].id == id) -+ return 1; -+ } -+ } -+ -+ return 0; -+} -+ - /* - * Use model and vendor IDs to decode to human readable names. - */ -Index: util-linux-2.39.3/sys-utils/lscpu.c -=================================================================== ---- util-linux-2.39.3.orig/sys-utils/lscpu.c -+++ util-linux-2.39.3/sys-utils/lscpu.c -@@ -1371,7 +1371,8 @@ int main(int argc, char *argv[]) - lscpu_read_numas(cxt); - lscpu_read_topology(cxt); - -- lscpu_decode_arm(cxt); -+ if (is_arm(cxt)) -+ lscpu_decode_arm(cxt); - - cxt->virt = lscpu_read_virtualization(cxt); - -Index: util-linux-2.39.3/sys-utils/lscpu.h -=================================================================== ---- util-linux-2.39.3.orig/sys-utils/lscpu.h -+++ util-linux-2.39.3/sys-utils/lscpu.h -@@ -252,6 +252,8 @@ struct lscpu_cxt { - int is_cluster; /* For aarch64 if the machine doesn't have ACPI PPTT */ - }; - -+#define is_live(_cxt) (!(_cxt)->noalive) -+ - #define is_cpu_online(_cxt, _cpu) \ - ((_cxt) && (_cpu) && (_cxt)->online && \ - CPU_ISSET_S((_cpu)->logical_id, (_cxt)->setsize, (_cxt)->online)) -@@ -260,6 +262,8 @@ struct lscpu_cxt { - ((_cxt) && (_cpu) && (_cxt)->present && \ - CPU_ISSET_S((_cpu)->logical_id, (_cxt)->setsize, (_cxt)->present)) - -+int is_arm(struct lscpu_cxt *cxt); -+ - struct lscpu_cputype *lscpu_new_cputype(void); - void lscpu_ref_cputype(struct lscpu_cputype *ct); - void lscpu_unref_cputype(struct lscpu_cputype *ct); diff --git a/util-linux-umount-losetup-lazy-destruction-generated.patch b/util-linux-umount-losetup-lazy-destruction-generated.patch deleted file mode 100644 index bd33fa0..0000000 --- a/util-linux-umount-losetup-lazy-destruction-generated.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- util-linux-2.39.3/sys-utils/umount.8 2023-12-04 20:34:55.708989211 +0100 -+++ util-linux-2.39.3.patched/sys-utils/umount.8 2024-08-01 19:46:58.227874568 +0200 -@@ -156,6 +156,8 @@ - The \fBumount\fP command will automatically detach loop device previously initialized by \fBmount\fP(8) command independently of \fI/etc/mtab\fP. - .sp - In this case the device is initialized with "autoclear" flag (see \fBlosetup\fP(8) output for more details), otherwise it\(cqs necessary to use the option \fB\-\-detach\-loop\fP or call \fBlosetup \-d\fP \fIdevice\fP. The autoclear feature is supported since Linux 2.6.25. -+.sp -+Note that since Linux v3.7 kernel uses "lazy device destruction". The system just marks the loop device by autoclear flag and destroys it later. If you need to wait for a complete removal of the loop device, call \fBudevadm settle\fP after \fBumount\fP. - .SH "EXTERNAL HELPERS" - .sp - The syntax of external unmount helpers is: ---- util-linux-2.39.3/sys-utils/losetup.8 2023-12-04 20:34:54.926993943 +0100 -+++ util-linux-2.39.3.patched/sys-utils/losetup.8 2024-08-01 19:37:02.084188151 +0200 -@@ -74,7 +74,7 @@ - .sp - \fB\-d\fP, \fB\-\-detach\fP \fIloopdev\fP... - .RS 4 --Detach the file or device associated with the specified loop device(s). Note that since Linux v3.7 kernel uses "lazy device destruction". The detach operation does not return \fBEBUSY\fP error anymore if device is actively used by system, but it is marked by autoclear flag and destroyed later. -+Detach the file or device associated with the specified loop device(s). Note that since Linux v3.7 kernel uses "lazy device destruction". The detach operation does not return \fBEBUSY\fP error anymore if device is actively used by system, but it is marked by autoclear flag and destroyed later. Even if the device is not used, the loop device can be destroyed later. If you need to wait for a complete removal of the loop device, call \fBudevadm settle\fP after \fBlosetup\fP. - .RE - .sp - \fB\-D\fP, \fB\-\-detach\-all\fP diff --git a/util-linux-umount-losetup-lazy-destruction.patch b/util-linux-umount-losetup-lazy-destruction.patch deleted file mode 100644 index 590bfbe..0000000 --- a/util-linux-umount-losetup-lazy-destruction.patch +++ /dev/null @@ -1,41 +0,0 @@ -From fc67f18be51f57ee9a59a0f8f7ad16f284a24a3e Mon Sep 17 00:00:00 2001 -From: Stanislav Brabec -Date: Wed, 19 Jun 2024 17:31:34 +0200 -Subject: [PATCH] umount, losetup: Document loop destroy behavior - -The loop device detach runs asynchronously in the background. It can cause -unexpected errors. Document the possible existence of the loop device after -exit of losetup -d or umount and need of "udevadm settle". - -Signed-off-by: Stanislav Brabec ---- - sys-utils/losetup.8.adoc | 2 +- - sys-utils/umount.8.adoc | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -Index: util-linux-2.39.3/sys-utils/losetup.8.adoc -=================================================================== ---- util-linux-2.39.3.orig/sys-utils/losetup.8.adoc -+++ util-linux-2.39.3/sys-utils/losetup.8.adoc -@@ -54,7 +54,7 @@ The _size_ and _offset_ arguments may be - Show the status of all loop devices. Note that not all information is accessible for non-root users. See also *--list*. The old output format (as printed without *--list*) is deprecated. - - *-d*, *--detach* _loopdev_...:: --Detach the file or device associated with the specified loop device(s). Note that since Linux v3.7 kernel uses "lazy device destruction". The detach operation does not return *EBUSY* error anymore if device is actively used by system, but it is marked by autoclear flag and destroyed later. -+Detach the file or device associated with the specified loop device(s). Note that since Linux v3.7 kernel uses "lazy device destruction". The detach operation does not return *EBUSY* error anymore if device is actively used by system, but it is marked by autoclear flag and destroyed later. Even if the device is not used, the loop device can be destroyed later. If you need to wait for a complete removal of the loop device, call *udevadm settle* after *losetup*. - - *-D*, *--detach-all*:: - Detach all associated loop devices. -Index: util-linux-2.39.3/sys-utils/umount.8.adoc -=================================================================== ---- util-linux-2.39.3.orig/sys-utils/umount.8.adoc -+++ util-linux-2.39.3/sys-utils/umount.8.adoc -@@ -127,6 +127,8 @@ The *umount* command will automatically - - In this case the device is initialized with "autoclear" flag (see *losetup*(8) output for more details), otherwise it's necessary to use the option *--detach-loop* or call *losetup -d* _device_. The autoclear feature is supported since Linux 2.6.25. - -+Note that since Linux v3.7 kernel uses "lazy device destruction". The system just marks the loop device by autoclear flag and destroys it later. If you need to wait for a complete removal of the loop device, call *udevadm settle* after *umount*. -+ - == EXTERNAL HELPERS - - The syntax of external unmount helpers is: diff --git a/util-linux.changes b/util-linux.changes index a12f7e3..83b88a8 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,14 +1,3 @@ -------------------------------------------------------------------- -Sun Nov 17 21:06:01 UTC 2024 - Stanislav Brabec - -- Skip aarch64 decode path for rest of the architectures - (bsc#1229476, util-linux-lscpu-skip-aarch64-decode.patch). -- agetty: Prevent login cursor escape (bsc#1194818, - util-linux-agetty-prevent-cursor-escape.patch). -- Document unexpected side effects of lazy destruction - (bsc#1159034, util-linux-umount-losetup-lazy-destruction.patch, - util-linux-umount-losetup-lazy-destruction-generated.patch). - ------------------------------------------------------------------- Mon Oct 21 23:25:19 UTC 2024 - Stanislav Brabec @@ -23,7 +12,6 @@ Mon Aug 5 22:14:13 UTC 2024 - Stanislav Brabec * libmount: improving robustness in reading kernel messages, add pidfs to pseudo fs list * lscpu: New Arm Cortex part numbers - fix hang of lscpu -e (bsc#1225598) * lsfd: Refactor the pidfd logic, support pidfs (obsoletes 0001-include-Include-unistd.h-in-pidfd-utils.h-for-syscal.patch, @@ -123,7 +111,7 @@ Thu Apr 4 12:27:18 UTC 2024 - Thorsten Kukuk * blockdev: add support for BLKGETZONESZ * cfdisk: ask y/n before wipe * cfdisk: properly handle out-of-order partitions during resize - * chcpu: document limitations of -g (bsc#1218609) + * chcpu: document limitations of -g * chsh: use libeconf to read /etc/shells * column: fix -l * column: fix memory leak @@ -146,12 +134,10 @@ Thu Apr 4 12:27:18 UTC 2024 - Thorsten Kukuk * lsblk: add --highlight * lsblk: add --list-columns * lsclocks: new command to show clocks - * lscpu: even more Arm part numbers (bsc#1223605) + * lscpu: even more Arm part numbers * mkfs.minix: handle 64bit time on 32bit system * mkswap: implement --file * mkswap: implement --offset - * more: clea processes not cleaned up after failed SSH session - using up 100% CPU (bsc#1220117) * mount: add --map-users and --map-groups convenience options * nsenter: add option `-c` to join the cgroup of target process * setarch: add riscv64/riscv32 support @@ -159,8 +145,6 @@ Thu Apr 4 12:27:18 UTC 2024 - Thorsten Kukuk * uuidd: add cont_clock persistence * uuidgen: add option --count * wall: query logind for list of users with tty (#2088) - properly neutralize escape sequences (bsc#1221831, - CVE-2024-28085) * write: query logind for list of users with tty (#2088) * libuuid: improved support for 64-bit time - skip-lsfd-tests-PR2888.patch: skip some lsfd tests which OBS does @@ -280,7 +264,6 @@ Fri Jul 28 14:47:15 UTC 2023 - Goldwyn Rodrigues - Re-add 0001-Revert-libblkid-try-LUKS2-first-when-probing.patch because the patch is not in 2.39.1 - (bsc#1224393, boo#1213227, boo#1213361) ------------------------------------------------------------------- Wed Jul 26 01:22:20 UTC 2023 - Neil Brown diff --git a/util-linux.spec b/util-linux.spec index ff4c5d1..128b424 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -110,14 +110,6 @@ 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-umount-losetup-lazy-destruction.patch bsc1159034 sbrabec@suse.com -- Document unexpected side effects of lazy destruction. -Patch12: util-linux-umount-losetup-lazy-destruction.patch -# PATCH-FIX-UPSTREAM util-linux-umount-losetup-lazy-destruction-generated.patch bsc1159034 sbrabec@suse.com -- Document unexpected side effects of lazy destruction. (patch generated file) -Patch13: util-linux-umount-losetup-lazy-destruction-generated.patch -# PATCH-FIX-UPSTREAM util-linux-agetty-prevent-cursor-escape.patch bsc1194818 sbrabec@suse.com -- Prevent cursor escape using arrows or escape sequences. -Patch14: util-linux-agetty-prevent-cursor-escape.patch -# PATCH-FIX-UPSTREAM util-linux-lscpu-skip-aarch64-decode.patch bsc1229476 sbrabec@suse.com -- Skip aarch64 decode path for rest of the architectures. -Patch15: util-linux-lscpu-skip-aarch64-decode.patch BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel