Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 00/30] SELinux improvements
@ 2019-09-22  9:06 Thomas Petazzoni
  2019-09-22  9:06 ` [Buildroot] [PATCH 01/30] package/policycoreutils: drop host-dbus-glib dependency from host-policycoreutils Thomas Petazzoni
                   ` (30 more replies)
  0 siblings, 31 replies; 40+ messages in thread
From: Thomas Petazzoni @ 2019-09-22  9:06 UTC (permalink / raw)
  To: buildroot

Hello,

While working on SELinux support in OpenWRT, I re-did the packaging of
a number of SELinux components, and found that a few things could be
improved in Buildroot. Most notably, OpenWRT uses musl as the C
library, and I was able to make the SELinux stack working on musl
without too much effort, while libselinux (and consequently the rest
of the SELinux stack) in Buildroot currently depends on glibc.

So, this patch series:

 - Drops a number of dependencies of host-policycoreutils that are no
   longer needed, and drops passing the ARCH and DESTDIR variables
   when they are not needed

 - Drops the ustr depends from libsemanage (it is no longer used) and
   remove the ustr package as it was only used by libsemanage.

 - Introduces the musl-fts package, which is a replacement fts
   implementation that can be used when the C library is musl or
   uClibc-ng with FTS support disabled (which is our case). Then
   libselinux is modified to use musl-fts, and the glibc dependency is
   dropped from libselinux and all its reverse dependencies.

 - Re-enables libselinux on ARC (it was disabled on this architecture
   back in 2015, due to toolchain issues, but they are resolved): the
   !BR2_arc dependency is dropped from libselinux and all its reverse
   dependencies

This patch series has been tested with the following defconfigs:

* An ARM uClibc defconfig, with all affected packages enabled:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.05.1.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_CHECKPOLICY=y
BR2_PACKAGE_REFPOLICY=y
BR2_PACKAGE_RESTORECOND=y
BR2_PACKAGE_SELINUX_PYTHON=y
BR2_PACKAGE_SEMODULE_UTILS=y
BR2_PACKAGE_SETOOLS=y
BR2_PACKAGE_ANDROID_TOOLS=y
BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT=y
BR2_PACKAGE_ANDROID_TOOLS_ADB=y
BR2_PACKAGE_ANDROID_TOOLS_ADBD=y
# BR2_TARGET_ROOTFS_TAR is not set

* An ARM musl defconfig, with all affected packages enabled:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-cortex-a9-musl-2019.05.1.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_7=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_1=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_CHECKPOLICY=y
BR2_PACKAGE_REFPOLICY=y
BR2_PACKAGE_RESTORECOND=y
BR2_PACKAGE_SELINUX_PYTHON=y
BR2_PACKAGE_SEMODULE_UTILS=y
BR2_PACKAGE_SETOOLS=y
BR2_PACKAGE_ANDROID_TOOLS=y
BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT=y
BR2_PACKAGE_ANDROID_TOOLS_ADB=y
BR2_PACKAGE_ANDROID_TOOLS_ADBD=y
# BR2_TARGET_ROOTFS_TAR is not set

* An ARC defconfig, with all affected packages enabled, which can be
  enabled on ARC (indeed 'audit' is still not available on ARC)

BR2_arcle=y
BR2_archs38=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arcle-hs38-full-2019.05.1.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_RESTORECOND=y
BR2_PACKAGE_SELINUX_PYTHON=y
BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW=y
BR2_PACKAGE_SETOOLS=y
BR2_PACKAGE_ANDROID_TOOLS=y
BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT=y
BR2_PACKAGE_ANDROID_TOOLS_ADB=y
BR2_PACKAGE_ANDROID_TOOLS_ADBD=y
# BR2_TARGET_ROOTFS_TAR is not set

Best regards,

Thomas Petazzoni

