[lkml]   [1996]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: packages and the kernel (long, sorry...)
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', and perhaps rename or copy files that would be clobbered so
that the sequence can be unwound in the event of an error.

Having given this a little thought, I think this could work very well.
It isn't ext2-specific, or even Linux specific (in principle).
Basically, you'd do `fslog make install' or `fslog tar xvvpSfz
package.bin.tar.gz' if you just want a record of files installed, or you
want the option of unwinding the installation. For most packages, this
would do just nicely.

Naturally, in general the logs would serve as input to a package manager
like RPM so you don't have to write out those file lists. (Eventually
let RPM invoke the logging tool). That would make grabbing and
installing say, a new GNU package or the new binary `libc' really

A tool merely logs major file changes in such a way that they can be
undone may have other uses too. E.g., in some special installation
scripts. Effectively, it gives you atomic update of a set of files,
because if the system crashes, the changes can be unwound when the
system next starts up. (If `fsync' is called every time the log is
updated :-).

It occurs to me that safe deletion could be implemented in much the same

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.

-- Jamie

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