update 2026-11-09 01:30:04

This commit is contained in:
action committed 2026-11-09 01:30:04 +08:00
1 parent aa1fb29c6f
commit 918b060aae
8 files changed
+41 -23

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=honk
PKG_VERSION:=2026.11.08.2
PKG_VERSION:=2026.11.08.4
PKG_RELEASE:=1
# Pinned honk-core revision (upstream daeuniverse/honk main), cross-compiled by
+2 -12
View File
@@ -67,18 +67,7 @@ system_config_readonly() {
}
no_honk_resources() {
# honk-core removes dae0/dae0peer and the daens netns when it exits cleanly. A
# crash or SIGKILL leaves them behind, and preflight then refuses every later
# start, so the service can never come back without hand surgery. Reclaim them
# here, but only when no core is running to own them.
if ! pidof honk-core >/dev/null 2>&1; then
for stale_link in dae0 dae0peer; do
ip link show "$stale_link" >/dev/null 2>&1 && ip link del "$stale_link" >/dev/null 2>&1
done
if ip netns list 2>/dev/null | awk '{print $1}' | grep -qx daens; then
ip netns del daens >/dev/null 2>&1
fi
fi
honk_lifecycle_reclaim_resources || :
for link in dae0 dae0peer; do
ip link show "$link" >/dev/null 2>&1 && { fail "$link 已存在(上次没有正常退出),请先停止服务或执行系统恢复"; return 1; }
done
@@ -1237,6 +1226,7 @@ recover() {
return 1
fi
fi
honk_lifecycle_reclaim_resources || :
echo '{"ok":true,"message":"transaction_recovered"}'
}
+33 -3
View File
@@ -3,6 +3,21 @@
HONK_LIFECYCLE_CORE=/usr/bin/honk-core
HONK_LIFECYCLE_HAVE_TIMEOUT=$(command -v timeout 2>/dev/null)
HONK_LIFECYCLE_TICKS=1
honk_lifecycle_detect_pause() {
HONK_LIFECYCLE_TICKS=1
[ -n "$HONK_LIFECYCLE_HAVE_TIMEOUT" ] || return 0
pause_before=$(cut -d' ' -f1 /proc/uptime 2>/dev/null)
[ -n "$pause_before" ] || return 0
timeout 0.25 sleep 1 2>/dev/null
pause_after=$(cut -d' ' -f1 /proc/uptime 2>/dev/null)
[ -n "$pause_after" ] || return 0
awk -v a="$pause_before" -v b="$pause_after" 'BEGIN { exit (b - a >= 0.15) ? 0 : 1 }' && \
HONK_LIFECYCLE_TICKS=4
return 0
}
honk_lifecycle_detect_pause
# 字段归属:自带 global/experimental → file;只 include system.dae(且写法规范)→ system;
# 其余一律 unknown。写法不规范时不猜,直接拒绝。
config_owner() {
@@ -49,7 +64,7 @@ config_owner() {
# 启动轮询用 0.25 秒粒度,核心就绪后尽快返回;没有 timeout 命令时退回 1 秒。
honk_lifecycle_pause() {
if [ -n "$HONK_LIFECYCLE_HAVE_TIMEOUT" ]; then
if [ "$HONK_LIFECYCLE_TICKS" -gt 1 ]; then
timeout 0.25 sleep 1 2>/dev/null
return 0
fi
@@ -163,6 +178,18 @@ honk_lifecycle_resources_clear() {
! ip netns list 2>/dev/null | awk '{print $1}' | grep -qx daens
}
honk_lifecycle_reclaim_resources() {
command -v ip >/dev/null 2>&1 || return 1
[ -z "$(pidof honk-core 2>/dev/null)" ] || return 1
for hlp_link in dae0 dae0peer; do
ip link show "$hlp_link" >/dev/null 2>&1 && ip link del "$hlp_link" >/dev/null 2>&1
done
if ip netns list 2>/dev/null | awk '{print $1}' | grep -qx daens; then
ip netns del daens >/dev/null 2>&1
fi
honk_lifecycle_resources_clear
}
honk_lifecycle_drain() {
hlp_timeout=${1:-30}
while [ "$hlp_timeout" -gt 0 ]; do
@@ -186,7 +213,10 @@ honk_lifecycle_drain() {
done
hlp_wait=1
fi
honk_lifecycle_resources_clear || hlp_wait=1
if ! honk_lifecycle_resources_clear; then
honk_lifecycle_reclaim_resources || :
honk_lifecycle_resources_clear || hlp_wait=1
fi
honk_lifecycle_parse_listen || { echo "honk lifecycle: invalid configured listener" >&2; return 1; }
hlp_port=$HONK_LIFECYCLE_PORT
if honk_lifecycle_port_open "$hlp_port"; then hlp_wait=1; fi
@@ -277,7 +307,7 @@ honk_lifecycle_start() {
fi
honk_lifecycle_pause
hlp_tick=$((hlp_tick + 1))
[ "$hlp_tick" -lt 4 ] || { hlp_tick=0; hlp_timeout=$((hlp_timeout - 1)); }
[ "$hlp_tick" -lt "$HONK_LIFECYCLE_TICKS" ] || { hlp_tick=0; hlp_timeout=$((hlp_timeout - 1)); }
done
echo "honk lifecycle: new managed core did not become stable and own its API listener" >&2
return 1
-2
View File
@@ -847,7 +847,6 @@ validate_candidate() {
candidate=$1
uci_dir=$2
state=$3
# local = 本机自己拍的快照(备份/重置),archive = 从别的设备导入的包。
identity=${4:-local}
config_tree=$candidate/etc/honk
mkdir -p "$temp_dir/uci-tmp" || return 1
@@ -870,7 +869,6 @@ validate_candidate() {
network_get_device candidate_device "$u_network" || return 1
network_get_ipaddr candidate_ip "$u_network" || return 1
if [ "$identity" = archive ]; then
# 包里记的是原设备的 IP,落地时会被改写;拿本机 IP 比会拒掉换设备的备份。
archive_lan=$(sed -n "s/^ lan_interface: '\([^']*\)'$/\1/p" "$config_tree/system.dae")
archive_listen=$(sed -n "s/^ listen: '\([^']*\)'$/\1/p" "$config_tree/system.dae")
validate_config_tree "$config_tree" "$archive_lan" "${archive_listen%:*}" "${archive_listen##*:}" "$u_initialized" || return 2
+1 -1
View File
@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-honk
PKG_VERSION:=2026.11.08.2
PKG_VERSION:=2026.11.08.4
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
@@ -418,7 +418,6 @@ return view.extend({
}).finally(function() { setBackupBusy(false); });
});
/* 只让用户选一次文件:上传对话框自己会弹选择框。 */
importBtn.addEventListener('click', function(ev) {
ev.preventDefault();
if (backupBusy) return;
@@ -91,10 +91,12 @@ const callLogs = rpc.declare({
const callUpdateCheck = rpc.declare({ object: 'honk', method: 'update_check', expect: { '': {} } });
const callUpdateApply = rpc.declare({ object: 'honk', method: 'update_apply', expect: { '': {} } });
if (!L.env.rpctimeout || L.env.rpctimeout < 180)
L.env.rpctimeout = 180;
let pageStylesInstalled = false;
let switchStylesInstalled = false;
/* 开关样式随 JS 注入:CSS 与 JS 分开缓存,主题又各改各的 checkbox/button。 */
const SWITCH_CSS = [
'.honk-page .honk-switch-wrap{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;vertical-align:middle;line-height:1}',
'.honk-page .honk-switch-label{font-size:11px;font-weight:600;letter-spacing:.3px;opacity:.62}',
@@ -103,7 +105,6 @@ const SWITCH_CSS = [
'.honk-page .honk-switch.is-on{background:rgba(74,160,101,.65)!important}',
'.honk-page .honk-switch:disabled{opacity:.45;cursor:not-allowed}',
'.honk-page .honk-switch:focus-visible{outline:2px solid rgba(74,160,101,.75);outline-offset:2px}',
/* 0,3,1 才压得过 honk.css 里那颗 46px !important 的 checkbox。 */
'.honk-page .honk-switch-wrap>input.honk-switch-input{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important;appearance:none!important;-webkit-appearance:none!important;box-shadow:none!important;background:none!important}'
].join('\n');
+1 -1
View File
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for KSpeeder
LUCI_DEPENDS:=+istoreenhance +luci-lib-linkeaseauth +linkease-app-entry
LUCI_PKGARCH:=all
PKG_VERSION:=0.8.8-r1
PKG_VERSION:=0.9.0-r1
PKG_RELEASE:=
include $(TOPDIR)/feeds/luci/luci.mk