From owner-freebsd-doc@FreeBSD.ORG Thu May 2 04:50:02 2013 Return-Path: Delivered-To: freebsd-doc@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 75BEEB08 for ; Thu, 2 May 2013 04:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 4B439142F for ; Thu, 2 May 2013 04:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r424o1mh015739 for ; Thu, 2 May 2013 04:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r424o1gh015693; Thu, 2 May 2013 04:50:01 GMT (envelope-from gnats) Date: Thu, 2 May 2013 04:50:01 GMT Message-Id: <201305020450.r424o1gh015693@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org Cc: From: Brandon Thomson Subject: Re: docs/178221: Addition to handbook jails chapter: warning about make deinstall X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Brandon Thomson List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 May 2013 04:50:02 -0000 The following reply was made to PR docs/178221; it has been noted by GNATS. From: Brandon Thomson To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: docs/178221: Addition to handbook jails chapter: warning about make deinstall Date: Thu, 2 May 2013 04:48:04 +0000 >>When setting up a machine according to the "Application of Jails" >>section of FreeBSD Handbook [1], one runs into a problem where "make >>deinstall" inside of a jail does not work as expected. There is a >>workaround, which probably should be noted in the chapter. >> >>Note that this only applies to ports installed in a jail. Ports >>installed on the base system do not need the workaround. >> >>[1] http://www.freebsd.org/doc/handbook/jails-application.html >> >>Original thread [2]: http://forums.freebsd.org/showthread.php?p=213757 >> >>The workaround is to use "make deinstall PREFIX=/s/usr-local", where >>/s/usr-local is whatever make spits out when you type make >>deinstall. If you followed the handbook instructions exactly it will >>be /s/usr-local. >If you're actually running *inside* the jail, you shouldn't see that >prefix. Do you mean the directory /s/usr-local should not be visible inside the jail? On the jails I have set up it is, and I believe that is in accord with the instructions in [1]. For example if /s/usr-local were not visible inside the jail, the symlink at /usr/local pointing to ../s/usr-local would be a broken link. So, I think the PREFIX of /s/usr-local *should* be visible inside the jail. >Where you need to run the command that way is if you're using the parent >system to update the port that the jail runs. But then your "make >install" process is not actually *in* the jail at all. I did not attempt to deinstall a port run by the jail from the parent system. My attempt was from inside the jail environment, using jexec. I agree that one would *also* need to adjust the PREFIX if one wanted to deinstall a port in the jail from the parent system. In this case, the PREFIX would need to be set to /usr/jails/s/myjail/usr-local or similar. However, the point of this issue is that PREFIX also needs to be set when running "make deinstall" *inside* the jail environment. If you don't set PREFIX, you will run into the error described in [2]. Note that the host's /usr/jails/s/myjail should be mounted to /s inside the jail, so the PREFIX inside the jail is: /s/usr-local. Hope that makes sense! Jail paths can be really confusing :( I suppose it's also possible that both myself and the original poster in [2] have failed to follow the instructions in [1] correctly in some way that is causing this issue to arise, but that seems unlikely to me. Warm regards, Brandon