Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/coreutils.git#4af0c9fc89ade566f4bd78d778940112a002b8f5
This commit is contained in:
DistroBaker 2020-11-04 02:48:22 +00:00
parent b12d395039
commit 1393697bcd
3 changed files with 165 additions and 5 deletions

View File

@ -0,0 +1,48 @@
From f61085aaa37f169365c56e44f5129d0491913b6a Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 27 Aug 2020 17:52:58 -0700
Subject: [PATCH] perror, strerror_r: remove unportable tests
Problem reported by Florian Weimer in:
https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html
* tests/test-perror2.c (main):
* tests/test-strerror_r.c (main): Omit unportable tests.
Upstream-commit: 175e0bc72808d564074c4adcc72aeadb74adfcc6
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
gnulib-tests/test-perror2.c | 3 ---
gnulib-tests/test-strerror_r.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/gnulib-tests/test-perror2.c b/gnulib-tests/test-perror2.c
index 1d14eda..c6214dd 100644
--- a/gnulib-tests/test-perror2.c
+++ b/gnulib-tests/test-perror2.c
@@ -79,9 +79,6 @@ main (void)
errno = -5;
perror ("");
ASSERT (!ferror (stderr));
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
ASSERT (STREQ (msg4, str4));
free (str1);
diff --git a/gnulib-tests/test-strerror_r.c b/gnulib-tests/test-strerror_r.c
index b11d6fd..c1dbcf8 100644
--- a/gnulib-tests/test-strerror_r.c
+++ b/gnulib-tests/test-strerror_r.c
@@ -165,9 +165,6 @@ main (void)
strerror_r (EACCES, buf, sizeof buf);
strerror_r (-5, buf, sizeof buf);
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
ASSERT (STREQ (msg4, str4));
free (str1);
--
2.25.4

View File

@ -0,0 +1,104 @@
From 09400b7f7f48d8eedc0df55de8073a43bc0aac96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Tue, 27 Oct 2020 20:15:43 +0000
Subject: [PATCH 1/2] stat,tail: sync file system constants from the linux
kernel
* src/stat.c: Add magic constants for "devmem", and
"zonefs" file systems.
* NEWS: Mention the improvement.
Upstream-commit: ff80b6b0a0507e24f39cc1aad09d147f5187430b
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
src/stat.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/stat.c b/src/stat.c
index 5012622..8cd69da 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -347,6 +347,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
return "debugfs";
case S_MAGIC_DEVFS: /* 0x1373 local */
return "devfs";
+ case S_MAGIC_DEVMEM: /* 0x454D444D local */
+ return "devmem";
case S_MAGIC_DEVPTS: /* 0x1CD1 local */
return "devpts";
case S_MAGIC_DMA_BUF: /* 0x444D4142 local */
@@ -549,6 +551,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
return "z3fold";
case S_MAGIC_ZFS: /* 0x2FC12FC1 local */
return "zfs";
+ case S_MAGIC_ZONEFS: /* 0x5A4F4653 local */
+ return "zonefs";
case S_MAGIC_ZSMALLOC: /* 0x58295829 local */
return "zsmallocfs";
--
2.25.4
From d5948fd41013dfe4d2d10083111821667977c6d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Tue, 27 Oct 2020 21:04:14 +0000
Subject: [PATCH 2/2] mountlist: recognize more file system types as remote
Sync "remote" file systems from stat.c in coreutils.
Note we only consider file systems that do not use host:resource
mount source. I.e. those that don't generally use a colon when
mounting, as that case is already considered. Searching for
"<fstype> /etc/fstab" was informative for identifying these.
The full list of "remote" file systems in coreutils is currently:
acfs afs ceph cifs coda fhgfs fuseblk fusectl
gfs gfs2 gpfs ibrix k-afs lustre novell nfs nfsd
ocfs2 panfs prl_fs smb smb2 snfs vboxsf vmhgfs vxfs
Note also we do not include virtual machine file systems,
as even though they're remote to the current kernel,
they are generally not distributed to separate hosts.
* lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
"remote" file systems from stat.c in coreutils.
Upstream-commit: dd1fc46be12d671c1a9d9dc5a6fa8c766e99aa2f
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
lib/mountlist.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/mountlist.c b/lib/mountlist.c
index 7abe024..e0227b7 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -221,8 +221,9 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
#ifndef ME_REMOTE
/* A file system is "remote" if its Fs_name contains a ':'
or if (it is of type (smbfs or cifs) and its Fs_name starts with '//')
- or if it is of type (afs or auristorfs)
- or Fs_name is equal to "-hosts" (used by autofs to mount remote fs). */
+ or if it is of any other of the listed types
+ or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).
+ "VM" file systems like prl_fs or vboxsf are not considered remote here. */
# define ME_REMOTE(Fs_name, Fs_type) \
(strchr (Fs_name, ':') != NULL \
|| ((Fs_name)[0] == '/' \
@@ -230,8 +231,15 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
&& (strcmp (Fs_type, "smbfs") == 0 \
|| strcmp (Fs_type, "smb3") == 0 \
|| strcmp (Fs_type, "cifs") == 0)) \
+ || strcmp (Fs_type, "acfs") == 0 \
|| strcmp (Fs_type, "afs") == 0 \
+ || strcmp (Fs_type, "coda") == 0 \
|| strcmp (Fs_type, "auristorfs") == 0 \
+ || strcmp (Fs_type, "fhgfs") == 0 \
+ || strcmp (Fs_type, "gpfs") == 0 \
+ || strcmp (Fs_type, "ibrix") == 0 \
+ || strcmp (Fs_type, "ocfs2") == 0 \
+ || strcmp (Fs_type, "vxfs") == 0 \
|| strcmp ("-hosts", Fs_name) == 0)
#endif
--
2.25.4

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils
Version: 8.32
Release: 13%{?dist}
Release: 14%{?dist}
License: GPLv3+
Url: https://www.gnu.org/software/coreutils/
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
@ -22,6 +22,12 @@ Patch2: coreutils-8.32-leaf-opt-xfs.patch
# cp: default to --reflink=auto (#1861108)
Patch3: coreutils-8.32-cp-reflink-auto.patch
# eliminate unportable gnulib tests
Patch4: coreutils-8.32-gnulib-perror-test.patch
# df,stat,tail: recognize more file system types
Patch5: coreutils-8.32-new-fs-types.patch
# disable the test-lock gnulib test prone to deadlock
Patch100: coreutils-8.26-test-lock.patch
@ -136,6 +142,9 @@ including documentation and translations.
%prep
%autosetup -N
# will be regenerated in the build directories
rm -f src/fs.h
# will be further modified by coreutils-8.32-DIR_COLORS.patch
sed src/dircolors.hin \
-e 's| 00;36$| 01;36|' \
@ -151,10 +160,6 @@ sed src/dircolors.hin \
# apply all patches
%autopatch -p1
# replace weirdo constant in gnulib tests causing test failures on armv7hl
sed -e 's/1729576/EPERM/' \
-i gnulib-tests/test-{perror2,strerror_r}.c
(echo ">>> Fixing permissions on tests") 2>/dev/null
find tests -name '*.sh' -perm 0644 -print -exec chmod 0755 '{}' '+'
(echo "<<< done") 2>/dev/null
@ -275,6 +280,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%license COPYING
%changelog
* Tue Nov 03 2020 Kamil Dudka <kdudka@redhat.com> - 8.32-14
- df,stat,tail: recognize more file system types
* Wed Oct 14 2020 Kamil Dudka <kdudka@redhat.com> - 8.32-13
- make the %%build section idempotent