1 -*- mode:text; eval:(footnote-balloons) -*-
2 Time-stamp: <Wednesday Dec 1, 2010 01:19:17 steve>
7 Here are the tools I use for package management on bastard. It is
8 based _very_ heavily on the LFS hint:
10 "More control and package management using package users (v1.2)"
12 Which I have included in this repo (see LFS-pkgusr-hint.txt) and is
13 considered essential reading.
15 The main differences (enhancements?) these tools have over the
16 original LFS hint are:
18 o A set of convenience shell functions for pkg users, and a
19 pseudo "master installer"[1]
21 o Make it easy to give individual settings to each pkg user.
22 For example, some pkg users may need ssh/gnupg or $DISPLAY
25 o Better build script and .project templates
27 o Better uninstall script.
29 o Includes a `which' script.
31 o Includes a `/bin/mail' script.
33 o Includes a `lesspipe.sh' script (unashamedly stolen from
34 Pat Volkerding and Slackware. Thanks, Pat!)
36 o A more complete list of "install" directories.
38 o Includes an elisp library that implements much of the
39 convenience shell functions.[2]
41 You should understand that not everything here can be used straight
42 away. The /bin/mail script, for example, needs Zsh, and Sendmail
43 installed (could probably be rewritten to use bash with very little
44 effort); if you want to set yourself up as a "master installer",
45 OpenSSL and OpenSSH are needed; and pkgusr.el needs SXEmacs (or
46 XEmacs/Emacs) obviously.
50 The current version of the LFS book (Version SVN-20100919) is a little
51 screwed up in one or two places, so BEFORE you move onto the chroot
52 part of the deal you need to do a couple extra things:
54 1. Install bison, flex, nano, and less (in that order) into your
55 /tools dir. Bison, and flex are needed to build binutils in the
56 chroot. And nano and less make life for the package user so
59 2. At the point in the book where it has you mount the devpts
60 filesystem, it neglects to mention that you have to specify a
62 mount -vt devpts devpts ${LFS}/dev/pts -o gid=5,mode=620
64 3. When creating the initial /etc/group file, I don't use the LFS
65 book suggestions. I have my own set groups that I've been using
66 since 1995, and old habits are so hard to break. :-)
68 IMPORTANT: Please note that my tty group has GID 5 and that
69 group in the LFS book has GID 4... make sure you use the right
70 gid= option when mounting your devpts.
72 Anyhoo, here's my initial group file...
107 Step 1... Go read that LFS hint. You'll probably want to read it
108 through a couple of times.
110 Step 2... Don't follow the instructions in the LFS hint for how to set
111 things up and where to dump the scripts etc. Instead see the next
112 section, "Pkgusr Specific Installation".
114 Pkgusr Specific Installation
115 ============================
117 In the hint it tells you how where and when to put the helper scripts
118 and stuff, which is great, but I have not included the
119 "more-control-scripts" tarball in this repo. I've split them out into
120 their respective directories so that I can easily modify and track
121 them. Because of that you may get a little lost in aligning what the
122 hint says to the files you have in this repo.
126 Right _BEFORE_ installing linux libc headers at start of Chap 6 in the
131 From _OUTSIDE_ the chroot environment
141 PKGUSR=/path/to/your/pkgusr/working/dir
142 cp -v ${PKGUSR}/installdir.lst ${LFS}/root &&
143 cp -v ${PKGUSR}/bin/{which,mail} ${LFS}/bin &&
144 cp -va ${PKGUSR}/etc/pkgusr ${LFS}/etc &&
145 cp -v ${PKGUSR}/usr/bin/* ${LFS}/bin &&
146 cp -va ${PKGUSR}/usr/lib/pkgusr ${LFS}/usr/lib &&
147 cp -v ${PKGUSR}/usr/sbin/{add_package_user,install_package} \
149 cp -v ${PKGUSR}/usr/sbin/{group,user}add ${LFS}/tools/bin &&
150 chown -vR 0:0 ${LFS}/etc/pkgusr &&
151 chown -vR 0:0 ${LFS}/usr/lib/pkgusr
154 From this point on you need to re-enter the chroot environment. So
155 these next (and final) steps are done _INSIDE_ the chroot (as root).
157 Create the install group:
158 ------------------------
160 groupadd -g 9999 install
163 Set up the install directories:
164 ------------------------------
167 if [ ! -d ${dir} ]; then
170 chown -v 0:9999 ${dir}
172 done < /root/installdir.lst
177 ln -sv /tools/lib/libncurses.so.5 /usr/lib/libncursesw.so.5
179 (don't forget you'll have to remove that before you install ncurses
182 Alright, where are we up to now? Well, in the LFS hint you are up to:
184 7.2 Walkthrough: Installing linux-libc-headers
186 And in the LFS book, you are up to:
188 6.7. Linux-2.6.35.4 API Headers
190 So have fun building the rest of your LFS system!
194 [1] The "master installer" is just someone who can change their
195 identity to a pkg user. It _could_ be root, though I don't
196 recommend it. I use a ssh->root->su->pkgusr from my personal A/C
197 which is a single "step" (I'm not stopping in a root shell).
199 [2] pkgusr.el is probably fairly SXEmacs-centric, but should work
200 with perhaps minor changes on XEmacs or even GNU/Emacs.