[PLUG] Making RPMs (and DEBs?) from source tarballs (2)

Ian Burrell ianburrell at gmail.com
Mon Oct 22 18:56:42 UTC 2007


On 10/20/07, Keith Lofstrom <keithl at kl-ic.com> wrote:
>
> Rich, Aaron, thanks!  checkinstall worked semi-perfectly.  I ran it first
> on a build on system A, and it tried to include some extraneous files in
> the RPM file (I suspect something else was simultaneously doing some kind
> of update on A).  So I ran checkinstall on system B, and that built an
> RPM file that works on both system A and system B.  Someday I will learn
> the "proper" way to exclude extraneous files, but I got the job done.
>

You definitely want to use build roots when building RPMs to keep from
polluting your installation and to allow building as a user not root.
rpmbuild will complain if there are files in the buildroot that aren't
listed in the %files section.

> RPM normally keeps track of dependencies;  I wonder if the RPMs I am
> building may fail on some versions of the distro with different packages
> installed.  Perhaps I should do these builds on a minimal install inside
> a virtual machine,  to keep track of the dependencies.
>

RPM automatically finds dependencies on shared libraries.  It also
finds binaries called by scripts.  Other dependencies have to be added
manually with Requires lines in the spec.

The other thing you need to worry about are BuildRequires.  These are
requirements for building a package.  These can be tricky because a
development machine will have lots of packages installed that won't be
on a clean machine.  Fedora and Centos developers use mock for
building packages inside a chroot.  This also allows building for
different distributions.

 - Ian



More information about the PLUG mailing list