Some checks failed
CI / Build cortex SRPM (push) Has been cancelled
CI / Build neuron SRPM (push) Has been cancelled
CI / Publish cortex to COPR (push) Has been cancelled
CI / Publish neuron to COPR (push) Has been cancelled
CI / Bump version in source (push) Has been cancelled
CI / Format, lint, build, test (push) Has been cancelled
Using %attr(,,cortex) / %attr(,,neuron) on config files caused rpm's auto-dep-generator to emit Requires: user(name) and group(name) on each package. When those Requires couldn't be resolved — whether due to sysusers Provides mismatches, missing GPG keys, or dnf5 cache state — dnf5 silently filtered the package out of the candidate set and reported "Nothing to do" rather than an unsatisfied-dep error. Adopt the pattern that already works reliably across our infra (grenade/monsoon): ship config files as default root:root with 0644 perms, don't declare user/group ownership in the rpm file list. systemd-sysusers still creates the service user via the shipped sysusers.d file; the service drops to that user at runtime via the User= directive in the unit. This removes the user(cortex)/user(neuron) Requires entirely, which is the root cause of the dnf5 filtering. File permission tightening can be reintroduced later — either via a separate secrets file with different mode bits, or by moving secret material to /var/lib/<svc>/ where the service drop-privileges account already has write access. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
76 lines
1.9 KiB
RPMSpec
76 lines
1.9 KiB
RPMSpec
Name: neuron
|
|
Version: 0.1.7
|
|
Release: 1%{?dist}
|
|
Summary: Per-node GPU discovery and harness management daemon for cortex
|
|
|
|
License: GPL-3.0-or-later
|
|
URL: https://git.lair.cafe/helexa/cortex
|
|
Source0: %{name}-%{version}.tar.gz
|
|
Source1: %{name}-%{version}-vendor.tar.gz
|
|
|
|
ExclusiveArch: x86_64
|
|
|
|
BuildRequires: rust >= 1.85
|
|
BuildRequires: cargo
|
|
BuildRequires: gcc
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: cmake
|
|
BuildRequires: perl-interpreter
|
|
BuildRequires: pkgconfig(openssl)
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
Requires(pre): shadow-utils
|
|
Requires: systemd
|
|
|
|
%description
|
|
Neuron is a per-node daemon for cortex inference clusters. It discovers
|
|
local GPU hardware via nvidia-smi, manages inference harnesses (mistral.rs,
|
|
llama.cpp), and exposes an HTTP API for model lifecycle management.
|
|
|
|
%prep
|
|
%autosetup
|
|
tar xf %{SOURCE1}
|
|
mkdir -p .cargo
|
|
cat > .cargo/config.toml << 'EOF'
|
|
[source.crates-io]
|
|
replace-with = "vendored-sources"
|
|
|
|
[source.vendored-sources]
|
|
directory = "vendor"
|
|
EOF
|
|
|
|
%build
|
|
cargo build --release -p neuron
|
|
|
|
%install
|
|
install -Dm755 target/release/neuron %{buildroot}%{_bindir}/neuron
|
|
install -Dm644 data/neuron.service %{buildroot}%{_unitdir}/neuron.service
|
|
install -Dm644 data/neuron-sysusers.conf %{buildroot}%{_sysusersdir}/neuron.conf
|
|
install -dm755 %{buildroot}%{_sysconfdir}/neuron
|
|
install -Dm644 neuron.example.toml %{buildroot}%{_sysconfdir}/neuron/neuron.toml
|
|
|
|
%pre
|
|
%sysusers_create_compat %{_builddir}/%{name}-%{version}/data/neuron-sysusers.conf
|
|
|
|
%post
|
|
%systemd_post neuron.service
|
|
|
|
%preun
|
|
%systemd_preun neuron.service
|
|
|
|
%postun
|
|
%systemd_postun_with_restart neuron.service
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc README.md
|
|
%{_bindir}/neuron
|
|
%{_unitdir}/neuron.service
|
|
%{_sysusersdir}/neuron.conf
|
|
%dir %{_sysconfdir}/neuron
|
|
%config(noreplace) %{_sysconfdir}/neuron/neuron.toml
|
|
|
|
%changelog
|
|
* Tue Apr 15 2026 Rob Thijssen <grenade@rob.tn> - 0.1.0-1
|
|
- Initial package
|