From owner-freebsd-ports@FreeBSD.ORG Sun Oct 13 12:22:20 2013 Return-Path: Delivered-To: freebsd-ports@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 678FE282 for ; Sun, 13 Oct 2013 12:22:20 +0000 (UTC) (envelope-from gehm@doom-labs.net) Received: from mail.doom-labs.net (diabolo.doom-labs.net [81.92.172.233]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1256B215A for ; Sun, 13 Oct 2013 12:22:19 +0000 (UTC) Received: from mail.doom-labs.net (diabolo.doom-labs.net [81.92.172.233]) by mail.doom-labs.net (Postfix) with ESMTP id 1927552D65 for ; Sun, 13 Oct 2013 14:22:18 +0200 (CEST) Received: by mail.doom-labs.net (Postfix, from userid 10094) id DEA4252D64; Sun, 13 Oct 2013 14:22:17 +0200 (CEST) Date: Sun, 13 Oct 2013 14:22:17 +0200 From: Ekkehard Gehm To: freebsd-ports@freebsd.org Subject: Re: stagedir vs. jail Message-ID: <20131013122217.GA87222@doom-labs.net> References: <20131013105853.GA63463@doom-labs.net> <525A8AB5.9000102@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline In-Reply-To: <525A8AB5.9000102@FreeBSD.org> X-Arbitrary-Number-Of-The-Day: 42 X-Binford-Tool: 6100 (more power) X-PGP-Key: http://www.physik.tu-berlin.de/~gehm/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2013 12:22:20 -0000 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > >=20 > > 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. > >=20 > > The only workiaround is disabling stage completly thru make.conf...=20 > > As this is very quick'n'dirty I wonder if there is any other > > solution! >=20 > 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. >=20 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. >=20 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. >=20 Here is a short cut out of a build (portmaster portmaster): install -o root -g wheel -m 444 /s/portbuild/usr/ports/ports-mgmt/portmast= er/wo rk/freebsd-portm= aster-7359019/files/bash-completions /s/portbuild/usr/ports/por = ts-mgmt/portmaster/work/stage/us= r/local/etc/bash_completion.d/portmaster.sh =3D=3D=3D=3D> Compressing man pages =3D=3D=3D> Building package for portmaster-3.17.2 Creating package /s/portbuild/usr/ports/ports-mgmt/portmaster/work/portmast= er-3. 17.2.tbz Registering depends:. Creating bzip'd tar ball in '/s/portbuild/usr/ports/ports-mgmt/portmaster/w= ork/p ortmaster-3.17.2= =2Etbz' 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. =3D=3D=3D>>> A backup package for portmaster-3.17.1 should be located in /var/ports/packages/portmaster-backup =3D=3D=3D>>> Installation of portmaster-3.17.2 (ports-mgmt/portmaster) fail= ed =3D=3D=3D>>> Aborting update =3D=3D=3D>>> Killing background jobs Terminated =3D=3D=3D>>> You can restart from the point of failure with this command li= ne: portmaster ports-mgmt/portmaster =3D=3D=3D>>> 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? >=20 > A possible work-around: instead of sym-linking /s/usr-local -> > /usr/local use a nullfs mount instead. >=20 > mount -t nullfs /s/usr-local /usr/local >=20 > (Actually, you'ld probably do that from outside the jail so adjust the > paths accordingly.) >=20 > 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. >=20 > Cheers, >=20 > Matthew >=20 > --=20 > Dr Matthew J Seaman MA, D.Phil. > PGP: http://www.infracaninophile.co.uk/pgpkey >=20 >=20 --=20 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/~ge= hm/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?" --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (FreeBSD) iEYEARECAAYFAlJakHgACgkQ3AMzQY6nzuYWmQCfR5YwUfDggmY+jRpQbQGZhxue ncMAoKen+1HMo7blNMgYioROZXOiLapf =rzw3 -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--