3
0
forked from pool/util-linux

Accepting request 990516 from home:Andreas_Schwab:glibc:rebuild

- linux-fs.patch: Fix conflict between <linux/fs.h> and <sys/mount.h>

OBS-URL: https://build.opensuse.org/request/show/990516
OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=466
This commit is contained in:
Jan Engelhardt 2022-07-21 17:46:13 +00:00 committed by Git OBS Bridge
parent 242896bc65
commit 02350c5c98
7 changed files with 75 additions and 0 deletions

54
linux-fs.patch Normal file
View File

@ -0,0 +1,54 @@
From 89c7c6ea6ef12722eac31c18b8fa6fbcf429525b Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Wed, 20 Jul 2022 16:55:02 +0200
Subject: [PATCH] sulogin: fix includes
* support --enable-sulogin-emergency-mount on Linux only
* don't include unnecessary linux/magic.h
* don't include linux/fs.h, sys/mount.h should be enough, otherwise
define a fallback for MS_RELATIME
Reported-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
---
configure.ac | 2 ++
login-utils/sulogin-consoles.c | 7 ++++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 824e8bbd2..51deeecd4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2615,6 +2615,8 @@ AC_ARG_ENABLE([sulogin-emergency-mount],
)
AS_IF([test "x$enable_sulogin_emergency_mount" = xyes], [
+ AS_IF([test "x$linux_os" = xyes], [ ],
+ [AC_MSG_ERROR([--enable-sulogin-emergency-mount selected for non-linux system])])
AC_DEFINE([USE_SULOGIN_EMERGENCY_MOUNT], [1],
[Should sulogin use an emergency mount of /dev and /proc?])
])
diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c
index 9ae4b2eba..9ae525556 100644
--- a/login-utils/sulogin-consoles.c
+++ b/login-utils/sulogin-consoles.c
@@ -41,10 +41,11 @@
#include <fcntl.h>
#include <unistd.h>
-#ifdef USE_SULOGIN_EMERGENCY_MOUNT
+#if defined(USE_SULOGIN_EMERGENCY_MOUNT)
# include <sys/mount.h>
-# include <linux/fs.h>
-# include <linux/magic.h>
+# ifndef MS_RELATIME
+# define MS_RELATIME (1<<21)
+# endif
# ifndef MNT_DETACH
# define MNT_DETACH 2
# endif
--
2.37.1

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jul 21 08:00:59 UTC 2022 - Andreas Schwab <schwab@suse.de>
- linux-fs.patch: Fix conflict between <linux/fs.h> and <sys/mount.h>
-------------------------------------------------------------------
Tue Mar 8 02:00:05 UTC 2022 - Stanislav Brabec <sbrabec@suse.com>

View File

@ -151,6 +151,8 @@ Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch
Patch3: util-linux-sulogin4bsc1175514.patch
# PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion.
Patch4: util-linux-bash-completion-su-chsh-l.patch
# PATH-FIX-UPSTREAM linux-fs.patch -- sulogin: fix includes
Patch5: linux-fs.patch
#
%if %build_util_linux
Supplements: filesystem(minix)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jul 21 08:00:59 UTC 2022 - Andreas Schwab <schwab@suse.de>
- linux-fs.patch: Fix conflict between <linux/fs.h> and <sys/mount.h>
-------------------------------------------------------------------
Tue Mar 8 02:00:05 UTC 2022 - Stanislav Brabec <sbrabec@suse.com>

View File

@ -151,6 +151,8 @@ Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch
Patch3: util-linux-sulogin4bsc1175514.patch
# PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion.
Patch4: util-linux-bash-completion-su-chsh-l.patch
# PATH-FIX-UPSTREAM linux-fs.patch -- sulogin: fix includes
Patch5: linux-fs.patch
#
%if %build_util_linux
Supplements: filesystem(minix)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jul 21 08:00:59 UTC 2022 - Andreas Schwab <schwab@suse.de>
- linux-fs.patch: Fix conflict between <linux/fs.h> and <sys/mount.h>
-------------------------------------------------------------------
Tue Mar 8 02:00:05 UTC 2022 - Stanislav Brabec <sbrabec@suse.com>

View File

@ -151,6 +151,8 @@ Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch
Patch3: util-linux-sulogin4bsc1175514.patch
# PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion.
Patch4: util-linux-bash-completion-su-chsh-l.patch
# PATH-FIX-UPSTREAM linux-fs.patch -- sulogin: fix includes
Patch5: linux-fs.patch
#
%if %build_util_linux
Supplements: filesystem(minix)