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@ajeco.fi
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.
(In reply to Thomas Petazzoni from comment #1) I'm taking this.
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/
Sorry, looks like the changes I submitted to Buildroot will not be accepted so soon, so I think this issue is still open.
Fixed by https://git.buildroot.org/buildroot/commit/package/e2fsprogs?id=742d6bf13e5bddc5e30edeb8b8c314f47cf97e4d.
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@ajeco.fi