All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux
@ 2017-04-22 22:49 Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 1/7] " Arnout Vandecappelle
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-04-22 22:49 UTC (permalink / raw)
  To: buildroot

 This is v9 of the large patch sent previously by Carlos Santos, split
up into smaller bits for each individual change. Compared to v8, it is
split up a little less heavily: Thomas found out that it is not possible
to let the e2fsprogs build system create the symlinks while Buildroot is
still removing e2fsck and mke2fs.

 Regards,
 Arnout

---
Carlos Santos (7):
  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
  e2fsprogs: add empty lines to .mk file

 package/e2fsprogs/Config.in    |  74 ++++++++------------------
 package/e2fsprogs/e2fsprogs.mk | 118 +++++++++--------------------------------
 2 files changed, 46 insertions(+), 146 deletions(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v9 1/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux
  2017-04-22 22:49 [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Arnout Vandecappelle
@ 2017-04-22 22:49 ` Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 2/7] e2fsprogs: add help text for all config options Arnout Vandecappelle
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-04-22 22:49 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <casantos@datacom.ind.br>

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.

- Let the e2fsprogs build system create the symlinks mkfs.ext2 -> mke2fs
  etc.  fsck.ext4dev and mkfs.ext4dev were dropped in version 1.43.4.

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)

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
[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)]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
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. Also splitting off the symlinks
turns out to be difficult. -- Arnout

v9: squash symlinks into this patch
---
 package/e2fsprogs/Config.in    |  60 +++---------------------
 package/e2fsprogs/e2fsprogs.mk | 102 ++++++-----------------------------------
 2 files changed, 22 insertions(+), 140 deletions(-)

diff --git a/package/e2fsprogs/Config.in b/package/e2fsprogs/Config.in
index 79b77eac4c..676327dc2f 100644
--- a/package/e2fsprogs/Config.in
+++ b/package/e2fsprogs/Config.in
@@ -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
diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
index 5231a97f9c..e0a7fa9354 100644
--- a/package/e2fsprogs/e2fsprogs.mk
+++ b/package/e2fsprogs/e2fsprogs.mk
@@ -17,6 +17,12 @@ E2FSPROGS_INSTALL_STAGING = YES
 E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux
 HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf host-util-linux
 
+# 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
+
 # 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
@@ -24,21 +30,27 @@ HOST_E2FSPROGS_CONF_OPTS = \
 	--disable-defrag \
 	--disable-fuse2fs \
 	--disable-libblkid \
-	--disable-libuuid
+	--disable-libuuid \
+	--enable-symlink-install
 
+# 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),,--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_PACKAGE_E2FSPROGS_FSCK),--enable-fsck,--disable-fsck) \
 	$(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),,--disable-resizer) \
 	--disable-uuidd \
 	--disable-libblkid \
 	--disable-libuuid \
-	--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
@@ -83,89 +95,5 @@ define HOST_E2FSPROGS_INSTALL_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs
 endef
 
-# 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
-E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG) += usr/sbin/e4defrag
-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
-
-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
-# 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).
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-E2FSPROGS_DEPENDENCIES += busybox
-
-define E2FSPROGS_REMOVE_BUSYBOX_APPLETS
-	$(RM) -f $(TARGET_DIR)/bin/chattr
-	$(RM) -f $(TARGET_DIR)/bin/lsattr
-	$(RM) -f $(TARGET_DIR)/sbin/fsck
-	$(RM) -f $(TARGET_DIR)/sbin/tune2fs
-	$(RM) -f $(TARGET_DIR)/sbin/e2label
-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))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v9 2/7] e2fsprogs: add help text for all config options
  2017-04-22 22:49 [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 1/7] " Arnout Vandecappelle
@ 2017-04-22 22:49 ` Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 3/7] e2fsprogs: disable unneeded features for host Arnout Vandecappelle
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-04-22 22:49 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <casantos@datacom.ind.br>

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/e2fsprogs/Config.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/package/e2fsprogs/Config.in b/package/e2fsprogs/Config.in
index 676327dc2f..23c4db5329 100644
--- a/package/e2fsprogs/Config.in
+++ b/package/e2fsprogs/Config.in
@@ -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
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v9 3/7] e2fsprogs: disable unneeded features for host
  2017-04-22 22:49 [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 1/7] " Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 2/7] e2fsprogs: add help text for all config options Arnout Vandecappelle
