diff options
author | Richard Ellis <rellis@dp100.com> | 2018-12-27 10:04:56 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-12-27 10:04:56 +0700 |
commit | cd9327515e3aaad28ab2992daeb96f628ec04dba (patch) | |
tree | 001339011d10be5660ccc9efb47437b731802d20 /network/chrony | |
parent | e2cfbb6e1cb4f402d04a8ea4ca765c6789e592a7 (diff) |
network/chrony: Updated for version 3.4.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/chrony')
-rw-r--r-- | network/chrony/README | 56 | ||||
-rw-r--r-- | network/chrony/chrony.SlackBuild | 16 | ||||
-rw-r--r-- | network/chrony/chrony.info | 6 | ||||
-rw-r--r-- | network/chrony/rc.chrony | 4 |
4 files changed, 44 insertions, 38 deletions
diff --git a/network/chrony/README b/network/chrony/README index 23bbc1c4ee10d..4d49d75ee5144 100644 --- a/network/chrony/README +++ b/network/chrony/README @@ -1,43 +1,45 @@ -chrony is a versatile implementation of the Network Time Protocol (NTP). It -can synchronise the system clock with NTP servers, reference clocks (e.g. -GPS receiver), and manual input using wristwatch and keyboard. It can also -operate as an NTPv4 (RFC 5905) server and peer to provide a time service to -other computers in the network. +chrony is a versatile implementation of the Network Time Protocol +(NTP). It can synchronise the system clock with NTP servers, reference +clocks (e.g. GPS receiver), and manual input using wristwatch and +keyboard. It can also operate as an NTPv4 (RFC 5905) server and peer +to provide a time service to other computers in the network. It is designed to perform well in a wide range of conditions, including intermittent network connections, heavily congested networks, changing -temperatures (ordinary computer clocks are sensitive to temperature), and -systems that do not run continuously, or run on a virtual machine. +temperatures (ordinary computer clocks are sensitive to temperature), +and systems that do not run continuously, or run on a virtual machine. -Two programs are included in chrony, chronyd is a daemon that is started at -boot time and chronyc is a command-line interface program which can be used -to monitor chronyd's performance and to change various operating parameters -whilst it is running. +Two programs are included in chrony, chronyd is a daemon that is +started at boot time and chronyc is a command-line interface program +which can be used to monitor chronyd's performance and to change +various operating parameters whilst it is running. Note 1: You must have the 'chrony' group and user to run this script: $ groupadd -g 354 chrony $ useradd -u 354 -d /var/lib/chrony -s /bin/false -g chrony chrony -Feel free to use a different uid and gid if desired, but 354 is recommended -to avoid conflicts with other stuff from SlackBuilds.org. +Feel free to use a different uid and gid if desired, but 354 is +recommended to avoid conflicts with other stuff from SlackBuilds.org. Note 2: -If you are upgrading from previous version, where the daemon was running -under 'root' user as opposed to 'chrony' user, you need to ensure correct -permissions for /var/run/chrony directory and files under /var/lib/chrony -directory. +If you are upgrading from previous version, where the daemon was +running under 'root' user as opposed to 'chrony' user, you need to +ensure correct permissions for /var/run/chrony directory and files +under /var/lib/chrony directory. -If possible (i.e. you don't have any precious files there), before starting -the daemon, remove /var/run/chrony directory (cronyd will recreate it) and -remove files under /var/lib/chrony directory (cronyd will recreate them). +If possible (i.e. you don't have any precious files there), before +starting the daemon, remove /var/run/chrony directory (cronyd will +recreate it) and remove files under /var/lib/chrony directory (cronyd +will recreate them). Note 3: -The provided configuration file sets up chrony to operate in the most common -scenario, that is NTP client for synchronising local machine time with the -remote NTP server(s) time (using pool.ntp.org by default). See the man pages -for chronyd and chrony.conf (and the contrib and examples directories) for -more details on possible configuration options. +The provided configuration file sets up chrony to operate in the most +common scenario, that is NTP client for synchronising local machine +time with the remote NTP server(s) time (using pool.ntp.org by +default). See the man pages for chronyd and chrony.conf (and the +contrib and examples directories) for more details on possible +configuration options. Note 4: -The provided /etc/rc.d/rc.chrony script can be used to launch the daemon at -boot and to stop it at shutdown. +The provided /etc/rc.d/rc.chrony script can be used to launch the +daemon at boot and to stop it at shutdown. diff --git a/network/chrony/chrony.SlackBuild b/network/chrony/chrony.SlackBuild index 572a856cece06..92e3c05de345d 100644 --- a/network/chrony/chrony.SlackBuild +++ b/network/chrony/chrony.SlackBuild @@ -23,10 +23,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=chrony -VERSION=${VERSION:-3.2} +VERSION=${VERSION:-3.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +NTP_USER=${NTP_USER:-chrony} +NTP_GROUP=${NTP_GROUP:-chrony} + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -56,9 +59,9 @@ fi set -e -if ! getent group chrony 2>&1 > /dev/null || \ - ! getent passwd chrony 2>&1 > /dev/null; then - echo "You must have a \"chrony\" user and group in order to run this script." +if ! getent group ${NTP_GROUP} 2>&1 > /dev/null || \ + ! getent passwd ${NTP_USER} 2>&1 > /dev/null; then + echo "You must have a \"${NTP_USER}\" user and group in order to run this script." echo "See the included README for a suggested UID/GID." exit 1 fi @@ -85,14 +88,15 @@ CXXFLAGS="$SLKCFLAGS" \ --localstatedir=/var \ --mandir=/usr/man \ --docdir=/usr/doc/$PRGNAM-$VERSION \ - --with-user=chrony + --with-user=${NTP_USER} make make install DESTDIR=$PKG -chown chrony:chrony $PKG/var/lib/chrony +chown ${NTP_USER}:${NTP_GROUP} $PKG/var/lib/chrony install -D -m 0644 $CWD/chrony.conf $PKG/etc/chrony.conf.new install -D -m 0644 $CWD/rc.chrony $PKG/etc/rc.d/rc.chrony.new +sed -i "s%@NTP_USER@%${NTP_USER}%g" $PKG/etc/rc.d/rc.chrony.new find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true diff --git a/network/chrony/chrony.info b/network/chrony/chrony.info index cbcfc276ae998..19b3264d153c7 100644 --- a/network/chrony/chrony.info +++ b/network/chrony/chrony.info @@ -1,8 +1,8 @@ PRGNAM="chrony" -VERSION="3.2" +VERSION="3.4" HOMEPAGE="https://chrony.tuxfamily.org/" -DOWNLOAD="https://download.tuxfamily.org/chrony/chrony-3.2.tar.gz" -MD5SUM="f4c4eb0dc92f35ee4bb7d3dcd8029ecb" +DOWNLOAD="https://download.tuxfamily.org/chrony/chrony-3.4.tar.gz" +MD5SUM="7170e750469c198fc6784047d6f71144" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/network/chrony/rc.chrony b/network/chrony/rc.chrony index d165cb5c72c38..653f774a5da8f 100644 --- a/network/chrony/rc.chrony +++ b/network/chrony/rc.chrony @@ -6,8 +6,8 @@ chronyd_start() { if [ -n "$(pidof chronyd)" ]; then echo "chronyd seems to be already running." else - echo "Starting chronyd: /usr/sbin/chronyd -u chrony" - /usr/sbin/chronyd -u chrony + echo "Starting chronyd: /usr/sbin/chronyd -u @NTP_USER@" + /usr/sbin/chronyd -u @NTP_USER@ fi } |