All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v5 0/2] e2fsprogs: fix issues when BR2_ROOTFS_MERGED_USR=y
@ 2017-04-10  3:23 Carlos Santos
  2017-04-10  3:23 ` [Buildroot] [PATCH v5 1/2] e2fsprogs: refactor to fix conflicts with busybox and util-linux Carlos Santos
  2017-04-10  3:23 ` [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck Carlos Santos
  0 siblings, 2 replies; 10+ messages in thread
From: Carlos Santos @ 2017-04-10  3:23 UTC (permalink / raw)
  To: buildroot

Since e2fsprogs depends on util-linux, it's build after it. It means
that if you want the fsck wrapper from util-linux (which is better
maintained and you are sure that it's compatible with systemd) and you
want e2fsck, it won't work. Because of the merge of /usr/bin and /bin,
we end up deleting the fsck from util-linux.

The root cause of this problem is the cluncky attempt to coexist with
busybox and util-linux. In order to solve the problem we need to make
two changes:

- Refactor e2fsprogs, making it override any utility coming from busybox
  and favoring the fsck wrapper from util-linux.
- Make systemd select util-linux/fsck to prevent ending up with the fsck
  from busybox, which is not compatible with systemd.

Carlos Santos (2):
  e2fsprogs: refactor to fix conflicts with busybox and util-linux
  systemd: select util-linux/fsck and e2fsprogs/e2fsck

 package/e2fsprogs/Config.in      |  84 +++++++---------------
 package/e2fsprogs/Config.in.host |   1 +
 package/e2fsprogs/e2fsprogs.mk   | 149 +++++++++++----------------------------
 package/systemd/Config.in        |   3 +
 4 files changed, 71 insertions(+), 166 deletions(-)

-- 
2.7.4

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

* [Buildroot] [PATCH v5 1/2] e2fsprogs: refactor to fix conflicts with busybox and util-linux
  2017-04-10  3:23 [Buildroot] [PATCH v5 0/2] e2fsprogs: fix issues when BR2_ROOTFS_MERGED_USR=y Carlos Santos
@ 2017-04-10  3:23 ` Carlos Santos
  2017-04-10  3:23 ` [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck Carlos Santos
  1 sibling, 0 replies; 10+ messages in thread
From: Carlos Santos @ 2017-04-10  3:23 UTC (permalink / raw)
  To: buildroot

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 situatios like the one descibed 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 adopt a pragmatic approach:

1. Drop all configs to select/deselect utilities whithout corresponding
   --enable/disable options to the configure script. In other words, we
   always install the basic set of utilities.
2. Do not try to build UUID utilities, since they are disabled along
   with libuuod (the util-linux ones must be used instead).
3. 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.

Since e2fsprogs depends on util-linux, it's built later. So in order to
have e2fsck from e2fsprogs and the fsck wrapper from util-linux (which
is better maintained and compatible with systemd) we disable e2fsprogs'
fsck if the one from util-linux is selected.

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

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
Changes v1->v2
  - Add depenndece on !BR2_PACKAGE_UTIL_LINUX_FSCK to
    BR2_PACKAGE_E2FSPROGS_FSCK
  - Add comment telling that the fsck from util-linux has preference.
  - Pass "--enable-fsck" conditionally to configure
  - Remove the guard around the removal of /usr/sbin/fsck, since the
    fsck from busybox and util-linux are installed at /sbin
  - Improve comments and commit message
Changes v2->v3
  - Pass "--disable-fsck" conditionaly to configure too, since enable
    is the default.
  - Do not attempt to remove $(TARGET_DIR)/usr/sbin/fsck, just the
    $(TARGET_DIR)/sbin/fsck from busybox.
Changes v3->v4
   - Improve commit message
Changes v4->v5
   - Extreme overhauling, deeply simplifying the recipe and following
     the suggestion from Arnout Vandecappelle to install e2fsprogs
     utilities on /bin and /sbin.
---
 package/e2fsprogs/Config.in      |  84 +++++++---------------
 package/e2fsprogs/Config.in.host |   1 +
 package/e2fsprogs/e2fsprogs.mk   | 149 +++++++++++----------------------------
 3 files changed, 68 insertions(+), 166 deletions(-)

diff --git a/package/e2fsprogs/Config.in b/package/e2fsprogs/Config.in
index d1914a9..776645f 100644
--- a/package/e2fsprogs/Config.in
+++ b/package/e2fsprogs/Config.in
@@ -1,101 +1,69 @@
-config BR2_PACKAGE_E2FSPROGS
+menuconfig BR2_PACKAGE_E2FSPROGS
 	bool "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.
 
-	  http://e2fsprogs.sf.net
+	  badblocks chattr debugfs dumpe2fs e2freefrag e2fsck e2image
+	  e2undo e4crypt e4defrag filefrag fsck fuse2fs logsave lsattr
+	  mke2fs mklost+found resize2fs tune2fs
 
-if BR2_PACKAGE_E2FSPROGS
 
-config BR2_PACKAGE_E2FSPROGS_BADBLOCKS
-	bool "badblocks"
-	default y
+	  http://e2fsprogs.sourceforge.net/
 
-config BR2_PACKAGE_E2FSPROGS_CHATTR
-	bool "chattr"
-	default y
+if BR2_PACKAGE_E2FSPROGS
+
+comment "Basic set: badblocks chattr dumpe2fs e2freefrag e2fsck e2undo"
+comment "e4crypt e4defrag filefrag logsave lsattr mke2fs mklost+found"
+comment "tune2fs"
 
 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
+	help
+	  ext2/ext3/ext4 file system debugger
 
 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
+	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_TOOLCHAIN_USES_UCLIBC
 
-config BR2_PACKAGE_E2FSPROGS_FILEFRAG
-	bool "filefrag"
-	default y
-
 config BR2_PACKAGE_E2FSPROGS_FSCK
 	bool "fsck"
+	depends on !BR2_PACKAGE_UTIL_LINUX_FSCK
 	default y
+	help
+	  Check and repair a Linux file system
+
+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
 	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_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
-
-config BR2_PACKAGE_E2FSPROGS_UUIDGEN
-	bool "uuidgen"
 	default y
+	help
+	  ext2/ext3/ext4 file system resizer
 
 endif
diff --git a/package/e2fsprogs/Config.in.host b/package/e2fsprogs/Config.in.host
index de9148e..7591bbc 100644
--- a/package/e2fsprogs/Config.in.host
+++ b/package/e2fsprogs/Config.in.host
@@ -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.
 
diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
index 3f235c5..e172914 100644
--- a/package/e2fsprogs/e2fsprogs.mk
+++ b/package/e2fsprogs/e2fsprogs.mk
@@ -10,36 +10,58 @@ E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2F
 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_INSTALL_STAGING = YES
+
 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
+
+# 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
+
+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
-HOST_E2FSPROGS_CONF_OPTS += --disable-defrag --disable-fuse2fs
+# 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-fuse2fs \
+	--bindir=$(HOST_DIR)/bin \
+	--sbindir=$(HOST_DIR)/sbin \
+	--enable-symlink-install \
+	--disable-libblkid \
+	--disable-libuuid \
+	--disable-e2initrd-helper \
+	--disable-testio-debug \
+	--disable-rpath
 
+# Set the binary directories to "/bin" and "/sbin" to override programs
+# installed by busybox.
 E2FSPROGS_CONF_OPTS = \
-	$(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_RESIZE2FS),,--disable-resizer) \
-	--disable-uuidd \
+	$(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-libblkid \
 	--disable-libuuid \
-	--enable-fsck \
 	--disable-e2initrd-helper \
 	--disable-testio-debug \
 	--disable-rpath
 
-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
 endif
@@ -56,17 +78,13 @@ HOST_E2FSPROGS_CONF_ENV += \
 	ac_cv_header_magic_h=no \
 	ac_cv_lib_magic_magic_file=no
 
-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
-
 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 \
@@ -76,90 +94,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
-E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UUIDGEN) += usr/bin/uuidgen
-
-# 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.7.4

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

* [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
  2017-04-10  3:23 [Buildroot] [PATCH v5 0/2] e2fsprogs: fix issues when BR2_ROOTFS_MERGED_USR=y Carlos Santos
  2017-04-10  3:23 ` [Buildroot] [PATCH v5 1/2] e2fsprogs: refactor to fix conflicts with busybox and util-linux Carlos Santos
@ 2017-04-10  3:23 ` Carlos Santos
  2017-04-10 11:02   ` Maxime Hadjinlian
  1 sibling, 1 reply; 10+ messages in thread
From: Carlos Santos @ 2017-04-10  3:23 UTC (permalink / raw)
  To: buildroot

e2fsprogs does not override/remove the fsck from util-linux anymore when
/sbin and /usr/sbin are merged. So we can select the fsck tools required
by systemd provided by those packages. This also prevents ending up with
the fsck from busybox, which is incompatible with systemd.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
 package/systemd/Config.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index 0f54686..f5eb9d0 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -22,6 +22,9 @@ menuconfig BR2_PACKAGE_SYSTEMD
 	select BR2_PACKAGE_UTIL_LINUX_BINARIES
 	select BR2_PACKAGE_UTIL_LINUX_MOUNT
 	select BR2_PACKAGE_UTIL_LINUX_NOLOGIN
+	select BR2_PACKAGE_UTIL_LINUX_FSCK
+	select BR2_PACKAGE_E2FSPROGS
+	select BR2_PACKAGE_E2FSPROGS_E2FSCK
 	select BR2_PACKAGE_KMOD
 	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
 	select BR2_PACKAGE_KMOD_TOOLS
-- 
2.7.4

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

* [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
  2017-04-10  3:23 ` [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck Carlos Santos
@ 2017-04-10 11:02   ` Maxime Hadjinlian
  2017-04-10 11:13     ` Arnout Vandecappelle
  0 siblings, 1 reply; 10+ messages in thread
From: Maxime Hadjinlian @ 2017-04-10 11:02 UTC (permalink / raw)
  To: buildroot

Hi all, Carlos

Thanks for pushing with this, it's really neat :)

On Mon, Apr 10, 2017 at 5:23 AM, Carlos Santos <casantos@datacom.ind.br> wrote:
> e2fsprogs does not override/remove the fsck from util-linux anymore when
> /sbin and /usr/sbin are merged. So we can select the fsck tools required
> by systemd provided by those packages. This also prevents ending up with
> the fsck from busybox, which is incompatible with systemd.
>
> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> ---
>  package/systemd/Config.in | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/package/systemd/Config.in b/package/systemd/Config.in
> index 0f54686..f5eb9d0 100644
> --- a/package/systemd/Config.in
> +++ b/package/systemd/Config.in
> @@ -22,6 +22,9 @@ menuconfig BR2_PACKAGE_SYSTEMD
>         select BR2_PACKAGE_UTIL_LINUX_BINARIES
>         select BR2_PACKAGE_UTIL_LINUX_MOUNT
>         select BR2_PACKAGE_UTIL_LINUX_NOLOGIN
> +       select BR2_PACKAGE_UTIL_LINUX_FSCK
> +       select BR2_PACKAGE_E2FSPROGS
> +       select BR2_PACKAGE_E2FSPROGS_E2FSCK
>         select BR2_PACKAGE_KMOD
>         select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
>         select BR2_PACKAGE_KMOD_TOOLS
> --
I haven't tested it but this looks good to me.

Reviewed-by: "Maxime Hadjinlian <maxime.hadjinlian@gmail.com>"

> 2.7.4
>

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

* [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
  2017-04-10 11:02   ` Maxime Hadjinlian
@ 2017-04-10 11:13     ` Arnout Vandecappelle
  2017-04-10 11:30       ` Maxime Hadjinlian
  0 siblings, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2017-04-10 11:13 UTC (permalink / raw)
  To: buildroot

 Hi Maxime,

On 10-04-17 13:02, Maxime Hadjinlian wrote:
> Hi all, Carlos
> 
> Thanks for pushing with this, it's really neat :)
> 
> On Mon, Apr 10, 2017 at 5:23 AM, Carlos Santos <casantos@datacom.ind.br> wrote:
>> e2fsprogs does not override/remove the fsck from util-linux anymore when
>> /sbin and /usr/sbin are merged. So we can select the fsck tools required
>> by systemd provided by those packages. This also prevents ending up with
>> the fsck from busybox, which is incompatible with systemd.
>>
>> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
>> ---
>>  package/systemd/Config.in | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/package/systemd/Config.in b/package/systemd/Config.in
>> index 0f54686..f5eb9d0 100644
>> --- a/package/systemd/Config.in
>> +++ b/package/systemd/Config.in
>> @@ -22,6 +22,9 @@ menuconfig BR2_PACKAGE_SYSTEMD
>>         select BR2_PACKAGE_UTIL_LINUX_BINARIES
>>         select BR2_PACKAGE_UTIL_LINUX_MOUNT
>>         select BR2_PACKAGE_UTIL_LINUX_NOLOGIN
>> +       select BR2_PACKAGE_UTIL_LINUX_FSCK
>> +       select BR2_PACKAGE_E2FSPROGS
>> +       select BR2_PACKAGE_E2FSPROGS_E2FSCK
>>         select BR2_PACKAGE_KMOD
>>         select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
>>         select BR2_PACKAGE_KMOD_TOOLS
>> --
> I haven't tested it but this looks good to me.
> 
> Reviewed-by: "Maxime Hadjinlian <maxime.hadjinlian@gmail.com>"

 Do you agree with me that selecting e2fsprogs shouldn't be necessary, because
you actually only need them when you mount an ext2 filesystem (which isn't
necessarily the case)?

 I'm not sure what happens exactly when you have util-linux fsck but no e2fsck
and you try to mount an ext2 filesystem...

 Regards,
 Arnout

> 
>> 2.7.4
>>

-- 
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

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

* [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
  2017-04-10 11:13     ` Arnout Vandecappelle
@ 2017-04-10 11:30       ` Maxime Hadjinlian
  2017-04-10 11:44         ` Arnout Vandecappelle
  0 siblings, 1 reply; 10+ messages in thread
From: Maxime Hadjinlian @ 2017-04-10 11:30 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

On Mon, Apr 10, 2017 at 1:13 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
>  Hi Maxime,
>
> On 10-04-17 13:02, Maxime Hadjinlian wrote:
>> Hi all, Carlos
>>
>> Thanks for pushing with this, it's really neat :)
>>
>> On Mon, Apr 10, 2017 at 5:23 AM, Carlos Santos <casantos@datacom.ind.br> wrote:
>>> e2fsprogs does not override/remove the fsck from util-linux anymore when
>>> /sbin and /usr/sbin are merged. So we can select the fsck tools required
>>> by systemd provided by those packages. This also prevents ending up with
>>> the fsck from busybox, which is incompatible with systemd.
>>>
>>> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
>>> ---
>>>  package/systemd/Config.in | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/package/systemd/Config.in b/package/systemd/Config.in
>>> index 0f54686..f5eb9d0 100644
>>> --- a/package/systemd/Config.in
>>> +++ b/package/systemd/Config.in
>>> @@ -22,6 +22,9 @@ menuconfig BR2_PACKAGE_SYSTEMD
>>>         select BR2_PACKAGE_UTIL_LINUX_BINARIES
>>>         select BR2_PACKAGE_UTIL_LINUX_MOUNT
>>>         select BR2_PACKAGE_UTIL_LINUX_NOLOGIN
>>> +       select BR2_PACKAGE_UTIL_LINUX_FSCK
>>> +       select BR2_PACKAGE_E2FSPROGS
>>> +       select BR2_PACKAGE_E2FSPROGS_E2FSCK
>>>         select BR2_PACKAGE_KMOD
>>>         select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
>>>         select BR2_PACKAGE_KMOD_TOOLS
>>> --
>> I haven't tested it but this looks good to me.
>>
>> Reviewed-by: "Maxime Hadjinlian <maxime.hadjinlian@gmail.com>"
>
>  Do you agree with me that selecting e2fsprogs shouldn't be necessary, because
> you actually only need them when you mount an ext2 filesystem (which isn't
> necessarily the case)?
>
>  I'm not sure what happens exactly when you have util-linux fsck but no e2fsck
> and you try to mount an ext2 filesystem...
It would error out I think.

You are absolutely right, I only saw my own usecase but this only
works with an extX filesystem, if you want another fs, you need to
select the right tool for the job.
Then, how do we know what the user want ? There is the obivous ext
filesystem option, but you can always select this, and another
filesystem images and use them in different scenario or something.
So, should that be a choice menu and we let the user decide ? Or do we
just put a comment in the documentation or the help message of systemd
and let the user do the correct choice ?

I would go for the choice, with a default to extX as I think it's
easier and is pretty safe to assume lot of people are using that
theses filessytems now.
>  Regards,
>  Arnout
>
>>
>>> 2.7.4
>>>
>
> --
> 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

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

* [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
  2017-04-10 11:30       ` Maxime Hadjinlian
@ 2017-04-10 11:44         ` Arnout Vandecappelle
  2017-04-10 12:09           ` Carlos Santos
  0 siblings, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2017-04-10 11:44 UTC (permalink / raw)
  To: buildroot



On 10-04-17 13:30, Maxime Hadjinlian wrote:
> Hi Arnout,
> 
> On Mon, Apr 10, 2017 at 1:13 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
>>  Hi Maxime,
>>
>> On 10-04-17 13:02, Maxime Hadjinlian wrote:
>>> Hi all, Carlos
>>>
>>> Thanks for pushing with this, it's really neat :)
>>>
>>> On Mon, Apr 10, 2017 at 5:23 AM, Carlos Santos <casantos@datacom.ind.br> wrote:
>>>> e2fsprogs does not override/remove the fsck from util-linux anymore when
>>>> /sbin and /usr/sbin are merged. So we can select the fsck tools required
>>>> by systemd provided by those packages. This also prevents ending up with
>>>> the fsck from busybox, which is incompatible with systemd.
>>>>
>>>> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
>>>> ---
>>>>  package/systemd/Config.in | 3 +++
>>>>  1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/package/systemd/Config.in b/package/systemd/Config.in
>>>> index 0f54686..f5eb9d0 100644
>>>> --- a/package/systemd/Config.in
>>>> +++ b/package/systemd/Config.in
>>>> @@ -22,6 +22,9 @@ menuconfig BR2_PACKAGE_SYSTEMD
>>>>         select BR2_PACKAGE_UTIL_LINUX_BINARIES
>>>>         select BR2_PACKAGE_UTIL_LINUX_MOUNT
>>>>         select BR2_PACKAGE_UTIL_LINUX_NOLOGIN
>>>> +       select BR2_PACKAGE_UTIL_LINUX_FSCK
>>>> +       select BR2_PACKAGE_E2FSPROGS
>>>> +       select BR2_PACKAGE_E2FSPROGS_E2FSCK
>>>>         select BR2_PACKAGE_KMOD
>>>>         select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
>>>>         select BR2_PACKAGE_KMOD_TOOLS
>>>> --
>>> I haven't tested it but this looks good to me.
>>>
>>> Reviewed-by: "Maxime Hadjinlian <maxime.hadjinlian@gmail.com>"
>>
>>  Do you agree with me that selecting e2fsprogs shouldn't be necessary, because
>> you actually only need them when you mount an ext2 filesystem (which isn't
>> necessarily the case)?
>>
>>  I'm not sure what happens exactly when you have util-linux fsck but no e2fsck
>> and you try to mount an ext2 filesystem...
> It would error out I think.

 So, what does it do when you have a ubifs for which no fsck exists?

 Since I guess you and/or Carlos have a systemd-based Buildroot-built system
available, you could perhaps add a squashfs to your /etc/fstab and see what
happens? Or remove e2fsck and see what happens?

> 
> You are absolutely right, I only saw my own usecase but this only
> works with an extX filesystem, if you want another fs, you need to
> select the right tool for the job.
> Then, how do we know what the user want ? There is the obivous ext
> filesystem option, but you can always select this, and another
> filesystem images and use them in different scenario or something.
> So, should that be a choice menu and we let the user decide ? Or do we
> just put a comment in the documentation or the help message of systemd
> and let the user do the correct choice ?
> 
> I would go for the choice, with a default to extX as I think it's
> easier and is pretty safe to assume lot of people are using that
> theses filessytems now.

 I disagree, many people use ubifs, some use initramfs, squashfs, xfs, btrfs or
zfs. I have made Buildroot-based systems for all of these (none of them with
systemd of course, I've never used systemd with Buildroot, but all of them
*could* have used systemd).


 Regards,
 Arnout


>>  Regards,
>>  Arnout
>>
>>>
>>>> 2.7.4
>>>>
>>
>> --
>> 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

-- 
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

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

* [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
  2017-04-10 11:44         ` Arnout Vandecappelle
@ 2017-04-10 12:09           ` Carlos Santos
  2017-04-10 12:22             ` Maxime Hadjinlian
  0 siblings, 1 reply; 10+ messages in thread
From: Carlos Santos @ 2017-04-10 12:09 UTC (permalink / raw)
  To: buildroot

> From: "Arnout Vandecappelle" <arnout@mind.be>
> To: "Maxime Hadjinlian" <maxime.hadjinlian@gmail.com>
> Cc: "Carlos Santos" <casantos@datacom.ind.br>, "buildroot" <buildroot@buildroot.org>, "Thomas Petazzoni"
> <thomas.petazzoni@free-electrons.com>, "Joergen Pihlflyckt" <Jorgen.Pihlflyckt@ajeco.fi>
> Sent: Monday, April 10, 2017 8:44:45 AM
> Subject: Re: [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck

> On 10-04-17 13:30, Maxime Hadjinlian wrote:
>> Hi Arnout,
>> 
>> On Mon, Apr 10, 2017 at 1:13 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
>>>  Hi Maxime,
>>>
>>> On 10-04-17 13:02, Maxime Hadjinlian wrote:
>>>> Hi all, Carlos
>>>>
---8<---
>>>> I haven't tested it but this looks good to me.
>>>>
>>>> Reviewed-by: "Maxime Hadjinlian <maxime.hadjinlian@gmail.com>"
>>>
>>>  Do you agree with me that selecting e2fsprogs shouldn't be necessary, because
>>> you actually only need them when you mount an ext2 filesystem (which isn't
>>> necessarily the case)?
>>>
>>>  I'm not sure what happens exactly when you have util-linux fsck but no e2fsck
>>> and you try to mount an ext2 filesystem...
>> It would error out I think.
> 
> So, what does it do when you have a ubifs for which no fsck exists?
> 
> Since I guess you and/or Carlos have a systemd-based Buildroot-built system
> available, you could perhaps add a squashfs to your /etc/fstab and see what
> happens? Or remove e2fsck and see what happens?

I don't have a real system using systemd but I can run some tests on
a vurtual machine using QEMU later today.

>> 
>> You are absolutely right, I only saw my own usecase but this only
>> works with an extX filesystem, if you want another fs, you need to
>> select the right tool for the job.
>> Then, how do we know what the user want ? There is the obivous ext
>> filesystem option, but you can always select this, and another
>> filesystem images and use them in different scenario or something.
>> So, should that be a choice menu and we let the user decide ? Or do we
>> just put a comment in the documentation or the help message of systemd
>> and let the user do the correct choice ?
>> 
>> I would go for the choice, with a default to extX as I think it's
>> easier and is pretty safe to assume lot of people are using that
>> theses filessytems now.
> 
> I disagree, many people use ubifs, some use initramfs, squashfs, xfs, btrfs or
> zfs. I have made Buildroot-based systems for all of these (none of them with
> systemd of course, I've never used systemd with Buildroot, but all of them
> *could* have used systemd).

I agree that selecting e2fsprogs does not make much sense. ext[234]
would be a natural choice for a desktop system with a hard disk but
Buildroot is mostly used on  embedded systems on which flash-friendly
filesystems like ubifs are preferable.

-- 
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent 
success of having your words and actions judged by your reputation, 
rather than the other way about.? ? Christopher Hitchens

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

* [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
  2017-04-10 12:09           ` Carlos Santos
@ 2017-04-10 12:22             ` Maxime Hadjinlian
  2017-04-10 13:23               ` Arnout Vandecappelle
  0 siblings, 1 reply; 10+ messages in thread
From: Maxime Hadjinlian @ 2017-04-10 12:22 UTC (permalink / raw)
  To: buildroot

On Mon, Apr 10, 2017 at 2:09 PM, Carlos Santos <casantos@datacom.ind.br> wrote:
>> From: "Arnout Vandecappelle" <arnout@mind.be>
>> To: "Maxime Hadjinlian" <maxime.hadjinlian@gmail.com>
>> Cc: "Carlos Santos" <casantos@datacom.ind.br>, "buildroot" <buildroot@buildroot.org>, "Thomas Petazzoni"
>> <thomas.petazzoni@free-electrons.com>, "Joergen Pihlflyckt" <Jorgen.Pihlflyckt@ajeco.fi>
>> Sent: Monday, April 10, 2017 8:44:45 AM
>> Subject: Re: [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
>
>> On 10-04-17 13:30, Maxime Hadjinlian wrote:
>>> Hi Arnout,
>>>
>>> On Mon, Apr 10, 2017 at 1:13 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
>>>>  Hi Maxime,
>>>>
>>>> On 10-04-17 13:02, Maxime Hadjinlian wrote:
>>>>> Hi all, Carlos
>>>>>
> ---8<---
>>>>> I haven't tested it but this looks good to me.
>>>>>
>>>>> Reviewed-by: "Maxime Hadjinlian <maxime.hadjinlian@gmail.com>"
>>>>
>>>>  Do you agree with me that selecting e2fsprogs shouldn't be necessary, because
>>>> you actually only need them when you mount an ext2 filesystem (which isn't
>>>> necessarily the case)?
>>>>
>>>>  I'm not sure what happens exactly when you have util-linux fsck but no e2fsck
>>>> and you try to mount an ext2 filesystem...
>>> It would error out I think.
>>
>> So, what does it do when you have a ubifs for which no fsck exists?
>>
>> Since I guess you and/or Carlos have a systemd-based Buildroot-built system
>> available, you could perhaps add a squashfs to your /etc/fstab and see what
>> happens? Or remove e2fsck and see what happens?
If you remove e2fsck (which is how I found out about this issue), the
fsck at .service will fail and an error message will be displayed in the
boot process. That's all that's going to happen. But then, your FS is
never checked which can be more problematic.
I assume the same thing happens with other filesystems because fsck.FS
won't exist.

This won't forbid you to boot, just display an error message.
>
> I don't have a real system using systemd but I can run some tests on
> a vurtual machine using QEMU later today.
>
>>>
>>> You are absolutely right, I only saw my own usecase but this only
>>> works with an extX filesystem, if you want another fs, you need to
>>> select the right tool for the job.
>>> Then, how do we know what the user want ? There is the obivous ext
>>> filesystem option, but you can always select this, and another
>>> filesystem images and use them in different scenario or something.
>>> So, should that be a choice menu and we let the user decide ? Or do we
>>> just put a comment in the documentation or the help message of systemd
>>> and let the user do the correct choice ?
>>>
>>> I would go for the choice, with a default to extX as I think it's
>>> easier and is pretty safe to assume lot of people are using that
>>> theses filessytems now.
>>
>> I disagree, many people use ubifs, some use initramfs, squashfs, xfs, btrfs or
>> zfs. I have made Buildroot-based systems for all of these (none of them with
>> systemd of course, I've never used systemd with Buildroot, but all of them
>> *could* have used systemd).
Sure, everything's possible. I don't really know what is the most
common usecase of buildroot user in the end. It's not like we make
statistics (which could be a good idea by the way)
>
> I agree that selecting e2fsprogs does not make much sense. ext[234]
> would be a natural choice for a desktop system with a hard disk but
> Buildroot is mostly used on  embedded systems on which flash-friendly
> filesystems like ubifs are preferable.
I am mostly using eMMC where ext4 makes a lot of sense. But indeed,
you don't want to use that on a NAND/NOR.
Anyway, the default choice is just a detail, it's not that important.
>
> --
> Carlos Santos (Casantos) - DATACOM, P&D
> ?The greatest triumph that modern PR can offer is the transcendent
> success of having your words and actions judged by your reputation,
> rather than the other way about.? ? Christopher Hitchens

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

* [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
  2017-04-10 12:22             ` Maxime Hadjinlian
@ 2017-04-10 13:23               ` Arnout Vandecappelle
  0 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2017-04-10 13:23 UTC (permalink / raw)
  To: buildroot



On 10-04-17 14:22, Maxime Hadjinlian wrote:
> On Mon, Apr 10, 2017 at 2:09 PM, Carlos Santos <casantos@datacom.ind.br> wrote:
>>> From: "Arnout Vandecappelle" <arnout@mind.be>
>>> To: "Maxime Hadjinlian" <maxime.hadjinlian@gmail.com>
>>> Cc: "Carlos Santos" <casantos@datacom.ind.br>, "buildroot" <buildroot@buildroot.org>, "Thomas Petazzoni"
>>> <thomas.petazzoni@free-electrons.com>, "Joergen Pihlflyckt" <Jorgen.Pihlflyckt@ajeco.fi>
>>> Sent: Monday, April 10, 2017 8:44:45 AM
>>> Subject: Re: [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck
>>
>>> On 10-04-17 13:30, Maxime Hadjinlian wrote:
>>>> Hi Arnout,
>>>>
>>>> On Mon, Apr 10, 2017 at 1:13 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
>>>>>  Hi Maxime,
>>>>>
>>>>> On 10-04-17 13:02, Maxime Hadjinlian wrote:
>>>>>> Hi all, Carlos
>>>>>>
>> ---8<---
>>>>>> I haven't tested it but this looks good to me.
>>>>>>
>>>>>> Reviewed-by: "Maxime Hadjinlian <maxime.hadjinlian@gmail.com>"
>>>>>
>>>>>  Do you agree with me that selecting e2fsprogs shouldn't be necessary, because
>>>>> you actually only need them when you mount an ext2 filesystem (which isn't
>>>>> necessarily the case)?
>>>>>
>>>>>  I'm not sure what happens exactly when you have util-linux fsck but no e2fsck
>>>>> and you try to mount an ext2 filesystem...
>>>> It would error out I think.
>>>
>>> So, what does it do when you have a ubifs for which no fsck exists?
>>>
>>> Since I guess you and/or Carlos have a systemd-based Buildroot-built system
>>> available, you could perhaps add a squashfs to your /etc/fstab and see what
>>> happens? Or remove e2fsck and see what happens?
> If you remove e2fsck (which is how I found out about this issue), the
> fsck at .service will fail and an error message will be displayed in the
> boot process. That's all that's going to happen. But then, your FS is
> never checked which can be more problematic.
> I assume the same thing happens with other filesystems because fsck.FS
> won't exist.
> 
> This won't forbid you to boot, just display an error message.

 OK, then I think that's exactly what we want. It still boots, but it's clear to
the user what is going wrong because an error message is displayed.

[snip]

-- 
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

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

end of thread, other threads:[~2017-04-10 13:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10  3:23 [Buildroot] [PATCH v5 0/2] e2fsprogs: fix issues when BR2_ROOTFS_MERGED_USR=y Carlos Santos
2017-04-10  3:23 ` [Buildroot] [PATCH v5 1/2] e2fsprogs: refactor to fix conflicts with busybox and util-linux Carlos Santos
2017-04-10  3:23 ` [Buildroot] [PATCH v5 2/2] systemd: select util-linux/fsck and e2fsprogs/e2fsck Carlos Santos
2017-04-10 11:02   ` Maxime Hadjinlian
2017-04-10 11:13     ` Arnout Vandecappelle
2017-04-10 11:30       ` Maxime Hadjinlian
2017-04-10 11:44         ` Arnout Vandecappelle
2017-04-10 12:09           ` Carlos Santos
2017-04-10 12:22             ` Maxime Hadjinlian
2017-04-10 13:23               ` Arnout Vandecappelle

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.