1
0
forked from pool/util-linux

Accepting request 1121506 from Base:System

- Add patch setterm-resize-uninit-flags.patch
- move metadata into patches

OBS-URL: https://build.opensuse.org/request/show/1121506
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=278
This commit is contained in:
Ana Guerrero 2023-11-02 19:19:55 +00:00 committed by Git OBS Bridge
commit fe1e0140a7
7 changed files with 60 additions and 5 deletions

View File

@ -2,6 +2,7 @@ From 93ba7961779789217a1f814ce3110ff8c040c8c3 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de> From: Fabian Vogt <fvogt@suse.de>
Date: Wed, 12 Jul 2023 15:48:27 +0200 Date: Wed, 12 Jul 2023 15:48:27 +0200
Subject: [PATCH] Revert "libblkid: try LUKS2 first when probing" Subject: [PATCH] Revert "libblkid: try LUKS2 first when probing"
References: https://github.com/util-linux/util-linux/pull/2373
mdadm superblocks before 1.1 are placed at the end of the device, which mdadm superblocks before 1.1 are placed at the end of the device, which
means that the data contained inside the array starts at offset 0. For means that the data contained inside the array starts at offset 0. For

View File

@ -1,3 +1,7 @@
From: Werner Fink <werner@suse.de>
Date: 2013-06-06 08:27:43+0000
Subject: let `su' handle /sbin and /usr/sbin in path
Index: util-linux-2.31/login-utils/su-common.c Index: util-linux-2.31/login-utils/su-common.c
=================================================================== ===================================================================
--- util-linux-2.31.orig/login-utils/su-common.c --- util-linux-2.31.orig/login-utils/su-common.c

View File

@ -0,0 +1,39 @@
From: Chris Hofstaedtler <zeha@debian.org>
Date: Mon, 30 Oct 2023 22:59:33 +0100
Subject: setterm: avoid restoring flags from uninitialized memory
References: https://salsa.debian.org/debian/util-linux/-/raw/master/debian/patches/debian/setterm-resize-uninit-flags.patch?inline=false
Depending on the used compiler and flags, previously either F_SETFL was called
with 0 or with a random value. Never with the intended previous flags.
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
---
term-utils/setterm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/term-utils/setterm.c b/term-utils/setterm.c
index 22afc76..a477d5d 100644
--- a/term-utils/setterm.c
+++ b/term-utils/setterm.c
@@ -846,7 +846,11 @@ static void tty_raw(struct termios *saved_attributes, int *saved_fl)
{
struct termios tattr;
- fcntl(STDIN_FILENO, F_GETFL, saved_fl);
+ *saved_fl = fcntl(STDIN_FILENO, F_GETFL);
+ if (*saved_fl == -1) {
+ err(EXIT_FAILURE, _("fcntl failed: %s"),
+ strerror(errno));
+ }
tcgetattr(STDIN_FILENO, saved_attributes);
fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK);
memcpy(&tattr, saved_attributes, sizeof(struct termios));
@@ -898,7 +902,7 @@ static int resizetty(void)
ssize_t rc;
struct winsize ws;
struct termios saved_attributes;
- int saved_fl;
+ int saved_fl = 0;
if (!isatty(STDIN_FILENO))
errx(EXIT_FAILURE, _("stdin does not refer to a terminal"));

View File

@ -1,3 +1,7 @@
From: Thorsten Kukuk <kukuk@suse.com>
Date: 2023-08-17 08:03:09+0000
References: https://github.com/util-linux/util-linux/pull/2100
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index d631b062d2..17d3ab703b 100644 index d631b062d2..17d3ab703b 100644
--- a/configure.ac --- a/configure.ac

View File

@ -1,3 +1,8 @@
From: Stanislav Brabec <sbrabec@suse.com>
Date: 2022-03-03 03:22:45+0000
References: bugzilla.suse.com/1172427
Subject: Fix "su -s" bash completion.
su -s <TAB> completion depends on "chsh -l" present in the su -s <TAB> completion depends on "chsh -l" present in the
util-linux implementation of chsh. But SUSE uses chsh from shadow util-linux implementation of chsh. But SUSE uses chsh from shadow
package that does not include this feature. Use /etc/shells package that does not include this feature. Use /etc/shells

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Oct 31 13:20:38 UTC 2023 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Add patch:
* setterm-resize-uninit-flags.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 8 20:13:24 UTC 2023 - Antonio Teixeira <antonio.teixeira@suse.com> Fri Sep 8 20:13:24 UTC 2023 - Antonio Teixeira <antonio.teixeira@suse.com>

View File

@ -104,18 +104,14 @@ Source14: runuser.pamd
Source15: runuser-l.pamd Source15: runuser-l.pamd
Source16: su-l.pamd Source16: su-l.pamd
Source51: blkid.conf Source51: blkid.conf
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch
Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch 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 Patch3: util-linux-bash-completion-su-chsh-l.patch
# https://github.com/util-linux/util-linux/pull/2373
Patch4: 0001-Revert-libblkid-try-LUKS2-first-when-probing.patch Patch4: 0001-Revert-libblkid-try-LUKS2-first-when-probing.patch
# PATCH-FIX-UPSTREAM util-linux-fix-tests-with-64k-pagesize.patch -- fadvise: fix tests with 64k pagesize
Patch5: util-linux-fix-tests-with-64k-pagesize.patch Patch5: util-linux-fix-tests-with-64k-pagesize.patch
# https://github.com/util-linux/util-linux/pull/2100
Patch6: use-logind-not-utmp.patch Patch6: use-logind-not-utmp.patch
Patch7: setterm-resize-uninit-flags.patch
BuildRequires: audit-devel BuildRequires: audit-devel
BuildRequires: bc BuildRequires: bc