diff options
Diffstat (limited to 'poky/meta/recipes-core/coreutils')
7 files changed, 375 insertions, 0 deletions
diff --git a/poky/meta/recipes-core/coreutils/coreutils/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-core/coreutils/coreutils/0001-Unset-need_charset_alias-when-building-for-musl.patch new file mode 100644 index 000000000..ba1a4bab4 --- /dev/null +++ b/poky/meta/recipes-core/coreutils/coreutils/0001-Unset-need_charset_alias-when-building-for-musl.patch @@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 + diff --git a/poky/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch b/poky/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch new file mode 100644 index 000000000..66f9a716c --- /dev/null +++ b/poky/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch @@ -0,0 +1,26 @@ +Subject: local.mk: fix cross compiling problem + +We meet the following error when cross compiling. +| Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually). Stop. +This patch fixes this problem. + +Upstream-Status: Pending + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + src/local.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/local.mk b/src/local.mk +index 36dfa4e..c5898cc 100644 +--- a/src/local.mk ++++ b/src/local.mk +@@ -649,4 +649,4 @@ cu_install_program = @INSTALL_PROGRAM@ + else + cu_install_program = src/ginstall + endif +-INSTALL = $(cu_install_program) -c ++INSTALL_PROGRAM = $(cu_install_program) +-- +2.1.0 + diff --git a/poky/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch b/poky/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch new file mode 100644 index 000000000..3c43e1d5d --- /dev/null +++ b/poky/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch @@ -0,0 +1,64 @@ +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/poky/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch b/poky/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch new file mode 100644 index 000000000..e68c21355 --- /dev/null +++ b/poky/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch @@ -0,0 +1,49 @@ +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/poky/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch b/poky/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch new file mode 100644 index 000000000..9d1ae55d4 --- /dev/null +++ b/poky/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch @@ -0,0 +1,39 @@ +From a1d360509fa3a4aff57eedcd528cc0347a87531d 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 472d3a0..5f09734 100644 +--- a/m4/gnulib-comp.m4 ++++ b/m4/gnulib-comp.m4 +@@ -1730,11 +1730,11 @@ AC_DEFUN([gl_INIT], + AC_LIBOBJ([select]) + fi + gl_SYS_SELECT_MODULE_INDICATOR([select]) +- AC_CHECK_HEADERS([selinux/flask.h]) + AC_LIBOBJ([selinux-at]) + 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 +-- +1.7.9.5 + diff --git a/poky/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch b/poky/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch new file mode 100644 index 000000000..2ef8a548a --- /dev/null +++ b/poky/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch @@ -0,0 +1,31 @@ +We have problem using hardcoded directories like /usr/local here +which will be checked for cross builds. This is a special case which +is valid for AIX only. We do not have AIX as one of our supported +build host or target. Therefore we get rid of the hardcoded paths +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] + +Index: coreutils-8.14/m4/getloadavg.m4 +=================================================================== +--- coreutils-8.14.orig/m4/getloadavg.m4 2011-09-19 08:09:24.000000000 -0700 ++++ coreutils-8.14/m4/getloadavg.m4 2011-10-19 21:42:00.385533357 -0700 +@@ -41,16 +41,6 @@ + [LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes]) + fi + +- if test $gl_func_getloadavg_done = no; then +- # There is a commonly available library for RS/6000 AIX. +- # Since it is not a standard part of AIX, it might be installed locally. +- gl_getloadavg_LIBS=$LIBS +- LIBS="-L/usr/local/lib $LIBS" +- AC_CHECK_LIB([getloadavg], [getloadavg], +- [LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes], +- [LIBS=$gl_getloadavg_LIBS]) +- fi +- + # Set up the replacement function if necessary. + if test $gl_func_getloadavg_done = no; then + HAVE_GETLOADAVG=0 diff --git a/poky/meta/recipes-core/coreutils/coreutils_8.29.bb b/poky/meta/recipes-core/coreutils/coreutils_8.29.bb new file mode 100644 index 000000000..0b8acc588 --- /dev/null +++ b/poky/meta/recipes-core/coreutils/coreutils_8.29.bb @@ -0,0 +1,133 @@ +SUMMARY = "The basic file, shell and text manipulation utilities" +DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \ +manipulation utilities. These are the core utilities which are expected to exist on \ +every system." +HOMEPAGE = "http://www.gnu.org/software/coreutils/" +BUGTRACKER = "http://debbugs.gnu.org/coreutils" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\ + file://src/ls.c;beginline=1;endline=15;md5=1c3f9411e1842a062ce5ce9210beee0e" +DEPENDS = "gmp libcap" +DEPENDS_class-native = "" + +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-Unset-need_charset_alias-when-building-for-musl.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 \ + " + +SRC_URI[md5sum] = "960cfe75a42c9907c71439f8eb436303" +SRC_URI[sha256sum] = "92d0fa1c311cacefa89853bdb53c62f4110cdfda3820346b59cbd098f40f955e" + +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" + +# acl and xattr are not default features +# +PACKAGECONFIG_class-target ??= "\ + ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \ +" + +# The lib/oe/path.py requires xattr +PACKAGECONFIG_class-native ??= "xattr" + +# with, without, depends, rdepends +# +PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," +PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr," +PACKAGECONFIG[single-binary] = "--enable-single-binary,--disable-single-binary,," + +# [ df mktemp base64 gets a special treatment and is not included in this +bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \ + env expand expr factor fmt fold groups head hostid id install \ + join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \ + pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \ + sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout\ + tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes" + +# hostname gets a special treatment and is not included in this +base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \ + mknod mv pwd rm rmdir sleep stty sync touch true uname stat" + +sbindir_progs= "chroot" + +# 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 +# directory. +acpaths = "-I ./m4" + +# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h +do_compile_prepend () { + mkdir -p ${B}/src +} + +do_install_class-native() { + autotools_do_install + # remove groups to fix conflict with shadow-native + rm -f ${D}${STAGING_BINDIR_NATIVE}/groups + # The return is a must since native doesn't need the + # do_install_append() in the below. + return +} + +do_install_append() { + for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done + + install -d ${D}${base_bindir} + [ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done + + install -d ${D}${sbindir} + [ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done + + # [ requires special handling because [.coreutils will cause the sed stuff + # in update-alternatives to fail, therefore use lbracket - the name used + # for the actual source file. + mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN} +} + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +# Make hostname's priority higher than busybox but lower than net-tools +ALTERNATIVE_PRIORITY[hostname] = "90" +ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df" +ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1 hostname.1" + +ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1" + +ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64" +ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}" +ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1" + +ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp" +ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}" +ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1" + +ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df" +ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}" +ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1" + +ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/[" +ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}" + +ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1" +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" + +python __anonymous() { + for prog in d.getVar('base_bindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) + + for prog in d.getVar('sbindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog)) +} + +BBCLASSEXTEND = "native nativesdk" |