From owner-freebsd-jail@FreeBSD.ORG Sun Oct 13 20:59:16 2013 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C54EB22C; Sun, 13 Oct 2013 20:59:16 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from cosmo.uchicago.edu (cosmo.uchicago.edu [128.135.52.97]) by mx1.freebsd.org (Postfix) with ESMTP id 8511026EE; Sun, 13 Oct 2013 20:59:16 +0000 (UTC) Received: by cosmo.uchicago.edu (Postfix, from userid 48) id 146B3CB8C5A; Sun, 13 Oct 2013 15:42:27 -0500 (CDT) Received: from 76.193.19.251 (SquirrelMail authenticated user valeri) by cosmo.uchicago.edu with HTTP; Sun, 13 Oct 2013 15:42:26 -0500 (CDT) Message-ID: <61419.76.193.19.251.1381696946.squirrel@cosmo.uchicago.edu> In-Reply-To: <20131013131901.GA55678@doom-labs.net> References: <20131013105853.GA63463@doom-labs.net> <525A8AB5.9000102@FreeBSD.org> <20131013122217.GA87222@doom-labs.net> <20131013131901.GA55678@doom-labs.net> Date: Sun, 13 Oct 2013 15:42:26 -0500 (CDT) Subject: Re: stagedir vs. jail From: "Valeri Galtsev" To: "Ekkehard Gehm" User-Agent: SquirrelMail/1.4.8-5.el5.centos.7 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-jail@freebsd.org, freebsd-ports@freebsd.org X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: galtsev@kicp.uchicago.edu List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2013 20:59:16 -0000 Yes, this is killing me too. The same: my jails are built "by the book": http://www.freebsd.org/doc/handbook/jails-application.html the only difference from the book is, they are located in /jail instead of /home/j which shouldn't matter from the point of view of what is happening inside the jail. Thanks in advance to the bright person(s) who can/will address this! Valeri On Sun, October 13, 2013 8:19 am, Ekkehard Gehm wrote: > A quick addition: > > My Jail is buid exactly as discribed in the jail handbook: > http://www.freebsd.org/doc/handbook/jails-application.html > > So hanging around with this issue because of this staging thing is a bit > *argl* > > Cheers, > > Ekki > > On Sun, 13 Oct 2013, Ekkehard Gehm wrote something like: > >> Ahoi! >> >> On Sun, 13 Oct 2013, Matthew Seaman wrote something like: >> >> > On 13/10/2013 11:58, Ekkehard Gehm wrote: >> > > I resently have some problems installing/updating ports. The main >> > > problem is that the stagedir path is somehow messed up. >> > > >> > > The system is running FreeBSD 9.1-RELEASE-p6 and I'm working in a >> > > jail. While building it creates the stagedir in >> > > /s/portbuild/usr/ports/...../usr/local/ BUT: When it comes to the >> pkg >> > > building it suddently is looking in .../usr-local/.. witch acctualy >> > > is a part of the symlink. (In the jail /usr/local is a symlink to >> > > /s/usr-local). Resulting in an failure. >> > > >> > > The only workiaround is disabling stage completly thru make.conf... >> > > As this is very quick'n'dirty I wonder if there is any other >> > > solution! >> > >> > Your subject line is (perhaps) a bit misleading: this seems to be >> > nothing specific to the use of jails, but due to having sym-links in >> > various paths. It could happen just the same if you laid out your >> host >> > filesystem using sym-links. >> > >> >> Right. That might be... >> >> > Anyhow, this looks like a bug to me -- using sym-links to put your >> > filesystem together should not result in chaos. >> > >> >> >> This is alo my understanding of this issue... >> >> > Are you using pkg(8)? There are differences in the way a package is >> > generated from the staging directory between pkg(8) and pkg_create(1) >> > which might make all the difference. >> > >> >> Here is a short cut out of a build (portmaster portmaster): >> >> install -o root -g wheel -m 444 >> /s/portbuild/usr/ports/ports-mgmt/portmaster/wo >> >> rk/freebsd-portmaster-7359019/files/bash-completions >> /s/portbuild/usr/ports/por >> >> ts-mgmt/portmaster/work/stage/usr/local/etc/bash_completion.d/portmaster.sh >> ====> Compressing man pages >> ===> Building package for portmaster-3.17.2 >> Creating package >> /s/portbuild/usr/ports/ports-mgmt/portmaster/work/portmaster-3. >> 17.2.tbz >> Registering depends:. >> Creating bzip'd tar ball in >> '/s/portbuild/usr/ports/ports-mgmt/portmaster/work/p >> ortmaster-3.17.2.tbz' >> tar: could not chdir to >> '/s/portbuild/usr/ports/ports-mgmt/portmaster/work/stage >> /s/usr-local' >> >> pkg_create: make_dist: tar command failed with code 256 >> *** [do-package] Error code 1 >> >> Stop in /usr/ports/ports-mgmt/portmaster. >> *** [install] Error code 1 >> >> Stop in /usr/ports/ports-mgmt/portmaster. >> >> ===>>> A backup package for portmaster-3.17.1 should >> be located in /var/ports/packages/portmaster-backup >> >> ===>>> Installation of portmaster-3.17.2 (ports-mgmt/portmaster) failed >> ===>>> Aborting update >> >> ===>>> Killing background jobs >> Terminated >> >> ===>>> You can restart from the point of failure with this command line: >> portmaster ports-mgmt/portmaster >> >> ===>>> Exiting >> >> As a result portmaster is not working anymore... >> > Is it all ports that are affected? Does the use of PLIST_FILES or >> > PLIST_DIRS in the port Makefile make any difference compared to having >> a >> > pkg-plist file? >> > >> > A possible work-around: instead of sym-linking /s/usr-local -> >> > /usr/local use a nullfs mount instead. >> > >> > mount -t nullfs /s/usr-local /usr/local >> > >> > (Actually, you'ld probably do that from outside the jail so adjust the >> > paths accordingly.) >> > >> > Another workaround: set up your own poudriere instance to build >> > packages for all your jails. poudriere(8) will create its own jails >> to >> > do package building in, and manage paths etc. itself. It's a natural >> > partner to pkg(8) and zfs(8) but it will work without either of those. >> > >> > Cheers, >> > >> > Matthew >> > >> > -- >> > Dr Matthew J Seaman MA, D.Phil. >> > PGP: http://www.infracaninophile.co.uk/pgpkey >> > >> > >> >> >> >> -- >> Ekkehard Gehm * mailto:gehm@doom-labs.net >> Doom-Labs Inc. * http://www.doom-labs.net >> Frag Content * PGP-Key: >> http://www.physik.tu-berlin.de/~gehm/pubkey.asc >> >> Experience is what you get when you were expecting something else. >> >> Microsoft: "Where do you want to go today?" >> Linux: "Where do you want to go tomorrow?" >> FreeBSD: "Are you guys coming or what?" > > > > -- > Ekkehard Gehm * mailto:gehm@doom-labs.net > Doom-Labs Inc. * http://www.doom-labs.net > Frag Content * PGP-Key: > http://www.physik.tu-berlin.de/~gehm/pubkey.asc > > Experience is what you get when you were expecting something else. > > Microsoft: "Where do you want to go today?" > Linux: "Where do you want to go tomorrow?" > FreeBSD: "Are you guys coming or what?" > ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++