Re: packages and the kernel (long, sorry...)

Ray Auchterlounie (
Sun, 9 Jun 1996 12:10:08 +0100

In article <>
Jamie Lokier <> wrote:

>Come to think of it, this is probably best implemented in user space.
>Use LD_PRELOAD to log the activity of system calls like `open' and

I think I remember reading an announcement of a package to do exactly
this, not long ago on one of the c.o.l groups somewhere. Came from
someone at yggdrasil I think.

>and perhaps rename or copy files that would be clobbered so
>that the sequence can be unwound in the event of an error.

This is essential I think. Tracking files written during eg. a "make
install" is not really good enough - it may still clobber other things
without warning.

Ideally you want a package manager with some kind of version control
system, so that "install package foo ; uninstall package foo" is
always a noop, even if foo overwrites some files in package bar.

For a "safe" make install you could perhaps use LD_PRELOAD to redirect
all writes to another part of the filesystem - and then use the
package manager to create/install the package from that tree.
Thinking about it, some filesystems (IFS ?) may be able to do this or
perhaps amd.

Currently I do this manually - for simple packages it's easy to change
the paths in the Makefile, complex ones usually use either imake or
GNU configure, both of which can be directed to install in a different
tree (using DESTDIR or prefix). I normally do the make install as an
unprivileged user as well - which means manual fixing of ownership and
any setuid/gid afterwards (good in a way - forces you to check it).

Once you have the package installed in it's own tree, it should be
trivial to make a "proper" package from it. The package manager should
then be able to at least warn you of any conflicts with existing
packages, allowing you to back these up so the new package install is
reversible (a pm that did this automagically would be nice).

>This appears, at first sight, simple enough that even I might give it a
>go. Certainly I do hate putting together file lists by hand when I
>install software.

Yikes ! Do people _really_ make file lists by hand ?


Ray Auchterlounie                Research Student (still) at:
<>            Signal Processing Group
<>                  Cambridge University Engineering Dept.
                "Don't ask me about my thesis (TM)"