[openwrt/openwrt] util-linux: added unshare and nsenter executables

LEDE Commits lede-commits at lists.infradead.org
Fri Mar 9 16:17:07 PST 2018


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/57468c7142e8d6e1da01cce02dcecd8c88ab455e

commit 57468c7142e8d6e1da01cce02dcecd8c88ab455e
Author: Toni Uhlig <matzeton at googlemail.com>
AuthorDate: Sat Mar 3 22:18:28 2018 +0100

    util-linux: added unshare and nsenter executables
    
    Signed-off-by: Toni Uhlig <matzeton at googlemail.com>
---
 package/utils/util-linux/Makefile | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile
index fcfc7c7..ed974ce 100644
--- a/package/utils/util-linux/Makefile
+++ b/package/utils/util-linux/Makefile
@@ -318,6 +318,15 @@ define Package/namei/description
  files, directories, and so forth)
 endef
 
+define Package/nsenter
+$(call Package/util-linux/Default)
+  TITLE:=enter a namespace
+endef
+
+define Package/nsenter/description
+  run program with namespaces of other processes
+endef
+
 define Package/prlimit
 $(call Package/util-linux/Default)
   TITLE:=get and set process resource limits
@@ -395,6 +404,15 @@ define Package/swap-utils/description
  contains: mkswap, swaplabel
 endef
 
+define Package/unshare
+$(call Package/util-linux/Default)
+  TITLE:=unshare userspace tool
+endef
+
+define Package/unshare/description
+  run programs with some namespaces unshared from parent
+endef
+
 define Package/uuidd
 $(call Package/util-linux/Default)
   TITLE:=UUID generation daemon
@@ -633,6 +651,11 @@ define Package/namei/install
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/namei $(1)/usr/bin/
 endef
 
+define Package/nsenter/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsenter $(1)/usr/bin/
+endef
+
 define Package/prlimit/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prlimit $(1)/usr/bin/
@@ -672,6 +695,11 @@ define Package/swap-utils/install
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swaplabel $(1)/usr/sbin/
 endef
 
+define Package/unshare/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/unshare $(1)/usr/bin/
+endef
+
 define Package/uuidd/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin//uuidd $(1)/usr/sbin/
@@ -722,6 +750,7 @@ $(eval $(call BuildPackage,lscpu))
 $(eval $(call BuildPackage,mcookie))
 $(eval $(call BuildPackage,mount-utils))
 $(eval $(call BuildPackage,namei))
+$(eval $(call BuildPackage,nsenter))
 $(eval $(call BuildPackage,prlimit))
 $(eval $(call BuildPackage,rename))
 $(eval $(call BuildPackage,partx-utils))
@@ -729,6 +758,7 @@ $(eval $(call BuildPackage,script-utils))
 $(eval $(call BuildPackage,setterm))
 $(eval $(call BuildPackage,sfdisk))
 $(eval $(call BuildPackage,swap-utils))
+$(eval $(call BuildPackage,unshare))
 $(eval $(call BuildPackage,uuidd))
 $(eval $(call BuildPackage,uuidgen))
 $(eval $(call BuildPackage,wall))



More information about the lede-commits mailing list