Monday, September 28, 2009

*MASSIVE SIGH* Spec file....

*sigh* Where do I begin?

Well I learned how to write a simple spec file first after getting the rpmbuild directory. I chose ettercap to build from the spec file and I guess that was not the wisest choice but I stuck with it.

I first had an issue with the ettercap version since it doesnt start with a number it starts with a letter, Ettercap-NG-0.7.3. I simply had to add "%setup -q -n ettercap-NG-0.7.3" to the prep section with the "-n" allowing the letters.

Secondly I had an issue with O_CREAT only having 2 parameters and needing three, after searching countless forums I found out that this was a bug and needed to be fixed using patches. (https://bugzilla.redhat.com/show_bug.cgi?id=330971) I then searched for all the ettercap patches I could, added them to my SOURCES directory and put a section in my specfile to allow for patching. http://cvs.fedoraproject.org/viewvc/F-11/ettercap

My next issue was that in the %files section I had %{bindir}/* when it gave me an error I changed it to %{_bindir}/*. After this I got a whole bunch of packages that were installed but still unpackaged. To solve this I added %{_datadir}/*,
%{_libdir}/*, %{_mandir}/*.

The binary then showed up in the RPMS directory and I ran rpmlint. I had a bunch of errors that I could not fix (I spent a lot of time.) I then decided in another rpmbuild directory to look at what the actual spec file for ettercap should look like for it to run perfectly with no errors, it was huge. http://cvs.fedoraproject.org/viewvc/devel/ettercap/ettercap.spec?view=co

*sigh* Why did I choose ettercap...

No comments:

Post a Comment