util-linux: libblkid needs fork(), disable on !MMU
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 23 Feb 2014 22:58:07 +0000 (23:58 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 24 Feb 2014 08:01:05 +0000 (09:01 +0100)
The libblkid library in util-linux uses fork. While it seems
potentially possible to disable the parts of the library that use fork
(the only parts using fork are parts related to LVM and Device Mapper,
which are said to be legacy as they are replaced by sysfs based
scanning, instead of having to fork to run a separate process).

However, since libblkid is used by:

 - e2fsprogs, which uses lots of fork all over the place
 - udev, which most likely will also need fork

There is not much point in making libblkid fork-less. As a
consequence, this commit makes util-linux/libblkid unavailable on
non-MMU architectures, and propagates the relevant dependency to the
reverse dependencies of libblkid.

This fixes the e2fsprogs build failure seen on Blackfin. The failure
was due to a configure test of e2fsprogs which was trying to link a
small test program against libblkid, which failed because there was an
undefined reference to fork() in the libblkid code.

Fixes:

  http://autobuild.buildroot.net/results/ee2c1568d16ac040011dd4d6d8b543ff9e9e2622/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/cryptsetup/Config.in
package/e2fsprogs/Config.in
package/udev/Config.in
package/util-linux/Config.in
system/Config.in

index 9fbe74c9e38302d7756d33e55f5f3709b300c483..8405963c655099b47f89766d740bdc1873216d91 100644 (file)
@@ -6,7 +6,7 @@ config BR2_PACKAGE_CRYPTSETUP
        select BR2_PACKAGE_E2FSPROGS
        select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
        depends on BR2_LARGEFILE # lvm2, util-linux
-       depends on BR2_USE_MMU # lvm2
+       depends on BR2_USE_MMU # lvm2, e2fsprogs
        depends on !BR2_PREFER_STATIC_LIB # lvm2
        depends on BR2_USE_WCHAR # util-linux
        help
index 7775e944e20abe06355941427f1ce643a5dd2de1..ae4da9572271de71c52cd0e9bb94848f6a6282c3 100644 (file)
@@ -3,6 +3,7 @@ config BR2_PACKAGE_E2FSPROGS
        bool "e2fsprogs"
        depends on BR2_LARGEFILE
        depends on BR2_USE_WCHAR # util-linux
+       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
index 7aa79c4452ed691be3418ce92f4d855e27ef5806..c59abbefb181da8f85ff2941c5a7ed401a5a7494 100644 (file)
@@ -5,6 +5,7 @@ config BR2_PACKAGE_UDEV
        depends on BR2_LARGEFILE # util-linux
        depends on BR2_USE_WCHAR # util-linux
        depends on !BR2_PREFER_STATIC_LIB # kmod
+       depends on BR2_USE_MMU # util-linux/libblkid
        select BR2_PACKAGE_UTIL_LINUX
        select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
        select BR2_PACKAGE_KMOD
index 8c8fd7ab5c66049a42a83f2c2f4e68a9fa8632ab..b1db99a6b4db3a0c281b56ca1894e06701ad55d6 100644 (file)
@@ -14,6 +14,7 @@ if BR2_PACKAGE_UTIL_LINUX
 
 config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
        select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+       depends on BR2_USE_MMU # fork
        bool "libblkid"
        help
          Install libblkid.
@@ -22,6 +23,7 @@ config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
        select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
        # libc lacks UTIME_NOW & UTIME_COMMIT
        depends on !(BR2_microblazeel || BR2_microblazebe)
+       depends on BR2_USE_MMU # util-linux/libblkid
        bool "libmount"
        help
          Install libmount.
index 181a0ac12a06056cbe6f0a4fa1eb8d24656b3b2b..f9623b97ab515616985c1a874a59742d649bda00 100644 (file)
@@ -127,6 +127,7 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
        depends on BR2_LARGEFILE # udev
        depends on BR2_USE_WCHAR # udev
        depends on !BR2_PREFER_STATIC_LIB # udev -> kmod
+       depends on BR2_USE_MMU # udev -> util-linux/libblkid
        select BR2_PACKAGE_UDEV
 
 comment "udev needs a toolchain w/ largefile, wchar"