summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb
diff options
context:
space:
mode:
authorWang Mingyu <wangmy@fujitsu.com>2023-06-05 15:52:53 +0800
committerKhem Raj <raj.khem@gmail.com>2023-06-05 09:29:35 -0700
commitd17e287c81187eee57c2744945cf0d9c4d5ca326 (patch)
tree015096abbf8c3245fde2c9fc618115e664dc3787 /meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb
parent036ccc767a02b5a290dc1efaca5655fb0e808102 (diff)
downloadmeta-openembedded-d17e287c81187eee57c2744945cf0d9c4d5ca326.tar.gz
ntp: upgrade 4.2.8p15 -> 4.2.8p16
0001-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch 0001-test-Fix-build-with-new-compiler-defaults-to-fno-com.patch refreshed for new version. Changelog ========= - fixes 4 vulnerabilities (3 LOW and 1 None severity), - fixes 46 bugs - includes 15 general improvements - adds support for OpenSSL-3.0 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb')
-rw-r--r--meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb179
1 files changed, 0 insertions, 179 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb b/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb
deleted file mode 100644
index 5d2f05e925..0000000000
--- a/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb
+++ /dev/null
@@ -1,179 +0,0 @@
1SUMMARY = "Network Time Protocol daemon and utilities"
2DESCRIPTION = "The Network Time Protocol (NTP) is used to \
3synchronize the time of a computer client or server to \
4another server or reference time source, such as a radio \
5or satellite receiver or modem."
6HOMEPAGE = "http://support.ntp.org"
7SECTION = "net"
8LICENSE = "NTP"
9LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=4190b39435611e92a4da74e682623f19"
10
11DEPENDS = "libevent"
12
13SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
14 file://ntp-4.2.4_p6-nano.patch \
15 file://reproducibility-fixed-path-to-posix-shell.patch \
16 file://0001-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch \
17 file://0001-test-Fix-build-with-new-compiler-defaults-to-fno-com.patch \
18 file://0001-sntp-Fix-types-in-check-for-pthread_detach.patch \
19 file://ntpd \
20 file://ntp.conf \
21 file://ntpd.service \
22 file://sntp.service \
23 file://sntp \
24 file://ntpd.list \
25"
26
27SRC_URI[sha256sum] = "f65840deab68614d5d7ceb2d0bb9304ff70dcdedd09abb79754a87536b849c19"
28
29# CVE-2016-9312 is only for windows.
30# CVE-2019-11331 is inherent to RFC 5905 and cannot be fixed without breaking compatibility
31# The other CVEs are not correctly identified because cve-check
32# is not able to check the version correctly (it only checks for 4.2.8 omitting p15 that makes the difference)
33CVE_CHECK_IGNORE += "\
34 CVE-2016-9312 \
35 CVE-2015-5146 \
36 CVE-2015-5300 \
37 CVE-2015-7975 \
38 CVE-2015-7976 \
39 CVE-2015-7977 \
40 CVE-2015-7978 \
41 CVE-2015-7979 \
42 CVE-2015-8138 \
43 CVE-2015-8139 \
44 CVE-2015-8140 \
45 CVE-2015-8158 \
46 CVE-2016-1547 \
47 CVE-2016-2516 \
48 CVE-2016-2517 \
49 CVE-2016-2519 \
50 CVE-2016-7429 \
51 CVE-2016-7433 \
52 CVE-2016-9310 \
53 CVE-2016-9311 \
54 CVE-2019-11331 \
55"
56
57
58inherit autotools update-rc.d useradd systemd pkgconfig
59
60# The ac_cv_header_readline_history is to stop ntpdc depending on either
61# readline or curses
62EXTRA_OECONF += "--with-net-snmp-config=no \
63 --without-ntpsnmpd \
64 ac_cv_header_readline_history_h=no \
65 --with-yielding_select=yes \
66 --with-locfile=redhat \
67 --without-rpath \
68 "
69CFLAGS:append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
70
71USERADD_PACKAGES = "${PN}"
72NTP_USER_HOME ?= "/var/lib/ntp"
73USERADD_PARAM:${PN} = "--system --home-dir ${NTP_USER_HOME} \
74 --no-create-home \
75 --shell /bin/false --user-group ntp"
76
77# NB: debug is default-enabled by NTP; keep it default-enabled here.
78PACKAGECONFIG ??= "cap debug refclocks openssl \
79 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
80"
81PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
82 --with-openssl-incdir=${STAGING_INCDIR} \
83 --with-crypto, \
84 --without-openssl --without-crypto, \
85 openssl"
86PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap"
87PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline"
88PACKAGECONFIG[refclocks] = "--enable-all-clocks,--disable-all-clocks,pps-tools"
89PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging"
90PACKAGECONFIG[mdns] = "ac_cv_header_dns_sd_h=yes,ac_cv_header_dns_sd_h=no,mdns"
91PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
92
93do_install:append() {
94 install -d ${D}${sysconfdir}/init.d
95 install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
96 install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
97
98 install -m 755 -d ${D}${NTP_USER_HOME}
99 chown ntp:ntp ${D}${NTP_USER_HOME}
100
101 # Fix hardcoded paths in scripts
102 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd
103 sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd
104 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd
105 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd
106 sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace
107 sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace
108 sed -i '1s,#!.*perl,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait
109 sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait
110 sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/calc_tickadj
111 sed -i '/use/i use warnings;' ${D}${sbindir}/calc_tickadj
112
113 install -d ${D}/${sysconfdir}/default
114 install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/
115
116 install -d ${D}${systemd_unitdir}/system
117 install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
118 install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/
119
120 install -d ${D}${systemd_unitdir}/ntp-units.d
121 install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list
122
123 # Remove the empty libexecdir and bindir.
124 rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
125 rmdir --ignore-fail-on-non-empty ${D}${bindir}
126}
127
128PACKAGES += "sntp ntpdc ntpq ${PN}-tickadj ${PN}-utils"
129
130# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
131# with wonky clocks (e.g. OpenSlug)
132RDEPENDS:${PN} = "${PN}-tickadj"
133# ntpd & sntp require libgcc for execution due to phtread_cancel/pthread_exit calls
134RDEPENDS:${PN} += "libgcc"
135RDEPENDS:sntp += "libgcc"
136# Handle move from bin to utils package
137RPROVIDES:${PN}-utils = "${PN}-bin"
138RREPLACES:${PN}-utils = "${PN}-bin"
139RCONFLICTS:${PN}-utils = "${PN}-bin"
140# ntpdc and ntpq were split out of ntp-utils
141RDEPENDS:${PN}-utils = "ntpdc ntpq"
142
143SYSTEMD_PACKAGES = "${PN} sntp"
144SYSTEMD_SERVICE:${PN} = "ntpd.service"
145SYSTEMD_SERVICE:sntp = "sntp.service"
146SYSTEMD_AUTO_ENABLE:sntp = "disable"
147
148RPROVIDES:${PN} += "${PN}-systemd"
149RREPLACES:${PN} += "${PN}-systemd"
150RCONFLICTS:${PN} += "${PN}-systemd"
151
152RSUGGESTS:${PN} = "iana-etc"
153
154FILES:${PN} = "${sbindir}/ntpd.ntp ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd \
155 ${NTP_USER_HOME} \
156 ${systemd_unitdir}/ntp-units.d/60-ntpd.list \
157"
158FILES:${PN}-tickadj = "${sbindir}/tickadj"
159FILES:${PN}-utils = "${sbindir} ${datadir}/ntp/lib"
160RDEPENDS:${PN}-utils += "perl"
161FILES:sntp = "${sbindir}/sntp \
162 ${sysconfdir}/default/sntp \
163 ${systemd_unitdir}/system/sntp.service \
164 "
165FILES:ntpdc = "${sbindir}/ntpdc"
166FILES:ntpq = "${sbindir}/ntpq"
167
168CONFFILES:${PN} = "${sysconfdir}/ntp.conf"
169
170INITSCRIPT_NAME = "ntpd"
171# No dependencies, so just go in at the standard level (20)
172INITSCRIPT_PARAMS = "defaults"
173
174inherit update-alternatives
175
176ALTERNATIVE_PRIORITY = "100"
177
178ALTERNATIVE:${PN} = "ntpd"
179ALTERNATIVE_LINK_NAME[ntpd] = "${sbindir}/ntpd"