This commit is contained in:
TriForceX
2021-03-13 22:13:38 -03:00
parent c77595adbd
commit b3ecc6e32d
7043 changed files with 119377 additions and 73694 deletions

View File

@@ -4,37 +4,47 @@
#
################################################################################
UTIL_LINUX_VERSION_MAJOR = 2.34
# When making changes to this file, please check if
# util-linux-libs/util-linux-libs.mk needs to be updated accordingly as well.
UTIL_LINUX_VERSION_MAJOR = 2.36
UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
# README.licensing claims that some files are GPL-2.0 only, but this is not true.
# Some files are GPL-3.0+ but only in tests. rfkill uses an ISC-style license.
UTIL_LINUX_LICENSE = GPL-2.0+, BSD-4-Clause, LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid) ISC (rfkill)
# README.licensing claims that some files are GPL-2.0 only, but this is not
# true. Some files are GPL-3.0+ but only in tests and optionally in hwclock
# (but we disable that option). rfkill uses an ISC-style license.
UTIL_LINUX_LICENSE = GPL-2.0+, BSD-4-Clause, LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid), ISC (rfkill)
UTIL_LINUX_LICENSE_FILES = README.licensing \
Documentation/licenses/COPYING.BSD-3-Clause \
Documentation/licenses/COPYING.BSD-4-Clause-UC \
Documentation/licenses/COPYING.GPL-2.0-or-later \
Documentation/licenses/COPYING.ISC \
Documentation/licenses/COPYING.LGPL-2.1-or-later
UTIL_LINUX_INSTALL_STAGING = YES
UTIL_LINUX_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
UTIL_LINUX_DEPENDENCIES = \
host-pkgconf \
$(if $(BR2_PACKAGE_UTIL_LINUX_LIBS),util-linux-libs) \
$(TARGET_NLS_DEPENDENCIES)
UTIL_LINUX_CONF_OPTS += \
--disable-rpath \
--disable-makeinstall-chown
UTIL_LINUX_LIBS = $(TARGET_NLS_LIBS)
# system depends on util-linux so we enable systemd support
# (which needs systemd to be installed)
UTIL_LINUX_CONF_OPTS += \
--without-systemd \
--with-systemdsystemunitdir=no
UTIL_LINUX_LINK_LIBS = $(TARGET_NLS_LIBS)
HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
# We also don't want the host-python dependency
HOST_UTIL_LINUX_CONF_OPTS = --without-python
HOST_UTIL_LINUX_CONF_OPTS = \
--without-systemd \
--with-systemdsystemunitdir=no \
--without-python
ifneq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES)$(BR2_PACKAGE_UTIL_LINUX_CRAMFS)$(BR2_PACKAGE_UTIL_LINUX_FSCK)$(BR2_PACKAGE_UTIL_LINUX_LOSETUP),)
UTIL_LINUX_SELINUX_MODULES = fstools
endif
# Prevent the installation from attempting to move shared libraries from
# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are
@@ -43,6 +53,20 @@ ifeq ($(BR2_ROOTFS_MERGED_USR),y)
UTIL_LINUX_CONF_OPTS += --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib
endif
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
UTIL_LINUX_CONF_OPTS += --with-systemd --with-systemdsystemunitdir=/usr/lib/systemd/system
UTIL_LINUX_DEPENDENCIES += systemd
else
UTIL_LINUX_CONF_OPTS += --without-systemd --with-systemdsystemunitdir=no
endif
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
UTIL_LINUX_CONF_OPTS += --with-udev
UTIL_LINUX_DEPENDENCIES += udev
else
UTIL_LINUX_CONF_OPTS += --without-udev
endif
ifeq ($(BR2_PACKAGE_NCURSES),y)
UTIL_LINUX_DEPENDENCIES += ncurses
ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
@@ -61,30 +85,29 @@ endif
UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses
endif
ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
UTIL_LINUX_DEPENDENCIES += libcap-ng
endif
# Unfortunately, the util-linux does LIBS="" at the end of its
# configure script. So we have to pass the proper LIBS value when
# calling the configure script to make configure tests pass properly,
# and then pass it again at build time.
UTIL_LINUX_CONF_ENV += LIBS="$(UTIL_LINUX_LIBS)"
UTIL_LINUX_MAKE_OPTS += LIBS="$(UTIL_LINUX_LIBS)"
UTIL_LINUX_CONF_ENV += LIBS="$(UTIL_LINUX_LINK_LIBS)"
UTIL_LINUX_MAKE_OPTS += LIBS="$(UTIL_LINUX_LINK_LIBS)"
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
UTIL_LINUX_DEPENDENCIES += libselinux
UTIL_LINUX_CONF_OPTS += --with-selinux
else
UTIL_LINUX_CONF_OPTS += --without-selinux
define UTIL_LINUX_SELINUX_PAMFILES_TWEAK
$(foreach f,su su-l,
$(SED) 's/^# \(.*pam_selinux.so.*\)$$/\1/' \
$(SED) '/^.*pam_selinux.so.*$$/d' \
$(TARGET_DIR)/etc/pam.d/$(f)
)
endef
else
UTIL_LINUX_CONF_OPTS += --without-selinux
endif
# Used by setpriv
UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBCAP_NG),libcap-ng)
# Used by cramfs utils
UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_ZLIB),zlib)
@@ -108,7 +131,7 @@ UTIL_LINUX_CONF_OPTS += \
$(if $(BR2_PACKAGE_UTIL_LINUX_FDFORMAT),--enable-fdformat,--disable-fdformat) \
$(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),--enable-fsck,--disable-fsck) \
$(if $(BR2_PACKAGE_UTIL_LINUX_HARDLINK),--enable-hardlink,--disable-hardlink) \
$(if $(BR2_PACKAGE_UTIL_LINUX_HWCLOCK),--enable-hwclock,--disable-hwclock) \
$(if $(BR2_PACKAGE_UTIL_LINUX_HWCLOCK),--enable-hwclock --disable-hwclock-gplv3,--disable-hwclock) \
$(if $(BR2_PACKAGE_UTIL_LINUX_IPCRM),--enable-ipcrm,--disable-ipcrm) \
$(if $(BR2_PACKAGE_UTIL_LINUX_IPCS),--enable-ipcs,--disable-ipcs) \
$(if $(BR2_PACKAGE_UTIL_LINUX_KILL),--enable-kill,--disable-kill) \
@@ -153,6 +176,7 @@ UTIL_LINUX_CONF_OPTS += \
$(if $(BR2_PACKAGE_UTIL_LINUX_VIPW),--enable-vipw,--disable-vipw) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WALL),--enable-wall,--disable-wall) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WDCTL),--enable-wdctl,--disable-wdctl) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WIPEFS),--enable-wipefs,--disable-wipefs) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write,--disable-write) \
$(if $(BR2_PACKAGE_UTIL_LINUX_ZRAMCTL),--enable-zramctl,--disable-zramctl)
@@ -220,7 +244,7 @@ endif
ifeq ($(BR2_PACKAGE_READLINE),y)
UTIL_LINUX_CONF_OPTS += --with-readline
UTIL_LINUX_LIBS += $(if $(BR2_STATIC_LIBS),-lcurses)
UTIL_LINUX_LINK_LIBS += $(if $(BR2_STATIC_LIBS),-lcurses)
UTIL_LINUX_DEPENDENCIES += readline
else
UTIL_LINUX_CONF_OPTS += --without-readline
@@ -236,9 +260,9 @@ endif
# Install PAM configuration files
ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU)$(BR2_PACKAGE_LINUX_PAM),yy)
define UTIL_LINUX_INSTALL_PAMFILES
$(INSTALL) -m 0644 package/util-linux/su.pam \
$(INSTALL) -D -m 0644 package/util-linux/su.pam \
$(TARGET_DIR)/etc/pam.d/su
$(INSTALL) -m 0644 package/util-linux/su.pam \
$(INSTALL) -D -m 0644 package/util-linux/su.pam \
$(TARGET_DIR)/etc/pam.d/su-l
$(UTIL_LINUX_SELINUX_PAMFILES_TWEAK)
endef
@@ -258,3 +282,7 @@ UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_GETTY_SYMLINK
$(eval $(autotools-package))
$(eval $(host-autotools-package))
# Must be included after the autotools-package call, to make sure all variables
# are available
include package/util-linux/util-linux-libs/util-linux-libs.mk