Specify the install location for a relocatable RPM using Yum

谁说胖子不能爱 提交于 2019-12-22 05:23:07

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/25385390/specify-the-install-location-for-a-relocatable-rpm-using-yum

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!