Tuesday, April 19, 2022

[SOLVED] prefix and reloctable rpm package according to an other rpm prefix

Issue

I have install sample.rpm in /opt. I want samplw2.rpm find the relocation path of sample.rpm ad install itself in same place. is there any command or macro in spec file which check it befor installation or not?


Solution

I'm pretty sure this isn't possible; the file locations are fixed. The easiest solution would be to put them in a known location, and then set up a symlink in your %post, e.g. linking /opt/sample2 to /usr/local/sample2 where the latter is where the RPM puts the files.



Answered By - Aaron D. Marasco
Answer Checked By - Robin (WPSolving Admin)