installwatch patch
v4hn
v4hn at lunar-linux.org
Wed Jun 27 01:17:44 CEST 2012
Evening everyone,
as I already announced in #lunar I wrote an installwatch patch a while ago.
I use this locally for some time now without any problems.
I believe it's a never ending discussion how we should track installed files and
whether some special file system / kernel module / chroot would solve all of our problems...
But I do not want to discuss this here. The status quo is installwatch and LD_PRELOAD.
However the current installwatch module has two annoying flaws:
(1) It ignores some system calls for file creation/manipulation that are not easy to track
Most importantly it ignores openat, openat64, mkdirat and linkat. I'm quite sure there are more
relevant syscalls, but those are the ones I found.
The effect of this flaw is that files installed by e.g. tar are not tracked(this has been a problem with
at least two modules). Now, there is a reason to why those functions are not implemented.
All of those functions take a file handle and do their job relative to the file handle.
As there is no portable way of getting file/folder names out of file handles, it is really hard
to implement full support for those functions.
Luckily we don't need full support because in all use cases I know the file handle is set to the
special value AT_FDCWD. This basically means 'do the job relativ to the current working directory'
and it is really easy to track at least those cases.
(2) relative pathes are not always expanded fully
In the example `cd /foo/bar; mv xyz ../` the current installwatch logs the file xyz as /foo/bar/../xyz
if there was no file /foo/xyz before. This causes trouble because the lunar tools(lvu alien, lvu from, ..)
look for lexically identical pathes instead of similar folders.
The attached patch solves both of those problems.
You can test it by simply moving the file to zlocal/_patches/installwatch/ and do `lin installwatch`..
And Hey! firefox and emacs install some more files you might not have known about ;)
Please test and report any problems!
If nobody objects until next week
I'd like to ask someone with write access to download.lunar-linux.org
to add the patch to the current installwatch module.
v4hn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: installwatch-at_support_realpathfix.diff.gz
Type: application/x-gunzip
Size: 1865 bytes
Desc: not available
URL: <http://foo-projects.org/pipermail/lunar-dev/attachments/20120627/6cac651d/attachment.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://foo-projects.org/pipermail/lunar-dev/attachments/20120627/6cac651d/attachment.bin>
More information about the Lunar-dev
mailing list