Skip to contentSkip to conversation

util-linux builds and installs lots of unwanted binaries

Buildroot Sven Neumann 2 participants 6 messages Apr 16, 2012 – Apr 25, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

recently udev started to depend on util-linux for libblkid. Since then there are lots of binaries built and installs that did not asked for. Here's an incomplete list of such binaries:

blockdev, fdformat, fsck.minix, isosize, mkfs, mkfs.bfs, mkfs.minix, mkswap, swaplabel, sfdisk, getopt, getopt-parse.bash, getopt-parse.tcsh, cal logger look mcookie namei whereis

Now I am wondering about the best way to change this so that only the libraries are built and installed unless util-linux is configured otherwise. I am looking for a solution that can be accepted in buildbot. And if changes to util-linux are needed, then those should have a chance to be accepted upstream in util-linux. What would you advice?

Regards,
Sven

#1 lore raw
Quoted 21 lines · Sven Neumann

Hi,

recently udev started to depend on util-linux for libblkid. Since then
there are lots of binaries built and installs that did not asked for. Here's an incomplete list of such binaries:

blockdev, fdformat, fsck.minix, isosize, mkfs, mkfs.bfs, mkfs.minix, mkswap, swaplabel, sfdisk, getopt, getopt-parse.bash, getopt-parse.tcsh,
cal logger look mcookie namei whereis

Now I am wondering about the best way to change this so that only the libraries are built and installed unless util-linux is configured otherwise. I am looking for a solution that can be accepted in buildbot.
And if changes to util-linux are needed, then those should have a chance
to be accepted upstream in util-linux. What would you advice?

Quoted 2 lines

Regards,
Sven

http://lists.busybox.net/pipermail/buildroot/2011-October/046854.html
Regards.

#2 lore raw

Hi,

Quoted 19 lines · Gustavo Zacarias
Quoted 19 lines

recently udev started to depend on util-linux for libblkid. Since then
there are lots of binaries built and installs that did not asked for. Here's an incomplete list of such binaries:

blockdev, fdformat, fsck.minix, isosize, mkfs, mkfs.bfs, mkfs.minix, mkswap, swaplabel, sfdisk, getopt, getopt-parse.bash, getopt-parse.tcsh,
cal logger look mcookie namei whereis

Now I am wondering about the best way to change this so that only the libraries are built and installed unless util-linux is configured otherwise. I am looking for a solution that can be accepted in buildbot.
And if changes to util-linux are needed, then those should have a chance
to be accepted upstream in util-linux. What would you advice?

Quoted 4 lines
Quoted 2 lines

Regards,
Sven

http://lists.busybox.net/pipermail/buildroot/2011-October/046854.html

Thanks. This works for us. But I would like to see such a change to go into buildroot and I understand why this patch has not been accepted in this form. The general idea of overriding the install command is nice, however the newly introduced option BR2_PACKAGE_UTIL_LINUX_BASIC is somewhat misleading. It gives the impression that it would select the basic utilities and instead no utility will be installed unless it is selected. It should probably be renamed and other options like BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS would have to depend on it or select it.

Nevertheless, thanks a lot for your help with this patch.

Regards,
Sven

#3 lore raw
Quoted 17 lines · Sven Neumann
Quoted 2 lines

http://lists.busybox.net/pipermail/buildroot/2011-October/046854.html

Thanks. This works for us. But I would like to see such a change to go
into buildroot and I understand why this patch has not been accepted in
this form. The general idea of overriding the install command is nice,
however the newly introduced option BR2_PACKAGE_UTIL_LINUX_BASIC is somewhat misleading. It gives the impression that it would select the basic utilities and instead no utility will be installed unless it is selected. It should probably be renamed and other options like BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS would have to depend on it or select
it.

Quoted 5 lines

Nevertheless, thanks a lot for your help with this patch.

Regards,
Sven

Cool, feedback at last ;)
Yes, i should make the other options depend on UTIL_LINUX_BASIC. However there's a choice in front regarding UTIL_LINUX_BASIC - with all the util-linux options disabled and this one enabled you still get binary stuff installed because they're, well, basic utilities always built by util-linux.
So the option would be to keep the basic option as is or add more granular options for all those other tiny utilities described in the help and remove/keep them in a post hook.
I'd rather go for the second option since not many people will want mkfs.bfs, mkfs.minix and those utilities most of the time, even when installing others.
Regards.

Ideas?

#4 lore raw
Quoted 11 lines · Gustavo Zacarias

Yes, i should make the other options depend on UTIL_LINUX_BASIC. However there's a choice in front regarding UTIL_LINUX_BASIC - with all the util-linux options disabled and this one enabled you still get binary stuff installed because they're, well, basic utilities always built by util-linux.
So the option would be to keep the basic option as is or add more granular options for all those other tiny utilities described in the help and remove/keep them in a post hook.
I'd rather go for the second option since not many people will want mkfs.bfs, mkfs.minix and those utilities most of the time, even when installing others.

Adding an option for each and every utility would probably be too much. But we could introduce options for each of the sub-directories in util-linux (disk-utils, misc-utils, etc). Then one could use 'make -D (subdir) install' to install all the utilities from a sub-directory.

Regards,
Sven

#5 lore raw
Quoted 9 lines · Sven Neumann

Adding an option for each and every utility would probably be too much.
But we could introduce options for each of the sub-directories in util-linux (disk-utils, misc-utils, etc). Then one could use 'make -D (subdir) install' to install all the utilities from a sub-directory.

Regards,
Sven

Just sent a new version of the patch.
I'll just steer away from going all detailed on the options and kept it simple with an "install utilities" option.
If someone needs util-linux i take it they're ready to pay the price either in time (removing unused) or space for it.
Regards.