From d327d74c877a611230b2878ad71295a7057d2606 Mon Sep 17 00:00:00 2001 From: Matthew Burgess Date: Sat, 19 Jan 2008 15:25:26 +0000 Subject: Add a few more details to the package management section, and correct the URL for the LSB specs. Fixes #2073 and #2130. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8452 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/pkgmgt.xml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'chapter06') 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 @@ 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. + 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. Some reasons why no package manager is mentioned in LFS or BLFS include: @@ -182,9 +184,13 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install - LD_PRELOAD Based + Tracing Installation Scripts - In this approach, a library is preloaded before installation. During + In this approach, the commands that the installation scripts perform + are recorded. There are two techniques that one can use: + + The LD_PRELOAD 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 cp, install, mv and tracking the system @@ -195,6 +201,9 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install ensure that the package manager does not break anything and logs all the appropriate files. + The second technique is to use strace, which + logs all system calls made during the execution of the installation + scripts. @@ -209,7 +218,7 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install 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 Linux + url="http://www.linux-foundation.org/en/Specifications">Linux Standard Base Specification), 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