[clue-tech] Linux From Scratch

dennisjperkins at comcast.net dennisjperkins at comcast.net
Sun Jan 11 09:38:56 MST 2009


Many packages support the GNU DESTDIR option.  (So do dpkg, RPM and Pacman.)  It prefixes the specified path to the paths.  Everything else stays the same.  So a build would consist of:

     ./configure --prefix=/usr
     make
     make check   (Optional, and not all packages have this.)
     make DESTDIR=<dir> install

Then you  can inspect the contents of <dir> to verify that everything goes where expected.  Sometimes man files go to /usr/man instead of /usr/share/man.  Sometimes there are some programs associated with libraries, that GNU puts in /usr/lib/exec.  The standard location for these is /usr/lib.  If you are building a biarch system, you need to put 32-bit libraries in /lib and /usr/lib, and 64-bit libraries go in /lib64 and /usr/lib64.  Sometimes some files should go in /etc on Linux but go elsewhere.  You can fix these by adding --libexecdir, --sysconfdir, --libdir etc.

Some packages, such as openssl, don't support DESTDIR.  Openssl uses INSTALL_PREFIX instead.

When you are satisfied, you can tar up everything in <dir> or use a package manager.  You can use dpkg, RPM, pacman (Arch Linux), etc.  I don't know how difficult it is to write Debian spec files.  I looked at RPM and it appears to contain directives to simplify the work.  Pacman uses shell scripts.


I've been adding DESTDIR to my build scripts for my new system.  I used DIY Linux for the base system, except I substituted udev for MKDEV, and added iproute2.  Much of the time things go smoothly.  Sometimes I need to try two or three times.  Sometimes it is a tad frustrating,  Right now I am trying to build openssl and it refuses to accept /usr/lib64.


On advantage, at least from my point of view, is that you learn how everything fits together.  There is a lot of change going on underneath that most people don't know about (and frankly don't care about).  The use of D-bus is spreading.  Pulse Audio has been added, but doesn't work with KDE 3.   Udev makes it easy to add device nodes.  Combined with HAL, sysfs and dbus, it makes it possible to plug in devices and it just works.  But HAL is slated for replacement.  Filesystems might migrate out of kernel space into user space.  You see where PAM is used (Sometimes.  Some packages detect it automatically.)  KDE dumped their version of CORBA long ago, and GNOME is slowly doing the same and replacing it with d-bus.

 -------------- Original message ----------------------
From: "David L. Anselmi" <anselmi at anselmi.us>
> Bruce Ediger wrote:
> > I am.  I've done LFS once, over a year ago, but I ditched it in favor of
> > Slackware 12.0 for reasons I can't recall.
> 
> I did LFS a really long time ago but without package management I didn't 
> continue for long.  But it was a great learning experience.  So what 
> would you need to get a package manager?
> 
> You could build packages, and an installer, on your bootstrap system and 
> then do a "regular" install.
> 
> You could build an LFS system, and then build package management stuff, 
> then build packages to replace the LFS stuff, I guess.
> 
> In either case it's a lot of work to write your own spec/debian files. 
> So rather than download the original tars you'd d/l the source packages 
> and build those.  Not much different in that case, except make install 
> becomes apt-get install.  That would be cool.  You don't get anything 
> besides the learning experience but you'd be set to build new upstream 
> packages as soon as they were out (and contribute your fixes to your 
> distro).  Then you might have another reason to do LFS.
> 
> Yeah, that might be all right.
> 
> Dave
> 
> _______________________________________________
> clue-tech mailing list
> clue-tech at cluedenver.org
> http://www.cluedenver.org/mailman/listinfo/clue-tech



More information about the clue-tech mailing list