diff options
Diffstat (limited to 'chapter06/pkgmgt.xml')
-rw-r--r-- | chapter06/pkgmgt.xml | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/chapter06/pkgmgt.xml b/chapter06/pkgmgt.xml index 7c82ca8b3..3b8d1aa95 100644 --- a/chapter06/pkgmgt.xml +++ b/chapter06/pkgmgt.xml @@ -12,12 +12,14 @@ <para>Package Management is an often requested addition to the LFS Book. A Package Manager allows tracking the installation of files making it easy to - remove and upgrade packages. Before you begin to wonder, NO—this section - will not talk about nor recommend any particular package manager. What it - provides is a roundup of the more popular techniques and how they work. The - perfect package manager for you may be among these techniques or may be a - combination of two or more of these techniques. This section briefly mentions - issues that may arise when upgrading packages.</para> + remove and upgrade packages. As well as the binary and library files, a + package manager will handle the installation of configuration files. Before + you begin to wonder, NO—this section will not talk about nor recommend + any particular package manager. What it provides is a roundup of the more + popular techniques and how they work. The perfect package manager for you may + be among these techniques or may be a combination of two or more of these + techniques. This section briefly mentions issues that may arise when upgrading + packages.</para> <para>Some reasons why no package manager is mentioned in LFS or BLFS include:</para> @@ -182,9 +184,13 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen> </sect3> <sect3> - <title>LD_PRELOAD Based</title> + <title>Tracing Installation Scripts</title> - <para>In this approach, a library is preloaded before installation. During + <para>In this approach, the commands that the installation scripts perform + are recorded. There are two techniques that one can use:</para> + + <para>The <envar>LD_PRELOAD</envar> environment variable can be set to + point to a library to be preloaded before installation. During installation, this library tracks the packages that are being installed by attaching itself to various executables such as <command>cp</command>, <command>install</command>, <command>mv</command> and tracking the system @@ -195,6 +201,9 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen> ensure that the package manager does not break anything and logs all the appropriate files.</para> + <para>The second technique is to use <command>strace</command>, which + logs all system calls made during the execution of the installation + scripts.</para> </sect3> <sect3> @@ -209,7 +218,7 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen> <para>This approach is used by most of the package managers found in the commercial distributions. Examples of package managers that follow this approach are RPM (which, incidentally, is required by the <ulink - url="http://lsbbook.gforge.freestandards.org/package.html#RPM">Linux + url="http://www.linux-foundation.org/en/Specifications">Linux Standard Base Specification</ulink>), pkg-utils, Debian's apt, and Gentoo's Portage system. A hint describing how to adopt this style of package management for LFS systems is located at <ulink |