From owner-freebsd-ports@FreeBSD.ORG Sat Dec 13 12:19:34 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 326191065670 for ; Sat, 13 Dec 2008 12:19:34 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [217.170.79.85]) by mx1.freebsd.org (Postfix) with ESMTP id A20A68FC23 for ; Sat, 13 Dec 2008 12:19:33 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LBTT3-0008CK-0H; Sat, 13 Dec 2008 15:19:33 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 52C3EC885; Sat, 13 Dec 2008 15:18:20 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id F3BB71702D; Sat, 13 Dec 2008 15:19:06 +0300 (MSK) Date: Sat, 13 Dec 2008 15:19:06 +0300 From: Dmitry Marakasov To: Ashish Shukla =?utf-8?B?4KSG4KS24KWA4KS3IOCktuClgeCkleCljeCksg==?= Message-ID: <20081213121906.GA81902@hades.panopticon> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <86wse5wb9m.fsf@chateau.d.lf> User-Agent: Mutt/1.5.18 (2008-05-17) Content-Transfer-Encoding: quoted-printable Cc: "Andrew W. Nosenko" , FreeBSD Ports Mailing List Subject: Re: [PROPOSAL] Ports using SCM repositories as source instead of distfiles X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 12:19:34 -0000 * Ashish Shukla =E0=A4=86=E0=A4=B6=E0=A5=80=E0=A4=B7 =E0=A4=B6=E0=A5=81=E0= =A4=95=E0=A5=8D=E0=A4=B2 (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. >=20 > 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'r= e > planning to preload as you mentioned in one of your mails in this threa= d ? 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=3Dpath_to_lib.so someapp`. 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. --=20 Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru