From owner-freebsd-ports@FreeBSD.ORG Wed Aug 9 23:29:21 2006 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87DF016A4DA for ; Wed, 9 Aug 2006 23:29:21 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.t-hosting.hu (server.t-hosting.hu [217.20.133.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id D894A43D4C for ; Wed, 9 Aug 2006 23:29:20 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by server.t-hosting.hu (Postfix) with ESMTP id 11CA899BC45; Thu, 10 Aug 2006 01:29:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at t-hosting.hu Received: from server.t-hosting.hu ([127.0.0.1]) by localhost (server.t-hosting.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IQNkYtMq1zqo; Thu, 10 Aug 2006 01:29:17 +0200 (CEST) Received: from [192.168.2.186] (catv-50635cb6.catv.broadband.hu [80.99.92.182]) by server.t-hosting.hu (Postfix) with ESMTP id 34ABD99BC3F; Thu, 10 Aug 2006 01:29:17 +0200 (CEST) Message-ID: <44DA6FC9.3040404@FreeBSD.org> Date: Thu, 10 Aug 2006 01:29:13 +0200 From: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: John E Hein References: <17626.25183.846983.515718@gromit.timing.com> <17626.25444.563099.956775@gromit.timing.com> In-Reply-To: <17626.25444.563099.956775@gromit.timing.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: ports@FreeBSD.org Subject: Re: support for DESTDIR: security/openssh-portable 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, 09 Aug 2006 23:29:21 -0000 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