-*- mode:text; eval:(footnote-balloons) -*- Time-stamp: Introduction: ============ Here are the tools I use for package management on bastard. It is based _very_ heavily on the LFS hint: "More control and package management using package users (v1.4)" Which I have included in this repo (see LFS-pkgusr-hint.txt) and is considered essential reading. The main differences (enhancements?) these tools have over the original LFS hint are: o A set of convenience shell functions for pkg users, and a pseudo "master installer"[1] o Make it easy to give individual settings to each pkg user. For example, some pkg users may need ssh/gnupg or $DISPLAY set. o Better build script and .project templates As of v1.4 of the hint, Matt uses a central build script and each pkgusr has a "build.conf"... an interesting idea and I may switch to that method one day, but for now I use a build script for each pkgusr. o Better uninstall script. o Most of the "wrapper" scripts have been updated or rewritten. o Includes a `which' script. o Includes a `/bin/mail' script. o Includes a `lesspipe.sh' script (unashamedly stolen from Pat Volkerding and Slackware. Thanks, Pat!) o A more complete list of "install" directories. Everyone's needs and tastes are different so not everything I have in my list of install directories you'll want. Edit it to suit you. o Includes an elisp library that implements much of the convenience shell functions. [2] o Allow pkgusr to run ldconfig as root safely via a wrapper script and sudo. Matt uses a setuid C wrapper that calls execve(2) to do this. Which, IMO, is not the right way to go. You should understand that not everything here can be used straight away. The /bin/mail script, for example, needs Zsh, and Sendmail installed (could probably be rewritten to use bash with very little effort); the ldconfig wrapper needs sudo; if you want to set yourself up as a "master installer", OpenSSL and OpenSSH are needed; and pkgusr.el needs SXEmacs (or XEmacs/Emacs) obviously. Pre-Installation: ================ 1. Install bison, flex, nano, and less (in that order) into your /tools dir. Bison, and flex are needed to build binutils in the chroot. And nano and less make life for the package user so much easier. As of LFS SVN-20140303, they still do not install bison and flex in chapter 5. I think it might be because they install the binutils from gnu (eww), whereas I install the _proper_ optimised for Linux binutils from kernel.org which requires bison/flex. It is also odd that in chapter 6 when they do install these 2 packages, they do them in the wrong order (bison should be done before flex). 2. At the point in the book where it has you mount the devpts filesystem, it neglects to mention that you have to specify a mode and gid: mount -vt devpts devpts ${LFS}/dev/pts -o gid=5,mode=620 Update: I think LFS has this now, but check anyway. 3. Install sudo into your /tools dir. Sudo is used to let pkgusrs run ldconfig as root, thereby bypassing the annoyance of getting errors about /etc/ld.so.cache not being able to be updated. I don't have a LFS build chain anymore so I am not 100% certain if this is possible, but I cannot think of any reasons why it shouldn't be. Let me know if you have an issue with this step. 4. When creating the initial /etc/group file, I don't use the LFS book suggestions. I have my own set groups that I've been using since 1995, and old habits are so hard to break. :-) Anyhoo, here's my initial group file... cat>/etc/group<root->su->pkgusr from my personal A/C which is a single "step" (I'm not stopping in a root shell). [2] pkgusr.el is probably fairly SXEmacs-centric, but should work with perhaps minor changes on XEmacs or even GNU/Emacs.