diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-10-11 11:40:52 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-14 11:48:46 +0100 |
commit | 370041dca17bd70bc04e07d34bc662a84f7c8888 (patch) | |
tree | f789cc1c81aa8cf5f686b24a47e8a94bf39c7269 /meta | |
parent | 0fbfcdf9801ea9f069b2e817796db12477bf5786 (diff) | |
download | poky-370041dca17bd70bc04e07d34bc662a84f7c8888.tar.gz |
coreutils: update 8.32 -> 9.0
License-Update: copyright years
(From OE-Core rev: 07c303cd906e4e1d0c4d3ebb500b3baac06ca56e)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch | 167 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/0001-ls-restore-8.31-behavior-on-removed-directories.patch | 99 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch | 49 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/e8b56ebd536e82b15542a00c888109471936bfda.patch | 93 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch | 7 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils_9.0.bb (renamed from meta/recipes-core/coreutils/coreutils_8.32.bb) | 10 |
6 files changed, 100 insertions, 325 deletions
diff --git a/meta/recipes-core/coreutils/coreutils/0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch b/meta/recipes-core/coreutils/coreutils/0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch deleted file mode 100644 index 06b6307dab..0000000000 --- a/meta/recipes-core/coreutils/coreutils/0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch +++ /dev/null | |||
@@ -1,167 +0,0 @@ | |||
1 | From 3a48610860a9a75692d2cbedde69ac15269d540a Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <3a48610860a9a75692d2cbedde69ac15269d540a.1624302273.git.wallinux@gmail.com> | ||
3 | From: Paul Eggert <eggert@cs.ucla.edu> | ||
4 | Date: Wed, 15 Apr 2020 20:50:32 -0700 | ||
5 | Subject: [PATCH] fts: remove NOSTAT_LEAF_OPTIMIZATION | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | It caused ‘find’ and ‘du’ to dump core, and it was useful | ||
11 | only for obsolescent Linux filesystems anyway. Problem reported in: | ||
12 | https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html | ||
13 | Quite possibly there is still a serious underlying fts bug with | ||
14 | tight-loop-check and mutating file systems, but if so this patch | ||
15 | should cause the bug to be triggered less often. | ||
16 | * lib/fts.c (enum leaf_optimization): Remove | ||
17 | NOSTAT_LEAF_OPTIMIZATION, as it’s problematic. | ||
18 | (S_MAGIC_REISERFS, S_MAGIC_XFS): Remove; no longer needed. | ||
19 | (leaf_optimization): Remove special cases for ReiserFS and XFS. | ||
20 | (fts_read): Remove NOSTAT_LEAF_OPTIMIZATION code. | ||
21 | * lib/fts_.h (struct _ftsent.fts_n_dirs_remaining): | ||
22 | Remove. All uses removed. | ||
23 | |||
24 | Upstream-Status: Backport [upstream gnulib commit: | ||
25 | 47bf2cf3184027c1eb9c1dfeea5c5b8b2d69710d] | ||
26 | |||
27 | Signed-off-by: Anders Wallin <wallinux@gmail.com> | ||
28 | --- | ||
29 | lib/fts.c | 56 ++++++++---------------------------------------------- | ||
30 | lib/fts_.h | 5 ----- | ||
31 | 2 files changed, 8 insertions(+), 53 deletions(-) | ||
32 | |||
33 | diff --git a/lib/fts.c b/lib/fts.c | ||
34 | index d3a0472..ade8c33 100644 | ||
35 | --- a/lib/fts.c | ||
36 | +++ b/lib/fts.c | ||
37 | @@ -445,7 +445,6 @@ fts_open (char * const *argv, | ||
38 | if ((parent = fts_alloc(sp, "", 0)) == NULL) | ||
39 | goto mem2; | ||
40 | parent->fts_level = FTS_ROOTPARENTLEVEL; | ||
41 | - parent->fts_n_dirs_remaining = -1; | ||
42 | } | ||
43 | |||
44 | /* The classic fts implementation would call fts_stat with | ||
45 | @@ -634,9 +633,8 @@ fts_close (FTS *sp) | ||
46 | } | ||
47 | |||
48 | /* Minimum link count of a traditional Unix directory. When leaf | ||
49 | - optimization is OK and MIN_DIR_NLINK <= st_nlink, then st_nlink is | ||
50 | - an upper bound on the number of subdirectories (counting "." and | ||
51 | - ".."). */ | ||
52 | + optimization is OK and a directory's st_nlink == MIN_DIR_NLINK, | ||
53 | + then the directory has no subdirectories. */ | ||
54 | enum { MIN_DIR_NLINK = 2 }; | ||
55 | |||
56 | /* Whether leaf optimization is OK for a directory. */ | ||
57 | @@ -645,12 +643,8 @@ enum leaf_optimization | ||
58 | /* st_nlink is not reliable for this directory's subdirectories. */ | ||
59 | NO_LEAF_OPTIMIZATION, | ||
60 | |||
61 | - /* Leaf optimization is OK, but is not useful for avoiding stat calls. */ | ||
62 | - OK_LEAF_OPTIMIZATION, | ||
63 | - | ||
64 | - /* Leaf optimization is not only OK: it is useful for avoiding | ||
65 | - stat calls, because dirent.d_type does not work. */ | ||
66 | - NOSTAT_LEAF_OPTIMIZATION | ||
67 | + /* st_nlink == 2 means the directory lacks subdirectories. */ | ||
68 | + OK_LEAF_OPTIMIZATION | ||
69 | }; | ||
70 | |||
71 | #if (defined __linux__ || defined __ANDROID__) \ | ||
72 | @@ -663,9 +657,7 @@ enum leaf_optimization | ||
73 | # define S_MAGIC_CIFS 0xFF534D42 | ||
74 | # define S_MAGIC_NFS 0x6969 | ||
75 | # define S_MAGIC_PROC 0x9FA0 | ||
76 | -# define S_MAGIC_REISERFS 0x52654973 | ||
77 | # define S_MAGIC_TMPFS 0x1021994 | ||
78 | -# define S_MAGIC_XFS 0x58465342 | ||
79 | |||
80 | # ifdef HAVE___FSWORD_T | ||
81 | typedef __fsword_t fsword; | ||
82 | @@ -782,23 +774,15 @@ dirent_inode_sort_may_be_useful (FTSENT const *p, int dir_fd) | ||
83 | } | ||
84 | |||
85 | /* Given an FTS entry P for a directory with descriptor DIR_FD, | ||
86 | - return true if it is both useful and valid to apply leaf optimization. | ||
87 | - The optimization is useful only for file systems that lack usable | ||
88 | - dirent.d_type info. The optimization is valid if an st_nlink value | ||
89 | - of at least MIN_DIR_NLINK is an upper bound on the number of | ||
90 | - subdirectories of D, counting "." and ".." as subdirectories. | ||
91 | + return whether it is valid to apply leaf optimization. | ||
92 | + The optimization is valid if a directory's st_nlink value equal | ||
93 | + to MIN_DIR_NLINK means the directory has no subdirectories. | ||
94 | DIR_FD is negative if unavailable. */ | ||
95 | static enum leaf_optimization | ||
96 | leaf_optimization (FTSENT const *p, int dir_fd) | ||
97 | { | ||
98 | switch (filesystem_type (p, dir_fd)) | ||
99 | { | ||
100 | - /* List here the file system types that may lack usable dirent.d_type | ||
101 | - info, yet for which the optimization does apply. */ | ||
102 | - case S_MAGIC_REISERFS: | ||
103 | - case S_MAGIC_XFS: /* XFS lacked it until 2013-08-22 commit. */ | ||
104 | - return NOSTAT_LEAF_OPTIMIZATION; | ||
105 | - | ||
106 | case 0: | ||
107 | /* Leaf optimization is unsafe if the file system type is unknown. */ | ||
108 | FALLTHROUGH; | ||
109 | @@ -1023,26 +1007,7 @@ check_for_dir: | ||
110 | if (p->fts_info == FTS_NSOK) | ||
111 | { | ||
112 | if (p->fts_statp->st_size == FTS_STAT_REQUIRED) | ||
113 | - { | ||
114 | - FTSENT *parent = p->fts_parent; | ||
115 | - if (parent->fts_n_dirs_remaining == 0 | ||
116 | - && ISSET(FTS_NOSTAT) | ||
117 | - && ISSET(FTS_PHYSICAL) | ||
118 | - && (leaf_optimization (parent, sp->fts_cwd_fd) | ||
119 | - == NOSTAT_LEAF_OPTIMIZATION)) | ||
120 | - { | ||
121 | - /* nothing more needed */ | ||
122 | - } | ||
123 | - else | ||
124 | - { | ||
125 | - p->fts_info = fts_stat(sp, p, false); | ||
126 | - if (S_ISDIR(p->fts_statp->st_mode) | ||
127 | - && p->fts_level != FTS_ROOTLEVEL | ||
128 | - && 0 < parent->fts_n_dirs_remaining | ||
129 | - && parent->fts_n_dirs_remaining != (nlink_t) -1) | ||
130 | - parent->fts_n_dirs_remaining--; | ||
131 | - } | ||
132 | - } | ||
133 | + p->fts_info = fts_stat(sp, p, false); | ||
134 | else | ||
135 | fts_assert (p->fts_statp->st_size == FTS_NO_STAT_REQUIRED); | ||
136 | } | ||
137 | @@ -1826,11 +1791,6 @@ err: memset(sbp, 0, sizeof(struct stat)); | ||
138 | } | ||
139 | |||
140 | if (S_ISDIR(sbp->st_mode)) { | ||
141 | - p->fts_n_dirs_remaining | ||
142 | - = ((sbp->st_nlink < MIN_DIR_NLINK | ||
143 | - || p->fts_level <= FTS_ROOTLEVEL) | ||
144 | - ? -1 | ||
145 | - : sbp->st_nlink - (ISSET (FTS_SEEDOT) ? 0 : MIN_DIR_NLINK)); | ||
146 | if (ISDOT(p->fts_name)) { | ||
147 | /* Command-line "." and ".." are real directories. */ | ||
148 | return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT); | ||
149 | diff --git a/lib/fts_.h b/lib/fts_.h | ||
150 | index 6c7d0ce..15c248c 100644 | ||
151 | --- a/lib/fts_.h | ||
152 | +++ b/lib/fts_.h | ||
153 | @@ -219,11 +219,6 @@ typedef struct _ftsent { | ||
154 | |||
155 | size_t fts_namelen; /* strlen(fts_name) */ | ||
156 | |||
157 | - /* If not (nlink_t) -1, an upper bound on the number of | ||
158 | - remaining subdirectories of interest. If this becomes | ||
159 | - zero, some work can be avoided. */ | ||
160 | - nlink_t fts_n_dirs_remaining; | ||
161 | - | ||
162 | # define FTS_D 1 /* preorder directory */ | ||
163 | # define FTS_DC 2 /* directory that causes cycles */ | ||
164 | # define FTS_DEFAULT 3 /* none of the above */ | ||
165 | -- | ||
166 | 2.32.0 | ||
167 | |||
diff --git a/meta/recipes-core/coreutils/coreutils/0001-ls-restore-8.31-behavior-on-removed-directories.patch b/meta/recipes-core/coreutils/coreutils/0001-ls-restore-8.31-behavior-on-removed-directories.patch deleted file mode 100644 index fa900e3a76..0000000000 --- a/meta/recipes-core/coreutils/coreutils/0001-ls-restore-8.31-behavior-on-removed-directories.patch +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | From 7c273e5c6041f8c70f73f5b280fbb8f27d9b5a36 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Eggert <eggert@cs.ucla.edu> | ||
3 | Date: Thu, 5 Mar 2020 17:25:29 -0800 | ||
4 | Subject: [PATCH] ls: restore 8.31 behavior on removed directories | ||
5 | |||
6 | * NEWS: Mention this. | ||
7 | * src/ls.c: Do not include <sys/sycall.h> | ||
8 | (print_dir): Don't worry about whether the directory is removed. | ||
9 | * tests/ls/removed-directory.sh: Adjust to match new (i.e., old) | ||
10 | behavior. | ||
11 | |||
12 | Upstream-Status: Backport [https://github.com/coreutils/coreutils/commit/10fcb97bd728f09d4a027eddf8ad2900f0819b0a] | ||
13 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
14 | --- | ||
15 | src/ls.c | 22 ---------------------- | ||
16 | tests/ls/removed-directory.sh | 10 ++-------- | ||
17 | 2 files changed, 2 insertions(+), 30 deletions(-) | ||
18 | |||
19 | diff --git a/src/ls.c b/src/ls.c | ||
20 | index 637fe7a..0111f49 100644 | ||
21 | --- a/src/ls.c | ||
22 | +++ b/src/ls.c | ||
23 | @@ -49,10 +49,6 @@ | ||
24 | # include <sys/ptem.h> | ||
25 | #endif | ||
26 | |||
27 | -#ifdef __linux__ | ||
28 | -# include <sys/syscall.h> | ||
29 | -#endif | ||
30 | - | ||
31 | #include <stdio.h> | ||
32 | #include <assert.h> | ||
33 | #include <setjmp.h> | ||
34 | @@ -2895,7 +2891,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) | ||
35 | struct dirent *next; | ||
36 | uintmax_t total_blocks = 0; | ||
37 | static bool first = true; | ||
38 | - bool found_any_entries = false; | ||
39 | |||
40 | errno = 0; | ||
41 | dirp = opendir (name); | ||
42 | @@ -2971,7 +2966,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) | ||
43 | next = readdir (dirp); | ||
44 | if (next) | ||
45 | { | ||
46 | - found_any_entries = true; | ||
47 | if (! file_ignored (next->d_name)) | ||
48 | { | ||
49 | enum filetype type = unknown; | ||
50 | @@ -3017,22 +3011,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) | ||
51 | if (errno != EOVERFLOW) | ||
52 | break; | ||
53 | } | ||
54 | -#ifdef __linux__ | ||
55 | - else if (! found_any_entries) | ||
56 | - { | ||
57 | - /* If readdir finds no directory entries at all, not even "." or | ||
58 | - "..", then double check that the directory exists. */ | ||
59 | - if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1 | ||
60 | - && errno != EINVAL) | ||
61 | - { | ||
62 | - /* We exclude EINVAL as that pertains to buffer handling, | ||
63 | - and we've passed NULL as the buffer for simplicity. | ||
64 | - ENOENT is returned if appropriate before buffer handling. */ | ||
65 | - file_failure (command_line_arg, _("reading directory %s"), name); | ||
66 | - } | ||
67 | - break; | ||
68 | - } | ||
69 | -#endif | ||
70 | else | ||
71 | break; | ||
72 | |||
73 | diff --git a/tests/ls/removed-directory.sh b/tests/ls/removed-directory.sh | ||
74 | index e8c835d..fe8f929 100755 | ||
75 | --- a/tests/ls/removed-directory.sh | ||
76 | +++ b/tests/ls/removed-directory.sh | ||
77 | @@ -26,20 +26,14 @@ case $host_triplet in | ||
78 | *) skip_ 'non linux kernel' ;; | ||
79 | esac | ||
80 | |||
81 | -LS_FAILURE=2 | ||
82 | - | ||
83 | -cat <<\EOF >exp-err || framework_failure_ | ||
84 | -ls: reading directory '.': No such file or directory | ||
85 | -EOF | ||
86 | - | ||
87 | cwd=$(pwd) | ||
88 | mkdir d || framework_failure_ | ||
89 | cd d || framework_failure_ | ||
90 | rmdir ../d || framework_failure_ | ||
91 | |||
92 | -returns_ $LS_FAILURE ls >../out 2>../err || fail=1 | ||
93 | +ls >../out 2>../err || fail=1 | ||
94 | cd "$cwd" || framework_failure_ | ||
95 | compare /dev/null out || fail=1 | ||
96 | -compare exp-err err || fail=1 | ||
97 | +compare /dev/null err || fail=1 | ||
98 | |||
99 | Exit $fail | ||
diff --git a/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch b/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch deleted file mode 100644 index e68c213550..0000000000 --- a/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | Subject: revert inconsistent ls quoting | ||
2 | |||
3 | This is a revert of upstream commit 109b9220cead6e979d22d16327c4d9f8350431cc. | ||
4 | |||
5 | Bug-Debian: https://bugs.debian.org/813164 | ||
6 | |||
7 | Upstream-Status: Submitted | ||
8 | |||
9 | Originally-by: Adam Borowski <kilobyte@angband.pl> | ||
10 | [PG: patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164#78 ] | ||
11 | Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ||
12 | |||
13 | --- | ||
14 | |||
15 | --- coreutils-8.25.orig/NEWS | ||
16 | +++ coreutils-8.25/NEWS | ||
17 | @@ -71,9 +71,6 @@ GNU coreutils NEWS | ||
18 | df now prefers sources towards the root of a device when | ||
19 | eliding duplicate bind mounted entries. | ||
20 | |||
21 | - ls now quotes file names unambiguously and appropriate for use in a shell, | ||
22 | - when outputting to a terminal. | ||
23 | - | ||
24 | join, sort, uniq with --zero-terminated, now treat '\n' as a field delimiter. | ||
25 | |||
26 | ** Improvements | ||
27 | --- coreutils-8.25.orig/doc/coreutils.texi | ||
28 | +++ coreutils-8.25/doc/coreutils.texi | ||
29 | @@ -7750,8 +7750,8 @@ this"} in the default C locale. This lo | ||
30 | |||
31 | You can specify the default value of the @option{--quoting-style} option | ||
32 | with the environment variable @env{QUOTING_STYLE}@. If that environment | ||
33 | -variable is not set, the default value is @samp{shell-escape} when the | ||
34 | -output is a terminal, and @samp{literal} otherwise. | ||
35 | +variable is not set, the default value is @samp{literal}, but this | ||
36 | +default may change to @samp{shell} in a future version of this package. | ||
37 | |||
38 | @item --show-control-chars | ||
39 | @opindex --show-control-chars | ||
40 | --- coreutils-8.25.orig/src/ls.c | ||
41 | +++ coreutils-8.25/src/ls.c | ||
42 | @@ -1581,7 +1581,6 @@ decode_switches (int argc, char **argv) | ||
43 | if (isatty (STDOUT_FILENO)) | ||
44 | { | ||
45 | format = many_per_line; | ||
46 | - set_quoting_style (NULL, shell_escape_quoting_style); | ||
47 | /* See description of qmark_funny_chars, above. */ | ||
48 | qmark_funny_chars = true; | ||
49 | } | ||
diff --git a/meta/recipes-core/coreutils/coreutils/e8b56ebd536e82b15542a00c888109471936bfda.patch b/meta/recipes-core/coreutils/coreutils/e8b56ebd536e82b15542a00c888109471936bfda.patch new file mode 100644 index 0000000000..d69ee95e4a --- /dev/null +++ b/meta/recipes-core/coreutils/coreutils/e8b56ebd536e82b15542a00c888109471936bfda.patch | |||
@@ -0,0 +1,93 @@ | |||
1 | From e8b56ebd536e82b15542a00c888109471936bfda Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com> | ||
3 | Date: Fri, 24 Sep 2021 20:57:41 +0100 | ||
4 | Subject: [PATCH] chmod: fix exit status when ignoring symlinks | ||
5 | |||
6 | * src/chmod.c: Reorder enum so CH_NOT_APPLIED | ||
7 | can be treated as a non error. | ||
8 | * tests/chmod/ignore-symlink.sh: A new test. | ||
9 | * tests/local.mk: Reference the new test. | ||
10 | * NEWS: Mention the bug fix. | ||
11 | Fixes https://bugs.gnu.org/50784 | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
15 | --- | ||
16 | src/chmod.c | 4 ++-- | ||
17 | tests/chmod/ignore-symlink.sh | 31 +++++++++++++++++++++++++++++++ | ||
18 | tests/local.mk | 1 + | ||
19 | 4 files changed, 40 insertions(+), 2 deletions(-) | ||
20 | create mode 100755 tests/chmod/ignore-symlink.sh | ||
21 | |||
22 | diff --git a/src/chmod.c b/src/chmod.c | ||
23 | index 37b04f500..57ac47f33 100644 | ||
24 | --- a/src/chmod.c | ||
25 | +++ b/src/chmod.c | ||
26 | @@ -44,8 +44,8 @@ struct change_status | ||
27 | enum | ||
28 | { | ||
29 | CH_NO_STAT, | ||
30 | - CH_NOT_APPLIED, | ||
31 | CH_FAILED, | ||
32 | + CH_NOT_APPLIED, | ||
33 | CH_NO_CHANGE_REQUESTED, | ||
34 | CH_SUCCEEDED | ||
35 | } | ||
36 | @@ -322,7 +322,7 @@ process_file (FTS *fts, FTSENT *ent) | ||
37 | if ( ! recurse) | ||
38 | fts_set (fts, ent, FTS_SKIP); | ||
39 | |||
40 | - return CH_NO_CHANGE_REQUESTED <= ch.status; | ||
41 | + return CH_NOT_APPLIED <= ch.status; | ||
42 | } | ||
43 | |||
44 | /* Recursively change the modes of the specified FILES (the last entry | ||
45 | diff --git a/tests/chmod/ignore-symlink.sh b/tests/chmod/ignore-symlink.sh | ||
46 | new file mode 100755 | ||
47 | index 000000000..5ce3de816 | ||
48 | --- /dev/null | ||
49 | +++ b/tests/chmod/ignore-symlink.sh | ||
50 | @@ -0,0 +1,31 @@ | ||
51 | +#!/bin/sh | ||
52 | +# Test for proper exit code of chmod on a processed symlink. | ||
53 | + | ||
54 | +# Copyright (C) 2021 Free Software Foundation, Inc. | ||
55 | + | ||
56 | +# This program is free software: you can redistribute it and/or modify | ||
57 | +# it under the terms of the GNU General Public License as published by | ||
58 | +# the Free Software Foundation, either version 3 of the License, or | ||
59 | +# (at your option) any later version. | ||
60 | + | ||
61 | +# This program is distributed in the hope that it will be useful, | ||
62 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
63 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
64 | +# GNU General Public License for more details. | ||
65 | + | ||
66 | +# You should have received a copy of the GNU General Public License | ||
67 | +# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
68 | + | ||
69 | +. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src | ||
70 | +print_ver_ chmod | ||
71 | + | ||
72 | +mkdir dir || framework_failure_ | ||
73 | +touch dir/f || framework_failure_ | ||
74 | +ln -s f dir/l || framework_failure_ | ||
75 | + | ||
76 | +# This operation ignores symlinks but should succeed. | ||
77 | +chmod u+w -R dir 2> out || fail=1 | ||
78 | + | ||
79 | +compare /dev/null out || fail=1 | ||
80 | + | ||
81 | +Exit $fail | ||
82 | diff --git a/tests/local.mk b/tests/local.mk | ||
83 | index 228d0e368..b5b893fb7 100644 | ||
84 | --- a/tests/local.mk | ||
85 | +++ b/tests/local.mk | ||
86 | @@ -456,6 +456,7 @@ all_tests = \ | ||
87 | tests/chmod/c-option.sh \ | ||
88 | tests/chmod/equal-x.sh \ | ||
89 | tests/chmod/equals.sh \ | ||
90 | + tests/chmod/ignore-symlink.sh \ | ||
91 | tests/chmod/inaccessible.sh \ | ||
92 | tests/chmod/octal.sh \ | ||
93 | tests/chmod/setgid.sh \ | ||
diff --git a/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch b/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch index 173a57925b..4f126ad67c 100644 --- a/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch +++ b/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 7e20a7242ba2657f73311bbf5278093da67f0721 Mon Sep 17 00:00:00 2001 | 1 | From b04363018b4b9b45fdf23384f30d02caa5564602 Mon Sep 17 00:00:00 2001 |
2 | From: Robert Yang <liezhi.yang@windriver.com> | 2 | From: Robert Yang <liezhi.yang@windriver.com> |
3 | Date: Tue, 16 Sep 2014 01:59:08 -0700 | 3 | Date: Tue, 16 Sep 2014 01:59:08 -0700 |
4 | Subject: [PATCH] gnulib-comp.m4: selinux/flask.h should respect to | 4 | Subject: [PATCH] gnulib-comp.m4: selinux/flask.h should respect to |
@@ -19,16 +19,17 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | |||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | 19 | 1 file changed, 1 insertion(+), 1 deletion(-) |
20 | 20 | ||
21 | diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 | 21 | diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 |
22 | index dead90e..0abf0bd 100644 | 22 | index 3857233..c01fb30 100644 |
23 | --- a/m4/gnulib-comp.m4 | 23 | --- a/m4/gnulib-comp.m4 |
24 | +++ b/m4/gnulib-comp.m4 | 24 | +++ b/m4/gnulib-comp.m4 |
25 | @@ -1860,10 +1860,10 @@ AC_DEFUN([gl_INIT], | 25 | @@ -1953,11 +1953,11 @@ AC_DEFUN([gl_INIT], |
26 | AC_LIBOBJ([select]) | 26 | AC_LIBOBJ([select]) |
27 | fi | 27 | fi |
28 | gl_SYS_SELECT_MODULE_INDICATOR([select]) | 28 | gl_SYS_SELECT_MODULE_INDICATOR([select]) |
29 | - AC_CHECK_HEADERS([selinux/flask.h]) | 29 | - AC_CHECK_HEADERS([selinux/flask.h]) |
30 | gl_HEADERS_SELINUX_SELINUX_H | 30 | gl_HEADERS_SELINUX_SELINUX_H |
31 | gl_HEADERS_SELINUX_CONTEXT_H | 31 | gl_HEADERS_SELINUX_CONTEXT_H |
32 | gl_HEADERS_SELINUX_LABEL_H | ||
32 | if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then | 33 | if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then |
33 | + AC_CHECK_HEADERS([selinux/flask.h]) | 34 | + AC_CHECK_HEADERS([selinux/flask.h]) |
34 | AC_LIBOBJ([getfilecon]) | 35 | AC_LIBOBJ([getfilecon]) |
diff --git a/meta/recipes-core/coreutils/coreutils_8.32.bb b/meta/recipes-core/coreutils/coreutils_9.0.bb index 01acf9a874..0800bc3b6d 100644 --- a/meta/recipes-core/coreutils/coreutils_8.32.bb +++ b/meta/recipes-core/coreutils/coreutils_9.0.bb | |||
@@ -6,7 +6,7 @@ HOMEPAGE = "http://www.gnu.org/software/coreutils/" | |||
6 | BUGTRACKER = "http://debbugs.gnu.org/coreutils" | 6 | BUGTRACKER = "http://debbugs.gnu.org/coreutils" |
7 | LICENSE = "GPLv3+" | 7 | LICENSE = "GPLv3+" |
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ |
9 | file://src/ls.c;beginline=1;endline=15;md5=b7d80abf5b279320fb0e4b1007ed108b \ | 9 | file://src/ls.c;beginline=1;endline=15;md5=3b8fbaee597c8a9bb88d30840d53048c \ |
10 | " | 10 | " |
11 | DEPENDS = "gmp libcap" | 11 | DEPENDS = "gmp libcap" |
12 | DEPENDS:class-native = "" | 12 | DEPENDS:class-native = "" |
@@ -17,21 +17,17 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ | |||
17 | file://remove-usr-local-lib-from-m4.patch \ | 17 | file://remove-usr-local-lib-from-m4.patch \ |
18 | file://fix-selinux-flask.patch \ | 18 | file://fix-selinux-flask.patch \ |
19 | file://0001-uname-report-processor-and-hardware-correctly.patch \ | 19 | file://0001-uname-report-processor-and-hardware-correctly.patch \ |
20 | file://disable-ls-output-quoting.patch \ | ||
21 | file://0001-local.mk-fix-cross-compiling-problem.patch \ | 20 | file://0001-local.mk-fix-cross-compiling-problem.patch \ |
21 | file://e8b56ebd536e82b15542a00c888109471936bfda.patch \ | ||
22 | file://run-ptest \ | 22 | file://run-ptest \ |
23 | file://0001-ls-restore-8.31-behavior-on-removed-directories.patch \ | ||
24 | file://0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch \ | ||
25 | " | 23 | " |
26 | 24 | ||
27 | SRC_URI[md5sum] = "022042695b7d5bcf1a93559a9735e668" | 25 | SRC_URI[sha256sum] = "ce30acdf4a41bc5bb30dd955e9eaa75fa216b4e3deb08889ed32433c7b3b97ce" |
28 | SRC_URI[sha256sum] = "4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa" | ||
29 | 26 | ||
30 | # http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.27-101-gf5d7c0842 | 27 | # http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.27-101-gf5d7c0842 |
31 | # runcon is not really a sandbox command, use `runcon ... setsid ...` to avoid this particular issue. | 28 | # runcon is not really a sandbox command, use `runcon ... setsid ...` to avoid this particular issue. |
32 | CVE_CHECK_WHITELIST += "CVE-2016-2781" | 29 | CVE_CHECK_WHITELIST += "CVE-2016-2781" |
33 | 30 | ||
34 | EXTRA_OECONF:class-native = "--without-gmp" | ||
35 | EXTRA_OECONF:class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}" | 31 | EXTRA_OECONF:class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}" |
36 | EXTRA_OECONF:class-nativesdk = "--enable-install-program=arch,hostname" | 32 | EXTRA_OECONF:class-nativesdk = "--enable-install-program=arch,hostname" |
37 | 33 | ||