Changeset d11686c


Ignore:
Timestamp:
11/08/2023 09:30:59 AM (7 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, 12.1-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
a161ad9, f6bf77de
Parents:
93311f4
git-author:
Xi Ruoyao <xry111@…> (11/08/2023 09:27:10 AM)
git-committer:
Xi Ruoyao <xry111@…> (11/08/2023 09:30:59 AM)
Message:

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/pkgmgt.xml

    r93311f4 rd11686c  
    197197      special program to manage the packages. Each package is installed in a
    198198      separate directory. For example, package foo-1.1 is installed in
    199       <filename class='directory'>/usr/pkg/foo-1.1</filename>
    200       and a symlink is made from <filename>/usr/pkg/foo</filename> to
    201       <filename class='directory'>/usr/pkg/foo-1.1</filename>. When
     199      <filename class='directory'>/opt/foo-1.1</filename>
     200      and a symlink is made from <filename>/opt/foo</filename> to
     201      <filename class='directory'>/opt/foo-1.1</filename>. When
    202202      a new version foo-1.2 comes along, it is installed in
    203       <filename class='directory'>/usr/pkg/foo-1.2</filename> and the previous
     203      <filename class='directory'>/opt/foo-1.2</filename> and the previous
    204204      symlink is replaced by a symlink to the new version.</para>
    205205
    206206      <para>Environment variables such as <envar>PATH</envar>,
    207       <envar>LD_LIBRARY_PATH</envar>, <envar>MANPATH</envar>,
    208       <envar>INFOPATH</envar> and <envar>CPPFLAGS</envar> need to be expanded to
    209       include <filename>/usr/pkg/foo</filename>. If you install more than a few packages,
    210       this scheme becomes unmanageable.</para>
    211 
     207      <envar>MANPATH</envar>, <envar>INFOPATH</envar>,
     208      <envar>PKG_CONFIG_PATH</envar>, <envar>CPPFLAGS</envar>,
     209      <envar>LDFLAGS</envar>, and the configuration file
     210      <filename>/etc/ld.so.conf</filename> may need to be expanded to
     211      include the corresponding subdirectories in
     212      <filename class='directory'>/opt/foo-x.y</filename>.</para>
     213
     214      <para>
     215        This scheme is used by the BLFS book to install some very large
     216        packages to make it easier to upgrade them.  If you install more
     217        than a few packages, this scheme becomes unmanageable.  And some
     218        packages (for example Linux API headers and Glibc) may not work well
     219        with this scheme.
     220        <emphasis role='bold'>Never use this scheme system-wide.</emphasis>
     221      </para>
    212222    </sect3>
    213223
Note: See TracChangeset for help on using the changeset viewer.