Date: Mon, 4 Dec 2017 13:59:38 -0800 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Mark Millard <markmi@dsl-only.net>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org> 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 Message-ID: <a7268e9b-8ea3-ef09-97ec-dfdf08a43f6c@FreeBSD.org> In-Reply-To: <225E5187-55F9-4BEA-907D-79E04B1FA4A1@dsl-only.net> References: <225E5187-55F9-4BEA-907D-79E04B1FA4A1@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aHEnCxxEcPXmoXOnohx0Gm10sknLwxk7U Content-Type: multipart/mixed; boundary="FivTWtfcVjsALxOM27oIeVHrHxmq0vHLs"; protected-headers="v1" From: Bryan Drewery <bdrewery@FreeBSD.org> To: Mark Millard <markmi@dsl-only.net>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org> Message-ID: <a7268e9b-8ea3-ef09-97ec-dfdf08a43f6c@FreeBSD.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a7268e9b-8ea3-ef09-97ec-dfdf08a43f6c>