%global debug_package %{nil} Name: bustd-dev Version: 0.1.2 Release: 1%{?dist} Summary: Lightweight process killer daemon for out-of-memory scenarios (Development version) License: MIT URL: https://github.com/vrmiguel/bustd Source0: https://github.com/vrmiguel/bustd/archive/refs/heads/master.zip BuildRequires: rust-packaging BuildRequires: gcc BuildRequires: rust >= 1.56.0 BuildRequires: cargo BuildRequires: systemd-rpm-macros %description Development version of bustd. bustd is a lightweight process killer daemon for out-of-memory scenarios for Linux. It uses adaptive sleep times during memory polling and checks Pressure Stall Information (PSI) to detect memory pressure. This package tracks the latest development version from the master branch. %prep %setup -q -n bustd-master %build cargo build --release %install install -D -m 0755 target/release/bustd %{buildroot}%{_bindir}/bustd-dev # Install systemd service mkdir -p %{buildroot}%{_unitdir} cat > %{buildroot}%{_unitdir}/bustd-dev.service << EOF [Unit] Description=Lightweight process killer daemon for OOM scenarios (Development version) Documentation=https://github.com/vrmiguel/bustd [Service] ExecStart=%{_bindir}/bustd-dev --no-daemon Restart=always RestartSec=5 [Install] WantedBy=multi-user.target EOF %post %systemd_post bustd-dev.service %preun %systemd_preun bustd-dev.service %postun %systemd_postun_with_restart bustd-dev.service %files %license LICENSE %doc README.md %{_bindir}/bustd-dev %{_unitdir}/bustd-dev.service %changelog * Mon Feb 26 2025 se7uh - 0.1.2-1 - Package for development version of bustd