DESTDIR implementation [Was:: ATTENTION: is the way DESTDIR was introduced completely wrong?]

Brooks Davis brooks at one-eyed-alien.net
Wed Aug 16 18:35:58 UTC 2006


On Wed, Aug 16, 2006 at 08:14:08PM +0200, G?bor K?vesd?n wrote:
> Kris Kennaway wrote:
> >On Wed, Aug 16, 2006 at 07:55:20PM +0200, G?bor K?vesd?n wrote:
> >  
> >>Kris Kennaway wrote:
> >>    
> >>>On Tue, Aug 15, 2006 at 12:37:50PM -0600, John E Hein wrote:
> >>>
> >>> 
> >>>      
> >>>>The hard part is to get ports writers to think the right way about
> >>>>DESTDIR after ignoring it for so many years.  And once you decide to
> >>>>go about fixing it, there's no way around that problem.
> >>>>   
> >>>>        
> >>>My preferred solution involves a couple of shell commands, along the
> >>>lines of the following:
> >>>
> >>>mount_nullfs ${PORTSDIR} ${DESTDIR}${PORTSDIR}
> >>>mount_nullfs ${WRKDIR} ${DESTDIR}${WRKDIR}
> >>>mount_devfs foo ${DESTDIR}/dev
> >>>chroot ${DESTDIR} cd ${.CURDIR} && make install
> >>>
> >>>A suitable version of the above should allow all ports to be installed
> >>>into a jail-ready filesystem hierarchy, while requiring 0 port
> >>>changes.
> >>>
> >>>Kris
> >>> 
> >>>      
> >>This makes sense, but I did not succeed to use mount_nullfs on an 
> >>5.3-RELEASE/amd64 machine, while the same worked well on my 6.1/i386 
> >>computer, so I'm not sure mount_nullfs is reliable enough on older 
> >>systems.
> >>    
> >
> >Who cares about old systems that are already unsupported and will only
> >become even more unsupported over time?  Nullfs works in 6.x and will
> >continue to work in the future (since I use it extensively and yell at
> >whoever breaks it ;-)
> >
> >  
> >>Also, other targets should be supported as well, and the nullmounted 
> >>directory should be umounted after he run. Anyway, I find this solution 
> >>very good, if we can work this out a bit better, my progress so far 
> >>would become pointless...
> >>    
> >
> >It's a shame to throw away your work, but IMO it would also be a
> >bigger shame not to proceed if a simpler solution can be made to work.
> >
> >Kris
> >  
> Agreed. I just feel a bit guilty, since I made things complicated and 
> obscure, while I just want to provide a good solution, but haven't 
> thought of mount_nullfs.

The one advantage I can see for a more complex DESTDIR solution is
dealing with cross builds.  I suspect that it would be easier to handle
them with DESTDIR, but that's only intuition.  (Obviously, not all ports
can be easily cross built, but as embedded becomes more important to the
project we need to start thinking about it for the ones that can be).

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060816/71cc3405/attachment.pgp


More information about the freebsd-ports mailing list