[openwrt/openwrt] libsepol: break out chkcon utility

LEDE Commits lede-commits at lists.infradead.org
Sun Sep 27 12:22:22 EDT 2020


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d96d32428067882b34cfebd2b59b7eaba9a96af3

commit d96d32428067882b34cfebd2b59b7eaba9a96af3
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Sep 27 17:21:23 2020 +0100

    libsepol: break out chkcon utility
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/libs/libsepol/Makefile | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/package/libs/libsepol/Makefile b/package/libs/libsepol/Makefile
index 2a6bd46ad0..8ceb7164a7 100644
--- a/package/libs/libsepol/Makefile
+++ b/package/libs/libsepol/Makefile
@@ -30,6 +30,18 @@ define Package/libsepol/description
 	depend upon or use any of the other SELinux components.
 endef
 
+define Package/chkcon
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libsepol
+  TITLE:=libsepol chkcon security context validation tool
+  URL:=http://selinuxproject.org/page/Main_Page
+endef
+
+define Package/chkcon/description
+	chkcon - determine if a security context is valid for a given binary policy
+endef
+
 HOST_MAKE_FLAGS += \
 	PREFIX=$(STAGING_DIR_HOSTPKG) \
 	SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib
@@ -62,5 +74,11 @@ define Package/libsepol/install
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsepol.so.* $(1)/usr/lib/
 endef
 
+define Package/chkcon/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chkcon $(1)/usr/bin/
+endef
+
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,libsepol))
+$(eval $(call BuildPackage,chkcon))



More information about the lede-commits mailing list