source: README.PACKAGE_MANAGEMENT@ 9575278

2.4 ablfs-more legacy trunk
Last change on this file since 9575278 was bd00951, checked in by Pierre Labastie <pierre@…>, 10 years ago

Add pacman as package manager.

  • Property mode set to 100644
File size: 3.6 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
8 find now. This is a modification, which allows to use a package manager
9 inside jhalfs. I hope it is flexible enough to support several package
10 managers. My implementation uses dpkg, from Debian, in a very crude way.
11 Debian has a sophisticated package management system, which I have not
12 tried to use here. For example, it should be usable with Pacman from
13 Arch Linux (http://www.archlinux.org), as far as I remember from my old
14 days with DIYL. I am sorry to say I have (almost) no experience with
15 rpm, so I cannot tell whether it would fit.
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
59 scripts for dpkg and pacman.
Note: See TracBrowser for help on using the repository browser.