Re: 20250515 snapshot packaged install missing /etc/zfs/ directory

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Fri, 22 Aug 2025 14:50:53 UTC
On 8/22/25 09:46, Dag-Erling Smørgrav wrote:
> cyric@mm.st writes:
>> cyric@mm.st writes:
>>> The culprit here seems to be the /etc/zfs/ directory missing after
>>> installation, [...]
>> That's still the case when installing from
>> FreeBSD-15.0-PRERELEASE-amd64-20250819-02a8fadd2c4d-279701-disc1.iso.
> 
> Unlike distribution tarballs, packages don't include empty directories,
> and the installer does not run mtree to create them like installworld
> does.  We need to figure out the best way to do this.  A postinstall
> script in FreeBSD-mtree might work.  Or perhaps it should be done
> piecemeal, so FreeBSD-zfs is responsible for creating /etc/zfs, and the
> FreeBSD-caroot is responsible for creating /etc/ssl/certs.  To me it
> seems logical FreeBSD-runtime should create the directory hierarchy, but
> FreeBSD-mtree depends on FreeBSD-runtime, so that wouldn't work, unless
> we merged FreeBSD-mtree into FreeBSD-runtime.
>

ISTR that just adding the package= tag in ^/etc/mtree is sufficient to
actually package the empty directory.  See Lexi's approach for /tmp and /dev
in 6b2993e74ebaacd46bd1e438787c23450cd2752d.