2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-03-10 18:58:07 +01:00
|
|
|
#
|
|
|
|
# util-linux
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-03-07 13:46:37 +01:00
|
|
|
|
2015-04-30 19:57:48 +02:00
|
|
|
UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
|
2015-02-20 13:10:19 +01:00
|
|
|
UTIL_LINUX_VERSION_MAJOR = 2.26
|
2013-09-06 08:14:15 +02:00
|
|
|
UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
|
2011-07-22 16:53:12 +02:00
|
|
|
UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
|
2012-11-13 02:06:01 +01:00
|
|
|
|
|
|
|
# README.licensing claims that some files are GPLv2-only, but this is not true.
|
|
|
|
# Some files are GPLv3+ but only in tests.
|
2013-03-07 13:46:37 +01:00
|
|
|
UTIL_LINUX_LICENSE = GPLv2+, BSD-4c, libblkid and libmount LGPLv2.1+, libuuid BSD-3c
|
|
|
|
UTIL_LINUX_LICENSE_FILES = README.licensing Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.UCB Documentation/licenses/COPYING.LGPLv2.1 Documentation/licenses/COPYING.BSD-3
|
2012-11-13 02:06:01 +01:00
|
|
|
|
2011-07-27 11:49:46 +02:00
|
|
|
UTIL_LINUX_AUTORECONF = YES
|
2011-07-29 08:36:55 +02:00
|
|
|
UTIL_LINUX_INSTALL_STAGING = YES
|
2012-10-22 17:47:52 +02:00
|
|
|
UTIL_LINUX_DEPENDENCIES = host-pkgconf
|
2015-02-20 13:10:19 +01:00
|
|
|
# uClibc needs NTP_LEGACY for sys/timex.h -> ntp_gettime() support
|
|
|
|
# (used in logger.c), and the common default is N.
|
|
|
|
UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \
|
|
|
|
$(if $(BR2_TOOLCHAIN_USES_UCLIBC),ac_cv_header_sys_timex_h=no)
|
2014-09-27 21:32:44 +02:00
|
|
|
UTIL_LINUX_CONF_OPTS += \
|
2014-04-20 23:47:05 +02:00
|
|
|
--disable-rpath \
|
|
|
|
--disable-makeinstall-chown \
|
2014-09-08 17:20:52 +02:00
|
|
|
--without-python
|
2009-03-03 09:52:56 +01:00
|
|
|
|
2015-01-19 17:14:02 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_BASH),)
|
|
|
|
UTIL_LINUX_CONF_OPTS += \
|
|
|
|
--disable-bash-completion \
|
|
|
|
--with-bashcompletiondir=
|
|
|
|
endif
|
|
|
|
|
2012-01-31 20:40:05 +01:00
|
|
|
# We don't want the host-busybox dependency to be added automatically
|
2012-10-22 17:47:52 +02:00
|
|
|
HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
|
2012-01-31 20:40:05 +01:00
|
|
|
|
2014-09-14 22:48:31 +02:00
|
|
|
# We also don't want the host-python dependency
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_UTIL_LINUX_CONF_OPTS = --without-python
|
2014-09-14 22:48:31 +02:00
|
|
|
|
2011-07-22 16:53:12 +02:00
|
|
|
# If both util-linux and busybox are selected, make certain util-linux
|
|
|
|
# wins the fight over who gets to have their utils actually installed
|
|
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
|
|
|
UTIL_LINUX_DEPENDENCIES += busybox
|
2009-08-30 22:01:23 +02:00
|
|
|
endif
|
|
|
|
|
2010-08-10 19:15:26 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
2011-07-22 16:53:12 +02:00
|
|
|
UTIL_LINUX_DEPENDENCIES += ncurses
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
UTIL_LINUX_CONF_OPTS += --without-ncurses
|
2004-12-27 22:49:53 +01:00
|
|
|
endif
|
|
|
|
|
2012-11-01 15:35:55 +01:00
|
|
|
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
|
2012-09-16 14:57:49 +02:00
|
|
|
UTIL_LINUX_DEPENDENCIES += gettext
|
2014-09-27 21:32:38 +02:00
|
|
|
UTIL_LINUX_MAKE_OPTS += LIBS=-lintl
|
2011-08-09 16:15:22 +02:00
|
|
|
endif
|
2003-03-10 18:58:07 +01:00
|
|
|
|
2014-04-06 14:37:34 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
|
|
|
|
UTIL_LINUX_DEPENDENCIES += libcap-ng
|
|
|
|
endif
|
|
|
|
|
2013-03-07 13:46:37 +01:00
|
|
|
# Used by cramfs utils
|
|
|
|
UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_ZLIB),zlib)
|
2011-07-22 16:53:12 +02:00
|
|
|
|
2013-03-07 13:46:37 +01:00
|
|
|
# Used by login-utils
|
|
|
|
UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_LINUX_PAM),linux-pam)
|
|
|
|
|
|
|
|
# Disable/Enable utilities
|
2014-09-27 21:32:44 +02:00
|
|
|
UTIL_LINUX_CONF_OPTS += \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_AGETTY),--enable-agetty,--disable-agetty) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_ARCH),--enable-arch,--disable-arch) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_BFS),--enable-bfs,--disable-bfs) \
|
2014-04-08 19:45:08 +02:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH),--enable-chfn-chsh,--disable-chfn-chsh) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),--enable-cramfs,--disable-cramfs) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_DDATE),--enable-ddate,--disable-ddate) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_EJECT),--enable-eject,--disable-eject) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),--enable-fallocate,--disable-fallocate) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_FDFORMAT),--enable-fdformat,--disable-fdformat) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),--enable-fsck,--disable-fsck) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_HWCLOCK),--enable-hwclock,--disable-hwclock) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_KILL),--enable-kill,--disable-kill) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_LAST),--enable-last,--disable-last) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS),--enable-libsmartcols,--disable-libsmartcols) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-last --enable-login --enable-runuser --enable-su --enable-sulogin,--disable-last --disable-login --disable-runuser --disable-su --disable-sulogin) \
|
2014-04-08 19:45:08 +02:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_MESG),--enable-mesg,--disable-mesg) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_MINIX),--enable-minix,--disable-minix) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_MORE),--enable-more,--disable-more) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_MOUNT),--enable-mount,--disable-mount) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT),--enable-mountpoint,--disable-mountpoint) \
|
2014-04-08 19:45:08 +02:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_NEWGRP),--enable-newgrp,--disable-newgrp) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),--enable-nologin,--disable-nologin) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_NSENTER),--enable-nsenter,--disable-nsenter) \
|
2014-04-08 19:45:08 +02:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_PARTX),--enable-partx,--disable-partx) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT),--enable-pivot_root,--disable-pivot_root) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset,--disable-reset) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_SETPRIV),--enable-setpriv,--disable-setpriv) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_SETTERM),--enable-setterm,--disable-setterm) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_UL),--enable-ul,--disable-ul) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_UNSHARE),--enable-unshare,--disable-unshare) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_UTMPDUMP),--enable-utmpdump,--disable-utmpdump) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_UUIDD),--enable-uuidd,--disable-uuidd) \
|
2014-04-08 19:45:08 +02:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_VIPW),--enable-vipw,--disable-vipw) \
|
2013-03-07 13:46:37 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_WALL),--enable-wall,--disable-wall) \
|
2015-01-19 17:14:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_WDCTL),--enable-wdctl,--disable-wdctl) \
|
2015-02-20 13:10:19 +01:00
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write,--disable-write) \
|
|
|
|
$(if $(BR2_PACKAGE_UTIL_LINUX_ZRAMCTL),--enable-zramctl,--disable-zramctl)
|
2011-07-22 16:53:12 +02:00
|
|
|
|
2012-01-31 20:40:05 +01:00
|
|
|
# In the host version of util-linux, we so far only require libuuid,
|
2014-12-10 22:02:01 +01:00
|
|
|
# and none of the util-linux utilities, so we disable all of them, unless
|
|
|
|
# BR2_PACKAGE_HOST_UTIL_LINUX is set
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_UTIL_LINUX_CONF_OPTS += \
|
2012-01-31 20:40:05 +01:00
|
|
|
--enable-libuuid \
|
2014-09-24 23:08:51 +02:00
|
|
|
--disable-libblkid --disable-libmount \
|
2014-12-10 22:02:01 +01:00
|
|
|
--without-ncurses
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOST_UTIL_LINUX),y)
|
|
|
|
HOST_UTIL_LINUX_CONF_OPTS += --disable-makeinstall-chown
|
2015-01-31 21:28:31 +01:00
|
|
|
# disable more command because of ncurses dependency
|
|
|
|
HOST_UTIL_LINUX_CONF_OPTS += --disable-more
|
2014-12-10 22:02:01 +01:00
|
|
|
else
|
|
|
|
HOST_UTIL_LINUX_CONF_OPTS += --disable-all-programs
|
|
|
|
endif
|
2012-01-31 20:40:05 +01:00
|
|
|
|
2013-03-07 13:46:37 +01:00
|
|
|
# Avoid building the tools if they are disabled since we can't install on
|
|
|
|
# a per-directory basis.
|
|
|
|
ifeq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES),)
|
2014-10-21 21:32:36 +02:00
|
|
|
UTIL_LINUX_CONF_OPTS += --disable-all-programs
|
2013-03-07 13:46:37 +01:00
|
|
|
endif
|
|
|
|
|
2013-11-28 18:22:27 +01:00
|
|
|
# Install PAM configuration files
|
|
|
|
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y)
|
|
|
|
define UTIL_LINUX_INSTALL_PAMFILES
|
|
|
|
$(INSTALL) -m 0644 package/util-linux/login.pam \
|
|
|
|
$(TARGET_DIR)/etc/pam.d/login
|
|
|
|
$(INSTALL) -m 0644 package/util-linux/su.pam \
|
|
|
|
$(TARGET_DIR)/etc/pam.d/su
|
|
|
|
$(INSTALL) -m 0644 package/util-linux/su.pam \
|
|
|
|
$(TARGET_DIR)/etc/pam.d/su-l
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_INSTALL_PAMFILES
|
|
|
|
|
2013-12-02 11:49:26 +01:00
|
|
|
# Install agetty->getty symlink to avoid breakage when there's no busybox
|
|
|
|
ifeq ($(BR2_PACKAGE_UTIL_LINUX_AGETTY),y)
|
|
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),)
|
|
|
|
define UTIL_LINUX_GETTY_SYMLINK
|
|
|
|
ln -sf agetty $(TARGET_DIR)/sbin/getty
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_GETTY_SYMLINK
|
|
|
|
|
2014-11-30 23:31:36 +01:00
|
|
|
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_UTIL_LINUX_LIBUUID),yy)
|
|
|
|
define UTIL_LINUX_TWEAK_UUID_PC
|
|
|
|
$(SED) '/Libs\.private: .*/d' $(STAGING_DIR)/usr/lib/pkgconfig/uuid.pc
|
|
|
|
printf "Libs.private: -lintl\n" >>$(STAGING_DIR)/usr/lib/pkgconfig/uuid.pc
|
|
|
|
endef
|
|
|
|
UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_TWEAK_UUID_PC
|
|
|
|
endif
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2012-07-03 00:06:54 +02:00
|
|
|
$(eval $(host-autotools-package))
|
2011-08-12 09:45:50 +02:00
|
|
|
|
|
|
|
# MKINSTALLDIRS comes from tweaked m4/nls.m4, but autoreconf uses staging
|
|
|
|
# one, so it disappears
|
2014-09-27 21:32:41 +02:00
|
|
|
UTIL_LINUX_INSTALL_STAGING_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs
|
2014-09-27 21:32:40 +02:00
|
|
|
UTIL_LINUX_INSTALL_TARGET_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs
|
2014-09-27 21:32:39 +02:00
|
|
|
HOST_UTIL_LINUX_INSTALL_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs
|