Date: Thu, 10 Aug 2006 08:21:05 -0500 From: Brooks Davis <brooks@one-eyed-alien.net> To: John E Hein <jhein@timing.com> Cc: ports@freebsd.org, G?bor K?vesd?n <gabor@freebsd.org> Subject: Re: support for DESTDIR: security/openssh-portable Message-ID: <20060810132105.GA20275@lor.one-eyed-alien.net> In-Reply-To: <17626.30422.650339.960580@gromit.timing.com> References: <17626.25183.846983.515718@gromit.timing.com> <17626.25444.563099.956775@gromit.timing.com> <44DA6FC9.3040404@FreeBSD.org> <17626.29481.909830.326948@gromit.timing.com> <17626.30422.650339.960580@gromit.timing.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 09, 2006 at 05:59:18PM -0600, John E Hein wrote: > John E Hein wrote at 17:43 -0600 on Aug 9, 2006: > > Well, the part that makes it annoying to duplicate in all ports is not > > the two separate words (CHROOT DESTDIR), but that you have to test > > defined(DESTDIR) && !empty(DESTDIR) before you can figure out whether > > to use ${CHROOT} ${DESTDIR} or not. > >=20 > > So having that test to assign CHROOTDESTDIR or leave it empty in > > bsd.port.mk allows the port writer to just always invoke it without > > having to worry about testing for DESTDIR. >=20 > You could pass this var to pkg-install scripts, too (put it in the > standard *SUB* lists). >=20 > That way you don't have to do the dance that was added to > security/clamav/files/pkg-install.in: >=20 > if [ -n "%%DESTDIR%%" ]; then > PW=3D"/usr/sbin/chroot %%DESTDIR%% pw" > CHOWN=3D"/usr/sbin/chroot %%DESTDIR%% chown" > MKDIR=3D"/usr/sbin/chroot %%DESTDIR%% mkdir -p" > else > PW=3D"pw" > CHOWN=3D"chown" > MKDIR=3D"mkdir -p" > fi >=20 > but rather just: >=20 > PW=3D"%%CHROOTDESTDIR%% pw" > CHOWN=3D"%%CHROOTDESTDIR%% chown" > MKDIR=3D"%%CHROOTDESTDIR%% mkdir -p" This seems bogus. I can't think of any good reason why packages should differ based on the valid of DESTDIR. Instead the pkg-install script should be run inside the chroot. -- Brooks --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFE2zLBXY6L6fI4GtQRAsoKAJ4zGboa3aSEChiazcCjyLUOvkX2awCffsCZ CLtJmz7B7B8pnnPDuvjtX1Y= =vyCC -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060810132105.GA20275>