source: README.PACKAGE_MANAGEMENT@ b99e56a

2.4
Last change on this file since b99e56a was c6c2d89, checked in by Pierre Labastie <pierre@…>, 8 years ago

Small adjustements to READMEs and BLFS/TODO

  • Property mode set to 100644
File size: 4.1 KB
RevLine 
[7072e1f]1TITLE : Package management in jhalfs
[f60a8b7]2BY : Pierre Labastie (work in progress)
[c6c2d89]3$Id$
[7072e1f]4
51. INTRODUCTION:
6
7 There are several hints discussing package management for LFS, but
8 nothing under jhalfs. There used to be a patch for PACO that I cannot
[240b1a8]9 find now. This is a modification ("DESTDIR install" automation), which
10 allows to use a package manager inside jhalfs. I hope it is flexible enough
11 to support several package managers, at least among those who use DESTDIR
12 install. My initial implementation used dpkg, from Debian, in a very
13 crude way (Debian has a sophisticated package management system, which
14 I have not tried to use here). There is also a port to Pacman from
15 Arch Linux (http://www.archlinux.org). I am sorry to say I have (almost)
16 no experience with rpm, so I cannot tell whether it would fit.
[7072e1f]17
182. OVERVIEW OF THE SYSTEM:
19
[c7c32a3]20 Presently, package management is only available for LFS. I plan to
[bd00951]21 upgrade BLFS tools, but nothing usable right now. I have not attempted
22 to adapt this tool for the other flavours of LFS.
[c7c32a3]23
24 To use package management, you need to create the required files in
25 the pkgmngt directory (see below), and to select "package management" in
26 the build settings. Note that this is incompatible with creating an SBU
27 and usage report.
28
293. DETAILS OF OPERATION:
30
[bd00951]31 This system performs basically a "DESTDIR install" for all pages
32 in chapter 6, 7 and 8 of the book. The name of the DESTDIR directory is the
33 same as the one of the executed script. The path to this directory is
[c7c32a3]34 made available to the scriplets through the PKG_DEST variable.
[bd00951]35 The XSL stylesheet used for generating the scriptlets, automatically
36 adds DESTDIR install instructions when "package management" is selected.
37 Also all the paths beginning with " /" or ">/" (absolute paths) are prepended
38 with $PKG_DEST. This has the default that you might want to move
[7072e1f]39 files to non existent directories. There is no simple way to automatically
40 create those directories, because you have sometimes to use the full path
41 (instructions of the form `cp file dir') and sometimes only the dirname
[bd00951]42 (instructions of the form `cp file1 file2'). So the XSL stylesheet
43 creates a reasonable subset of the FHS hierarchy into the destination
44 directory. Empty directories are then removed before packing the
[7072e1f]45 binary package.
[bd00951]46 In order to use the package manager, it has to be installed at the end of
47 chapter 5 (temporary installation in /tools) and chapter 6 (final install).
48 Furthermore, the administrative files and directories have to be created
49 during the `Creating Directories' and `Creating Essential Files' stages.
50 For all this, the user has to supply a file in docbook XML format, with
51 the necessary instructions and enough information to download the tarball.
52 This file should reside in the `pkgmngt' directory and be named
53 `packageManager.xml'. A template named `packageManager.xml.template' is
54 provided in the `pkgmngt' subdirectory. There are also two XML files for
55 dpkg and pacman, respectively `packageManager.xml.dpkg' and
56 `packageManager.xml.pacman', that you can copy to `packageManager.xml'.
57 They are not updated often, so the versions used can be rather old.
[7072e1f]58 The last thing to do is to tell how to use the package manager. When
59 the binary package is ready, the scriptlets call a shell function named
60 `packInstall', which should pack the binary package and install it on the
61 system. Note that nothing has been done to manage configuration files,
[bd00951]62 which are ususally treated specially by package managers: depending on
[7072e1f]63 the book layout, it is sometimes possible to create those files afterwards,
64 and sometimes not, which means that you have to check them after each
[bd00951]65 upgrade. The user has to write his own `packInstall' function. The shell
66 function should be defined in a file named `packInstall.sh', residing in
67 the `pkgmngt' directory. A template is provided, as well as two example
[240b1a8]68 scripts for dpkg and pacman. Note that, due to the way pacman checks the
69 available space on disk, the root directory in chroot must be a mount point,
70 otherwise the installation of packages fails.
Note: See TracBrowser for help on using the repository browser.