diff --git a/release/Makefile.oci b/release/Makefile.oci --- a/release/Makefile.oci +++ b/release/Makefile.oci @@ -24,6 +24,8 @@ .for _IMG in ${OCI_IMAGES} OCI_TARGETS+= container-image-${_IMG}.txz container-image-${_IMG}.txz: ${OCI_DEPS_${_IMG}} + # Adjust PATH so that we run pwd_mkdb from the bootstrap tools + env PATH=${OBJTOP}/tmp/legacy/bin:${PATH:Q} \ sh ${.CURDIR}/scripts/make-oci-image.sh ${.CURDIR} ${REVISION} ${BRANCH} ${TARGET_ARCH} ${_IMG} skopeo copy \ containers-storage:localhost/freebsd${REVISION:R}-${_IMG}:latest \ diff --git a/release/tools/oci-image-static.conf b/release/tools/oci-image-static.conf --- a/release/tools/oci-image-static.conf +++ b/release/tools/oci-image-static.conf @@ -7,17 +7,20 @@ OCI_BASE_IMAGE= oci_image_build() { - mtree -deU -p $m/ -f /etc/mtree/BSD.root.dist > /dev/null - mtree -deU -p $m/var -f /etc/mtree/BSD.var.dist > /dev/null - mtree -deU -p $m/usr -f /etc/mtree/BSD.usr.dist > /dev/null - mtree -deU -p $m/usr/include -f /etc/mtree/BSD.include.dist > /dev/null - mtree -deU -p $m/usr/lib -f /etc/mtree/BSD.debug.dist > /dev/null + local srcdir=${curdir}/.. + mtree -deU -p $m/ -f ${srcdir}/etc/mtree/BSD.root.dist > /dev/null + mtree -deU -p $m/var -f ${srcdir}/etc/mtree/BSD.var.dist > /dev/null + mtree -deU -p $m/usr -f ${srcdir}/etc/mtree/BSD.usr.dist > /dev/null + mtree -deU -p $m/usr/include -f ${srcdir}/etc/mtree/BSD.include.dist > /dev/null + mtree -deU -p $m/usr/lib -f ${srcdir}/etc/mtree/BSD.debug.dist > /dev/null install_packages ${abi} ${workdir} $m FreeBSD-caroot FreeBSD-zoneinfo - cp /etc/master.passwd $m/etc + cp ${srcdir}/etc/master.passwd $m/etc pwd_mkdb -p -d $m/etc $m/etc/master.passwd || return $? - cp /etc/group $m/etc || return $? - cp /etc/termcap.small $m/etc/termcap.small || return $? - cp /etc/termcap.small $m/usr/share/misc/termcap || return $? + cp ${srcdir}/etc/group $m/etc || return $? + # termcap.small is generated so we get it from OBJDIR - make sets our + # working directory to OBJDIR/release + cp ../etc/termcap/termcap.small $m/etc/termcap.small || return $? + cp ../etc/termcap/termcap.small $m/usr/share/misc/termcap || return $? env DESTDIR=$m /usr/sbin/certctl rehash # Generate a suitable repo config for pkgbase case ${branch} in