diff options
Diffstat (limited to 'meta/recipes-core/coreutils')
-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-uname-report-processor-and-hardware-correctly.patch | 64 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/e8b56ebd536e82b15542a00c888109471936bfda.patch | 93 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch | 37 | ||||
-rw-r--r-- | meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch | 30 | ||||
-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_9.0.bb) | 50 |
7 files changed, 73 insertions, 220 deletions
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-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/e8b56ebd536e82b15542a00c888109471936bfda.patch b/meta/recipes-core/coreutils/coreutils/e8b56ebd536e82b15542a00c888109471936bfda.patch deleted file mode 100644 index d69ee95e4a..0000000000 --- a/meta/recipes-core/coreutils/coreutils/e8b56ebd536e82b15542a00c888109471936bfda.patch +++ /dev/null @@ -1,93 +0,0 @@ -From e8b56ebd536e82b15542a00c888109471936bfda Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com> -Date: Fri, 24 Sep 2021 20:57:41 +0100 -Subject: [PATCH] chmod: fix exit status when ignoring symlinks - -* src/chmod.c: Reorder enum so CH_NOT_APPLIED -can be treated as a non error. -* tests/chmod/ignore-symlink.sh: A new test. -* tests/local.mk: Reference the new test. -* NEWS: Mention the bug fix. -Fixes https://bugs.gnu.org/50784 - -Upstream-Status: Backport -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - src/chmod.c | 4 ++-- - tests/chmod/ignore-symlink.sh | 31 +++++++++++++++++++++++++++++++ - tests/local.mk | 1 + - 4 files changed, 40 insertions(+), 2 deletions(-) - create mode 100755 tests/chmod/ignore-symlink.sh - -diff --git a/src/chmod.c b/src/chmod.c -index 37b04f500..57ac47f33 100644 ---- a/src/chmod.c -+++ b/src/chmod.c -@@ -44,8 +44,8 @@ struct change_status - enum - { - CH_NO_STAT, -- CH_NOT_APPLIED, - CH_FAILED, -+ CH_NOT_APPLIED, - CH_NO_CHANGE_REQUESTED, - CH_SUCCEEDED - } -@@ -322,7 +322,7 @@ process_file (FTS *fts, FTSENT *ent) - if ( ! recurse) - fts_set (fts, ent, FTS_SKIP); - -- return CH_NO_CHANGE_REQUESTED <= ch.status; -+ return CH_NOT_APPLIED <= ch.status; - } - - /* Recursively change the modes of the specified FILES (the last entry -diff --git a/tests/chmod/ignore-symlink.sh b/tests/chmod/ignore-symlink.sh -new file mode 100755 -index 000000000..5ce3de816 ---- /dev/null -+++ b/tests/chmod/ignore-symlink.sh -@@ -0,0 +1,31 @@ -+#!/bin/sh -+# Test for proper exit code of chmod on a processed symlink. -+ -+# Copyright (C) 2021 Free Software Foundation, Inc. -+ -+# This program is free software: you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation, either version 3 of the License, or -+# (at your option) any later version. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+ -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see <https://www.gnu.org/licenses/>. -+ -+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src -+print_ver_ chmod -+ -+mkdir dir || framework_failure_ -+touch dir/f || framework_failure_ -+ln -s f dir/l || framework_failure_ -+ -+# This operation ignores symlinks but should succeed. -+chmod u+w -R dir 2> out || fail=1 -+ -+compare /dev/null out || fail=1 -+ -+Exit $fail -diff --git a/tests/local.mk b/tests/local.mk -index 228d0e368..b5b893fb7 100644 ---- a/tests/local.mk -+++ b/tests/local.mk -@@ -456,6 +456,7 @@ all_tests = \ - tests/chmod/c-option.sh \ - tests/chmod/equal-x.sh \ - tests/chmod/equals.sh \ -+ tests/chmod/ignore-symlink.sh \ - tests/chmod/inaccessible.sh \ - tests/chmod/octal.sh \ - tests/chmod/setgid.sh \ 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 4f126ad67c..0000000000 --- a/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b04363018b4b9b45fdf23384f30d02caa5564602 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 3857233..c01fb30 100644 ---- a/m4/gnulib-comp.m4 -+++ b/m4/gnulib-comp.m4 -@@ -1953,11 +1953,11 @@ 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 - gl_HEADERS_SELINUX_LABEL_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/intermittent-testfailure.patch b/meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch new file mode 100644 index 0000000000..0794532bdf --- /dev/null +++ b/meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch @@ -0,0 +1,30 @@ +tests/df: Fix intermittent test failure + +The test writes to the disk and means the space used changes. If this +crosses a number boundary, the heading spacing can change: + +-Filesystem 1024-blocks Used Available Capacity Mounted on ++Filesystem 1024-blocks Used Available Capacity Mounted on + +The test is to make sure the 1024 blocks element remains the same and +the spacing doesn't matter. Therefore strip any duplicate spaces using tr. + +Submitted: https://github.com/coreutils/coreutils/pull/88 +Upstream-Status: Backport [https://github.com/coreutils/coreutils/commit/c5725c8c4bb21903490a48035286d0f94463642e] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: coreutils-9.5/tests/df/df-P.sh +=================================================================== +--- coreutils-9.5.orig/tests/df/df-P.sh ++++ coreutils-9.5/tests/df/df-P.sh +@@ -20,8 +20,8 @@ + print_ver_ df + + +- df -P . > t1 || fail=1 +-BLOCK_SIZE=1M df -P . > t2 || fail=1 ++ df -P . | tr -s ' ' > t1 || fail=1 ++BLOCK_SIZE=1M df -P . | tr -s ' ' > t2 || fail=1 + + # Since file system utilization may be changing, compare only df's header line. + # That records the block size. E.g., for "1M", it would be: 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_9.0.bb b/meta/recipes-core/coreutils/coreutils_9.5.bb index 0800bc3b6d..af0fcdcc4c 100644 --- a/meta/recipes-core/coreutils/coreutils_9.0.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=3b8fbaee597c8a9bb88d30840d53048c \ + file://src/ls.c;beginline=1;endline=15;md5=9ac94aaed7fd46fd8df7147a9e3410cb \ " DEPENDS = "gmp libcap" DEPENDS:class-native = "" @@ -15,18 +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://0001-local.mk-fix-cross-compiling-problem.patch \ - file://e8b56ebd536e82b15542a00c888109471936bfda.patch \ + file://intermittent-testfailure.patch \ file://run-ptest \ " - -SRC_URI[sha256sum] = "ce30acdf4a41bc5bb30dd955e9eaa75fa216b4e3deb08889ed32433c7b3b97ce" +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-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}" EXTRA_OECONF:class-nativesdk = "--enable-install-program=arch,hostname" @@ -49,6 +46,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 \ @@ -79,6 +77,11 @@ RDEPENDS:coreutils:class-target += "${@bb.utils.contains('PACKAGECONFIG', 'singl # regardless of whether single-binary is in effect. RPROVIDES:coreutils += "${@bb.utils.contains('PACKAGECONFIG', 'single-binary', 'coreutils-stdbuf', '', d)}" +# put getlimits into coreutils-getlimits, because other ptest packages such as +# findutils-ptest may need this command. Note that getlimits is a noinst_PROGRAM +PACKAGE_BEFORE_PN:class-target += "${PN}-getlimits" +FILES:${PN}-getlimits = "${bindir}/getlimits" + # Let aclocal use the relative path for the m4 file rather than the # absolute since coreutils has a lot of m4 files, otherwise there might # be an "Argument list too long" error when it is built in a long/deep @@ -112,6 +115,9 @@ do_install:append() { # in update-alternatives to fail, therefore use lbracket - the name used # for the actual source file. mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN} + + # this getlimits noinst_PROGRAM would possibly be needed by other ptest packages + install ${B}/src/getlimits ${D}/${bindir} } inherit update-alternatives @@ -151,6 +157,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)) @@ -163,12 +176,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 @@ -176,6 +190,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}/ @@ -187,6 +202,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 @@ -197,13 +213,15 @@ do_install_ptest () { # Tweak test d_type-check to use python3 instead of python sed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check - install ${B}/src/getlimits ${D}/${bindir} # handle multilib sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest } -FILES:${PN}-ptest += "${bindir}/getlimits" - -# These are specific to Opensuse -CVE_WHITELIST += "CVE-2013-0221 CVE-2013-0222 CVE-2013-0223" +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 +} +RDEPENDS:${PN}-ptest += "${PN}-getlimits" |