Thomas Petazzoni (30):
  package/policycoreutils: drop host-dbus-glib dependency from
    host-policycoreutils
  package/policycoreutils: drop host-python(3) dependency for
    host-policycoreutils
  package/policycoreutils: drop host-setools dependency from
    host-policycoreutils
  package/policycoreutils: drop ARCH variable
  package/policycoreutils: don't pass DESTDIR when building host variant
  package/libsemanage: drop dependency on ustr
  package/ustr: remove package
  package/libsemanage: reformat HOST_LIBSEMANAGE_DEPENDENCIES
  package/musl-fts: new package
  package/libselinux: allow building on !glibc using musl-fts
  package/busybox: selinux support now available on !glibc configs
  package/checkpolicy: now available on !glibc configs
  package/audit: re-enable on musl
  package/selinux-python: now available on !glibc configs
  package/setools: now available on !glibc configs
  package/android-tools: fastboot now available on !glibc toolchains
  package/restorecond: now available on !glibc configs
  package/libsemanage: now available on !glibc configs
  package/policycoreutils: now available on !glibc configs
  package/refpolicy: now available on !glibc configs
  package/libselinux: re-enable on ARC
  package/setools: re-enable on ARC
  package/checkpolicy: re-enable on ARC
  package/selinux-python: re-enable audit2allow on ARC
  package/busybox: re-enable SELinux support on ARC
  package/restorecond: re-enable on ARC
  package/libsemanage: drop !BR2_arc dependency
  package/policycoreutils: drop !BR2_arc dependency
  package/refpolicy: drop !BR2_arc dependency
  package/android-tools: re-enable fastboot on ARC

 Config.in.legacy                              |   8 ++
 DEVELOPERS                                    |   2 +-
 package/Config.in                             |   2 +-
 package/android-tools/Config.in               |   8 +-
 ...tue-functions-for-strndupa-rawmemchr.patch | 133 ++++++++++++++++++
 package/audit/Config.in                       |   6 +-
 package/audit/audit.mk                        |   2 +
 package/busybox/Config.in                     |   2 -
 package/checkpolicy/Config.in                 |   8 +-
 package/libselinux/Config.in                  |  11 +-
 package/libselinux/libselinux.mk              |   5 +
 package/libsemanage/Config.in                 |  12 +-
 package/libsemanage/libsemanage.mk            |  11 +-
 package/musl-fts/Config.in                    |   7 +
 package/musl-fts/musl-fts.hash                |   3 +
 package/musl-fts/musl-fts.mk                  |  21 +++
 package/policycoreutils/Config.in             |   8 +-
 package/policycoreutils/policycoreutils.mk    |  26 +---
 package/refpolicy/Config.in                   |   8 +-
 package/restorecond/Config.in                 |   5 +-
 package/selinux-python/Config.in              |   5 +-
 package/setools/Config.in                     |   9 +-
 package/ustr/Config.in                        |  13 --
 package/ustr/ustr.hash                        |   9 --
 package/ustr/ustr.mk                          |  39 -----
 25 files changed, 214 insertions(+), 149 deletions(-)
 create mode 100644 package/audit/0002-Add-substitue-functions-for-strndupa-rawmemchr.patch
 create mode 100644 package/musl-fts/Config.in
 create mode 100644 package/musl-fts/musl-fts.hash
 create mode 100644 package/musl-fts/musl-fts.mk
 delete mode 100644 package/ustr/Config.in
 delete mode 100644 package/ustr/ustr.hash
 delete mode 100644 package/ustr/ustr.mk

-- 
2.21.0

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2019-10-10 11:22 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-22  9:06 [Buildroot] [PATCH 00/30] SELinux improvements Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 01/30] package/policycoreutils: drop host-dbus-glib dependency from host-policycoreutils Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 02/30] package/policycoreutils: drop host-python(3) dependency for host-policycoreutils Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 03/30] package/policycoreutils: drop host-setools dependency from host-policycoreutils Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 04/30] package/policycoreutils: drop ARCH variable Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 05/30] package/policycoreutils: don't pass DESTDIR when building host variant Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 06/30] package/libsemanage: drop dependency on ustr Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 07/30] package/ustr: remove package Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 08/30] package/libsemanage: reformat HOST_LIBSEMANAGE_DEPENDENCIES Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 09/30] package/musl-fts: new package Thomas Petazzoni
2019-09-23 13:12   ` Matthew Weber
2019-09-23 13:33     ` Thomas Petazzoni
2019-09-23 13:36       ` [Buildroot] [External] " Matthew Weber
2019-09-23 13:44         ` Thomas Petazzoni
2019-10-09 22:31   ` [Buildroot] " Arnout Vandecappelle
2019-10-10  7:05     ` Thomas Petazzoni
2019-10-10 11:22     ` Petr Vorel
2019-09-22  9:06 ` [Buildroot] [PATCH 10/30] package/libselinux: allow building on !glibc using musl-fts Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 11/30] package/busybox: selinux support now available on !glibc configs Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 12/30] package/checkpolicy: " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 13/30] package/audit: re-enable on musl Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 14/30] package/selinux-python: now available on !glibc configs Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 15/30] package/setools: " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 16/30] package/android-tools: fastboot now available on !glibc toolchains Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 17/30] package/restorecond: now available on !glibc configs Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 18/30] package/libsemanage: " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 19/30] package/policycoreutils: " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 20/30] package/refpolicy: " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 21/30] package/libselinux: re-enable on ARC Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 22/30] package/setools: " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 23/30] package/checkpolicy: " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 24/30] package/selinux-python: re-enable audit2allow " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 25/30] package/busybox: re-enable SELinux support " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 26/30] package/restorecond: re-enable " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 27/30] package/libsemanage: drop !BR2_arc dependency Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 28/30] package/policycoreutils: " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 29/30] package/refpolicy: " Thomas Petazzoni
2019-09-22  9:06 ` [Buildroot] [PATCH 30/30] package/android-tools: re-enable fastboot on ARC Thomas Petazzoni
2019-09-22 18:09 ` [Buildroot] [PATCH 00/30] SELinux improvements Arnout Vandecappelle
2019-10-09 22:21   ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox