Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify the install location for a relocatable RPM using Yum

Tags:

centos

rpm

yum

I have created a relocatable RPM using the instructions in this website: http://www.cyberciti.biz/faq/rpm-relocatable-packages/

This means that I can install the package into its default location, /opt/app, using

rpm -ivh mypackage.rpm

However, if I decide that I weant the package to be installed into /usr/local/bin instead, I can install it using:

rpm -ivh --prefix=/usr/local/bin mypackage.rpm

All of this works perfectly. However, I need to install the package via Yum. How do I pass the --prefix argument to Yum?

like image 330
RikSaunderson Avatar asked Aug 19 '14 13:08

RikSaunderson


1 Answers

I don't believe this is possible and a quick online search seems to concur. Including this mailing list thread from 2007. The point that Seth Vidal makes in his reply is, I think, the main one. Relocations cause problems for file-based dependency tracking which, at least at the time, nothing bothered to handle.

That being said I think the utility of relocatable RPMs is likely not very high as building one that functions correctly is difficult as not being able to depend on file locations makes many (normally trivial) programmatic operations quite difficult.

like image 143
Etan Reisner Avatar answered Sep 28 '22 01:09

Etan Reisner