]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/commitdiff
ntp: Drop package
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 25 Mar 2019 22:47:52 +0000 (22:47 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 25 Mar 2019 22:47:52 +0000 (22:47 +0000)
ntp is not really fit for purpose any more.

It fails to sync time on my systems all the time, is full
of (security) bugs and offers loads of features that we
potentially do not need.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
ntp/ntp.conf [deleted file]
ntp/ntp.cryptopw [deleted file]
ntp/ntp.keys [deleted file]
ntp/ntp.nm [deleted file]
ntp/ntp.step-tickers [deleted file]
ntp/ntpdate-wrapper [deleted file]
ntp/ntpdate.sysconfig [deleted file]
ntp/systemd/ntp-wait.service [deleted file]
ntp/systemd/ntpd.service [deleted file]
ntp/systemd/ntpdate.service [deleted file]

diff --git a/ntp/ntp.conf b/ntp/ntp.conf
deleted file mode 100644 (file)
index baa57b3..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-# For more information about this file, see the man pages
-# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
-
-driftfile VARNTP/drift
-
-# Permit time synchronization with our time source, but do not
-# permit the source to query or modify the service on this system.
-restrict default kod nomodify notrap nopeer noquery
-restrict -6 default kod nomodify notrap nopeer noquery
-
-# Permit all access over the loopback interface.  This could
-# be tightened as well, but to do so would effect some of
-# the administrative functions.
-restrict 127.0.0.1 
-restrict -6 ::1
-
-# Hosts on local network are less restricted.
-#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
-
-# Use public servers from the pool.ntp.org project.
-# Please consider joining the pool (http://www.pool.ntp.org/join.html).
-server 0.VENDORZONE.pool.ntp.org iburst
-server 1.VENDORZONE.pool.ntp.org iburst
-server 2.VENDORZONE.pool.ntp.org iburst
-server 3.VENDORZONE.pool.ntp.org iburst
-
-#broadcast 192.168.1.255 autokey       # broadcast server
-#broadcastclient                       # broadcast client
-#broadcast 224.0.1.1 autokey           # multicast server
-#multicastclient 224.0.1.1             # multicast client
-#manycastserver 239.255.254.254                # manycast server
-#manycastclient 239.255.254.254 autokey # manycast client
-
-# Enable public key cryptography.
-#crypto
-
-includefile ETCNTP/crypto/pw
-
-# Key file containing the keys and key identifiers used when operating
-# with symmetric key cryptography. 
-keys ETCNTP/keys
-
-# Specify the key identifiers which are trusted.
-#trustedkey 4 8 42
-
-# Specify the key identifier to use with the ntpdc utility.
-#requestkey 8
-
-# Specify the key identifier to use with the ntpq utility.
-#controlkey 8
-
-# Enable writing of statistics records.
-#statistics clockstats cryptostats loopstats peerstats
diff --git a/ntp/ntp.cryptopw b/ntp/ntp.cryptopw
deleted file mode 100644 (file)
index b76b0ca..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Specify the password to decrypt files containing private keys and identity
-# parameters.  This is required only if these files have been encrypted.
-#
-#crypto pw apassword
diff --git a/ntp/ntp.keys b/ntp/ntp.keys
deleted file mode 100644 (file)
index 5500a71..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# PLEASE DO NOT USE THE DEFAULT VALUES HERE.
-#
-#65535 M       akey
-#1     M       pass
diff --git a/ntp/ntp.nm b/ntp/ntp.nm
deleted file mode 100644 (file)
index a82920c..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-###############################################################################
-# IPFire.org    - An Open Source Firewall Solution                            #
-# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
-###############################################################################
-
-name       = ntp
-version    = %{ver_major}.8
-ver_major  = 4.2
-release    = 4
-
-groups     = System/Daemons
-url        = http://www.ntp.org/
-license    = (MIT and BSD and BSD with advertising) and GPLv2
-summary    = The NTP daemon and utilities.
-
-description
-       The Network Time Protocol (NTP) is used to synchronize a computer's
-       time with another reference time source. This package includes ntpd
-       (a daemon which continuously adjusts system time) and utilities used
-       to query and configure the ntpd daemon.
-end
-
-source_dl  = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-%{ver_major}/
-
-# The vendor part in the NTP pool address.
-VENDORZONE = %{DISTRO_SNAME}
-
-build
-       requires
-               libcap-devel
-               libedit-devel
-               openssl-devel
-               perl-HTML-Parser
-               pps-tools-devel
-       end
-
-       prepare_cmds
-               # Create ntp user and group.
-               %{create_user}
-       end
-
-       configure_options += \
-               --sysconfdir=%{sysconfdir}/ntp/crypto \
-               --enable-all-clocks \
-               --enable-parse-clocks \
-               --enable-ntp-signd=%{localstatedir}/run/ntp_signd \
-               --without-rpath
-
-       make_install_targets += bindir=%{sbindir}
-
-       install_cmds
-               mkdir -pv %{BUILDROOT}%{mandir}/man{5,8}
-               sed -i "s/sntp\.1/sntp\.8/" %{BUILDROOT}%{mandir}/man1/sntp.1
-               mv -v %{BUILDROOT}%{mandir}/man{1/sntp.1,8/sntp.8}
-               rm -rfv %{BUILDROOT}%{mandir}/man1
-
-               # Fix section numbers.
-               sed -i 's/\(\.TH[a-zA-Z ]*\)[1-9]\(.*\)/\18\2/' \
-                       %{BUILDROOT}%{mandir}/man8/*.8
-
-               mkdir -pv %{BUILDROOT}/%{sysconfdir}/sysconfig
-               mkdir -pv %{BUILDROOT}/%{localstatedir}/{lib/ntp,log/ntpstats}
-               mkdir -pv %{BUILDROOT}%{prefix}/lib
-               touch %{BUILDROOT}/%{localstatedir}/lib/ntp/{drift,sntp-kod}
-
-               sed \
-                       -e "s@VENDORZONE@%{VENDORZONE}@g" \
-                       -e "s@ETCNTP@%{sysconfdir}/ntp@g" \
-                       -e "s@VARNTP@%{localstatedir}/lib/ntp@g" \
-                       < %{DIR_SOURCE}/ntp.conf > %{BUILDROOT}%{sysconfdir}/ntp.conf
-
-               mkdir -pv %{BUILDROOT}%{sysconfdir}/ntp
-               sed -e "s@VENDORZONE@%{VENDORZONE}@g" \
-                       < %{DIR_SOURCE}/ntp.step-tickers > %{BUILDROOT}%{sysconfdir}/ntp/step-tickers
-
-               # Install crypto pw.
-               mkdir -pv %{BUILDROOT}%{sysconfdir}/ntp/crypto
-               install -p -m 600 %{DIR_SOURCE}/ntp.cryptopw \
-                       %{BUILDROOT}%{sysconfdir}/ntp/crypto/pw
-
-               # Install keys.
-               install -p -m 600 %{DIR_SOURCE}/ntp.keys \
-                       %{BUILDROOT}%{sysconfdir}/ntp/keys
-
-               # Install ntpdate wrapper.
-               install -p -m 755 %{DIR_SOURCE}/ntpdate-wrapper\
-                       %{BUILDROOT}%{prefix}/lib/ntpdate-wrapper
-               install -p -m 644 %{DIR_SOURCE}/ntpdate.sysconfig \
-                       %{BUILDROOT}%{sysconfdir}/sysconfig/ntpdate
-
-               mkdir -pv %{unitdir}/ntp-units.d
-               echo "ntpd.service" > %{unitdir}/ntp-units.d/60-ntpd.list
-
-               # Fix ownership.
-               chown -R ntp:ntp %{BUILDROOT}%{sharedstatedir}/ntp
-       end
-end
-
-create_user
-       getent group ntp >/dev/null || groupadd -g 38 ntp || :
-       getent passwd ntp >/dev/null || useradd -u 38 -g 38 -s /sbin/nologin \
-               -M -r -d %{sysconfdir}/ntp ntp || :
-end
-
-packages
-       package %{name}
-               groups += Base
-
-               requires
-                       ntpdate = %{thisver}
-               end
-
-               datafiles
-                       %{localstatedir}/lib/ntp/drift
-               end
-
-               script postin
-                       systemctl daemon-reload >/dev/null 2>&1 || :
-                       systemctl --no-reload enable ntpd.service >/dev/null 2>&1 || :
-               end
-
-               script preun
-                       systemctl --no-reload disable ntpd.service >/dev/null 2>&1 || :
-                       systemctl stop ntpd.service >/dev/null 2>&1 || :
-               end
-
-               script postun
-                       systemctl daemon-reload >/dev/null 2>&1 || :
-               end
-
-               script postup
-                       systemctl daemon-reload >/dev/null 2>&1 || :
-                       systemctl try-restart ntpd.service >/dev/null 2>&1 || :
-               end
-       end
-
-       package ntpdate
-               summary = Utility to set the date and time via NTP.
-
-               description
-                       ntpdate is a program for retrieving the date and time
-                       from NTP servers.
-               end
-
-               files
-                       %{sbindir}/ntpdate
-                       %{mandir}/man8/ntpdate.8*
-               end
-
-               script prein
-                       %{create_user}
-               end
-
-               script postin
-                       systemctl daemon-reload >/dev/null 2>&1 || :
-               end
-
-               script preun
-                       systemctl --no-reload disable ntpdate.service >/dev/null 2>&1 || :
-                       systemctl stop ntpdate.service >/dev/null 2>&1 || :
-               end
-
-               script postun
-                       systemctl daemon-reload >/dev/null 2>&1 || :
-               end
-       end
-
-       package %{name}-devel
-               template DEVEL
-       end
-
-       package %{name}-debuginfo
-               template DEBUGINFO
-       end
-end
diff --git a/ntp/ntp.step-tickers b/ntp/ntp.step-tickers
deleted file mode 100644 (file)
index fae7889..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# List of servers used for initial synchronization.
-
-0.VENDORZONE.pool.ntp.org
diff --git a/ntp/ntpdate-wrapper b/ntp/ntpdate-wrapper
deleted file mode 100755 (executable)
index 5baeab0..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-
-ntpconf=/etc/ntp.conf
-ntpstep=/etc/ntp/step-tickers
-
-[ "$EUID" != "0" ] && exit 4
-[ -x /usr/sbin/ntpdate ] || exit 5
-[ -f /etc/sysconfig/ntpdate ] || exit 6
-. /etc/sysconfig/ntpdate
-
-[ -f $ntpstep ] && tickers=$(sed 's/#.*//' $ntpstep) || tickers=
-
-if ! echo "$tickers" | grep -qi '[a-z0-9]' && [ -f $ntpconf ]; then
-       # the step-tickers file doesn't specify a server,
-       # use servers from ntp.conf instead
-       tickers=$(awk '$1=="peer"||$1=="server"{print $2}' $ntpconf | \
-               grep -Ev '127\.127\.[0-9]+\.[0-9]+')
-fi
-
-if ! echo "$tickers" | grep -qi '[a-z0-9]'; then
-       echo "NTP server not specified in $ntpstep or $ntpconf"
-       exit 6
-fi
-
-[ -z "$RETRIES" ] && RETRIES=2
-retry=0
-while true; do
-       /usr/sbin/ntpdate -U ntp -s -b $OPTIONS $tickers &> /dev/null
-       RETVAL=$?
-       [ $RETVAL -eq 0 ] || [ $retry -ge "$RETRIES" ] && break
-       sleep $[10 * (1 << $retry)]
-       retry=$[$retry + 1]
-done
-
-[ $RETVAL -eq 0 ] && [ "$SYNC_HWCLOCK" = "yes" ] && /sbin/hwclock --systohc
-exit $RETVAL
diff --git a/ntp/ntpdate.sysconfig b/ntp/ntpdate.sysconfig
deleted file mode 100644 (file)
index 2502779..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# Options for ntpdate
-OPTIONS="-p 2"
-
-# Number of retries before giving up
-RETRIES=2
-
-# Set to 'yes' to sync hw clock after successful ntpdate
-SYNC_HWCLOCK=no
diff --git a/ntp/systemd/ntp-wait.service b/ntp/systemd/ntp-wait.service
deleted file mode 100644 (file)
index 8d67e13..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Wait for ntpd to synchronize system clock
-After=ntpd.service
-Requires=ntpd.service
-Before=time-sync.target
-Wants=time-sync.target
-
-[Service]
-Type=oneshot
-ExecStart=/usr/sbin/ntp-wait
-RemainAfterExit=yes
-
-[Install]
-WantedBy=multi-user.target
diff --git a/ntp/systemd/ntpd.service b/ntp/systemd/ntpd.service
deleted file mode 100644 (file)
index 8c33353..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Network Time Service
-After=syslog.target ntpdate.service
-
-[Service]
-Type=forking
-ExecStart=/usr/sbin/ntpd -u ntp:ntp -g
-PrivateTmp=true
-ControlGroup=cpu:/
-
-[Install]
-WantedBy=multi-user.target
diff --git a/ntp/systemd/ntpdate.service b/ntp/systemd/ntpdate.service
deleted file mode 100644 (file)
index 167f088..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Set time via NTP
-After=syslog.target network.target nss-lookup.target
-Before=time-sync.target
-Wants=time-sync.target
-
-[Service]
-Type=oneshot
-ExecStart=/usr/lib/ntpdate-wrapper
-RemainAfterExit=yes
-
-[Install]
-WantedBy=multi-user.target