Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Dec 2008 17:58:04 +0530
From:      wahjava.ml@gmail.com (Ashish Shukla =?utf-8?B?4KSG4KS24KWA4KS3IA==?= =?utf-8?B?4KS24KWB4KSV4KWN4KSy?=)
To:        Dmitry Marakasov <amdmi3@amdmi3.ru>
Cc:        "Andrew W. Nosenko" <andrew.w.nosenko@gmail.com>, FreeBSD Ports Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: [PROPOSAL] Ports using SCM repositories as source instead of distfiles
Message-ID:  <87hc57eyaz.fsf@chateau.d.lf>
In-Reply-To: <20081213121906.GA81902@hades.panopticon> (Dmitry Marakasov's message of "Sat, 13 Dec 2008 15:19:06 %2B0300")
References:  <20081210181125.GA86341@hades.panopticon> <87zlj3heor.fsf@chateau.d.lf> <20081210223522.GA6367@hades.panopticon> <87vdtrhb6r.fsf@chateau.d.lf> <20081211082325.GA6167@hades.panopticon> <6161f3180812110156n43803ee9s88443b6777bd0743@mail.gmail.com> <20081211113556.GA7422@hades.panopticon> <87vdtqls4g.fsf@chateau.d.lf> <20081212103827.GD7422@hades.panopticon> <86wse5wb9m.fsf@chateau.d.lf> <20081213121906.GA81902@hades.panopticon>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain; charset=utf-8

Dmitry Marakasov writes:
> * Ashish Shukla आशीष शुक्ल (wahjava.ml@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

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAklE+9QACgkQHy+EEHYuXnRlwQCeNHpKW83cG9ApYNjc91i/J7u3
LX4AnijZjT3Ak05e/nnlwYrCexjJVK2N
=UNWx
-----END PGP SIGNATURE-----
--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87hc57eyaz.fsf>