]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
libselinux: bump to version 2.5
authorAdam Duskett <Aduskett@gmail.com>
Sun, 26 Jun 2016 22:39:11 +0000 (18:39 -0400)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 1 Jul 2016 09:06:05 +0000 (11:06 +0200)
In addition, if a user is using glibc 2.22, the default CFLAG
D_FILE_OFFSET_BITS=64 will cause a compile error.  This flag is now
removed from the CFLAGS in the make file to ensure that toolchains
compiled against glibc 2.22 will build the new version of the package
properly.

In addition, libselinux now uses fts(), which is not available on musl,
and not provided by our default uClibc configuration. Therefore,
libselinux now depends on glibc, as well as all its reverse
dependencies.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas: add glibc dependency for fts().]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/android-tools/Config.in
package/busybox/Config.in
package/libselinux/Config.in
package/libselinux/libselinux.hash
package/libselinux/libselinux.mk
package/libsemanage/Config.in
package/setools/Config.in

index 35bb8af6efeb803721c3813e3b4fc296bfd146bf..2503a2808224811fcfda500a2d905ec7271bd6fd 100644 (file)
@@ -23,15 +23,17 @@ config BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT
        select BR2_PACKAGE_ZLIB
        depends on BR2_TOOLCHAIN_HAS_THREADS # libselinux
        depends on !BR2_STATIC_LIBS # libselinux
+       depends on BR2_TOOLCHAIN_USES_GLIBC # libselinux
        depends on !BR2_arc # libselinux
        help
          This option will build and install the fastboot utility for
          the target, which can be used to reflash other target devices
          implementing the fastboot protocol.
 
-comment "fastboot needs a toolchain w/ threads, dynamic library"
+comment "fastboot needs a glibc toolchain w/ threads, dynamic library"
        depends on !BR2_arc
-       depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+       depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
+               !BR2_TOOLCHAIN_USES_GLIBC
 
 config BR2_PACKAGE_ANDROID_TOOLS_ADB
        bool "adb"
index a3a328d4840e0e51d864aee56299258b01138d01..91c5d9eff317c5e902b48d310ab92ce3e71b45a8 100644 (file)
@@ -36,6 +36,7 @@ config BR2_PACKAGE_BUSYBOX_SELINUX
        select BR2_PACKAGE_LIBSELINUX
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on !BR2_STATIC_LIBS
+       depends on BR2_TOOLCHAIN_USES_GLIBC
        depends on !BR2_arc
        bool "Enable SELinux support"
        help
index bc8298db4c4d77ddf45e96ca5a9fa83e2ca47280..c88669b439f2caf56e61facf47617792c3ffb160 100644 (file)
@@ -4,6 +4,8 @@ config BR2_PACKAGE_LIBSELINUX
        select BR2_PACKAGE_PCRE
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on !BR2_STATIC_LIBS
+       # Uses <fts.h>, not available in musl or uClibc
+       depends on BR2_TOOLCHAIN_USES_GLIBC
        # Toolchain issue: "fixup not contained within frag"
        depends on !BR2_arc
        help
@@ -17,6 +19,7 @@ config BR2_PACKAGE_LIBSELINUX
 
          http://selinuxproject.org/page/Main_Page
 
-comment "libselinux needs a toolchain w/ threads, dynamic library"
+comment "libselinux needs a glibc toolchain w/ threads, dynamic library"
        depends on !BR2_arc
-       depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+       depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
+               !BR2_TOOLCHAIN_USES_GLIBC
index 861c327ffad4efdc6a1e3b8d3f05264186192e1f..a4c34408be9836069dde54431deeb51bcc85adb2 100644 (file)
@@ -1,2 +1,2 @@
 # Locally computed
-sha256 57aad47c06b7ec18a76e8d9870539277a84cb40109cfdcf70ed3260bdb04447a libselinux-2.1.13.tar.gz
+sha256 94c9e97706280bedcc288f784f67f2b9d3d6136c192b2c9f812115edba58514f libselinux-2.5.tar.gz
index d4b96c47d10107f4babda95d57919aa13df91390..6f9417321afe4ac2dddccc2db27ba393035e6aa1 100644 (file)
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-LIBSELINUX_VERSION = 2.1.13
-LIBSELINUX_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20130423
+LIBSELINUX_VERSION = 2.5
+LIBSELINUX_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223
 LIBSELINUX_LICENSE = Public Domain
 LIBSELINUX_LICENSE_FILES = LICENSE
 
@@ -13,8 +13,10 @@ LIBSELINUX_DEPENDENCIES = libsepol pcre
 
 LIBSELINUX_INSTALL_STAGING = YES
 
+# Filter out D_FILE_OFFSET_BITS=64. This fixes errors caused by glibc 2.22.
 LIBSELINUX_MAKE_OPTS = \
        $(TARGET_CONFIGURE_OPTS) \
+       CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
        LDFLAGS="$(TARGET_LDFLAGS) -lpcre -lpthread" \
        ARCH=$(KERNEL_ARCH)
 
index 5e9ad8fee557bad324318dc847c4b541edca6f67..4465ef46d88648b01c74cd33b0d489ebc8df9aed 100644 (file)
@@ -5,7 +5,9 @@ config BR2_PACKAGE_LIBSEMANAGE
        select BR2_PACKAGE_BZIP2
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on !BR2_STATIC_LIBS
-       depends on !BR2_TOOLCHAIN_USES_MUSL # getpwent_r()
+       # libselinux needs fts.h (not available in uClibc/musl) and
+       # libsemanage itself needs getpwent_r() not available in musl
+       depends on BR2_TOOLCHAIN_USES_GLIBC
        depends on !BR2_arc
        help
          libsemanage is the policy management library. It uses
@@ -18,7 +20,7 @@ config BR2_PACKAGE_LIBSEMANAGE
 
          http://selinuxproject.org/page/Main_Page
 
-comment "libsemanage needs a toolchain w/ threads, dynamic library"
+comment "libsemanage needs a glibc toolchain w/ threads, dynamic library"
        depends on !BR2_arc
-       depends on !BR2_TOOLCHAIN_USES_MUSL
-       depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+       depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
+               !BR2_TOOLCHAIN_USES_GLIBC
index c291b2176ea043d429a060ac38464beec7fb2264..5e7f39d65f9f3b7a5b12f810e7362a4ddb9362e7 100644 (file)
@@ -8,6 +8,7 @@ config BR2_PACKAGE_SETOOLS
        depends on !BR2_STATIC_LIBS
        depends on BR2_INSTALL_LIBSTDCPP
        depends on BR2_USE_WCHAR
+       depends on BR2_TOOLCHAIN_USES_GLIBC # libselinux
        # bfin: infamous _ symbol prefix issue
        # nios2: triggers some toolchain issue "No symbol version
        # section for versioned symbol"
@@ -28,7 +29,8 @@ config BR2_PACKAGE_SETOOLS
 
          https://github.com/TresysTechnology/setools3/wiki
 
-comment "setools needs a toolchain w/ threads, C++, wchar, dynamic library"
+comment "setools needs a glibc toolchain w/ threads, C++, wchar, dynamic library"
        depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
-               || !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP
+               || !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP \
+               || !BR2_TOOLCHAIN_USES_GLIBC
        depends on !BR2_nios2 && !BR2_bfin && !BR2_arc