aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-21 18:26:41 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-21 18:26:41 -0500
commite2a48793cbd5ca39e0b8121f52806746f428f134 (patch)
tree1874a98220ffecc5c77a4530d59a323bde30a484
parentdca78e0b8fca44061d8fa3525df292c4e961ce8c (diff)
Add coreutils aarch64 fix until upstream fixes are in place.
-rw-r--r--coreutils-8.32-aarch64_fixes-1.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/coreutils-8.32-aarch64_fixes-1.patch b/coreutils-8.32-aarch64_fixes-1.patch
new file mode 100644
index 0000000..ca50f32
--- /dev/null
+++ b/coreutils-8.32-aarch64_fixes-1.patch
@@ -0,0 +1,95 @@
+diff -Naur coreutils-8.32.orig/src/ls.c coreutils-8.32/src/ls.c
+--- coreutils-8.32.orig/src/ls.c 2020-03-01 12:30:46.000000000 +0000
++++ coreutils-8.32/src/ls.c 2021-04-18 13:14:13.298181255 +0000
+@@ -49,10 +49,6 @@
+ # include <sys/ptem.h>
+ #endif
+
+-#ifdef __linux__
+-# include <sys/syscall.h>
+-#endif
+-
+ #include <stdio.h>
+ #include <assert.h>
+ #include <setjmp.h>
+@@ -2896,7 +2892,6 @@
+ struct dirent *next;
+ uintmax_t total_blocks = 0;
+ static bool first = true;
+- bool found_any_entries = false;
+
+ errno = 0;
+ dirp = opendir (name);
+@@ -2972,7 +2967,6 @@
+ next = readdir (dirp);
+ if (next)
+ {
+- found_any_entries = true;
+ if (! file_ignored (next->d_name))
+ {
+ enum filetype type = unknown;
+@@ -3018,22 +3012,6 @@
+ if (errno != EOVERFLOW)
+ break;
+ }
+-#ifdef __linux__
+- else if (! found_any_entries)
+- {
+- /* If readdir finds no directory entries at all, not even "." or
+- "..", then double check that the directory exists. */
+- if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1
+- && errno != EINVAL)
+- {
+- /* We exclude EINVAL as that pertains to buffer handling,
+- and we've passed NULL as the buffer for simplicity.
+- ENOENT is returned if appropriate before buffer handling. */
+- file_failure (command_line_arg, _("reading directory %s"), name);
+- }
+- break;
+- }
+-#endif
+ else
+ break;
+
+diff -Naur coreutils-8.32.orig/tests/ls/removed-directory.sh coreutils-8.32/tests/ls/removed-directory.sh
+--- coreutils-8.32.orig/tests/ls/removed-directory.sh 2020-02-27 13:50:28.000000000 +0000
++++ coreutils-8.32/tests/ls/removed-directory.sh 2021-04-18 13:16:54.181279118 +0000
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ # If ls is asked to list a removed directory (e.g. the parent process's
+-# current working directory that has been removed by another process), it
+-# emits an error message.
++# current working directory has been removed by another process), it
++# should not emit an error message merely because the directory is removed.
+
+ # Copyright (C) 2020 Free Software Foundation, Inc.
+
+@@ -21,25 +21,14 @@
+ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+ print_ver_ ls
+
+-case $host_triplet in
+- *linux*) ;;
+- *) skip_ 'non linux kernel' ;;
+-esac
+-
+-LS_FAILURE=2
+-
+-cat <<\EOF >exp-err || framework_failure_
+-ls: reading directory '.': No such file or directory
+-EOF
+-
+ cwd=$(pwd)
+ mkdir d || framework_failure_
+ cd d || framework_failure_
+-rmdir ../d || framework_failure_
++rmdir ../d || skip_ "can't remove working directory on this platform"
+
+-returns_ $LS_FAILURE ls >../out 2>../err || fail=1
++ls >../out 2>../err || fail=1
+ cd "$cwd" || framework_failure_
+ compare /dev/null out || fail=1
+-compare exp-err err || fail=1
++compare /dev/null err || fail=1
+
+ Exit $fail