kumquat-buildroot/package/coreutils/coreutils.mk

83 lines
2.6 KiB
Makefile
Raw Normal View History

################################################################################
#
# coreutils
#
################################################################################
COREUTILS_VERSION = 8.22
COREUTILS_SITE = $(BR2_GNU_MIRROR)/coreutils
COREUTILS_SOURCE = coreutils-$(COREUTILS_VERSION).tar.xz
COREUTILS_LICENSE = GPLv3+
COREUTILS_LICENSE_FILES = COPYING
# patching gnulib .m4 file
COREUTILS_AUTORECONF = YES
COREUTILS_GETTEXTIZE = YES
# If both coreutils and busybox are selected, make certain coreutils
# wins the fight over who gets to have their utils actually installed.
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
COREUTILS_DEPENDENCIES = busybox
endif
hostname: fix conflicting installs of /bin/hostname Surprisingly long-standing issue with conflicting /bin/hostname installs. Reported as early as November 2005 by Joseph Dupre. All together at one point or another there are at least 4 possible sources of /bin/hostname: busybox util-linux coreutils net-tools Buildroot depends on the -F flag being available in the default /etc/inittab. Out of the 4 listed projects only net-tools and buildroot for sure support the -F flag. I'm a little unclear on util-linux as it has been removed entirely (in favor of net-tools) for some time. As of coreutils 6.9.90 (2007-12-01), coreutils does not install its /bin/hostname by default. The following commit reenabled its build: d6e58cb coreutils: fixed missing hostname (Sep 2010) This was done to fix a build error in coreutils regarding help2man. A later patch: 30c5105 coreutils: bump to version 8.21 disabled the help2man functionality entirely but left hostname being installed. On a very related note, net-tools now contains an obsolete check to add util-linux as a dependency to force it to build first (so that net-tools ends up with /bin/hostname). This patch fixes both of these issues so that hostname always comes from one of two places: busybox net-tools Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Co-authored-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-08-20 23:02:46 +02:00
COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false \
ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \
uname join
coreutils: changed/removed some of the configure environmental variables ac_cv_func_closedir_void=no - no longer used ac_cv_func_fnmatch_gnu=yes - no longer used ac_cv_func_getcwd_null=yes - duplicate of gl_cv_func_getcwd_null ac_cv_func_mkstemp=yes - changed to gl_cv_func_working_mkstemp ac_cv_func_stat_empty_string_bug=no - no longer used ac_cv_func_utime_null=yes - no longer used ac_cv_have_decl_euidaccess=no - no longer used ac_cv_have_decl_nanosleep=yes - no longer used ac_cv_struct_st_mtim_nsec=no - no longer used am_cv_func_working_getline=yes - duplicate am_getline_needs_run_time_check=no - changed to gl_getline_needs_run_time_check gl_cv_c_restrict=no - changed to ac_cv_c_restrict gl_cv_func_mkstemp_limitations=no - no longer used gl_cv_func_working_readdir=yes - no longer used jm_ac_cv_func_link_follows_symlink=no - changed to gl_ac_cv_func_link_follows_symlink jm_cv_func_gettimeofday_clobber=no - changed to gl_cv_func_gettimeofday_clobber jm_cv_func_nanosleep_works=yes - no longer used jm_cv_func_svid_putenv=yes - changed to gl_cv_func_svid_putenv jm_cv_func_working_re_compile_pattern=yes - changed to gl_cv_func_re_compile_pattern_working utils_cv_func_mkdir_trailing_slash_bug=no - duplicate of gl_cv_func_mkdir_trailing_slash_bug utils_cv_func_mkstemp_limitations=no - duplicate of gl_cv_func_mkstemp_limitations Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-09-30 21:03:32 +02:00
COREUTILS_CONF_ENV = ac_cv_c_restrict=no \
ac_cv_func_chown_works=yes \
ac_cv_func_euidaccess=no \
ac_cv_func_fstatat=yes \
coreutils: changed/removed some of the configure environmental variables ac_cv_func_closedir_void=no - no longer used ac_cv_func_fnmatch_gnu=yes - no longer used ac_cv_func_getcwd_null=yes - duplicate of gl_cv_func_getcwd_null ac_cv_func_mkstemp=yes - changed to gl_cv_func_working_mkstemp ac_cv_func_stat_empty_string_bug=no - no longer used ac_cv_func_utime_null=yes - no longer used ac_cv_have_decl_euidaccess=no - no longer used ac_cv_have_decl_nanosleep=yes - no longer used ac_cv_struct_st_mtim_nsec=no - no longer used am_cv_func_working_getline=yes - duplicate am_getline_needs_run_time_check=no - changed to gl_getline_needs_run_time_check gl_cv_c_restrict=no - changed to ac_cv_c_restrict gl_cv_func_mkstemp_limitations=no - no longer used gl_cv_func_working_readdir=yes - no longer used jm_ac_cv_func_link_follows_symlink=no - changed to gl_ac_cv_func_link_follows_symlink jm_cv_func_gettimeofday_clobber=no - changed to gl_cv_func_gettimeofday_clobber jm_cv_func_nanosleep_works=yes - no longer used jm_cv_func_svid_putenv=yes - changed to gl_cv_func_svid_putenv jm_cv_func_working_re_compile_pattern=yes - changed to gl_cv_func_re_compile_pattern_working utils_cv_func_mkdir_trailing_slash_bug=no - duplicate of gl_cv_func_mkdir_trailing_slash_bug utils_cv_func_mkstemp_limitations=no - duplicate of gl_cv_func_mkstemp_limitations Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-09-30 21:03:32 +02:00
ac_cv_func_getdelim=yes \
ac_cv_func_getgroups=yes \
ac_cv_func_getgroups_works=yes \
ac_cv_func_getloadavg=no \
ac_cv_func_lstat_dereferences_slashed_symlink=yes \
ac_cv_func_lstat_empty_string_bug=no \
ac_cv_func_strerror_r_char_p=no \
coreutils: changed/removed some of the configure environmental variables ac_cv_func_closedir_void=no - no longer used ac_cv_func_fnmatch_gnu=yes - no longer used ac_cv_func_getcwd_null=yes - duplicate of gl_cv_func_getcwd_null ac_cv_func_mkstemp=yes - changed to gl_cv_func_working_mkstemp ac_cv_func_stat_empty_string_bug=no - no longer used ac_cv_func_utime_null=yes - no longer used ac_cv_have_decl_euidaccess=no - no longer used ac_cv_have_decl_nanosleep=yes - no longer used ac_cv_struct_st_mtim_nsec=no - no longer used am_cv_func_working_getline=yes - duplicate am_getline_needs_run_time_check=no - changed to gl_getline_needs_run_time_check gl_cv_c_restrict=no - changed to ac_cv_c_restrict gl_cv_func_mkstemp_limitations=no - no longer used gl_cv_func_working_readdir=yes - no longer used jm_ac_cv_func_link_follows_symlink=no - changed to gl_ac_cv_func_link_follows_symlink jm_cv_func_gettimeofday_clobber=no - changed to gl_cv_func_gettimeofday_clobber jm_cv_func_nanosleep_works=yes - no longer used jm_cv_func_svid_putenv=yes - changed to gl_cv_func_svid_putenv jm_cv_func_working_re_compile_pattern=yes - changed to gl_cv_func_re_compile_pattern_working utils_cv_func_mkdir_trailing_slash_bug=no - duplicate of gl_cv_func_mkdir_trailing_slash_bug utils_cv_func_mkstemp_limitations=no - duplicate of gl_cv_func_mkstemp_limitations Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-09-30 21:03:32 +02:00
ac_cv_func_strnlen_working=yes \
ac_cv_func_strtod=yes \
ac_cv_func_working_mktime=yes \
ac_cv_have_decl_strerror_r=yes \
ac_cv_have_decl_strnlen=yes \
ac_cv_lib_getloadavg_getloadavg=no \
ac_cv_lib_util_getloadavg=no \
ac_fsusage_space=yes \
ac_use_included_regex=no \
am_cv_func_working_getline=yes \
coreutils: changed/removed some of the configure environmental variables ac_cv_func_closedir_void=no - no longer used ac_cv_func_fnmatch_gnu=yes - no longer used ac_cv_func_getcwd_null=yes - duplicate of gl_cv_func_getcwd_null ac_cv_func_mkstemp=yes - changed to gl_cv_func_working_mkstemp ac_cv_func_stat_empty_string_bug=no - no longer used ac_cv_func_utime_null=yes - no longer used ac_cv_have_decl_euidaccess=no - no longer used ac_cv_have_decl_nanosleep=yes - no longer used ac_cv_struct_st_mtim_nsec=no - no longer used am_cv_func_working_getline=yes - duplicate am_getline_needs_run_time_check=no - changed to gl_getline_needs_run_time_check gl_cv_c_restrict=no - changed to ac_cv_c_restrict gl_cv_func_mkstemp_limitations=no - no longer used gl_cv_func_working_readdir=yes - no longer used jm_ac_cv_func_link_follows_symlink=no - changed to gl_ac_cv_func_link_follows_symlink jm_cv_func_gettimeofday_clobber=no - changed to gl_cv_func_gettimeofday_clobber jm_cv_func_nanosleep_works=yes - no longer used jm_cv_func_svid_putenv=yes - changed to gl_cv_func_svid_putenv jm_cv_func_working_re_compile_pattern=yes - changed to gl_cv_func_re_compile_pattern_working utils_cv_func_mkdir_trailing_slash_bug=no - duplicate of gl_cv_func_mkdir_trailing_slash_bug utils_cv_func_mkstemp_limitations=no - duplicate of gl_cv_func_mkstemp_limitations Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-09-30 21:03:32 +02:00
fu_cv_sys_stat_statfs2_bsize=yes \
gl_cv_func_getcwd_null=yes \
gl_cv_func_getcwd_path_max=yes \
coreutils: changed/removed some of the configure environmental variables ac_cv_func_closedir_void=no - no longer used ac_cv_func_fnmatch_gnu=yes - no longer used ac_cv_func_getcwd_null=yes - duplicate of gl_cv_func_getcwd_null ac_cv_func_mkstemp=yes - changed to gl_cv_func_working_mkstemp ac_cv_func_stat_empty_string_bug=no - no longer used ac_cv_func_utime_null=yes - no longer used ac_cv_have_decl_euidaccess=no - no longer used ac_cv_have_decl_nanosleep=yes - no longer used ac_cv_struct_st_mtim_nsec=no - no longer used am_cv_func_working_getline=yes - duplicate am_getline_needs_run_time_check=no - changed to gl_getline_needs_run_time_check gl_cv_c_restrict=no - changed to ac_cv_c_restrict gl_cv_func_mkstemp_limitations=no - no longer used gl_cv_func_working_readdir=yes - no longer used jm_ac_cv_func_link_follows_symlink=no - changed to gl_ac_cv_func_link_follows_symlink jm_cv_func_gettimeofday_clobber=no - changed to gl_cv_func_gettimeofday_clobber jm_cv_func_nanosleep_works=yes - no longer used jm_cv_func_svid_putenv=yes - changed to gl_cv_func_svid_putenv jm_cv_func_working_re_compile_pattern=yes - changed to gl_cv_func_re_compile_pattern_working utils_cv_func_mkdir_trailing_slash_bug=no - duplicate of gl_cv_func_mkdir_trailing_slash_bug utils_cv_func_mkstemp_limitations=no - duplicate of gl_cv_func_mkstemp_limitations Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-09-30 21:03:32 +02:00
gl_cv_func_gettimeofday_clobber=no \
gl_cv_func_fstatat_zero_flag=no \
gl_cv_func_link_follows_symlink=no \
coreutils: changed/removed some of the configure environmental variables ac_cv_func_closedir_void=no - no longer used ac_cv_func_fnmatch_gnu=yes - no longer used ac_cv_func_getcwd_null=yes - duplicate of gl_cv_func_getcwd_null ac_cv_func_mkstemp=yes - changed to gl_cv_func_working_mkstemp ac_cv_func_stat_empty_string_bug=no - no longer used ac_cv_func_utime_null=yes - no longer used ac_cv_have_decl_euidaccess=no - no longer used ac_cv_have_decl_nanosleep=yes - no longer used ac_cv_struct_st_mtim_nsec=no - no longer used am_cv_func_working_getline=yes - duplicate am_getline_needs_run_time_check=no - changed to gl_getline_needs_run_time_check gl_cv_c_restrict=no - changed to ac_cv_c_restrict gl_cv_func_mkstemp_limitations=no - no longer used gl_cv_func_working_readdir=yes - no longer used jm_ac_cv_func_link_follows_symlink=no - changed to gl_ac_cv_func_link_follows_symlink jm_cv_func_gettimeofday_clobber=no - changed to gl_cv_func_gettimeofday_clobber jm_cv_func_nanosleep_works=yes - no longer used jm_cv_func_svid_putenv=yes - changed to gl_cv_func_svid_putenv jm_cv_func_working_re_compile_pattern=yes - changed to gl_cv_func_re_compile_pattern_working utils_cv_func_mkdir_trailing_slash_bug=no - duplicate of gl_cv_func_mkdir_trailing_slash_bug utils_cv_func_mkstemp_limitations=no - duplicate of gl_cv_func_mkstemp_limitations Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-09-30 21:03:32 +02:00
gl_cv_func_re_compile_pattern_working=yes \
gl_cv_func_svid_putenv=yes \
gl_cv_func_tzset_clobber=no \
gl_cv_func_working_mkstemp=yes \
gl_cv_func_working_utimes=yes \
gl_getline_needs_run_time_check=no \
gl_cv_have_proc_uptime=yes \
utils_cv_localtime_cache=no \
PERL=missing
hostname: fix conflicting installs of /bin/hostname Surprisingly long-standing issue with conflicting /bin/hostname installs. Reported as early as November 2005 by Joseph Dupre. All together at one point or another there are at least 4 possible sources of /bin/hostname: busybox util-linux coreutils net-tools Buildroot depends on the -F flag being available in the default /etc/inittab. Out of the 4 listed projects only net-tools and buildroot for sure support the -F flag. I'm a little unclear on util-linux as it has been removed entirely (in favor of net-tools) for some time. As of coreutils 6.9.90 (2007-12-01), coreutils does not install its /bin/hostname by default. The following commit reenabled its build: d6e58cb coreutils: fixed missing hostname (Sep 2010) This was done to fix a build error in coreutils regarding help2man. A later patch: 30c5105 coreutils: bump to version 8.21 disabled the help2man functionality entirely but left hostname being installed. On a very related note, net-tools now contains an obsolete check to add util-linux as a dependency to force it to build first (so that net-tools ends up with /bin/hostname). This patch fixes both of these issues so that hostname always comes from one of two places: busybox net-tools Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Co-authored-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-08-20 23:02:46 +02:00
COREUTILS_CONF_OPT = --disable-rpath
define COREUTILS_POST_INSTALL
# some things go in root rather than usr
for f in $(COREUTILS_BIN_PROGS); do \
mv $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f; \
done
# link for archaic shells
ln -fs test $(TARGET_DIR)/usr/bin/[
# gnu thinks chroot is in bin, debian thinks it's in sbin
mv $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot
endef
COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_POST_INSTALL
# If both coreutils and busybox are selected, the corresponding applets
# may need to be reinstated by the clean targets.
$(eval $(autotools-package))