From 4cac37d1329726b963d4580643e5ce98472934b7 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Wed, 18 Oct 2023 16:13:49 -0400 Subject: [PATCH] standardize spec and add check --- .gitignore | 2 ++ python-ssh-audit.spec | 52 ------------------------------------------- sources | 4 +++- ssh-audit.spec | 51 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 53 deletions(-) delete mode 100644 python-ssh-audit.spec create mode 100644 ssh-audit.spec diff --git a/.gitignore b/.gitignore index 6c00095..62e4ee0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /ssh-audit-3.0.0.tar.gz +/ssh-audit-3.0.0.tar.gz.sig +/jtesta_2020-2025.asc diff --git a/python-ssh-audit.spec b/python-ssh-audit.spec deleted file mode 100644 index 28bd9fe..0000000 --- a/python-ssh-audit.spec +++ /dev/null @@ -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 - 3.0.0-1 -- Initial package. diff --git a/sources b/sources index 95facec..c820c36 100644 --- a/sources +++ b/sources @@ -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 diff --git a/ssh-audit.spec b/ssh-audit.spec new file mode 100644 index 0000000..5532cb8 --- /dev/null +++ b/ssh-audit.spec @@ -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 - 3.0.0-1 +- Initial package.