[PROPOSAL] Ports using SCM repositories as source instead of distfiles

Ashish Shukla आशीष शुक्ल wahjava.ml at gmail.com
Sun Dec 14 04:26:01 PST 2008


Dmitry Marakasov writes:
> * Ashish Shukla आशीष शुक्ल (wahjava.ml at gmail.com) wrote:

>> > No. If there's DESTDIR, you don't need to log writes to it, as you
>> > can just use `find` to see what's there after installation as in
>> > quote below. The idea is that if we log all writes to the fulesystem
>> > during port installation, we don't need intermediate directory at
>> > all.
>> 
>> Okay, so if we go with your approach, then can you tell me how do you
>> plan to go about logging writes to filesystem with your .so which you're
>> planning to preload as you mentioned in one of your mails in this thread ?

> The idea is to redefine functions that execute syscalls which will
> modify the filesystem add add loging there. Here's a test code
> http://www.amdmi3.ru/files/ldpreload.c. Compile it into shared lib
> and run `LD_PRELOAD=path_to_lib.so someapp`.

Cool, this works great :) .

> It turned out to be not the best solution as it relies on environment
> heavily, and some apps may clear the environment (scons does this
> by default), or call syscalls via syscall(), instead of libc wrapper,
> thus it's not reliable enough.

> Another way is ptrace, which should intercept syscalls without fail.

So, we're going with ptrace way, lets hope this way is foolproof :) .

Thanks
-- 
Ashish Shukla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20081214/1d66b25a/attachment.pgp


More information about the freebsd-ports mailing list