Do not import symlinks from non-pkg package builds
The package phase lets the jail build user write to a host-backed
/.npkg directory. build_port() imported every file and symlink from
that directory into the host package repository. An absolute symlink
changes meaning at this boundary: it points inside the jail while
mounted but at the host after import.
Only the pkg bootstrap variants need package-manager compatibility
links. Process those links before their targets and reject any that
resolve outside staging. Import only regular files for other ports,
preventing their build output from introducing host-resolved symlinks
into the repository.
(cherry picked from commit d558fca255b11e6350b62337bdd80bef36f673bf)
Conflicts:
src/share/poudriere/common.sh
Issue #1366
check_leftovers: Tee the mtree data to stderr.
Some modifications are not obvious without seeing the mtree output,
such as changed mode/perm on a file or dir.
shash: Remove globbing support.
This support is not needed to function and adds complexity for
alternative backends for shash.
Still allow _shash_unset() to use globbing as an implementation detail
of shash_remove_var().
image -t zsnapshot: Remove stale files from the previous image
With -i, files removed from the world were left behind in the new image.
Fixes: dd61d5134c ("do_clone: Stop overwriting - move that to do_clone_del")
(cherry picked from commit c10dc9a7fc71d6049254c39a5ad71b91886cb1c0)
Conflicts:
src/share/poudriere/image_zsnapshot.sh
jail -u -m src=: Remove stale files from the /usr/src copy
Files removed from the src tree were left behind in the jail's /usr/src.
Issue #1299
Fixes: dd61d5134c ("do_clone: Stop overwriting - move that to do_clone_del")
(cherry picked from commit 0ceb8092c18377bd45e69baa581e2a214b9cae2b)
Conflicts:
src/share/poudriere/jail.sh