new upstream release 9.1
This commit is contained in:
parent
1f19874524
commit
9325dbbef7
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/coreutils-[0-9.]*.tar.xz
|
||||
/coreutils-[0-9.]*.tar.xz.sig
|
||||
|
@ -1,20 +0,0 @@
|
||||
diff --git a/src/date.c b/src/date.c
|
||||
index ddb011e..619a72b 100644
|
||||
--- a/src/date.c
|
||||
+++ b/src/date.c
|
||||
@@ -494,14 +494,7 @@ main (int argc, char **argv)
|
||||
format = DATE_FMT_LANGINFO ();
|
||||
if (! *format)
|
||||
{
|
||||
- /* Do not wrap the following literal format string with _(...).
|
||||
- For example, suppose LC_ALL is unset, LC_TIME=POSIX,
|
||||
- and LANG="ko_KR". In that case, POSIX says that LC_TIME
|
||||
- determines the format and contents of date and time strings
|
||||
- written by date, which means "date" must generate output
|
||||
- using the POSIX locale; but adding _() would cause "date"
|
||||
- to use a Korean translation of the format. */
|
||||
- format = "%a %b %e %H:%M:%S %Z %Y";
|
||||
+ format = dcgettext(NULL, N_("%a %b %e %H:%M:%S %Z %Y"), LC_TIME);
|
||||
}
|
||||
}
|
||||
|
@ -1,29 +1,24 @@
|
||||
src/uname.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/uname.c b/src/uname.c
|
||||
index 6371ca2..1ad8fd7 100644
|
||||
--- a/src/uname.c
|
||||
+++ b/src/uname.c
|
||||
@@ -300,13 +300,19 @@ main (int argc, char **argv)
|
||||
|
||||
if (toprint & PRINT_PROCESSOR)
|
||||
{
|
||||
- char const *element = unknown;
|
||||
+ char *element = unknown;
|
||||
#if HAVE_SYSINFO && defined SI_ARCHITECTURE
|
||||
{
|
||||
static char processor[257];
|
||||
if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
|
||||
element = processor;
|
||||
}
|
||||
@@ -322,6 +322,12 @@ main (int argc, char **argv)
|
||||
# elif defined __ppc__ || defined __ppc64__
|
||||
element = "powerpc";
|
||||
# endif
|
||||
+#else
|
||||
+ {
|
||||
+ static struct utsname u;
|
||||
+ uname(&u);
|
||||
+ element = u.machine;
|
||||
+ static struct utsname u;
|
||||
+ uname(&u);
|
||||
+ element = u.machine;
|
||||
+ }
|
||||
#endif
|
||||
#ifdef UNAME_PROCESSOR
|
||||
#if HAVE_SYSINFO && defined SI_ARCHITECTURE
|
||||
if (element == unknown)
|
||||
@@ -344,7 +350,7 @@ main (int argc, char **argv)
|
||||
@@ -347,7 +353,7 @@ main (int argc, char **argv)
|
||||
|
||||
if (toprint & PRINT_HARDWARE_PLATFORM)
|
||||
{
|
||||
@ -32,17 +27,17 @@ index 6371ca2..1ad8fd7 100644
|
||||
#if HAVE_SYSINFO && defined SI_PLATFORM
|
||||
{
|
||||
static char hardware_platform[257];
|
||||
@@ -352,6 +358,14 @@ main (int argc, char **argv)
|
||||
@@ -355,6 +361,14 @@ main (int argc, char **argv)
|
||||
hardware_platform, sizeof hardware_platform))
|
||||
element = hardware_platform;
|
||||
}
|
||||
+#else
|
||||
+ {
|
||||
+ static struct utsname u;
|
||||
+ uname(&u);
|
||||
+ element = u.machine;
|
||||
+ if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6')
|
||||
+ element[1]='3';
|
||||
+ static struct utsname u;
|
||||
+ uname(&u);
|
||||
+ element = u.machine;
|
||||
+ if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6')
|
||||
+ element[1]='3';
|
||||
+ }
|
||||
#endif
|
||||
#ifdef UNAME_HARDWARE_PLATFORM
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 81e25c8521937ecf7f444bab11fddaaf81cc3efd Mon Sep 17 00:00:00 2001
|
||||
From c7b13f5e1a7ad012c510a8bdd5a8943ab4b55833 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Fri, 17 Jun 2016 16:58:18 +0200
|
||||
Subject: [PATCH] downstream changes to default DIR_COLORS
|
||||
@ -9,7 +9,7 @@ Subject: [PATCH] downstream changes to default DIR_COLORS
|
||||
2 files changed, 23 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/DIR_COLORS b/DIR_COLORS
|
||||
index bd5df23..84f2417 100644
|
||||
index b465771..ad42b09 100644
|
||||
--- a/DIR_COLORS
|
||||
+++ b/DIR_COLORS
|
||||
@@ -1,3 +1,7 @@
|
||||
@ -20,17 +20,17 @@ index bd5df23..84f2417 100644
|
||||
# Configuration file for dircolors, a utility to help you set the
|
||||
# LS_COLORS environment variable used by GNU ls with the --color option.
|
||||
|
||||
@@ -8,6 +12,9 @@
|
||||
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
|
||||
# slackware version of dircolors) are recognized but ignored.
|
||||
@@ -10,6 +14,9 @@
|
||||
|
||||
# Global config options can be specified before TERM or COLORTERM entries
|
||||
|
||||
+# For compatibility, the pattern "^COLOR.*none" is recognized as a way to
|
||||
+# disable colorization. See https://bugzilla.redhat.com/1349579 for details.
|
||||
+
|
||||
# Below are TERM entries, which can be a glob patterns, to match
|
||||
# against the TERM environment variable to determine if it is colorizable.
|
||||
TERM Eterm
|
||||
@@ -59,7 +66,7 @@ DOOR 01;35 # door
|
||||
# Below are TERM or COLORTERM entries, which can be glob patterns, which
|
||||
# restrict following config to systems with matching environment variables.
|
||||
COLORTERM ?*
|
||||
@@ -62,7 +69,7 @@ DOOR 01;35 # door
|
||||
BLK 40;33;01 # block device driver
|
||||
CHR 40;33;01 # character device driver
|
||||
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
|
||||
@ -38,9 +38,9 @@ index bd5df23..84f2417 100644
|
||||
+MISSING 01;37;41 # ... and the files they point to
|
||||
SETUID 37;41 # file that is setuid (u+s)
|
||||
SETGID 30;43 # file that is setgid (g+s)
|
||||
CAPABILITY 30;41 # file with capability
|
||||
CAPABILITY 00 # file with capability (very expensive to lookup)
|
||||
diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor
|
||||
index 4316832..6402854 100644
|
||||
index eab6258..1627b63 100644
|
||||
--- a/DIR_COLORS.lightbgcolor
|
||||
+++ b/DIR_COLORS.lightbgcolor
|
||||
@@ -1,3 +1,9 @@
|
||||
@ -53,17 +53,17 @@ index 4316832..6402854 100644
|
||||
# Configuration file for dircolors, a utility to help you set the
|
||||
# LS_COLORS environment variable used by GNU ls with the --color option.
|
||||
|
||||
@@ -8,6 +14,9 @@
|
||||
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
|
||||
# slackware version of dircolors) are recognized but ignored.
|
||||
@@ -10,6 +16,9 @@
|
||||
|
||||
# Global config options can be specified before TERM or COLORTERM entries
|
||||
|
||||
+# For compatibility, the pattern "^COLOR.*none" is recognized as a way to
|
||||
+# disable colorization. See https://bugzilla.redhat.com/1349579 for details.
|
||||
+
|
||||
# Below are TERM entries, which can be a glob patterns, to match
|
||||
# against the TERM environment variable to determine if it is colorizable.
|
||||
TERM Eterm
|
||||
@@ -49,17 +58,17 @@ TERM xterm*
|
||||
# Below are TERM or COLORTERM entries, which can be glob patterns, which
|
||||
# restrict following config to systems with matching environment variables.
|
||||
COLORTERM ?*
|
||||
@@ -52,17 +61,17 @@ TERM xterm*
|
||||
#NORMAL 00 # no color code at all
|
||||
#FILE 00 # regular file: use no color at all
|
||||
RESET 0 # reset to "normal" color
|
||||
@ -85,8 +85,8 @@ index 4316832..6402854 100644
|
||||
+MISSING 01;37;41 # ... and the files they point to
|
||||
SETUID 37;41 # file that is setuid (u+s)
|
||||
SETGID 30;43 # file that is setgid (g+s)
|
||||
CAPABILITY 30;41 # file with capability
|
||||
@@ -68,7 +77,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||
CAPABILITY 00 # file with capability (very expensive to lookup)
|
||||
@@ -71,7 +80,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
||||
|
||||
# This is for files with execute permission:
|
||||
@ -94,7 +94,7 @@ index 4316832..6402854 100644
|
||||
+EXEC 00;32
|
||||
|
||||
# List any file extensions like '.gz' or '.tar' that you would like ls
|
||||
# to colorize below. Put the extension, a space, and the color init string.
|
||||
# to color below. Put the extension, a space, and the color init string.
|
||||
--
|
||||
2.21.1
|
||||
2.34.1
|
||||
|
||||
|
@ -1,87 +0,0 @@
|
||||
From f4422844dbcd839ce486bcbc15b7bd5b72c9198d Mon Sep 17 00:00:00 2001
|
||||
From: Rohan Sable <rsable@redhat.com>
|
||||
Date: Mon, 7 Mar 2022 14:14:13 +0000
|
||||
Subject: [PATCH 1/2] ls: avoid triggering automounts
|
||||
|
||||
statx() has different defaults wrt automounting
|
||||
compared to stat() or lstat(), so explicitly
|
||||
set the AT_NO_AUTOMOUNT flag to suppress that behavior,
|
||||
and avoid unintended operations or potential errors.
|
||||
|
||||
* src/ls.c (do_statx): Pass AT_NO_AUTOMOUNT to avoid this behavior.
|
||||
Fixes https://bugs.gnu.org/54286
|
||||
|
||||
Signed-off-by: Rohan Sable <rsable@redhat.com>
|
||||
|
||||
Upstream-commit: 85c975df2c25bd799370b04bb294e568e001102f
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/ls.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ls.c b/src/ls.c
|
||||
index 1047801..fe0e9f8 100644
|
||||
--- a/src/ls.c
|
||||
+++ b/src/ls.c
|
||||
@@ -1175,7 +1175,7 @@ do_statx (int fd, char const *name, struct stat *st, int flags,
|
||||
{
|
||||
struct statx stx;
|
||||
bool want_btime = mask & STATX_BTIME;
|
||||
- int ret = statx (fd, name, flags, mask, &stx);
|
||||
+ int ret = statx (fd, name, flags | AT_NO_AUTOMOUNT, mask, &stx);
|
||||
if (ret >= 0)
|
||||
{
|
||||
statx_to_stat (&stx, st);
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
From 3d227f9e4f3fe806064721e4b9451ee06526bc80 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Mon, 7 Mar 2022 23:29:20 +0000
|
||||
Subject: [PATCH 2/2] stat: only automount with --cached=never
|
||||
|
||||
Revert to the default behavior before the introduction of statx().
|
||||
|
||||
* src/stat.c (do_stat): Set AT_NO_AUTOMOUNT without --cached=never.
|
||||
* doc/coreutils.texi (stat invocation): Mention the automount
|
||||
behavior with --cached=never.
|
||||
|
||||
Fixes https://bugs.gnu.org/54287
|
||||
|
||||
Upstream-commit: 92cb8427c537f37edd43c5cef1909585201372ab
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
doc/coreutils.texi | 1 +
|
||||
src/stat.c | 3 +++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
|
||||
index 19b535c..0f5c16a 100644
|
||||
--- a/doc/coreutils.texi
|
||||
+++ b/doc/coreutils.texi
|
||||
@@ -12564,6 +12564,7 @@ Always read the already cached attributes if available.
|
||||
|
||||
@item never
|
||||
Always sychronize with the latest file system attributes.
|
||||
+This also mounts automounted files.
|
||||
|
||||
@item default
|
||||
Leave the caching behavior to the underlying file system.
|
||||
diff --git a/src/stat.c b/src/stat.c
|
||||
index 0c34501..803340a 100644
|
||||
--- a/src/stat.c
|
||||
+++ b/src/stat.c
|
||||
@@ -1381,6 +1381,9 @@ do_stat (char const *filename, char const *format, char const *format2)
|
||||
else if (force_sync)
|
||||
flags |= AT_STATX_FORCE_SYNC;
|
||||
|
||||
+ if (! force_sync)
|
||||
+ flags |= AT_NO_AUTOMOUNT;
|
||||
+
|
||||
fd = statx (fd, pathname, flags, format_to_mask (format), &stx);
|
||||
if (fd < 0)
|
||||
{
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,114 +0,0 @@
|
||||
From c76e70637e529481478e26683ebd73c40621c382 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Fri, 24 Sep 2021 20:57:41 +0100
|
||||
Subject: [PATCH] chmod: fix exit status when ignoring symlinks
|
||||
|
||||
* src/chmod.c: Reorder enum so CH_NOT_APPLIED
|
||||
can be treated as a non error.
|
||||
* tests/chmod/ignore-symlink.sh: A new test.
|
||||
* tests/local.mk: Reference the new test.
|
||||
* NEWS: Mention the bug fix.
|
||||
Fixes https://bugs.gnu.org/50784
|
||||
|
||||
Upstream-commit: e8b56ebd536e82b15542a00c888109471936bfda
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
NEWS | 6 ++++++
|
||||
src/chmod.c | 4 ++--
|
||||
tests/chmod/ignore-symlink.sh | 31 +++++++++++++++++++++++++++++++
|
||||
tests/local.mk | 1 +
|
||||
4 files changed, 40 insertions(+), 2 deletions(-)
|
||||
create mode 100755 tests/chmod/ignore-symlink.sh
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index f2fbcbb..5722a8b 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -143,6 +143,12 @@ GNU coreutils NEWS -*- outline -*-
|
||||
where avx2 instructions are supported.
|
||||
A new --debug option will indicate if avx2 is being used.
|
||||
|
||||
+** Bug fixes
|
||||
+
|
||||
+ chmod -R no longer exits with error status when encountering symlinks.
|
||||
+ All files would be processed correctly, but the exit status was incorrect.
|
||||
+ [bug introduced in coreutils-9.0]
|
||||
+
|
||||
|
||||
* Noteworthy changes in release 8.32 (2020-03-05) [stable]
|
||||
|
||||
diff --git a/src/chmod.c b/src/chmod.c
|
||||
index 37b04f5..57ac47f 100644
|
||||
--- a/src/chmod.c
|
||||
+++ b/src/chmod.c
|
||||
@@ -44,8 +44,8 @@ struct change_status
|
||||
enum
|
||||
{
|
||||
CH_NO_STAT,
|
||||
- CH_NOT_APPLIED,
|
||||
CH_FAILED,
|
||||
+ CH_NOT_APPLIED,
|
||||
CH_NO_CHANGE_REQUESTED,
|
||||
CH_SUCCEEDED
|
||||
}
|
||||
@@ -322,7 +322,7 @@ process_file (FTS *fts, FTSENT *ent)
|
||||
if ( ! recurse)
|
||||
fts_set (fts, ent, FTS_SKIP);
|
||||
|
||||
- return CH_NO_CHANGE_REQUESTED <= ch.status;
|
||||
+ return CH_NOT_APPLIED <= ch.status;
|
||||
}
|
||||
|
||||
/* Recursively change the modes of the specified FILES (the last entry
|
||||
diff --git a/tests/chmod/ignore-symlink.sh b/tests/chmod/ignore-symlink.sh
|
||||
new file mode 100755
|
||||
index 0000000..5ce3de8
|
||||
--- /dev/null
|
||||
+++ b/tests/chmod/ignore-symlink.sh
|
||||
@@ -0,0 +1,31 @@
|
||||
+#!/bin/sh
|
||||
+# Test for proper exit code of chmod on a processed symlink.
|
||||
+
|
||||
+# Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software: you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation, either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
+
|
||||
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||
+print_ver_ chmod
|
||||
+
|
||||
+mkdir dir || framework_failure_
|
||||
+touch dir/f || framework_failure_
|
||||
+ln -s f dir/l || framework_failure_
|
||||
+
|
||||
+# This operation ignores symlinks but should succeed.
|
||||
+chmod u+w -R dir 2> out || fail=1
|
||||
+
|
||||
+compare /dev/null out || fail=1
|
||||
+
|
||||
+Exit $fail
|
||||
diff --git a/tests/local.mk b/tests/local.mk
|
||||
index a76c808..a2164c9 100644
|
||||
--- a/tests/local.mk
|
||||
+++ b/tests/local.mk
|
||||
@@ -458,6 +458,7 @@ all_tests = \
|
||||
tests/chmod/c-option.sh \
|
||||
tests/chmod/equal-x.sh \
|
||||
tests/chmod/equals.sh \
|
||||
+ tests/chmod/ignore-symlink.sh \
|
||||
tests/chmod/inaccessible.sh \
|
||||
tests/chmod/octal.sh \
|
||||
tests/chmod/setgid.sh \
|
||||
--
|
||||
2.31.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
Summary: A set of basic GNU tools commonly used in shell scripts
|
||||
Name: coreutils
|
||||
Version: 9.0
|
||||
Release: 5%{?dist}
|
||||
Version: 9.1
|
||||
Release: 1%{?dist}
|
||||
License: GPLv3+
|
||||
Url: https://www.gnu.org/software/coreutils/
|
||||
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
@ -17,12 +17,6 @@ Source106: coreutils-colorls.csh
|
||||
# do not make coreutils-single depend on /usr/bin/coreutils
|
||||
%global __requires_exclude ^%{_bindir}/coreutils$
|
||||
|
||||
# chmod: fix exit status when ignoring symlinks
|
||||
Patch1: coreutils-9.0-chmod-symlink.patch
|
||||
|
||||
# ls, stat: avoid triggering automounts (#2044981)
|
||||
Patch2: coreutils-9.0-autofs-no-mount.patch
|
||||
|
||||
# disable the test-lock gnulib test prone to deadlock
|
||||
Patch100: coreutils-8.26-test-lock.patch
|
||||
|
||||
@ -31,7 +25,7 @@ Patch105: coreutils-8.26-selinuxenable.patch
|
||||
|
||||
# downstream changes to default DIR_COLORS
|
||||
Patch102: coreutils-8.32-DIR_COLORS.patch
|
||||
#do display processor type for uname -p/-i based on uname(2) syscall
|
||||
# to be removed (#548834)
|
||||
Patch103: coreutils-8.2-uname-processortype.patch
|
||||
#df --direct
|
||||
Patch104: coreutils-df-direct.patch
|
||||
@ -41,7 +35,6 @@ Patch107: coreutils-8.4-mkdir-modenote.patch
|
||||
# sh-utils
|
||||
#add info about TZ envvar to date manpage
|
||||
Patch703: sh-utils-2.0.11-dateman.patch
|
||||
Patch713: coreutils-4.5.3-langinfo.patch
|
||||
|
||||
# (sb) lin18nux/lsb compliance - multibyte functionality patch
|
||||
Patch800: coreutils-i18n.patch
|
||||
@ -183,7 +176,7 @@ for type in separate single; do
|
||||
if test $type = 'single'; then
|
||||
config_single='--enable-single-binary'
|
||||
config_single="$config_single --without-openssl" # smaller/slower sha*sum
|
||||
config_single="$config_single --without-gmp" # expr/factor machine ints
|
||||
config_single="$config_single --without-libgmp" # expr/factor machine ints
|
||||
else
|
||||
config_single='--with-openssl' # faster sha*sum
|
||||
fi
|
||||
@ -269,6 +262,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||
%license COPYING
|
||||
|
||||
%changelog
|
||||
* Tue Apr 19 2022 Kamil Dudka <kdudka@redhat.com> - 9.1-1
|
||||
- new upstream release 9.1
|
||||
|
||||
* Mon Mar 21 2022 Kamil Dudka <kdudka@redhat.com> - 9.0-5
|
||||
- ls, stat: avoid triggering automounts (#2044981)
|
||||
|
||||
|
3
sources
3
sources
@ -1 +1,2 @@
|
||||
SHA512 (coreutils-9.0.tar.xz) = 9be08212891dbf48e5b22e7689dc27dac50df4631ebf29313470b72b7921f0b2aa5242917d05587785358495ca56e3b21f5b3ca81043d53cab92354da6c53a03
|
||||
SHA512 (coreutils-9.1.tar.xz.sig) = 9f0766531afd4faa3e2c337730f61db55605cf06729e9c61f644594883732c2e0b1ddb0005b492be309c53e6f45b8ff875398163a48699d52517ea49e9bdbc91
|
||||
SHA512 (coreutils-9.1.tar.xz) = a6ee2c549140b189e8c1b35e119d4289ec27244ec0ed9da0ac55202f365a7e33778b1dc7c4e64d1669599ff81a8297fe4f5adbcc8a3a2f75c919a43cd4b9bdfa
|
||||
|
Loading…
Reference in New Issue
Block a user