mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-11-07 01:37:34 +00:00
refactor(deploy): deb control 与 postinst/prerm 改用 hologramagent 包名与 /var/lib/hologram
四个 control:Package: homeagent-{client,server,full,toolchain} →
hologramagent-*,Maintainer/Homepage 品牌名,toolchain 的 SDK 安装路径
/usr/lib/homeagent/sdk → /usr/lib/hologram/sdk。
postinst/prerm:SERVICE_NAME="hologramagent"。
这一行是「改一半就静默失效」的典型:
systemctl enable/start/stop 全部带 2>/dev/null || true,
单元名不对时**不报错**——装完既不 enable 也不 start,用户以为装好了。
现在 postinst 的 DATA_DIR/SETUP_SH 也一起指向 /var/lib/hologram、
/usr/lib/hologram/setup.sh,否则 setup.sh 会在旧目录里初始化凭据,
而内核按新单元从新目录读 —— 表现为「装完登录不上,credentials.txt 找不到」。
setup.sh 同步:HOLOGRAM_DATA / HOLOGRAM_API_KEY 前缀、模型目录
/usr/lib/hologram/models/...。与 postinst 传的变量名必须一致,
否则 DATA_DIR 回落到默认值、凭据写到另一个目录。
Homepage/Documentation 用 trueagent/HologramAgent(与原值同源,只换品牌词);
仓库 owner 与地址本身归批 4,这里不动。
This commit is contained in:
@ -1,18 +1,18 @@
|
|||||||
Package: homeagent-client
|
Package: hologramagent-client
|
||||||
Version: VERSION_PLACEHOLDER
|
Version: VERSION_PLACEHOLDER
|
||||||
Architecture: ARCH_PLACEHOLDER
|
Architecture: ARCH_PLACEHOLDER
|
||||||
Maintainer: HomeAgent Team <team@homeagent.ai>
|
Maintainer: HologramAgent Team <team@hologramagent.ai>
|
||||||
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
||||||
Depends: libc6 (>= 2.28)
|
Depends: libc6 (>= 2.28)
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Homepage: https://github.com/trueagent/HomeAgent
|
Homepage: https://github.com/trueagent/HologramAgent
|
||||||
Description: HomeAgent Client (CLI + GUI, no daemon)
|
Description: HologramAgent Client (CLI + GUI, no daemon)
|
||||||
HomeAgent is a personal AI home assistant that integrates
|
HologramAgent is a personal AI home assistant that integrates
|
||||||
large language models with system automation.
|
large language models with system automation.
|
||||||
.
|
.
|
||||||
This package includes the client components:
|
This package includes the client components:
|
||||||
- waiter: command-line client
|
- waiter: command-line client
|
||||||
- homeagent-gui: desktop graphical interface
|
- hologram-gui: desktop graphical interface
|
||||||
.
|
.
|
||||||
This variant connects to a remote HomeAgent server.
|
This variant connects to a remote HologramAgent server.
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
Package: homeagent-full
|
Package: hologramagent-full
|
||||||
Version: VERSION_PLACEHOLDER
|
Version: VERSION_PLACEHOLDER
|
||||||
Architecture: ARCH_PLACEHOLDER
|
Architecture: ARCH_PLACEHOLDER
|
||||||
Maintainer: HomeAgent Team <team@homeagent.ai>
|
Maintainer: HologramAgent Team <team@hologramagent.ai>
|
||||||
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
||||||
Depends: libc6 (>= 2.28), libstdc++6, libgcc-s1
|
Depends: libc6 (>= 2.28), libstdc++6, libgcc-s1
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Homepage: https://github.com/trueagent/HomeAgent
|
Homepage: https://github.com/trueagent/HologramAgent
|
||||||
Description: HomeAgent Full Installation (Daemon + CLI + GUI)
|
Description: HologramAgent Full Installation (Daemon + CLI + GUI)
|
||||||
HomeAgent is a personal AI home assistant that integrates
|
HologramAgent is a personal AI home assistant that integrates
|
||||||
large language models with system automation.
|
large language models with system automation.
|
||||||
.
|
.
|
||||||
This package includes the full suite:
|
This package includes the full suite:
|
||||||
- homed: the core daemon (background service)
|
- homed: the core daemon (background service)
|
||||||
- waiter: command-line client
|
- waiter: command-line client
|
||||||
- homeagent-gui: desktop graphical interface
|
- hologram-gui: desktop graphical interface
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
Package: homeagent-server
|
Package: hologramagent-server
|
||||||
Version: VERSION_PLACEHOLDER
|
Version: VERSION_PLACEHOLDER
|
||||||
Architecture: ARCH_PLACEHOLDER
|
Architecture: ARCH_PLACEHOLDER
|
||||||
Maintainer: HomeAgent Team <team@homeagent.ai>
|
Maintainer: HologramAgent Team <team@hologramagent.ai>
|
||||||
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
||||||
Depends: libc6 (>= 2.28), libstdc++6, libgcc-s1
|
Depends: libc6 (>= 2.28), libstdc++6, libgcc-s1
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Homepage: https://github.com/trueagent/HomeAgent
|
Homepage: https://github.com/trueagent/HologramAgent
|
||||||
Description: HomeAgent Server (Daemon + CLI, no GUI)
|
Description: HologramAgent Server (Daemon + CLI, no GUI)
|
||||||
HomeAgent is a personal AI home assistant that integrates
|
HologramAgent is a personal AI home assistant that integrates
|
||||||
large language models with system automation.
|
large language models with system automation.
|
||||||
.
|
.
|
||||||
This package includes the server components:
|
This package includes the server components:
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
Package: homeagent-toolchain
|
Package: hologramagent-toolchain
|
||||||
Version: VERSION_PLACEHOLDER
|
Version: VERSION_PLACEHOLDER
|
||||||
Architecture: ARCH_PLACEHOLDER
|
Architecture: ARCH_PLACEHOLDER
|
||||||
Maintainer: HomeAgent Team <team@homeagent.ai>
|
Maintainer: HologramAgent Team <team@hologramagent.ai>
|
||||||
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
||||||
Depends: libc6 (>= 2.28), libstdc++6, libgcc-s1
|
Depends: libc6 (>= 2.28), libstdc++6, libgcc-s1
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Homepage: https://github.com/trueagent/HomeAgent
|
Homepage: https://github.com/trueagent/HologramAgent
|
||||||
Description: HomeAgent Toolchain (Daemon + CLI + Plugin Toolchain + SDK)
|
Description: HologramAgent Toolchain (Daemon + CLI + Plugin Toolchain + SDK)
|
||||||
HomeAgent is a personal AI home assistant that integrates
|
HologramAgent is a personal AI home assistant that integrates
|
||||||
large language models with system automation.
|
large language models with system automation.
|
||||||
.
|
.
|
||||||
This package includes the full development toolchain:
|
This package includes the full development toolchain:
|
||||||
@ -16,7 +16,7 @@ Description: HomeAgent Toolchain (Daemon + CLI + Plugin Toolchain + SDK)
|
|||||||
- depgraph.bin: kernel startup dependency graph (MUST sit next to homed)
|
- depgraph.bin: kernel startup dependency graph (MUST sit next to homed)
|
||||||
- waiter: command-line client
|
- waiter: command-line client
|
||||||
- hmapdev: plugin build toolchain (init/build/package .hmap)
|
- hmapdev: plugin build toolchain (init/build/package .hmap)
|
||||||
- the matching HomeAgent SDK (sdk/, tools/, skills/, meta/, docs/)
|
- the matching HologramAgent SDK (sdk/, tools/, skills/, meta/, docs/)
|
||||||
.
|
.
|
||||||
Installs the SDK under /usr/lib/homeagent/sdk so that hmapdev can resolve
|
Installs the SDK under /usr/lib/hologram/sdk so that hmapdev can resolve
|
||||||
plugins against a known-good SDK without network access.
|
plugins against a known-good SDK without network access.
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
SERVICE_NAME="homeagent"
|
SERVICE_NAME="hologramagent"
|
||||||
HOMED_BIN="/usr/bin/homed"
|
HOMED_BIN="/usr/bin/homed"
|
||||||
DATA_DIR="/var/lib/homeagent"
|
DATA_DIR="/var/lib/hologram"
|
||||||
SETUP_SH="/usr/lib/homeagent/setup.sh"
|
SETUP_SH="/usr/lib/hologram/setup.sh"
|
||||||
|
|
||||||
# unit 由本包装到 /etc/systemd/system/,而旧 postinst 只查
|
# unit 由本包装到 /etc/systemd/system/,而旧 postinst 只查
|
||||||
# /lib/systemd/system/(merged-usr 下等于 /usr/lib/systemd/system,那里没有
|
# /lib/systemd/system/(merged-usr 下等于 /usr/lib/systemd/system,那里没有
|
||||||
@ -34,9 +34,9 @@ case "$1" in
|
|||||||
# credentials.txt、没进数据库),用户拿它登录必然失败,安装却一声不响。
|
# credentials.txt、没进数据库),用户拿它登录必然失败,安装却一声不响。
|
||||||
# 失败必须看得见,并给出可直接执行的补救命令。
|
# 失败必须看得见,并给出可直接执行的补救命令。
|
||||||
if [ -x "$SETUP_SH" ]; then
|
if [ -x "$SETUP_SH" ]; then
|
||||||
if ! HOMEAGENT_DATA="$DATA_DIR" "$SETUP_SH"; then
|
if ! HOLOGRAM_DATA="$DATA_DIR" "$SETUP_SH"; then
|
||||||
echo "E: homeagent 初始化失败——凭据可能未写入 config.db。" >&2
|
echo "E: hologramagent 初始化失败——凭据可能未写入 config.db。" >&2
|
||||||
echo "E: 请手动重试:HOMEAGENT_DATA=$DATA_DIR $SETUP_SH" >&2
|
echo "E: 请手动重试:HOLOGRAM_DATA=$DATA_DIR $SETUP_SH" >&2
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "W: 未找到 $SETUP_SH,跳过凭据初始化。" >&2
|
echo "W: 未找到 $SETUP_SH,跳过凭据初始化。" >&2
|
||||||
@ -51,10 +51,10 @@ case "$1" in
|
|||||||
# (仅 enable 不会让已在运行的进程换用新文件)。
|
# (仅 enable 不会让已在运行的进程换用新文件)。
|
||||||
if [ -z "${2:-}" ]; then
|
if [ -z "${2:-}" ]; then
|
||||||
systemctl start "$SERVICE_NAME" 2>/dev/null || \
|
systemctl start "$SERVICE_NAME" 2>/dev/null || \
|
||||||
echo "W: homeagent 服务未能启动,请检查:systemctl status $SERVICE_NAME" >&2
|
echo "W: hologramagent 服务未能启动,请检查:systemctl status $SERVICE_NAME" >&2
|
||||||
else
|
else
|
||||||
systemctl restart "$SERVICE_NAME" 2>/dev/null || \
|
systemctl restart "$SERVICE_NAME" 2>/dev/null || \
|
||||||
echo "W: homeagent 服务未能重启,请检查:systemctl status $SERVICE_NAME" >&2
|
echo "W: hologramagent 服务未能重启,请检查:systemctl status $SERVICE_NAME" >&2
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "W: 未找到 ${SERVICE_NAME}.service,未启用服务。" >&2
|
echo "W: 未找到 ${SERVICE_NAME}.service,未启用服务。" >&2
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
SERVICE_NAME="homeagent"
|
SERVICE_NAME="hologramagent"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
remove|deconfigure)
|
remove|deconfigure)
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# HomeAgent 首次初始化脚本
|
# HologramAgent 首次初始化脚本
|
||||||
# 在安装后执行,生成凭据并初始化数据库
|
# 在安装后执行,生成凭据并初始化数据库
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
DATA_DIR="${HOMEAGENT_DATA:-/var/lib/homeagent}"
|
DATA_DIR="${HOLOGRAM_DATA:-/var/lib/hologram}"
|
||||||
CRED_FILE="${DATA_DIR}/credentials.txt"
|
CRED_FILE="${DATA_DIR}/credentials.txt"
|
||||||
CONFIG_DB="${DATA_DIR}/config.db"
|
CONFIG_DB="${DATA_DIR}/config.db"
|
||||||
WAITER_CONF="${DATA_DIR}/waiter.yaml"
|
WAITER_CONF="${DATA_DIR}/waiter.yaml"
|
||||||
INITCONFIG_BIN="/usr/bin/initconfig"
|
INITCONFIG_BIN="/usr/bin/initconfig"
|
||||||
BUNDLED_MODEL_DIR="/usr/lib/homeagent/models/chinese-clip-vit-b16-onnx"
|
BUNDLED_MODEL_DIR="/usr/lib/hologram/models/chinese-clip-vit-b16-onnx"
|
||||||
MODEL_LINK="${DATA_DIR}/models/chinese-clip-vit-b16-onnx"
|
MODEL_LINK="${DATA_DIR}/models/chinese-clip-vit-b16-onnx"
|
||||||
|
|
||||||
# 模型随 server/full 包安装到只读的 /usr/lib;配置默认仍指向 dataDir/models。
|
# 模型随 server/full 包安装到只读的 /usr/lib;配置默认仍指向 dataDir/models。
|
||||||
@ -33,9 +33,9 @@ mkdir -p "$DATA_DIR"
|
|||||||
# 允许环境变量覆盖:安装器(包括 Windows 上的 WSL 引导安装)已经在界面上
|
# 允许环境变量覆盖:安装器(包括 Windows 上的 WSL 引导安装)已经在界面上
|
||||||
# 向用户收过这些值,若不接受传入就只能两个地方各生成一份,用户看到的那份
|
# 向用户收过这些值,若不接受传入就只能两个地方各生成一份,用户看到的那份
|
||||||
# 与实际写入 config.db 的那份不一致——那种错会直接表现为「登录不上」。
|
# 与实际写入 config.db 的那份不一致——那种错会直接表现为「登录不上」。
|
||||||
API_KEY="${HOMEAGENT_API_KEY:-$(cat /proc/sys/kernel/random/uuid 2>/dev/null | tr -d '-' || echo "homeagent$(date +%s)")}"
|
API_KEY="${HOLOGRAM_API_KEY:-$(cat /proc/sys/kernel/random/uuid 2>/dev/null | tr -d '-' || echo "hologram$(date +%s)")}"
|
||||||
WEBUI_USER="${WEBUI_USER:-admin}"
|
WEBUI_USER="${WEBUI_USER:-admin}"
|
||||||
WEBUI_PASS="${WEBUI_PASS:-$(openssl rand -hex 12 2>/dev/null || echo "homeagent")}"
|
WEBUI_PASS="${WEBUI_PASS:-$(openssl rand -hex 12 2>/dev/null || echo "hologram")}"
|
||||||
|
|
||||||
# 初始化数据库
|
# 初始化数据库
|
||||||
if [ -x "$INITCONFIG_BIN" ]; then
|
if [ -x "$INITCONFIG_BIN" ]; then
|
||||||
@ -49,7 +49,7 @@ fi
|
|||||||
# 保存凭据
|
# 保存凭据
|
||||||
cat > "$CRED_FILE" << CRED
|
cat > "$CRED_FILE" << CRED
|
||||||
===================================
|
===================================
|
||||||
HomeAgent 初始配置信息
|
HologramAgent 初始配置信息
|
||||||
请妥善保管,安装后仅此一份
|
请妥善保管,安装后仅此一份
|
||||||
===================================
|
===================================
|
||||||
WebUI 地址: http://localhost:8080
|
WebUI 地址: http://localhost:8080
|
||||||
@ -74,6 +74,6 @@ WAITER
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "============================================"
|
echo "============================================"
|
||||||
echo " HomeAgent 初始化完成"
|
echo " HologramAgent 初始化完成"
|
||||||
echo "============================================"
|
echo "============================================"
|
||||||
cat "$CRED_FILE"
|
cat "$CRED_FILE"
|
||||||
|
|||||||
Reference in New Issue
Block a user