Friday, September 24, 2010

A Prequel: Rebuilding an Existing Fedora SRPM

Rebuilding an Existing Fedora SRPM:
I chose to rebuild the NLED package on my machine which was quite simple.

Steps:
  1. Install the necessary packages: rpm-build, rpmdevtools, rpmlint, yum-utils 
  2. Setup your system, see here
  3. Download the source file wget http://cdot.senecac.on.ca/software/nled/nled_2_52_src.tgz
  4. Install it, rpm -ivh nled_2_52_src.tgz
  5. Go in the: cd ~/rpmbuild/SPECS directory
  6. Run the command rpmbuild -ba packagename.spec
The .spec file was fairly straightforward. This took about 15 seconds to complete (also see Testing Build Times), and was done without breaking a sweat - unlike the next section below.


Creating my own .spec file
In the second week of the course, I had built Snort from source using ./configure, make and make install, which can be found here.

A few nights ago, I tried building my own spec file for Snort but ran into a few problems. Thus I took a look at the original Snort spec file after installing the source (To see how, click here), and it was filled with information that I am unfamiliar with (for nowcan’t emphasize that enoughfor now). However, I did take some time to go over it to try to understand out what each line was doing.

Next, I figured I can write my own (much) simpler snort spec file and get it to build into an rpm package – but I’ll do that at a later time. Since this was my first attempt at creating my own spec file, I wanted to try something much easier at first and get practice, understand it more.

I will post my experience of creating my rpm build via a spec file in the coming days along with a link to download the respective spec file, source and package for your perusal or curiosity.

Heck, I’m still going through SourceForge looking at all the goodies available.

No comments:

Post a Comment