support for DESTDIR: security/openssh-portable

Gábor Kövesdán gabor at FreeBSD.org
Wed Aug 9 23:29:21 UTC 2006


John E Hein wrote:
> John E Hein wrote at 16:31 -0600 on Aug  9, 2006:
>  > Now that ports/Mk does the right thing for DESTDIR (thanks to Gábor),
>  > here's a patch that supports DESTDIR properly for
>  > security/openssh-portable:
>  > 
> [snip]
>  > @@ -171,29 +171,33 @@ post-extract:
>  >  post-patch:
>  >  	@${REINPLACE_CMD} -e 's|-ldes|-lcrypto|g' ${WRKSRC}/configure
>  >  
>  > +.if defined(DESTDIR) && !empty(DESTDIR)
>  > +CHROOTDESTDIR=${CHROOT} ${DESTDIR}
>  > +.endif
>  > +
> [snip]
>  >  .endif
>  > -	if ! pw groupshow sshd; then pw groupadd sshd -g 22; fi
>  > -	if ! pw usershow sshd; then pw useradd sshd -g sshd -u 22 \
>  > +	if ! ${CHROOTDESTDIR} pw groupshow sshd; then ${CHROOTDESTDIR} pw groupadd sshd -g 22; fi
>  > +	if ! ${CHROOTDESTDIR} pw usershow sshd; then ${CHROOTDESTDIR} pw useradd sshd -g sshd -u 22 \
>  >  		-h - -d ${EMPTYDIR} -s /nonexistent -c "sshd privilege separation"; fi
>
> Gabor, you may want to define CHROOTDESTDIR (or name it whatever you
> want) as a convenience var in bsd.port.mk
>
> I suspect lots of ports will want to use it.
>   
Might be good, but personally I think ${CHROOT} ${DESTDIR} is more 
trivial (easier to read and understand) and only longer with 4 
characters. One might wonder at first look what CHROOTDESTDIR is.

CC'd to ports@ to see what others think.

-- 
Cheers,

Gabor



More information about the freebsd-ports mailing list