@ 2017-04-22 22:49 ` Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 4/7] e2fsprogs: add explicit --enable/--disable configure options Arnout Vandecappelle
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-04-22 22:49 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <casantos@datacom.ind.br>

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.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
[Arnout: don't add --disable-rpath, since we *do* need rpath for the
 host; otherwise we have to explicitly pass LD_LIBRARY_PATH to be able
 to run tools linked with util-linux' libuuid/libblkid]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v9: fix commit log
---
 package/e2fsprogs/e2fsprogs.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
index e0a7fa9354..632fdc250c 100644
--- a/package/e2fsprogs/e2fsprogs.mk
+++ b/package/e2fsprogs/e2fsprogs.mk
@@ -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.
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v9 4/7] e2fsprogs: add explicit --enable/--disable configure options
  2017-04-22 22:49 [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Arnout Vandecappelle
                   ` (2 preceding siblings ...)
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 3/7] e2fsprogs: disable unneeded features for host Arnout Vandecappelle
@ 2017-04-22 22:49 ` Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 5/7] e2fsprogs: avoid conflict with util-linux fsck wrapper Arnout Vandecappelle
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-04-22 22:49 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <casantos@datacom.ind.br>

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
[Arnout: don't split up the fuse2fs CONF_OPTS and DEPENDENCIES
 handling]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/e2fsprogs/e2fsprogs.mk | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
index 632fdc250c..a60c69b395 100644
--- a/package/e2fsprogs/e2fsprogs.mk
+++ b/package/e2fsprogs/e2fsprogs.mk
@@ -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 \
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v9 5/7] e2fsprogs: avoid conflict with util-linux fsck wrapper
  2017-04-22 22:49 [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Arnout Vandecappelle
                   ` (3 preceding siblings ...)
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 4/7] e2fsprogs: add explicit --enable/--disable configure options Arnout Vandecappelle
@ 2017-04-22 22:49 ` Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 6/7] e2fsprogs: only add -lintl for static builds Arnout Vandecappelle
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-04-22 22:49 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <casantos@datacom.ind.br>

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.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
CC: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
[Arnout: don't add comment]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/e2fsprogs/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/e2fsprogs/Config.in b/package/e2fsprogs/Config.in
index 23c4db5329..b3d12b4a63 100644
--- a/package/e2fsprogs/Config.in
+++ b/package/e2fsprogs/Config.in
@@ -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.
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v9 6/7] e2fsprogs: only add -lintl for static builds
  2017-04-22 22:49 [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Arnout Vandecappelle
                   ` (4 preceding siblings ...)
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 5/7] e2fsprogs: avoid conflict with util-linux fsck wrapper Arnout Vandecappelle
@ 2017-04-22 22:49 ` Arnout Vandecappelle
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 7/7] e2fsprogs: add empty lines to .mk file Arnout Vandecappelle
  2017-05-04 20:37 ` [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Thomas Petazzoni
  7 siblings, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-04-22 22:49 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <casantos@datacom.ind.br>

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

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v9: remove addition of empty lines
---
 package/e2fsprogs/e2fsprogs.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
index a60c69b395..70a1e4eab5 100644
--- a/package/e2fsprogs/e2fsprogs.mk
+++ b/package/e2fsprogs/e2fsprogs.mk
@@ -77,7 +77,7 @@ 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
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v9 7/7] e2fsprogs: add empty lines to .mk file
  2017-04-22 22:49 [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Arnout Vandecappelle
                   ` (5 preceding siblings ...)
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 6/7] e2fsprogs: only add -lintl for static builds Arnout Vandecappelle
@ 2017-04-22 22:49 ` Arnout Vandecappelle
  2017-05-04 20:37 ` [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Thomas Petazzoni
  7 siblings, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-04-22 22:49 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <casantos@datacom.ind.br>

We usually have empty lines around multi-line variable definitions.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v9: split off from previous patch
---
 package/e2fsprogs/e2fsprogs.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
index 70a1e4eab5..84af7abab8 100644
--- a/package/e2fsprogs/e2fsprogs.mk
+++ b/package/e2fsprogs/e2fsprogs.mk
@@ -84,10 +84,12 @@ 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 \
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux
  2017-04-22 22:49 [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Arnout Vandecappelle
                   ` (6 preceding siblings ...)
  2017-04-22 22:49 ` [Buildroot] [PATCH v9 7/7] e2fsprogs: add empty lines to .mk file Arnout Vandecappelle
@ 2017-05-04 20:37 ` Thomas Petazzoni
  7 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2017-05-04 20:37 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 23 Apr 2017 00:49:12 +0200, Arnout Vandecappelle

> Carlos Santos (7):
>   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
>   e2fsprogs: add empty lines to .mk file

Entire series applied. Thanks!

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-05-04 20:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-22 22:49 [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Arnout Vandecappelle
2017-04-22 22:49 ` [Buildroot] [PATCH v9 1/7] " Arnout Vandecappelle
2017-04-22 22:49 ` [Buildroot] [PATCH v9 2/7] e2fsprogs: add help text for all config options Arnout Vandecappelle
2017-04-22 22:49 ` [Buildroot] [PATCH v9 3/7] e2fsprogs: disable unneeded features for host Arnout Vandecappelle
2017-04-22 22:49 ` [Buildroot] [PATCH v9 4/7] e2fsprogs: add explicit --enable/--disable configure options Arnout Vandecappelle
2017-04-22 22:49 ` [Buildroot] [PATCH v9 5/7] e2fsprogs: avoid conflict with util-linux fsck wrapper Arnout Vandecappelle
2017-04-22 22:49 ` [Buildroot] [PATCH v9 6/7] e2fsprogs: only add -lintl for static builds Arnout Vandecappelle
2017-04-22 22:49 ` [Buildroot] [PATCH v9 7/7] e2fsprogs: add empty lines to .mk file Arnout Vandecappelle
2017-05-04 20:37 ` [Buildroot] [PATCH v9 0/7] e2fsprogs: refactor to fix conflicts with busybox and util-linux Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.