mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-20 15:45:29 +04:00
procd: update to git HEAD of 2026-10-18
A large number of generic procd, ujail and container related fixes and improvements. See https://git.openwrt.org/project/procd/log/ for the detailed history since commit 6a22d39648. uxc keeps the per-run files of a container, the last exit record, the generated environment file and the resources override, in /tmp/run/uxc/<name>/. The pre-remove hook only stops a package container and deletes it from procd, so that directory stays behind until the next reboot. Remove it in the post-remove hook together with the state and settings of the container. When a container package is upgraded to a new image, the pre-install hook only signals the old container and leaves its instance in procd. The bring-up after the install then adds the container with once, which procd refuses for a container it already has, so the new image starts only after the next reboot. Delete the old container in the pre-install hook, as the pre-remove hook does. uxc kill without a signal returns once the container has stopped, procd forgets a deleted container, and the bring-up starts the new image. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
1 parent
913daed791
commit
5b8554a95e
2 files changed
+15
-15
No files matched your search
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=procd
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
||||
PKG_MIRROR_HASH:=3aa9e70848dd7761c72ce48989965f1d1838fdd0965d971fffac120d1778833a
|
||||
PKG_SOURCE_DATE:=2026-10-07
|
||||
PKG_SOURCE_VERSION:=6a22d3964822f6d58fba4c4686e385ddb7e7fcb1
|
||||
PKG_MIRROR_HASH:=8d2e4f8ab27dbdc06b3f0aef1220e7de7edea492b9d8a69371121c58cb6ddfa1
|
||||
PKG_SOURCE_DATE:=2026-10-18
|
||||
PKG_SOURCE_VERSION:=5aef7c33b01455157c1373a14e2a3fa47d024c6c
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
# uxc container package-hook helpers, sourced by the install scripts of
|
||||
# container-<name> and stack-<app> packages.
|
||||
|
||||
UXC_STOP_WAIT=15
|
||||
uxc_instance_delete() {
|
||||
local name="$1"
|
||||
|
||||
uxc kill "$name" 2>/dev/null
|
||||
ubus call container delete "{\"name\":\"$name\"}" 2>/dev/null
|
||||
}
|
||||
|
||||
uxc_preinst() {
|
||||
local name="$1" newvol="$2" newsize="$3"
|
||||
local reg="/tmp/run/uvol/.meta/uxc/$name.json"
|
||||
local oldvol free i
|
||||
local oldvol free
|
||||
|
||||
[ -n "$IPKG_INSTROOT" ] && return 0
|
||||
|
||||
@@ -22,12 +27,7 @@ uxc_preinst() {
|
||||
[ -z "$oldvol" ] && return 0
|
||||
[ "$oldvol" = "$newvol" ] && return 0
|
||||
|
||||
uxc kill "$name" KILL 2>/dev/null
|
||||
i=0
|
||||
while [ "$i" -lt "$UXC_STOP_WAIT" ] && uxc list 2>/dev/null | grep -qE "^$name[[:space:]].*[[:space:]]running"; do
|
||||
sleep 1
|
||||
i=$((i + 1))
|
||||
done
|
||||
uxc_instance_delete "$name"
|
||||
|
||||
free="$(uvol free 2>/dev/null)"
|
||||
if [ -n "$free" ] && [ -n "$newsize" ] && [ "$free" -lt "$newsize" ]; then
|
||||
@@ -49,8 +49,7 @@ uxc_prerm() {
|
||||
local name="$1"
|
||||
|
||||
[ -n "$IPKG_INSTROOT" ] && return 0
|
||||
uxc kill "$name" 2>/dev/null
|
||||
ubus call container delete "{\"name\":\"$name\"}" 2>/dev/null
|
||||
uxc_instance_delete "$name"
|
||||
|
||||
return 0
|
||||
}
|
||||
@@ -60,7 +59,8 @@ uxc_postrm() {
|
||||
|
||||
[ -n "$IPKG_INSTROOT" ] && return 0
|
||||
|
||||
rm -rf "/tmp/run/uvol/.meta/uxc/state/$name" "/tmp/run/uvol/.meta/uxc/settings/$name.json"
|
||||
rm -rf "/tmp/run/uvol/.meta/uxc/state/$name" "/tmp/run/uvol/.meta/uxc/settings/$name.json" \
|
||||
"/tmp/run/uxc/$name"
|
||||
|
||||
left="$(uvol list 2>/dev/null | while read -r vn rest; do
|
||||
case "$vn" in "$name"|"$name".*) echo "$vn";; esac
|
||||
|
||||
Reference in new issue
Block a user