[OpenWrt-Devel,3/7] tools/fakeroot: new tool
diff mbox series

Message ID 20191122095541.688125-4-thomas.petazzoni@bootlin.com
State Changes Requested
Delegated to: Daniel Golle
Headers show
  • SELinux support: core OpenWrt changes
Related show

Commit Message

Thomas Petazzoni Nov. 22, 2019, 9:55 a.m. UTC
SELinux support requires setting the appropriate SELinux security
context to files and directories, which needs to happen at build time
in order to support read-only root filesystem scenarios. In order to
create these security contexts, we will have to run some
SELinux-specific tool on the host machine, but that requires root
access. So this tool adds support for fakeroot, which will be used to
run the SELinux security context creation and the image creation.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 tools/Makefile          |  2 +-
 tools/fakeroot/Makefile | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 tools/fakeroot/Makefile

diff mbox series

diff --git a/tools/Makefile b/tools/Makefile
index 2f57d25525..fd67a880de 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -26,7 +26,7 @@  tools-y += m4 libtool autoconf automake flex bison pkg-config mklibs zlib
 tools-y += sstrip make-ext4fs e2fsprogs mtd-utils mkimage
 tools-y += firmware-utils patch-image quilt padjffs2
 tools-y += mm-macros missing-macros cmake bc findutils gengetopt patchelf
-tools-y += mtools dosfstools libressl
+tools-y += mtools dosfstools libressl fakeroot
 tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
 tools-$(CONFIG_TARGET_x86) += qemu
 tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
diff --git a/tools/fakeroot/Makefile b/tools/fakeroot/Makefile
new file mode 100644
index 0000000000..04d9a0dd60
--- /dev/null
+++ b/tools/fakeroot/Makefile
@@ -0,0 +1,20 @@ 
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/host-build.mk
+	ac_cv_header_sys_capability_h=no \
+	ac_cv_func_capset=no
+$(eval $(call HostBuild))