RPM Community Forums

Mailing List Message of <rpm-users>

Re: rpm spec: clearing Prefix: to create a non-relocatable subpackage (of a relocatable package)?

From: Robert Scheck <robert@rpm5.org>
Date: Tue 08 Oct 2013 - 02:58:44 CEST
Message-ID: <20131008005844.GA26959@hurricane.linuxnetz.de>
Hello Andreas,

On Mon, 07 Oct 2013, Andreas Luik wrote:
>   I'm trying to create a non-relocatable subpackage from a spec file, where the
> main package is relocatable, i.e. has a Prefix: tag.  It is possible to use Prefix:
> for subpackages, e.g. to use a different value as for the main package, but I
> have not been able to "clear" the main package's prefix setting.  Using the following
> spec file:

I am very happy to be corrected by somebody, but I do not think that this
is currently implemented when reading

 - /cvs/fileview?f=rpm/build/parsePreamble.c
 - http://rpm.org/gitweb?p=rpm.git;a=blob;f=build/parsePreamble.c

If you search there for RPMTAG_PREFIXES, you will likely see why I come to
this conclusion. And as there is also no addMacro()/delMacro(), I am quite
certain there is no "hidden" macro for this that could be abused somehow.

You could use a path for Prefix: that is not used in %files but this should
fail (according to /docs/api/relocatable.html) - however it
does interestingly not fail with some RPM versions. Finally this doesn't do
the trick, because it does not prevent users from "--relocate /=/my" which
at least also works using some RPM versions (even RPM has "Prefix: /usr"; I
do not know if this behaviour is really expected).


  • application/pgp-signature attachment: stored
Received on Tue Oct 8 03:02:20 2013
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.