Building the RPM

After you have created your specfile the next step is to build the rpm.  This is done using the rpmbuild command.  To see all of the options for rpmbuild read it’s manpage, but here I use -ba to build all.

[user@localhost SPECS]$ rpmbuild -ba newpackage.spec

This will pour all sorts of information into your terminal, and for large packages it can take a while.  It will also slow down your computer a lot so don’t plan on doing anything else while this is going on.  Once you are done debugging you will find your rpms in ~/rpmbuild/RPMS and ~/rpmbuild/SRPMS.  Use rpmlint to see if any parts of your specfile need more attention.  Your goal is to have rpmlint return nothing thus signifying that there is nothing wrong with your rpm.  Using rpmlint is very simple.  Here is an example:

[user@localhost SPECS]$ rpmlint visual-4.beta16-1.fc9.i386.rpm
visual.i386: W: invalid-license Boost Software License - Version 1.0
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

RPM apparently does not know of the license, but thats ok.  Everything else looks good so the package is good to go.  You can also use rpmlint to check your specfile.  This may help you out if you are having issues building.

Previous Home Next

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: