%define version 1.2.0 %define version_full 1.2.0-rc2 %define agent_commit 802b94ccf2e00ac33a3863300d0769f02b62d807 Name: pam_rssh Version: %{version} Release: 1%{?dist} Summary: PAM module for restricted SSH License: GPL-2.0-or-later URL: https://github.com/z4yx/pam_rssh Source0: https://github.com/z4yx/pam_rssh/archive/refs/tags/v%{version_full}.tar.gz Source1: https://github.com/z4yx/ssh-agent.rs/archive/%{agent_commit}.zip BuildRequires: cargo BuildRequires: openssl-devel BuildRequires: pam-devel %description This PAM module allows restricting SSH access based on user configuration. %prep tar -xf %{SOURCE0} unzip %{SOURCE1} rm -r pam_rssh-%{version_full}/dep/ssh-agent.rs mv ssh-agent.rs-%{agent_commit} pam_rssh-%{version_full}/dep/ssh-agent.rs %build cd pam_rssh-%{version_full} cargo update time cargo build --release %install cd pam_rssh-%{version_full} mkdir -p $RPM_BUILD_ROOT%{_libdir}/security/ install -m 755 target/release/libpam_rssh.so $RPM_BUILD_ROOT%{_libdir}/security/ %files %license pam_rssh-%{version_full}/LICENSE %license pam_rssh-%{version_full}/dep/ssh-agent.rs/LICENSE %attr(0755,root,root) %{_libdir}/security/libpam_rssh.so %doc pam_rssh-%{version_full}/README.md %changelog * Sat Dec 28 2024 Dylan Janmart - 1.2.0-1 - Update to 1.2.0 (RC2) * Sat Dec 28 2024 Dylan Janmart - 1.1.0-1 - Initial build