From owner-freebsd-toolchain@freebsd.org Mon Dec 4 04:56:41 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 C35CFDEDBE1 for ; Mon, 4 Dec 2017 04:56:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-127.reflexion.net [208.70.210.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73DFD7878C for ; Mon, 4 Dec 2017 04:56:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 20367 invoked from network); 4 Dec 2017 04:29:54 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 4 Dec 2017 04:29:54 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.3) with SMTP; Sun, 03 Dec 2017 23:29:54 -0500 (EST) Received: (qmail 9133 invoked from network); 4 Dec 2017 04:29:54 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 4 Dec 2017 04:29:54 -0000 Received: from [192.168.1.25] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 508C6EC8B66; Sun, 3 Dec 2017 20:29:53 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: 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 Message-Id: <225E5187-55F9-4BEA-907D-79E04B1FA4A1@dsl-only.net> Date: Sun, 3 Dec 2017 20:29:52 -0800 To: Bryan Drewery , FreeBSD Toolchain , FreeBSD Ports X-Mailer: Apple Mail (2.3273) 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 04:56:41 -0000 Note: /usr/ports/ (and so poudriere-devel) as of -r425204=20 (poudriere-devel-3.2.99.20171129). I expect that the below is from ports-mgmt/poudriere-=3Ddevel -r454996 and its: - ports/jail -c NOZFS: Consider non-empty-already-existing-directory a = failure 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 . [There is one other side note about a potential issue later below.] # 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-installworld-poud... fail [00:00:00] Error: Directory not empty at = /usr/obj/DESTDIRs/clang-armv7-installworld-poud # 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 . . . (So: a pre-built world, created via a cross build and copied over beforehand.) # 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-installworld-poud... fail [00:00:00] Error: Directory not empty at = /usr/obj/DESTDIRs/clang-armv7-installworld-poud /usr/local/etc/poudriere.conf has: NO_ZFS=3Dyes /usr/local/share/poudriere/include/fs.sh has: 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 [ -z "${NO_ZFS}" ] || fs=3Dnone 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 = it. if ! dirempty "${mnt}"; then echo " fail" err 1 "Directory not empty at ${mnt}" fi echo " done" fi } 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. [Note: I also question, if, with -S /usr/src in use, the SRC_BASE assignment below is correct.] /usr/local/share/poudriere/jail.sh has: create_jail() { [ "${JAILNAME#*.*}" =3D "${JAILNAME}" ] || err 1 "The jailname cannot contain a period (.). See = jail(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} . . . =3D=3D=3D Mark Millard markmi at dsl-only.net