From 1b753a3c14df48f0bb36d4d9e45d98b8f94e82df Mon Sep 17 00:00:00 2001 From: TIAN Yuanhao Date: Fri, 30 Aug 2024 04:43:19 -0700 Subject: [PATCH] package/chrony: install default config chrony needs a config file to work: Could not open /etc/chrony.conf : No such file or directory Many distros [1][2] use example 2 as the default config, and a few distros (such as freeBSD [3]) use example 3. Example 1 [4] is very brief. Example 2 [5] fully includes example 1 and sets the log directory. Example 3 [6] is almost entirely comments intended to serve as documentation. Therefore, we have chosen to use example 2 as the out of the box configuration in Buildroot. [1]: https://github.com/microsoft/azurelinux/blob/3.0-stable/SPECS/chrony/chrony.spec#L72 [2]: https://github.com/vmware/photon/blob/5.0-Beta/SPECS/chrony/chrony.spec#L33 [3]: https://github.com/FreeBSDDesktop/freebsd-ports/blob/master/net/chrony/Makefile#L93-L94 [4]: https://gitlab.com/chrony/chrony/-/blob/3.5-stable/examples/chrony.conf.example1 [5]: https://gitlab.com/chrony/chrony/-/blob/3.5-stable/examples/chrony.conf.example2#L35 [6]: https://gitlab.com/chrony/chrony/-/blob/3.5-stable/examples/chrony.conf.example3#L30-34 Signed-off-by: TIAN Yuanhao Cc: Peter Korsgaard Signed-off-by: Thomas Petazzoni --- package/chrony/chrony.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/chrony/chrony.mk b/package/chrony/chrony.mk index e7e6931a2a..9ed9dcff56 100644 --- a/package/chrony/chrony.mk +++ b/package/chrony/chrony.mk @@ -71,6 +71,7 @@ endef define CHRONY_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install + $(INSTALL) -D -m 644 $(@D)/examples/chrony.conf.example2 $(TARGET_DIR)/etc/chrony.conf endef define CHRONY_INSTALL_INIT_SYSV