third_party/chrony: initialize
First pass at building chrony. Minimal functionality, notably skipped
features are:
- PRIVDROP (requires libcap)
- NTS (requires gnutls)
Do we need anything else?
Tested with:
$ bazel build '@chrony//:chrony' --crosstool_top=//build/toolchain/musl-host-gcc:musl_host_cc_suite
$ file bazel-bin/external/chrony/chrony
bazel-bin/external/chrony/chrony: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
$ bazel-bin/external/chrony/chrony -v
chronyd (chrony) version 4.1-monogon (NTP RTC SCFILTER ASYNCDNS)
Change-Id: I56ac15a23e5741c0428580268cf40ae7744078d4
Reviewed-on: https://review.monogon.dev/c/monogon/+/293
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/third_party/chrony/config.h.in b/third_party/chrony/config.h.in
new file mode 100644
index 0000000..5be1b28
--- /dev/null
+++ b/third_party/chrony/config.h.in
@@ -0,0 +1,19 @@
+#define LINUX
+#define DEBUG 0
+#define USE_PTHREAD_ASYNCDNS
+
+#define CHRONY_VERSION "%CHRONY_VERSION%"
+#define CHRONYD_FEATURES "NTP RTC SCFILTER ASYNCDNS"
+#define FEAT_NTP
+#define FEAT_RTC
+#define FEAT_SCFILTER
+#define FEAT_ASYNCDNS
+
+#define DEFAULT_COMMAND_SOCKET "/todo/chronyd.sock"
+#define DEFAULT_CONF_FILE "/todo/chrony.conf"
+#define DEFAULT_HWCLOCK_FILE ""
+#define DEFAULT_PID_FILE "/todo/chronyd.pid"
+#define DEFAULT_RTC_DEVICE "/dev/rtc"
+#define DEFAULT_USER "root"
+
+#define MAIL_PROGRAM "/todo/sendmail"