%global debug_package %{nil} Name: netexec Version: 1.4.0 Release: 1%{?dist} Summary: A swiss army knife for pentesting Windows/Active Directory environments License: BSD URL: https://github.com/Pennyw0rth/NetExec Source0: %{url}/archive/refs/tags/v%{version}.tar.gz BuildRequires: git BuildRequires: python3-virtualenv BuildRequires: python3-pip BuildRequires: python3-devel Provides: crackmapexec %description NetExec is a swiss army knife for pentesting Windows/Active Directory environments. %prep %autosetup -n NetExec-%{version} # Diable dynamic versioning which fails RPM builds without VCS sed -i '/^\[tool.poetry-dynamic-versioning\]/,/^$/ s/enable = true/enable = false/' pyproject.toml %build # Create a virtual environment for building python3 -m venv env source env/bin/activate # Remove system pyinstaller to avoid conflicts pip uninstall -y pyinstaller || true # Install pyinstaller and project dependencies pip install pyinstaller . pyinstaller netexec.spec %install # Install the compiled binary install -Dm755 dist/nxc %{buildroot}%{_bindir}/nxc ln -s %{_bindir}/nxc %{buildroot}%{_bindir}/netexec ln -s %{_bindir}/nxc %{buildroot}%{_bindir}/NetExec %files %license LICENSE %doc README.md %{_bindir}/nxc %{_bindir}/netexec %{_bindir}/NetExec %changelog * Sat May 25 2025 Your Name - 1.4.0-1 - Initial RPM release