summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorMorgan Little <morgan.little@windriver.com>2012-10-23 16:20:18 +0000
committerJoe MacDonald <joe.macdonald@windriver.com>2012-10-25 12:16:20 -0400
commit0dbda720a33ab8062a761f59f8fa51ffaeb3c19a (patch)
tree678e22e94e33e2bedcf6f3d96d47190bc0eeb806 /meta-oe
parent55855cd569fbff7182974ca08b1de8435bf0f597 (diff)
downloadmeta-openembedded-0dbda720a33ab8062a761f59f8fa51ffaeb3c19a.tar.gz
ntp: Move from meta-oe to meta-networking
Signed-off-by: Morgan Little <morgan.little@windriver.com>
Diffstat (limited to 'meta-oe')
-rwxr-xr-xmeta-oe/recipes-support/ntp/files/ntp31
-rw-r--r--meta-oe/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch17
-rw-r--r--meta-oe/recipes-support/ntp/files/ntp.conf14
-rwxr-xr-xmeta-oe/recipes-support/ntp/files/ntpd62
-rwxr-xr-xmeta-oe/recipes-support/ntp/files/ntpdate49
-rw-r--r--meta-oe/recipes-support/ntp/files/tickadj.c.patch32
-rw-r--r--meta-oe/recipes-support/ntp/ntp-ssl_4.2.6p3.bb11
-rw-r--r--meta-oe/recipes-support/ntp/ntp.inc35
-rw-r--r--meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb47
9 files changed, 0 insertions, 298 deletions
diff --git a/meta-oe/recipes-support/ntp/files/ntp b/meta-oe/recipes-support/ntp/files/ntp
deleted file mode 100755
index e91a52869..000000000
--- a/meta-oe/recipes-support/ntp/files/ntp
+++ /dev/null
@@ -1,31 +0,0 @@
1#! /bin/sh
2
3FLAGS="defaults 23"
4
5test -f /usr/bin/ntpd || exit 0
6
7case "$1" in
8 start)
9 echo -n "Starting NTP server: ntpd"
10 start-stop-daemon --start --quiet --exec /usr/bin/ntpd
11 echo "."
12 ;;
13 stop)
14 echo -n "Stopping NTP server: ntpd"
15 start-stop-daemon --stop --quiet --exec /usr/bin/ntpd
16 echo "."
17 ;;
18 restart|force-reload)
19 echo -n "Restarting NTP server: ntpd... "
20 start-stop-daemon --stop --quiet --exec /usr/bin/ntpd
21 sleep 2
22 start-stop-daemon --start --quiet --exec /usr/bin/ntpd
23 echo "done."
24 ;;
25 *)
26 echo "Usage: /etc/init.d/ntp {start|stop|restart|force-reload}"
27 exit 1
28 ;;
29esac
30
31exit 0
diff --git a/meta-oe/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch b/meta-oe/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch
deleted file mode 100644
index cb1e2f734..000000000
--- a/meta-oe/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1--- a/include/ntp_syscall.h.orig 2009-05-19 16:44:55.048156467 -0400
2+++ b/include/ntp_syscall.h 2009-05-19 16:46:19.293323686 -0400
3@@ -14,6 +14,14 @@
4 # include <sys/timex.h>
5 #endif
6
7+#if defined(ADJ_NANO) && !defined(MOD_NANO)
8+#define MOD_NANO ADJ_NANO
9+#endif
10+
11+#if defined(ADJ_TAI) && !defined(MOD_TAI)
12+#define MOD_TAI ADJ_TAI
13+#endif
14+
15 #ifndef NTP_SYSCALLS_LIBC
16 #ifdef NTP_SYSCALLS_STD
17 # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
diff --git a/meta-oe/recipes-support/ntp/files/ntp.conf b/meta-oe/recipes-support/ntp/files/ntp.conf
deleted file mode 100644
index bf52440ce..000000000
--- a/meta-oe/recipes-support/ntp/files/ntp.conf
+++ /dev/null
@@ -1,14 +0,0 @@
1# This is the most basic ntp configuration file
2# The driftfile must remain in a place specific to this
3# machine - it records the machine specific clock error
4driftfile /etc/ntp.drift
5# This obtains a random server which will be close
6# (in IP terms) to the machine. Add other servers
7# as required, or change this.
8server pool.ntp.org
9# Using local hardware clock as fallback
10# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
11server 127.127.1.0
12fudge 127.127.1.0 stratum 14
13# Defining a default security setting
14restrict default
diff --git a/meta-oe/recipes-support/ntp/files/ntpd b/meta-oe/recipes-support/ntp/files/ntpd
deleted file mode 100755
index ae50f135d..000000000
--- a/meta-oe/recipes-support/ntp/files/ntpd
+++ /dev/null
@@ -1,62 +0,0 @@
1#! /bin/sh
2#
3# ntpd init.d script for ntpdc from ntp.isc.org
4test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0
5# rcS contains TICKADJ
6test -r /etc/default/rcS && . /etc/default/rcS
7
8# Functions to do individual actions
9settick(){
10 # If TICKADJ is set we *must* adjust it before we start, because the
11 # driftfile relies on the correct setting
12 test -n "$TICKADJ" -a -x /usr/bin/tickadj && {
13 echo -n "Setting tick to $TICKADJ: "
14 /usr/bin/tickadj "$TICKADJ"
15 echo "done"
16 }
17}
18startdaemon(){
19 # The -g option allows ntpd to step the time to correct it just
20 # once. The daemon will exit if the clock drifts too much after
21 # this. If ntpd seems to disappear after a while assume TICKADJ
22 # above is set to a totally incorrect value.
23 echo -n "Starting ntpd: "
24 start-stop-daemon --start -x /usr/bin/ntpd -- -p /var/run/ntp.pid "$@"
25 echo "done"
26}
27stopdaemon(){
28 echo -n "Stopping ntpd: "
29 start-stop-daemon --stop -p /var/run/ntp.pid
30 echo "done"
31}
32
33case "$1" in
34 start)
35 settick
36 startdaemon -g
37 ;;
38 stop)
39 stopdaemon
40 ;;
41 force-reload)
42 stopdaemon
43 settick
44 startdaemon -g
45 ;;
46 restart)
47 # Don't reset the tick here
48 stopdaemon
49 startdaemon -g
50 ;;
51 reload)
52 # Must do this by hand, but don't do -g
53 stopdaemon
54 startdaemon
55 ;;
56 *)
57 echo "Usage: ntpd { start | stop | restart | reload }" >&2
58 exit 1
59 ;;
60esac
61
62exit 0
diff --git a/meta-oe/recipes-support/ntp/files/ntpdate b/meta-oe/recipes-support/ntp/files/ntpdate
deleted file mode 100755
index 784b029ad..000000000
--- a/meta-oe/recipes-support/ntp/files/ntpdate
+++ /dev/null
@@ -1,49 +0,0 @@
1#!/bin/sh
2
3PATH=/sbin:/bin:/usr/bin
4
5test -x /usr/bin/ntpdate || exit 0
6
7if test -f /etc/default/ntpdate ; then
8. /etc/default/ntpdate
9else
10NTPSERVERS="pool.ntp.org"
11fi
12
13test -n "$NTPSERVERS" || exit 0
14
15# This is a heuristic: The idea is that if a static interface is brought
16# up, that is a major event, and we can put in some extra effort to fix
17# the system time. Feel free to change this, especially if you regularly
18# bring up new network interfaces.
19if [ "$METHOD" = static ]; then
20 OPTS="-b"
21fi
22
23if [ "$METHOD" = loopback ]; then
24 exit 0
25fi
26
27(
28
29LOCKFILE=/var/lock/ntpdate
30
31# Avoid running more than one at a time
32if [ -x /usr/bin/lockfile-create ]; then
33 lockfile-create $LOCKFILE
34 lockfile-touch $LOCKFILE &
35 LOCKTOUCHPID="$!"
36fi
37
38if /usr/bin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then
39 if [ "$UPDATE_HWCLOCK" = "yes" ]; then
40 hwclock --systohc || :
41 fi
42fi
43
44if [ -x /usr/bin/lockfile-create ] ; then
45 kill $LOCKTOUCHPID
46 lockfile-remove $LOCKFILE
47fi
48
49) &
diff --git a/meta-oe/recipes-support/ntp/files/tickadj.c.patch b/meta-oe/recipes-support/ntp/files/tickadj.c.patch
deleted file mode 100644
index 9ef9de9e1..000000000
--- a/meta-oe/recipes-support/ntp/files/tickadj.c.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1Index: ntp-4.2.2p3-r0/ntp-4.2.2p3/util/tickadj.c
2===================================================================
3--- ntp-4.2.2p3/util/tickadj.c 2004-02-25 06:58:33.000000000 +0100
4+++ ntp-4.2.2p3/util/tickadj.c 2007-07-07 01:00:54.000000000 +0200
5@@ -21,7 +21,8 @@
6 # include <unistd.h>
7 #endif /* HAVE_UNISTD_H */
8
9-#ifdef HAVE___ADJTIMEX /* Linux */
10+/* proper handling here has been moved to upstream ntp bugzilla */
11+#ifdef linux
12
13 #include <sys/timex.h>
14 struct timex txc;
15@@ -91,7 +92,7 @@
16 }
17
18 if (!errflg) {
19- if (__adjtimex(&txc) < 0)
20+ if (adjtimex(&txc) < 0)
21 perror("adjtimex");
22 else if (!quiet)
23 printf("tick = %ld\ntick_adj = %d\n",
24@@ -146,7 +147,7 @@
25 #endif
26 }
27
28- if (__adjtimex(&txc) < 0)
29+ if (adjtimex(&txc) < 0)
30 {
31 perror("adjtimex");
32 }
diff --git a/meta-oe/recipes-support/ntp/ntp-ssl_4.2.6p3.bb b/meta-oe/recipes-support/ntp/ntp-ssl_4.2.6p3.bb
deleted file mode 100644
index a15899079..000000000
--- a/meta-oe/recipes-support/ntp/ntp-ssl_4.2.6p3.bb
+++ /dev/null
@@ -1,11 +0,0 @@
1require ntp_${PV}.bb
2DEPENDS = "openssl"
3
4S = "${WORKDIR}/ntp-${PV}"
5
6EXTRA_OECONF = "--with-openssl-libdir=${STAGING_LIBDIR} \
7 --with-openssl-incdir=${STAGING_INCDIR}/openssl"
8
9
10SRC_URI[md5sum] = "98e16c7aa4ecd4c004b51bff18962e95"
11SRC_URI[sha256sum] = "9f4a5271a285d390c9225e3ea28f70049ea377d30fc6de4659007cfff278671a"
diff --git a/meta-oe/recipes-support/ntp/ntp.inc b/meta-oe/recipes-support/ntp/ntp.inc
deleted file mode 100644
index 1d740f00f..000000000
--- a/meta-oe/recipes-support/ntp/ntp.inc
+++ /dev/null
@@ -1,35 +0,0 @@
1DESCRIPTION = "The Network Time Protocol (NTP) is used to \
2synchronize the time of a computer client or server to \
3another server or reference time source, such as a radio \
4or satellite receiver or modem."
5HOMEPAGE = "http://ntp.isc.org/bin/view/Main/WebHome"
6SECTION = "console/network"
7LICENSE = "ntp"
8LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670"
9RSUGGESTS_${PN} = "iana-etc"
10
11SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
12 file://ipv6only-workaround.patch \
13 file://ntpd \
14 file://ntp.conf \
15 file://ntpdate \
16 file://ntpd.service \
17"
18
19inherit autotools update-rc.d
20
21INITSCRIPT_NAME = "ntpd"
22# No dependencies, so just go in at the standard level (20)
23INITSCRIPT_PARAMS = "defaults"
24
25# The ac_cv_header_readline_history is to stop ntpdc depending on either
26# readline or curses
27EXTRA_OECONF = "--without-openssl --without-crypto ac_cv_header_readline_history_h=no"
28CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
29
30PACKAGES += "ntpdate ${PN}-bin ${PN}-tickadj ${PN}-utils"
31# NOTE: you don't need ntpdate, use "ntpd -q -g -x"
32# or the ntpdate systemd service
33
34# This should use rc.update
35FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/init.d/ntpdate"
diff --git a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb
deleted file mode 100644
index 89a272a36..000000000
--- a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb
+++ /dev/null
@@ -1,47 +0,0 @@
1require ntp.inc
2
3PR = "r6"
4
5SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
6 file://tickadj.c.patch \
7 file://ntp-4.2.4_p6-nano.patch \
8 file://ntpd \
9 file://ntp.conf \
10 file://ntpdate \
11"
12
13SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2"
14SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e"
15
16EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd"
17
18do_install_append() {
19 install -d ${D}/${sysconfdir}/init.d
20 install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir}
21 install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d
22 install -d ${D}/${sysconfdir}/network/if-up.d
23 install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
24}
25
26FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace"
27FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd"
28FILES_${PN}-tickadj = "${bindir}/tickadj"
29FILES_ntp-utils = "${bindir}/*"
30FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate"
31
32# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
33# with wonky clocks (e.g. OpenSlug)
34RDEPENDS_${PN} = "${PN}-tickadj"
35
36pkg_postinst_ntpdate() {
37if test "x$D" != "x"; then
38 exit 1
39else
40 if ! grep -q -s ntpdate /var/spool/cron/root; then
41 echo "adding crontab"
42 test -d /var/spool/cron || mkdir -p /var/spool/cron
43 echo "30 * * * * /usr/bin/ntpdate -b -s -u pool.ntp.org" >> /var/spool/cron/root
44 fi
45fi
46}
47