We already have "kernel" and "base" and plugins also follow this
pattern by only registering its name once per devel or release
version. This kills ambiguity for "opnsense" vs. "opnsense-version"
and makes it more branding friendly. Suffice to say "core", "kernel"
and "base" are reserved names and also align with tools.git.
Now that we have metadata injection at build time read it instead
of its auxiliary files. Allow live-mount to snoop the metadata and
afterwards we can start to marry the version and firmware-product
file.
Last puzzle piece will be a tool called "opnsense-version" to read
the JSON metadata and return it in a piecemeal fashion of a part
of the system requires that info, especially from the shell.
Part one makes it possible to inject branding info from the Makefile
which is not fully complete yet but can always be finished. The new
hash value can thus be used as a unqiue identifier for page resources
that may be subject to caching. By using the git hash it allows us
to have this effect on test commits as well as earch working version
as we don't want to track the changes for each file but still get a
good amount of caching.
Disclaimer: this does *not* increase privacy. It's pretty
obvious what you do on an OPNsense mirror at any given point
in time WRT release version to update, traffic volume, etc.
Also note that all updates are signed and verified either way.
If you want true privacy rsync to a local private mirror and
use that one instead.
At the time of this writing FreeBSD and pfSense both use
HTTP as the default.
The tests need the exact installed version to run the correct
tests so we need to enforce it even if it mostly works otherwise.
The procedure is mostly used for the nightly builds anyway, and
that shall run directly after the build.