Creating a Snort Package for use with Fedora 12 (default spec file) February 9, 2010Posted by Paul Whalen in Uncategorized.
First we need to create a packaging environment. I downloaded rpm-build, rpmdevtools, rpmlint using the ‘yum’ command. Then used the “rpmdev-setuptree” command to set up the packaging environment which created a new folder in my working directory called ‘rpmbuild’ which contained the folders ‘BUILD’ , ‘RPMS ‘ , ‘SOURCES’ , ‘SPECS’ and ‘SRPMS’. Then using the command ‘yumdownloader –source snort’ I downloaded ‘snort-184.108.40.206-1.fc12.src.rpm’, the source package for Snort. I then ran the command ‘rpm -i snort-220.127.116.11-1.fc12.src.rpm’.
Moving to the rpmbuild directory I now find in the ‘SOURCES’ folder the files ‘snort-18.104.22.168.tar.gz’, ‘ snortd’ and ‘ sysconfig.snort’. And in the SPEC folder there is now a file ‘snort.spec’.
Now to rebuild. I ran the command ‘rpmbuild –rebuild snort-22.214.171.124-1.fc12.src.rpm’ but received ‘Failed build dependencies’ errors with a list of packages. Installing the needed packages I ran the command again and this time was successful. The default spec file creates 10 different rpms and include snort compiled with different configuration options.
Next I will be creating my own Snort spec file and posting the results.