diff --git a/linux-fs.patch b/linux-fs.patch new file mode 100644 index 0000000..273183d --- /dev/null +++ b/linux-fs.patch @@ -0,0 +1,54 @@ +From 89c7c6ea6ef12722eac31c18b8fa6fbcf429525b Mon Sep 17 00:00:00 2001 +From: Karel Zak +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 +Signed-off-by: Karel Zak +--- + 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 + #include + +-#ifdef USE_SULOGIN_EMERGENCY_MOUNT ++#if defined(USE_SULOGIN_EMERGENCY_MOUNT) + # include +-# include +-# include ++# ifndef MS_RELATIME ++# define MS_RELATIME (1<<21) ++# endif + # ifndef MNT_DETACH + # define MNT_DETACH 2 + # endif +-- +2.37.1 + diff --git a/python3-libmount.changes b/python3-libmount.changes index 77e478c..f164c07 100644 --- a/python3-libmount.changes +++ b/python3-libmount.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 21 08:00:59 UTC 2022 - Andreas Schwab + +- linux-fs.patch: Fix conflict between and + ------------------------------------------------------------------- Tue Mar 8 02:00:05 UTC 2022 - Stanislav Brabec diff --git a/python3-libmount.spec b/python3-libmount.spec index 949a7b1..d74d16a 100644 --- a/python3-libmount.spec +++ b/python3-libmount.spec @@ -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) diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 77e478c..f164c07 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 21 08:00:59 UTC 2022 - Andreas Schwab + +- linux-fs.patch: Fix conflict between and + ------------------------------------------------------------------- Tue Mar 8 02:00:05 UTC 2022 - Stanislav Brabec diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 78bfe0a..513c2de 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -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) diff --git a/util-linux.changes b/util-linux.changes index 77e478c..f164c07 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 21 08:00:59 UTC 2022 - Andreas Schwab + +- linux-fs.patch: Fix conflict between and + ------------------------------------------------------------------- Tue Mar 8 02:00:05 UTC 2022 - Stanislav Brabec diff --git a/util-linux.spec b/util-linux.spec index ce493b4..dc6c4b7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -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)