forked from pool/util-linux
Accepting request 833344 from home:sbrabec:branches:util-linux-multibuild
- Migrate multi-spec build to multibuild. - Change packaging from per-partes build to mini+full build. - Fix default permissions of wall and write. - Build all python flavors. - Fix error in scriptlets after migration to /usr/etc. - Update to version 2.36... - Refresh Add-documentation-on-blacklisted-modules-to-mount-8-.patch. - Drop upstreamed libeconf.patch, libmount-Avoid-triggering-autofs-in-lookup_umount_fs.patch. - util-linux-login_defs-check.sh: Perform all steps to integrate MOTD_FIRSTONLY. - Update baselibs.conf. OBS-URL: https://build.opensuse.org/request/show/833344 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=433
This commit is contained in:
parent
ece2227e4c
commit
644790947b
@ -8,12 +8,12 @@ Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
sys-utils/mount.8 | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
|
||||
index da0ac5b..c231e12 100644
|
||||
--- a/sys-utils/mount.8
|
||||
+++ b/sys-utils/mount.8
|
||||
@@ -338,6 +338,32 @@ The
|
||||
option is similar, with the restriction that the user must be
|
||||
Index: util-linux-2.36/sys-utils/mount.8
|
||||
===================================================================
|
||||
--- util-linux-2.36.orig/sys-utils/mount.8
|
||||
+++ util-linux-2.36/sys-utils/mount.8
|
||||
@@ -400,6 +400,32 @@ The
|
||||
option is similar, with the restriction that the user must be a
|
||||
member of the group of the special file.
|
||||
|
||||
+.SS Blacklisted file systems
|
||||
@ -45,6 +45,3 @@ index da0ac5b..c231e12 100644
|
||||
.SS Bind mount operation
|
||||
Remount part of the file hierarchy somewhere else. The call is:
|
||||
|
||||
--
|
||||
2.19.2
|
||||
|
||||
|
5
_multibuild
Normal file
5
_multibuild
Normal file
@ -0,0 +1,5 @@
|
||||
<multibuild>
|
||||
<package>mini</package>
|
||||
<package>standard</package>
|
||||
<package>python</package>
|
||||
</multibuild>
|
@ -1,12 +1,20 @@
|
||||
libuuid1
|
||||
libuuid-devel
|
||||
requires -libuuid-<targettype>
|
||||
requires "libuuid1-<targettype> = <version>"
|
||||
libblkid1
|
||||
libblkid-devel
|
||||
requires -libblkid-<targettype>
|
||||
requires "libblkid1-<targettype> = <version>"
|
||||
libfdisk1
|
||||
libfdisk-devel
|
||||
requires -libfdisk-<targettype>
|
||||
requires "libfdisk1-<targettype> = <version>"
|
||||
libmount1
|
||||
libmount-devel
|
||||
requires -libmount-<targettype>
|
||||
requires "libmount1-<targettype> = <version>"
|
||||
libsmartcols1
|
||||
libsmartcols-devel
|
||||
requires -libsmartcols-<targettype>
|
||||
requires "libsmartcols1-<targettype> = <version>"
|
||||
libuuid1
|
||||
libuuid-devel
|
||||
requires -libuuid-<targettype>
|
||||
requires "libuuid1-<targettype> = <version>"
|
||||
|
438
libeconf.patch
438
libeconf.patch
@ -1,438 +0,0 @@
|
||||
From 9e584ff32428b9832470d19a54bba4838f3a6c34 Mon Sep 17 00:00:00 2001
|
||||
From: Thorsten Kukuk <kukuk@suse.com>
|
||||
Date: Tue, 3 Sep 2019 15:04:43 +0200
|
||||
Subject: [PATCH 1/2] Add support for libeconf
|
||||
|
||||
---
|
||||
configure.ac | 27 ++++++
|
||||
login-utils/Makemodule.am | 36 +++++++
|
||||
login-utils/logindefs.c | 195 +++++++++++++++++++++++++++++++++++---
|
||||
login-utils/su-common.c | 7 ++
|
||||
4 files changed, 254 insertions(+), 11 deletions(-)
|
||||
|
||||
Index: util-linux-2.35.1/configure.ac
|
||||
===================================================================
|
||||
--- util-linux-2.35.1.orig/configure.ac
|
||||
+++ util-linux-2.35.1/configure.ac
|
||||
@@ -2274,6 +2274,31 @@ AS_IF([test "x$with_smack" = xyes], [
|
||||
AC_DEFINE([HAVE_SMACK], [1], [Add SMACK support])
|
||||
])
|
||||
|
||||
+AC_ARG_WITH([econf],
|
||||
+ AS_HELP_STRING([--without-econf], [do not use libeconf]),
|
||||
+ [], [with_econf=check]
|
||||
+)
|
||||
+
|
||||
+have_econf=no
|
||||
+AS_IF([test "x$with_econf" != xno], [
|
||||
+ # new version -- all libsystemd-* libs merged into libsystemd
|
||||
+ PKG_CHECK_MODULES([ECONF], [libeconf], [have_econf=yes], [have_econf=no])
|
||||
+ AS_CASE([$with_econf:$have_econf],
|
||||
+ [yes:no],
|
||||
+ [AC_MSG_ERROR([libeconf expected but libeconf not found])],
|
||||
+ [*:yes],
|
||||
+ AC_DEFINE([HAVE_LIBECONF], [1], [Define if libeconf is available])
|
||||
+ )
|
||||
+])
|
||||
+AM_CONDITIONAL([HAVE_ECONF], [test "x$have_econf" = xyes])
|
||||
+
|
||||
+AC_ARG_ENABLE([vendordir],
|
||||
+ AS_HELP_STRING([--enable-vendordir=DIR], [Direcotry for istribution provided configuration files]),,
|
||||
+ []
|
||||
+)
|
||||
+AC_SUBST([vendordir], [$enable_vendordir])
|
||||
+AM_CONDITIONAL([HAVE_VENDORDIR], [test "x$enable_vendordir" != x])
|
||||
+
|
||||
|
||||
AC_ARG_WITH([bashcompletiondir],
|
||||
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
|
||||
@@ -2527,6 +2552,7 @@ AC_MSG_RESULT([
|
||||
usrbin_execdir: ${usrbin_execdir}
|
||||
usrsbin_execdir: ${usrsbin_execdir}
|
||||
usrlib_execdir: ${usrlib_execdir}
|
||||
+ vendordir: ${enable_vendordir}
|
||||
|
||||
compiler: ${CC}
|
||||
cflags: ${CFLAGS}
|
||||
@@ -2542,6 +2568,7 @@ AC_MSG_RESULT([
|
||||
Bash completions: ${with_bashcompletiondir}
|
||||
Systemd support: ${have_systemd}
|
||||
Systemd unitdir: ${with_systemdsystemunitdir}
|
||||
+ libeconf support: ${have_econf}
|
||||
Btrfs support: ${have_btrfs}
|
||||
Wide-char support: ${build_widechar}
|
||||
|
||||
Index: util-linux-2.35.1/login-utils/Makemodule.am
|
||||
===================================================================
|
||||
--- util-linux-2.35.1.orig/login-utils/Makemodule.am
|
||||
+++ util-linux-2.35.1/login-utils/Makemodule.am
|
||||
@@ -44,6 +44,9 @@ login_SOURCES = \
|
||||
login-utils/logindefs.c \
|
||||
login-utils/logindefs.h
|
||||
login_LDADD = $(LDADD) libcommon.la -lpam
|
||||
+if HAVE_VENDORDIR
|
||||
+login_CFLAGS = $(AM_CFLAGS) -DHAVE_VENDORDIR -DVENDORDIR=\"@vendordir@\"
|
||||
+endif
|
||||
if HAVE_LINUXPAM
|
||||
login_LDADD += -lpam_misc
|
||||
endif
|
||||
@@ -53,6 +56,9 @@ endif
|
||||
if HAVE_SELINUX
|
||||
login_LDADD += -lselinux
|
||||
endif
|
||||
+if HAVE_ECONF
|
||||
+login_LDADD += -leconf
|
||||
+endif
|
||||
endif # BUILD_LOGIN
|
||||
|
||||
|
||||
@@ -121,8 +127,14 @@ chfn_SOURCES = \
|
||||
login-utils/logindefs.h \
|
||||
$(chfn_chsh_sources)
|
||||
chfn_CFLAGS = $(chfn_chsh_cflags)
|
||||
+if HAVE_VENDORDIR
|
||||
+chfn_CFLAGS += -DHAVE_VENDORDIR -DVENDORDIR=\"@vendordir@\"
|
||||
+endif
|
||||
chfn_LDFLAGS = $(chfn_chsh_ldflags)
|
||||
chfn_LDADD = $(LDADD) $(chfn_chsh_ldadd)
|
||||
+if HAVE_ECONF
|
||||
+chfn_LDADD += -leconf
|
||||
+endif
|
||||
|
||||
chsh_SOURCES = login-utils/chsh.c $(chfn_chsh_sources)
|
||||
chsh_CFLAGS = $(chfn_chsh_cflags)
|
||||
@@ -141,6 +153,9 @@ su_SOURCES = \
|
||||
login-utils/logindefs.c \
|
||||
login-utils/logindefs.h
|
||||
su_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
|
||||
+if HAVE_VENDORDIR
|
||||
+su_CFLAGS += -DHAVE_VENDORDIR -DVENDORDIR=\"@vendordir@\"
|
||||
+endif
|
||||
su_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
|
||||
su_LDADD = $(LDADD) libcommon.la -lpam
|
||||
if HAVE_LINUXPAM
|
||||
@@ -152,6 +167,9 @@ su_SOURCES += lib/pty-session.c \
|
||||
lib/monotonic.c
|
||||
su_LDADD += -lutil $(REALTIME_LIBS)
|
||||
endif
|
||||
+if HAVE_ECONF
|
||||
+su_LDADD += -leconf
|
||||
+endif
|
||||
endif # BUILD_SU
|
||||
|
||||
|
||||
@@ -174,6 +192,12 @@ runuser_SOURCES += lib/pty-session.c \
|
||||
lib/monotonic.c
|
||||
runuser_LDADD += -lutil $(REALTIME_LIBS)
|
||||
endif
|
||||
+if HAVE_ECONF
|
||||
+runuser_LDADD += -leconf
|
||||
+endif
|
||||
+if HAVE_VENDORDIR
|
||||
+runuser_CFLAGS = $(AM_CFLAGS) -DHAVE_VENDORDIR -DVENDORDIR=\"@vendordir@\"
|
||||
+endif
|
||||
endif # BUILD_RUNUSER
|
||||
|
||||
|
||||
@@ -198,6 +222,9 @@ lslogins_SOURCES = \
|
||||
login-utils/logindefs.h
|
||||
lslogins_LDADD = $(LDADD) libcommon.la libsmartcols.la
|
||||
lslogins_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir)
|
||||
+if HAVE_VENDORDIR
|
||||
+lslogins_CFLAGS += -DHAVE_VENDORDIR -DVENDORDIR=\"@vendordir@\"
|
||||
+endif
|
||||
if HAVE_SELINUX
|
||||
lslogins_LDADD += -lselinux
|
||||
endif
|
||||
@@ -205,6 +232,9 @@ if HAVE_SYSTEMD
|
||||
lslogins_LDADD += $(SYSTEMD_LIBS) $(SYSTEMD_JOURNAL_LIBS)
|
||||
lslogins_CFLAGS += $(SYSTEMD_CFLAGS) $(SYSTEMD_JOURNAL_CFLAGS)
|
||||
endif
|
||||
+if HAVE_ECONF
|
||||
+lslogins_LDADD += -leconf
|
||||
+endif
|
||||
endif # BUILD_LSLOGINS
|
||||
|
||||
if BUILD_VIPW
|
||||
@@ -237,6 +267,12 @@ test_logindefs_SOURCES = \
|
||||
login-utils/logindefs.c \
|
||||
login-utils/logindefs.h
|
||||
test_logindefs_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS)
|
||||
+if HAVE_VENDORDIR
|
||||
+test_logindefs_CPPFLAGS += -DHAVE_VENDORDIR -DVENDORDIR=\"@vendordir@\"
|
||||
+endif
|
||||
+if HAVE_ECONF
|
||||
+test_logindefs_LDADD = -leconf
|
||||
+endif
|
||||
|
||||
|
||||
install-exec-hook:
|
||||
Index: util-linux-2.35.1/login-utils/logindefs.c
|
||||
===================================================================
|
||||
--- util-linux-2.35.1.orig/login-utils/logindefs.c
|
||||
+++ util-linux-2.35.1/login-utils/logindefs.c
|
||||
@@ -38,6 +38,18 @@
|
||||
#include "pathnames.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
+
|
||||
+static void (*logindefs_loader)(void *) = NULL;
|
||||
+static void *logindefs_loader_data = NULL;
|
||||
+
|
||||
+void logindefs_set_loader(void (*loader)(void *data), void *data)
|
||||
+{
|
||||
+ logindefs_loader = loader;
|
||||
+ logindefs_loader_data = data;
|
||||
+}
|
||||
+
|
||||
+#ifndef HAVE_LIBECONF
|
||||
+
|
||||
struct item {
|
||||
char *name; /* name of the option. */
|
||||
char *value; /* value of the option. */
|
||||
@@ -48,9 +60,6 @@ struct item {
|
||||
|
||||
static struct item *list = NULL;
|
||||
|
||||
-static void (*logindefs_loader)(void *) = NULL;
|
||||
-static void *logindefs_loader_data = NULL;
|
||||
-
|
||||
void free_getlogindefs_data(void)
|
||||
{
|
||||
struct item *ptr;
|
||||
@@ -145,12 +154,6 @@ void logindefs_load_file(const char *fil
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
-void logindefs_set_loader(void (*loader)(void *data), void *data)
|
||||
-{
|
||||
- logindefs_loader = loader;
|
||||
- logindefs_loader_data = data;
|
||||
-}
|
||||
-
|
||||
static void load_defaults(void)
|
||||
{
|
||||
if (logindefs_loader)
|
||||
@@ -232,6 +235,156 @@ const char *getlogindefs_str(const char
|
||||
return ptr->value;
|
||||
}
|
||||
|
||||
+#else
|
||||
+
|
||||
+#include <libeconf.h>
|
||||
+
|
||||
+static econf_file *file = NULL;
|
||||
+
|
||||
+void free_getlogindefs_data(void)
|
||||
+{
|
||||
+ econf_free (file);
|
||||
+ file = NULL;
|
||||
+}
|
||||
+
|
||||
+#ifndef VENDORDIR
|
||||
+#define VENDORDIR NULL
|
||||
+#endif
|
||||
+
|
||||
+static void load_defaults(void)
|
||||
+{
|
||||
+ econf_err error;
|
||||
+
|
||||
+ if (file != NULL)
|
||||
+ free_getlogindefs_data();
|
||||
+
|
||||
+ if ((error = econf_readDirs(&file, VENDORDIR, "/etc",
|
||||
+ "login", "defs", "= \t", "#")))
|
||||
+ syslog(LOG_NOTICE, _("Error reading login.defs: %s"),
|
||||
+ econf_errString(error));
|
||||
+
|
||||
+ if (logindefs_loader)
|
||||
+ logindefs_loader(logindefs_loader_data);
|
||||
+
|
||||
+}
|
||||
+
|
||||
+void logindefs_load_file(const char *filename)
|
||||
+{
|
||||
+ econf_file *file_l = NULL, *file_m = NULL;
|
||||
+ char *path;
|
||||
+
|
||||
+ logindefs_loader = NULL; /* No recursion */
|
||||
+
|
||||
+#if HAVE_VENDORDIR
|
||||
+ if (asprintf (&path, VENDORDIR"/%s", filename) == -1)
|
||||
+ return;
|
||||
+ if (!econf_readFile(&file_l, path, "= \t", "#")) {
|
||||
+ if (file == NULL)
|
||||
+ file = file_l;
|
||||
+ else if (!econf_mergeFiles(&file_m, file, file_l)) {
|
||||
+ econf_free(file);
|
||||
+ file = file_m;
|
||||
+ econf_free(file_l);
|
||||
+ }
|
||||
+ }
|
||||
+ free (path);
|
||||
+#endif
|
||||
+
|
||||
+ if (asprintf (&path, "/etc/%s", filename) == -1)
|
||||
+ return;
|
||||
+ if (!econf_readFile(&file_l, path, "= \t", "#")) {
|
||||
+ if (file == NULL)
|
||||
+ file = file_l;
|
||||
+ else if (!econf_mergeFiles(&file_m, file, file_l)) {
|
||||
+ econf_free(file);
|
||||
+ file = file_m;
|
||||
+ econf_free(file_l);
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* Try original filename, could be relative */
|
||||
+ if (!econf_readFile(&file_l, filename, "= \t", "#")) {
|
||||
+ if (file == NULL)
|
||||
+ file = file_l;
|
||||
+ else if (!econf_mergeFiles(&file_m, file, file_l)) {
|
||||
+ econf_free(file);
|
||||
+ file = file_m;
|
||||
+ econf_free(file_l);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ free (path);
|
||||
+}
|
||||
+
|
||||
+int getlogindefs_bool(const char *name, int dflt)
|
||||
+{
|
||||
+ bool value;
|
||||
+ econf_err error;
|
||||
+
|
||||
+ if (!file)
|
||||
+ load_defaults();
|
||||
+
|
||||
+ if (!file)
|
||||
+ return dflt;
|
||||
+
|
||||
+ if ((error = econf_getBoolValue(file, NULL, name, &value))) {
|
||||
+ if (error != ECONF_NOKEY)
|
||||
+ syslog(LOG_NOTICE, _("couldn't fetch %s: %s"), name,
|
||||
+ econf_errString(error));
|
||||
+ return dflt;
|
||||
+ }
|
||||
+ return value;
|
||||
+}
|
||||
+
|
||||
+unsigned long getlogindefs_num(const char *name, unsigned long dflt)
|
||||
+{
|
||||
+ uint64_t value;
|
||||
+ econf_err error;
|
||||
+
|
||||
+ if (!file)
|
||||
+ load_defaults();
|
||||
+
|
||||
+ if (!file)
|
||||
+ return dflt;
|
||||
+
|
||||
+ if ((error = econf_getUInt64Value(file, NULL, name, &value))) {
|
||||
+ if (error != ECONF_NOKEY)
|
||||
+ syslog(LOG_NOTICE, _("couldn't fetch %s: %s"), name,
|
||||
+ econf_errString(error));
|
||||
+ return dflt;
|
||||
+ }
|
||||
+ return value;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Returns:
|
||||
+ * @dflt if @name not found
|
||||
+ * "" (empty string) if found, but value not defined
|
||||
+ * "string" if found
|
||||
+ */
|
||||
+const char *getlogindefs_str(const char *name, const char *dflt)
|
||||
+{
|
||||
+ char *value;
|
||||
+ econf_err error;
|
||||
+
|
||||
+ if (!file)
|
||||
+ load_defaults();
|
||||
+
|
||||
+ if (!file)
|
||||
+ return dflt;
|
||||
+
|
||||
+ if ((error = econf_getStringValue(file, NULL, name, &value))) {
|
||||
+ if (error != ECONF_NOKEY)
|
||||
+ syslog(LOG_NOTICE, _("couldn't fetch %s: %s"), name,
|
||||
+ econf_errString(error));
|
||||
+ return dflt;
|
||||
+ }
|
||||
+ if (value)
|
||||
+ return value;
|
||||
+ else
|
||||
+ return strdup("");
|
||||
+}
|
||||
+#endif /* !HAVE_LIBECONF */
|
||||
+
|
||||
/*
|
||||
* For compatibility with shadow-utils we have to support additional
|
||||
* syntax for environment variables in login.defs(5) file. The standard
|
||||
@@ -283,7 +436,6 @@ int effective_access(const char *path, i
|
||||
return fd == -1 ? -1 : 0;
|
||||
}
|
||||
|
||||
-
|
||||
/*
|
||||
* Check the per-account or the global hush-login setting.
|
||||
*
|
||||
@@ -412,12 +564,28 @@ int main(int argc, char *argv[])
|
||||
logindefs_load_file(argv[1]);
|
||||
|
||||
if (argc != 4) { /* list all */
|
||||
+#ifdef HAVE_LIBECONF
|
||||
+ int i;
|
||||
+ char *keys[] = {"END", "EMPTY", "CRAZY3", "CRAZY2", "CRAZY1",
|
||||
+ "BOOLEAN", "NUMBER", "STRING", "HELLO_WORLD",
|
||||
+ NULL};
|
||||
+
|
||||
+ for (i = 0; keys[i] != NULL; i++) {
|
||||
+ char *value = NULL;
|
||||
+
|
||||
+ econf_getStringValue(file, NULL, keys[i], &value);
|
||||
+ printf ("%s: $%s: '%s'\n", argv[1], keys[i], value);
|
||||
+ }
|
||||
+
|
||||
+ econf_free (file);
|
||||
+
|
||||
+#else
|
||||
struct item *ptr;
|
||||
|
||||
for (ptr = list; ptr; ptr = ptr->next)
|
||||
printf("%s: $%s: '%s'\n", ptr->path, ptr->name,
|
||||
ptr->value);
|
||||
-
|
||||
+#endif
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Index: util-linux-2.35.1/login-utils/su-common.c
|
||||
===================================================================
|
||||
--- util-linux-2.35.1.orig/login-utils/su-common.c
|
||||
+++ util-linux-2.35.1/login-utils/su-common.c
|
||||
@@ -90,8 +90,13 @@ UL_DEBUG_DEFINE_MASKNAMES(su) = UL_DEBUG
|
||||
#define PAM_SRVNAME_RUNUSER "runuser"
|
||||
#define PAM_SRVNAME_RUNUSER_L "runuser-l"
|
||||
|
||||
+#ifdef HAVE_LIBECONF
|
||||
+#define _PATH_LOGINDEFS_SU "default/su"
|
||||
+#define _PATH_LOGINDEFS_RUNUSER "default/runuser"
|
||||
+#else
|
||||
#define _PATH_LOGINDEFS_SU "/etc/default/su"
|
||||
#define _PATH_LOGINDEFS_RUNUSER "/etc/default/runuser"
|
||||
+#endif
|
||||
|
||||
#define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS)
|
||||
|
||||
@@ -1038,7 +1043,9 @@ static void load_config(void *data)
|
||||
struct su_context *su = (struct su_context *) data;
|
||||
|
||||
DBG(MISC, ul_debug("loading logindefs"));
|
||||
+#ifndef HAVE_LIBECONF
|
||||
logindefs_load_file(_PATH_LOGINDEFS);
|
||||
+#endif
|
||||
logindefs_load_file(su->runuser ? _PATH_LOGINDEFS_RUNUSER : _PATH_LOGINDEFS_SU);
|
||||
}
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 7065cc0e5312cafc5ae3e4c342f78f264300fb5f Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.de>
|
||||
Date: Wed, 1 Apr 2020 13:15:13 +0200
|
||||
Subject: [PATCH 1/4] libmount: Avoid triggering autofs in
|
||||
lookup_umount_fs_by_statfs
|
||||
References: boo#1168389
|
||||
Upstream: merged (gh#karelzak/util-linux#1002)
|
||||
|
||||
Currently, umount /foo results in a statfs("/foo") call, which triggers
|
||||
autofs. This can create another mountpoint on /foo, which is then unmounted
|
||||
later instead of the actual /foo at the time umount was called.
|
||||
|
||||
This is especially an issue for umount -R /bar, which just fails with
|
||||
-EBUSY as the accidental mountpoint is never accounted for and so it tries
|
||||
to umount /bar before /bar/someautofs.
|
||||
|
||||
Replace the direct statfs call with open(path, O_PATH) + fstatfs, which sees
|
||||
the autofs mount directly, without triggering it.
|
||||
---
|
||||
libmount/src/context_umount.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: util-linux-2.34/libmount/src/context_umount.c
|
||||
===================================================================
|
||||
--- util-linux-2.34.orig/libmount/src/context_umount.c
|
||||
+++ util-linux-2.34/libmount/src/context_umount.c
|
||||
@@ -283,9 +283,13 @@ static int lookup_umount_fs(struct libmn
|
||||
if (!type) {
|
||||
struct statfs vfs;
|
||||
|
||||
- DBG(CXT, ul_debugobj(cxt, "umount: trying statfs()"));
|
||||
- if (statfs(tgt, &vfs) == 0)
|
||||
+ DBG(CXT, ul_debugobj(cxt, "umount: trying fstatfs()"));
|
||||
+ /* O_PATH avoids triggering automount points. */
|
||||
+ int pathfd = open(tgt, O_PATH);
|
||||
+ if (pathfd >= 0 && fstatfs(pathfd, &vfs) == 0) {
|
||||
type = mnt_statfs_get_fstype(&vfs);
|
||||
+ close(pathfd);
|
||||
+ }
|
||||
if (type) {
|
||||
rc = mnt_fs_set_fstype(cxt->fs, type);
|
||||
if (rc)
|
@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test util-linux.spec -ot python3-libmount.spec ; then
|
||||
echo "util-linux.spec is older than python3-libmount.spec. Please merge changes manually and call pre-checkin.sh again."
|
||||
exit 1
|
||||
fi
|
||||
if test util-linux.changes -ot python3-libmount.changes ; then
|
||||
echo "util-linux.changes is older than python3-libmount.changes. Please merge changes manually and call pre-checkin.sh again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test util-linux.spec -ot util-linux-systemd.spec ; then
|
||||
echo "util-linux.spec is older than util-linux-systemd.spec. Please merge changes manually and call pre-checkin.sh again."
|
||||
exit 1
|
||||
fi
|
||||
if test util-linux.changes -ot util-linux-systemd.changes ; then
|
||||
echo "util-linux.changes is older than util-linux-systemd.changes. Please merge changes manually and call pre-checkin.sh again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed '
|
||||
s/spec file for package util-linux/spec file for package python3-libmount/;
|
||||
/^Name:/s/util-linux/python3-libmount/;
|
||||
s/WARNING: After editing this file please/WARNING: Never edit this file!!! Edit util-linux.spec and/
|
||||
' <util-linux.spec >python3-libmount.spec
|
||||
|
||||
sed '
|
||||
s/spec file for package util-linux/spec file for package util-linux-systemd/;
|
||||
/^Name:/s/util-linux/util-linux-systemd/;
|
||||
s/WARNING: After editing this file please/WARNING: Never edit this file!!! Edit util-linux.spec and/
|
||||
' <util-linux.spec >util-linux-systemd.spec
|
||||
|
||||
cp -a util-linux.changes python3-libmount.changes
|
||||
|
||||
cp -a util-linux.changes util-linux-systemd.changes
|
||||
|
||||
touch util-linux.spec util-linux.changes
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAl7FNt8ACgkQ5LcdXuw5
|
||||
woROgQ//Q79zKa/HRJ7m7E03vK9c+XoPIh7olSXvaAjgGtenljIuPGZtRHlwDHh4
|
||||
ySmcapjKvthUXNTkReTIFTMqrvehIdJhd1fAQUKQip+9YlMAzCS+RJ+hYdiC8nQk
|
||||
I/3Id50G97zbgynAAzOWtp1rnjcg9GpX6hp4/ps7J0mlR7W67JNYYkcNoFp3mqze
|
||||
zp+06mYNUb22iitdrsMR1DBtx/yIlkKgqWhtxEWWILEZ7VcqhkjByA5rTUzRTTl5
|
||||
XuDLXphc1IA+unk/IR0k/aDdCqSPEO8KaNJVNld1mQbqKz7suz/PnpILcOTDLmNN
|
||||
MSbcCfb6IsSVF0Yd6pzGRtEHT+dtph3wdzNGIj4ynFBqgQ3NVgHRRirxxknQeRbh
|
||||
B1nejDlc+O+jueykc9lDGYgHxBwDn6JMQiuc+CM6XOwrGuroVy5LAjK/YYbsnZ2G
|
||||
0oshDNA8qo9zZdTLAq+s4o2zJLY1YtecL1e+119r64WEDZZptQEjZKcDVDZG34sU
|
||||
6iwOP4ELVdwEq9itQvXOSHQshM2o3ncyXmVIkQJec0+M+jbcJc4gqnYcKXCp8SAR
|
||||
/RJRnoXOb91HWrWbcSfIgEpSz7aHuEtcYizPAKWBx2gwPcsRCB2wa2y08S6jj+ej
|
||||
4oHmDNa4jt8Sj2jNtP2m8EF83X0srxoBQmikRjuXNOi9G7CwryA=
|
||||
=zKqm
|
||||
-----END PGP SIGNATURE-----
|
BIN
util-linux-2.35.2.tar.xz
(Stored with Git LFS)
BIN
util-linux-2.35.2.tar.xz
(Stored with Git LFS)
Binary file not shown.
16
util-linux-2.36.tar.sign
Normal file
16
util-linux-2.36.tar.sign
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAl8ZXVUACgkQ5LcdXuw5
|
||||
woTpmw//dXtjAM0BwKtvVRMLx8vLZuyY54NXoX3/R/Xly4df2F/jKrU4dvaeR/ba
|
||||
eoeIqpWZjxVYZ5jWXqyaMCxvGYzLcCq+nGDdAV7j9JQPYvu70cJp3UZXGtBel8sA
|
||||
PvgzLeO9Z6r3HWF8oA4zlQX+/QUnVkIaCGsDyJs1loONxngmmgtIMG9+3vyzhVQT
|
||||
iLi2vtN96GVNabRDuW/6qo/8DtcbdW8E9k3/D3/o+TSSLqePueyVaxt482/aax6/
|
||||
ipQx6s0eYx2MNoKy2R/0QQ6nNU/ggMMCszJPKz7uU/OlfZivmybO3+9s25TwhvNg
|
||||
W4uUuEr7Ehgq6I0bGSOPm81FDhlKMSZBJOtg8xX9DwjrRwA1sEOrJHVlAmINNKZZ
|
||||
QAxG25kkXphr0ocjq4gf2wFokbqlRgMWw9UuGo7AULbsFSefP0eqK1hUC6ad+WoB
|
||||
sD03x8LNk4Y7o+0AEIiIhP6tn3IeCE+R3xEvYeU7PKR7sWO667pQEibYcOBIuWu6
|
||||
dair3ERAfF+wQ3PstUc51hUXsh74/KqeiNVZE5nLx1jlODcAfOTaAd8xhtOTEpPK
|
||||
bWB6w7QleHn3jRnnuwGEomrae9KbWE3h5DX7BDVFpigIpycu6/Rf4A9+s116sjQn
|
||||
ayGjXpBCtlMd0qMgWBwtGElxd9bOKT8JyOiOFheM9AlfKrQbbDw=
|
||||
=PsGj
|
||||
-----END PGP SIGNATURE-----
|
BIN
util-linux-2.36.tar.xz
(Stored with Git LFS)
Normal file
BIN
util-linux-2.36.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -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/ .*$//') != ca9ea2bf3ee8c8c0c623ace938cdf0f04869f8cf ; then
|
||||
if test $(sha1sum util-linux-login_defs-vars.lst | sed 's/ .*$//') != bdea2548d823e727ddf2cc3318dfce4aa6a9b48f ; then
|
||||
|
||||
echo "does not match!" >&2
|
||||
echo "Checksum is: $(sha1sum util-linux-login_defs-vars.lst | sed 's/ .*$//')" >&2
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,51 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 8 00:10:31 UTC 2020 - Stanislav Brabec <sbrabec@suse.com>
|
||||
|
||||
- Migrate multi-spec build to multibuild.
|
||||
- Change packaging from per-partes build to mini+full build.
|
||||
- Fix default permissions of wall and write.
|
||||
- Build all python flavors.
|
||||
- Fix error in scriptlets after migration to /usr/etc.
|
||||
- Update to version 2.36:
|
||||
* blkdiscard(8) refuses to proceed if filesystem or RAID
|
||||
signatures are found in interactive mode (executed on a
|
||||
terminal). The option --force is required to the discard
|
||||
data.
|
||||
* new commands irqtop(1) and lsirq(1)to monitor kernel
|
||||
interrupts.
|
||||
* cal(1) provides a new --vertical command line option.
|
||||
* blkzone(8) implements open/close/finish commands now.
|
||||
* unshare(1) and nsenter(1) commands support the time namespace
|
||||
now.
|
||||
* agetty(8) now supports multiple paths in the option
|
||||
--issue-file.
|
||||
* fdisk(8), sfdisk(8), cfdisk(8), mkswap(8) and wipefs(8) now
|
||||
support block devices locking by flock(2), new command line
|
||||
option --lock and $LOCK_BLOCK_DEVICE environmental variable.
|
||||
* dmesg(1) new command line option --follow-new to wait and
|
||||
print only new kernel messages.
|
||||
* fdisk(8) new command line option --list-details and
|
||||
--noauto-pt.
|
||||
* fdisk(8) and sfdisk(8) support user-friendly aliases for
|
||||
partition types.
|
||||
* fstrim(8) supports new command line option --listed-in.
|
||||
* libfdisk provides API to relocate GPT backup header. New
|
||||
command line option "sfdisk --relocate".
|
||||
* mount(8) now supports mount by ID= tag.
|
||||
* login(1) supports list of "message of the day".
|
||||
* All tools which read /etc/login.defs is possible to compile
|
||||
with libeconf now.
|
||||
* more(1) has been refactored.
|
||||
* man pages cleanup
|
||||
* other fixes and improvements, see:
|
||||
https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36-ReleaseNotes
|
||||
- Refresh Add-documentation-on-blacklisted-modules-to-mount-8-.patch.
|
||||
- Drop upstreamed libeconf.patch,
|
||||
libmount-Avoid-triggering-autofs-in-lookup_umount_fs.patch.
|
||||
- util-linux-login_defs-check.sh: Perform all steps to integrate
|
||||
MOTD_FIRSTONLY.
|
||||
- Update baselibs.conf.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 22 11:15:01 UTC 2020 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
|
870
util-linux.spec
870
util-linux.spec
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user