# SPDX-License-Identifier: GPL-2.0-or-later %global runnersharedir %{_datadir}/samestack/runner %global systemprofilesdir %{_datadir}/samestack/system/profiles # Network is typically disabled in build systems. Build from a vendored # dependency snapshot (Source1) so Cargo never needs the network. # # cargo-rpm-macros exists on Fedora, but not on EL10; default it on for # Fedora and off for EL/RHEL-like builders. %bcond_with cargo_macros %if 0%{?fedora} %bcond_without cargo_macros %endif Name: samestack Version: 0.5.0 Release: 1%{?dist} Summary: Deterministic automation engine for real-time workloads License: GPL-2.0-or-later URL: https://gitlab.com/chwhite-systems/samestack # Source0 is the GitLab per-tag archive; available once the version tag # is pushed upstream. Source0: %{url}/-/archive/%{version}/%{name}-%{version}.tar.gz # Vendored Rust dependencies for offline builds (EL/RHEL only; Fedora # resolves crate deps as system RPMs via cargo-rpm-macros). %if %{without cargo_macros} Source1: %{name}-%{version}-vendor.tar.xz %endif BuildRequires: rust BuildRequires: cargo %if %{with cargo_macros} BuildRequires: cargo-rpm-macros %endif BuildRequires: python3-sphinx Requires: stress-ng Requires: rteval Requires: rtla Requires: sos Requires: podman %description SameStack executes declarative workload definitions deterministically. It installs the samestack CLI and runner YAML examples that SameStack and other tooling consume. System profiles drive container orchestration via staging and apply workflows. %if %{with cargo_macros} %generate_buildrequires %cargo_generate_buildrequires -t %endif %prep %autosetup -n samestack-%{version} %if %{with cargo_macros} %cargo_prep %else tar -xJf %{SOURCE1} mkdir -p .cargo cat > .cargo/config.toml << 'CARGO_EOF' [source.crates-io] replace-with = "vendored-sources" [source.vendored-sources] directory = "vendor-staging" [net] offline = true CARGO_EOF %endif %build %if %{with cargo_macros} %cargo_build %else export CARGO_TARGET_DIR=%{_builddir}/samestack-target export CARGO_PROFILE_RELEASE_DEBUG=2 cargo build --release --frozen --offline %endif sphinx-build -b man docs docs/_build/man %install install -d %{buildroot}%{_bindir} %if %{with cargo_macros} install -m 755 target/rpm/samestack %{buildroot}%{_bindir}/samestack %else export CARGO_TARGET_DIR=%{_builddir}/samestack-target install -m 755 %{_builddir}/samestack-target/release/samestack %{buildroot}%{_bindir}/samestack %endif install -d %{buildroot}%{runnersharedir}/plugins install -d %{buildroot}%{runnersharedir}/yaml_examples cp -a examples/runner/* %{buildroot}%{runnersharedir}/yaml_examples/ install -d %{buildroot}%{systemprofilesdir} cp -a system_registry/* %{buildroot}%{systemprofilesdir}/ if [ -d docs/_build/man ] && ls docs/_build/man/*.1 >/dev/null 2>&1; then \ install -d %{buildroot}%{_mandir}/man1; \ install -m 644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/; \ fi if [ -d docs/_build/man ] && ls docs/_build/man/*.5 >/dev/null 2>&1; then \ install -d %{buildroot}%{_mandir}/man5; \ install -m 644 docs/_build/man/*.5 %{buildroot}%{_mandir}/man5/; \ fi if [ -d docs/_build/man ] && ls docs/_build/man/*.7 >/dev/null 2>&1; then \ install -d %{buildroot}%{_mandir}/man7; \ install -m 644 docs/_build/man/*.7 %{buildroot}%{_mandir}/man7/; \ fi %check %if %{with cargo_macros} %cargo_test %else export CARGO_TARGET_DIR=%{_builddir}/samestack-target cargo test --no-fail-fast --frozen --offline %endif %files %license COPYING LICENSE %doc README.md CONTRIBUTING.md TRADEMARKS %{_bindir}/samestack %{_mandir}/man1/samestack*.1* %{_mandir}/man5/samestack*.5* %{_mandir}/man7/samestack*.7* %dir %{_datadir}/samestack %dir %{runnersharedir} %dir %{runnersharedir}/plugins %dir %{runnersharedir}/yaml_examples %dir %{runnersharedir}/yaml_examples/* %dir %{runnersharedir}/yaml_examples/*/test_config_examples %dir %{runnersharedir}/yaml_examples/*/test_config_examples/* %{runnersharedir}/yaml_examples/*/*.yaml %{runnersharedir}/yaml_examples/*/test_config_examples/*/*.yaml %dir %{_datadir}/samestack/system %dir %{systemprofilesdir} %dir %{systemprofilesdir}/* %{systemprofilesdir}/*/*.yaml %{systemprofilesdir}/*/*.md %changelog * Tue Mar 10 2026 William Christopher White - 0.5.0-1 - Replace the legacy Python runner with a Rust engine (899 unit tests) - Add rteval and stress-ng runner support with plan-only validation - Add INI config editor with activate mode for measurement module toggling - Add samestack system orchestration: profile render/stage/apply with podman kube play, podman-run, and taskset backends - Add lifecycle management and NUMA-aware CPU partitioning - Dual-mode spec: cargo-rpm-macros for Fedora, vendored offline for RHEL - Ship runner configs under examples/runner/, system profiles under system_registry/ - Containerized verification pipeline (verify-quick/release/deep) — host needs only make + podman - Integration tests run inside runner container against production image - Auto-detect host arch for mock configs (arm64 to aarch64) - Build output lands on host at make_out/ via bind mount - Add cargo-fuzz targets with hand-crafted seeds - Sphinx manpages for all CLI surfaces (man1, man5, man7) - REUSE/SPDX licensing compliance * Thu Feb 26 2026 John Kacur - 0.1.1-5 - Move Rust crate to repo root (remove cd runner from all spec sections) - Remove legacy system-runner (same/) component * Mon Feb 23 2026 John Kacur - 0.1.1-4 - Rewrite spec for Rust build: replace Python/pyproject with cargo - Install samestack binary instead of runner script * Mon Jan 19 2026 John Kacur - 0.1.1-3 - Add Squash old filesystems to build cleanly - Update pyproject.toml to use modern SPDX license format * Tue Dec 02 2025 John Kacur - 0.1.0-2 - Modernize specfile to use %%pyproject_* macros - Update Python requirement to >=3.10 - Simplify BuildRequires using pyproject-rpm-macros - Remove deprecated rm -rf buildroot * Thu Feb 20 2025 William Christopher White - 0.1.0-1 - Initial packaging pass for runner-framework (SameStack integration to follow)