diff --git a/fail2banop/Makefile b/fail2banop/Makefile index d7ca38d20..756df9b6e 100644 --- a/fail2banop/Makefile +++ b/fail2banop/Makefile @@ -12,7 +12,7 @@ PKG_ARCH_FAIL2BANOP:=$(ARCH) PKG_NAME:=fail2banop # use PKG_SOURCE_DATE instead of PKG_VERSION for compitable PKG_SOURCE_DATE:=1.0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 ARCH_HEXCODE:= ifeq ($(ARCH),x86_64) ARCH_HEXCODE=8664 @@ -23,7 +23,7 @@ ARCH_HEXCODE=aa32 else ifeq ($(ARCH),mipsel) ARCH_HEXCODE=1b0c endif -PKG_SOURCE_VERSION:=9c34c802ea35f801932edc27839d498c4e6e9be9 +PKG_SOURCE_VERSION:=f20ec4f5cbd5d070e4c52d00558a9b8ec33051a0 PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_SOURCE_DATE).tar.gz PKG_SOURCE_URL:=https://github.com/linkease/fail2ban-openwrt/releases/download/v${PKG_SOURCE_DATE}/ PKG_HASH:=skip diff --git a/kaiplus/Makefile b/kaiplus/Makefile new file mode 100644 index 000000000..2ca8128be --- /dev/null +++ b/kaiplus/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2026 KaiPlus Contributors +# +# This is free software, licensed under the GNU General Public License v3. +# + +include $(TOPDIR)/rules.mk + +PKG_ARCH_kaiplus:=$(ARCH) + +PKG_NAME:=kaiplus +PKG_VERSION:=1.0.5 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/linkease/istore-packages/releases/download/kaiplus/ +PKG_HASH:=skip +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION) + +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=net + CATEGORY:=System + SUBMENU:= + TITLE:=KaiPlus + URL:=https://github.com/linkease/istore-packages +endef + +define Package/$(PKG_NAME)/description + KaiPlus is a single-process AI workspace and session service. +endef + +define Package/$(PKG_NAME)/conffiles +/etc/config/kaiplus +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/share/kaiplus/www $(1)/usr/share/kaiplus/defaults $(1)/usr/share/kaiplus/helpers $(1)/etc/init.d $(1)/etc/config + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kaiplus_bin.$(PKG_ARCH_kaiplus) $(1)/usr/sbin/kaiplus_bin + $(CP) $(PKG_BUILD_DIR)/www/* $(1)/usr/share/kaiplus/www/ + $(CP) $(PKG_BUILD_DIR)/defaults/* $(1)/usr/share/kaiplus/defaults/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/helpers/kaiplus_workspace_tool.* $(1)/usr/share/kaiplus/helpers/ + $(INSTALL_BIN) ./files/kaiplus.init $(1)/etc/init.d/kaiplus + $(INSTALL_CONF) ./files/kaiplus.config $(1)/etc/config/kaiplus +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/kaiplus/files/kaiplus.config b/kaiplus/files/kaiplus.config new file mode 100644 index 000000000..d81691147 --- /dev/null +++ b/kaiplus/files/kaiplus.config @@ -0,0 +1,5 @@ +config kaiplus + option 'enabled' '0' + option 'data_dir' '' + option 'port' '8198' + option 'system_role' 'istoreos' diff --git a/kaiplus/files/kaiplus.init b/kaiplus/files/kaiplus.init new file mode 100644 index 000000000..22200d2e7 --- /dev/null +++ b/kaiplus/files/kaiplus.init @@ -0,0 +1,74 @@ +#!/bin/sh /etc/rc.common + +START=93 +USE_PROCD=1 + +get_config() { + config_get_bool enabled "$1" enabled 1 + config_get data_dir "$1" data_dir "" + config_get port "$1" port "8198" + config_get system_role "$1" system_role "istoreos" +} + +mkdir_p() { + [ -d "$1" ] || mkdir -p "$1" +} + +start_service() { + config_load kaiplus + config_foreach get_config kaiplus + + if [ "$enabled" != 1 ]; then + return 1 + fi + if [ -z "$data_dir" ]; then + logger -t kaiplus "data_dir is empty; please set option data_dir in /etc/config/kaiplus" + return 1 + fi + + mkdir_p "$data_dir" + mkdir_p "$data_dir/workspace" + mkdir_p "$data_dir/cache" + mkdir_p "$data_dir/config" + mkdir_p "$data_dir/state" + + helper_token_file="$data_dir/state/ssh-helper.token" + if [ ! -s "$helper_token_file" ]; then + umask 077 + if [ -r /proc/sys/kernel/random/uuid ]; then + cat /proc/sys/kernel/random/uuid > "$helper_token_file" + else + { + date +%s + cat /proc/uptime 2>/dev/null + dd if=/dev/urandom bs=24 count=1 2>/dev/null || true + } | sha256sum | awk '{print $1}' > "$helper_token_file" + fi + fi + helper_token="$(cat "$helper_token_file")" + + logger -t kaiplus "Starting KaiPlus service" + procd_open_instance kaiplus_bin + procd_set_param env \ + KAIPLUS_HOME="$data_dir" \ + KAIPLUS_SYSTEM_ROLE="$system_role" \ + KAIPLUS_WORKSPACE_HELPER_DIR="/usr/share/kaiplus/helpers" \ + KAIPLUS_WORKSPACE_TOOL_INSTALL_DIR="/tmp/kaiplus_workspace_tool" \ + KAIPLUS_SSH_HELPER_TOKEN="$helper_token" \ + REASONIX_CREDENTIALS_STORE="file" + procd_set_param command /usr/sbin/kaiplus_bin kaiplus-web + procd_append_param command --addr "0.0.0.0:$port" + procd_append_param command --data-dir "$data_dir" + procd_append_param command --static-dir /usr/share/kaiplus/www + procd_append_param command --defaults-dir /usr/share/kaiplus/defaults + procd_append_param command --system-role "$system_role" + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_set_param respawn + procd_close_instance + logger -t kaiplus "KaiPlus service started" +} + +service_triggers() { + procd_add_reload_trigger "kaiplus" +} diff --git a/luci-app-kaiplus/Makefile b/luci-app-kaiplus/Makefile new file mode 100644 index 000000000..964873081 --- /dev/null +++ b/luci-app-kaiplus/Makefile @@ -0,0 +1,28 @@ +# +# Copyright (C) 2026 KaiPlus Contributors +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=KaiPlus +PKG_VERSION:=1.0.0 +PKG_RELEASE:=1 +LUCI_DEPENDS:=+kaiplus +luci-compat +LUCI_MINIFY_CSS:=0 +LUCI_MINIFY_JS:=0 + +define Package/luci-app-kaiplus/conffiles +/etc/config/kaiplus +endef + +define Package/luci-app-kaiplus/postrm +#!/bin/sh +rm -f /tmp/luci-indexcache +exit 0 +endef + +include $(TOPDIR)/feeds/luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-kaiplus/luasrc/controller/kaiplus.lua b/luci-app-kaiplus/luasrc/controller/kaiplus.lua new file mode 100644 index 000000000..769bd8056 --- /dev/null +++ b/luci-app-kaiplus/luasrc/controller/kaiplus.lua @@ -0,0 +1,25 @@ +local http = require "luci.http" + +module("luci.controller.kaiplus", package.seeall) + +function index() + if not nixio.fs.access("/etc/config/kaiplus") then + return + end + local page + page = entry({"admin", "services", "kaiplus"}, cbi("kaiplus"), _("KaiPlus"), 100) + page.dependent = true + entry({"admin", "services", "kaiplus_status"}, call("kaiplus_status")) +end + +function kaiplus_status() + local sys = require "luci.sys" + local uci = require "luci.model.uci".cursor() + local port = uci:get_first("kaiplus", "kaiplus", "port", "8198") + local status = { + running = (sys.call("pidof kaiplus_bin >/dev/null") == 0), + port = port + } + luci.http.prepare_content("application/json") + luci.http.write_json(status) +end diff --git a/luci-app-kaiplus/luasrc/model/cbi/kaiplus.lua b/luci-app-kaiplus/luasrc/model/cbi/kaiplus.lua new file mode 100644 index 000000000..91de5648e --- /dev/null +++ b/luci-app-kaiplus/luasrc/model/cbi/kaiplus.lua @@ -0,0 +1,37 @@ +local m, s +local sys = require "luci.sys" + +m = Map("kaiplus", translate("KaiPlus"), translate("KaiPlus is an AI workspace and session service.")) +m:section(SimpleSection).template = "kaiplus/kaiplus_status" + +m.on_after_commit = function(self) + sys.call("/etc/init.d/kaiplus restart >/dev/null 2>&1 &") +end + +s = m:section(TypedSection, "kaiplus", translate("Global settings")) +s.addremove = false +s.anonymous = true + +s:option(Flag, "enabled", translate("Enable")).rmempty = false + +local kaiplus_model = require "luci.model.kaiplus" +local blocks = kaiplus_model.blocks() +local home = kaiplus_model.home() + +local data_dir = s:option(Value, "data_dir", translate("Data directory")) +data_dir.rmempty = false +data_dir.description = translate("Required. KaiPlus stores workspace, cache, config, and state under this directory.") + +local paths, default_path = kaiplus_model.find_paths(blocks, home, "Configs") +for _, val in pairs(paths) do + data_dir:value(val, val) +end +data_dir.default = default_path + +local port = s:option(Value, "port", translate("Web port")) +port.default = "8198" +port.rmempty = false +port.datatype = "port" +port.description = translate("Port for the KaiPlus web service.") + +return m diff --git a/luci-app-kaiplus/luasrc/model/kaiplus.lua b/luci-app-kaiplus/luasrc/model/kaiplus.lua new file mode 100644 index 000000000..b592386a5 --- /dev/null +++ b/luci-app-kaiplus/luasrc/model/kaiplus.lua @@ -0,0 +1,52 @@ +local jsonc = require "luci.jsonc" + +local kaiplus = {} + +kaiplus.blocks = function() + local f = io.popen("lsblk -s -f -b -o NAME,FSSIZE,MOUNTPOINT --json", "r") + local vals = {} + if f then + local ret = f:read("*all") + f:close() + local obj = jsonc.parse(ret) + for _, val in pairs(obj and obj["blockdevices"] or {}) do + local fsize = val["fssize"] + if fsize ~= nil and string.len(fsize) > 10 and val["mountpoint"] then + vals[#vals + 1] = val["mountpoint"] + end + end + end + return vals +end + +kaiplus.home = function() + local uci = require "luci.model.uci".cursor() + local home_dirs = {} + home_dirs["main_dir"] = uci:get_first("quickstart", "main", "main_dir", "/root") + home_dirs["Configs"] = uci:get_first("quickstart", "main", "conf_dir", home_dirs["main_dir"] .. "/Configs") + home_dirs["Public"] = uci:get_first("quickstart", "main", "pub_dir", home_dirs["main_dir"] .. "/Public") + home_dirs["Downloads"] = uci:get_first("quickstart", "main", "dl_dir", home_dirs["Public"] .. "/Downloads") + home_dirs["Caches"] = uci:get_first("quickstart", "main", "tmp_dir", home_dirs["main_dir"] .. "/Caches") + return home_dirs +end + +kaiplus.find_paths = function(blocks, home_dirs, path_name) + local default_path = home_dirs[path_name] .. "/KAIPlus" + local paths = {} + + if #blocks == 0 then + table.insert(paths, default_path) + else + for _, val in pairs(blocks) do + table.insert(paths, val .. "/" .. path_name .. "/KAIPlus") + end + local without_conf_dir = "/root/" .. path_name .. "/KAIPlus" + if default_path == without_conf_dir then + default_path = paths[1] + end + end + + return paths, default_path +end + +return kaiplus diff --git a/luci-app-kaiplus/luasrc/view/kaiplus/kaiplus_status.htm b/luci-app-kaiplus/luasrc/view/kaiplus/kaiplus_status.htm new file mode 100644 index 000000000..147688eba --- /dev/null +++ b/luci-app-kaiplus/luasrc/view/kaiplus/kaiplus_status.htm @@ -0,0 +1,21 @@ + + +
diff --git a/luci-app-virtualdog/Makefile b/luci-app-virtualdog/Makefile index 7c1ada447..40c651de5 100644 --- a/luci-app-virtualdog/Makefile +++ b/luci-app-virtualdog/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=virtualdog -PKG_VERSION:=1.0.1 -PKG_RELEASE:=2 +PKG_VERSION:=1.0.2 +PKG_RELEASE:=3 LUCI_DEPENDS:=+virtualdog LUCI_MINIFY_CSS:=0 LUCI_MINIFY_JS:=0 diff --git a/luci-app-virtualdog/luasrc/model/cbi/virtualdog.lua b/luci-app-virtualdog/luasrc/model/cbi/virtualdog.lua index 6fcd28559..1f163b95d 100644 --- a/luci-app-virtualdog/luasrc/model/cbi/virtualdog.lua +++ b/luci-app-virtualdog/luasrc/model/cbi/virtualdog.lua @@ -9,8 +9,6 @@ s.anonymous = true s:option(Flag, "enabled", translate("Enable")).rmempty = false -local virtualdog_model = require "luci.model.virtualdog" - local data_dir = s:option(Value, "data_dir", translate("Data directory")) data_dir.rmempty = false data_dir.description = translate("Required. VirtualDog stores VM metadata, runtime files and disk images under this directory.") diff --git a/openlist2/Makefile b/openlist2/Makefile index 6dcad8f5e..50f152ce4 100644 --- a/openlist2/Makefile +++ b/openlist2/Makefile @@ -7,9 +7,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openlist2 -PKG_VERSION:=4.2.2 -PKG_WEB_VERSION:=4.2.2 -PKG_RELEASE:=7 +PKG_VERSION:=4.2.3 +PKG_WEB_VERSION:=4.2.3 +PKG_RELEASE:=8 PKG_SOURCE:=openlist-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/OpenListTeam/OpenList/tar.gz/v$(PKG_VERSION)? diff --git a/virtualdog/Makefile b/virtualdog/Makefile index 2db26458c..c2013293c 100644 --- a/virtualdog/Makefile +++ b/virtualdog/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=virtualdog -PKG_VERSION:=0.0.1 -PKG_RELEASE:=1 +PKG_VERSION:=0.0.2 +PKG_RELEASE:=2 # Point this at the released binary tarball when you publish builds. PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/Carseason/openwrt-packages/releases/download/prebuilt/