[lsb-discuss] RPM build tool
Stew Benedict
stewb at linux-foundation.org
Wed Aug 13 04:13:07 PDT 2008
On Tue, 12 Aug 2008, Theodore Tso wrote:
> The argument has been that some ISV's are willing to deal with
> platform specific packaging tools, since they have today for Windows,
> Solaris, AIX, Macos, etc.
>
> However, they don't want a tool which takes over how they build
> things, and RPM fundamentally assumes that you start with a source
> tarball plus patches. This means that in order to use RPM you have to
> rototill your entire build proess. This is especially bad for ISV's
> who want to build out of source code management system, and where the
> sources are big enough that needing to package them all up into a
> gigundo tarball just to make RPM happy is not what they are looking
> for. (Or some ISV's built several binary components out of separate
Maybe part of the problem ISVs have with rpm is just perception. While the
"classic" rpm packaging process does include source tarballs, etc, It is
possible to use rpm/rpmbuild in more flexible ways. The way we package our
appbat apps is a perfect example of not using rpm to control the whole
build process. The build is done by nALFS, with the resulting files
targeted for packaging installed in a "pkgroot", exactly as I modeled
makelsbpkg.
Apologies if people are already familiar with how we do this, but the tone
of the conversation gives me the impression that people feel rpm is a lot
more restrictive than it really is.
The spec file used has no source files, no %pre content, no %build
content, no %install content. %files for the appbat apps is a one-liner:
%files
%attr ( - bin bin ) /opt/lsb/appbat
The makefile in the rpm directory for the appbat then just does the
packaging bit:
rpmbuild --rcfile "/usr/lib/rpm/rpmrc:rpmrc" -bb xpaint.spec
where the local rpmrc, sources a local rpmmacros, with:
%pkgroot %{_topdir}/pkgroot
So rpm takes what nALFS deposited in %pkgroot/%name and packages it with
the defined uid/gid. Adding pre/post/preun/postun scripts if defined in
the (very basic) spec file.
--
Stew Benedict
The Linux Foundation
More information about the lsb-discuss
mailing list