[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Building RPM 3.x RPMs



On Mon, Jul 02, 2001 at 02:55:52PM -0400, John Aldrich wrote:
> Is there any way to build an RPM that's compatible with RedHat 6.x version of 
> RPM using RPM 4.x? The reason I ask is that I package a couple small apps and 
> one of the developers has asked if there is any way I can create an RPM 
> that's compatible with RPM 3.x.

You do this if running rpm-4.0.2 on a Red Hat 6.2 box; otherwise dependencies
from a Red Hat 7.x box will prevent packaging. Since you need to build
on a 6.2 box anyways, you might just think about building with rpm-3.0.5
rather than using rpm-4.0.2, that's pretty easy to do. However, since you've
asked, here's the hacks necessary to achieve backward compatible packaging
from rpm-4.0.2:

Adding --nodirtokens will represent filenames as in rpm-3.0.4, as well
as removing the Big Bad v4 in the rpmlead structure. There are still
rpmlib(...) dependencies that track incompatibilities in packaging, rpm-3.0.5
understands those already. If you need to produce packaging for versions of
rpm before rpm-3.0.5, you'll need to understand the incompatibility, and not
use the facility in your packaging. For example, don't use
	Provides: foo = 1.2.3
to avoid silently acquiring a
	 rpmlib(VersionedDependencies) = 3.0.3-1
tracking dependency.

There's also the issue of how files are named in cpio archives, rpm-4.0.x
has added "./" to file names in the cpio archive so that "/" can be
represented. This is handled transparently in rpm-3.0.5, but can be turned
off by adding

    # XXX legacy requires './' payload prefix to be omitted from rpm packages.
    %define _noPayloadPrefix        1

to your build configuration if you need compatibility with even older versions
of rpm.

While I know of no reason why the above hacks can't produce packages that are
understood even as far back as rpm-2.5.x, I'd *still* suggest using rpm-3.0.5,
to build and not trying to mess with the above.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@jbj.org	(jbj@redhat.com)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []