From owner-freebsd-toolchain@freebsd.org Mon Dec 4 21:59:45 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA534E6C1A7; Mon, 4 Dec 2017 21:59:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 802C17B8F3; Mon, 4 Dec 2017 21:59:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id A47E32CD4; Mon, 4 Dec 2017 21:59:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id E488D7FB3; Mon, 4 Dec 2017 21:59:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id DPe-HGflz7aO; Mon, 4 Dec 2017 21:59:39 +0000 (UTC) Subject: Re: poudriere jail -c -j JNAME -m null -M PREBUILT-WORLD-PATH -S /usr/src -v 12.0-CURRENT complains about "DIrectory not empty" for PREBUILT-WORLD-PATH DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 6A2257FAD To: Mark Millard , FreeBSD Toolchain , FreeBSD Ports References: <225E5187-55F9-4BEA-907D-79E04B1FA4A1@dsl-only.net> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Mon, 4 Dec 2017 13:59:38 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <225E5187-55F9-4BEA-907D-79E04B1FA4A1@dsl-only.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aHEnCxxEcPXmoXOnohx0Gm10sknLwxk7U" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 21:59:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aHEnCxxEcPXmoXOnohx0Gm10sknLwxk7U Content-Type: multipart/mixed; boundary="FivTWtfcVjsALxOM27oIeVHrHxmq0vHLs"; protected-headers="v1" From: Bryan Drewery To: Mark Millard , FreeBSD Toolchain , FreeBSD Ports Message-ID: Subject: Re: poudriere jail -c -j JNAME -m null -M PREBUILT-WORLD-PATH -S /usr/src -v 12.0-CURRENT complains about "DIrectory not empty" for PREBUILT-WORLD-PATH References: <225E5187-55F9-4BEA-907D-79E04B1FA4A1@dsl-only.net> In-Reply-To: <225E5187-55F9-4BEA-907D-79E04B1FA4A1@dsl-only.net> --FivTWtfcVjsALxOM27oIeVHrHxmq0vHLs Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/3/2017 8:29 PM, Mark Millard wrote: > Note: /usr/ports/ (and so poudriere-devel) as of -r425204=20 > (poudriere-devel-3.2.99.20171129). >=20 > I expect that the below is from ports-mgmt/poudriere-=3Ddevel > -r454996 and its: >=20 > - ports/jail -c NOZFS: Consider non-empty-already-existing-directory = a failure >=20 > where the change did not cover an explicit use of -m null also > being involved to deliberately being using a pre-built > world that is located via use of -M PATH . >=20 > [There is one other side note about a potential > issue later below.] >=20 > # poudriere jail -c -j FBSDjailRPI2 -m null -M /usr/obj/DESTDIRs/clang-= armv7-installworld-poud -S /usr/src -v 12.0-CURRENT > [00:00:00] Creating FBSDjailRPI2 fs at /usr/obj/DESTDIRs/clang-armv7-in= stallworld-poud... fail > [00:00:00] Error: Directory not empty at /usr/obj/DESTDIRs/clang-armv7-= installworld-poud >=20 > # ls -lTdt /usr/obj/DESTDIRs/clang-armv7-installworld-poud/* > drwxr-xr-x 26 root wheel 2048 Nov 27 00:33:01 2017 /usr/obj/DESTDIRs= /clang-armv7-installworld-poud/etc > drwxr-xr-x 2 root wheel 2560 Nov 27 00:29:51 2017 /usr/obj/DESTDIRs= /clang-armv7-installworld-poud/rescue > . . . >=20 > (So: a pre-built world, created via a cross build and > copied over beforehand.) >=20 > # poudriere jail -c -j FBSDjailRPI2 -m null -M /usr/obj/DESTDIRs/clang-= armv7-installworld-poud -S /usr/src -v 12.0-CURRENT > [00:00:00] Creating FBSDjailRPI2 fs at /usr/obj/DESTDIRs/clang-armv7-in= stallworld-poud... fail > [00:00:00] Error: Directory not empty at /usr/obj/DESTDIRs/clang-armv7-= installworld-poud Yup will fix for 3.2.3 today. >=20 >=20 > /usr/local/etc/poudriere.conf has: >=20 > NO_ZFS=3Dyes >=20 >=20 > /usr/local/share/poudriere/include/fs.sh has: >=20 > createfs() { > [ $# -ne 3 ] && eargs createfs name mnt fs > local name mnt fs > name=3D$1 > mnt=3D$(echo $2 | sed -e "s,//,/,g") > fs=3D$3 >=20 > [ -z "${NO_ZFS}" ] || fs=3Dnone >=20 > if [ -n "${fs}" -a "${fs}" !=3D "none" ]; then > . . . > else > msg_n "Creating ${name} fs at ${mnt}..." > if ! mkdir -p "${mnt}"; then > echo " fail" > err 1 "Failed to create directory ${mnt}" > fi > # If the directory is non-empty then we didn't create i= t. > if ! dirempty "${mnt}"; then > echo " fail" > err 1 "Directory not empty at ${mnt}" > fi > echo " done" > fi > } >=20 > For -m null here -M /usr/obj/DESTDIRs/clang-armv7-installworld-poud > should point to a non-empty directory as far as I can tell. And > it does. But that leads to the above code rejecting the -M > path. >=20 >=20 >=20 > [Note: I also question, if, with -S /usr/src > in use, the SRC_BASE assignment below is > correct.] Yeah it's a bit off. I have a pending bug to fix here from earlier reports from you as well that I haven't gotten to yet. >=20 > /usr/local/share/poudriere/jail.sh has: >=20 > create_jail() { > [ "${JAILNAME#*.*}" =3D "${JAILNAME}" ] || > err 1 "The jailname cannot contain a period (.). See ja= il(8)" > =20 > if [ "${METHOD}" =3D "null" ]; then > [ -z "${JAILMNT}" ] && \ > err 1 "Must set -M to path of jail to use" > [ "${JAILMNT}" =3D "/" ] && \ > err 1 "Cannot use / for -M" > fi > . . . > SRC_BASE=3D"${JAILMNT}/usr/src" > =20 > case ${METHOD} in > . . . > null) > JAILFS=3Dnone > FCT=3D > ;; > esac > =20 > if [ "${JAILFS}" !=3D "none" ]; then > [ -d "${JAILMNT}" ] && \ > err 1 "Directory ${JAILMNT} already exists" > fi > =20 > createfs ${JAILNAME} ${JAILMNT} ${JAILFS:-none} > . . . >=20 >=20 >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 --=20 Regards, Bryan Drewery --FivTWtfcVjsALxOM27oIeVHrHxmq0vHLs-- --aHEnCxxEcPXmoXOnohx0Gm10sknLwxk7U Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJaJcVKAAoJEDXXcbtuRpfPpz0H/02EPOsS/hnTwORIAsltFKYy VblRM4optjm+V7IA3O1MWJcxop3E9QeukuM9InovCe/yXkuWWZV2PRdk5AO4zvR2 YnYc4OF3HnVdxFiaAIM4iFwHQVWsGMAjI5U0cY3RlTAepIZl4pvuHxApbC7FBcQh ox/8ZB4izbgDlU8teYGAI5ovXVahywcEBMfHgmpY10LfVNjdU1kWQc1m4tgvCwtC MoZR2hByJ+G+XLFLXiuxJ39Nuzb3+g8FJKphOErXBnVap+y7xJN43BvmjSn+ww6e 8fxy0w4p7tpMEo30Jl5gR9Laqm8Q0uilstE+M09g83DdnZ7Tiua9KBoUrI4GF5o= =MVgj -----END PGP SIGNATURE----- --aHEnCxxEcPXmoXOnohx0Gm10sknLwxk7U--