procd: update to git HEAD

aed7fb3 procd: fix compilation with uClibc-ng
 9d0f831 jail: fix segfault with len(uidmap/gidmap) > 1
 42a6217 jail: consider PATH for argv in OCI container
 83f4b72 jail: actually chdir into OCI defined CWD
 fc9f614 jail: parse and run OCI hooks
 02eec92 jail: memory allocation fixes
 71e75f4 jail: refactor mount support to cover OCI spec
 b586e7d jail: don't make mount source read-only
 dacab12 uxc: fix 'stop' command

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2020-07-13 12:19:08 +01:00 committed by CN_SZTL
parent 3e9eac6b1d
commit 658b8ba5f4
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 51 additions and 4 deletions

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=procd
PKG_RELEASE:=2
PKG_RELEASE:=3
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-13
PKG_SOURCE_VERSION:=dacab12b301085eac00e84a94e42096de70886e8
PKG_MIRROR_HASH:=e9c49884ea1dd6554ce057c8ca7fb23bc980939b92e11f43d37b930c29f63dbd
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))

View File

@ -48,6 +48,15 @@ _PROCD_SERVICE=
procd_lock() {
local basescript=$(readlink "$initscript")
local service_name="$(basename ${basescript:-$initscript})"
flock -n 1000 &> /dev/null
if [ "$?" != "0" ]; then
exec 1000>"$IPKG_INSTROOT/var/lock/procd_${service_name}.lock"
flock 1000
if [ "$?" != "0" ]; then
logger "warning: procd flock for $service_name failed"
fi
fi
}
_procd_call() {

View File

@ -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
}