A lot of time went into this gem to find changes in a
vanilla FreeBSD tree and to pick them up via the config
files provided by OPNsense and its current ports tree.
A vanilla tree is expected under /usr/freebsd-ports as
well as the standard layout of OPNsense. If not the case,
the config vars can be edited to adapt to your directory
structure.
A known weakness of this script is its thoughtlessness
in case a port does an include-some-other-Makefile trick,
e.g. vim-lite to vim or gettext-runtime to gettext. The
issue has been amended by marking these ports `sync' in
our ports.conf in opnsense/tools.git. A better fix would
require a substantial rework of the ports infrastructure,
something that I don't think will happen.
Ports that are marked `sync' will also never update their
dependencies, as this would e.g. in the case of vim pull
in a lot of Xorg glue.
In any case it works reliably now. :)
We need to keep track of new and old binaries and directories.
This script will show removed and added files, but really only
the removed files are interesting as they must be stripped from
the system to not cause any harm (think vulnerable libraries
like OpenSSL from base we want to get rid of soon).