package/ntpsec: new package
PATCH v2 1/1 package/ntpsec: new package
- set 'CC="$(HOSTCC)"' to avoid cross-compile failure (see [1]):
/bin/sh: line 1: .../build/ntpsec-1_2_0/build/host/ntpd/keyword-gen: cannot execute binary file: Exec format error
Waf: Leaving directory `.../build/ntpsec-1_2_0/build/host'
Build failed
-> task in 'ntp_keyword.h' failed with exit status 126 (run with -v to display more information)
- set '-std=gnu99"' to avoid compile failure with old compilers
- explicit set PYTHON_CONFIG
- add patch 001-ntptime-fix-jfmt5-ofmt5-jfmt6-ofmt6-related-compile-.patch to fix ntptime jfmt5/ofmt5 jfmt6/ofmt6 related compile failure
- add SYSV init file (S49ntp)
- add example ntpd.conf (with legacy option enabled and provide skeleton for NTS configuration)
- add config option for NTS support
- depend on python3 (omit python2 to reduce test effort)
- add ntp user/group and run ntpd as restricted user
- add libcap dependency (compile time optional but needed for droproot support)
[1] https://gitlab.com/NTPsec/ntpsec/-/issues/694
---
Changes v1 -> v2:
- update version to 1.2.1, note version 1.2.1 is tagged ([2], [3]) and
downloadable but not listed as release ([4]), for changelog see [5],
(suggested by Guillaume)
[2] https://gitlab.com/NTPsec/ntpsec/-/tags
[3] https://gitlab.com/NTPsec/ntpsec/-/commit/3c41d31e11a67ff17f303a4133ae0f867bc3ce26
[4] https://gitlab.com/NTPsec/ntpsec/-/releases
[5] https://gitlab.com/NTPsec/ntpsec/-/blob/master/NEWS.adoc - improve python3 only usage (omit python2/python3 select code)
- use CC="$(HOSTCC)" (suggested by Guillaume)
- drop link to libntpc.so, use --libdir instead (suggested by Guillaume)
- drop commented out '--enable-nts' code
--- DEVELOPERS | 1 + package/Config.in | 1 + ...5-ofmt5-jfmt6-ofmt6-related-compile-.patch | 61 +++++++++++++++++ package/ntpsec/Config.in | 31 +++++++++ package/ntpsec/S49ntp | 58 +++++++++++++++++ package/ntpsec/ntpd.etc.conf | 33 ++++++++++ package/ntpsec/ntpsec.hash | 4 ++ package/ntpsec/ntpsec.mk | 65 +++++++++++++++++++ 8 files changed, 254 insertions(+) create mode 100644 package/ntpsec/0001-ntptime-fix-jfmt5-ofmt5-jfmt6-ofmt6-related-compile-.patch create mode 100644 package/ntpsec/Config.in create mode 100644 package/ntpsec/S49ntp create mode 100644 package/ntpsec/ntpd.etc.conf create mode 100644 package/ntpsec/ntpsec.hash create mode 100644 package/ntpsec/ntpsec.mk
DEVELOPERS +1 -0
@@ -2202,6 +2202,7 @@ F: package/iwd/ F: package/libevdev/ F: package/libuev/ F: package/log4cplus/ +F: package/ntpsec/ F: package/postgresql/ F: package/python-colorzero/ F: package/python-flask-wtf/
package/Config.in +1 -0
@@ -2273,6 +2273,7 @@ endif source "package/nmap/Config.in" source "package/noip/Config.in" source "package/ntp/Config.in" + source "package/ntpsec/Config.in" source "package/nuttcp/Config.in" source "package/odhcp6c/Config.in" source "package/odhcploc/Config.in"
package/ntpsec/0001-ntptime-fix-jfmt5-ofmt5-jfmt6-ofmt6-related-compile-.patch new file +61 -0
61 lines not on this page · raw message
package/ntpsec/Config.in new file +31 -0
@@ -0,0 +1,31 @@ +config BR2_PACKAGE_NTPSEC + bool "ntpsec" + depends on BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_OPENSSL + help + NTPsec project - a secure, hardened, and improved + implementation of Network Time Protocol derived + from NTP Classic, Dave Mills’s original. + + Provides things like ntpd, ntpdate, ntpq, etc... + + https://www.ntpsec.org/ + +if BR2_PACKAGE_NTPSEC + +config BR2_PACKAGE_NTPSEC_CLASSIC_MODE + bool "classic-mode" + help + Enable strict configuration and log-format compatibility + with NTP Classic. + +config BR2_PACKAGE_NTPSEC_NTS + bool "NTS support" + help + Enable Network Time Security (NTS) support. + +endif + +comment "ntpsec depens on Pyhton3" + depends on !BR2_PACKAGE_PYTHON3
package/ntpsec/S49ntp new file +58 -0
58 lines not on this page · raw message
package/ntpsec/ntpd.etc.conf new file +33 -0
@@ -0,0 +1,33 @@ +# +# legacy NTP configuration +# +pool 0.pool.ntp.org iburst +pool 1.pool.ntp.org iburst +pool 2.pool.ntp.org iburst +pool 3.pool.ntp.org iburst + +# +# NTS configuration +# +# Notes: +# - uncomment the following lines to enable NTS support (but +# make sure the initial clock is up-to-date (otherwise the +# NTS certificate validation will fail with 'NTSc: certificate invalid: +# 9=>certificate is not yet valid' as on boards without RTC support) +# and/or keep at least one line from the legacy NTP lines +# - enable BR2_PACKAGE_CA_CERTIFICATES to gain access to the certificate +# files +# +# server time.cloudflare.com nts # Global, anycast +# server nts.ntp.se:4443 nts # Sweden +# server ntpmon.dcs1.biz nts # Singapore +# server ntp1.glypnod.com nts # San Francisco +# server ntp2.glypnod.com nts # London +# +# ca /usr/share/ca-certificates/mozilla + +# Allow only time queries, at a limited rate, sending KoD when in excess. +# Allow all local queries (IPv4, IPv6) +restrict default nomodify nopeer noquery limited kod +restrict 127.0.0.1 +restrict [::1]
package/ntpsec/ntpsec.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 71c9f4bde6953bbc048bbaf278da81c451a56cc08d6772542b4ad37c67d72e89 ntpsec-NTPsec_1_2_1.tar.bz2 +sha256 b4db4de3317c3b0554ed91eb692968800bdfd6ad2c16ffbeee8ce4895ed91da4 LICENSE.adoc +sha256 d3b21470adadd9abd9c6d675378f8c371ac5a4ea6dbec91859e02fadca3c0856 docs/copyright.adoc
package/ntpsec/ntpsec.mk new file +65 -0
65 lines not on this page · raw message
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot