Skip to contentSkip to conversation

e2fsprogs: refactor to fix conflicts with busybox and util-linux

PATCH Superseded Arnout Vandecappelle (Essensium/Mind) 2 participants 26 messages Apr 22, 2017

v8 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v8 cover e2fsprogs: refactor to fix conflicts with busybox and util-linux

This is v8 of the large patch sent previously by Carlos Santos, split
up into smaller bits for each individual change.

There are also a few things I modified myself - each individual patch
contains a comment that explains what I changed. For completeness, the diff between the end of this series and the v7 previously posted by Carlos is below.

I have not tested this series as extensively as Carlos, but as you can
see in the diff below there is nothing major or risky that I changed.

Regards,
Arnout

---
Carlos Santos (12):
e2fsprogs: change upstream URL sf.net -> sourceforge.net
e2fsprogs: add missing arch depends to comment
e2fsprogs: change into menuconfig
e2fsprogs: remove uuidgen support
e2fsprogs: use libblkid and libuuid from util-linux for host
e2fsprogs: let it create symlinks
e2fsprogs: refactor to fix conflicts with busybox and util-linux
e2fsprogs: add help text for all config options
e2fsprogs: disable unneeded features for host
e2fsprogs: add explicit --enable/--disable configure options
e2fsprogs: avoid conflict with util-linux fsck wrapper
e2fsprogs: only add -lintl for static builds

 package/e2fsprogs/Config.in      |  84 ++++++++----------------
 package/e2fsprogs/Config.in.host |   1 +
 package/e2fsprogs/e2fsprogs.mk   | 134 +++++++++++----------------------------
 3 files changed, 63 insertions(+), 156 deletions(-)

---

package/e2fsprogs/Config.in +2 -5
index 03a17c9dc6..819d82760c 100644
@@ -3,6 +3,7 @@ menuconfig BR2_PACKAGE_E2FSPROGS
 	depends on BR2_USE_MMU # util-linux/libblkid
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
 	help
 	  The EXT2 file system utilities.
 
@@ -16,7 +17,7 @@ menuconfig BR2_PACKAGE_E2FSPROGS
 
 	  Other programs can be selected individually.
 
-	  http://e2fsprogs.sourceforge.net/
+	  http://e2fsprogs.sourceforge.net
 
 if BR2_PACKAGE_E2FSPROGS
 
@@ -49,9 +50,6 @@ config BR2_PACKAGE_E2FSPROGS_FSCK
 	  Check and repair a Linux file system. This is a wrapper around
 	  the filesystem-specific fsck tools.
 
-comment "the fsck from util-linux has preference over this one"
-	depends on BR2_PACKAGE_UTIL_LINUX_FSCK
-
 config BR2_PACKAGE_E2FSPROGS_FUSE2FS
 	bool "fuse2fs"
 	depends on !BR2_STATIC_LIBS # libfuse
@@ -65,7 +63,6 @@ comment "fuse2fs needs a toolchain w/ threads, dynamic library"
 
 config BR2_PACKAGE_E2FSPROGS_RESIZE2FS
 	bool "resize2fs"
-	default y
 	help
 	  ext2/ext3/ext4 file system resizer
 
package/e2fsprogs/e2fsprogs.mk +17 -20
index 2a736838a9..84af7abab8 100644
@@ -7,8 +7,8 @@
 E2FSPROGS_VERSION = 1.43.4
 E2FSPROGS_SOURCE = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz
 E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION)
-E2FSPROGS_LICENSE = GPL-2.0, BSD-3-Clause (libuuid), MIT-like with advertising clause (libss and libet)
-E2FSPROGS_LICENSE_FILES = NOTICE lib/uuid/COPYING lib/ss/mit-sipb-copyright.h lib/et/internal.h
+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
 E2FSPROGS_INSTALL_STAGING = YES
 
 # Use libblkid and libuuid from util-linux for host and target packages.
@@ -23,46 +23,43 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 E2FSPROGS_DEPENDENCIES += busybox
 endif
 
-ifeq ($(BR2_PACKAGE_E2FSPROGS_FUSE2FS),y)
-E2FSPROGS_DEPENDENCIES += libfuse
-endif
-
 # e4defrag doesn't build on older systems like RHEL5.x, and we don't
 # need it on the host anyway.
 # Disable fuse2fs as well to avoid carrying over deps, and it's unused
-# Set the binary directories to "$(HOST_DIR)/bin" and "$(HOST_DIR)/sbin"
-# to match the target paths (the $(HOST_DIR) prefix is required because
-# passing DESTDIR=$(HOST_DIR) in the install command does not work).
 HOST_E2FSPROGS_CONF_OPTS = \
 	--disable-defrag \
+	--disable-e2initrd-helper \
 	--disable-fuse2fs \
-	--bindir=$(HOST_DIR)/bin \
-	--sbindir=$(HOST_DIR)/sbin \
-	--enable-symlink-install \
 	--disable-libblkid \
 	--disable-libuuid \
-	--disable-e2initrd-helper \
-	--disable-testio-debug \
-	--disable-rpath
+	--enable-symlink-install \
+	--disable-testio-debug
 
 # Set the binary directories to "/bin" and "/sbin" to override programs
 # installed by busybox.
 E2FSPROGS_CONF_OPTS = \
+	--bindir=/bin \
+	--sbindir=/sbin \
 	$(if $(BR2_STATIC_LIBS),--disable-elf-shlibs,--enable-elf-shlibs) \
 	$(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),--enable-debugfs,--disable-debugfs) \
 	$(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),--enable-imager,--disable-imager) \
 	$(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),--enable-defrag,--disable-defrag) \
 	$(if $(BR2_PACKAGE_E2FSPROGS_FSCK),--enable-fsck,--disable-fsck) \
-	$(if $(BR2_PACKAGE_E2FSPROGS_FUSE2FS),--enable-fuse2fs,--disable-fuse2fs) \
 	$(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),--enable-resizer,--disable-resizer) \
-	--bindir=/bin \
-	--sbindir=/sbin \
-	--enable-symlink-install \
+	--disable-uuidd \
 	--disable-libblkid \
 	--disable-libuuid \
 	--disable-e2initrd-helper \
 	--disable-testio-debug \
-	--disable-rpath
+	--disable-rpath \
+	--enable-symlink-install
+
+ifeq ($(BR2_PACKAGE_E2FSPROGS_FUSE2FS),y)
+E2FSPROGS_CONF_OPTS += --enable-fuse2fs
+E2FSPROGS_DEPENDENCIES += libfuse
+else
+E2FSPROGS_CONF_OPTS += --disable-fuse2fs
+endif
 
 ifeq ($(BR2_nios2),y)
 E2FSPROGS_CONF_ENV += ac_cv_func_fallocate=no
#1 lore raw

PATCH v8 1/12 e2fsprogs: change upstream URL sf.net -> sourceforge.net

From: Carlos Santos <[email protected]>

sf.net redirects to sourceforge.net, so directly use that as upstream URL. Config.in.host already uses that URL.

---
 package/e2fsprogs/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/e2fsprogs/Config.in +1 -1
index d1914a9953..da6aacf2fd 100644
@@ -7,7 +7,7 @@ config BR2_PACKAGE_E2FSPROGS
 	help
 	  The EXT2 file system utilities.
 
-	  http://e2fsprogs.sf.net
+	  http://e2fsprogs.sourceforge.net
 
 if BR2_PACKAGE_E2FSPROGS
 
Signature · 1 line
2.11.0
#2 lore raw

PATCH v8 1/12 e2fsprogs: change upstream URL sf.net -> sourceforge.net

Hello,

Quoted 11 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

sf.net redirects to sourceforge.net, so directly use that as upstream URL. Config.in.host already uses that URL.

---
 package/e2fsprogs/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v8 2/12 e2fsprogs: add missing arch depends to comment

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

---
 package/e2fsprogs/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/e2fsprogs/Config.in +1 -0
index da6aacf2fd..c83f84530d 100644
@@ -51,6 +51,7 @@ config BR2_PACKAGE_E2FSPROGS_E4DEFRAG
 	depends on !BR2_TOOLCHAIN_USES_UCLIBC # sync_file_range not impl
 
 comment "e4defrag needs a glibc or musl toolchain"
+	depends on !BR2_nios2
 	depends on BR2_TOOLCHAIN_USES_UCLIBC
 
 config BR2_PACKAGE_E2FSPROGS_FILEFRAG
Signature · 1 line
2.11.0
#4 lore raw

PATCH v8 2/12 e2fsprogs: add missing arch depends to comment

Hello,

Quoted 7 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

---
 package/e2fsprogs/Config.in | 1 +
 1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH v8 3/12 e2fsprogs: change into menuconfig

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

We decided some time ago that config entries with 5 or more suboptions should be turned into a menuconfig. e2fsprogs has many more than that.

---
 package/e2fsprogs/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/e2fsprogs/Config.in +1 -1
index c83f84530d..055ad5067f 100644
@@ -1,4 +1,4 @@
-config BR2_PACKAGE_E2FSPROGS
+menuconfig BR2_PACKAGE_E2FSPROGS
 	bool "e2fsprogs"
 	depends on BR2_USE_MMU # util-linux/libblkid
 	select BR2_PACKAGE_UTIL_LINUX
Signature · 1 line
2.11.0
#6 lore raw

PATCH v8 3/12 e2fsprogs: change into menuconfig

Hello,

Quoted 10 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

We decided some time ago that config entries with 5 or more suboptions should be turned into a menuconfig. e2fsprogs has many more than that.

---
 package/e2fsprogs/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH v8 4/12 e2fsprogs: remove uuidgen support

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

In fact, uuidgen was never built because we pass --disable-libuuid. So the option was a NOP.

Remove the license info for libuuid.

[Arnout:
- do not remove --disable-uuidd - even though that is implied by --disable-libuuid, it's better to be explicit about it;
- remove license info of libuuid]

---
 package/e2fsprogs/Config.in    | 7 +++----
 package/e2fsprogs/e2fsprogs.mk | 5 ++---
 2 files changed, 5 insertions(+), 7 deletions(-)
package/e2fsprogs/Config.in +3 -4
index 055ad5067f..79b77eac4c 100644
@@ -7,6 +7,9 @@ menuconfig BR2_PACKAGE_E2FSPROGS
 	help
 	  The EXT2 file system utilities.
 
+	  The uuid utilities (uuidd, uuidgen) are not built. Use the
+	  ones from util-linux, instead.
+
 	  http://e2fsprogs.sourceforge.net
 
 if BR2_PACKAGE_E2FSPROGS
@@ -95,8 +98,4 @@ config BR2_PACKAGE_E2FSPROGS_TUNE2FS
 	default y
 	select BR2_PACKAGE_E2FSPROGS_E2LABEL
 
-config BR2_PACKAGE_E2FSPROGS_UUIDGEN
-	bool "uuidgen"
-	default y
-
 endif
package/e2fsprogs/e2fsprogs.mk +2 -3
index 3f235c5372..896f01414d 100644
@@ -7,8 +7,8 @@
 E2FSPROGS_VERSION = 1.43.4
 E2FSPROGS_SOURCE = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz
 E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION)
-E2FSPROGS_LICENSE = GPL-2.0, BSD-3-Clause (libuuid), MIT-like with advertising clause (libss and libet)
-E2FSPROGS_LICENSE_FILES = NOTICE lib/uuid/COPYING lib/ss/mit-sipb-copyright.h lib/et/internal.h
+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
 E2FSPROGS_INSTALL_STAGING = YES
 E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux
 # we don't have a host-util-linux
@@ -91,7 +91,6 @@ 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
-E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UUIDGEN) += usr/bin/uuidgen
 
 # files to remove
 E2FSPROGS_TXTTARGETS_ = \
Signature · 1 line
2.11.0
#8 lore raw

PATCH v8 4/12 e2fsprogs: remove uuidgen support

Hello,

Quoted 12 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

In fact, uuidgen was never built because we pass --disable-libuuid. So the option was a NOP.

Remove the license info for libuuid.

[Arnout:
- do not remove --disable-uuidd - even though that is implied by --disable-libuuid, it's better to be explicit about it;
- remove license info of libuuid]

Quoted 5 lines
---
 package/e2fsprogs/Config.in    | 7 +++----
 package/e2fsprogs/e2fsprogs.mk | 5 ++---
 2 files changed, 5 insertions(+), 7 deletions(-)

Applied to master, thanks. I suppose the logic for not having a Config.in.legacy entry is that the tool had never been installed anyway, so nobody could have been relying on this option to install uuidgen. Am I right?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH v8 4/12 e2fsprogs: remove uuidgen support

Quoted 22 lines · Thomas Petazzoni

Hello,

Quoted 12 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

In fact, uuidgen was never built because we pass --disable-libuuid. So the option was a NOP.

Remove the license info for libuuid.

[Arnout:
- do not remove --disable-uuidd - even though that is implied by --disable-libuuid, it's better to be explicit about it;
- remove license info of libuuid]

Quoted 5 lines
---
 package/e2fsprogs/Config.in    | 7 +++----
 package/e2fsprogs/e2fsprogs.mk | 5 ++---
 2 files changed, 5 insertions(+), 7 deletions(-)
Quoted 4 lines

Applied to master, thanks. I suppose the logic for not having a Config.in.legacy entry is that the tool had never been installed anyway, so nobody could have been relying on this option to install uuidgen. Am I right?

No, I just forgot :-) But indeed, the option was dysfunctional since commit
044edd063 back in 2011, so no need for legacy handling.

Regards,
Arnout

Quoted 5 lines

Best regards,

Thomas

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#10 lore raw

PATCH v8 5/12 e2fsprogs: use libblkid and libuuid from util-linux for host

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

We have a host-util-linux, so we can use it to provide libblkid and libuuid. This makes it consistent with the target package.

---
 package/e2fsprogs/Config.in.host |  1 +
 package/e2fsprogs/e2fsprogs.mk   | 13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
package/e2fsprogs/Config.in.host +1 -0
index de9148e31d..7591bbcb7e 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_HOST_E2FSPROGS
 	bool "host e2fsprogs"
+	select BR2_PACKAGE_HOST_UTIL_LINUX
 	help
 	  The EXT2/3/4 file system utilities.
 
package/e2fsprogs/e2fsprogs.mk +10 -3
index 896f01414d..5231a97f9c 100644
@@ -10,14 +10,21 @@ E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2F
 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
 E2FSPROGS_INSTALL_STAGING = YES
+
+# 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.
 E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux
-# we don't have a host-util-linux
-HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf
+HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf host-util-linux
 
 # e4defrag doesn't build on older systems like RHEL5.x, and we don't
 # need it on the host anyway.
 # Disable fuse2fs as well to avoid carrying over deps, and it's unused
-HOST_E2FSPROGS_CONF_OPTS += --disable-defrag --disable-fuse2fs
+HOST_E2FSPROGS_CONF_OPTS = \
+	--disable-defrag \
+	--disable-fuse2fs \
+	--disable-libblkid \
+	--disable-libuuid
 
 E2FSPROGS_CONF_OPTS = \
 	$(if $(BR2_STATIC_LIBS),,--enable-elf-shlibs) \
Signature · 1 line
2.11.0
#11 lore raw

PATCH v8 5/12 e2fsprogs: use libblkid and libuuid from util-linux for host

Hello,

Quoted 11 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

We have a host-util-linux, so we can use it to provide libblkid and libuuid. This makes it consistent with the target package.

---
 package/e2fsprogs/Config.in.host |  1 +
 package/e2fsprogs/e2fsprogs.mk   | 13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#12 lore raw

PATCH v8 6/12 e2fsprogs: let it create symlinks

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

We have post-install hooks to create the symlinks mkfs.ext2 -> mke2fs etc. However, the e2fsprogs build system creates those symlinks itself. So just rely on that.

fsck.ext4dev and mkfs.ext4dev were dropped in version 1.43.4.

[Arnout: keep configure options more or less alphabetical]
---
 package/e2fsprogs/e2fsprogs.mk | 45 ++++--------------------------------------
 1 file changed, 4 insertions(+), 41 deletions(-)
package/e2fsprogs/e2fsprogs.mk +4 -41
index 5231a97f9c..d9efb00a2a 100644
@@ -24,7 +24,8 @@ HOST_E2FSPROGS_CONF_OPTS = \
 	--disable-defrag \
 	--disable-fuse2fs \
 	--disable-libblkid \
-	--disable-libuuid
+	--disable-libuuid \
+	--enable-symlink-install
 
 E2FSPROGS_CONF_OPTS = \
 	$(if $(BR2_STATIC_LIBS),,--enable-elf-shlibs) \
@@ -38,7 +39,8 @@ E2FSPROGS_CONF_OPTS = \
 	--enable-fsck \
 	--disable-e2initrd-helper \
 	--disable-testio-debug \
-	--disable-rpath
+	--disable-rpath \
+	--enable-symlink-install
 
 ifeq ($(BR2_PACKAGE_E2FSPROGS_FUSE2FS),y)
 E2FSPROGS_CONF_OPTS += --enable-fuse2fs
@@ -99,43 +101,12 @@ 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
-
 define E2FSPROGS_TARGET_REMOVE_UNNEEDED
 	rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_BINTARGETS_))
-	rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_TXTTARGETS_))
 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
-
-ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS),y)
-E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_MKE2FS_SYMLINKS
-endif
-
-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
-
-ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y)
-E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_E2FSCK_SYMLINKS
-endif
-
 # 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
@@ -159,13 +130,5 @@ endef
 E2FSPROGS_PRE_INSTALL_TARGET_HOOKS += E2FSPROGS_REMOVE_BUSYBOX_APPLETS
 endif
 
-define E2FSPROGS_TARGET_TUNE2FS_SYMLINK
-	ln -sf e2label $(TARGET_DIR)/usr/sbin/tune2fs
-endef
-
-ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS),y)
-E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_TUNE2FS_SYMLINK
-endif
-
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
Signature · 1 line
2.11.0
#13 lore raw

PATCH v8 6/12 e2fsprogs: let it create symlinks

Hello,

Quoted 11 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

We have post-install hooks to create the symlinks mkfs.ext2 -> mke2fs etc. However, the e2fsprogs build system creates those symlinks itself. So just rely on that.

fsck.ext4dev and mkfs.ext4dev were dropped in version 1.43.4.

[Arnout: keep configure options more or less alphabetical]

This would definitely be a very very nice cleanup, but it doesn't seem to work. I've tried to build the following configuration:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.02-756-gae15148.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_8=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_E2FSPROGS=y
# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set
# BR2_PACKAGE_E2FSPROGS_CHATTR is not set
# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set
# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set
# BR2_PACKAGE_E2FSPROGS_E2FSCK is not set
# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set
# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set
# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set
# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set
# BR2_PACKAGE_E2FSPROGS_LSATTR is not set
# BR2_PACKAGE_E2FSPROGS_MKE2FS is not set
# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set
# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set
# BR2_TARGET_ROOTFS_TAR is not set

and I get numerous broken symbolic links:

thomas at skate:~/projets/buildroot (master)$ ls -l output/target/usr/sbin/ total 116
-rwxr-xr-x 1 thomas thomas 13976 avril 22 14:38 e4crypt -rwxr-xr-x 1 thomas thomas 18180 avril 22 14:38 fsck

lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 fsck.ext2 -> e2fsck
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 fsck.ext3 -> e2fsck
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 fsck.ext4 -> e2fsck
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 mkfs.ext2 -> mke2fs
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 mkfs.ext3 -> mke2fs
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 mkfs.ext4 -> mke2fs

-rwxr-xr-x 1 thomas thomas 80996 avril 22 14:38 tune2fs

So basically: all the symbolic links are broken. It raises a few questions:

- What is the difference between the fsck option and the e2fsck option?

- Why is this creating the symbolic links even for programs not installed (e2fsck and mke2fs in our case) ?

- Why is tune2fs built/installed even if it wasn't enabled in my configuration?

- Why is e4crypt built/installed?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#14 lore raw

PATCH v8 6/12 e2fsprogs: let it create symlinks

Quoted 30 lines · Thomas Petazzoni

Hello,

Quoted 11 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

We have post-install hooks to create the symlinks mkfs.ext2 -> mke2fs etc. However, the e2fsprogs build system creates those symlinks itself. So just rely on that.

fsck.ext4dev and mkfs.ext4dev were dropped in version 1.43.4.

[Arnout: keep configure options more or less alphabetical]

This would definitely be a very very nice cleanup, but it doesn't seem to work. I've tried to build the following configuration:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.02-756-gae15148.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_8=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y

Quoted 8 lines

BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_E2FSPROGS=y
# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set
# BR2_PACKAGE_E2FSPROGS_CHATTR is not set
# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set
# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set
# BR2_PACKAGE_E2FSPROGS_E2FSCK is not set

Ah, indeed, I hadn't checked the symlinks with e2fsck disabled.

Quoted 22 lines

# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set
# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set
# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set
# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set
# BR2_PACKAGE_E2FSPROGS_LSATTR is not set
# BR2_PACKAGE_E2FSPROGS_MKE2FS is not set
# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set
# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set
# BR2_TARGET_ROOTFS_TAR is not set

and I get numerous broken symbolic links:

thomas at skate:~/projets/buildroot (master)$ ls -l output/target/usr/sbin/ total 116

(quoted diff) +0 -2
-rwxr-xr-x 1 thomas thomas 13976 avril 22 14:38 e4crypt
-rwxr-xr-x 1 thomas thomas 18180 avril 22 14:38 fsck
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 fsck.ext2 -> e2fsck
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 fsck.ext3 -> e2fsck
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 fsck.ext4 -> e2fsck
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 mkfs.ext2 -> mke2fs
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 mkfs.ext3 -> mke2fs
lrwxrwxrwx 1 thomas thomas     6 avril 22 14:38 mkfs.ext4 -> mke2fs
Quoted 6 lines

-rwxr-xr-x 1 thomas thomas 80996 avril 22 14:38 tune2fs

So basically: all the symbolic links are broken. It raises a few questions:

- What is the difference between the fsck option and the e2fsck option?

fsck is the wrapper, e2fsck is the ext2/3/4-specific checker.

Quoted 2 lines

- Why is this creating the symbolic links even for programs not installed (e2fsck and mke2fs in our case) ?

Because e2fsprogs installs them and we remove them.

Quoted 2 lines

- Why is tune2fs built/installed even if it wasn't enabled in my configuration?

This I can't explain. tune2fs should be a symlink to e2label, and in addition
it should be removed by Buildroot.

Quoted 1 line

- Why is e4crypt built/installed?

Because it is one of the tools that can't be disabled with configure options,
and it was added to e2fsprogs after the stupid removal hacks were already in place, and whoever did that bump didn't notice.

So bottom line: the problem is that this patch individually doesn't work. We
either have to add some complication, or it should be squashed with patch 7. After patch 7 e2fsck, mke2fs and e2label are always installed so no dead symlinks anymore.

OK to squash with patch 7?

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#15 lore raw

PATCH v8 7/12 e2fsprogs: refactor to fix conflicts with busybox and util-linux

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

So far we attempted to solve the conflicts between busybox and e2fsprogs by removing busybox programs from /bin and /sbin, leaving the e2fsprogs ones at /usr/bin and /usr/sbin. This fails with BR2_ROOTFS_MERGED_USR=y, leading to situations like the one described in bug 9436.

We could provide a better solution by means of a fine-grained selection of programs, like util-linux does, but this would require big changes in e2fsprogs. So instead of resorting to dirty tricks we switch to a more pragmatic approach:

- Drop all configs to select/deselect utilities without corresponding enable/disable options to the configure script. In other words, we always install the basic set of utilities.

- fsck has a configure option, so use it. Note that --enable-fsck is only about the wrapper, not about e2fsck.

- Install e2fsprogs utilities at /bin and /sbin, overriding the ones eventually installed by busybox.

Notice that these changes do exactly the opposite of what is requested in bug 9436. On the other hand the policy for e2fsprogs becomes coherent with the one for util-linux: busybox never wins.

Fixes:
https://bugs.busybox.net/show_bug.cgi?id=9436 (no fix, in fact)

[Arnout:
- don't add 'default y' to resize2fs;
- don't install the host package in /bin instead of /usr/bin - we install everything under /usr (until /usr will be removed, soon)]

---
Splitting up the change of installation paths from the removal of some enable/disable options is slightly more involved, so I chose to keep these two changes in a single commit. -- Arnout

---
 package/e2fsprogs/Config.in    | 60 +++++-------------------------------------
 package/e2fsprogs/e2fsprogs.mk | 57 ++++++++-------------------------------
 2 files changed, 18 insertions(+), 99 deletions(-)
package/e2fsprogs/Config.in +7 -53
index 79b77eac4c..676327dc2f 100644
@@ -7,47 +7,26 @@ menuconfig BR2_PACKAGE_E2FSPROGS
 	help
 	  The EXT2 file system utilities.
 
+	  The following programs are always built and installed:
+	  badblocks chattr debugfs dumpe2fs e2freefrag e2fsck e2image
+	  e2undo e4crypt e4defrag filefrag fsck fuse2fs logsave lsattr
+	  mke2fs mklost+found resize2fs tune2fs
+
 	  The uuid utilities (uuidd, uuidgen) are not built. Use the
 	  ones from util-linux, instead.
 
+	  Other programs can be selected individually.
+
 	  http://e2fsprogs.sourceforge.net
 
 if BR2_PACKAGE_E2FSPROGS
 
-config BR2_PACKAGE_E2FSPROGS_BADBLOCKS
-	bool "badblocks"
-	default y
-
-config BR2_PACKAGE_E2FSPROGS_CHATTR
-	bool "chattr"
-	default y
-
 config BR2_PACKAGE_E2FSPROGS_DEBUGFS
 	bool "debugfs"
 
-config BR2_PACKAGE_E2FSPROGS_DUMPE2FS
-	bool "dumpe2fs"
-	default y
-
-config BR2_PACKAGE_E2FSPROGS_E2FREEFRAG
-	bool "e2freefrag"
-	default y
-
-config BR2_PACKAGE_E2FSPROGS_E2FSCK
-	bool "e2fsck"
-	default y
-
 config BR2_PACKAGE_E2FSPROGS_E2IMAGE
 	bool "e2image"
 
-config BR2_PACKAGE_E2FSPROGS_E2LABEL
-	bool "e2label"
-	default y
-
-config BR2_PACKAGE_E2FSPROGS_E2UNDO
-	bool "e2undo"
-	default y
-
 config BR2_PACKAGE_E2FSPROGS_E4DEFRAG
 	bool "e4defrag"
 	depends on !BR2_nios2 # fallocate not implemented
@@ -57,10 +36,6 @@ comment "e4defrag needs a glibc or musl toolchain"
 	depends on !BR2_nios2
 	depends on BR2_TOOLCHAIN_USES_UCLIBC
 
-config BR2_PACKAGE_E2FSPROGS_FILEFRAG
-	bool "filefrag"
-	default y
-
 config BR2_PACKAGE_E2FSPROGS_FSCK
 	bool "fsck"
 	default y
@@ -74,28 +49,7 @@ config BR2_PACKAGE_E2FSPROGS_FUSE2FS
 comment "fuse2fs needs a toolchain w/ threads, dynamic library"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
 
-config BR2_PACKAGE_E2FSPROGS_LOGSAVE
-	bool "logsave"
-	default y
-
-config BR2_PACKAGE_E2FSPROGS_LSATTR
-	bool "lsattr"
-	default y
-
-config BR2_PACKAGE_E2FSPROGS_MKE2FS
-	bool "mke2fs"
-	default y
-
-config BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND
-	bool "mklost+found"
-	default y
-
 config BR2_PACKAGE_E2FSPROGS_RESIZE2FS
 	bool "resize2fs"
 
-config BR2_PACKAGE_E2FSPROGS_TUNE2FS
-	bool "tune2fs"
-	default y
-	select BR2_PACKAGE_E2FSPROGS_E2LABEL
-
 endif
package/e2fsprogs/e2fsprogs.mk +11 -46

83 lines not on this page · raw message

Signature · 1 line
2.11.0
#16 lore raw

PATCH v8 7/12 e2fsprogs: refactor to fix conflicts with busybox and util-linux

Hello,

package/e2fsprogs/e2fsprogs.mk E2FSPROGS_INSTALL_STAGING = YES · line 24

Quoted 5 lines · Arnout Vandecappelle (Essensium/Mind)
package/e2fsprogs/e2fsprogs.mk +5 -0
+# If both e2fsprogs and busybox are selected, make certain e2fsprogs
+# wins the fight over who gets to have their utils actually installed
+ifeq ($(BR2_PACKAGE_BUSYBOX),y)
+E2FSPROGS_DEPENDENCIES += busybox
+endif

We recently had a ncurses/busybox discussion, in which to solve a circular dependency problem we removed such a dependency on Busybox. As part of this discussion, we started thinking about whether we should stop using the solution of depending on busybox to allow a package to override Busybox applets, and instead make sure the corresponding applets in Busybox are disabled when another package will install the full featured version of the program.

Should we generalize this idea, and apply it to e2fsprogs as well?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#17 lore raw

PATCH v8 7/12 e2fsprogs: refactor to fix conflicts with busybox and util-linux

Quoted 19 lines · Thomas Petazzoni

Hello,

package/e2fsprogs/e2fsprogs.mk E2FSPROGS_INSTALL_STAGING = YES · line 24

Quoted 5 lines · Arnout Vandecappelle (Essensium/Mind)
package/e2fsprogs/e2fsprogs.mk +5 -0
+# If both e2fsprogs and busybox are selected, make certain e2fsprogs
+# wins the fight over who gets to have their utils actually installed
+ifeq ($(BR2_PACKAGE_BUSYBOX),y)
+E2FSPROGS_DEPENDENCIES += busybox
+endif

We recently had a ncurses/busybox discussion, in which to solve a circular dependency problem we removed such a dependency on Busybox. As part of this discussion, we started thinking about whether we should stop using the solution of depending on busybox to allow a package to override Busybox applets, and instead make sure the corresponding applets in Busybox are disabled when another package will install the full featured version of the program.

Quoted 1 line

Should we generalize this idea, and apply it to e2fsprogs as well?

Yes, but it should be a separate patch. This patch basically preserves the
existing behaviour of overriding the busybox versions. Note that the dependency is redundant because we already depend on util-linux which depends on busybox (for the same reason).

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#18 lore raw

PATCH v8 8/12 e2fsprogs: add help text for all config options

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

---
 package/e2fsprogs/Config.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)
