feat: refactor to ymsctl & yms-daemon

This commit is contained in:
2026-08-17 02:10:10 +08:00
parent 7755da72e7
commit 79f18fcdea
23 changed files with 394 additions and 47 deletions
+3 -2
View File
@@ -71,12 +71,13 @@ sources_dir="$top_dir/SOURCES"
temporary_dir="$build_dir/tmp"
mkdir -p "$sources_dir" "$top_dir/BUILD" "$top_dir/BUILDROOT" "$top_dir/RPMS" "$top_dir/SRPMS" "$temporary_dir"
echo "Building static linux/$go_arch yms-daemon"
echo "Building static linux/$go_arch ymsd and ymsctl"
(
cd "$project_dir"
GOCACHE="$build_dir/go-cache" CGO_ENABLED=0 GOOS=linux GOARCH="$go_arch" \
go build -trimpath -ldflags="-s -w" -o "$sources_dir/yms-daemon" .
go build -trimpath -ldflags="-s -w" -o "$sources_dir/ymsd" .
)
cp "$sources_dir/ymsd" "$sources_dir/ymsctl"
install -m 0640 "$project_dir/packaging/etc/yms-daemon/yms-daemon.toml" "$sources_dir/yms-daemon.toml"
install -m 0644 "$project_dir/packaging/systemd/yms-daemon.service" "$sources_dir/yms-daemon.service"
+6 -3
View File
@@ -12,11 +12,12 @@ Summary: YMS update daemon
License: Proprietary
Requires: systemd
Source0: yms-daemon
Source0: ymsd
Source1: yms-daemon.toml
Source2: yms-daemon.service
Source3: yms-backend@.service
Source4: yms-daemon-tmpfiles.conf
Source5: ymsctl
%description
Transactional update daemon and native backend systemd units for YMS installations.
@@ -27,7 +28,8 @@ Transactional update daemon and native backend systemd units for YMS installatio
%install
install -d -m 0755 %{buildroot}/usr/bin
install -m 0755 %{SOURCE0} %{buildroot}/usr/bin/yms-daemon
install -m 0755 %{SOURCE0} %{buildroot}/usr/bin/ymsd
install -m 0755 %{SOURCE5} %{buildroot}/usr/bin/ymsctl
install -d -m 0755 %{buildroot}/etc/yms-daemon
install -m 0640 %{SOURCE1} %{buildroot}/etc/yms-daemon/yms-daemon.toml
@@ -71,7 +73,8 @@ fi
%attr(0644,root,root) /etc/systemd/system/yms-daemon.service
%attr(0644,root,root) /etc/systemd/system/yms-backend@.service
%attr(0644,root,root) /etc/tmpfiles.d/yms-daemon.conf
%attr(0755,root,root) /usr/bin/yms-daemon
%attr(0755,root,root) /usr/bin/ymsd
%attr(0755,root,root) /usr/bin/ymsctl
%dir %attr(0755,root,root) /home/yms/dump
%changelog