diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-11-08 17:27:10 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2023-11-08 17:30:59 +0800 |
commit | d11686c6f0d1ef2d7c739e06ef151155b19e3469 (patch) | |
tree | e46d53997b8687a730c95165b40c6e99946503b7 | |
parent | 93311f4abb72c8e053970ff6122d90c75ce5a3d7 (diff) |
pkgmgt: Update the desc for "separate directories"
There seems some guy overusing this method so we should add more
caveats.
- Use /opt/foo-x.y instead of /usr/pkg/foo-x.y. /opt/foo-x.y is used in
BLFS for Rustc, Qt5, etc. and /usr/pkg is not FHS-compliant.
- Use /etc/ld.so.conf and LDFLAGS instead of LD_LIBRARY_PATH. Relying
on LD_LIBRARY_PATH is generally a bad idea, and we also don't use it
in BLFS for /opt packages.
- Discourage this method for general use, mention it may not work for
vital packages like Glibc.
-rw-r--r-- | chapter08/pkgmgt.xml | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml index 794fe1259..185538796 100644 --- a/chapter08/pkgmgt.xml +++ b/chapter08/pkgmgt.xml @@ -196,19 +196,29 @@ <para>This is a simplistic package management technique that does not need a special program to manage the packages. Each package is installed in a separate directory. For example, package foo-1.1 is installed in - <filename class='directory'>/usr/pkg/foo-1.1</filename> - and a symlink is made from <filename>/usr/pkg/foo</filename> to - <filename class='directory'>/usr/pkg/foo-1.1</filename>. When + <filename class='directory'>/opt/foo-1.1</filename> + and a symlink is made from <filename>/opt/foo</filename> to + <filename class='directory'>/opt/foo-1.1</filename>. When a new version foo-1.2 comes along, it is installed in - <filename class='directory'>/usr/pkg/foo-1.2</filename> and the previous + <filename class='directory'>/opt/foo-1.2</filename> and the previous symlink is replaced by a symlink to the new version.</para> <para>Environment variables such as <envar>PATH</envar>, - <envar>LD_LIBRARY_PATH</envar>, <envar>MANPATH</envar>, - <envar>INFOPATH</envar> and <envar>CPPFLAGS</envar> need to be expanded to - include <filename>/usr/pkg/foo</filename>. If you install more than a few packages, - this scheme becomes unmanageable.</para> + <envar>MANPATH</envar>, <envar>INFOPATH</envar>, + <envar>PKG_CONFIG_PATH</envar>, <envar>CPPFLAGS</envar>, + <envar>LDFLAGS</envar>, and the configuration file + <filename>/etc/ld.so.conf</filename> may need to be expanded to + include the corresponding subdirectories in + <filename class='directory'>/opt/foo-x.y</filename>.</para> + <para> + This scheme is used by the BLFS book to install some very large + packages to make it easier to upgrade them. If you install more + than a few packages, this scheme becomes unmanageable. And some + packages (for example Linux API headers and Glibc) may not work well + with this scheme. + <emphasis role='bold'>Never use this scheme system-wide.</emphasis> + </para> </sect3> <sect3> |