From: <abe...@us...> - 2016-12-01 16:09:43
|
Revision: 8003 http://sourceforge.net/p/astlinux/code/8003 Author: abelbeck Date: 2016-12-01 16:09:41 +0000 (Thu, 01 Dec 2016) Log Message: ----------- chrony, new package, replaces 'ntp' as the 'ntpd' service using the chronyd daemon. Web interface tweaks to follow Modified Paths: -------------- branches/1.0/astlinux-ast11.config branches/1.0/astlinux-ast13.config branches/1.0/initrd.config branches/1.0/package/Config.in branches/1.0/package/ntp/Config.in branches/1.0/package/openntpd/Config.in branches/1.0/runnix-iso.config branches/1.0/runnix.config branches/1.0/x86_64-configs/astlinux-ast11.config branches/1.0/x86_64-configs/astlinux-ast13.config branches/1.0/x86_64-configs/initrd.config Added Paths: ----------- branches/1.0/package/chrony/ branches/1.0/package/chrony/Config.in branches/1.0/package/chrony/chrony.mk branches/1.0/package/chrony/ntpd.init Modified: branches/1.0/astlinux-ast11.config =================================================================== --- branches/1.0/astlinux-ast11.config 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/astlinux-ast11.config 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn7947-dirty Configuration -# Fri Nov 11 18:59:27 2016 +# Buildroot astlinux-1.x-svn8002-dirty Configuration +# Thu Dec 1 09:44:30 2016 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -691,6 +691,7 @@ BR2_PACKAGE_BRIDGE=y # BR2_PACKAGE_BWM_NG is not set # BR2_PACKAGE_CAN_UTILS is not set +BR2_PACKAGE_CHRONY=y # BR2_PACKAGE_CTORRENT is not set # BR2_PACKAGE_CUPS is not set BR2_PACKAGE_DARKSTAT=y @@ -749,23 +750,12 @@ # BR2_PACKAGE_NGIRCD is not set BR2_PACKAGE_NGREP=y # BR2_PACKAGE_NMAP is not set -BR2_PACKAGE_NTP=y -BR2_PACKAGE_NTP_SNTP=y -# BR2_PACKAGE_NTP_NTP_KEYGEN is not set -# BR2_PACKAGE_NTP_NTP_WAIT is not set -BR2_PACKAGE_NTP_NTPD=y -# BR2_PACKAGE_NTP_NTPDATE is not set -# BR2_PACKAGE_NTP_NTPDC is not set -BR2_PACKAGE_NTP_NTPQ=y -# BR2_PACKAGE_NTP_NTPTRACE is not set -# BR2_PACKAGE_NTP_TICKADJ is not set BR2_PACKAGE_NUT=y # BR2_PACKAGE_NUT_SERIAL_DRIVERS is not set # BR2_PACKAGE_NUTTCP is not set # BR2_PACKAGE_OLSR is not set BR2_PACKAGE_OPENLDAP=y BR2_PACKAGE_OPENLDAP_SERVER=y -# BR2_PACKAGE_OPENNTPD is not set BR2_PACKAGE_OPENSSH=y BR2_PACKAGE_OPENVPN=y BR2_PACKAGE_OPENVPN_LZO=y Modified: branches/1.0/astlinux-ast13.config =================================================================== --- branches/1.0/astlinux-ast13.config 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/astlinux-ast13.config 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn7947-dirty Configuration -# Fri Nov 11 18:59:28 2016 +# Buildroot astlinux-1.x-svn8002-dirty Configuration +# Thu Dec 1 09:44:30 2016 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -691,6 +691,7 @@ BR2_PACKAGE_BRIDGE=y # BR2_PACKAGE_BWM_NG is not set # BR2_PACKAGE_CAN_UTILS is not set +BR2_PACKAGE_CHRONY=y # BR2_PACKAGE_CTORRENT is not set # BR2_PACKAGE_CUPS is not set BR2_PACKAGE_DARKSTAT=y @@ -749,23 +750,12 @@ # BR2_PACKAGE_NGIRCD is not set BR2_PACKAGE_NGREP=y # BR2_PACKAGE_NMAP is not set -BR2_PACKAGE_NTP=y -BR2_PACKAGE_NTP_SNTP=y -# BR2_PACKAGE_NTP_NTP_KEYGEN is not set -# BR2_PACKAGE_NTP_NTP_WAIT is not set -BR2_PACKAGE_NTP_NTPD=y -# BR2_PACKAGE_NTP_NTPDATE is not set -# BR2_PACKAGE_NTP_NTPDC is not set -BR2_PACKAGE_NTP_NTPQ=y -# BR2_PACKAGE_NTP_NTPTRACE is not set -# BR2_PACKAGE_NTP_TICKADJ is not set BR2_PACKAGE_NUT=y # BR2_PACKAGE_NUT_SERIAL_DRIVERS is not set # BR2_PACKAGE_NUTTCP is not set # BR2_PACKAGE_OLSR is not set BR2_PACKAGE_OPENLDAP=y BR2_PACKAGE_OPENLDAP_SERVER=y -# BR2_PACKAGE_OPENNTPD is not set BR2_PACKAGE_OPENSSH=y BR2_PACKAGE_OPENVPN=y BR2_PACKAGE_OPENVPN_LZO=y Modified: branches/1.0/initrd.config =================================================================== --- branches/1.0/initrd.config 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/initrd.config 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn7947-dirty Configuration -# Fri Nov 11 18:59:29 2016 +# Buildroot astlinux-1.x-svn8002-dirty Configuration +# Thu Dec 1 09:44:30 2016 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -569,6 +569,7 @@ # BR2_PACKAGE_BRIDGE is not set # BR2_PACKAGE_BWM_NG is not set # BR2_PACKAGE_CAN_UTILS is not set +# BR2_PACKAGE_CHRONY is not set # BR2_PACKAGE_CTORRENT is not set # BR2_PACKAGE_CUPS is not set # BR2_PACKAGE_DARKSTAT is not set Modified: branches/1.0/package/Config.in =================================================================== --- branches/1.0/package/Config.in 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/package/Config.in 2016-12-01 16:09:41 UTC (rev 8003) @@ -455,6 +455,7 @@ source "package/bridge-utils/Config.in" source "package/bwm-ng/Config.in" source "package/can-utils/Config.in" +source "package/chrony/Config.in" source "package/ctorrent/Config.in" source "package/cups/Config.in" source "package/darkstat/Config.in" Added: branches/1.0/package/chrony/Config.in =================================================================== --- branches/1.0/package/chrony/Config.in (rev 0) +++ branches/1.0/package/chrony/Config.in 2016-12-01 16:09:41 UTC (rev 8003) @@ -0,0 +1,10 @@ +config BR2_PACKAGE_CHRONY + bool "chrony" + select BR2_PACKAGE_LIBCAP + help + An NTP client and server designed to perform well in a wide range + of conditions. It can synchronize the system clock with NTP servers, + reference clocks, and manual input using wristwatch and keyboard. + + http://chrony.tuxfamily.org/ + Added: branches/1.0/package/chrony/chrony.mk =================================================================== --- branches/1.0/package/chrony/chrony.mk (rev 0) +++ branches/1.0/package/chrony/chrony.mk 2016-12-01 16:09:41 UTC (rev 8003) @@ -0,0 +1,64 @@ +################################################################################ +# +# chrony +# +################################################################################ + +CHRONY_VERSION = 2.4.1 +CHRONY_SITE = http://download.tuxfamily.org/chrony +CHRONY_DEPENDENCIES = libcap + +CHRONY_CONF_OPT = \ + --host-system=Linux \ + --host-release="" \ + --host-machine=$(BR2_ARCH) \ + --prefix=/usr \ + --with-sendmail=/usr/sbin/sendmail \ + --with-user=ntp \ + --disable-ipv6 \ + --disable-phc \ + --without-seccomp \ + --without-tomcrypt + +ifeq ($(BR2_PACKAGE_LIBNSS),y) +CHRONY_DEPENDENCIES += host-pkgconf libnss +else +CHRONY_CONF_OPT += --without-nss +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +CHRONY_DEPENDENCIES += readline +else +CHRONY_CONF_OPT += --disable-readline +endif + +# If pps-tools is available, build it before so the package can use it +# (HAVE_SYS_TIMEPPS_H). +ifeq ($(BR2_PACKAGE_PPS_TOOLS),y) +CHRONY_DEPENDENCIES += pps-tools +else +CHRONY_CONF_OPT += --disable-pps +endif + +define CHRONY_CONFIGURE_CMDS + cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure $(CHRONY_CONF_OPT) +endef + +define CHRONY_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define CHRONY_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install + $(INSTALL) -D -m 755 package/chrony/ntpd.init $(TARGET_DIR)/etc/init.d/ntpd + ln -sf /tmp/etc/chrony.conf $(TARGET_DIR)/etc/chrony.conf +endef + +define CHRONY_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/sbin/chronyd + rm -f $(TARGET_DIR)/usr/bin/chronyc + rm -f $(TARGET_DIR)/etc/init.d/ntpd + rm -f $(TARGET_DIR)/etc/chrony.conf +endef + +$(eval $(call GENTARGETS,package,chrony)) Added: branches/1.0/package/chrony/ntpd.init =================================================================== --- branches/1.0/package/chrony/ntpd.init (rev 0) +++ branches/1.0/package/chrony/ntpd.init 2016-12-01 16:09:41 UTC (rev 8003) @@ -0,0 +1,121 @@ +#!/bin/sh + +. /etc/rc.conf + +PIDFILE="/var/run/chronyd.pid" + +DATA_DIR="/var/lib/ntp" + +gen_chrony_config() +{ + local x IFS + + echo "# Autogenerated. Do not edit. + +driftfile $DATA_DIR/chrony.drift + +allow +makestep 1.0 3 +cmdport 0 +rtconutc +rtcsync" + + if [ -n "$NTPSERVS" ]; then + echo " +# NTP Servers/Pools" + unset IFS + for x in $NTPSERVS; do + if echo "$x" | grep -q '^[a-zA-Z].*\.pool\.'; then + echo "pool $x iburst" + else + echo "server $x iburst" + fi + done + fi + + if [ "$NTPBROADCAST" = "yes" ]; then + echo " +# Broadcast using IPv4 Multicast address +broadcast 50 224.0.1.1" + fi + + echo " +# Undisciplined Local Clock +# When no outside source of synchronized time is available +local stratum 5" +} + +init () { + + if [ ! -d $DATA_DIR ]; then + mkdir -m 0700 -p $DATA_DIR + chown ntp:ntp $DATA_DIR + fi + + if [ -f /mnt/kd/chrony.conf ]; then + ln -sf /mnt/kd/chrony.conf /tmp/etc/chrony.conf + else + if [ -L /tmp/etc/chrony.conf ]; then + rm -f /tmp/etc/chrony.conf + fi + gen_chrony_config > /tmp/etc/chrony.conf + fi +} + +start () { + + if [ -f /etc/chrony.conf ]; then + + # Set the clock (large change) + echo "Setting local time/date..." + if chronyd -q; then + if [ -r /dev/rtc ]; then + hwclock -wu --noadjfile 2>/dev/null + fi + fi + rm -f $PIDFILE + sleep 1 + + # Maintain the clock (small changes) + echo "Starting NTP Daemon (chronyd)..." + chronyd + fi +} + +stop () { + + if [ -f $PIDFILE ]; then + + echo "Stopping NTP Daemon (chronyd)..." + kill $(cat $PIDFILE) >/dev/null 2>&1 + rm -f $PIDFILE + fi +} + +case $1 in + +start) + start + ;; + +stop) + stop + ;; + +init) + init + start + ;; + +restart) + stop + sleep 2 + start + ;; + +*) + echo "Usage: start|stop|restart" + ;; + +esac + Modified: branches/1.0/package/ntp/Config.in =================================================================== --- branches/1.0/package/ntp/Config.in 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/package/ntp/Config.in 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,5 +1,6 @@ config BR2_PACKAGE_NTP bool "ntp" + depends on !BR2_PACKAGE_CHRONY select BR2_PACKAGE_LIBCAP help Network Time Protocol suite/programs. Modified: branches/1.0/package/openntpd/Config.in =================================================================== --- branches/1.0/package/openntpd/Config.in 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/package/openntpd/Config.in 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,5 +1,6 @@ config BR2_PACKAGE_OPENNTPD bool "OpenNTPD" + depends on !BR2_PACKAGE_CHRONY help OpenNTPD is an easy to use implementation of the Network Time Protocol. It provides the ability to sync the local clock Modified: branches/1.0/runnix-iso.config =================================================================== --- branches/1.0/runnix-iso.config 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/runnix-iso.config 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn7947-dirty Configuration -# Fri Nov 11 18:59:32 2016 +# Buildroot astlinux-1.x-svn8002-dirty Configuration +# Thu Dec 1 09:44:31 2016 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -598,6 +598,7 @@ # BR2_PACKAGE_BRIDGE is not set # BR2_PACKAGE_BWM_NG is not set # BR2_PACKAGE_CAN_UTILS is not set +# BR2_PACKAGE_CHRONY is not set # BR2_PACKAGE_CTORRENT is not set # BR2_PACKAGE_CUPS is not set # BR2_PACKAGE_DARKSTAT is not set Modified: branches/1.0/runnix.config =================================================================== --- branches/1.0/runnix.config 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/runnix.config 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn7947-dirty Configuration -# Fri Nov 11 18:59:31 2016 +# Buildroot astlinux-1.x-svn8002-dirty Configuration +# Thu Dec 1 09:44:30 2016 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -599,6 +599,7 @@ # BR2_PACKAGE_BRIDGE is not set # BR2_PACKAGE_BWM_NG is not set # BR2_PACKAGE_CAN_UTILS is not set +# BR2_PACKAGE_CHRONY is not set # BR2_PACKAGE_CTORRENT is not set # BR2_PACKAGE_CUPS is not set # BR2_PACKAGE_DARKSTAT is not set Modified: branches/1.0/x86_64-configs/astlinux-ast11.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast11.config 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/x86_64-configs/astlinux-ast11.config 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn7947-dirty Configuration -# Fri Nov 11 18:59:33 2016 +# Buildroot astlinux-1.x-svn8002-dirty Configuration +# Thu Dec 1 09:44:31 2016 # BR2_HAVE_DOT_CONFIG=y BR2_ARCH_IS_64=y @@ -672,6 +672,7 @@ BR2_PACKAGE_BRIDGE=y # BR2_PACKAGE_BWM_NG is not set # BR2_PACKAGE_CAN_UTILS is not set +BR2_PACKAGE_CHRONY=y # BR2_PACKAGE_CTORRENT is not set # BR2_PACKAGE_CUPS is not set BR2_PACKAGE_DARKSTAT=y @@ -730,23 +731,12 @@ # BR2_PACKAGE_NGIRCD is not set BR2_PACKAGE_NGREP=y # BR2_PACKAGE_NMAP is not set -BR2_PACKAGE_NTP=y -BR2_PACKAGE_NTP_SNTP=y -# BR2_PACKAGE_NTP_NTP_KEYGEN is not set -# BR2_PACKAGE_NTP_NTP_WAIT is not set -BR2_PACKAGE_NTP_NTPD=y -# BR2_PACKAGE_NTP_NTPDATE is not set -# BR2_PACKAGE_NTP_NTPDC is not set -BR2_PACKAGE_NTP_NTPQ=y -# BR2_PACKAGE_NTP_NTPTRACE is not set -# BR2_PACKAGE_NTP_TICKADJ is not set BR2_PACKAGE_NUT=y # BR2_PACKAGE_NUT_SERIAL_DRIVERS is not set # BR2_PACKAGE_NUTTCP is not set # BR2_PACKAGE_OLSR is not set BR2_PACKAGE_OPENLDAP=y BR2_PACKAGE_OPENLDAP_SERVER=y -# BR2_PACKAGE_OPENNTPD is not set BR2_PACKAGE_OPENSSH=y BR2_PACKAGE_OPENVPN=y BR2_PACKAGE_OPENVPN_LZO=y Modified: branches/1.0/x86_64-configs/astlinux-ast13.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast13.config 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/x86_64-configs/astlinux-ast13.config 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn7947-dirty Configuration -# Fri Nov 11 18:59:35 2016 +# Buildroot astlinux-1.x-svn8002-dirty Configuration +# Thu Dec 1 09:44:31 2016 # BR2_HAVE_DOT_CONFIG=y BR2_ARCH_IS_64=y @@ -672,6 +672,7 @@ BR2_PACKAGE_BRIDGE=y # BR2_PACKAGE_BWM_NG is not set # BR2_PACKAGE_CAN_UTILS is not set +BR2_PACKAGE_CHRONY=y # BR2_PACKAGE_CTORRENT is not set # BR2_PACKAGE_CUPS is not set BR2_PACKAGE_DARKSTAT=y @@ -730,23 +731,12 @@ # BR2_PACKAGE_NGIRCD is not set BR2_PACKAGE_NGREP=y # BR2_PACKAGE_NMAP is not set -BR2_PACKAGE_NTP=y -BR2_PACKAGE_NTP_SNTP=y -# BR2_PACKAGE_NTP_NTP_KEYGEN is not set -# BR2_PACKAGE_NTP_NTP_WAIT is not set -BR2_PACKAGE_NTP_NTPD=y -# BR2_PACKAGE_NTP_NTPDATE is not set -# BR2_PACKAGE_NTP_NTPDC is not set -BR2_PACKAGE_NTP_NTPQ=y -# BR2_PACKAGE_NTP_NTPTRACE is not set -# BR2_PACKAGE_NTP_TICKADJ is not set BR2_PACKAGE_NUT=y # BR2_PACKAGE_NUT_SERIAL_DRIVERS is not set # BR2_PACKAGE_NUTTCP is not set # BR2_PACKAGE_OLSR is not set BR2_PACKAGE_OPENLDAP=y BR2_PACKAGE_OPENLDAP_SERVER=y -# BR2_PACKAGE_OPENNTPD is not set BR2_PACKAGE_OPENSSH=y BR2_PACKAGE_OPENVPN=y BR2_PACKAGE_OPENVPN_LZO=y Modified: branches/1.0/x86_64-configs/initrd.config =================================================================== --- branches/1.0/x86_64-configs/initrd.config 2016-11-29 23:41:57 UTC (rev 8002) +++ branches/1.0/x86_64-configs/initrd.config 2016-12-01 16:09:41 UTC (rev 8003) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn7947-dirty Configuration -# Fri Nov 11 18:59:36 2016 +# Buildroot astlinux-1.x-svn8002-dirty Configuration +# Thu Dec 1 09:44:31 2016 # BR2_HAVE_DOT_CONFIG=y BR2_ARCH_IS_64=y @@ -550,6 +550,7 @@ # BR2_PACKAGE_BRIDGE is not set # BR2_PACKAGE_BWM_NG is not set # BR2_PACKAGE_CAN_UTILS is not set +# BR2_PACKAGE_CHRONY is not set # BR2_PACKAGE_CTORRENT is not set # BR2_PACKAGE_CUPS is not set # BR2_PACKAGE_DARKSTAT is not set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |