source: README.PACKAGE_MANAGEMENT@ 6ed3dd7

2.4 ablfs-more legacy new_features trunk
Last change on this file since 6ed3dd7 was f60a8b7, checked in by Pierre Labastie <pierre@…>, 11 years ago

Some updates and remove a long standing useless reference to
a $(LFS) variable in LFS Makefile "chroot" target.

  • Property mode set to 100644
File size: 4.3 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
20 upgrade BLFS tools, but nothing usable right now. The other flavours of
21 LFS do not seem very active, so there is no point in updating jhalfs
22 for them.
23 The first thing to do is to modify the install instructions of the
24 chapter 6, 7 and 8 of the book so that the installed files end up in a
25 directory other than `/'. We choose to call this directory by the name
26 of the executed script, and to put the path to this directory in the
27 PKG_DEST variable which is made available to the scriplets.
28 Almost all the packages have a way to redirect the destination of
29 the files they install at the `make install' stage with the variable
30 DESTDIR. Furthermore, the authors of the book have been kind enough to
31 flag the installation instructions with `remap=install'. This allows an
32 xsl stylesheet to find those instructions. Then, places where `make '
33 occurs (make followed by a space) are replaced by `make DESTDIR=$PKG_DEST '.
34 Places where the book instructions move files into their destination
35 are harder to deal with: it is possible to change all occurences of ` /' or
36 `>/' (beginning of absolute paths) to `$PKG_DEST', but you end up moving
37 files to non existent directories. There is no simple way to automatically
38 create those directories, because you have sometimes to use the full path
39 (instructions of the form `cp file dir') and sometimes only the dirname
40 (instructions of the form `cp file1 file2'). So I am conservative and
41 create a reasonable subset of the FHS hierarchy into the destination
42 directory. Empty directories should then be removed before packing the
43 binary package.
44 Supposing now that the scriptlets have been adequately modified, the
45 package manager installation instructions have to be added at the end of
46 chapter 5 and chapter 6. Furthermore, the administrative files and
47 directories have to be created during the `Creating Directories' and
48 `Creating Essential Files' stage. For all this, the user has to supply a
49 file in docbook format, with the necessary instructions and enough
50 information to download the tarball. A template is provided in the pkgmngt
51 subdirectory.
52 The last thing to do is to tell how to use the package manager. When
53 the binary package is ready, the scriptlets call a shell function named
54 `packInstall', which should pack the binary package and install it on the
55 system. Note that nothing has been done to manage configuration files,
56 which are ususally treated specially by package managers. Depending on
57 the book layout, it is sometimes possible to create those files afterwards,
58 and sometimes not, which means that you have to check them after each
59 upgrade. The user has to provide his own function. A template is provided
60 in the pkgmngt subdirectory.
61
[e576789]623. DETAILED INSTRUCTIONS:
[7072e1f]63
[e576789]64 Before beginning, you should know which package manager you want, where
65 to get the sources, and how to use it for:
66 a) Making a package from a directory tree. Usually, there is some control
67 file containing the version, pacakager, build system (32 or 64 bits at
68 least) or other more or less usefull but mandatory bits of information
69 which you should understand.
70 b) Unpack the package.
71
72 Second, you ought to have a basic knowledge of bash scripting and
73 docbook-xml writing, because you have to write a bash function for packing
74 and unpacking the package, and a set of instructions to install the PM.
75
Note: See TracBrowser for help on using the repository browser.