From 0730b9dc76a921723c8a1919ab4a51b9ad899997 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Apr 2026 16:25:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20Sync=202026-04-10=2016:25:22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hickory-dns/{Makefile => Makefile.k} | 0 alac/Makefile | 4 +-- hickory-dns/Makefile | 11 +++----- luci-app-openclaw/Makefile | 2 +- luci-app-openclaw/README.md | 2 +- .../share/openclaw/oc-config-interactive.js | 26 +++++++++---------- 6 files changed, 20 insertions(+), 25 deletions(-) rename .github/diy/packages/hickory-dns/{Makefile => Makefile.k} (100%) diff --git a/.github/diy/packages/hickory-dns/Makefile b/.github/diy/packages/hickory-dns/Makefile.k similarity index 100% rename from .github/diy/packages/hickory-dns/Makefile rename to .github/diy/packages/hickory-dns/Makefile.k diff --git a/alac/Makefile b/alac/Makefile index 314c6aa80..0bbe832bf 100644 --- a/alac/Makefile +++ b/alac/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=alac PKG_VERSION:=0.0.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/mikebrady/alac.git PKG_SOURCE_DATE:=2019-02-13 -PKG_SOURCE_VERSION:=1832544d27d01335d823d639b176d1cae25ecfd4 +PKG_SOURCE_VERSION:=5d8c5db0dfcadd5872f28e665cf4f4303447352a PKG_MIRROR_HASH:=skip PKG_LICENSE:=Apache-2.0 diff --git a/hickory-dns/Makefile b/hickory-dns/Makefile index f179dda91..2eb8430f1 100644 --- a/hickory-dns/Makefile +++ b/hickory-dns/Makefile @@ -1,17 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hickory-dns -PKG_VERSION:=2026.04.09~34a4cca -PKG_RELEASE:=11 - -HICKORY_COMMIT:=34a4cca1a707b642052b427938b7d1e8aaa71e3a +PKG_VERSION:= +PKG_RELEASE:=12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/hickory-dns/hickory-dns/tar.gz/34a4cca1a707b642052b427938b7d1e8aaa71e3a? +PKG_SOURCE_URL:=https://codeload.github.com/hickory-dns/hickory-dns/tar.gz/v$(PKG_VERSION)? PKG_HASH:=skip -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-34a4cca1a707b642052b427938b7d1e8aaa71e3a - PKG_BUILD_DEPENDS:=rust/host PKG_BUILD_PARALLEL:=1 @@ -51,7 +47,6 @@ define Package/hickory-dns/install $(INSTALL_DIR) $(1)/etc/hickory-dns/ $(INSTALL_BIN) ./files/etc/init.d/hickory-dns $(1)/etc/init.d/hickory-dns $(INSTALL_BIN) ./files/etc/hickory-dns/forwarder.toml $(1)/etc/hickory-dns/forwarder.toml - echo "$(HICKORY_COMMIT)" > $(1)/etc/hickory-dns/commit endef $(eval $(call RustBinPackage,hickory-dns)) diff --git a/luci-app-openclaw/Makefile b/luci-app-openclaw/Makefile index d1335c661..0da921e54 100644 --- a/luci-app-openclaw/Makefile +++ b/luci-app-openclaw/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-openclaw PKG_VERSION:=$(strip $(shell cat $(CURDIR)/VERSION 2>/dev/null || echo "1.0.0")) -PKG_RELEASE:=11 +PKG_RELEASE:=12 PKG_MAINTAINER:=10000ge10000 <10000ge10000@users.noreply.github.com> PKG_LICENSE:=GPL-3.0 diff --git a/luci-app-openclaw/README.md b/luci-app-openclaw/README.md index df1a98029..b2c793470 100644 --- a/luci-app-openclaw/README.md +++ b/luci-app-openclaw/README.md @@ -5,7 +5,7 @@ [![Build & Release](https://github.com/10000ge10000/luci-app-openclaw/actions/workflows/build.yml/badge.svg)](https://github.com/10000ge10000/luci-app-openclaw/actions/workflows/build.yml) [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](LICENSE) -[OpenClaw](https://github.com/nicepkg/openclaw) AI 网关的 OpenWrt LuCI 管理插件。 +[OpenClaw](https://github.com/openclaw/openclaw) AI 网关的 OpenWrt LuCI 管理插件。 在路由器上运行 OpenClaw,通过 LuCI 管理界面完成安装、配置和服务管理。 diff --git a/luci-app-openclaw/root/usr/share/openclaw/oc-config-interactive.js b/luci-app-openclaw/root/usr/share/openclaw/oc-config-interactive.js index fef9e5c4d..d90fbaee5 100644 --- a/luci-app-openclaw/root/usr/share/openclaw/oc-config-interactive.js +++ b/luci-app-openclaw/root/usr/share/openclaw/oc-config-interactive.js @@ -90,12 +90,12 @@ function readConfig() { function writeConfig(config) { const dir = path.dirname(CONFIG_FILE); if (!fs.existsSync(dir)) { - fs.mkdirSync(dir, { recursive: true }); + fs.mkdirSync(dir, { recursive: true }); try { execSync(`chown openclaw:openclaw "${dir}"`, { stdio: "ignore" }); } catch {} } fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2)); try { execSync(`chown openclaw:openclaw "${CONFIG_FILE}"`, { stdio: 'ignore' }); - execSync(`find "${OC_STATE_DIR}" -user root ! -path "*/extensions*" -exec chown openclaw:openclaw {} \; 2>/dev/null || true`, { stdio: 'ignore' }); + execSync(`find "${OC_STATE_DIR}" -user root ! -path "*/extensions*" -exec chown openclaw:openclaw {} + 2>/dev/null || true`, { stdio: 'ignore' }); } catch {} } @@ -202,7 +202,7 @@ function authSetApikey(provider, apiKey, profileId) { const authDir = `${OC_STATE_DIR}/agents/main/agent`; const authFile = `${authDir}/auth-profiles.json`; try { - fs.mkdirSync(authDir, { recursive: true }); + fs.mkdirSync(authDir, { recursive: true }); try { execSync(`chown openclaw:openclaw "${authDir}"`, { stdio: "ignore" }); } catch {} } catch {} let authData = { version: 1, profiles: {}, usageStats: {} }; @@ -222,7 +222,7 @@ function authSetApikey(provider, apiKey, profileId) { fs.writeFileSync(authFile, JSON.stringify(authData, null, 2)); try { execSync(`chown openclaw:openclaw "${authFile}"`, { stdio: 'ignore' }); - execSync(`find "${OC_STATE_DIR}" -user root ! -path "*/extensions*" -exec chown openclaw:openclaw {} \; 2>/dev/null || true`, { stdio: 'ignore' }); + execSync(`find "${OC_STATE_DIR}" -user root ! -path "*/extensions*" -exec chown openclaw:openclaw {} + 2>/dev/null || true`, { stdio: 'ignore' }); } catch {} } @@ -344,14 +344,14 @@ async function restartGateway() { // 兼容 OpenWrt: 优先 ss,回退 netstat let stdout = ''; try { - const result = await runCommand('ss', ['-tulnp']); - stdout = result.stdout; + stdout = execSync('ss -tulnp 2>/dev/null', { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }); } catch { // ss 不存在,使用 netstat - const result = await runCommand('netstat', ['-tulnp']); - stdout = result.stdout; + try { + stdout = execSync('netstat -tulnp 2>/dev/null', { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }); + } catch {} } - if (stdout.includes(`:${gwPort} `)) { + if (stdout && stdout.includes(`:${gwPort} `)) { spin.succeed(`Gateway 已重启成功 (${waited}秒)`); return; } @@ -1103,8 +1103,8 @@ async function configureOllama() { console.log(`\n${C.cyan}检测 Ollama 连通性...${C.reset}`); let modelList = []; try { - const result = await runCommand('curl', ['-sf', '--connect-timeout', '3', '--max-time', '5', `${ollamaUrl}/api/tags`]); - const data = JSON.parse(result.stdout); + const stdout = execSync(`curl -sf --connect-timeout 3 --max-time 5 ${ollamaUrl}/api/tags`, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }); + const data = JSON.parse(stdout); modelList = data.models || []; console.log(`${C.green}✅ Ollama 已连接${C.reset}`); } catch { @@ -1815,7 +1815,7 @@ async function handleReset() { const backupDir = `${OC_STATE_DIR}/backups`; const backupTs = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19); try { - if (!fs.existsSync(backupDir)) fs.mkdirSync(backupDir, { recursive: true }); + if (!fs.existsSync(backupDir)) fs.mkdirSync(backupDir, { recursive: true }); try { execSync(`chown openclaw:openclaw "${backupDir}"`, { stdio: "ignore" }); } catch {} fs.copyFileSync(CONFIG_FILE, `${backupDir}/openclaw_${backupTs}.json`); console.log(`${C.green} 备份已保存: backups/openclaw_${backupTs}.json${C.reset}`); } catch {} @@ -1864,7 +1864,7 @@ async function handleBackup() { resetRenderCount(); const backupDir = `${OC_STATE_DIR}/backups`; - try { if (!fs.existsSync(backupDir)) fs.mkdirSync(backupDir, { recursive: true }); } catch {} + try { if (!fs.existsSync(backupDir)) fs.mkdirSync(backupDir, { recursive: true }); try { execSync(`chown openclaw:openclaw "${backupDir}"`, { stdio: "ignore" }); } catch {} } catch {} switch (choice.value) { case 'create-config': {