source: README.PACKGE_MANAGEMENT@ b533b78

2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since b533b78 was 7072e1f, checked in by Thomas Pegg <thomasp@…>, 13 years ago

Commit Pierre Labastie's patch for including package management support in jhalfs. NOTE: Package management is by default disabled.

  • Property mode set to 100644
File size: 3.6 KB
RevLine 
[7072e1f]1TITLE : Package management in jhalfs
2ADDED : $Date:$
3BY : Pierre Labastie
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
9 find now. This is a modification, which allows to use a package manager
10 inside jhalfs. I hope it is flexible enough to support several package
11 managers. My implementation uses dpkg, from Debian, in a very crude way.
12 Debian has a sophisticated package management system, which I have not
13 tried to use here. For example, it should be usable with Pacman from
14 Arch Linux (http://www.archlinux.org), as far as I remember from my old
15 days with DIYL. I am sorry to say I have (almost) no experience with
16 rpm, so I cannot tell whether it would fit.
17
182. OVERVIEW OF THE SYSTEM:
19
20 For now, package management is only available for LFS. I plan to
21 upgrade BLFS tools, but nothing usable right now. The other flavours of
22 LFS do not seem very active, so there is no point in updating jhalfs
23 for them.
24 The first thing to do is to modify the install instructions of the
25 chapter 6, 7 and 8 of the book so that the installed files end up in a
26 directory other than `/'. We choose to call this directory by the name
27 of the executed script, and to put the path to this directory in the
28 PKG_DEST variable which is made available to the scriplets.
29 Almost all the packages have a way to redirect the destination of
30 the files they install at the `make install' stage with the variable
31 DESTDIR. Furthermore, the authors of the book have been kind enough to
32 flag the installation instructions with `remap=install'. This allows an
33 xsl stylesheet to find those instructions. Then, places where `make '
34 occurs (make followed by a space) are replaced by `make DESTDIR=$PKG_DEST '.
35 Places where the book instructions move files into their destination
36 are harder to deal with: it is possible to change all occurences of ` /' or
37 `>/' (beginning of absolute paths) to `$PKG_DEST', but you end up moving
38 files to non existent directories. There is no simple way to automatically
39 create those directories, because you have sometimes to use the full path
40 (instructions of the form `cp file dir') and sometimes only the dirname
41 (instructions of the form `cp file1 file2'). So I am conservative and
42 create a reasonable subset of the FHS hierarchy into the destination
43 directory. Empty directories should then be removed before packing the
44 binary package.
45 Supposing now that the scriptlets have been adequately modified, the
46 package manager installation instructions have to be added at the end of
47 chapter 5 and chapter 6. Furthermore, the administrative files and
48 directories have to be created during the `Creating Directories' and
49 `Creating Essential Files' stage. For all this, the user has to supply a
50 file in docbook format, with the necessary instructions and enough
51 information to download the tarball. A template is provided in the pkgmngt
52 subdirectory.
53 The last thing to do is to tell how to use the package manager. When
54 the binary package is ready, the scriptlets call a shell function named
55 `packInstall', which should pack the binary package and install it on the
56 system. Note that nothing has been done to manage configuration files,
57 which are ususally treated specially by package managers. Depending on
58 the book layout, it is sometimes possible to create those files afterwards,
59 and sometimes not, which means that you have to check them after each
60 upgrade. The user has to provide his own function. A template is provided
61 in the pkgmngt subdirectory.
62
63
Note: See TracBrowser for help on using the repository browser.