standardize spec and add check

This commit is contained in:
Neil Hanlon 2023-10-18 16:13:49 -04:00 committed by Neil Hanlon
parent ae5f719043
commit 4cac37d132
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
4 changed files with 56 additions and 53 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
/ssh-audit-3.0.0.tar.gz
/ssh-audit-3.0.0.tar.gz.sig
/jtesta_2020-2025.asc

View File

@ -1,52 +0,0 @@
# Created by pyp2rpm-3.3.8
%global pypi_name ssh-audit
%global pypi_version 3.0.0
Name: python-%{pypi_name}
Version: %{pypi_version}
Release: 1%{?dist}
Summary: An SSH server & client configuration security auditing tool
License: MIT
URL: https://github.com/jtesta/ssh-audit
Source0: %{pypi_source}
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
%description
SSH server & client security auditing (banner, key exchange, encryption, mac,
compression, compatibility, security, etc)
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
Requires: python3dist(setuptools)
%description -n python3-%{pypi_name}
SSH server & client security auditing (banner, key exchange, encryption, mac,
compression, compatibility, security, etc)
%prep
%autosetup -n %{pypi_name}-%{pypi_version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
%install
%py3_install
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{_bindir}/ssh-audit
%{python3_sitelib}/ssh_audit
%{python3_sitelib}/ssh_audit-%{pypi_version}-py%{python3_version}.egg-info
%changelog
* Sun Oct 15 2023 Neil Hanlon <neil@shrug.pw> - 3.0.0-1
- Initial package.

View File

@ -1 +1,3 @@
SHA512 (ssh-audit-3.0.0.tar.gz) = b7b7454da4bd77065709bc3f2fefb7285fcc5448a28193dee41a7417117c4a9bcfc03bfce1e50fcb96bea53292be38591a4a30e8da95e419224ad83c029a25e2
SHA512 (ssh-audit-3.0.0.tar.gz) = 2fcfc6c8b6737d54894de70dbcf1f800662ca122995c897507c87c73fecad66571b44bc3dfe102ff0dbafd270e537e5e00c7449319f1ee12b90494ee784c0cde
SHA512 (ssh-audit-3.0.0.tar.gz.sig) = 19ba2818261b198e412ebc8a6e1780b83acba68b1d8acfec3bf1e3dcf465662b15102a7aabeeb4d752044b3040dc172ebfb48456209f4aaed242524eb1c77ea4
SHA512 (jtesta_2020-2025.asc) = 9bb6779651a1493b3331d5499fb81f8098e9d5f86111837f450b9a4d2c4401ab70eff7c9a9249bf2549ee3705bc2d66335656f1e0296772749fdfc6369cfc96f

51
ssh-audit.spec Normal file
View File

@ -0,0 +1,51 @@
Name: ssh-audit
Version: 3.0.0
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
%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}'
%autosetup -n ssh-audit-%{version}
# Remove bundled egg-info
rm -rf %{name}.egg-info
%generate_buildrequires
%pyproject_buildrequires -t
%build
%pyproject_wheel
%install
%pyproject_install
# importable module is underscore :)
%pyproject_save_files ssh_audit
%check
%tox
%py3_check_import ssh_audit
%files -f %{pyproject_files}
%license LICENSE
%doc README.md
%{_bindir}/ssh-audit
%changelog
* Sun Oct 15 2023 Neil Hanlon <neil@shrug.pw> - 3.0.0-1
- Initial package.