HomeFreeBSD

etcupdate: Fix -N support for build command

Description

etcupdate: Fix -N support for build command

Whilst febca0e64361 added -N for both build and extract, it only fully
worked for extract; build would perform the actual tree build with
-DNO_ROOT and construct the intended METALOG, but the subsequent tarball
creation did not take this into account and just tarred up the the
directory as-is rather than using the METALOG. This resulted in the
permissions and ownership not being correct, as well as there being a
stray METALOG file in the tarball's root.

Reported by: avg
Reviewed by: avg, jhb, imp
Tested by: avg
Fixes: febca0e64361 ("etcupdate: Add a -N flag to perform a NO_ROOT build")
Differential Revision: https://reviews.freebsd.org/D36845