diff options
Diffstat (limited to 'meta/recipes-core/coreutils')
-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-local.mk-fix-cross-compiling-problem.patch | 12 | ||||
-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/0001-uname-report-processor-and-hardware-correctly.patch | 64 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch | 49 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch | 36 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch | 7 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils_9.5.bb (renamed from meta/recipes-core/coreutils/coreutils_8.32.bb) | 42 |
8 files changed, 33 insertions, 443 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 @@ -From 3a48610860a9a75692d2cbedde69ac15269d540a Mon Sep 17 00:00:00 2001 -Message-Id: <3a48610860a9a75692d2cbedde69ac15269d540a.1624302273.git.wallinux@gmail.com> -From: Paul Eggert <eggert@cs.ucla.edu> -Date: Wed, 15 Apr 2020 20:50:32 -0700 -Subject: [PATCH] fts: remove NOSTAT_LEAF_OPTIMIZATION -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It caused ‘find’ and ‘du’ to dump core, and it was useful -only for obsolescent Linux filesystems anyway. Problem reported in: -https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html -Quite possibly there is still a serious underlying fts bug with -tight-loop-check and mutating file systems, but if so this patch -should cause the bug to be triggered less often. -* lib/fts.c (enum leaf_optimization): Remove -NOSTAT_LEAF_OPTIMIZATION, as it’s problematic. -(S_MAGIC_REISERFS, S_MAGIC_XFS): Remove; no longer needed. -(leaf_optimization): Remove special cases for ReiserFS and XFS. -(fts_read): Remove NOSTAT_LEAF_OPTIMIZATION code. -* lib/fts_.h (struct _ftsent.fts_n_dirs_remaining): -Remove. All uses removed. - -Upstream-Status: Backport [upstream gnulib commit: -47bf2cf3184027c1eb9c1dfeea5c5b8b2d69710d] - -Signed-off-by: Anders Wallin <wallinux@gmail.com> ---- - lib/fts.c | 56 ++++++++---------------------------------------------- - lib/fts_.h | 5 ----- - 2 files changed, 8 insertions(+), 53 deletions(-) - -diff --git a/lib/fts.c b/lib/fts.c -index d3a0472..ade8c33 100644 ---- a/lib/fts.c -+++ b/lib/fts.c -@@ -445,7 +445,6 @@ fts_open (char * const *argv, - if ((parent = fts_alloc(sp, "", 0)) == NULL) - goto mem2; - parent->fts_level = FTS_ROOTPARENTLEVEL; -- parent->fts_n_dirs_remaining = -1; - } - - /* The classic fts implementation would call fts_stat with -@@ -634,9 +633,8 @@ fts_close (FTS *sp) - } - - /* Minimum link count of a traditional Unix directory. When leaf -- optimization is OK and MIN_DIR_NLINK <= st_nlink, then st_nlink is -- an upper bound on the number of subdirectories (counting "." and -- ".."). */ -+ optimization is OK and a directory's st_nlink == MIN_DIR_NLINK, -+ then the directory has no subdirectories. */ - enum { MIN_DIR_NLINK = 2 }; - - /* Whether leaf optimization is OK for a directory. */ -@@ -645,12 +643,8 @@ enum leaf_optimization - /* st_nlink is not reliable for this directory's subdirectories. */ - NO_LEAF_OPTIMIZATION, - -- /* Leaf optimization is OK, but is not useful for avoiding stat calls. */ -- OK_LEAF_OPTIMIZATION, -- -- /* Leaf optimization is not only OK: it is useful for avoiding -- stat calls, because dirent.d_type does not work. */ -- NOSTAT_LEAF_OPTIMIZATION -+ /* st_nlink == 2 means the directory lacks subdirectories. */ -+ OK_LEAF_OPTIMIZATION - }; - - #if (defined __linux__ || defined __ANDROID__) \ -@@ -663,9 +657,7 @@ enum leaf_optimization - # define S_MAGIC_CIFS 0xFF534D42 - # define S_MAGIC_NFS 0x6969 - # define S_MAGIC_PROC 0x9FA0 --# define S_MAGIC_REISERFS 0x52654973 - # define S_MAGIC_TMPFS 0x1021994 --# define S_MAGIC_XFS 0x58465342 - - # ifdef HAVE___FSWORD_T - typedef __fsword_t fsword; -@@ -782,23 +774,15 @@ dirent_inode_sort_may_be_useful (FTSENT const *p, int dir_fd) - } - - /* Given an FTS entry P for a directory with descriptor DIR_FD, -- return true if it is both useful and valid to apply leaf optimization. -- The optimization is useful only for file systems that lack usable -- dirent.d_type info. The optimization is valid if an st_nlink value -- of at least MIN_DIR_NLINK is an upper bound on the number of -- subdirectories of D, counting "." and ".." as subdirectories. -+ return whether it is valid to apply leaf optimization. -+ The optimization is valid if a directory's st_nlink value equal -+ to MIN_DIR_NLINK means the directory has no subdirectories. - DIR_FD is negative if unavailable. */ - static enum leaf_optimization - leaf_optimization (FTSENT const *p, int dir_fd) - { - switch (filesystem_type (p, dir_fd)) - { -- /* List here the file system types that may lack usable dirent.d_type -- info, yet for which the optimization does apply. */ -- case S_MAGIC_REISERFS: -- case S_MAGIC_XFS: /* XFS lacked it until 2013-08-22 commit. */ -- return NOSTAT_LEAF_OPTIMIZATION; -- - case 0: - /* Leaf optimization is unsafe if the file system type is unknown. */ - FALLTHROUGH; -@@ -1023,26 +1007,7 @@ check_for_dir: - if (p->fts_info == FTS_NSOK) - { - if (p->fts_statp->st_size == FTS_STAT_REQUIRED) -- { -- FTSENT *parent = p->fts_parent; -- if (parent->fts_n_dirs_remaining == 0 -- && ISSET(FTS_NOSTAT) -- && ISSET(FTS_PHYSICAL) -- && (leaf_optimization (parent, sp->fts_cwd_fd) -- == NOSTAT_LEAF_OPTIMIZATION)) -- { -- /* nothing more needed */ -- } -- else -- { -- p->fts_info = fts_stat(sp, p, false); -- if (S_ISDIR(p->fts_statp->st_mode) -- && p->fts_level != FTS_ROOTLEVEL -- && 0 < parent->fts_n_dirs_remaining -- && parent->fts_n_dirs_remaining != (nlink_t) -1) -- parent->fts_n_dirs_remaining--; -- } -- } -+ p->fts_info = fts_stat(sp, p, false); - else - fts_assert (p->fts_statp->st_size == FTS_NO_STAT_REQUIRED); - } -@@ -1826,11 +1791,6 @@ err: memset(sbp, 0, sizeof(struct stat)); - } - - if (S_ISDIR(sbp->st_mode)) { -- p->fts_n_dirs_remaining -- = ((sbp->st_nlink < MIN_DIR_NLINK -- || p->fts_level <= FTS_ROOTLEVEL) -- ? -1 -- : sbp->st_nlink - (ISSET (FTS_SEEDOT) ? 0 : MIN_DIR_NLINK)); - if (ISDOT(p->fts_name)) { - /* Command-line "." and ".." are real directories. */ - return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT); -diff --git a/lib/fts_.h b/lib/fts_.h -index 6c7d0ce..15c248c 100644 ---- a/lib/fts_.h -+++ b/lib/fts_.h -@@ -219,11 +219,6 @@ typedef struct _ftsent { - - size_t fts_namelen; /* strlen(fts_name) */ - -- /* If not (nlink_t) -1, an upper bound on the number of -- remaining subdirectories of interest. If this becomes -- zero, some work can be avoided. */ -- nlink_t fts_n_dirs_remaining; -- - # define FTS_D 1 /* preorder directory */ - # define FTS_DC 2 /* directory that causes cycles */ - # define FTS_DEFAULT 3 /* none of the above */ --- -2.32.0 - diff --git a/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch b/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch index 66f9a716c9..97a6357ab9 100644 --- a/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch +++ b/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch @@ -1,4 +1,7 @@ -Subject: local.mk: fix cross compiling problem +From 7cb2d20cfa2a27191255031d231cd41917dcffe8 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Mon, 26 Dec 2016 16:10:35 +0800 +Subject: [PATCH] local.mk: fix cross compiling problem We meet the following error when cross compiling. | Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually). Stop. @@ -12,15 +15,12 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/local.mk b/src/local.mk -index 36dfa4e..c5898cc 100644 +index 96ee941..cdd47d6 100644 --- a/src/local.mk +++ b/src/local.mk -@@ -649,4 +649,4 @@ cu_install_program = @INSTALL_PROGRAM@ +@@ -704,4 +704,4 @@ cu_install_program = @INSTALL@ else cu_install_program = src/ginstall endif -INSTALL = $(cu_install_program) -c +INSTALL_PROGRAM = $(cu_install_program) --- -2.1.0 - 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 @@ -From 7c273e5c6041f8c70f73f5b280fbb8f27d9b5a36 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] 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-Status: Backport [https://github.com/coreutils/coreutils/commit/10fcb97bd728f09d4a027eddf8ad2900f0819b0a] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.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 637fe7a..0111f49 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> -@@ -2895,7 +2891,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); -@@ -2971,7 +2966,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; -@@ -3017,22 +3011,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 diff --git a/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch b/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch deleted file mode 100644 index 3c43e1d5da..0000000000 --- a/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch +++ /dev/null @@ -1,64 +0,0 @@ -Upstream-Status: Denied - -Subject: uname: report processor and hardware correctly - -This patch is rejected by coreutils upstream, but distros like debian and fedora -uses this patch to make `uname -i' and `uname -p' to not report 'unknown'. - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/uname.c | 18 ++++++++++++++++-- - 1 file changed, 16 insertions(+), 2 deletions(-) - -diff --git a/src/uname.c b/src/uname.c -index 39bd28c..c84582d 100644 ---- a/src/uname.c -+++ b/src/uname.c -@@ -299,13 +299,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) -@@ -343,7 +349,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]; -@@ -361,6 +367,14 @@ main (int argc, char **argv) - if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0) - 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 - if (! (toprint == UINT_MAX && element == unknown)) - print_element (element); --- -1.9.1 - 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 @@ -Subject: revert inconsistent ls quoting - -This is a revert of upstream commit 109b9220cead6e979d22d16327c4d9f8350431cc. - -Bug-Debian: https://bugs.debian.org/813164 - -Upstream-Status: Submitted - -Originally-by: Adam Borowski <kilobyte@angband.pl> -[PG: patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164#78 ] -Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> - ---- - ---- coreutils-8.25.orig/NEWS -+++ coreutils-8.25/NEWS -@@ -71,9 +71,6 @@ GNU coreutils NEWS - df now prefers sources towards the root of a device when - eliding duplicate bind mounted entries. - -- ls now quotes file names unambiguously and appropriate for use in a shell, -- when outputting to a terminal. -- - join, sort, uniq with --zero-terminated, now treat '\n' as a field delimiter. - - ** Improvements ---- coreutils-8.25.orig/doc/coreutils.texi -+++ coreutils-8.25/doc/coreutils.texi -@@ -7750,8 +7750,8 @@ this"} in the default C locale. This lo - - You can specify the default value of the @option{--quoting-style} option - with the environment variable @env{QUOTING_STYLE}@. If that environment --variable is not set, the default value is @samp{shell-escape} when the --output is a terminal, and @samp{literal} otherwise. -+variable is not set, the default value is @samp{literal}, but this -+default may change to @samp{shell} in a future version of this package. - - @item --show-control-chars - @opindex --show-control-chars ---- coreutils-8.25.orig/src/ls.c -+++ coreutils-8.25/src/ls.c -@@ -1581,7 +1581,6 @@ decode_switches (int argc, char **argv) - if (isatty (STDOUT_FILENO)) - { - format = many_per_line; -- set_quoting_style (NULL, shell_escape_quoting_style); - /* See description of qmark_funny_chars, above. */ - qmark_funny_chars = true; - } diff --git a/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch b/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch deleted file mode 100644 index 173a57925b..0000000000 --- a/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 7e20a7242ba2657f73311bbf5278093da67f0721 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Tue, 16 Sep 2014 01:59:08 -0700 -Subject: [PATCH] gnulib-comp.m4: selinux/flask.h should respect to - with_selinux - -Fixed when build with meta-selinux even when --without-selinux: -runcon.c:49:28: fatal error: selinux/flask.h: No such file or directory - # include <selinux/flask.h> - ^ -compilation terminated. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> - ---- - m4/gnulib-comp.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 -index dead90e..0abf0bd 100644 ---- a/m4/gnulib-comp.m4 -+++ b/m4/gnulib-comp.m4 -@@ -1860,10 +1860,10 @@ AC_DEFUN([gl_INIT], - AC_LIBOBJ([select]) - fi - gl_SYS_SELECT_MODULE_INDICATOR([select]) -- AC_CHECK_HEADERS([selinux/flask.h]) - gl_HEADERS_SELINUX_SELINUX_H - gl_HEADERS_SELINUX_CONTEXT_H - if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then -+ AC_CHECK_HEADERS([selinux/flask.h]) - AC_LIBOBJ([getfilecon]) - fi - gl_SERVENT diff --git a/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch index 1a8a9b9983..718de0ab78 100644 --- a/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch +++ b/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch @@ -1,4 +1,4 @@ -From a26530083a29eeee910bfd606ecc621acecd547a Mon Sep 17 00:00:00 2001 +From f53ffb5b27ab7d4a4c62df00ebd6a1a6936d1709 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 3 Aug 2011 14:12:30 -0700 Subject: [PATCH] coreutils: Fix build on uclibc @@ -12,16 +12,15 @@ and make life easier for cross compilation process. Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Inappropriate [Upstream does care for AIX while we may not] - --- m4/getloadavg.m4 | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 -index 8e96965..63782a2 100644 +index 9d0236f..68f7c52 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 -@@ -41,18 +41,6 @@ AC_CHECK_FUNC([getloadavg], [], +@@ -46,18 +46,6 @@ if test $ac_cv_func_getloadavg != yes; then [LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes]) fi diff --git a/meta/recipes-core/coreutils/coreutils_8.32.bb b/meta/recipes-core/coreutils/coreutils_9.5.bb index 01acf9a874..9a5f836ebe 100644 --- a/meta/recipes-core/coreutils/coreutils_8.32.bb +++ b/meta/recipes-core/coreutils/coreutils_9.5.bb @@ -4,9 +4,9 @@ manipulation utilities. These are the core utilities which are expected to exist every system." HOMEPAGE = "http://www.gnu.org/software/coreutils/" BUGTRACKER = "http://debbugs.gnu.org/coreutils" -LICENSE = "GPLv3+" +LICENSE = "GPL-3.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ - file://src/ls.c;beginline=1;endline=15;md5=b7d80abf5b279320fb0e4b1007ed108b \ + file://src/ls.c;beginline=1;endline=15;md5=9ac94aaed7fd46fd8df7147a9e3410cb \ " DEPENDS = "gmp libcap" DEPENDS:class-native = "" @@ -15,23 +15,15 @@ inherit autotools gettext texinfo SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ file://remove-usr-local-lib-from-m4.patch \ - file://fix-selinux-flask.patch \ - file://0001-uname-report-processor-and-hardware-correctly.patch \ - file://disable-ls-output-quoting.patch \ file://0001-local.mk-fix-cross-compiling-problem.patch \ file://run-ptest \ - file://0001-ls-restore-8.31-behavior-on-removed-directories.patch \ - file://0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch \ " - -SRC_URI[md5sum] = "022042695b7d5bcf1a93559a9735e668" -SRC_URI[sha256sum] = "4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa" +SRC_URI[sha256sum] = "cd328edeac92f6a665de9f323c93b712af1858bc2e0d88f3f7100469470a1b8a" # http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.27-101-gf5d7c0842 -# runcon is not really a sandbox command, use `runcon ... setsid ...` to avoid this particular issue. -CVE_CHECK_WHITELIST += "CVE-2016-2781" +# +CVE_STATUS[CVE-2016-2781] = "disputed: runcon is not really a sandbox command, use `runcon ... setsid ...` to avoid this particular issue." -EXTRA_OECONF:class-native = "--without-gmp" EXTRA_OECONF:class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}" EXTRA_OECONF:class-nativesdk = "--enable-install-program=arch,hostname" @@ -53,6 +45,7 @@ PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr," PACKAGECONFIG[single-binary] = "--enable-single-binary,--disable-single-binary,," PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" +PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl" # [ df mktemp nice printenv base64 gets a special treatment and is not included in this bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \ @@ -155,6 +148,13 @@ ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1" +# The statx() requires glibc >= 2.28 and linux kernel >= 4.11, it doesn't work +# when glibc >= 2.28 ((Ubuntu 20.04 in docker) and kernel < 4.11 (Host OS +# CentOS 7), we can check kernel version and disable it, but that would cause +# two different signatures for coreutils-native, so disable it unconditionally +# for deterministic build. +EXTRA_OECONF:append:class-native = " ac_cv_func_statx=0" + python __anonymous() { for prog in d.getVar('base_bindir_progs').split(): d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) @@ -167,12 +167,13 @@ BBCLASSEXTEND = "native nativesdk" inherit ptest -RDEPENDS:${PN}-ptest += "bash findutils gawk liberror-perl make perl perl-modules python3-core sed shadow" +RDEPENDS:${PN}-ptest += "bash findutils gawk make perl perl-modules python3-core sed shadow" # -dev automatic dependencies fails as we don't want libmodule-build-perl-dev, its too heavy # may need tweaking if DEPENDS changes +# Can't use ${PN}-dev here since flags with overrides and key expansion not supported RRECOMMENDS:coreutils-dev[nodeprrecs] = "1" -RRECOMMENDS:coreutils-dev = "acl-dev attr-dev gmp-dev libcap-dev bash-dev findutils-dev gawk-dev shadow-dev" +RRECOMMENDS:${PN}-dev += "acl-dev attr-dev gmp-dev libcap-dev bash-dev findutils-dev gawk-dev shadow-dev" do_install_ptest () { install -d ${D}${PTEST_PATH}/tests @@ -180,6 +181,7 @@ do_install_ptest () { sed -i 's/ginstall/install/g' `grep -R ginstall ${D}${PTEST_PATH}/tests | awk -F: '{print $1}' | uniq` install -d ${D}${PTEST_PATH}/build-aux install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ + install -Dm 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/config.h cp ${B}/Makefile ${D}${PTEST_PATH}/ cp ${S}/init.cfg ${D}${PTEST_PATH}/ cp -r ${B}/src ${D}${PTEST_PATH}/ @@ -191,6 +193,7 @@ do_install_ptest () { sed -i '/^abs_top_builddir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile sed -i '/^abs_top_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile sed -i '/^built_programs/s/ginstall/install/g' ${D}${PTEST_PATH}/Makefile + sed -i '/^CC =/s/ --sysroot=.*recipe-sysroot/ /g' ${D}${PTEST_PATH}/Makefile chmod -R 777 ${D}${PTEST_PATH} # Disable subcase stty-pairs.sh, it will cause test framework hang @@ -207,7 +210,10 @@ do_install_ptest () { sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest } +do_install_ptest:append:libc-musl () { + # these tests fail due to bash on musl systems + # xmalloc: cannot allocate 16146 bytes + sed -i -e '/tests\/dd\/no-allocate.sh/d' ${D}${PTEST_PATH}/Makefile + sed -i -e '/tests\/split\/line-bytes.sh/d' ${D}${PTEST_PATH}/Makefile +} FILES:${PN}-ptest += "${bindir}/getlimits" - -# These are specific to Opensuse -CVE_WHITELIST += "CVE-2013-0221 CVE-2013-0222 CVE-2013-0223" |