Skip to contentSkip to conversation

New: e2fsprogs remove busybox applets even of unselected e2fsprogs components

Buildroot bugzilla at busybox.net 1 participant 8 messages Nov 19, 2016 – May 8, 2017

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=9436

Bug ID: 9436
Summary: e2fsprogs remove busybox applets even of unselected
e2fsprogs components
Product: buildroot
Version: 2016.08
Hardware: All
OS: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: Jorgen.Pihlflyckt at ajeco.fi
CC: buildroot at uclibc.org
Target Milestone: ---

Hello.

Recently, I built an embedded rootfs with the extended attributes of ext2/3/4 filesystem in use, so I needed the "chattr" and "lsattr" utilities. Since they are present in busybox, I selected them using "make busybox-menuconfig". However, I also needed a more full-fledged mkfs from e2fsprogs, so I chose the BR2_PACKAGE_E2FSPROGS option using the normal menuconfig procedure. This apparently overrides (and also removes) the corresponding busybox applets. Even the unselected ones.

What happens is this:
- When busybox is built, it's installed into the target directory, along with
the selected chattr and lsattr applet symlinks.

- At a later stage, e2fsprogs is built and installed into the target
directory. The busybox versions of the e2fsprogs utilities (the symlinks) are removed, also the unselected ones, thus removing the previously built chattr and lsattr busybox applets.
----
Jorgen.Pihlflyckt at ajeco.fi

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 9436] e2fsprogs remove busybox applets even of unselected e2fsprogs components

https://bugs.busybox.net/show_bug.cgi?id=9436

--- Comment #1 from Thomas Petazzoni <[email protected]> --- Yes, indeed. The E2FSPROGS_REMOVE_BUSYBOX_APPLETS logic in e2fsprogs.mk must be improved to remove the Busybox version only if the corresponding e2fsprogs program is enabled.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 9436] e2fsprogs remove busybox applets even of unselected e2fsprogs components

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=9436

Carlos Santos <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |ASSIGNED
           Assignee|unassigned at buildroot.uclibc |casantos at datacom.ind.br
                   |.org                        |

--- Comment #2 from Carlos Santos <[email protected]> --- (In reply to Thomas Petazzoni from comment #1)

I'm taking this.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 9436] e2fsprogs remove busybox applets even of unselected e2fsprogs components

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=9436

Carlos Santos <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |WONTFIX
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from Carlos Santos <[email protected]> --- e2fsprogs does not provide an option to disable the build/instalation of chattr and lsattr, so it is not possible to have "chattr" and "lsattr" from busybox along with mkfs from e2fsprogs.

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 here. 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 without 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 libuuid (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. On the other hand the policy for e2fsprogs becomes coherent with the one for
util-linux: busybox never wins.

Notice that a patch solving several issues related to BR2_ROOTFS_MERGED_USR=y was submitted for review:

    http://patchwork.ozlabs.org/patch/748826/
Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 9436] e2fsprogs remove busybox applets even of unselected e2fsprogs components

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=9436

Carlos Santos <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|WONTFIX                     |---
             Status|RESOLVED                    |REOPENED

--- Comment #4 from Carlos Santos <[email protected]> --- Sorry, looks like the changes I submitted to Buildroot will not be accepted so soon, so I think this issue is still open.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 9436] e2fsprogs remove busybox applets even of unselected e2fsprogs components

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=9436

Carlos Santos <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|casantos at datacom.ind.br |unassigned at buildroot.uclibc
| |.org

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 9436] e2fsprogs remove busybox applets even of unselected e2fsprogs components

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=9436

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Thomas Petazzoni <[email protected]> --- Fixed by
https://git.buildroot.org/buildroot/commit/package/e2fsprogs?id=742d6bf13e5bddc5e30edeb8b8c314f47cf97e4d.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#7 lore raw

[Buildroot] [Bug 9436] e2fsprogs remove busybox applets even of unselected e2fsprogs components

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=9436

--- Comment #6 from Joergen Pihlflyckt <[email protected]> --- I agree to this method.

The main problem with the missing utilities (lsattr, chattr) is resolved in this way, even though it's not the way initially suggested. I thing the matter of Busybox versus util-linux is much less important that the fact that the needed utilities _do_ actually get built and installed in the first place.
-----
Jorgen.Pihlflyckt at ajeco.fi

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.