package/e2fsprogs/Config.in +13 -0
index 676327dc2f..23c4db5329 100644
@@ -23,14 +23,20 @@ if BR2_PACKAGE_E2FSPROGS
 
 config BR2_PACKAGE_E2FSPROGS_DEBUGFS
 	bool "debugfs"
+	help
+	  ext2/ext3/ext4 file system debugger
 
 config BR2_PACKAGE_E2FSPROGS_E2IMAGE
 	bool "e2image"
+	help
+	  Save critical ext2/ext3/ext4 filesystem metadata to a file
 
 config BR2_PACKAGE_E2FSPROGS_E4DEFRAG
 	bool "e4defrag"
 	depends on !BR2_nios2 # fallocate not implemented
 	depends on !BR2_TOOLCHAIN_USES_UCLIBC # sync_file_range not impl
+	help
+	  Online defragmenter for ext4 filesystem
 
 comment "e4defrag needs a glibc or musl toolchain"
 	depends on !BR2_nios2
@@ -39,17 +45,24 @@ comment "e4defrag needs a glibc or musl toolchain"
 config BR2_PACKAGE_E2FSPROGS_FSCK
 	bool "fsck"
 	default y
+	help
+	  Check and repair a Linux file system. This is a wrapper around
+	  the filesystem-specific fsck tools.
 
 config BR2_PACKAGE_E2FSPROGS_FUSE2FS
 	bool "fuse2fs"
 	depends on !BR2_STATIC_LIBS # libfuse
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse
 	select BR2_PACKAGE_LIBFUSE
+	help
+	  FUSE file system client for ext2/ext3/ext4 file systems
 
 comment "fuse2fs needs a toolchain w/ threads, dynamic library"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
 
 config BR2_PACKAGE_E2FSPROGS_RESIZE2FS
 	bool "resize2fs"
+	help
+	  ext2/ext3/ext4 file system resizer
 
 endif
Signature · 1 line
2.11.0
#19 lore raw

PATCH v8 9/12 e2fsprogs: disable unneeded features for host

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

We don't need e2initrd_helper or the test I/O manager for the host, just like we don't need it for the target.

[Arnout: don't add --disable-rpath, since we *do* need rpath for the
target; otherwise we have to explicitly pass LD_LIBRARY_PATH to be able to run tools linked with util-linux' libuuid/libblkid]

---
 package/e2fsprogs/e2fsprogs.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/e2fsprogs/e2fsprogs.mk +3 -1
index e0a7fa9354..632fdc250c 100644
@@ -28,10 +28,12 @@ endif
 # Disable fuse2fs as well to avoid carrying over deps, and it's unused
 HOST_E2FSPROGS_CONF_OPTS = \
 	--disable-defrag \
+	--disable-e2initrd-helper \
 	--disable-fuse2fs \
 	--disable-libblkid \
 	--disable-libuuid \
-	--enable-symlink-install
+	--enable-symlink-install \
+	--disable-testio-debug
 
 # Set the binary directories to "/bin" and "/sbin" to override programs
 # installed by busybox.
Signature · 1 line
2.11.0
#20 lore raw

PATCH v8 9/12 e2fsprogs: disable unneeded features for host

Hello,

Quoted 8 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

We don't need e2initrd_helper or the test I/O manager for the host, just like we don't need it for the target.

[Arnout: don't add --disable-rpath, since we *do* need rpath for the
target; otherwise we have to explicitly pass LD_LIBRARY_PATH to be

I guess you meant "we *do* need rpath for the host", right ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#21 lore raw

PATCH v8 9/12 e2fsprogs: disable unneeded features for host

Quoted 6 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

Quoted 8 lines
Quoted 6 lines

We don't need e2initrd_helper or the test I/O manager for the host, just like we don't need it for the target.

[Arnout: don't add --disable-rpath, since we *do* need rpath for the
target; otherwise we have to explicitly pass LD_LIBRARY_PATH to be

I guess you meant "we *do* need rpath for the host", right ?

Yes, for host, obviously...

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#22 lore raw

PATCH v8 10/12 e2fsprogs: add explicit --enable/--disable configure options

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

[Arnout: don't split up the fuse2fs CONF_OPTS and DEPENDENCIES
handling]

---
 package/e2fsprogs/e2fsprogs.mk | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
package/e2fsprogs/e2fsprogs.mk +5 -5
index 632fdc250c..a60c69b395 100644
@@ -40,12 +40,12 @@ HOST_E2FSPROGS_CONF_OPTS = \
 E2FSPROGS_CONF_OPTS = \
 	--bindir=/bin \
 	--sbindir=/sbin \
-	$(if $(BR2_STATIC_LIBS),,--enable-elf-shlibs) \
-	$(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),,--disable-debugfs) \
-	$(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),,--disable-imager) \
-	$(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),,--disable-defrag) \
+	$(if $(BR2_STATIC_LIBS),--disable-elf-shlibs,--enable-elf-shlibs) \
+	$(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),--enable-debugfs,--disable-debugfs) \
+	$(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),--enable-imager,--disable-imager) \
+	$(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),--enable-defrag,--disable-defrag) \
 	$(if $(BR2_PACKAGE_E2FSPROGS_FSCK),--enable-fsck,--disable-fsck) \
-	$(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),,--disable-resizer) \
+	$(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),--enable-resizer,--disable-resizer) \
 	--disable-uuidd \
 	--disable-libblkid \
 	--disable-libuuid \
Signature · 1 line
2.11.0
#23 lore raw

PATCH v8 11/12 e2fsprogs: avoid conflict with util-linux fsck wrapper

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

The fsck wrapper from util-linux is better maintained, so it should be preferred. In particular, systemd relies on features in the util-linux fsck wrapper that don't exist in the e2fsprogs one. However, since e2fsprogs depends on util-linux, the one from e2fsprogs currently has precedence. So in order to have e2fsck from e2fsprogs and the fsck wrapper from util-linux, we disable e2fsprogs' fsck if the one from util-linux is selected.

CC Maxime Hadjinlian <[email protected]>
[Arnout: don't add comment]
---
 package/e2fsprogs/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/e2fsprogs/Config.in +1 -0
index 23c4db5329..b3d12b4a63 100644
@@ -45,6 +45,7 @@ comment "e4defrag needs a glibc or musl toolchain"
 config BR2_PACKAGE_E2FSPROGS_FSCK
 	bool "fsck"
 	default y
+	depends on !BR2_PACKAGE_UTIL_LINUX_FSCK
 	help
 	  Check and repair a Linux file system. This is a wrapper around
 	  the filesystem-specific fsck tools.
Signature · 1 line
2.11.0
#24 lore raw

PATCH v8 12/12 e2fsprogs: only add -lintl for static builds

In reply to Arnout Vandecappelle (Essensium/Mind)

From: Carlos Santos <[email protected]>

For dynamic library builds, it's not needed to pass it explicitly.

---
 package/e2fsprogs/e2fsprogs.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/e2fsprogs/e2fsprogs.mk +3 -1
index a60c69b395..84af7abab8 100644
@@ -77,17 +77,19 @@ HOST_E2FSPROGS_CONF_ENV += \
 	ac_cv_header_magic_h=no \
 	ac_cv_lib_magic_magic_file=no
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_STATIC_LIBS),yy)
 # 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
 
 E2FSPROGS_MAKE_OPTS = LDCONFIG=true
+
 E2FSPROGS_INSTALL_STAGING_OPTS = \
 	DESTDIR=$(STAGING_DIR) \
 	LDCONFIG=true \
 	install-libs
+
 E2FSPROGS_INSTALL_TARGET_OPTS = \
 	DESTDIR=$(TARGET_DIR) \
 	LDCONFIG=true \
Signature · 1 line
2.11.0
#25 lore raw

PATCH v8 12/12 e2fsprogs: only add -lintl for static builds

Hello,

Quoted 7 lines · Arnout Vandecappelle (Essensium/Mind)
package/e2fsprogs/e2fsprogs.mk +0 -0
index a60c69b395..84af7abab8 100644
@@ -77,17 +77,19 @@ HOST_E2FSPROGS_CONF_ENV += \
 	ac_cv_header_magic_h=no \
 	ac_cv_lib_magic_magic_file=no

package/e2fsprogs/e2fsprogs.mk HOST_E2FSPROGS_CONF_ENV += \ · line 87

Quoted 10 lines
package/e2fsprogs/e2fsprogs.mk +2 -1
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_STATIC_LIBS),yy)
 # 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
 
 E2FSPROGS_MAKE_OPTS = LDCONFIG=true
+

Unrelated change.

package/e2fsprogs/e2fsprogs.mk HOST_E2FSPROGS_CONF_ENV += \ · line 92

Quoted 5 lines
package/e2fsprogs/e2fsprogs.mk +1 -0
 E2FSPROGS_INSTALL_STAGING_OPTS = \
 	DESTDIR=$(STAGING_DIR) \
 	LDCONFIG=true \
 	install-libs
+

Ditto.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com