# Generated by rust2rpm 27 %bcond check 1 # prevent library files from being installed %global cargo_install_lib 0 %define version 1.2.0 %define version_full 1.2.0 %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-rpm-macros >= 26 BuildRequires: rust-multisock-devel >= 1.0.0, rust-multisock-devel < 2.0.0 %description This PAM module provides ssh-agent based authentication. The primary design goal is to avoid typing password when you sudo on remote servers. Instead, you can simply touch your hardware security key (e.g. Yubikey/Canokey) to fulfill user verification. The process is done by forwarding the remote authentication request to client-side ssh-agent as a signature request. %prep %autosetup -n pam_rssh-%{version_full} -p1 %cargo_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 %generate_buildrequires %cargo_generate_buildrequires %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