I have an rpm that builds two packages. I tried to add separate Prefix tags in the preamble each of the packages.

However, as there is one prep section, I am not able to address the prefix each of the packages individually. (%prefix indicates only the Prefix of the subpackage)

Is there a way to specify package-specific prefix?

  • %packagename-prefix ?
    – wurtel
    Commented Dec 17, 2014 at 12:52
  • that didn't work for me!
    – navster
    Commented Dec 18, 2014 at 10:24

1 Answer 1


Use macros like {%prefix1} to name multiple prefixes and then use syntax like "Prefix: %{prefix1}". I'm not sure what you are expecting from multiple prefixes in rpm packaging. Prefixes were designed for relocatable packages, but all paths in a *.rpm package can be relocated during install. Adding an explicit Prefix: just disables a warning message.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .