MTD 248-645A Manual de usuario Pagina 100

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 347
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 99
Linux From Scratch - Version 7.0
80
The installation needs to be faked, so that the package thinks that it is installed in /usr though in reality it is installed
in the /usr/pkg hierarchy. Installing in this manner is not usually a trivial task. For example, consider that you are
installing a package libfoo-1.1. The following instructions may not install the package properly:
./configure --prefix=/usr/pkg/libfoo/1.1
make
make install
The installation will work, but the dependent packages may not link to libfoo as you would expect. If you compile
a package that links against libfoo, you may notice that it is linked to /usr/pkg/libfoo/1.1/lib/libfoo.
so.1 instead of /usr/lib/libfoo.so.1 as you would expect. The correct approach is to use the DESTDIR
strategy to fake installation of the package. This approach works as follows:
./configure --prefix=/usr
make
make DESTDIR=/usr/pkg/libfoo/1.1 install
Most packages support this approach, but there are some which do not. For the non-compliant packages, you may
either need to manually install the package, or you may find that it is easier to install some problematic packages
into /opt.
6.3.2.4. Timestamp Based
In this technique, a file is timestamped before the installation of the package. After the installation, a simple use of
the find command with the appropriate options can generate a log of all the files installed after the timestamp file
was created. A package manager written with this approach is install-log.
Though this scheme has the advantage of being simple, it has two drawbacks. If, during installation, the files are
installed with any timestamp other than the current time, those files will not be tracked by the package manager. Also,
this scheme can only be used when one package is installed at a time. The logs are not reliable if two packages are
being installed on two different consoles.
6.3.2.5. Tracing Installation Scripts
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 calls that modify the filesystem. For this approach to work, all the executables
need to be dynamically linked without the suid or sgid bit. Preloading the library may cause some unwanted side-
effects during installation. Therefore, it is advised that one performs some tests to 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.
6.3.2.6. Creating Package Archives
In this scheme, the package installation is faked into a separate tree as described in the Symlink style package
management. After the installation, a package archive is created using the installed files. This archive is then used to
install the package either on the local machine or can even be used to install the package on other machines.
Vista de pagina 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 346 347

Comentarios a estos manuales

Sin comentarios