ssh-audit/ssh-audit.spec

59 lines
1.5 KiB
RPMSpec
Raw Normal View History

2023-10-18 20:13:49 +00:00
Name: ssh-audit
2024-01-02 15:30:21 +00:00
Version: 3.1.0
2023-10-18 20:13:49 +00:00
Release: 1%{?dist}
Summary: An SSH server & client configuration security auditing tool
License: MIT
URL: https://github.com/jtesta/ssh-audit
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz.sig
# Ideally this would be hosted not next to the sources, but, I cannot find one
Source: %{url}/releases/download/v%{version}/jtesta_2020-2025.asc
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: gnupg2
2024-01-02 15:30:21 +00:00
BuildRequires: python3dist(pytest)
2023-10-18 20:13:49 +00:00
%description
ssh-audit is an SSH server & client security auditing (banner, key exchange,
encryption, mac, compression, compatibility, security, etc)
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
2024-01-02 15:30:21 +00:00
%autosetup
2023-10-18 20:13:49 +00:00
2024-01-02 15:30:21 +00:00
#remove shebang
sed -i -e '1{\@^#!/usr/bin/env python@d}' src/ssh_audit/ssh_audit.py
2023-10-18 20:13:49 +00:00
%generate_buildrequires
%pyproject_buildrequires -t
%build
%pyproject_wheel
%install
%pyproject_install
# importable module is underscore :)
%pyproject_save_files ssh_audit
2024-01-02 15:30:21 +00:00
install -t %{buildroot}%{_mandir}/man1 -Dpm 0644 ssh-audit.1
2023-10-18 20:13:49 +00:00
%check
2024-01-02 15:30:21 +00:00
# Upstream uses tox, but doesn't have definitions for py3.12 yet
%pytest
2023-10-18 20:13:49 +00:00
%files -f %{pyproject_files}
%doc README.md
2024-01-02 15:30:21 +00:00
%{_mandir}/man1/ssh-audit.1*
2023-10-18 20:13:49 +00:00
%{_bindir}/ssh-audit
%changelog
2024-01-02 15:30:21 +00:00
* Tue Jan 02 2024 Neil Hanlon <neil@shrug.pw> - 3.1.0-1
- add in man page
- use pytest
2023-10-18 20:13:49 +00:00
* Sun Oct 15 2023 Neil Hanlon <neil@shrug.pw> - 3.0.0-1
- Initial package.