Compare commits
No commits in common. 'c9' and 'cs10' have entirely different histories.
@ -1 +1 @@
|
||||
b2b12195e276c64c8e850cf40ea2cff9b3aa53f6 SOURCES/coreutils-8.32.tar.xz
|
||||
867fed7ce2ee15c5150a355a5f3a3b50578cf78d SOURCES/coreutils-9.5.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
SOURCES/coreutils-8.32.tar.xz
|
||||
SOURCES/coreutils-9.5.tar.xz
|
||||
|
@ -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
|
||||
@@ -490,14 +490,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,49 +0,0 @@
|
||||
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;
|
||||
}
|
||||
+#else
|
||||
+ {
|
||||
+ static struct utsname u;
|
||||
+ uname(&u);
|
||||
+ element = u.machine;
|
||||
+ }
|
||||
#endif
|
||||
#ifdef UNAME_PROCESSOR
|
||||
if (element == unknown)
|
||||
@@ -344,7 +350,7 @@ main (int argc, char **argv)
|
||||
|
||||
if (toprint & PRINT_HARDWARE_PLATFORM)
|
||||
{
|
||||
- char const *element = unknown;
|
||||
+ char *element = unknown;
|
||||
#if HAVE_SYSINFO && defined SI_PLATFORM
|
||||
{
|
||||
static char hardware_platform[257];
|
||||
@@ -352,6 +358,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';
|
||||
+ }
|
||||
#endif
|
||||
#ifdef UNAME_HARDWARE_PLATFORM
|
||||
if (element == unknown)
|
File diff suppressed because it is too large
Load Diff
@ -1,72 +0,0 @@
|
||||
From 0f053de4bc3ca0cfd88a42d236881dfdddb10ee9 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Wed, 30 Jun 2021 17:53:22 +0200
|
||||
Subject: [PATCH] df: fix duplicated remote entries due to bind mounts
|
||||
|
||||
As originally reported in <https://bugzilla.redhat.com/1962515>,
|
||||
df invoked without -a printed duplicated entries for NFS mounts
|
||||
of bind mounts. This is a regression from commit v8.25-54-g1c17f61ef99,
|
||||
which introduced the use of a hash table.
|
||||
|
||||
The proposed patch makes sure that the devlist entry seen the last time
|
||||
is used for comparison when eliminating duplicated mount entries. This
|
||||
way it worked before introducing the hash table.
|
||||
|
||||
Patch co-authored by Roberto Bergantinos.
|
||||
|
||||
* src/ls.c (struct devlist): Introduce the seen_last pointer.
|
||||
(devlist_for_dev): Return the devlist entry seen the last time if found.
|
||||
(filter_mount_list): Remember the devlist entry seen the last time for
|
||||
each hashed item.
|
||||
Fixes https://bugs.gnu.org/49298
|
||||
|
||||
Upstream-commit: d6125af095c9553f38cba0696f15158f5abe4ecc
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/df.c | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/df.c b/src/df.c
|
||||
index 7e01839..3e9247f 100644
|
||||
--- a/src/df.c
|
||||
+++ b/src/df.c
|
||||
@@ -54,6 +54,7 @@ struct devlist
|
||||
dev_t dev_num;
|
||||
struct mount_entry *me;
|
||||
struct devlist *next;
|
||||
+ struct devlist *seen_last; /* valid for hashed devlist entries only */
|
||||
};
|
||||
|
||||
/* Filled with device numbers of examined file systems to avoid
|
||||
@@ -689,7 +690,13 @@ devlist_for_dev (dev_t dev)
|
||||
return NULL;
|
||||
struct devlist dev_entry;
|
||||
dev_entry.dev_num = dev;
|
||||
- return hash_lookup (devlist_table, &dev_entry);
|
||||
+
|
||||
+ struct devlist *found = hash_lookup (devlist_table, &dev_entry);
|
||||
+ if (found == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* Return the last devlist entry we have seen with this dev_num */
|
||||
+ return found->seen_last;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -807,8 +814,12 @@ filter_mount_list (bool devices_only)
|
||||
devlist->dev_num = buf.st_dev;
|
||||
devlist->next = device_list;
|
||||
device_list = devlist;
|
||||
- if (hash_insert (devlist_table, devlist) == NULL)
|
||||
+
|
||||
+ struct devlist *hash_entry = hash_insert (devlist_table, devlist);
|
||||
+ if (hash_entry == NULL)
|
||||
xalloc_die ();
|
||||
+ /* Ensure lookups use this latest devlist. */
|
||||
+ hash_entry->seen_last = devlist;
|
||||
|
||||
me = me->me_next;
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,81 +0,0 @@
|
||||
From 9618fb718b75920f37e5be2049ad1d0bb5c4a28c Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Tue, 26 Jan 2021 09:23:54 -0800
|
||||
Subject: [PATCH] expr: fix bug with unmatched \(...\)
|
||||
|
||||
Problem reported by Qiuhao Li.
|
||||
* doc/coreutils.texi (String expressions):
|
||||
Document the correct behavior, which POSIX requires.
|
||||
* src/expr.c (docolon): Treat unmatched \(...\) as empty.
|
||||
* tests/misc/expr.pl: New test.
|
||||
|
||||
Upstream-commit: 735083ba24878075235007b4417982ad5700436d
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
doc/coreutils.texi | 14 ++++++++------
|
||||
src/expr.c | 9 +++++++--
|
||||
tests/misc/expr.pl | 3 +++
|
||||
3 files changed, 18 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
|
||||
index 2382a16..5b2bb2c 100644
|
||||
--- a/doc/coreutils.texi
|
||||
+++ b/doc/coreutils.texi
|
||||
@@ -13529,12 +13529,14 @@ second is considered to be a (basic, a la GNU @code{grep}) regular
|
||||
expression, with a @code{^} implicitly prepended. The first argument is
|
||||
then matched against this regular expression.
|
||||
|
||||
-If the match succeeds and @var{regex} uses @samp{\(} and @samp{\)}, the
|
||||
-@code{:} expression returns the part of @var{string} that matched the
|
||||
-subexpression; otherwise, it returns the number of characters matched.
|
||||
-
|
||||
-If the match fails, the @code{:} operator returns the null string if
|
||||
-@samp{\(} and @samp{\)} are used in @var{regex}, otherwise 0.
|
||||
+If @var{regex} does not use @samp{\(} and @samp{\)}, the @code{:}
|
||||
+expression returns the number of characters matched, or 0 if the match
|
||||
+fails.
|
||||
+
|
||||
+If @var{regex} uses @samp{\(} and @samp{\)}, the @code{:} expression
|
||||
+returns the part of @var{string} that matched the subexpression, or
|
||||
+the null string if the match failed or the subexpression did not
|
||||
+contribute to the match.
|
||||
|
||||
@kindex \( @r{regexp operator}
|
||||
Only the first @samp{\( @dots{} \)} pair is relevant to the return
|
||||
diff --git a/src/expr.c b/src/expr.c
|
||||
index e134872..0616a42 100644
|
||||
--- a/src/expr.c
|
||||
+++ b/src/expr.c
|
||||
@@ -721,8 +721,13 @@ docolon (VALUE *sv, VALUE *pv)
|
||||
/* Were \(...\) used? */
|
||||
if (re_buffer.re_nsub > 0)
|
||||
{
|
||||
- sv->u.s[re_regs.end[1]] = '\0';
|
||||
- v = str_value (sv->u.s + re_regs.start[1]);
|
||||
+ if (re_regs.end[1] < 0)
|
||||
+ v = str_value ("");
|
||||
+ else
|
||||
+ {
|
||||
+ sv->u.s[re_regs.end[1]] = '\0';
|
||||
+ v = str_value (sv->u.s + re_regs.start[1]);
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/tests/misc/expr.pl b/tests/misc/expr.pl
|
||||
index e45f8e7..e57f79d 100755
|
||||
--- a/tests/misc/expr.pl
|
||||
+++ b/tests/misc/expr.pl
|
||||
@@ -84,6 +84,9 @@ my @Tests =
|
||||
# In 5.94 and earlier, anchors incorrectly matched newlines.
|
||||
['anchor', "'a\nb' : 'a\$'", {OUT => '0'}, {EXIT => 1}],
|
||||
|
||||
+ # In 8.32, \( ... \) that did not match caused memory errors.
|
||||
+ ['emptysub', '"a" : "\\(b\\)*"', {OUT => ''}, {EXIT => 1}],
|
||||
+
|
||||
# These tests are taken from grep/tests/bre.tests.
|
||||
['bre1', '"abc" : "a\\(b\\)c"', {OUT => 'b'}],
|
||||
['bre2', '"a(" : "a("', {OUT => '2'}],
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 602fb566468d3837b7871c17a0fab1a20228d119 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Mon, 7 Jun 2021 14:43:03 +0200
|
||||
Subject: [PATCH] mountlist: recognize fuse.portal as dummy file system
|
||||
|
||||
This was originally proposed at:
|
||||
|
||||
https://lists.gnu.org/archive/html/bug-gnulib/2021-02/msg00053.html
|
||||
|
||||
As the full review might take some time, would it be possible to apply
|
||||
at least the part related to fuse.portal file systems? They started to
|
||||
cause problems recently:
|
||||
|
||||
https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal/+bug/1905623
|
||||
https://github.com/muesli/duf/issues/35
|
||||
https://bugzilla.redhat.com/1913358
|
||||
|
||||
Upstream-commit: 9a38d499ca16f2f4304992eb1ab0894cd0b478e1
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
lib/mountlist.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/mountlist.c b/lib/mountlist.c
|
||||
index e0227b7..e5f6b07 100644
|
||||
--- a/lib/mountlist.c
|
||||
+++ b/lib/mountlist.c
|
||||
@@ -170,6 +170,7 @@
|
||||
|| strcmp (Fs_type, "debugfs") == 0 \
|
||||
|| strcmp (Fs_type, "devpts") == 0 \
|
||||
|| strcmp (Fs_type, "fusectl") == 0 \
|
||||
+ || strcmp (Fs_type, "fuse.portal") == 0 \
|
||||
|| strcmp (Fs_type, "mqueue") == 0 \
|
||||
|| strcmp (Fs_type, "rpc_pipefs") == 0 \
|
||||
|| strcmp (Fs_type, "sysfs") == 0 \
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,48 +0,0 @@
|
||||
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
|
||||
|
@ -1,153 +0,0 @@
|
||||
From 8c022656320592dbad146f5d3a3ae1875f419446 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Thu, 5 Mar 2020 17:25:29 -0800
|
||||
Subject: [PATCH 1/2] ls: restore 8.31 behavior on removed directories
|
||||
|
||||
* NEWS: Mention this.
|
||||
* src/ls.c: Do not include <sys/sycall.h>
|
||||
(print_dir): Don't worry about whether the directory is removed.
|
||||
* tests/ls/removed-directory.sh: Adjust to match new (i.e., old)
|
||||
behavior.
|
||||
|
||||
Upstream-commit: 10fcb97bd728f09d4a027eddf8ad2900f0819b0a
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/ls.c | 22 ----------------------
|
||||
tests/ls/removed-directory.sh | 10 ++--------
|
||||
2 files changed, 2 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/src/ls.c b/src/ls.c
|
||||
index 9d25f62..850ecc2 100644
|
||||
--- a/src/ls.c
|
||||
+++ b/src/ls.c
|
||||
@@ -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 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
|
||||
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 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
|
||||
next = readdir (dirp);
|
||||
if (next)
|
||||
{
|
||||
- found_any_entries = true;
|
||||
if (! file_ignored (next->d_name))
|
||||
{
|
||||
enum filetype type = unknown;
|
||||
@@ -3018,22 +3012,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
|
||||
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 --git a/tests/ls/removed-directory.sh b/tests/ls/removed-directory.sh
|
||||
index e8c835d..fe8f929 100755
|
||||
--- a/tests/ls/removed-directory.sh
|
||||
+++ b/tests/ls/removed-directory.sh
|
||||
@@ -26,20 +26,14 @@ case $host_triplet in
|
||||
*) 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_
|
||||
|
||||
-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
|
||||
--
|
||||
2.21.1
|
||||
|
||||
|
||||
From 847324a0debd9d12062c79e7a7a9d3d8ce76390d Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Sat, 7 Mar 2020 10:29:51 -0800
|
||||
Subject: [PATCH 2/2] ls: improve removed-directory test
|
||||
|
||||
* tests/ls/removed-directory.sh: Remove host_triplet test.
|
||||
Skip this test if one cannot remove the working directory.
|
||||
From a suggestion by Bernhard Voelker (Bug#39929).
|
||||
|
||||
Upstream-commit: 672819c73f2e94e61386dc0584bddf9da860cc26
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
tests/ls/removed-directory.sh | 13 ++++---------
|
||||
1 file changed, 4 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/tests/ls/removed-directory.sh b/tests/ls/removed-directory.sh
|
||||
index fe8f929..63b209d 100755
|
||||
--- a/tests/ls/removed-directory.sh
|
||||
+++ b/tests/ls/removed-directory.sh
|
||||
@@ -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.
|
||||
+# If ls is asked to list a removed directory (e.g., the parent process's
|
||||
+# 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,15 +21,10 @@
|
||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||
print_ver_ ls
|
||||
|
||||
-case $host_triplet in
|
||||
- *linux*) ;;
|
||||
- *) skip_ 'non linux kernel' ;;
|
||||
-esac
|
||||
-
|
||||
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"
|
||||
|
||||
ls >../out 2>../err || fail=1
|
||||
cd "$cwd" || framework_failure_
|
||||
--
|
||||
2.21.1
|
||||
|
@ -1,85 +0,0 @@
|
||||
From 53c6b01e8e3fd338d7f53e5ff817ef86f9efa852 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Wed, 11 Nov 2020 17:22:33 +0000
|
||||
Subject: [PATCH] ls: fix crash printing SELinux context for unstatable files
|
||||
|
||||
This crash was identified by Cyber Independent Testing Lab:
|
||||
https://cyber-itl.org/2020/10/28/citl-7000-defects.html
|
||||
and was introduced with commit v6.9.90-11-g4245876e2
|
||||
|
||||
* src/ls.c (gobble_file): Ensure scontext is initialized
|
||||
in the case where files are not statable.
|
||||
* tests/ls/selinux-segfault.sh: Renamed from proc-selinux-segfault.sh,
|
||||
and added test case for broken symlinks.
|
||||
* tests/local.mk: Adjust for the renamed test.
|
||||
|
||||
Upstream-commit: 6fc695cb4a26f09dfeef8b1c24895a707055334e
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/ls.c | 3 +++
|
||||
tests/local.mk | 2 +-
|
||||
.../{proc-selinux-segfault.sh => selinux-segfault.sh} | 10 ++++++++--
|
||||
3 files changed, 12 insertions(+), 3 deletions(-)
|
||||
rename tests/ls/{proc-selinux-segfault.sh => selinux-segfault.sh} (77%)
|
||||
|
||||
diff --git a/src/ls.c b/src/ls.c
|
||||
index 4acf5f4..8eb483d 100644
|
||||
--- a/src/ls.c
|
||||
+++ b/src/ls.c
|
||||
@@ -3412,6 +3412,9 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
|
||||
provokes an exit status of 1. */
|
||||
file_failure (command_line_arg,
|
||||
_("cannot access %s"), full_name);
|
||||
+
|
||||
+ f->scontext = UNKNOWN_SECURITY_CONTEXT;
|
||||
+
|
||||
if (command_line_arg)
|
||||
return 0;
|
||||
|
||||
diff --git a/tests/local.mk b/tests/local.mk
|
||||
index 2aeff2b..2441fdc 100644
|
||||
--- a/tests/local.mk
|
||||
+++ b/tests/local.mk
|
||||
@@ -616,7 +616,7 @@ all_tests = \
|
||||
tests/ls/multihardlink.sh \
|
||||
tests/ls/no-arg.sh \
|
||||
tests/ls/no-cap.sh \
|
||||
- tests/ls/proc-selinux-segfault.sh \
|
||||
+ tests/ls/selinux-segfault.sh \
|
||||
tests/ls/quote-align.sh \
|
||||
tests/ls/readdir-mountpoint-inode.sh \
|
||||
tests/ls/recursive.sh \
|
||||
diff --git a/tests/ls/proc-selinux-segfault.sh b/tests/ls/selinux-segfault.sh
|
||||
similarity index 77%
|
||||
rename from tests/ls/proc-selinux-segfault.sh
|
||||
rename to tests/ls/selinux-segfault.sh
|
||||
index 831a00e..e2b7ef6 100755
|
||||
--- a/tests/ls/proc-selinux-segfault.sh
|
||||
+++ b/tests/ls/selinux-segfault.sh
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
-# ls -l /proc/sys would segfault when built against libselinux1 2.0.15-2+b1
|
||||
+# Ensure we don't segfault in selinux handling
|
||||
|
||||
# Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
||||
|
||||
@@ -19,9 +19,15 @@
|
||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||
print_ver_ ls
|
||||
|
||||
+# ls -l /proc/sys would segfault when built against libselinux1 2.0.15-2+b1
|
||||
f=/proc/sys
|
||||
test -r $f || f=.
|
||||
-
|
||||
ls -l $f > out || fail=1
|
||||
|
||||
+# ls <= 8.32 would segfault when printing
|
||||
+# the security context of broken symlink targets
|
||||
+mkdir sedir || framework_failure_
|
||||
+ln -sf missing sedir/broken || framework_failure_
|
||||
+returns_ 1 ls -L -R -Z -m sedir > out || fail=1
|
||||
+
|
||||
Exit $fail
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,186 +0,0 @@
|
||||
From be77b4ab7cb68fd2daf9de90bd75d844392788ac Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Thu, 25 Mar 2021 11:57:56 +0100
|
||||
Subject: [PATCH 1/4] ln: fix memory leaks in do_link
|
||||
|
||||
* src/ln.c (do_link): Free memory allocated by convert_abs_rel
|
||||
on all code paths (Bug#47373).
|
||||
|
||||
Upstream-commit: 6e98f67758260579d7d44ea5f2df4c82d28c9f58
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/ln.c | 19 +++++++++++++------
|
||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/ln.c b/src/ln.c
|
||||
index ffa278e..9b52602 100644
|
||||
--- a/src/ln.c
|
||||
+++ b/src/ln.c
|
||||
@@ -229,14 +229,14 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
||||
if (errno != ENOENT)
|
||||
{
|
||||
error (0, errno, _("failed to access %s"), quoteaf (dest));
|
||||
- return false;
|
||||
+ goto fail;
|
||||
}
|
||||
force = false;
|
||||
}
|
||||
else if (S_ISDIR (dest_stats.st_mode))
|
||||
{
|
||||
error (0, 0, _("%s: cannot overwrite directory"), quotef (dest));
|
||||
- return false;
|
||||
+ goto fail;
|
||||
}
|
||||
else if (seen_file (dest_set, dest, &dest_stats))
|
||||
{
|
||||
@@ -245,7 +245,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
||||
error (0, 0,
|
||||
_("will not overwrite just-created %s with %s"),
|
||||
quoteaf_n (0, dest), quoteaf_n (1, source));
|
||||
- return false;
|
||||
+ goto fail;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -274,7 +274,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
||||
{
|
||||
error (0, 0, _("%s and %s are the same file"),
|
||||
quoteaf_n (0, source), quoteaf_n (1, dest));
|
||||
- return false;
|
||||
+ goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,10 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
||||
fprintf (stderr, _("%s: replace %s? "),
|
||||
program_name, quoteaf (dest));
|
||||
if (!yesno ())
|
||||
- return true;
|
||||
+ {
|
||||
+ free(rel_source);
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (backup_type != no_backups)
|
||||
@@ -304,7 +307,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
||||
{
|
||||
error (0, rename_errno, _("cannot backup %s"),
|
||||
quoteaf (dest));
|
||||
- return false;
|
||||
+ goto fail;
|
||||
}
|
||||
force = false;
|
||||
}
|
||||
@@ -397,6 +400,10 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
||||
free (backup_base);
|
||||
free (rel_source);
|
||||
return link_errno <= 0;
|
||||
+
|
||||
+fail:
|
||||
+ free (rel_source);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.26.3
|
||||
|
||||
|
||||
From c051578e69bd8acf8f8a469566ae34e855345532 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Thu, 25 Mar 2021 09:15:50 -0700
|
||||
Subject: [PATCH 2/4] maint: indenting
|
||||
|
||||
* src/ln.c: Fix indenting.
|
||||
|
||||
Upstream-commit: 8980b7c898046d899646da01c296fd15f0cced21
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/ln.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/ln.c b/src/ln.c
|
||||
index 9b52602..8881d6a 100644
|
||||
--- a/src/ln.c
|
||||
+++ b/src/ln.c
|
||||
@@ -286,7 +286,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
||||
program_name, quoteaf (dest));
|
||||
if (!yesno ())
|
||||
{
|
||||
- free(rel_source);
|
||||
+ free (rel_source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -304,7 +304,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
||||
free (backup_base);
|
||||
backup_base = NULL;
|
||||
if (rename_errno != ENOENT)
|
||||
- {
|
||||
+ {
|
||||
error (0, rename_errno, _("cannot backup %s"),
|
||||
quoteaf (dest));
|
||||
goto fail;
|
||||
--
|
||||
2.26.3
|
||||
|
||||
|
||||
From 0d6a4afe5bee0e397fb2fc3b205a29b32a69af9d Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Thu, 25 Mar 2021 09:16:36 -0700
|
||||
Subject: [PATCH 3/4] hostname: use puts
|
||||
|
||||
* src/hostname.c (main): Prefer puts to printf "%s\n".
|
||||
|
||||
Upstream-commit: c7a588ac3632aae21642d4d568497177950d36bf
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/hostname.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hostname.c b/src/hostname.c
|
||||
index 0b5c0cf..62cc98c 100644
|
||||
--- a/src/hostname.c
|
||||
+++ b/src/hostname.c
|
||||
@@ -103,7 +103,7 @@ main (int argc, char **argv)
|
||||
hostname = xgethostname ();
|
||||
if (hostname == NULL)
|
||||
die (EXIT_FAILURE, errno, _("cannot determine hostname"));
|
||||
- printf ("%s\n", hostname);
|
||||
+ puts (hostname);
|
||||
}
|
||||
|
||||
if (optind + 1 < argc)
|
||||
--
|
||||
2.26.3
|
||||
|
||||
|
||||
From 19c98d2080251edbaad9fb271aa10ad34f953500 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Thu, 25 Mar 2021 11:20:18 -0700
|
||||
Subject: [PATCH 4/4] hostname: pacify valgrind
|
||||
|
||||
* src/hostname.c (main) [IF_LINT]: Free hostname (Bug#47384).
|
||||
|
||||
Upstream-commit: 4698e284f37844bc9b9f63f00eb556ccaaed5030
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/hostname.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/hostname.c b/src/hostname.c
|
||||
index 62cc98c..7210248 100644
|
||||
--- a/src/hostname.c
|
||||
+++ b/src/hostname.c
|
||||
@@ -104,6 +104,7 @@ main (int argc, char **argv)
|
||||
if (hostname == NULL)
|
||||
die (EXIT_FAILURE, errno, _("cannot determine hostname"));
|
||||
puts (hostname);
|
||||
+ IF_LINT (free (hostname));
|
||||
}
|
||||
|
||||
if (optind + 1 < argc)
|
||||
--
|
||||
2.26.3
|
||||
|
@ -1,104 +0,0 @@
|
||||
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
|
||||
|
@ -1,109 +0,0 @@
|
||||
From 11b37b65d08c2a8b6d967fd866ebbdbe7e864949 Mon Sep 17 00:00:00 2001
|
||||
From: Nishant Nayan <nishant.nayan@oracle.com>
|
||||
Date: Thu, 26 Nov 2020 14:35:17 +0000
|
||||
Subject: [PATCH] rm: do not skip files upon failure to remove an empty dir
|
||||
|
||||
When removing a directory fails for some reason, and that directory
|
||||
is empty, the rm_fts code gets the return value of the excise call
|
||||
confused with the return value of its earlier call to prompt,
|
||||
causing fts_skip_tree to be called again and the next file
|
||||
that rm would otherwise have deleted to survive.
|
||||
|
||||
* src/remove.c (rm_fts): Ensure we only skip a single fts entry,
|
||||
when processing empty dirs. I.e. only skip the entry
|
||||
having successfully removed it.
|
||||
* tests/rm/empty-immutable-skip.sh: New root-only test.
|
||||
* tests/local.mk: Add it.
|
||||
* NEWS: Mention the bug fix.
|
||||
Fixes https://bugs.gnu.org/44883
|
||||
|
||||
Upstream-commit: 6bf108358a6104ec1c694c9530b3cd56b95f4b57
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/remove.c | 3 ++-
|
||||
tests/local.mk | 1 +
|
||||
tests/rm/empty-immutable-skip.sh | 46 ++++++++++++++++++++++++++++++++
|
||||
3 files changed, 49 insertions(+), 1 deletion(-)
|
||||
create mode 100755 tests/rm/empty-immutable-skip.sh
|
||||
|
||||
diff --git a/src/remove.c b/src/remove.c
|
||||
index 2d40c55..adf9489 100644
|
||||
--- a/src/remove.c
|
||||
+++ b/src/remove.c
|
||||
@@ -506,7 +506,8 @@ rm_fts (FTS *fts, FTSENT *ent, struct rm_options const *x)
|
||||
/* When we know (from prompt when in interactive mode)
|
||||
that this is an empty directory, don't prompt twice. */
|
||||
s = excise (fts, ent, x, true);
|
||||
- fts_skip_tree (fts, ent);
|
||||
+ if (s == RM_OK)
|
||||
+ fts_skip_tree (fts, ent);
|
||||
}
|
||||
|
||||
if (s != RM_OK)
|
||||
diff --git a/tests/local.mk b/tests/local.mk
|
||||
index 5f7f775..2aeff2b 100644
|
||||
--- a/tests/local.mk
|
||||
+++ b/tests/local.mk
|
||||
@@ -136,6 +136,7 @@ all_root_tests = \
|
||||
tests/rm/no-give-up.sh \
|
||||
tests/rm/one-file-system.sh \
|
||||
tests/rm/read-only.sh \
|
||||
+ tests/rm/empty-immutable-skip.sh \
|
||||
tests/tail-2/append-only.sh \
|
||||
tests/tail-2/end-of-device.sh \
|
||||
tests/touch/now-owned-by-other.sh
|
||||
diff --git a/tests/rm/empty-immutable-skip.sh b/tests/rm/empty-immutable-skip.sh
|
||||
new file mode 100755
|
||||
index 0000000..c91d8d4
|
||||
--- /dev/null
|
||||
+++ b/tests/rm/empty-immutable-skip.sh
|
||||
@@ -0,0 +1,46 @@
|
||||
+#!/bin/sh
|
||||
+# Ensure that rm does not skip extra files after hitting an empty immutable dir.
|
||||
+# Requires root access to do chattr +i, as well as an ext[23] or xfs file system
|
||||
+
|
||||
+# Copyright (C) 2020 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_ rm
|
||||
+require_root_
|
||||
+
|
||||
+# These simple one-file operations are expected to work even in the
|
||||
+# presence of this bug, and we need them to set up the rest of the test.
|
||||
+chattr_i_works=1
|
||||
+touch f
|
||||
+chattr +i f 2>/dev/null || chattr_i_works=0
|
||||
+rm f 2>/dev/null
|
||||
+test -f f || chattr_i_works=0
|
||||
+chattr -i f 2>/dev/null || chattr_i_works=0
|
||||
+rm f 2>/dev/null || chattr_i_works=0
|
||||
+test -f f && chattr_i_works=0
|
||||
+
|
||||
+if test $chattr_i_works = 0; then
|
||||
+ skip_ "chattr +i doesn't work on this file system"
|
||||
+fi
|
||||
+
|
||||
+mkdir empty || framework_failure_
|
||||
+touch x y || framework_failure_
|
||||
+chattr +i empty || framework_failure_
|
||||
+rm -rf empty x y
|
||||
+{ test -f x || test -f y; } && fail=1
|
||||
+chattr -i empty
|
||||
+
|
||||
+Exit $fail
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,100 +0,0 @@
|
||||
From bb0e7fabcaed9a7e71e30f05e638e9f243cdb13e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Mon, 25 Jan 2021 14:12:48 +0000
|
||||
Subject: [PATCH] split: fix --number=K/N to output correct part of file
|
||||
|
||||
This functionality regressed with the adjustments
|
||||
in commit v8.25-4-g62e7af032
|
||||
|
||||
* src/split.c (bytes_chunk_extract): Account for already read data
|
||||
when seeking into the file.
|
||||
* tests/split/b-chunk.sh: Use the hidden ---io-blksize option,
|
||||
to test this functionality.
|
||||
Fixes https://bugs.gnu.org/46048
|
||||
|
||||
Upstream-commit: bb21daa125aeb4e32546309d370918ca47e612db
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/split.c | 2 +-
|
||||
tests/split/b-chunk.sh | 45 ++++++++++++++++++++++++------------------
|
||||
2 files changed, 27 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/split.c b/src/split.c
|
||||
index 09e610b..19248f6 100644
|
||||
--- a/src/split.c
|
||||
+++ b/src/split.c
|
||||
@@ -1001,7 +1001,7 @@ bytes_chunk_extract (uintmax_t k, uintmax_t n, char *buf, size_t bufsize,
|
||||
}
|
||||
else
|
||||
{
|
||||
- if (lseek (STDIN_FILENO, start, SEEK_CUR) < 0)
|
||||
+ if (lseek (STDIN_FILENO, start - initial_read, SEEK_CUR) < 0)
|
||||
die (EXIT_FAILURE, errno, "%s", quotef (infile));
|
||||
initial_read = SIZE_MAX;
|
||||
}
|
||||
diff --git a/tests/split/b-chunk.sh b/tests/split/b-chunk.sh
|
||||
index 864ce55..39a6799 100755
|
||||
--- a/tests/split/b-chunk.sh
|
||||
+++ b/tests/split/b-chunk.sh
|
||||
@@ -35,32 +35,39 @@ split -e -n 10 /dev/null || fail=1
|
||||
returns_ 1 stat x?? 2>/dev/null || fail=1
|
||||
|
||||
printf '1\n2\n3\n4\n5\n' > input || framework_failure_
|
||||
+printf '1\n2' > exp-1 || framework_failure_
|
||||
+printf '\n3\n' > exp-2 || framework_failure_
|
||||
+printf '4\n5\n' > exp-3 || framework_failure_
|
||||
|
||||
for file in input /proc/version /sys/kernel/profiling; do
|
||||
test -f $file || continue
|
||||
|
||||
- split -n 3 $file > out || fail=1
|
||||
- split -n 1/3 $file > b1 || fail=1
|
||||
- split -n 2/3 $file > b2 || fail=1
|
||||
- split -n 3/3 $file > b3 || fail=1
|
||||
+ for blksize in 1 2 4096; do
|
||||
+ if ! test "$file" = 'input'; then
|
||||
+ # For /proc like files we must be able to read all
|
||||
+ # into the internal buffer to be able to determine size.
|
||||
+ test "$blksize" = 4096 || continue
|
||||
+ fi
|
||||
|
||||
- case $file in
|
||||
- input)
|
||||
- printf '1\n2' > exp-1
|
||||
- printf '\n3\n' > exp-2
|
||||
- printf '4\n5\n' > exp-3
|
||||
+ split -n 3 ---io-blksize=$blksize $file > out || fail=1
|
||||
+ split -n 1/3 ---io-blksize=$blksize $file > b1 || fail=1
|
||||
+ split -n 2/3 ---io-blksize=$blksize $file > b2 || fail=1
|
||||
+ split -n 3/3 ---io-blksize=$blksize $file > b3 || fail=1
|
||||
|
||||
- compare exp-1 xaa || fail=1
|
||||
- compare exp-2 xab || fail=1
|
||||
- compare exp-3 xac || fail=1
|
||||
- ;;
|
||||
- esac
|
||||
+ case $file in
|
||||
+ input)
|
||||
+ compare exp-1 xaa || fail=1
|
||||
+ compare exp-2 xab || fail=1
|
||||
+ compare exp-3 xac || fail=1
|
||||
+ ;;
|
||||
+ esac
|
||||
|
||||
- compare xaa b1 || fail=1
|
||||
- compare xab b2 || fail=1
|
||||
- compare xac b3 || fail=1
|
||||
- cat xaa xab xac | compare - $file || fail=1
|
||||
- test -f xad && fail=1
|
||||
+ compare xaa b1 || fail=1
|
||||
+ compare xab b2 || fail=1
|
||||
+ compare xac b3 || fail=1
|
||||
+ cat xaa xab xac | compare - $file || fail=1
|
||||
+ test -f xad && fail=1
|
||||
+ done
|
||||
done
|
||||
|
||||
Exit $fail
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,32 +0,0 @@
|
||||
From b87f944c87ffe04db6e5476b007a8e4979de933d Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Thu, 18 Feb 2021 11:18:04 +0100
|
||||
Subject: [PATCH] stat,tail: add support for the exfat file system
|
||||
|
||||
Bug: https://bugzilla.redhat.com/1921427
|
||||
|
||||
* src/stat.c (human_fstype): Add case for the 'exfat' file system type.
|
||||
Fixes https://bugs.gnu.org/46613
|
||||
|
||||
Upstream-commit: a5e0d8f387e81e854427addbbaf2504541bbf4b9
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/stat.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/stat.c b/src/stat.c
|
||||
index 8cd69da..4e1c8e3 100644
|
||||
--- a/src/stat.c
|
||||
+++ b/src/stat.c
|
||||
@@ -361,6 +361,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
|
||||
return "efs";
|
||||
case S_MAGIC_EROFS_V1: /* 0xE0F5E1E2 local */
|
||||
return "erofs";
|
||||
+ case S_MAGIC_EXFAT: /* 0x2011BAB0 local */
|
||||
+ return "exfat";
|
||||
case S_MAGIC_EXFS: /* 0x45584653 local */
|
||||
return "exfs";
|
||||
case S_MAGIC_EXOFS: /* 0x5DF5 local */
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,204 +0,0 @@
|
||||
From 73d119f4f8052a9fb6cef13cd9e75d5a4e23311a Mon Sep 17 00:00:00 2001
|
||||
From: dann frazier <dann.frazier@canonical.com>
|
||||
Date: Wed, 29 Nov 2023 18:32:34 -0700
|
||||
Subject: [PATCH] tail: fix tailing sysfs files where PAGE_SIZE > BUFSIZ
|
||||
|
||||
* src/tail.c (file_lines): Ensure we use a buffer size >= PAGE_SIZE when
|
||||
searching backwards to avoid seeking within a file,
|
||||
which on sysfs files is accepted but also returns no data.
|
||||
* tests/tail/tail-sysfs.sh: Add a new test.
|
||||
* tests/local.mk: Reference the new test.
|
||||
Fixes https://bugs.gnu.org/67490
|
||||
|
||||
Upstream-commit: 73d119f4f8052a9fb6cef13cd9e75d5a4e23311a
|
||||
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
|
||||
---
|
||||
src/tail.c | 57 +++++++++++++++++++++++++++++-----------
|
||||
tests/local.mk | 1 +
|
||||
tests/tail-2/tail-sysfs.sh | 34 ++++++++++++++++++++++++
|
||||
3 files changed, 77 insertions(+), 15 deletions(-)
|
||||
create mode 100755 tests/tail/tail-sysfs.sh
|
||||
|
||||
diff --git a/src/tail.c b/src/tail.c
|
||||
index c45f3b65a..6979e0ba3 100644
|
||||
--- a/src/tail.c
|
||||
+++ b/src/tail.c
|
||||
@@ -208,6 +208,9 @@ static int nbpids = 0;
|
||||
that is writing to all followed files. */
|
||||
static pid_t pid;
|
||||
|
||||
+/* Used to determine the buffer size when scanning backwards in a file. */
|
||||
+static int page_size;
|
||||
+
|
||||
/* True if we have ever read standard input. */
|
||||
static bool have_read_stdin;
|
||||
|
||||
@@ -515,22 +518,40 @@ xlseek (int fd, off_t offset, int whence, char const *filename)
|
||||
Return true if successful. */
|
||||
|
||||
static bool
|
||||
-file_lines (const char *pretty_filename, int fd, uintmax_t n_lines,
|
||||
- off_t start_pos, off_t end_pos, uintmax_t *read_pos)
|
||||
+file_lines (const char *pretty_filename, int fd, struct stat const *sb,
|
||||
+ uintmax_t n_lines, off_t start_pos, off_t end_pos,
|
||||
+ uintmax_t *read_pos)
|
||||
{
|
||||
- char buffer[BUFSIZ];
|
||||
+ char *buffer;
|
||||
size_t bytes_read;
|
||||
+ blksize_t bufsize = BUFSIZ;
|
||||
off_t pos = end_pos;
|
||||
+ bool ok = true;
|
||||
|
||||
if (n_lines == 0)
|
||||
return true;
|
||||
|
||||
+ /* Be careful with files with sizes that are a multiple of the page size,
|
||||
+ as on /proc or /sys file systems these files accept seeking to within
|
||||
+ the file, but then return no data when read. So use a buffer that's
|
||||
+ at least PAGE_SIZE to avoid seeking within such files.
|
||||
+
|
||||
+ We could also indirectly use a large enough buffer through io_blksize()
|
||||
+ however this would be less efficient in the common case, as it would
|
||||
+ generally pick a larger buffer size, resulting in reading more data
|
||||
+ from the end of the file. */
|
||||
+ assert (S_ISREG (sb->st_mode));
|
||||
+ if (sb->st_size % page_size == 0)
|
||||
+ bufsize = MAX (BUFSIZ, page_size);
|
||||
+
|
||||
+ buffer = xmalloc (bufsize);
|
||||
+
|
||||
/* Set 'bytes_read' to the size of the last, probably partial, buffer;
|
||||
- 0 < 'bytes_read' <= 'BUFSIZ'. */
|
||||
- bytes_read = (pos - start_pos) % BUFSIZ;
|
||||
+ 0 < 'bytes_read' <= 'bufsize'. */
|
||||
+ bytes_read = (pos - start_pos) % bufsize;
|
||||
if (bytes_read == 0)
|
||||
- bytes_read = BUFSIZ;
|
||||
- /* Make 'pos' a multiple of 'BUFSIZ' (0 if the file is short), so that all
|
||||
+ bytes_read = bufsize;
|
||||
+ /* Make 'pos' a multiple of 'bufsize' (0 if the file is short), so that all
|
||||
reads will be on block boundaries, which might increase efficiency. */
|
||||
pos -= bytes_read;
|
||||
xlseek (fd, pos, SEEK_SET, pretty_filename);
|
||||
@@ -538,7 +559,8 @@ file_lines (char const *pretty_filename, int fd, uintmax_t n_lines,
|
||||
if (bytes_read == SAFE_READ_ERROR)
|
||||
{
|
||||
error (0, errno, _("error reading %s"), quoteaf (pretty_filename));
|
||||
- return false;
|
||||
+ ok = false;
|
||||
+ goto free_buffer;
|
||||
}
|
||||
*read_pos = pos + bytes_read;
|
||||
|
||||
@@ -565,7 +587,7 @@ file_lines (char const *pretty_filename, int fd, uintmax_t n_lines,
|
||||
xwrite_stdout (nl + 1, bytes_read - (n + 1));
|
||||
*read_pos += dump_remainder (false, pretty_filename, fd,
|
||||
end_pos - (pos + bytes_read));
|
||||
- return true;
|
||||
+ goto free_buffer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -577,23 +599,26 @@ file_lines (char const *pretty_filename, int fd, uintmax_t n_lines,
|
||||
xlseek (fd, start_pos, SEEK_SET, pretty_filename);
|
||||
*read_pos = start_pos + dump_remainder (false, pretty_filename, fd,
|
||||
end_pos);
|
||||
- return true;
|
||||
+ goto free_buffer;
|
||||
}
|
||||
- pos -= BUFSIZ;
|
||||
+ pos -= bufsize;
|
||||
xlseek (fd, pos, SEEK_SET, pretty_filename);
|
||||
|
||||
- bytes_read = safe_read (fd, buffer, BUFSIZ);
|
||||
+ bytes_read = safe_read (fd, buffer, bufsize);
|
||||
if (bytes_read == SAFE_READ_ERROR)
|
||||
{
|
||||
error (0, errno, _("error reading %s"), quoteaf (pretty_filename));
|
||||
- return false;
|
||||
+ ok = false;
|
||||
+ goto free_buffer;
|
||||
}
|
||||
|
||||
*read_pos = pos + bytes_read;
|
||||
}
|
||||
while (bytes_read > 0);
|
||||
|
||||
- return true;
|
||||
+free_buffer:
|
||||
+ free (buffer);
|
||||
+ return ok;
|
||||
}
|
||||
|
||||
/* Print the last N_LINES lines from the end of the standard input,
|
||||
@@ -1915,7 +1940,7 @@ tail_lines (char const *pretty_filename, int fd, uintmax_t n_lines,
|
||||
{
|
||||
*read_pos = end_pos;
|
||||
if (end_pos != 0
|
||||
- && ! file_lines (pretty_filename, fd, n_lines,
|
||||
+ && ! file_lines (pretty_filename, fd, &stats, n_lines,
|
||||
start_pos, end_pos, read_pos))
|
||||
return false;
|
||||
}
|
||||
@@ -2337,6 +2362,8 @@ main (int argc, char **argv)
|
||||
|
||||
atexit (close_stdout);
|
||||
|
||||
+ page_size = getpagesize ();
|
||||
+
|
||||
have_read_stdin = false;
|
||||
|
||||
count_lines = true;
|
||||
diff --git a/tests/local.mk b/tests/local.mk
|
||||
index db4ee7ed8..bf03238c3 100644
|
||||
--- a/tests/local.mk
|
||||
+++ b/tests/local.mk
|
||||
@@ -257,6 +257,7 @@ all_tests = \
|
||||
tests/misc/seq-precision.sh \
|
||||
tests/misc/head.pl \
|
||||
tests/misc/head-elide-tail.pl \
|
||||
+ tests/tail-2/tail-sysfs.sh \
|
||||
tests/tail-2/tail-n0f.sh \
|
||||
tests/misc/ls-misc.pl \
|
||||
tests/misc/date.pl \
|
||||
diff --git a/tests/tail/tail-sysfs.sh b/tests/tail-2/tail-sysfs.sh
|
||||
new file mode 100755
|
||||
index 000000000..00874b3dc
|
||||
--- /dev/null
|
||||
+++ b/tests/tail-2/tail-sysfs.sh
|
||||
@@ -0,0 +1,34 @@
|
||||
+#!/bin/sh
|
||||
+# sysfs files have weird properties that can be influenced by page size
|
||||
+
|
||||
+# Copyright 2023 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_ tail
|
||||
+
|
||||
+file='/sys/kernel/profiling'
|
||||
+
|
||||
+test -r "$file" || skip_ "No $file file"
|
||||
+
|
||||
+cp -f "$file" exp || framework_failure_
|
||||
+
|
||||
+tail -n1 "$file" > out || fail=1
|
||||
+compare exp out || fail=1
|
||||
+
|
||||
+tail -c2 "$file" > out || fail=1
|
||||
+compare exp out || fail=1
|
||||
+
|
||||
+Exit $fail
|
@ -1,99 +0,0 @@
|
||||
From fc6318841f008dadc1e7c93e539f10d24aa83e90 Mon Sep 17 00:00:00 2001
|
||||
From: Bernhard Voelker <mail@bernhard-voelker.de>
|
||||
Date: Wed, 21 Apr 2021 00:12:00 +0200
|
||||
Subject: [PATCH 1/2] tests: fix FP in ls/stat-free-color.sh
|
||||
|
||||
On newer systems like Fedora 34 and openSUSE Tumbleweed, ls(1) calls
|
||||
newfstatat(STDOUT_FILENO, ...), but only when there is something to
|
||||
output.
|
||||
|
||||
* tests/ls/stat-free-color.sh: Add -a option to the reference invocation
|
||||
of ls, thus enforcing something gets output.
|
||||
|
||||
Upstream-commit: b7091093bb6505c33279f9bc940b2e94763a6e5d
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
tests/ls/stat-free-color.sh | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
|
||||
index 00942f7..87bed1c 100755
|
||||
--- a/tests/ls/stat-free-color.sh
|
||||
+++ b/tests/ls/stat-free-color.sh
|
||||
@@ -56,12 +56,14 @@ eval $(dircolors -b color-without-stat)
|
||||
# The system may perform additional stat-like calls before main.
|
||||
# Furthermore, underlying library functions may also implicitly
|
||||
# add an extra stat call, e.g. opendir since glibc-2.21-360-g46f894d.
|
||||
-# To avoid counting those, first get a baseline count for running
|
||||
-# ls with one empty directory argument. Then, compare that with the
|
||||
-# invocation under test.
|
||||
+# Finally, ls(1) makes a stat call for stdout, but only in the case
|
||||
+# when there is something to output.
|
||||
+# To get the comparison right, first get a baseline count for running
|
||||
+# 'ls -a' with one empty directory argument. Then, compare that with
|
||||
+# the invocation under test.
|
||||
mkdir d || framework_failure_
|
||||
|
||||
-strace -q -o log1 -e $stats ls --color=always d || fail=1
|
||||
+strace -q -o log1 -e $stats ls -a --color=always d || fail=1
|
||||
n_stat1=$(grep -vF '+++' log1 | wc -l) || framework_failure_
|
||||
|
||||
test $n_stat1 = 0 \
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From c16ca58f17a088e925c0d1c4015c48332c380a00 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Sun, 9 May 2021 23:41:00 +0100
|
||||
Subject: [PATCH 2/2] tests: fix tests/cp/sparse-2.sh false failure on some
|
||||
systems
|
||||
|
||||
* tests/cp/sparse-2.sh: Double check cp --sparse=always,
|
||||
with dd conv=sparse, in the case where the former didn't
|
||||
create a sparse file. Now that this test is being newly run
|
||||
on macos, we're seeing a failure due to seek() not creating
|
||||
holes on apfs unless the size is >= 16MiB.
|
||||
|
||||
Upstream-commit: 6b499720fecae935dc00e236d6aefe94d9010482
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
tests/cp/fiemap-2.sh | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/cp/fiemap-2.sh b/tests/cp/fiemap-2.sh
|
||||
index 548a376..e20ce54 100755
|
||||
--- a/tests/cp/fiemap-2.sh
|
||||
+++ b/tests/cp/fiemap-2.sh
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||
-print_ver_ cp
|
||||
+print_ver_ cp stat dd
|
||||
|
||||
# Require a fiemap-enabled FS.
|
||||
touch fiemap_chk # check a file rather than current dir for best coverage
|
||||
@@ -46,10 +46,17 @@ dd bs=1k seek=1 of=k count=255 < /dev/zero || framework_failure_
|
||||
|
||||
# cp should detect the all-zero blocks and convert some of them to holes.
|
||||
# How many it detects/converts currently depends on io_blksize.
|
||||
-# Currently, on my F14/ext4 desktop, this K starts off with size 256KiB,
|
||||
+# Currently, on my F14/ext4 desktop, this K file starts off with size 256KiB,
|
||||
# (note that the K in the preceding test starts off with size 4KiB).
|
||||
# cp from coreutils-8.9 with --sparse=always reduces the size to 32KiB.
|
||||
cp --sparse=always k k2 || fail=1
|
||||
-test $(stat -c %b k2) -lt $(stat -c %b k) || fail=1
|
||||
+if test $(stat -c %b k2) -ge $(stat -c %b k); then
|
||||
+ # If not sparse, then double check by creating with dd
|
||||
+ # as we're not guaranteed that seek will create a hole.
|
||||
+ # apfs on darwin 19.2.0 for example was seen to not to create holes < 16MiB.
|
||||
+ hole_size=$(stat -c %o k2) || framework_failure_
|
||||
+ dd if=k of=k2.dd bs=$hole_size conv=sparse || framework_failure_
|
||||
+ test $(stat -c %b k2) -eq $(stat -c %b k2.dd) || fail=1
|
||||
+fi
|
||||
|
||||
Exit $fail
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
|
||||
index 400e135..47e4480 100644
|
||||
--- a/doc/coreutils.texi
|
||||
+++ b/doc/coreutils.texi
|
||||
@@ -10074,6 +10074,8 @@ incorrect. @xref{Directory Setuid and Setgid}, for how the
|
||||
set-user-ID and set-group-ID bits of directories are inherited unless
|
||||
overridden in this way.
|
||||
|
||||
+Note: The @option{--mode},@option{-m} option only applies to the right-most directories listed on the command line. When combined with @option{--parents}, @option{-p} option, any parent directories are created with @samp{u+wx} modified by umask.
|
||||
+
|
||||
@item -p
|
||||
@itemx --parents
|
||||
@opindex -p
|
@ -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
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 6eb93a992f32d5e8973a195ba167ca7beee02ca5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= <lzaoral@redhat.com>
|
||||
Date: Wed, 2 Oct 2024 17:45:26 +0200
|
||||
Subject: [PATCH] doc: ls: fix regression in -k description
|
||||
|
||||
The description of -k regressed in coreutils 9.0
|
||||
|
||||
* doc/coreutils.texi (ls invocation): Fix incomplete paragraph
|
||||
describing -k introduced by a mistake in commit v8.32-180-g1625916a1.
|
||||
---
|
||||
doc/coreutils.texi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
|
||||
index 03dfd0011..d5dd55092 100644
|
||||
--- a/doc/coreutils.texi
|
||||
+++ b/doc/coreutils.texi
|
||||
@@ -8441,6 +8441,7 @@ overriding any contrary specification in environment variables
|
||||
(@pxref{Block size}). If @option{--block-size},
|
||||
@option{--human-readable} (@option{-h}), or @option{--si} options are used,
|
||||
they take precedence even if @option{--kibibytes} (@option{-k}) is placed after
|
||||
+the other options.
|
||||
|
||||
The @option{--kibibytes} (@option{-k}) option affects the
|
||||
per-directory block count written in long format,
|
||||
--
|
||||
2.46.2
|
||||
|
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEbDfcEhIaUAa8HbgE32/ZcTBgN9kFAmYFirgACgkQ32/ZcTBg
|
||||
N9nZMg//WF6fyy6kxNZJIeUnAzAyMhY5hjlD33hFSaj2ihfmt7IQzRuOu7bhYk94
|
||||
5lpDJvfljubJpuAU15MD0g/7xdRVPEf/igkRqdvm79eWips1c8d7HfcorxqJcYKf
|
||||
40JV0rQyDaMqQbqFl6rPipAaagE3GBSdHz3eNVhiEQ9MII/XKNX7dZ/5MBIUW/wl
|
||||
VM7G7sA4WBh0k+K0fGNALrlFHSmQDqwVIVhuDlFNcVmY37NIsIcvIT910HlKTFWV
|
||||
A5okdepRs9a2dOIhGvMVK/U+4D9vbVbS+QlnXH74UlmnczKPQsCQKsusG02bv9L0
|
||||
ih+jFj9BVCoUjB1fQlo6/VE4Kvdhpg/NZKZCaKIEH0d4mn1XHqvyTTRN0SVOlJr8
|
||||
ZmY7e94A5TDbpkt5MFPxZ6M1Z5dZTtVX2/rkQtb59jIr/p5eYmjId3NsjWtoXICo
|
||||
XMr+hLtjMt/XIfN/eXnaSOZSoyNxOPurfe59hfjVhaexCeIrEIglZmYWw8HhkfWz
|
||||
vAxGWOFVwYfWlWlfxggdYkysRvU0vUb1JhO8HIRwmCX05YEhvTwKZMnvo/z/Y++G
|
||||
CrXyduj9e8jzRkunlU6mqFmHqaYrgt5t7e1PLFYxEgWBX77fvpSbBsLhX5nH2c6I
|
||||
4uRaQpaZQ+hnYu7U5OHfhy1OwG2qcYjbou4zK4BuI1ktnBHFgbc=
|
||||
=IhBg
|
||||
-----END PGP SIGNATURE-----
|
@ -1,94 +0,0 @@
|
||||
diff --git a/lib/getugroups.c b/lib/getugroups.c
|
||||
index 299bae6..8ece29b 100644
|
||||
--- a/lib/getugroups.c
|
||||
+++ b/lib/getugroups.c
|
||||
@@ -19,6 +19,9 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+/* We do not need this code if getgrouplist(3) is available. */
|
||||
+#ifndef HAVE_GETGROUPLIST
|
||||
+
|
||||
#include "getugroups.h"
|
||||
|
||||
#include <errno.h>
|
||||
@@ -126,3 +129,4 @@ getugroups (int maxcount, gid_t *grouplist, char const *username,
|
||||
}
|
||||
|
||||
#endif /* HAVE_GRP_H */
|
||||
+#endif /* have getgrouplist */
|
||||
diff --git a/lib/mgetgroups.c b/lib/mgetgroups.c
|
||||
index 76474c2..0a9d221 100644
|
||||
--- a/lib/mgetgroups.c
|
||||
+++ b/lib/mgetgroups.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#endif
|
||||
|
||||
#include "getugroups.h"
|
||||
+#include "xalloc.h"
|
||||
#include "xalloc-oversized.h"
|
||||
|
||||
/* Work around an incompatibility of OS X 10.11: getgrouplist
|
||||
@@ -121,9 +122,17 @@ mgetgroups (char const *username, gid_t gid, gid_t **groups)
|
||||
/* else no username, so fall through and use getgroups. */
|
||||
#endif
|
||||
|
||||
- max_n_groups = (username
|
||||
- ? getugroups (0, NULL, username, gid)
|
||||
- : getgroups (0, NULL));
|
||||
+ if (!username)
|
||||
+ max_n_groups = getgroups(0, NULL);
|
||||
+ else
|
||||
+ {
|
||||
+#ifdef HAVE_GETGROUPLIST
|
||||
+ max_n_groups = 0;
|
||||
+ getgrouplist (username, gid, NULL, &max_n_groups);
|
||||
+#else
|
||||
+ max_n_groups = getugroups (0, NULL, username, gid);
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
/* If we failed to count groups because there is no supplemental
|
||||
group support, then return an array containing just GID.
|
||||
@@ -145,10 +154,25 @@ mgetgroups (char const *username, gid_t gid, gid_t **groups)
|
||||
if (g == NULL)
|
||||
return -1;
|
||||
|
||||
- ng = (username
|
||||
- ? getugroups (max_n_groups, g, username, gid)
|
||||
- : getgroups (max_n_groups - (gid != (gid_t) -1),
|
||||
- g + (gid != (gid_t) -1)));
|
||||
+ if (!username)
|
||||
+ ng = getgroups (max_n_groups - (gid != (gid_t)-1), g + (gid != (gid_t)-1));
|
||||
+ else
|
||||
+ {
|
||||
+#ifdef HAVE_GETGROUPLIST
|
||||
+ int e;
|
||||
+ ng = max_n_groups;
|
||||
+ while ((e = getgrouplist (username, gid, g, &ng)) == -1
|
||||
+ && ng > max_n_groups)
|
||||
+ {
|
||||
+ max_n_groups = ng;
|
||||
+ g = xrealloc (g, max_n_groups * sizeof (GETGROUPS_T));
|
||||
+ }
|
||||
+ if (e == -1)
|
||||
+ ng = -1;
|
||||
+#else
|
||||
+ ng = getugroups (max_n_groups, g, username, gid);
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
if (ng < 0)
|
||||
{
|
||||
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
|
||||
index 62777c7..5180243 100644
|
||||
--- a/m4/jm-macros.m4
|
||||
+++ b/m4/jm-macros.m4
|
||||
@@ -82,6 +82,7 @@ AC_DEFUN([coreutils_MACROS],
|
||||
fchown
|
||||
fchmod
|
||||
ftruncate
|
||||
+ getgrouplist
|
||||
iswspace
|
||||
mkfifo
|
||||
mbrlen
|
@ -1,565 +0,0 @@
|
||||
diff --git a/src/cut.c b/src/cut.c
|
||||
index 7ab6be4..022d0ad 100644
|
||||
--- a/src/cut.c
|
||||
+++ b/src/cut.c
|
||||
@@ -28,6 +28,11 @@
|
||||
#include <assert.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
+
|
||||
+/* Get mbstate_t, mbrtowc(). */
|
||||
+#if HAVE_WCHAR_H
|
||||
+# include <wchar.h>
|
||||
+#endif
|
||||
#include "system.h"
|
||||
|
||||
#include "error.h"
|
||||
@@ -38,6 +43,18 @@
|
||||
|
||||
#include "set-fields.h"
|
||||
|
||||
+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
|
||||
+ installation; work around this configuration error. */
|
||||
+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
|
||||
+# undef MB_LEN_MAX
|
||||
+# define MB_LEN_MAX 16
|
||||
+#endif
|
||||
+
|
||||
+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
|
||||
+#if HAVE_MBRTOWC && defined mbstate_t
|
||||
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
|
||||
+#endif
|
||||
+
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
#define PROGRAM_NAME "cut"
|
||||
|
||||
@@ -54,6 +71,52 @@
|
||||
} \
|
||||
while (0)
|
||||
|
||||
+/* Refill the buffer BUF to get a multibyte character. */
|
||||
+#define REFILL_BUFFER(BUF, BUFPOS, BUFLEN, STREAM) \
|
||||
+ do \
|
||||
+ { \
|
||||
+ if (BUFLEN < MB_LEN_MAX && !feof (STREAM) && !ferror (STREAM)) \
|
||||
+ { \
|
||||
+ memmove (BUF, BUFPOS, BUFLEN); \
|
||||
+ BUFLEN += fread (BUF + BUFLEN, sizeof(char), BUFSIZ, STREAM); \
|
||||
+ BUFPOS = BUF; \
|
||||
+ } \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+/* Get wide character on BUFPOS. BUFPOS is not included after that.
|
||||
+ If byte sequence is not valid as a character, CONVFAIL is true. Otherwise false. */
|
||||
+#define GET_NEXT_WC_FROM_BUFFER(WC, BUFPOS, BUFLEN, MBLENGTH, STATE, CONVFAIL) \
|
||||
+ do \
|
||||
+ { \
|
||||
+ mbstate_t state_bak; \
|
||||
+ \
|
||||
+ if (BUFLEN < 1) \
|
||||
+ { \
|
||||
+ WC = WEOF; \
|
||||
+ break; \
|
||||
+ } \
|
||||
+ \
|
||||
+ /* Get a wide character. */ \
|
||||
+ CONVFAIL = false; \
|
||||
+ state_bak = STATE; \
|
||||
+ MBLENGTH = mbrtowc ((wchar_t *)&WC, BUFPOS, BUFLEN, &STATE); \
|
||||
+ \
|
||||
+ switch (MBLENGTH) \
|
||||
+ { \
|
||||
+ case (size_t)-1: \
|
||||
+ case (size_t)-2: \
|
||||
+ CONVFAIL = true; \
|
||||
+ STATE = state_bak; \
|
||||
+ /* Fall througn. */ \
|
||||
+ \
|
||||
+ case 0: \
|
||||
+ MBLENGTH = 1; \
|
||||
+ break; \
|
||||
+ } \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
|
||||
/* Pointer inside RP. When checking if a byte or field is selected
|
||||
by a finite range, we check if it is between CURRENT_RP.LO
|
||||
@@ -61,6 +124,9 @@
|
||||
CURRENT_RP.HI then we make CURRENT_RP to point to the next range pair. */
|
||||
static struct field_range_pair *current_rp;
|
||||
|
||||
+/* Length of the delimiter given as argument to -d. */
|
||||
+size_t delimlen;
|
||||
+
|
||||
/* This buffer is used to support the semantics of the -s option
|
||||
(or lack of same) when the specified field list includes (does
|
||||
not include) the first field. In both of those cases, the entire
|
||||
@@ -77,15 +143,25 @@ enum operating_mode
|
||||
{
|
||||
undefined_mode,
|
||||
|
||||
- /* Output characters that are in the given bytes. */
|
||||
+ /* Output bytes that are at the given positions. */
|
||||
byte_mode,
|
||||
|
||||
+ /* Output characters that are at the given positions. */
|
||||
+ character_mode,
|
||||
+
|
||||
/* Output the given delimiter-separated fields. */
|
||||
field_mode
|
||||
};
|
||||
|
||||
static enum operating_mode operating_mode;
|
||||
|
||||
+/* If nonzero, when in byte mode, don't split multibyte characters. */
|
||||
+static int byte_mode_character_aware;
|
||||
+
|
||||
+/* If nonzero, the function for single byte locale is work
|
||||
+ if this program runs on multibyte locale. */
|
||||
+static int force_singlebyte_mode;
|
||||
+
|
||||
/* If true do not output lines containing no delimiter characters.
|
||||
Otherwise, all such lines are printed. This option is valid only
|
||||
with field mode. */
|
||||
@@ -97,6 +173,9 @@ static bool complement;
|
||||
|
||||
/* The delimiter character for field mode. */
|
||||
static unsigned char delim;
|
||||
+#if HAVE_WCHAR_H
|
||||
+static wchar_t wcdelim;
|
||||
+#endif
|
||||
|
||||
/* The delimiter for each line/record. */
|
||||
static unsigned char line_delim = '\n';
|
||||
@@ -164,7 +243,7 @@ Print selected parts of lines from each FILE to standard output.\n\
|
||||
-f, --fields=LIST select only these fields; also print any line\n\
|
||||
that contains no delimiter character, unless\n\
|
||||
the -s option is specified\n\
|
||||
- -n (ignored)\n\
|
||||
+ -n with -b: don't split multibyte characters\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
--complement complement the set of selected bytes, characters\n\
|
||||
@@ -280,6 +359,82 @@ cut_bytes (FILE *stream)
|
||||
}
|
||||
}
|
||||
|
||||
+#if HAVE_MBRTOWC
|
||||
+/* This function is in use for the following case.
|
||||
+
|
||||
+ 1. Read from the stream STREAM, printing to standard output any selected
|
||||
+ characters.
|
||||
+
|
||||
+ 2. Read from stream STREAM, printing to standard output any selected bytes,
|
||||
+ without splitting multibyte characters. */
|
||||
+
|
||||
+static void
|
||||
+cut_characters_or_cut_bytes_no_split (FILE *stream)
|
||||
+{
|
||||
+ uintmax_t idx; /* number of bytes or characters in the line so far. */
|
||||
+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
|
||||
+ char *bufpos; /* Next read position of BUF. */
|
||||
+ size_t buflen; /* The length of the byte sequence in buf. */
|
||||
+ wint_t wc; /* A gotten wide character. */
|
||||
+ size_t mblength; /* The byte size of a multibyte character which shows
|
||||
+ as same character as WC. */
|
||||
+ mbstate_t state; /* State of the stream. */
|
||||
+ bool convfail = false; /* true, when conversion failed. Otherwise false. */
|
||||
+ /* Whether to begin printing delimiters between ranges for the current line.
|
||||
+ Set after we've begun printing data corresponding to the first range. */
|
||||
+ bool print_delimiter = false;
|
||||
+
|
||||
+ idx = 0;
|
||||
+ buflen = 0;
|
||||
+ bufpos = buf;
|
||||
+ memset (&state, '\0', sizeof(mbstate_t));
|
||||
+
|
||||
+ current_rp = frp;
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ REFILL_BUFFER (buf, bufpos, buflen, stream);
|
||||
+
|
||||
+ GET_NEXT_WC_FROM_BUFFER (wc, bufpos, buflen, mblength, state, convfail);
|
||||
+ (void) convfail; /* ignore unused */
|
||||
+
|
||||
+ if (wc == WEOF)
|
||||
+ {
|
||||
+ if (idx > 0)
|
||||
+ putchar (line_delim);
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (wc == line_delim)
|
||||
+ {
|
||||
+ putchar (line_delim);
|
||||
+ idx = 0;
|
||||
+ print_delimiter = false;
|
||||
+ current_rp = frp;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ next_item (&idx);
|
||||
+ if (print_kth (idx))
|
||||
+ {
|
||||
+ if (output_delimiter_specified)
|
||||
+ {
|
||||
+ if (print_delimiter && is_range_start_index (idx))
|
||||
+ {
|
||||
+ fwrite (output_delimiter_string, sizeof (char),
|
||||
+ output_delimiter_length, stdout);
|
||||
+ }
|
||||
+ print_delimiter = true;
|
||||
+ }
|
||||
+ fwrite (bufpos, mblength, sizeof(char), stdout);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ buflen -= mblength;
|
||||
+ bufpos += mblength;
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* Read from stream STREAM, printing to standard output any selected fields. */
|
||||
|
||||
static void
|
||||
@@ -425,13 +580,211 @@ cut_fields (FILE *stream)
|
||||
}
|
||||
}
|
||||
|
||||
+#if HAVE_MBRTOWC
|
||||
+static void
|
||||
+cut_fields_mb (FILE *stream)
|
||||
+{
|
||||
+ int c;
|
||||
+ uintmax_t field_idx;
|
||||
+ int found_any_selected_field;
|
||||
+ int buffer_first_field;
|
||||
+ int empty_input;
|
||||
+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
|
||||
+ char *bufpos; /* Next read position of BUF. */
|
||||
+ size_t buflen; /* The length of the byte sequence in buf. */
|
||||
+ wint_t wc = 0; /* A gotten wide character. */
|
||||
+ size_t mblength; /* The byte size of a multibyte character which shows
|
||||
+ as same character as WC. */
|
||||
+ mbstate_t state; /* State of the stream. */
|
||||
+ bool convfail = false; /* true, when conversion failed. Otherwise false. */
|
||||
+
|
||||
+ current_rp = frp;
|
||||
+
|
||||
+ found_any_selected_field = 0;
|
||||
+ field_idx = 1;
|
||||
+ bufpos = buf;
|
||||
+ buflen = 0;
|
||||
+ memset (&state, '\0', sizeof(mbstate_t));
|
||||
+
|
||||
+ c = getc (stream);
|
||||
+ empty_input = (c == EOF);
|
||||
+ if (c != EOF)
|
||||
+ {
|
||||
+ ungetc (c, stream);
|
||||
+ wc = 0;
|
||||
+ }
|
||||
+ else
|
||||
+ wc = WEOF;
|
||||
+
|
||||
+ /* To support the semantics of the -s flag, we may have to buffer
|
||||
+ all of the first field to determine whether it is `delimited.'
|
||||
+ But that is unnecessary if all non-delimited lines must be printed
|
||||
+ and the first field has been selected, or if non-delimited lines
|
||||
+ must be suppressed and the first field has *not* been selected.
|
||||
+ That is because a non-delimited line has exactly one field. */
|
||||
+ buffer_first_field = (suppress_non_delimited ^ !print_kth (1));
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (field_idx == 1 && buffer_first_field)
|
||||
+ {
|
||||
+ int len = 0;
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ REFILL_BUFFER (buf, bufpos, buflen, stream);
|
||||
+
|
||||
+ GET_NEXT_WC_FROM_BUFFER
|
||||
+ (wc, bufpos, buflen, mblength, state, convfail);
|
||||
+
|
||||
+ if (wc == WEOF)
|
||||
+ break;
|
||||
+
|
||||
+ field_1_buffer = xrealloc (field_1_buffer, len + mblength);
|
||||
+ memcpy (field_1_buffer + len, bufpos, mblength);
|
||||
+ len += mblength;
|
||||
+ buflen -= mblength;
|
||||
+ bufpos += mblength;
|
||||
+
|
||||
+ if (!convfail && (wc == line_delim || wc == wcdelim))
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (len <= 0 && wc == WEOF)
|
||||
+ break;
|
||||
+
|
||||
+ /* If the first field extends to the end of line (it is not
|
||||
+ delimited) and we are printing all non-delimited lines,
|
||||
+ print this one. */
|
||||
+ if (convfail || (!convfail && wc != wcdelim))
|
||||
+ {
|
||||
+ if (suppress_non_delimited)
|
||||
+ {
|
||||
+ /* Empty. */
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ fwrite (field_1_buffer, sizeof (char), len, stdout);
|
||||
+ /* Make sure the output line is newline terminated. */
|
||||
+ if (convfail || (!convfail && wc != line_delim))
|
||||
+ putchar (line_delim);
|
||||
+ }
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (print_kth (1))
|
||||
+ {
|
||||
+ /* Print the field, but not the trailing delimiter. */
|
||||
+ fwrite (field_1_buffer, sizeof (char), len - 1, stdout);
|
||||
+ found_any_selected_field = 1;
|
||||
+ }
|
||||
+ next_item (&field_idx);
|
||||
+ }
|
||||
+
|
||||
+ if (wc != WEOF)
|
||||
+ {
|
||||
+ if (print_kth (field_idx))
|
||||
+ {
|
||||
+ if (found_any_selected_field)
|
||||
+ {
|
||||
+ fwrite (output_delimiter_string, sizeof (char),
|
||||
+ output_delimiter_length, stdout);
|
||||
+ }
|
||||
+ found_any_selected_field = 1;
|
||||
+ }
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ REFILL_BUFFER (buf, bufpos, buflen, stream);
|
||||
+
|
||||
+ GET_NEXT_WC_FROM_BUFFER
|
||||
+ (wc, bufpos, buflen, mblength, state, convfail);
|
||||
+
|
||||
+ if (wc == WEOF)
|
||||
+ break;
|
||||
+ else if (!convfail && (wc == wcdelim || wc == line_delim))
|
||||
+ {
|
||||
+ buflen -= mblength;
|
||||
+ bufpos += mblength;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (print_kth (field_idx))
|
||||
+ fwrite (bufpos, mblength, sizeof(char), stdout);
|
||||
+
|
||||
+ buflen -= mblength;
|
||||
+ bufpos += mblength;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if ((!convfail || wc == line_delim) && buflen < 1)
|
||||
+ wc = WEOF;
|
||||
+
|
||||
+ if (!convfail && wc == wcdelim)
|
||||
+ next_item (&field_idx);
|
||||
+ else if (wc == WEOF || (!convfail && wc == line_delim))
|
||||
+ {
|
||||
+ if (found_any_selected_field
|
||||
+ || (!empty_input && !(suppress_non_delimited && field_idx == 1)))
|
||||
+ putchar (line_delim);
|
||||
+ if (wc == WEOF)
|
||||
+ break;
|
||||
+ field_idx = 1;
|
||||
+ current_rp = frp;
|
||||
+ found_any_selected_field = 0;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static void
|
||||
cut_stream (FILE *stream)
|
||||
{
|
||||
- if (operating_mode == byte_mode)
|
||||
- cut_bytes (stream);
|
||||
+#if HAVE_MBRTOWC
|
||||
+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode)
|
||||
+ {
|
||||
+ switch (operating_mode)
|
||||
+ {
|
||||
+ case byte_mode:
|
||||
+ if (byte_mode_character_aware)
|
||||
+ cut_characters_or_cut_bytes_no_split (stream);
|
||||
+ else
|
||||
+ cut_bytes (stream);
|
||||
+ break;
|
||||
+
|
||||
+ case character_mode:
|
||||
+ cut_characters_or_cut_bytes_no_split (stream);
|
||||
+ break;
|
||||
+
|
||||
+ case field_mode:
|
||||
+ if (delimlen == 1)
|
||||
+ {
|
||||
+ /* Check if we have utf8 multibyte locale, so we can use this
|
||||
+ optimization because of uniqueness of characters, which is
|
||||
+ not true for e.g. SJIS */
|
||||
+ char * loc = setlocale(LC_CTYPE, NULL);
|
||||
+ if (loc && (strstr (loc, "UTF-8") || strstr (loc, "utf-8") ||
|
||||
+ strstr (loc, "UTF8") || strstr (loc, "utf8")))
|
||||
+ {
|
||||
+ cut_fields (stream);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ cut_fields_mb (stream);
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ abort ();
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
- cut_fields (stream);
|
||||
+#endif
|
||||
+ {
|
||||
+ if (operating_mode == field_mode)
|
||||
+ cut_fields (stream);
|
||||
+ else
|
||||
+ cut_bytes (stream);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Process file FILE to standard output.
|
||||
@@ -483,6 +836,7 @@ main (int argc, char **argv)
|
||||
bool ok;
|
||||
bool delim_specified = false;
|
||||
char *spec_list_string IF_LINT ( = NULL);
|
||||
+ char mbdelim[MB_LEN_MAX + 1];
|
||||
|
||||
initialize_main (&argc, &argv);
|
||||
set_program_name (argv[0]);
|
||||
@@ -505,7 +859,6 @@ main (int argc, char **argv)
|
||||
switch (optc)
|
||||
{
|
||||
case 'b':
|
||||
- case 'c':
|
||||
/* Build the byte list. */
|
||||
if (operating_mode != undefined_mode)
|
||||
FATAL_ERROR (_("only one type of list may be specified"));
|
||||
@@ -513,6 +866,14 @@ main (int argc, char **argv)
|
||||
spec_list_string = optarg;
|
||||
break;
|
||||
|
||||
+ case 'c':
|
||||
+ /* Build the character list. */
|
||||
+ if (operating_mode != undefined_mode)
|
||||
+ FATAL_ERROR (_("only one type of list may be specified"));
|
||||
+ operating_mode = character_mode;
|
||||
+ spec_list_string = optarg;
|
||||
+ break;
|
||||
+
|
||||
case 'f':
|
||||
/* Build the field list. */
|
||||
if (operating_mode != undefined_mode)
|
||||
@@ -524,10 +885,38 @@ main (int argc, char **argv)
|
||||
case 'd':
|
||||
/* New delimiter. */
|
||||
/* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
|
||||
- if (optarg[0] != '\0' && optarg[1] != '\0')
|
||||
- FATAL_ERROR (_("the delimiter must be a single character"));
|
||||
- delim = optarg[0];
|
||||
- delim_specified = true;
|
||||
+ {
|
||||
+#if HAVE_MBRTOWC
|
||||
+ if(MB_CUR_MAX > 1)
|
||||
+ {
|
||||
+ mbstate_t state;
|
||||
+
|
||||
+ memset (&state, '\0', sizeof(mbstate_t));
|
||||
+ delimlen = mbrtowc (&wcdelim, optarg, strnlen(optarg, MB_LEN_MAX), &state);
|
||||
+
|
||||
+ if (delimlen == (size_t)-1 || delimlen == (size_t)-2)
|
||||
+ ++force_singlebyte_mode;
|
||||
+ else
|
||||
+ {
|
||||
+ delimlen = (delimlen < 1) ? 1 : delimlen;
|
||||
+ if (wcdelim != L'\0' && *(optarg + delimlen) != '\0')
|
||||
+ FATAL_ERROR (_("the delimiter must be a single character"));
|
||||
+ memcpy (mbdelim, optarg, delimlen);
|
||||
+ mbdelim[delimlen] = '\0';
|
||||
+ if (delimlen == 1)
|
||||
+ delim = *optarg;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode)
|
||||
+#endif
|
||||
+ {
|
||||
+ if (optarg[0] != '\0' && optarg[1] != '\0')
|
||||
+ FATAL_ERROR (_("the delimiter must be a single character"));
|
||||
+ delim = (unsigned char) optarg[0];
|
||||
+ }
|
||||
+ delim_specified = true;
|
||||
+ }
|
||||
break;
|
||||
|
||||
case OUTPUT_DELIMITER_OPTION:
|
||||
@@ -540,6 +929,7 @@ main (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
+ byte_mode_character_aware = 1;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
@@ -579,15 +969,34 @@ main (int argc, char **argv)
|
||||
| (complement ? SETFLD_COMPLEMENT : 0) );
|
||||
|
||||
if (!delim_specified)
|
||||
- delim = '\t';
|
||||
+ {
|
||||
+ delim = '\t';
|
||||
+#ifdef HAVE_MBRTOWC
|
||||
+ wcdelim = L'\t';
|
||||
+ mbdelim[0] = '\t';
|
||||
+ mbdelim[1] = '\0';
|
||||
+ delimlen = 1;
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
if (output_delimiter_string == NULL)
|
||||
{
|
||||
- static char dummy[2];
|
||||
- dummy[0] = delim;
|
||||
- dummy[1] = '\0';
|
||||
- output_delimiter_string = dummy;
|
||||
- output_delimiter_length = 1;
|
||||
+#ifdef HAVE_MBRTOWC
|
||||
+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode)
|
||||
+ {
|
||||
+ output_delimiter_string = xstrdup(mbdelim);
|
||||
+ output_delimiter_length = delimlen;
|
||||
+ }
|
||||
+
|
||||
+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode)
|
||||
+#endif
|
||||
+ {
|
||||
+ static char dummy[2];
|
||||
+ dummy[0] = delim;
|
||||
+ dummy[1] = '\0';
|
||||
+ output_delimiter_string = dummy;
|
||||
+ output_delimiter_length = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (optind == argc)
|
@ -1,108 +0,0 @@
|
||||
diff --git a/src/expand.c b/src/expand.c
|
||||
index 380e020..310b349 100644
|
||||
--- a/src/expand.c
|
||||
+++ b/src/expand.c
|
||||
@@ -129,15 +129,19 @@ expand (void)
|
||||
|
||||
do
|
||||
{
|
||||
- do {
|
||||
+ while (true) {
|
||||
mbf_getc (c, mbf);
|
||||
- if (mb_iseof (c))
|
||||
+ if ((mb_iseof (c)) && (fp = next_file (fp)))
|
||||
{
|
||||
- mbf_init (mbf, fp = next_file (fp));
|
||||
+ mbf_init (mbf, fp);
|
||||
continue;
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
- while (false);
|
||||
+
|
||||
|
||||
if (convert)
|
||||
{
|
||||
diff --git a/src/unexpand.c b/src/unexpand.c
|
||||
index 3bbbd66..863a90a 100644
|
||||
--- a/src/unexpand.c
|
||||
+++ b/src/unexpand.c
|
||||
@@ -164,15 +164,19 @@ unexpand (void)
|
||||
|
||||
do
|
||||
{
|
||||
- do {
|
||||
+ while (true) {
|
||||
mbf_getc (c, mbf);
|
||||
- if (mb_iseof (c))
|
||||
+ if ((mb_iseof (c)) && (fp = next_file (fp)))
|
||||
{
|
||||
- mbf_init (mbf, fp = next_file (fp));
|
||||
+ mbf_init (mbf, fp);
|
||||
continue;
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
- while (false);
|
||||
+
|
||||
|
||||
if (convert)
|
||||
{
|
||||
diff --git a/tests/expand/mb.sh b/tests/expand/mb.sh
|
||||
index 7971e18..031be7a 100755
|
||||
--- a/tests/expand/mb.sh
|
||||
+++ b/tests/expand/mb.sh
|
||||
@@ -44,6 +44,20 @@ EOF
|
||||
expand < in > out || fail=1
|
||||
compare exp out > /dev/null 2>&1 || fail=1
|
||||
|
||||
+#multiple files as an input
|
||||
+cat <<\EOF >> exp || framework_failure_
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+ äöü . öüä. ä xx
|
||||
+EOF
|
||||
+
|
||||
+expand ./in ./in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
#test characters with display widths != 1
|
||||
env printf '12345678
|
||||
e\t|ascii(1)
|
||||
diff --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh
|
||||
index 60d4c1a..8d75652 100755
|
||||
--- a/tests/unexpand/mb.sh
|
||||
+++ b/tests/unexpand/mb.sh
|
||||
@@ -44,6 +44,22 @@ EOF
|
||||
unexpand -a < in > out || fail=1
|
||||
compare exp out > /dev/null 2>&1 || fail=1
|
||||
|
||||
+
|
||||
+#multiple files as an input
|
||||
+cat >> exp <<\EOF
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+ äöü . öüä. ä xx
|
||||
+EOF
|
||||
+
|
||||
+
|
||||
+unexpand -a ./in ./in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
#test characters with a display width larger than 1
|
||||
|
||||
env printf '12345678
|
@ -1,80 +0,0 @@
|
||||
From ff424639fe863cbd6963add1a79b97290c1606c6 Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Fri, 3 Feb 2017 12:26:53 +0100
|
||||
Subject: [PATCH] fold.c: preserve new-lines in mutlibyte text
|
||||
|
||||
---
|
||||
src/fold.c | 49 ++++++++++++++++++++++++-------------------------
|
||||
1 file changed, 24 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/src/fold.c b/src/fold.c
|
||||
index d23edd5..8c232a7 100644
|
||||
--- a/src/fold.c
|
||||
+++ b/src/fold.c
|
||||
@@ -342,39 +342,38 @@ fold_multibyte_text (FILE *istream, size_t width, int *saved_errno)
|
||||
}
|
||||
|
||||
rescan:
|
||||
- if (operating_mode == byte_mode) /* byte mode */
|
||||
+ if (convfail)
|
||||
+ increment = 1;
|
||||
+ else if (wc == L'\n')
|
||||
+ {
|
||||
+ /* preserve newline */
|
||||
+ fwrite (line_out, sizeof(char), offset_out, stdout);
|
||||
+ START_NEW_LINE;
|
||||
+ continue;
|
||||
+ }
|
||||
+ else if (operating_mode == byte_mode) /* byte mode */
|
||||
increment = mblength;
|
||||
else if (operating_mode == character_mode) /* character mode */
|
||||
increment = 1;
|
||||
- else /* column mode */
|
||||
+ else /* column mode */
|
||||
{
|
||||
- if (convfail)
|
||||
- increment = 1;
|
||||
- else
|
||||
+ switch (wc)
|
||||
{
|
||||
- switch (wc)
|
||||
- {
|
||||
- case L'\n':
|
||||
- fwrite (line_out, sizeof(char), offset_out, stdout);
|
||||
- START_NEW_LINE;
|
||||
- continue;
|
||||
+ case L'\b':
|
||||
+ increment = (column > 0) ? -1 : 0;
|
||||
+ break;
|
||||
|
||||
- case L'\b':
|
||||
- increment = (column > 0) ? -1 : 0;
|
||||
- break;
|
||||
+ case L'\r':
|
||||
+ increment = -1 * column;
|
||||
+ break;
|
||||
|
||||
- case L'\r':
|
||||
- increment = -1 * column;
|
||||
- break;
|
||||
+ case L'\t':
|
||||
+ increment = 8 - column % 8;
|
||||
+ break;
|
||||
|
||||
- case L'\t':
|
||||
- increment = 8 - column % 8;
|
||||
- break;
|
||||
-
|
||||
- default:
|
||||
- increment = wcwidth (wc);
|
||||
- increment = (increment < 0) ? 0 : increment;
|
||||
- }
|
||||
+ default:
|
||||
+ increment = wcwidth (wc);
|
||||
+ increment = (increment < 0) ? 0 : increment;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 3976ef5a20369d8b490907ab2cba2d617305a5e0 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Mon, 30 May 2016 16:19:20 +0200
|
||||
Subject: [PATCH] sort: do not use static array 'blanks' in human_numcompare()
|
||||
|
||||
... because the array is not initialized with MB locales. Note this is
|
||||
rather a conservative fix. I plan to do more cleanup of the i18n patch
|
||||
in Fedora to prevent mistakes like this in future updates of coreutils.
|
||||
---
|
||||
src/sort.c | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/sort.c b/src/sort.c
|
||||
index 9e07ad8..e47b039 100644
|
||||
--- a/src/sort.c
|
||||
+++ b/src/sort.c
|
||||
@@ -2304,12 +2304,10 @@ find_unit_order (char const *number)
|
||||
<none/unknown> < K/k < M < G < T < P < E < Z < Y */
|
||||
|
||||
static int
|
||||
-human_numcompare (char const *a, char const *b)
|
||||
+human_numcompare (char *a, char *b)
|
||||
{
|
||||
- while (blanks[to_uchar (*a)])
|
||||
- a++;
|
||||
- while (blanks[to_uchar (*b)])
|
||||
- b++;
|
||||
+ skipblanks(&a, a + strlen(a));
|
||||
+ skipblanks(&b, b + strlen(b));
|
||||
|
||||
int diff = find_unit_order (a) - find_unit_order (b);
|
||||
return (diff ? diff : strnumcmp (a, b, decimal_point, thousands_sep));
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,456 +0,0 @@
|
||||
From 7a7c776a4e228d180e74614fd8c8afcad5d4bdf7 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Martisko <jamartis@redhat.com>
|
||||
Date: Thu, 7 Jul 2016 12:53:26 +0200
|
||||
Subject: [PATCH] coreutils-i18n-un-expand-BOM.patch
|
||||
|
||||
---
|
||||
src/expand-common.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
src/expand-common.h | 12 ++++++
|
||||
src/expand.c | 45 +++++++++++++++++++-
|
||||
src/unexpand.c | 43 ++++++++++++++++++-
|
||||
tests/expand/mb.sh | 71 ++++++++++++++++++++++++++++++++
|
||||
tests/unexpand/mb.sh | 59 ++++++++++++++++++++++++++
|
||||
6 files changed, 342 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/expand-common.c b/src/expand-common.c
|
||||
index 4657e46..97cbb09 100644
|
||||
--- a/src/expand-common.c
|
||||
+++ b/src/expand-common.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
+#include <mbfile.h>
|
||||
#include "system.h"
|
||||
#include "die.h"
|
||||
#include "error.h"
|
||||
@@ -126,6 +127,119 @@ set_increment_size (uintmax_t tabval)
|
||||
return ok;
|
||||
}
|
||||
|
||||
+extern int
|
||||
+set_utf_locale (void)
|
||||
+{
|
||||
+ /*try using some predefined locale */
|
||||
+ const char* predef_locales[] = {"C.UTF8","en_US.UTF8","en_GB.UTF8"};
|
||||
+
|
||||
+ const int predef_locales_count=3;
|
||||
+ for (int i=0;i<predef_locales_count;i++)
|
||||
+ {
|
||||
+ if (setlocale(LC_ALL,predef_locales[i])!=NULL)
|
||||
+ {
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (i==predef_locales_count-1)
|
||||
+ {
|
||||
+ return 1;
|
||||
+ error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale"));
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+extern bool
|
||||
+check_utf_locale(void)
|
||||
+{
|
||||
+ char* locale = setlocale (LC_CTYPE , NULL);
|
||||
+ if (locale == NULL)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ else if (strcasestr(locale, "utf8") == NULL && strcasestr(locale, "utf-8") == NULL)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+extern bool
|
||||
+check_bom(FILE* fp, mb_file_t *mbf)
|
||||
+{
|
||||
+ int c;
|
||||
+
|
||||
+
|
||||
+ c=fgetc(fp);
|
||||
+
|
||||
+ /*test BOM header of the first file */
|
||||
+ mbf->bufcount=0;
|
||||
+ if (c == 0xEF)
|
||||
+ {
|
||||
+ c=fgetc(fp);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (c != EOF)
|
||||
+ {
|
||||
+ ungetc(c,fp);
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ if (c == 0xBB)
|
||||
+ {
|
||||
+ c=fgetc(fp);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if ( c!= EOF )
|
||||
+ {
|
||||
+ mbf->buf[0]=(unsigned char) 0xEF;
|
||||
+ mbf->bufcount=1;
|
||||
+ ungetc(c,fp);
|
||||
+ return false;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ungetc(0xEF,fp);
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ if (c == 0xBF)
|
||||
+ {
|
||||
+ mbf->bufcount=0;
|
||||
+ return true;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (c != EOF)
|
||||
+ {
|
||||
+ mbf->buf[0]=(unsigned char) 0xEF;
|
||||
+ mbf->buf[1]=(unsigned char) 0xBB;
|
||||
+ mbf->bufcount=2;
|
||||
+ ungetc(c,fp);
|
||||
+ return false;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ mbf->buf[0]=(unsigned char) 0xEF;
|
||||
+ mbf->bufcount=1;
|
||||
+ ungetc(0xBB,fp);
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+extern void
|
||||
+print_bom(void)
|
||||
+{
|
||||
+ putc (0xEF, stdout);
|
||||
+ putc (0xBB, stdout);
|
||||
+ putc (0xBF, stdout);
|
||||
+}
|
||||
+
|
||||
/* Add the comma or blank separated list of tab stops STOPS
|
||||
to the list of tab stops. */
|
||||
extern void
|
||||
diff --git a/src/expand-common.h b/src/expand-common.h
|
||||
index 8cb2079..763bfda 100644
|
||||
--- a/src/expand-common.h
|
||||
+++ b/src/expand-common.h
|
||||
@@ -34,6 +34,18 @@ extern size_t max_column_width;
|
||||
/* The desired exit status. */
|
||||
extern int exit_status;
|
||||
|
||||
+extern int
|
||||
+set_utf_locale (void);
|
||||
+
|
||||
+extern bool
|
||||
+check_utf_locale(void);
|
||||
+
|
||||
+extern bool
|
||||
+check_bom(FILE* fp, mb_file_t *mbf);
|
||||
+
|
||||
+extern void
|
||||
+print_bom(void);
|
||||
+
|
||||
/* Add tab stop TABVAL to the end of 'tab_list'. */
|
||||
extern void
|
||||
add_tab_stop (uintmax_t tabval);
|
||||
diff --git a/src/expand.c b/src/expand.c
|
||||
index 310b349..4136824 100644
|
||||
--- a/src/expand.c
|
||||
+++ b/src/expand.c
|
||||
@@ -103,11 +103,33 @@ expand (void)
|
||||
FILE *fp = next_file (NULL);
|
||||
mb_file_t mbf;
|
||||
mbf_char_t c;
|
||||
+ /* True if the starting locale is utf8. */
|
||||
+ bool using_utf_locale;
|
||||
+
|
||||
+ /* True if the first file contains BOM header. */
|
||||
+ bool found_bom;
|
||||
+ using_utf_locale=check_utf_locale();
|
||||
|
||||
if (!fp)
|
||||
return;
|
||||
-
|
||||
mbf_init (mbf, fp);
|
||||
+ found_bom=check_bom(fp,&mbf);
|
||||
+
|
||||
+ if (using_utf_locale == false && found_bom == true)
|
||||
+ {
|
||||
+ /*try using some predefined locale */
|
||||
+
|
||||
+ if (set_utf_locale () != 0)
|
||||
+ {
|
||||
+ error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale"));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ if (found_bom == true)
|
||||
+ {
|
||||
+ print_bom();
|
||||
+ }
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -132,6 +154,27 @@ expand (void)
|
||||
if ((mb_iseof (c)) && (fp = next_file (fp)))
|
||||
{
|
||||
mbf_init (mbf, fp);
|
||||
+ if (fp!=NULL)
|
||||
+ {
|
||||
+ if (check_bom(fp,&mbf)==true)
|
||||
+ {
|
||||
+ /*Not the first file - check BOM header*/
|
||||
+ if (using_utf_locale==false && found_bom==false)
|
||||
+ {
|
||||
+ /*BOM header in subsequent file but not in the first one. */
|
||||
+ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header"));
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if(using_utf_locale==false && found_bom==true)
|
||||
+ {
|
||||
+ /*First file conatined BOM header - locale was switched to UTF
|
||||
+ *all subsequent files should contain BOM. */
|
||||
+ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header"));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
continue;
|
||||
}
|
||||
else
|
||||
diff --git a/src/unexpand.c b/src/unexpand.c
|
||||
index 863a90a..5681b58 100644
|
||||
--- a/src/unexpand.c
|
||||
+++ b/src/unexpand.c
|
||||
@@ -116,16 +116,36 @@ unexpand (void)
|
||||
include characters other than spaces, so the blanks must be
|
||||
stored, not merely counted. */
|
||||
mbf_char_t *pending_blank;
|
||||
+ /* True if the starting locale is utf8. */
|
||||
+ bool using_utf_locale;
|
||||
+
|
||||
+ /* True if the first file contains BOM header. */
|
||||
+ bool found_bom;
|
||||
+ using_utf_locale=check_utf_locale();
|
||||
|
||||
if (!fp)
|
||||
return;
|
||||
+ mbf_init (mbf, fp);
|
||||
+ found_bom=check_bom(fp,&mbf);
|
||||
+
|
||||
+ if (using_utf_locale == false && found_bom == true)
|
||||
+ {
|
||||
+ /*try using some predefined locale */
|
||||
|
||||
+ if (set_utf_locale () != 0)
|
||||
+ {
|
||||
+ error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale"));
|
||||
+ }
|
||||
+ }
|
||||
/* The worst case is a non-blank character, then one blank, then a
|
||||
tab stop, then MAX_COLUMN_WIDTH - 1 blanks, then a non-blank; so
|
||||
allocate MAX_COLUMN_WIDTH bytes to store the blanks. */
|
||||
pending_blank = xmalloc (max_column_width * sizeof (mbf_char_t));
|
||||
|
||||
- mbf_init (mbf, fp);
|
||||
+ if (found_bom == true)
|
||||
+ {
|
||||
+ print_bom();
|
||||
+ }
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -169,6 +189,27 @@ unexpand (void)
|
||||
if ((mb_iseof (c)) && (fp = next_file (fp)))
|
||||
{
|
||||
mbf_init (mbf, fp);
|
||||
+ if (fp!=NULL)
|
||||
+ {
|
||||
+ if (check_bom(fp,&mbf)==true)
|
||||
+ {
|
||||
+ /*Not the first file - check BOM header*/
|
||||
+ if (using_utf_locale==false && found_bom==false)
|
||||
+ {
|
||||
+ /*BOM header in subsequent file but not in the first one. */
|
||||
+ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header"));
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if(using_utf_locale==false && found_bom==true)
|
||||
+ {
|
||||
+ /*First file conatined BOM header - locale was switched to UTF
|
||||
+ *all subsequent files should contain BOM. */
|
||||
+ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header"));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
continue;
|
||||
}
|
||||
else
|
||||
diff --git a/tests/expand/mb.sh b/tests/expand/mb.sh
|
||||
index 031be7a..1621c84 100755
|
||||
--- a/tests/expand/mb.sh
|
||||
+++ b/tests/expand/mb.sh
|
||||
@@ -109,4 +109,75 @@ env printf '12345678
|
||||
expand < in > out || fail=1
|
||||
compare exp out > /dev/null 2>&1 || fail=1
|
||||
|
||||
+
|
||||
+
|
||||
+#BOM header test 1
|
||||
+printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+EOF
|
||||
+env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_
|
||||
+
|
||||
+printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+ äöü . öüä. ä xx
|
||||
+EOF
|
||||
+
|
||||
+
|
||||
+expand < in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+LANG=C expand < in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+LC_ALL=C expand < in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+
|
||||
+printf '\xEF\xBB\xBF' > in1; cat <<\EOF >> in1 || framework_failure_
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+EOF
|
||||
+env printf ' äöü\t. öüä. \tä xx\n' >> in1 || framework_failure_
|
||||
+
|
||||
+
|
||||
+printf '\xEF\xBB\xBF' > exp; cat <<\EOF >> exp || framework_failure_
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+ äöü . öüä. ä xx
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+ äöü . öüä. ä xx
|
||||
+EOF
|
||||
+
|
||||
+expand in1 in1 > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+LANG=C expand in1 in1 > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+LC_ALL=C expand in1 in1 > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
exit $fail
|
||||
diff --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh
|
||||
index 8d75652..9d4ee3e 100755
|
||||
--- a/tests/unexpand/mb.sh
|
||||
+++ b/tests/unexpand/mb.sh
|
||||
@@ -111,3 +111,62 @@ env printf '12345678
|
||||
|
||||
unexpand -a < in > out || fail=1
|
||||
compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+#BOM header test 1
|
||||
+printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+ äöü . öüä. ä xx
|
||||
+EOF
|
||||
+env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_
|
||||
+
|
||||
+printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+ äöü . öüä. ä xx
|
||||
+EOF
|
||||
+
|
||||
+unexpand < in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+LANG=C unexpand < in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+LC_ALL=C unexpand < in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+
|
||||
+printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+ äöü . öüä. ä xx
|
||||
+1234567812345678123456781
|
||||
+. . . .
|
||||
+a b c d
|
||||
+. . . .
|
||||
+ä ö ü ß
|
||||
+. . . .
|
||||
+ äöü . öüä. ä xx
|
||||
+EOF
|
||||
+
|
||||
+
|
||||
+unexpand in in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+LANG=C unexpand in in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
+
|
||||
+LC_ALL=C unexpand in in > out || fail=1
|
||||
+compare exp out > /dev/null 2>&1 || fail=1
|
||||
--
|
||||
2.9.3
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,312 @@
|
||||
Release GPG keyring of coreutils group.
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBE58fE4BEADGS6VzDkx2OOQMPQedsmBtRs3S5sz9tzO51EwkS779js3Sjt96
|
||||
KlQM0SbwtbUxOFor42LRXJKUU9T/Jl3v3+onASvoHAUcuAL15WAhnY9cuQeFOvZP
|
||||
/iy0I1+bV0CILrz364T6vL614obnBBdTg8ZqSZM+csRlpGwXJiuY6mkrsPLXakxA
|
||||
35n/nAgQOcQPj36CuuvpCH4JKPkzklwUMqueDzXkYMNSdWmVnI+ZSfDmeiwzAbFY
|
||||
tE5uGW+c3DzD98RGCLt3FLr86n24IDlaTZSsaWbTJVsur9s4sbp6rST3pspDSQYF
|
||||
ShhJ5aqqEYIvPp5kXj2CZJjOFBnIkn+0aDSps+XrnZjJn/f8f9lIAg0/0JjmytHY
|
||||
yopo6HFZMdtOvklmnsIuJ/fdyk7761+necYHf5dopVuv29PSu62+A/gnKGfGaqtY
|
||||
AjXFfsiLp/+iTQ+LNV4hWFbFKHHZOn4G194pWl6nY1gArwQKPZ5p6uy5EXgiNPRs
|
||||
C1CcuVZNJp1RiayhTI68uuI+cldBU6N7+yZKGhjDUQKjIZ3eDB8X7vsCC9S1GgvX
|
||||
Hcv8mjcMcHtnoC0w0FiW35JYtAu9mY4+uQhoRPTyPHh+ufX+OdKf7q5BKCppY1r7
|
||||
HF1VRFKjSybhEwMeGBdj1EEY413/A8ynpgpHLosPT36n8HtAWUGu+TadZQARAQAB
|
||||
tCFQw6FkcmFpZyBCcmFkeSA8UEBkcmFpZ0JyYWR5LmNvbT6JAjsEEwECACUCGwMG
|
||||
CwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJOfIDXAhkBAAoJEN9v2XEwYDfZ4AEP
|
||||
/jr6zmXUVhNiVCtqiHqc4jOs1OPC51iEcMUwpeaEEWHq17u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jKEyLYU4tYYXsbB+ZJy4dTP/YWHbQulJYLgju6Z
|
||||
ELphkzjc6eM3CaOZ73u4GVXotheeUabUHQ==
|
||||
=drvb
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
@ -1,9 +0,0 @@
|
||||
Provides: bundled(gnulib)
|
||||
|
||||
# make it possible to install the latest available Adobe Reader RPM for Linux
|
||||
Provides: /bin/cat
|
||||
Provides: /bin/chmod
|
||||
Provides: /bin/echo
|
||||
Provides: /bin/ln
|
||||
Provides: /bin/rm
|
||||
Provides: /bin/touch
|
@ -0,0 +1,65 @@
|
||||
From cef9cccce395cd80cd5ac42a4fe6c3909be1c0b5 Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Tue, 2 Apr 2024 14:11:26 +0100
|
||||
Subject: [PATCH] coreutils-python3.patch
|
||||
|
||||
---
|
||||
init.cfg | 4 ++--
|
||||
tests/d_type-check | 2 +-
|
||||
tests/du/move-dir-while-traversing.sh | 6 +++---
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/init.cfg b/init.cfg
|
||||
index b06965a..08413ee 100644
|
||||
--- a/init.cfg
|
||||
+++ b/init.cfg
|
||||
@@ -581,10 +581,10 @@ seek_data_capable_()
|
||||
# Skip the current test if "." lacks d_type support.
|
||||
require_dirent_d_type_()
|
||||
{
|
||||
- python < /dev/null \
|
||||
+ python3 < /dev/null \
|
||||
|| skip_ python missing: assuming no d_type support
|
||||
|
||||
- python "$abs_srcdir"/tests/d_type-check \
|
||||
+ python3 "$abs_srcdir"/tests/d_type-check \
|
||||
|| skip_ requires d_type support
|
||||
}
|
||||
|
||||
diff --git a/tests/d_type-check b/tests/d_type-check
|
||||
index 1a2f76f..42d3924 100644
|
||||
--- a/tests/d_type-check
|
||||
+++ b/tests/d_type-check
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# Exit 0 if "." and "./tempfile" have useful d_type information, else 1.
|
||||
# Intended to exit 0 only on Linux/GNU systems.
|
||||
import os
|
||||
diff --git a/tests/du/move-dir-while-traversing.sh b/tests/du/move-dir-while-traversing.sh
|
||||
index 830a69e..7344ddf 100755
|
||||
--- a/tests/du/move-dir-while-traversing.sh
|
||||
+++ b/tests/du/move-dir-while-traversing.sh
|
||||
@@ -21,8 +21,8 @@ print_ver_ du
|
||||
require_trap_signame_
|
||||
|
||||
# We use a python-inotify script, so...
|
||||
-python -m pyinotify -h > /dev/null \
|
||||
- || skip_ 'python inotify package not installed'
|
||||
+python3 -m pyinotify -h > /dev/null \
|
||||
+ || skip_ 'python3 inotify package not installed'
|
||||
|
||||
# Move a directory "up" while du is processing its sub-directories.
|
||||
# While du is processing a hierarchy .../B/C/D/... this script
|
||||
@@ -33,7 +33,7 @@ python -m pyinotify -h > /dev/null \
|
||||
# rename syscall before du finishes processing the subtree under D/.
|
||||
|
||||
cat <<'EOF' > inotify-watch-for-dir-access.py
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
import pyinotify as pn
|
||||
import os,sys
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
@ -1,120 +1,87 @@
|
||||
diff --git a/man/chcon.x b/man/chcon.x
|
||||
index 8c1ff6f..c84fb96 100644
|
||||
--- a/man/chcon.x
|
||||
+++ b/man/chcon.x
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
-chcon \- change file security context
|
||||
+chcon \- change file SELinux security context
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
diff --git a/man/runcon.x b/man/runcon.x
|
||||
index d2df13e..5c5f5d8 100644
|
||||
--- a/man/runcon.x
|
||||
+++ b/man/runcon.x
|
||||
@@ -1,5 +1,5 @@
|
||||
[NAME]
|
||||
-runcon \- run command with specified security context
|
||||
+runcon \- run command with specified SELinux security context
|
||||
[DESCRIPTION]
|
||||
Run COMMAND with completely-specified CONTEXT, or with current or
|
||||
transitioned security context modified by one or more of LEVEL,
|
||||
From 78970c915b8556fcec4622e948a37dd8e34efe6d Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Wed, 30 Aug 2023 17:19:58 +0200
|
||||
Subject: [PATCH] coreutils-selinux.patch
|
||||
|
||||
---
|
||||
src/cp.c | 19 ++++++++++++++++++-
|
||||
src/install.c | 12 +++++++++++-
|
||||
2 files changed, 29 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/cp.c b/src/cp.c
|
||||
index 1b528c6..25dbb88 100644
|
||||
index 28b0217..897379f 100644
|
||||
--- a/src/cp.c
|
||||
+++ b/src/cp.c
|
||||
@@ -203,6 +203,9 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
|
||||
all\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
+ -c deprecated, same as --preserve=context\n\
|
||||
+"), stdout);
|
||||
+ fputs (_("\
|
||||
--no-preserve=ATTR_LIST don't preserve the specified attributes\n\
|
||||
--parents use full source file name under DIRECTORY\n\
|
||||
"), stdout);
|
||||
@@ -929,7 +932,7 @@ main (int argc, char **argv)
|
||||
@@ -997,7 +997,7 @@ main (int argc, char **argv)
|
||||
selinux_enabled = (0 < is_selinux_enabled ());
|
||||
cp_option_init (&x);
|
||||
|
||||
- while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ",
|
||||
+ while ((c = getopt_long (argc, argv, "abcdfHilLnprst:uvxPRS:TZ",
|
||||
long_opts, NULL))
|
||||
long_opts, nullptr))
|
||||
!= -1)
|
||||
{
|
||||
@@ -977,6 +980,17 @@ main (int argc, char **argv)
|
||||
@@ -1049,6 +1049,23 @@ main (int argc, char **argv)
|
||||
copy_contents = true;
|
||||
break;
|
||||
|
||||
+ case 'c':
|
||||
+ fprintf (stderr, "%s: warning: option '-c' is deprecated, please use '--preserve=context' instead\n", argv[0]);
|
||||
+ if ( x.set_security_context ) {
|
||||
+ (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
|
||||
+ exit( 1 );
|
||||
+ }
|
||||
+ else if (selinux_enabled) {
|
||||
+ fprintf (stderr, "%s: warning: option '-c' is deprecated,"
|
||||
+ " please use '--preserve=context' instead\n", argv[0]);
|
||||
+ if (x.set_security_context)
|
||||
+ {
|
||||
+ fprintf (stderr,
|
||||
+ "%s: cannot force target context and preserve it\n",
|
||||
+ argv[0]);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ else if (selinux_enabled)
|
||||
+ {
|
||||
+ x.preserve_security_context = true;
|
||||
+ x.require_preserve_context = true;
|
||||
+ }
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
case 'd':
|
||||
x.preserve_links = true;
|
||||
x.dereference = DEREF_NEVER;
|
||||
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
|
||||
index 47e4480..cff2ead 100644
|
||||
--- a/doc/coreutils.texi
|
||||
+++ b/doc/coreutils.texi
|
||||
@@ -8083,6 +8083,11 @@ done
|
||||
exit $fail
|
||||
@end example
|
||||
|
||||
+@item -c
|
||||
+@cindex SELinux security context information, preserving
|
||||
+Preserve SELinux security context of the original files if possible.
|
||||
+Some file systems don't support storing of SELinux security context.
|
||||
+
|
||||
@item --copy-contents
|
||||
@cindex directories, copying recursively
|
||||
@cindex copying directories recursively
|
||||
diff --git a/src/install.c b/src/install.c
|
||||
index d79d597..437889a 100644
|
||||
index accd0fd..b686fe9 100644
|
||||
--- a/src/install.c
|
||||
+++ b/src/install.c
|
||||
@@ -673,7 +673,7 @@ In the 4th form, create all components of the given DIRECTORY(ies).\n\
|
||||
-v, --verbose print the name of each directory as it is created\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
- --preserve-context preserve SELinux security context\n\
|
||||
+ -P, --preserve-context preserve SELinux security context (-P deprecated)\n\
|
||||
-Z set SELinux security context of destination\n\
|
||||
file and each created directory to default type\n\
|
||||
--context[=CTX] like -Z, or if CTX is specified then set the\n\
|
||||
@@ -824,7 +824,7 @@ main (int argc, char **argv)
|
||||
@@ -807,7 +807,7 @@ main (int argc, char **argv)
|
||||
dir_arg = false;
|
||||
umask (0);
|
||||
|
||||
- while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z", long_options,
|
||||
+ while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pPt:TvS:Z", long_options,
|
||||
NULL)) != -1)
|
||||
nullptr))
|
||||
!= -1)
|
||||
{
|
||||
switch (optc)
|
||||
@@ -885,6 +885,8 @@ main (int argc, char **argv)
|
||||
@@ -872,6 +872,9 @@ main (int argc, char **argv)
|
||||
no_target_directory = true;
|
||||
break;
|
||||
|
||||
+ case 'P':
|
||||
+ fprintf (stderr, "%s: warning: option '-P' is deprecated, please use '--preserve-context' instead\n", argv[0]);
|
||||
+ fprintf (stderr, "%s: warning: option '-P' is deprecated,"
|
||||
+ " please use '--preserve-context' instead\n", argv[0]);
|
||||
case PRESERVE_CONTEXT_OPTION:
|
||||
if (! selinux_enabled)
|
||||
{
|
||||
@@ -892,6 +894,10 @@ main (int argc, char **argv)
|
||||
@@ -879,6 +882,13 @@ main (int argc, char **argv)
|
||||
"this kernel is not SELinux-enabled"));
|
||||
break;
|
||||
}
|
||||
+ if ( x.set_security_context ) {
|
||||
+ (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
|
||||
+ exit( 1 );
|
||||
+ }
|
||||
+ if (x.set_security_context)
|
||||
+ {
|
||||
+ fprintf (stderr,
|
||||
+ "%s: cannot force target context and preserve it\n",
|
||||
+ argv[0]);
|
||||
+ exit (1);
|
||||
+ }
|
||||
x.preserve_security_context = true;
|
||||
use_default_selinux_context = false;
|
||||
break;
|
||||
--
|
||||
2.44.0
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -urNp coreutils-5.97-orig/man/date.x coreutils-5.97/man/date.x
|
||||
--- coreutils-5.97-orig/man/date.x 1999-11-02 15:07:36.000000000 +0100
|
||||
+++ coreutils-5.97/man/date.x 2008-10-15 10:13:31.000000000 +0200
|
||||
@@ -11,3 +11,8 @@ calendar date, time of day, time zone, day of week, relative time,
|
||||
relative date, and numbers. An empty string indicates the beginning
|
||||
of the day. The date string format is more complex than is easily
|
||||
documented here but is fully described in the info documentation.
|
||||
+[ENVIRONMENT]
|
||||
+.TP
|
||||
+TZ
|
||||
+Specifies the timezone, unless overridden by command line parameters.
|
||||
+If neither is specified, the setting from /etc/localtime is used.
|
Loading…
Reference in new issue