lkml.org 
[lkml]   [1996]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: packages and the kernel (long, sorry...)
From
In article <m0uRSw8-000Lq4C@phascolarctid.rebellion.co.uk> 
Jamie Lokier <jamie@rebellion.co.uk> 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
>`rename',

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

--
Ray Auchterlounie Research Student (still) at:
<rda@kythera.demon.co.uk> Signal Processing Group
<rda@eng.cam.ac.uk> Cambridge University Engineering Dept.
"Don't ask me about my thesis (TM)"


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.405 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site