Can we make a non-relocatable RPM package relocatable during repackaging?

2

1

I am trying to install a package on a RHEL4 box, the package is non-relocatable.

I need it at a custom location because there are some other applications which need to be linked to it.

So I wonder if it is possible that to install the package to the default location, then remove it with the -e -repackage option and during this step make it relocatable.

If this can be done can you please specify what options should I be using?

If this is not possible can you please specify some other way?

user2028989

Posted 2013-02-24T06:19:20.653

Reputation: 35

Answers

1

Relocatable packages are deprecated, as they are of limited utility (and hard to create unless the code itself is really filessytem-position independent). Just installing, moving stuff around and packaging from there is unlikely to work (configuration files paths are hardwired into the executables, location of data files are fixed; and a lot of other things have to change). If the source uses the standard ./configure; make; make install dance, your best bet is to get the source RPM, install that one, hack the SPEC file to configure for an alternative location, and rebuild. Just make sure to check the dependencies of the package, and to give it a different name (e.g., package-localized) so it doesn't collide with the official one. Keep the SPEC file around, so you can recreate it whenever upstream updates the package.

vonbrand

Posted 2013-02-24T06:19:20.653

Reputation: 2 083

Why do you say that relocatable packages are deprecated? Do you have a URL or source for that? – Fredrik Wendt – 2015-08-14T08:57:26.357

2There is no reason whatsoever to claim that "relocatable packages are deprecated". This is false. – Al Onestone – 2016-03-22T16:16:19.680

Relocatable packages are "strongly discouraged" but not depreciated. – fpmurphy – 2018-10-25T03:50:01.930