diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-12-25 22:29:03 +0000 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2014-12-29 14:48:20 -0500 |
commit | fb6b87bf67a2dbe6b50143eb8429c736f61fea2e (patch) | |
tree | ef66373b40f575e19f7f2904c0b166901d44758c /meta-networking/recipes-support/ntp | |
parent | 3e0c561ea7a50a15f077f1a51c0cdc7a958a1c86 (diff) | |
download | meta-openembedded-fb6b87bf67a2dbe6b50143eb8429c736f61fea2e.tar.gz |
ntp: upgrade to 4.2.8
* Upgrade to 4.2.8 which fixes several security issues, including
CVE-2014-9293, CVE-2014-9294, CVE-2014-9295, and CVE-2014-9296. For
more details please see:
https://ics-cert.us-cert.gov/advisories/ICSA-14-353-01A
* LIC_FILES_CHKSUM changed due to a number of copyright year and patch
list changes; nothing material about the license text changed.
* This version moves a number of binaries from sbindir to bindir;
there's supposed to be a configure option --with-locfile=legacy to use
the old layout but it does not seem to work. I guess we'll just have
to live with the change.
* Drop patches which are no longer applicable.
* Merge inc file into recipe; there were too many changes required to
the inc file in this version and it's unlikely it was much use split
out in any case.
* Move remaining files in files/ to ntp/
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-support/ntp')
11 files changed, 191 insertions, 227 deletions
diff --git a/meta-networking/recipes-support/ntp/files/CVE-2013-5211.patch b/meta-networking/recipes-support/ntp/files/CVE-2013-5211.patch deleted file mode 100644 index ddcb044e6..000000000 --- a/meta-networking/recipes-support/ntp/files/CVE-2013-5211.patch +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | ntp: fix CVE-2013-5211 | ||
2 | |||
3 | Upstream-status: Backport | ||
4 | |||
5 | The monlist feature in ntp_request.c in ntpd in NTP before | ||
6 | 4.2.7p26 allows remote attackers to cause a denial of service | ||
7 | (traffic amplification) via forged (1) REQ_MON_GETLIST or | ||
8 | (2) REQ_MON_GETLIST_1 requests, as exploited in the wild | ||
9 | in December 2013. | ||
10 | |||
11 | Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com> | ||
12 | |||
13 | --- a/ntpd/ntp_request.c | ||
14 | +++ b/ntpd/ntp_request.c | ||
15 | @@ -1912,44 +1912,11 @@ mon_getlist_0( | ||
16 | struct req_pkt *inpkt | ||
17 | ) | ||
18 | { | ||
19 | - register struct info_monitor *im; | ||
20 | - register struct mon_data *md; | ||
21 | - extern struct mon_data mon_mru_list; | ||
22 | - extern int mon_enabled; | ||
23 | - | ||
24 | #ifdef DEBUG | ||
25 | if (debug > 2) | ||
26 | printf("wants monitor 0 list\n"); | ||
27 | #endif | ||
28 | - if (!mon_enabled) { | ||
29 | - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); | ||
30 | - return; | ||
31 | - } | ||
32 | - im = (struct info_monitor *)prepare_pkt(srcadr, inter, inpkt, | ||
33 | - v6sizeof(struct info_monitor)); | ||
34 | - for (md = mon_mru_list.mru_next; md != &mon_mru_list && im != 0; | ||
35 | - md = md->mru_next) { | ||
36 | - im->lasttime = htonl((u_int32)((current_time - | ||
37 | - md->firsttime) / md->count)); | ||
38 | - im->firsttime = htonl((u_int32)(current_time - md->lasttime)); | ||
39 | - im->restr = htonl((u_int32)md->flags); | ||
40 | - im->count = htonl((u_int32)(md->count)); | ||
41 | - if (IS_IPV6(&md->rmtadr)) { | ||
42 | - if (!client_v6_capable) | ||
43 | - continue; | ||
44 | - im->addr6 = SOCK_ADDR6(&md->rmtadr); | ||
45 | - im->v6_flag = 1; | ||
46 | - } else { | ||
47 | - im->addr = NSRCADR(&md->rmtadr); | ||
48 | - if (client_v6_capable) | ||
49 | - im->v6_flag = 0; | ||
50 | - } | ||
51 | - im->port = md->rmtport; | ||
52 | - im->mode = md->mode; | ||
53 | - im->version = md->version; | ||
54 | - im = (struct info_monitor *)more_pkt(); | ||
55 | - } | ||
56 | - flush_pkt(); | ||
57 | + req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); | ||
58 | } | ||
59 | |||
60 | /* | ||
61 | @@ -1962,50 +1929,7 @@ mon_getlist_1( | ||
62 | struct req_pkt *inpkt | ||
63 | ) | ||
64 | { | ||
65 | - register struct info_monitor_1 *im; | ||
66 | - register struct mon_data *md; | ||
67 | - extern struct mon_data mon_mru_list; | ||
68 | - extern int mon_enabled; | ||
69 | - | ||
70 | - if (!mon_enabled) { | ||
71 | - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); | ||
72 | - return; | ||
73 | - } | ||
74 | - im = (struct info_monitor_1 *)prepare_pkt(srcadr, inter, inpkt, | ||
75 | - v6sizeof(struct info_monitor_1)); | ||
76 | - for (md = mon_mru_list.mru_next; md != &mon_mru_list && im != 0; | ||
77 | - md = md->mru_next) { | ||
78 | - im->lasttime = htonl((u_int32)((current_time - | ||
79 | - md->firsttime) / md->count)); | ||
80 | - im->firsttime = htonl((u_int32)(current_time - md->lasttime)); | ||
81 | - im->restr = htonl((u_int32)md->flags); | ||
82 | - im->count = htonl((u_int32)md->count); | ||
83 | - if (IS_IPV6(&md->rmtadr)) { | ||
84 | - if (!client_v6_capable) | ||
85 | - continue; | ||
86 | - im->addr6 = SOCK_ADDR6(&md->rmtadr); | ||
87 | - im->v6_flag = 1; | ||
88 | - im->daddr6 = SOCK_ADDR6(&md->interface->sin); | ||
89 | - } else { | ||
90 | - im->addr = NSRCADR(&md->rmtadr); | ||
91 | - if (client_v6_capable) | ||
92 | - im->v6_flag = 0; | ||
93 | - if (MDF_BCAST == md->cast_flags) | ||
94 | - im->daddr = NSRCADR(&md->interface->bcast); | ||
95 | - else if (md->cast_flags) { | ||
96 | - im->daddr = NSRCADR(&md->interface->sin); | ||
97 | - if (!im->daddr) | ||
98 | - im->daddr = NSRCADR(&md->interface->bcast); | ||
99 | - } else | ||
100 | - im->daddr = 4; | ||
101 | - } | ||
102 | - im->flags = htonl(md->cast_flags); | ||
103 | - im->port = md->rmtport; | ||
104 | - im->mode = md->mode; | ||
105 | - im->version = md->version; | ||
106 | - im = (struct info_monitor_1 *)more_pkt(); | ||
107 | - } | ||
108 | - flush_pkt(); | ||
109 | + req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); | ||
110 | } | ||
111 | |||
112 | /* | ||
diff --git a/meta-networking/recipes-support/ntp/files/openssl-check.patch b/meta-networking/recipes-support/ntp/files/openssl-check.patch deleted file mode 100644 index 8b4a6733c..000000000 --- a/meta-networking/recipes-support/ntp/files/openssl-check.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | Hack OpenSSL check to work when libssl and libcrypto aren't in same dir | ||
2 | |||
3 | Upstream-Status: Inappropriate [config] | ||
4 | |||
5 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
6 | --- | ||
7 | configure | 4 ++-- | ||
8 | m4/ntp_openssl.m4 | 4 ++-- | ||
9 | sntp/configure | 4 ++-- | ||
10 | 3 files changed, 6 insertions(+), 6 deletions(-) | ||
11 | |||
12 | diff --git a/configure b/configure | ||
13 | index aae2c01..6a3c15e 100755 | ||
14 | --- a/configure | ||
15 | +++ b/configure | ||
16 | @@ -22868,8 +22868,8 @@ case "$ans" in | ||
17 | test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break | ||
18 | ;; | ||
19 | *) | ||
20 | - test -f $i/libcrypto.so -a -f $i/libssl.so && break | ||
21 | - test -f $i/libcrypto.a -a -f $i/libssl.a && break | ||
22 | + test -f $i/libssl.so && break | ||
23 | + test -f $i/libssl.a && break | ||
24 | ;; | ||
25 | esac | ||
26 | done | ||
27 | diff --git a/m4/ntp_openssl.m4 b/m4/ntp_openssl.m4 | ||
28 | index 7d9f477..67bdd55 100644 | ||
29 | --- a/m4/ntp_openssl.m4 | ||
30 | +++ b/m4/ntp_openssl.m4 | ||
31 | @@ -41,8 +41,8 @@ case "$ans" in | ||
32 | test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break | ||
33 | ;; | ||
34 | *) | ||
35 | - test -f $i/libcrypto.so -a -f $i/libssl.so && break | ||
36 | - test -f $i/libcrypto.a -a -f $i/libssl.a && break | ||
37 | + test -f $i/libssl.so && break | ||
38 | + test -f $i/libssl.a && break | ||
39 | ;; | ||
40 | esac | ||
41 | done | ||
42 | diff --git a/sntp/configure b/sntp/configure | ||
43 | index 7782c29..55e82d9 100755 | ||
44 | --- a/sntp/configure | ||
45 | +++ b/sntp/configure | ||
46 | @@ -14810,8 +14810,8 @@ case "$ans" in | ||
47 | test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break | ||
48 | ;; | ||
49 | *) | ||
50 | - test -f $i/libcrypto.so -a -f $i/libssl.so && break | ||
51 | - test -f $i/libcrypto.a -a -f $i/libssl.a && break | ||
52 | + test -f $i/libssl.so && break | ||
53 | + test -f $i/libssl.a && break | ||
54 | ;; | ||
55 | esac | ||
56 | done | ||
57 | -- | ||
58 | 1.7.1 | ||
59 | |||
diff --git a/meta-networking/recipes-support/ntp/files/tickadj.c.patch b/meta-networking/recipes-support/ntp/files/tickadj.c.patch deleted file mode 100644 index 9ef9de9e1..000000000 --- a/meta-networking/recipes-support/ntp/files/tickadj.c.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | Index: 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-networking/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch b/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch index cb1e2f734..cb1e2f734 100644 --- a/meta-networking/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch +++ b/meta-networking/recipes-support/ntp/ntp/ntp-4.2.4_p6-nano.patch | |||
diff --git a/meta-networking/recipes-support/ntp/ntp/ntp-4.2.8-ntp-keygen-no-openssl.patch b/meta-networking/recipes-support/ntp/ntp/ntp-4.2.8-ntp-keygen-no-openssl.patch new file mode 100644 index 000000000..9b9af63ca --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/ntp-4.2.8-ntp-keygen-no-openssl.patch | |||
@@ -0,0 +1,168 @@ | |||
1 | Fix ntp-keygen build without OpenSSL | ||
2 | |||
3 | Patch borrowed from Gentoo, originally from upstream | ||
4 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
5 | Upstream-Status: Backport | ||
6 | |||
7 | Upstream commit: | ||
8 | http://bk1.ntp.org/ntp-stable/?PAGE=patch&REV=5497b345z5MNTuNvJWuqPSje25NQTg | ||
9 | Gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=533238 | ||
10 | |||
11 | Signed-off-by: Markos Chandras <hwoarang@gentoo.org> | ||
12 | Index: ntp-4.2.8/Makefile.am | ||
13 | =================================================================== | ||
14 | --- ntp-4.2.8.orig/Makefile.am | ||
15 | +++ ntp-4.2.8/Makefile.am | ||
16 | @@ -2,7 +2,10 @@ ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/lib | ||
17 | |||
18 | NULL = | ||
19 | |||
20 | +# moved sntp first to get libtool and libevent built. | ||
21 | + | ||
22 | SUBDIRS = \ | ||
23 | + sntp \ | ||
24 | scripts \ | ||
25 | include \ | ||
26 | libntp \ | ||
27 | @@ -17,7 +20,6 @@ SUBDIRS = \ | ||
28 | clockstuff \ | ||
29 | kernel \ | ||
30 | util \ | ||
31 | - sntp \ | ||
32 | tests \ | ||
33 | $(NULL) | ||
34 | |||
35 | @@ -64,7 +66,6 @@ BUILT_SOURCES = \ | ||
36 | .gcc-warning \ | ||
37 | 'libtool \ | ||
38 | html/.datecheck \ | ||
39 | - sntp/built-sources-only \ | ||
40 | $(srcdir)/COPYRIGHT \ | ||
41 | $(srcdir)/.checkChangeLog \ | ||
42 | $(NULL) | ||
43 | Index: ntp-4.2.8/configure.ac | ||
44 | =================================================================== | ||
45 | --- ntp-4.2.8.orig/configure.ac | ||
46 | +++ ntp-4.2.8/configure.ac | ||
47 | @@ -102,7 +102,7 @@ esac | ||
48 | enable_nls=no | ||
49 | LIBOPTS_CHECK_NOBUILD([sntp/libopts]) | ||
50 | |||
51 | -NTP_ENABLE_LOCAL_LIBEVENT | ||
52 | +NTP_LIBEVENT_CHECK_NOBUILD([2], [sntp/libevent]) | ||
53 | |||
54 | NTP_LIBNTP | ||
55 | |||
56 | @@ -771,6 +771,10 @@ esac | ||
57 | |||
58 | #### | ||
59 | |||
60 | +AC_CHECK_FUNCS([arc4random_buf]) | ||
61 | + | ||
62 | +#### | ||
63 | + | ||
64 | saved_LIBS="$LIBS" | ||
65 | LIBS="$LIBS $LDADD_LIBNTP" | ||
66 | AC_CHECK_FUNCS([daemon]) | ||
67 | Index: ntp-4.2.8/libntp/ntp_crypto_rnd.c | ||
68 | =================================================================== | ||
69 | --- ntp-4.2.8.orig/libntp/ntp_crypto_rnd.c | ||
70 | +++ ntp-4.2.8/libntp/ntp_crypto_rnd.c | ||
71 | @@ -24,6 +24,21 @@ | ||
72 | int crypto_rand_init = 0; | ||
73 | #endif | ||
74 | |||
75 | +#ifndef HAVE_ARC4RANDOM_BUF | ||
76 | +static void | ||
77 | +arc4random_buf(void *buf, size_t nbytes); | ||
78 | + | ||
79 | +void | ||
80 | +evutil_secure_rng_get_bytes(void *buf, size_t nbytes); | ||
81 | + | ||
82 | +static void | ||
83 | +arc4random_buf(void *buf, size_t nbytes) | ||
84 | +{ | ||
85 | + evutil_secure_rng_get_bytes(buf, nbytes); | ||
86 | + return; | ||
87 | +} | ||
88 | +#endif | ||
89 | + | ||
90 | /* | ||
91 | * As of late 2014, here's how we plan to provide cryptographic-quality | ||
92 | * random numbers: | ||
93 | Index: ntp-4.2.8/sntp/configure.ac | ||
94 | =================================================================== | ||
95 | --- ntp-4.2.8.orig/sntp/configure.ac | ||
96 | +++ ntp-4.2.8/sntp/configure.ac | ||
97 | @@ -97,11 +97,14 @@ esac | ||
98 | enable_nls=no | ||
99 | LIBOPTS_CHECK | ||
100 | |||
101 | -AM_COND_IF( | ||
102 | - [BUILD_SNTP], | ||
103 | - [NTP_LIBEVENT_CHECK], | ||
104 | - [NTP_LIBEVENT_CHECK_NOBUILD] | ||
105 | -) | ||
106 | +# From when we only used libevent for sntp: | ||
107 | +#AM_COND_IF( | ||
108 | +# [BUILD_SNTP], | ||
109 | +# [NTP_LIBEVENT_CHECK], | ||
110 | +# [NTP_LIBEVENT_CHECK_NOBUILD] | ||
111 | +#) | ||
112 | + | ||
113 | +NTP_LIBEVENT_CHECK([2]) | ||
114 | |||
115 | # Checks for libraries. | ||
116 | |||
117 | Index: ntp-4.2.8/sntp/m4/ntp_libevent.m4 | ||
118 | =================================================================== | ||
119 | --- ntp-4.2.8.orig/sntp/m4/ntp_libevent.m4 | ||
120 | +++ ntp-4.2.8/sntp/m4/ntp_libevent.m4 | ||
121 | @@ -1,4 +1,25 @@ | ||
122 | -dnl NTP_ENABLE_LOCAL_LIBEVENT -*- Autoconf -*- | ||
123 | +# SYNOPSIS -*- Autoconf -*- | ||
124 | +# | ||
125 | +# NTP_ENABLE_LOCAL_LIBEVENT | ||
126 | +# NTP_LIBEVENT_CHECK([MINVERSION [, DIR]]) | ||
127 | +# NTP_LIBEVENT_CHECK_NOBUILD([MINVERSION [, DIR]]) | ||
128 | +# | ||
129 | +# DESCRIPTION | ||
130 | +# | ||
131 | +# AUTHOR | ||
132 | +# | ||
133 | +# Harlan Stenn | ||
134 | +# | ||
135 | +# LICENSE | ||
136 | +# | ||
137 | +# This file is Copyright (c) 2014 Network Time Foundation | ||
138 | +# | ||
139 | +# Copying and distribution of this file, with or without modification, are | ||
140 | +# permitted in any medium without royalty provided the copyright notice, | ||
141 | +# author attribution and this notice are preserved. This file is offered | ||
142 | +# as-is, without any warranty. | ||
143 | + | ||
144 | +dnl NTP_ENABLE_LOCAL_LIBEVENT | ||
145 | dnl | ||
146 | dnl Provide only the --enable-local-libevent command-line option. | ||
147 | dnl | ||
148 | @@ -29,7 +50,7 @@ dnl If NOBUILD is provided as the 3rd ar | ||
149 | dnl but DO NOT invoke DIR/configure if we are going to use our bundled | ||
150 | dnl version. This may be the case for nested packages. | ||
151 | dnl | ||
152 | -dnl provide --enable-local-libevent . | ||
153 | +dnl provides --enable-local-libevent . | ||
154 | dnl | ||
155 | dnl Examples: | ||
156 | dnl | ||
157 | Index: ntp-4.2.8/util/Makefile.am | ||
158 | =================================================================== | ||
159 | --- ntp-4.2.8.orig/util/Makefile.am | ||
160 | +++ ntp-4.2.8/util/Makefile.am | ||
161 | @@ -19,6 +19,7 @@ AM_LDFLAGS = $(LDFLAGS_NTP) | ||
162 | LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) | ||
163 | tg2_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) | ||
164 | ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a | ||
165 | +ntp_keygen_LDADD += $(LDADD_LIBEVENT) | ||
166 | ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM) | ||
167 | ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h | ||
168 | |||
diff --git a/meta-networking/recipes-support/ntp/files/ntp.conf b/meta-networking/recipes-support/ntp/ntp/ntp.conf index 676e18645..676e18645 100644 --- a/meta-networking/recipes-support/ntp/files/ntp.conf +++ b/meta-networking/recipes-support/ntp/ntp/ntp.conf | |||
diff --git a/meta-networking/recipes-support/ntp/files/ntpd b/meta-networking/recipes-support/ntp/ntp/ntpd index d1b9c4907..d1b9c4907 100755 --- a/meta-networking/recipes-support/ntp/files/ntpd +++ b/meta-networking/recipes-support/ntp/ntp/ntpd | |||
diff --git a/meta-networking/recipes-support/ntp/files/ntpdate b/meta-networking/recipes-support/ntp/ntp/ntpdate index 17b64d133..17b64d133 100755 --- a/meta-networking/recipes-support/ntp/files/ntpdate +++ b/meta-networking/recipes-support/ntp/ntp/ntpdate | |||
diff --git a/meta-networking/recipes-support/ntp/files/ntpdate.default b/meta-networking/recipes-support/ntp/ntp/ntpdate.default index 486b6e07d..486b6e07d 100644 --- a/meta-networking/recipes-support/ntp/files/ntpdate.default +++ b/meta-networking/recipes-support/ntp/ntp/ntpdate.default | |||
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb b/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb deleted file mode 100644 index 588a1b03c..000000000 --- a/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | require ntp.inc | ||
2 | |||
3 | PR = "${INC_PR}.0" | ||
4 | |||
5 | SRC_URI[md5sum] = "00df80a84ec9528fcfb09498075525bc" | ||
6 | SRC_URI[sha256sum] = "d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c" | ||
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp_4.2.8.bb index 142f904ad..7e1b1c152 100644 --- a/meta-networking/recipes-support/ntp/ntp.inc +++ b/meta-networking/recipes-support/ntp/ntp_4.2.8.bb | |||
@@ -6,16 +6,12 @@ or satellite receiver or modem." | |||
6 | HOMEPAGE = "http://support.ntp.org" | 6 | HOMEPAGE = "http://support.ntp.org" |
7 | SECTION = "console/network" | 7 | SECTION = "console/network" |
8 | LICENSE = "NTP" | 8 | LICENSE = "NTP" |
9 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670" | 9 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=ebe123f74017224947c78d472407c10f" |
10 | 10 | ||
11 | DEPENDS = "pps-tools" | 11 | DEPENDS = "pps-tools libevent" |
12 | |||
13 | INC_PR = "r6" | ||
14 | 12 | ||
15 | SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \ | 13 | SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \ |
16 | file://tickadj.c.patch \ | ||
17 | file://ntp-4.2.4_p6-nano.patch \ | 14 | file://ntp-4.2.4_p6-nano.patch \ |
18 | file://openssl-check.patch \ | ||
19 | file://ntpd \ | 15 | file://ntpd \ |
20 | file://ntp.conf \ | 16 | file://ntp.conf \ |
21 | file://ntpdate \ | 17 | file://ntpdate \ |
@@ -25,14 +21,21 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.g | |||
25 | file://sntp.service \ | 21 | file://sntp.service \ |
26 | file://sntp \ | 22 | file://sntp \ |
27 | file://ntpd.list \ | 23 | file://ntpd.list \ |
28 | file://CVE-2013-5211.patch \ | 24 | file://ntp-4.2.8-ntp-keygen-no-openssl.patch \ |
29 | " | 25 | " |
30 | 26 | ||
31 | inherit autotools update-rc.d useradd systemd | 27 | SRC_URI[md5sum] = "6972a626be6150db8cfbd0b63d8719e7" |
28 | SRC_URI[sha256sum] = "2e920df8b6a5a410567a73767fa458c00c7f0acec3213e69ed0134414a50d8ee" | ||
29 | |||
30 | inherit autotools update-rc.d useradd systemd pkgconfig | ||
32 | 31 | ||
33 | # The ac_cv_header_readline_history is to stop ntpdc depending on either | 32 | # The ac_cv_header_readline_history is to stop ntpdc depending on either |
34 | # readline or curses | 33 | # readline or curses |
35 | EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no --with-binsubdir=sbin" | 34 | EXTRA_OECONF += "--with-net-snmp-config=no \ |
35 | --without-ntpsnmpd \ | ||
36 | ac_cv_header_readline_history_h=no \ | ||
37 | --with-yielding_select=yes \ | ||
38 | " | ||
36 | CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" | 39 | CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" |
37 | 40 | ||
38 | USERADD_PACKAGES = "${PN}" | 41 | USERADD_PACKAGES = "${PN}" |
@@ -68,10 +71,10 @@ do_install_append() { | |||
68 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | 71 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync |
69 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | 72 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync |
70 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync | 73 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync |
71 | sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace | 74 | sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${bindir}/ntptrace |
72 | sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace | 75 | sed -i '/use/i use warnings;' ${D}${bindir}/ntptrace |
73 | sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait | 76 | sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${bindir}/ntp-wait |
74 | sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait | 77 | sed -i '/use/i use warnings;' ${D}${bindir}/ntp-wait |
75 | 78 | ||
76 | install -d ${D}/${sysconfdir}/default | 79 | install -d ${D}/${sysconfdir}/default |
77 | install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate | 80 | install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate |
@@ -87,6 +90,8 @@ do_install_append() { | |||
87 | 90 | ||
88 | install -d ${D}${systemd_unitdir}/ntp-units.d | 91 | install -d ${D}${systemd_unitdir}/ntp-units.d |
89 | install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list | 92 | install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list |
93 | |||
94 | rmdir ${D}${sbindir} | ||
90 | } | 95 | } |
91 | 96 | ||
92 | PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils" | 97 | PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils" |
@@ -115,19 +120,19 @@ RCONFLICTS_ntpdate += "ntpdate-systemd" | |||
115 | 120 | ||
116 | RSUGGESTS_${PN} = "iana-etc" | 121 | RSUGGESTS_${PN} = "iana-etc" |
117 | 122 | ||
118 | FILES_${PN} = "${sbindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \ | 123 | FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \ |
119 | ${NTP_USER_HOME} \ | 124 | ${NTP_USER_HOME} \ |
120 | ${systemd_unitdir}/ntp-units.d/60-ntpd.list \ | 125 | ${systemd_unitdir}/ntp-units.d/60-ntpd.list \ |
121 | " | 126 | " |
122 | FILES_${PN}-tickadj = "${sbindir}/tickadj" | 127 | FILES_${PN}-tickadj = "${bindir}/tickadj" |
123 | FILES_${PN}-utils = "${sbindir}" | 128 | FILES_${PN}-utils = "${bindir} ${datadir}/ntp/lib" |
124 | FILES_ntpdate = "${sbindir}/ntpdate \ | 129 | FILES_ntpdate = "${bindir}/ntpdate \ |
125 | ${sysconfdir}/network/if-up.d/ntpdate-sync \ | 130 | ${sysconfdir}/network/if-up.d/ntpdate-sync \ |
126 | ${bindir}/ntpdate-sync \ | 131 | ${bindir}/ntpdate-sync \ |
127 | ${sysconfdir}/default/ntpdate \ | 132 | ${sysconfdir}/default/ntpdate \ |
128 | ${systemd_unitdir}/system/ntpdate.service \ | 133 | ${systemd_unitdir}/system/ntpdate.service \ |
129 | " | 134 | " |
130 | FILES_sntp = "${sbindir}/sntp \ | 135 | FILES_sntp = "${bindir}/sntp \ |
131 | ${sysconfdir}/default/sntp \ | 136 | ${sysconfdir}/default/sntp \ |
132 | ${systemd_unitdir}/system/sntp.service \ | 137 | ${systemd_unitdir}/system/sntp.service \ |
133 | " | 138 | " |