File container-notify-run.spec of Package container-notify-run

Name:           container-notify-run
Version:        0.1.0~0
Release:        0
Summary:        systemd notification forwarding system for distrobox/podman containers
License:        MIT
Group:          System/Management
URL:            https://github.com/capylab/container-notify-run.git
Source0:        %{name}-%{version}.tar.xz
Source1:        vendor.tar.xz

BuildRequires:  rust >= 1.70
BuildRequires:  cargo
# This contains rpm macros to assist with building
BuildRequires:  cargo-packaging
ExclusiveArch:  %{rust_tier1_arches}

%description
A systemd notification forwarding system designed for distrobox and podman
containers that enables containerized applications to send systemd notify signals
to the host systemd. The system consists of two Rust binaries: a container wrapper
that creates a Unix domain socket proxy and a host waiter that directly notifies
systemd using the sd_notify protocol.

This solves the PID mismatch issue where containerized processes cannot directly
notify the host systemd about their readiness status. Both components are written
in Rust for memory safety and reliability.

%prep
%autosetup -p1 -a1

%build
%{cargo_build}

%install
%{cargo_install}

# Install documentation
install -D -m 644 README.md %{buildroot}%{_docdir}/%{name}/README.md

%check
%{cargo_test}

%files
%license LICENSE
%doc README.md
%{_bindir}/container-notify-wrapper
%{_bindir}/host-notify-waiter

%changelog
* Mon Aug 18 2024 User <user@example.com> - 0.1.0-0
- Initial package
- Two Rust binaries: container-notify-wrapper and host-notify-waiter
- Direct systemd notifications using sd_notify protocol (no subprocess calls)
- Memory-safe implementation with verbose logging support
- Designed specifically for distrobox and podman containers
- Single cargo build produces both executables
openSUSE Build Service is sponsored by