Upstream commits 20f20417 ("main: Add UseGatewaysAsTimeservers option")
and 3ce40776 ("timeserver: Use gateways as timeservers if
UseGatewaysAsTimeservers=true") change ConnMan's behaviour regarding the
use of default gateways as timeservers: this is now a configurable
option at run-time, with the default setting being to disable this
behaviour. These commits obsolete one of LibreELEC's custom patches,
connman-04-do-not-add-default-gw-as-timeserver.patch.
Prepare for the next stable release of ConnMan by cherry-picking these
commits from upstream (with minor modifications to commit 20f20417 so it
applies cleanly to 1.36) and using the new UseGatewaysAsTimeservers
option in /etc/connman/main.conf to forcefully disable the feature,
which matches the behaviour of the LibreELEC patch. The cherry-picked
upstream commits can be dropped when a new stable version of ConnMan is
released and LibreELEC upgrades to it.
ConnMan writes stats and history files for each configured interface to
/storage/.cache/connman/*/{data,history}. These files remain open while
ConnMan is running, and prevent the system from halting or rebooting
when /storage is an NFS mount (because ConnMan brings down the interface
through which the NFS mount is accessed and then tries to update the
stats and/or history file for that interface, but the file descriptors
are no longer valid, so the system hangs).
The stats and history files are superfluous, especially since the means
of viewing them isn't included in LibreELEC (the stats tool is missing
because ConnMan is compiled with --disable-tools), so there's no harm in
not generating them on systems that don't mount /storage over NFS
either; in fact, it benefits LibreELEC installations where /storage is
mounted on a flash device by reducing unnecessary flash writes.
- replace strip_lto/strip_gold (only allowed to disable)
- add flag for PIC feature
- add flag to stop build parallel
- add support for hardening option (initial copy from debian 9)
All build parameters, are added in setup_toolchain.
`PKG_[FLAG]_[HOST/TARGET]_ENABLED` variable is introduced for checking the flag (yes/no) in the package.mk
Thanks to @MilhouseVH, for support and fixing