Библиотека сайта или "Мой Linux Documentation Project"
|Maximum RPM: Taking the Red Hat Package Manager to the Limit|
|Prev||Chapter 15. Making a Relocatable Package||Next|
/opt. This means that, by default, the package will install its files under
/opt. Let's assume the spec file contains the following line in its %files list:
If the package is installed without any relocation, this file will be
/opt/bin. This is identical to how a
non-relocatable package is installed.
However, if the package is to be relocated on installation, the path of every file in the %files list is modified according to the following steps:
The part of the file's path that corresponds to the path specified on the prefix tag line is removed.
The user-specified relocation prefix is prepended to the file's path.
/opt/bin/bazfile as an example, let's assume that the user installing the package wishes to override the default prefix (
/opt), with a new prefix, say,
/usr/local/opt. Following the steps above, we first remove the original prefix from the file's path:
Now that the file's new path has been created, RPM installs the file normally. This part of it seems simple enough, and it is. But as we mentioned above, there are a few things the package builder needs to consider before getting on the relocatable package bandwagon.
Только зарегистрированные пользователи могут оценивать и комментировать статьи.