Files
HomeAgent/deploy/packaging/linux/hologramagent.spec
JianFeeeee 79688386b1 refactor(deploy): package-linux.sh/spec 产物与安装布局改名,并补结构判据
package-linux.sh(只动包名/安装路径,不动 SDK module 路径):
  - 产物名 hologramagent-{variant}_*.deb / hologramagent-*.rpm /
    hologramagent_*.tar.gz
  - 安装路径 /usr/lib/hologram/{sdk,models,onnxruntime,setup.sh}、
    /usr/share/doc/hologramagent/(DEP-5 惯例按包名)
  - GUI:build/hologram-gui-linux-<arch>、/usr/bin/hologram-gui、
    /usr/lib/hologram-gui、hologram-gui.desktop
  - 单元从 deploy/hologramagent.service 取,装成 hologramagent.service
  - staging /var/lib/hologram

**故意没动** prepare_gomod 里那段 replace 的匹配串
(github.com/JianFeeeee/homeagentsdk):那是批 3 的 module 改名,
匹配串先改而 module 未改,sed 会整段不匹配且**不报错**,继续用旧路径编
—— 正是清单第四节第 2 条点名的静默失效。等批 3 一起改才安全。

spec:homeagent.spec → hologramagent.spec(git mv),包名/unit/datadir/
changelog 同步;%{_varlibdir} = /var/lib/hologram。

packaging_test.go:第 171 行的 toolchain 关键字跟着改;**第 99-106 行那两处
module 路径断言一行未动**(批 1 的地盘)。另新增四条结构判据,把本批
「日志全绿但包内容还是旧路径」这一类钉住:
  · TestPackagingUsesRenamedInstallPaths   —— 脚本里不许残留旧路径,且新值必须真出现
  · TestDebMaintainerScriptsUseRenamedService —— postinst/prerm 的 SERVICE_NAME
  · TestDebControlFilesUseRenamedPackage   —— 四个 control 的 Package 与 SDK 路径
  · TestSystemdUnitUsesRenamedPaths        —— 单元指令行(注释除外)+ 旧单元已删

判据形态仍沿用本文件的原则:断言的是「某个必需处置存在」,不是接线/顺序。
端到端(真装再看内核)由发版流程做。
2026-10-21 13:21:06 +08:00

110 lines
3.1 KiB
RPMSpec
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# HologramAgent RPM Spec
# Build: rpmbuild -ba hologramagent.spec
#
# Define variant at build time:
# rpmbuild -ba --define "variant full" hologramagent.spec
# rpmbuild -ba --define "variant server" hologramagent.spec
# rpmbuild -ba --define "variant client" hologramagent.spec
%define _prefix /usr
%define _bindir %{_prefix}/bin
%define _unitdir %{_prefix}/lib/systemd/system
%define _datadir %{_prefix}/share/hologramagent
%define _varlibdir /var/lib/hologram
%if %{undefined variant}
%define variant full
%endif
Name: hologramagent-%{variant}
Version: %{_version}
Release: 1%{?dist}
Summary: HologramAgent - Personal AI Home Assistant
License: Proprietary
URL: https://github.com/trueagent/HologramAgent
Group: System Environment/Daemons
BuildArch: %{_arch}
%if "%{variant}" == "full" || "%{variant}" == "server"
Requires: systemd
%endif
%if "%{variant}" == "full"
Requires: libX11, libxcb, libdrm, mesa-libGL, nss, nspr, atk, at-spi2-atk, cairo, cups-libs, pango, gtk3
%endif
%if "%{variant}" == "client"
Requires: libX11, libxcb, libdrm, mesa-libGL, nss, nspr, atk, at-spi2-atk, cairo, cups-libs, pango, gtk3
%endif
%description
HologramAgent is a personal AI home assistant that integrates large language
models with system automation.
%if "%{variant}" == "full"
This package includes the full suite: homed (daemon), waiter (CLI),
and hologram-gui (desktop GUI).
%else
%if "%{variant}" == "server"
This package includes the server components: homed (daemon) and waiter (CLI).
%else
%if "%{variant}" == "client"
This package includes the client components: waiter (CLI) and
hologram-gui (desktop GUI). Connects to a remote HologramAgent server.
%endif
%endif
%endif
%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_varlibdir}
%if "%{variant}" == "full" || "%{variant}" == "server"
install -m 755 %{_sourcedir}/homed %{buildroot}%{_bindir}/homed
install -m 644 %{_sourcedir}/hologramagent.service %{buildroot}%{_unitdir}/hologramagent.service
%endif
# waiter 三个变体都要:server 也含 CLI(对齐 deb 的 stage_variant
# 与 control-server 的 "waiter: command-line client" 描述)。
install -m 755 %{_sourcedir}/waiter %{buildroot}%{_bindir}/waiter
%if "%{variant}" == "full" || "%{variant}" == "client"
mkdir -p %{buildroot}%{_datadir}/hologram-gui
cp -r %{_sourcedir}/hologram-gui-linux-*/* %{buildroot}%{_datadir}/hologram-gui/
%endif
%files
%defattr(-,root,root,-)
%if "%{variant}" == "full" || "%{variant}" == "server"
%{_bindir}/homed
%{_unitdir}/hologramagent.service
%dir %{_varlibdir}
%endif
%{_bindir}/waiter
%if "%{variant}" == "full" || "%{variant}" == "client"
%dir %{_datadir}/hologram-gui
%{_datadir}/hologram-gui/*
%endif
%post
%if "%{variant}" == "full" || "%{variant}" == "server"
mkdir -p %{_varlibdir}
%systemd_post hologramagent.service
%endif
%preun
%if "%{variant}" == "full" || "%{variant}" == "server"
%systemd_preun hologramagent.service
%endif
%postun
%if "%{variant}" == "full" || "%{variant}" == "server"
%systemd_postun_with_restart hologramagent.service
%endif
%changelog
* Mon Jul 20 2026 HologramAgent Team <team@hologramagent.ai> - %{version}-1
- Initial Linux packaging