Skip to content

Instantly share code, notes, and snippets.

@davidjb
Last active August 31, 2017 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidjb/16dd3098b1da7644d2313540f7be72e4 to your computer and use it in GitHub Desktop.
Save davidjb/16dd3098b1da7644d2313540f7be72e4 to your computer and use it in GitHub Desktop.
Helpful resources for RPM building

RPM Building for Dummies

RPM building is a little complicated, but here's a variety of resources and snippets for making things easier.

Commands

Packages to install to get your development environment happy:

yum install -y rpm-build rpmdevtools yum-utils

Set up the RPM development tree in a VM or machine:

rpmdev-setuptree

Start a new specfile and follow the prompts:

rpmdev-newspec

Download all sources within a specfile:

spectool -g -R name.spec

Install the build dependencies within a specfile:

yum-builddep -y name.spec

Build an RPM using a specfile:

rpmbuild -ba name.spec

Check a specfile for problems (requires rpmlint installation):

rpmlint name.spec

Worked examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment