From owner-freebsd-ports Thu Jun 7 23:30:13 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2AE8137B40B for ; Thu, 7 Jun 2001 23:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f586U2b16134; Thu, 7 Jun 2001 23:30:02 -0700 (PDT) (envelope-from gnats) Date: Thu, 7 Jun 2001 23:30:02 -0700 (PDT) Message-Id: <200106080630.f586U2b16134@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: ports/20601: DESTDIR and /etc/shells Reply-To: Peter Pentchev Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/20601; it has been noted by GNATS. From: Peter Pentchev To: Laurent Wacrenier Cc: lwa@victor.teaser.fr, markp@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org Subject: Re: ports/20601: DESTDIR and /etc/shells Date: Fri, 8 Jun 2001 09:19:24 +0300 On Thu, Jun 07, 2001 at 07:32:18PM +0200, Laurent Wacrenier wrote: > Peter Pentchev wrote: > > > This is a valid complaint. However, the problem lies much deeper - > > it's not just /etc/shells. > > I guess so, but I needed only this for the shells when I posted the > problem. > > In most cases, the fix is simply to preprend ${DESTDIR} at the destination > of the "install", "rm", ... statements of {pre-|post-}install targets. > The main difficulty is to seek them all in the ports. Nope, not just that - ${DESTDIR} needs to also be removed from all the argument passing where it is not needed, and this will be a hard one. Some programs are just not built with chroot() and friends in mind, and use the same path for both installation paths and hardwired configuration paths :( > > A very simplistic fix for the case of shells is attached. It's made > > for the shells/bash2 port, but it could be applied (with a little tweaking) > > I don't fully agree with your patch : > > - ${PREFIX} does not contain ${DESTDIR}, If I install bash with DESTDIR=/mnt, > ${PREFIX} still has its default value of /usr/local, so, you have not > to trim /mnt from ${PREFIX} in ${DESTDIR}/etc/shells contents. > > - (minor) ${DESTDIR}/etc and ${DESTDIR}/etc/shells are expected to already > exists if you made previously what it's explained in jail(8) manual page. > You are expected to install ports in a functional hierarchy. OK, I already answered the first one; and about this one, well, it never hurts to be safe - the 'install' target in bsd.port.mk runs an mtree to make sure that ${PREFIX} has all the needed directories, so.. :) G'luck, Peter -- This sentence would be seven words long if it were six words shorter. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message