Messages in this thread |  | | Date | Thu, 6 Jun 96 01:32 BST | From | Jamie Lokier <> | Subject | Re: 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 straightforward.
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 way.
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.
Enjoy, -- Jamie
|  |