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

Dmitry Marakasov amdmi3 at amdmi3.ru
Wed Dec 10 10:11:50 PST 2008


* Ashish Shukla आशीष शुक्ल (wahjava.ml at 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.
> 
> 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=debian/${packagename}' in
> ${packageroot} directory (the directory where you've extracted the
> package tarball, similar to the FreeBSD's ${WRKSRC} directory.
> 
> So, my idea is to specify "make -C ${WRKSRC} install DESTDIR=/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 all
> > 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.
> 
> This is also a cool way if something like this can be hacked ? How about
> 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).

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3 at amdmi3.ru  ..:  jabber: amdmi3 at jabber.ru    http://www.amdmi3.ru


More information about the freebsd-ports mailing list