procd: update to git HEAD
authorDaniel Golle <daniel@makrotopia.org>
Fri, 10 Jul 2020 17:52:28 +0000 (18:52 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 10 Jul 2020 17:57:05 +0000 (18:57 +0100)
 ea7a790 jail: add support for running OCI bundle
 bb4a446 uxc: add container management CLI tool

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/system/procd/Makefile
package/system/procd/files/uxc.init [new file with mode: 0644]

index 5647a473267d0346df40f81cb5d2c0d39b2836a2..ca5bf5e4d4605b5db1f91c91fa8ec0fac5b1d7b5 100644 (file)
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2020-05-28
-PKG_SOURCE_VERSION:=b9b39e2061d7035a9d84eecbb4a4613deaf6d03f
-PKG_MIRROR_HASH:=0d6a96a2fb38f72c72b457a2a8638bee22f91009f9686152fcf4aee97846fc84
+PKG_SOURCE_DATE:=2020-07-10
+PKG_SOURCE_VERSION:=bb4a4467b1d5ccbc84d89822235a38b63134e5a4
+PKG_MIRROR_HASH:=1e6d79834ffb861450ccec4162c068d6ca29fd0227c3346203f0d02810abc940
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0
@@ -70,6 +70,14 @@ define Package/procd-seccomp
   TITLE:=OpenWrt process seccomp helper + utrace
 endef
 
+define Package/uxc
+  SECTION:=base
+  CATEGORY:=Base system
+  DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json
+  TITLE:=OpenWrt container management
+  MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+endef
+
 define Package/procd/config
 menu "Configuration"
        depends on PACKAGE_procd
@@ -130,7 +138,19 @@ define Package/procd-seccomp/install
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libpreload-trace.so $(1)/lib
 endef
 
+define Package/uxc/conffiles
+/etc/uxc
+endef
+
+define Package/uxc/install
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/uxc $(1)/sbin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/uxc.init $(1)/etc/init.d/uxc
+endef
+
 $(eval $(call BuildPackage,procd))
 $(eval $(call BuildPackage,procd-ujail))
 $(eval $(call BuildPackage,procd-ujail-console))
 $(eval $(call BuildPackage,procd-seccomp))
+$(eval $(call BuildPackage,uxc))
diff --git a/package/system/procd/files/uxc.init b/package/system/procd/files/uxc.init
new file mode 100644 (file)
index 0000000..035c8b0
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+NAME=uxc
+PROG=/sbin/uxc
+
+start_service() {
+       [ "${__BOOT_UXC}" = "1" ] || return 0
+       procd_open_instance "uxc"
+       procd_set_param command "$PROG" boot
+       procd_close_instance
+}
+
+boot() {
+       __BOOT_UXC=1
+       start
+}