www/mozilla/mozilla.port.mk: add support to drive the build with 'mach'
since #2038789 we've seen that the 'legacy' method of running
CONFIGURE_SCRIPT and MAKE is a bit less tested, and will eventually be
completely unsupported/deprecated in the coming year.
add MOZILLA_USE_MACH knob, that if defined will:
- set do-{configure,build,install} targets to run the steps via ${WRKSRC}/mach,
passing various CONFIGURE_ARGS/MAKE_FLAGS/PARALLEL_MAKE_FLAGS/MAKE_ENV/etc.
- add MOZBUILD_STATE_PATH=${WRKDIR} to MAKE_ENV/CONFIGURE_ENV so that
mach stores it state in a throwaway dir that _pbuild can write
- adds MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none to MAKE_ENV so that
mach doesnt try running pip (and horribly blow)
if MOZILLA_USE_MACH isnt defined (eg default), set
CONFIGURE_STYLE=simple and CONFIGURE_SCRIPT?=configure.py, as it's
already defined this way in all consumers.
inconditionally add MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none to
CONFIGURE_ENV while here, its required since #2026497. and already set
[7 lines not shown]
Rework aspath_verify error handling and expand what AS_ERR_SOFT covers
Instead of AS_ERR_SOFT as a catchall for various soft errors split
the aspath_verify error into negative and positive errors. Negative
errors are hard errors and reset the session. Positive errors are
soft errors and use treat-with-withdraw.
Introduce AS_IS_HARD_ERROR() macro to quickly check for hard errors.
Treat AS_ERR_MAX as a soft-error to prevent a reset in this specific
case. The path is valid but too large and could cause downstream issues.
Reported by Özgün Kültekin
OK tb@
rpki-client: check auth_insert() return value in proc_parser_root_cert()
Plugs a leak that should be unreachable because TALs are inserted before
anything else.
ok claudio
rpki-client: ensure hex_encode() fills the provided buffer
Since the decoded buffer is binary data, the caller must know how much of
the buffer will be valid. All the callers pass a properly sized buffer, so
enforce this in the API.
This is a second way of fixing a report of Ties de Kock and should prevent
further errors.
ok claudio
rpki-client: ensure that PP send a properly sized "hash"
Do not trust the PP and check that the hash has a chance of being a hex
encoded SHA-256. Per RFC 8182, 3.5.1.3:
o The hash attribute in snapshot and delta elements MUST be the
hexadecimal encoding of the SHA-256 [SHS] hash of the referenced
file.
Reported by Ties de Kock
ok claudio
rpki-client: reworks spl_insert_vsp()
The insertion logic here was adapted from ASPA, which is very confusing.
Rework this to be like the new ASPA code, mirroring the logic with the
obvious tweaks, also avoiding a zero-sized allocation.
Cap to the size of an SPL and overflow it so as to avoid unbounded memory
growth. Again, none of this exists in the wild right now. Improved limits
and addition of stats can be dealt with in quieter times.
ok claudio
rpki-client: fix VSP expiry
Use the same approach like in ASPAs and expire the VSP when the first part
expires, not when there is nothing left in it. None of that stuff exists,
so let us reconsider when people show interest in deploying this.
ok claudio