After upgrading from pkg-1.13.2 to pkg-1.14.2 it seems NanoBSD builds are broken. 1) Creating the pkg package (`pkg create pkg` or `pkg create -a`) to place in Pkg directory works but returns with the following warning: pkg: lstat(/usr/local/lib/compat/pkg): No such file or directory 2) Ignoring the above, and trying the create a NanoBSD image fails with the the following error in _.cust.cust_pkgng: ... + env 'BATCH=YES' 'ASSUME_ALWAYS_YES=YES' 'PKG_DBDIR=/var/db/pkg' 'SIGNATURE_TYPE=none' /usr/sbin/pkg add /_.p/pkg-1.14.2.txz Installing pkg-1.14.2... Extracting pkg-1.14.2: .......... done pkg-static: Fail to set time on /usr/local/lib/compat/pkg:No such file or directory Failed to install the following 1 package(s): /_.p/pkg-1.14.2.txz
I think it is caused by: https://github.com/freebsd/pkg/commit/10920fb88a121630e1b45ae1f02fc9bba893551f Workaround: 1) `mkdir /usr/local/lib/compat/pkg` before creating pkg package 2) Add `CR "mkdir -p /usr/local/lib/compat/pkg"` to cust_pkgng() so the required directory exists in the NanoBSD build environment
this has been fixed since