# Spec file for building Ankaios in offline/network-less environments # Follows Fedora Rust packaging guidelines # Generated by rust2rpm 26 %bcond_without check %global crate ankaios %global commit fcbbd2e25a5c4301bf502b50daba754dad1b79f2 %global shortcommit fcbbd2e Name: ankaios Version: 1.0.0 Release: 4.git%{shortcommit}%{?dist} Summary: Workload and container orchestration for automotive High Performance Computing # The entire source code is Apache-2.0 License: Apache-2.0 URL: https://github.com/eclipse-ankaios/ankaios Source0: %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz # Vendored dependencies tarball for offline builds # To generate: # wget https://github.com/eclipse-ankaios/ankaios/archive/%%{commit}/%%{name}-%%{commit}.tar.gz # tar -xzf %%{name}-%%{commit}.tar.gz # cd %%{name}-%%{commit} # cargo vendor # tar -czf %%{name}-%%{version}-vendor.tar.gz vendor Source1: %{name}-%{version}-vendor.tar.gz # Rust packaging dependencies BuildRequires: rust-packaging BuildRequires: cargo BuildRequires: rust # Build dependencies for protobuf compilation BuildRequires: protobuf-compiler # systemd integration BuildRequires: systemd-rpm-macros %{?systemd_requires} # Runtime dependencies Requires: podman %description Eclipse Ankaios provides workload and container orchestration for automotive High Performance Computing Platforms (HPCs). While it can be used for various fields of applications, it is developed from scratch for automotive use cases and provides a slim, yet powerful solution to manage containerized applications. It supports various container runtimes with Podman as the first one, but other container runtimes and even native applications can be supported. Eclipse Ankaios manages multiple nodes and virtual machines with a single unique API in order to start, stop, configure, and update containers and workloads. %package server Summary: Eclipse Ankaios server component Requires: %{name} = %{version}-%{release} %{?systemd_requires} %description server This package contains the Ankaios server component (ank-server), which manages the orchestration of workloads across multiple nodes. %package agent Summary: Eclipse Ankaios agent component Requires: %{name} = %{version}-%{release} %{?systemd_requires} %description agent This package contains the Ankaios agent component (ank-agent), which runs on each node and communicates with the server to manage local workloads. %prep %autosetup -n %{name}-%{commit} # Extract vendored dependencies tarball tar -xzf %{SOURCE1} # Remove upstream .cargo/config.toml that forces musl target rm -f .cargo/config.toml # Setup cargo for vendored dependencies %cargo_prep -v vendor # Add comment to cargo config to document native target usage echo '# Using native default target (not musl)' >> .cargo/config.toml %build # Build all binaries in the workspace %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install # Install binaries (built with rpm profile and default target) install -D -p -m 0755 target/rpm/ank %{buildroot}%{_bindir}/ank install -D -p -m 0755 target/rpm/ank-server %{buildroot}%{_bindir}/ank-server install -D -p -m 0755 target/rpm/ank-agent %{buildroot}%{_bindir}/ank-agent # Install configuration files from source install -D -p -m 0644 server/config/ank-server.conf %{buildroot}%{_sysconfdir}/ankaios/ank-server.conf install -D -p -m 0644 agent/config/ank-agent.conf %{buildroot}%{_sysconfdir}/ankaios/ank-agent.conf install -D -p -m 0644 ank/config/ank.conf %{buildroot}%{_sysconfdir}/ankaios/ank.conf # Install sample startup state install -D -p -m 0644 /dev/stdin %{buildroot}%{_sysconfdir}/ankaios/state.yaml <<'EOF' # Per default no workload is started. Adapt the manifest according to your needs. apiVersion: v1 workloads: {} EOF # Install systemd service files (these don't exist in source, created like install.sh does) install -D -p -m 0644 /dev/stdin %{buildroot}%{_unitdir}/ank-server.service <<'EOF' [Unit] Description=Ankaios Server Documentation=https://eclipse-ankaios.github.io/ankaios After=network.target [Service] Type=simple Environment="RUST_LOG=info" ExecStart=%{_bindir}/ank-server Restart=on-failure RestartSec=5s [Install] WantedBy=multi-user.target EOF install -D -p -m 0644 /dev/stdin %{buildroot}%{_unitdir}/ank-agent.service <<'EOF' [Unit] Description=Ankaios Agent Documentation=https://eclipse-ankaios.github.io/ankaios After=network.target ank-server.service Wants=ank-server.service [Service] Type=simple Environment="RUST_LOG=info" ExecStart=%{_bindir}/ank-agent Restart=on-failure RestartSec=5s [Install] WantedBy=multi-user.target EOF %if %{with check} %check # Run tests for the workspace %cargo_test %endif %post server %systemd_post ank-server.service %preun server %systemd_preun ank-server.service %postun server %systemd_postun_with_restart ank-server.service %post agent %systemd_post ank-agent.service %preun agent %systemd_preun ank-agent.service %postun agent %systemd_postun_with_restart ank-agent.service %files %license LICENSE %license LICENSE.dependencies %doc README.md %{_bindir}/ank %config(noreplace) %{_sysconfdir}/ankaios/ank.conf %files server %{_bindir}/ank-server %{_unitdir}/ank-server.service %dir %{_sysconfdir}/ankaios %config(noreplace) %{_sysconfdir}/ankaios/ank-server.conf %config(noreplace) %{_sysconfdir}/ankaios/state.yaml %files agent %{_bindir}/ank-agent %{_unitdir}/ank-agent.service %config(noreplace) %{_sysconfdir}/ankaios/ank-agent.conf %changelog * Fri Apr 03 2026 Pierre-Yves Chibon - 1.0.0-4.gitfcbbd2e - Build from feature/workload-persistence branch (commit fcbbd2e) - Improved logging for persistence configuration visibility - Log persistence status at server startup - Warn when persist=true but persistence not configured * Fri Apr 03 2026 Pierre-Yves Chibon - 1.0.0-3.git56ce896 - Build from feature/workload-persistence branch (commit 56ce896) - Add per-workload state persistence feature - New 'persist' field on Workload protobuf message - Runtime state file support (/var/lib/ankaios/runtime_state.yaml) - Atomic file writes with backup for safety - CLI --persist flag support * Tue Mar 24 2026 Pierre-Yves Chibon - 1.0.0-2 - Apply PR #710 patch (backport of commit 1730739f) - Add support for multiple CLI config file paths - CLI now checks both user config ($HOME/.config/ankaios/ank.conf) and system config (/etc/ankaios/ank.conf) * Fri Jan 09 2026 Pierre-Yves Chibon - 1.0.0-1 - Initial package for Ankaios 1.0.0