%global plugin exploitable %global snapshot 20170717git35b742d %global gdb_data /usr/share/gdb/python/%{plugin} %global gdb_init /etc/gdbinit.d # The tarball is created like this: # git clone https://github.com/jfoote/exploitable.git # tar --exclude=.* -cvf exploitable.tar exploitable/* # gzip --best exploitable.tar # Then the snapshot global is updated to meet fedora guidelines Name: gdb-%{plugin} Version: 1.32 Release: 1.%{snapshot}%{?dist} Summary: GDB extension for exploitability License: MIT Group: Development/Libraries URL: https://github.com/jfoote/exploitable Source0: %{plugin}.tar.gz Source1: %{name}.gdb Source2: README.fedora BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: x86_64 i686 BuildArch: noarch Requires: gdb %description 'exploitable' is a GDB extension that classifies Linux application bugs by severity. The extension inspects the state of a Linux application that has crashed and outputs a summary of how difficult it might be for an attacker to exploit the underlying software bug to gain control of the system. The extension can be used to prioritize bugs for software developers so that they can address the most severe ones first. %prep %setup -q -n %{plugin} %build %install rm -rf %{buildroot} mkdir -p %{buildroot}%{gdb_data} cp -ra exploitable/* %{buildroot}%{gdb_data} rm -rf %{buildroot}%{gdb_data}/tests mkdir -p %{buildroot}%{gdb_init} cp %{SOURCE1} %{buildroot}%{gdb_init} cp %{SOURCE2} . %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README.md AUTHORS.txt README.fedora %license LICENSE.md %dir %{gdb_data} %{gdb_data}/* %config(noreplace) %{gdb_init}/* %changelog * Wed Jul 19 2017 Steve Grubb 1.32-1.20170717git35b742d - Initial packaging attempt