source: README.PACKAGE_MANAGEMENT@ 18567e9

2.4 ablfs-more legacy trunk
Last change on this file since 18567e9 was 240b1a8, checked in by Pierre Labastie <pierre@…>, 8 years ago

Update pacman commands (not version, it would require too many changes to the
build system).

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