From owner-freebsd-ports@FreeBSD.ORG Wed Dec 10 18:11:50 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 1A40A1065672 for ; Wed, 10 Dec 2008 18:11:50 +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 8F8438FC18 for ; Wed, 10 Dec 2008 18:11:49 +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 1LATXK-0005fU-Gf; Wed, 10 Dec 2008 21:11:50 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 61680AAA6; Wed, 10 Dec 2008 21:10:33 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 489C21702D; Wed, 10 Dec 2008 21:11:25 +0300 (MSK) Date: Wed, 10 Dec 2008 21:11:25 +0300 From: Dmitry Marakasov To: Ashish Shukla =?utf-8?B?4KSG4KS24KWA4KS3IOCktuClgeCkleCljeCksg==?= Message-ID: <20081210181125.GA86341@hades.panopticon> References: <87fxkxjywk.fsf@chateau.d.lf> <20081209143052.GA29817@hades.panopticon> <873agxjn1x.fsf@chateau.d.lf> <20081209181354.GB29817@hades.panopticon> <87tz9di38u.fsf@chateau.d.lf> <20081209222042.GC29817@hades.panopticon> <8763lsi10m.fsf@chateau.d.lf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8763lsi10m.fsf@chateau.d.lf> User-Agent: Mutt/1.5.18 (2008-05-17) Content-Transfer-Encoding: quoted-printable Cc: 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: Wed, 10 Dec 2008 18:11:50 -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: > > Current DESTDIR implementation uses chroot and obviously requires > > complete system installed in DESTDIR. Also installing a port will > > install all dependencies in the chroot as well. >=20 > The Debian package building system, also expects the package files in a > directory named ${packageroot}/debian/${packagename}/ which you can > install by doing 'make install DESTDIR=3Ddebian/${packagename}' in > ${packageroot} directory (the directory where you've extracted the > package tarball, similar to the FreeBSD's ${WRKSRC} directory. >=20 > So, my idea is to specify "make -C ${WRKSRC} install DESTDIR=3D/var/tmp= /${PORTNAME}" > in the "install" target of port's Makefile, not to be confused with > upstream package's Makefile. And I think you confused it with passing > 'DESTDIR' variable to 'make' commandline to start port building > procedure: How do you expect all ports to respect DESTDIR in their Makefiles, while many ports don't even use make? As I've said, that will require tremendous amount of hacking and is not even possible sometimes. > > My idea however is monitor all filesystem writes by port's make and a= ll > > descendant processes. That may be done with monitoring or replacing > > syscalls and may be done with LD_PRELOAD or some *trace kernel > > facilities. The former is what I'm currently experimenting with. >=20 > This is also a cool way if something like this can be hacked ? How abou= t > using truss or other syscall tracing facilities, hmm..? Truss uses ptrace(2). There are other facilities, but they are less useable - ktrace (produces too much output, needs to be enabled in kernel) and dtrace (only available in current for now, also should be enabled in kernel). --=20 Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru