Friday, March 21, 2014

Reasons to relocated installation directories of package

                             Reasons to relocated installation directories of package


#~~#RPM has the ability to give users some latitude in deciding where packages are to be installed on
their systems. However, package builders must first design their packages to give users this
freedom.
In other words, an RPM package that can be installed into a different directory is said to be relocatable. Please note that not all RPM packages can be installed into another directory.
That's all well and good, but why would the ability to ``relocate'' a package be all that important?
#~~#Why relocate packages?
1.Avoid disk space problem(e.g default installation location is small in size)
2.This is standard installation method adopted for compliance
3.Save from attacks.

#~~#To check is package relocatable or not on Generic Linux 
cmd:-rpm -qpi package-file-name.rpm | grep Relocations

#~~#rpm options for installing other then default predefined location:-
--relocate OLDPATH=NEWPATH
For relocatable binary packages, translate all file paths that start with OLDPATH in the package relocation hint(s) to NEWPATH. This option can be used repeatedly if several OLDPATHâs in the package are to be relocated.
--prefix NEWPATH
For relocatable binary packages, translate all file paths that start with the installation prefix in the package relocation hint(s) to
NEWPATH.



No comments:

Post a Comment