2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2005-02-11 21:42:52 +01:00
|
|
|
#
|
|
|
|
# e2fsprogs
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2009-10-29 21:35:33 +01:00
|
|
|
|
2017-02-11 23:04:24 +01:00
|
|
|
E2FSPROGS_VERSION = 1.43.4
|
2015-03-03 09:41:11 +01:00
|
|
|
E2FSPROGS_SOURCE = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz
|
2014-09-17 16:20:09 +02:00
|
|
|
E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION)
|
2017-04-22 13:59:47 +02:00
|
|
|
E2FSPROGS_LICENSE = GPL-2.0, MIT-like with advertising clause (libss and libet)
|
|
|
|
E2FSPROGS_LICENSE_FILES = NOTICE lib/ss/mit-sipb-copyright.h lib/et/internal.h
|
2013-11-28 18:53:57 +01:00
|
|
|
E2FSPROGS_INSTALL_STAGING = YES
|
2017-04-22 13:59:48 +02:00
|
|
|
|
|
|
|
# Use libblkid and libuuid from util-linux for host and target packages.
|
|
|
|
# This prevents overriding them with e2fsprogs' ones, which may cause
|
|
|
|
# problems for other packages.
|
2016-05-18 21:08:23 +02:00
|
|
|
E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux
|
2017-04-22 13:59:48 +02:00
|
|
|
HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf host-util-linux
|
2016-06-09 16:13:13 +02:00
|
|
|
|
2015-07-29 20:47:38 +02:00
|
|
|
# e4defrag doesn't build on older systems like RHEL5.x, and we don't
|
|
|
|
# need it on the host anyway.
|
2016-05-18 21:08:23 +02:00
|
|
|
# Disable fuse2fs as well to avoid carrying over deps, and it's unused
|
2017-04-22 13:59:48 +02:00
|
|
|
HOST_E2FSPROGS_CONF_OPTS = \
|
|
|
|
--disable-defrag \
|
|
|
|
--disable-fuse2fs \
|
|
|
|
--disable-libblkid \
|
|
|
|
--disable-libuuid
|
2015-07-29 20:47:38 +02:00
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
E2FSPROGS_CONF_OPTS = \
|
2014-12-03 22:41:29 +01:00
|
|
|
$(if $(BR2_STATIC_LIBS),,--enable-elf-shlibs) \
|
2011-07-28 15:04:09 +02:00
|
|
|
$(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),,--disable-debugfs) \
|
|
|
|
$(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),,--disable-imager) \
|
2012-02-28 12:22:33 +01:00
|
|
|
$(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),,--disable-defrag) \
|
2011-07-28 15:04:09 +02:00
|
|
|
$(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),,--disable-resizer) \
|
2011-09-06 09:12:51 +02:00
|
|
|
--disable-uuidd \
|
2012-02-28 12:22:33 +01:00
|
|
|
--disable-libblkid \
|
2011-07-29 08:49:48 +02:00
|
|
|
--disable-libuuid \
|
2009-10-29 21:35:33 +01:00
|
|
|
--enable-fsck \
|
|
|
|
--disable-e2initrd-helper \
|
2014-06-04 01:15:56 +02:00
|
|
|
--disable-testio-debug \
|
|
|
|
--disable-rpath
|
2009-10-29 21:35:33 +01:00
|
|
|
|
2016-05-18 21:08:23 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_E2FSPROGS_FUSE2FS),y)
|
|
|
|
E2FSPROGS_CONF_OPTS += --enable-fuse2fs
|
|
|
|
E2FSPROGS_DEPENDENCIES += libfuse
|
|
|
|
else
|
|
|
|
E2FSPROGS_CONF_OPTS += --disable-fuse2fs
|
|
|
|
endif
|
|
|
|
|
2014-02-20 22:59:37 +01:00
|
|
|
ifeq ($(BR2_nios2),y)
|
|
|
|
E2FSPROGS_CONF_ENV += ac_cv_func_fallocate=no
|
|
|
|
endif
|
|
|
|
|
2016-06-03 14:19:50 +02:00
|
|
|
# Some programs are built for the host, but use definitions guessed by
|
|
|
|
# the configure script (i.e with the cross-compiler). Help them by
|
|
|
|
# saying that <sys/stat.h> is available on the host, which is needed
|
|
|
|
# for util/subst.c to build properly.
|
|
|
|
E2FSPROGS_CONF_ENV += BUILD_CFLAGS="-DHAVE_SYS_STAT_H"
|
|
|
|
|
2016-11-17 00:26:01 +01:00
|
|
|
# Disable use of the host magic.h, as on older hosts (e.g. RHEL 5)
|
|
|
|
# it doesn't provide definitions expected by e2fsprogs support lib.
|
|
|
|
HOST_E2FSPROGS_CONF_ENV += \
|
|
|
|
ac_cv_header_magic_h=no \
|
|
|
|
ac_cv_lib_magic_magic_file=no
|
|
|
|
|
2014-11-19 15:04:50 +01:00
|
|
|
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
|
|
|
|
# util-linux libuuid pulls in libintl if needed, so ensure we also
|
|
|
|
# link against it, otherwise static linking fails
|
|
|
|
E2FSPROGS_CONF_ENV += LIBS=-lintl
|
|
|
|
endif
|
|
|
|
|
2016-11-18 16:24:26 +01:00
|
|
|
E2FSPROGS_MAKE_OPTS = LDCONFIG=true
|
2016-12-12 10:19:38 +01:00
|
|
|
E2FSPROGS_INSTALL_STAGING_OPTS = \
|
|
|
|
DESTDIR=$(STAGING_DIR) \
|
|
|
|
LDCONFIG=true \
|
|
|
|
install-libs
|
|
|
|
E2FSPROGS_INSTALL_TARGET_OPTS = \
|
|
|
|
DESTDIR=$(TARGET_DIR) \
|
|
|
|
LDCONFIG=true \
|
|
|
|
install
|
2009-10-29 21:35:33 +01:00
|
|
|
|
2010-03-02 22:33:55 +01:00
|
|
|
define HOST_E2FSPROGS_INSTALL_CMDS
|
2014-10-23 10:43:37 +02:00
|
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs
|
2010-03-02 22:33:55 +01:00
|
|
|
endef
|
|
|
|
|
2009-10-29 21:35:33 +01:00
|
|
|
# binaries to keep or remove
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS) += usr/sbin/badblocks
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_CHATTR) += usr/bin/chattr
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_DUMPE2FS) += usr/sbin/dumpe2fs
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FREEFRAG) += usr/sbin/e2freefrag
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FSCK) += usr/sbin/e2fsck
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2LABEL) += usr/sbin/e2label
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2UNDO) += usr/sbin/e2undo
|
2012-01-26 17:51:29 +01:00
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG) += usr/sbin/e4defrag
|
2009-10-29 21:35:33 +01:00
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FILEFRAG) += usr/sbin/filefrag
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FSCK) += usr/sbin/fsck
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LOGSAVE) += usr/sbin/logsave
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LSATTR) += usr/bin/lsattr
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKE2FS) += usr/sbin/mke2fs
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND) += usr/sbin/mklost+found
|
|
|
|
|
|
|
|
# files to remove
|
|
|
|
E2FSPROGS_TXTTARGETS_ = \
|
|
|
|
usr/sbin/mkfs.ext[234] \
|
|
|
|
usr/sbin/mkfs.ext4dev \
|
|
|
|
usr/sbin/fsck.ext[234] \
|
|
|
|
usr/sbin/fsck.ext4dev \
|
|
|
|
usr/sbin/tune2fs
|
|
|
|
|
2010-09-01 22:52:48 +02:00
|
|
|
define E2FSPROGS_TARGET_REMOVE_UNNEEDED
|
2009-10-29 21:35:33 +01:00
|
|
|
rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_BINTARGETS_))
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_TXTTARGETS_))
|
2010-09-01 22:52:48 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_REMOVE_UNNEEDED
|
|
|
|
|
|
|
|
define E2FSPROGS_TARGET_MKE2FS_SYMLINKS
|
|
|
|
ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext2
|
|
|
|
ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext3
|
|
|
|
ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4
|
|
|
|
ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4dev
|
|
|
|
endef
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS),y)
|
2010-09-01 22:52:48 +02:00
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_MKE2FS_SYMLINKS
|
2008-02-25 00:02:56 +01:00
|
|
|
endif
|
2010-09-01 22:52:48 +02:00
|
|
|
|
|
|
|
define E2FSPROGS_TARGET_E2FSCK_SYMLINKS
|
|
|
|
ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext2
|
|
|
|
ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext3
|
|
|
|
ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4
|
|
|
|
ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4dev
|
|
|
|
endef
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y)
|
2010-09-01 22:52:48 +02:00
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_E2FSCK_SYMLINKS
|
2008-02-25 00:02:56 +01:00
|
|
|
endif
|
2010-09-01 22:52:48 +02:00
|
|
|
|
2015-10-28 22:36:26 +01:00
|
|
|
# If BusyBox is included, its configuration may supply its own variant
|
|
|
|
# of ext2-related tools. Since Buildroot desires having full blown
|
|
|
|
# variants take precedence (in this case, e2fsprogs), we want to remove
|
|
|
|
# BusyBox's variant of e2fsprogs provided binaries. e2fsprogs targets
|
|
|
|
# /usr/{bin,sbin} where BusyBox targets /{bin,sbin}. We will attempt to
|
|
|
|
# remove BusyBox-generated ext2-related tools from /{bin,sbin}. We need
|
|
|
|
# to do this in the pre-install stage to ensure we do not accidentally
|
|
|
|
# remove e2fsprogs's binaries in usr-merged environments (ie. if they
|
|
|
|
# are removed, they would be re-installed in this package's install
|
|
|
|
# stage).
|
2015-07-08 23:51:00 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
|
|
|
E2FSPROGS_DEPENDENCIES += busybox
|
|
|
|
|
|
|
|
define E2FSPROGS_REMOVE_BUSYBOX_APPLETS
|
2015-07-22 18:29:16 +02:00
|
|
|
$(RM) -f $(TARGET_DIR)/bin/chattr
|
|
|
|
$(RM) -f $(TARGET_DIR)/bin/lsattr
|
|
|
|
$(RM) -f $(TARGET_DIR)/sbin/fsck
|
2015-07-08 23:51:00 +02:00
|
|
|
$(RM) -f $(TARGET_DIR)/sbin/tune2fs
|
|
|
|
$(RM) -f $(TARGET_DIR)/sbin/e2label
|
|
|
|
endef
|
2015-10-28 22:36:26 +01:00
|
|
|
E2FSPROGS_PRE_INSTALL_TARGET_HOOKS += E2FSPROGS_REMOVE_BUSYBOX_APPLETS
|
2015-07-08 23:51:00 +02:00
|
|
|
endif
|
|
|
|
|
2010-09-01 22:52:48 +02:00
|
|
|
define E2FSPROGS_TARGET_TUNE2FS_SYMLINK
|
|
|
|
ln -sf e2label $(TARGET_DIR)/usr/sbin/tune2fs
|
|
|
|
endef
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS),y)
|
2010-09-01 22:52:48 +02:00
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_TUNE2FS_SYMLINK
|
2008-02-25 00:02:56 +01:00
|
|
|
endif
|
2010-09-01 22:52:48 +02:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2012-07-03 00:06:54 +02:00
|
|
|
$(eval $(host-autotools-package))
|