diff options
| author | Li xin <lixin.fnst@cn.fujitsu.com> | 2015-07-24 12:13:00 +0800 |
|---|---|---|
| committer | Joe MacDonald <joe_macdonald@mentor.com> | 2015-08-06 15:44:09 -0400 |
| commit | 471e21d91d1ed0f2a1d954bbf34b1c4f952e1ac7 (patch) | |
| tree | 803abb7915fb3d3cd9ab143b8f5ae88c8253cbce /meta-networking/recipes-support/ntp/ntp_4.2.8p2.bb | |
| parent | 7288637bcfdc483aaf0bd480a95ac135bb11be3a (diff) | |
| download | meta-openembedded-471e21d91d1ed0f2a1d954bbf34b1c4f952e1ac7.tar.gz | |
ntp: upgrade 4.2.8p2 -> 4.2.8p3
4.2.8p3 fixed CVE-2015-5146 and Bugs.
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.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/ntp_4.2.8p2.bb')
| -rw-r--r-- | meta-networking/recipes-support/ntp/ntp_4.2.8p2.bb | 156 |
1 files changed, 0 insertions, 156 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.8p2.bb b/meta-networking/recipes-support/ntp/ntp_4.2.8p2.bb deleted file mode 100644 index c54da4335c..0000000000 --- a/meta-networking/recipes-support/ntp/ntp_4.2.8p2.bb +++ /dev/null | |||
| @@ -1,156 +0,0 @@ | |||
| 1 | SUMMARY = "Network Time Protocol daemon and utilities" | ||
| 2 | DESCRIPTION = "The Network Time Protocol (NTP) is used to \ | ||
| 3 | synchronize the time of a computer client or server to \ | ||
| 4 | another server or reference time source, such as a radio \ | ||
| 5 | or satellite receiver or modem." | ||
| 6 | HOMEPAGE = "http://support.ntp.org" | ||
| 7 | SECTION = "net" | ||
| 8 | LICENSE = "NTP" | ||
| 9 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f41fedb22dffefcbfafecc85b0f79cfa" | ||
| 10 | |||
| 11 | DEPENDS = "libevent" | ||
| 12 | |||
| 13 | SRC_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://ntpd \ | ||
| 16 | file://ntp.conf \ | ||
| 17 | file://ntpdate \ | ||
| 18 | file://ntpdate.default \ | ||
| 19 | file://ntpdate.service \ | ||
| 20 | file://ntpd.service \ | ||
| 21 | file://sntp.service \ | ||
| 22 | file://sntp \ | ||
| 23 | file://ntpd.list \ | ||
| 24 | " | ||
| 25 | |||
| 26 | SRC_URI[md5sum] = "fa37049383316322d060ec9061ac23a9" | ||
| 27 | SRC_URI[sha256sum] = "0d69bc0e95caad43ea04fdad410e756bae1a71e67b1c2bd799b76b55e04c9b31" | ||
| 28 | |||
| 29 | inherit autotools update-rc.d useradd systemd pkgconfig | ||
| 30 | |||
| 31 | # The ac_cv_header_readline_history is to stop ntpdc depending on either | ||
| 32 | # readline or curses | ||
| 33 | EXTRA_OECONF += "--with-net-snmp-config=no \ | ||
| 34 | --without-ntpsnmpd \ | ||
| 35 | ac_cv_header_readline_history_h=no \ | ||
| 36 | --with-yielding_select=yes \ | ||
| 37 | --with-locfile=redhat \ | ||
| 38 | " | ||
| 39 | CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" | ||
| 40 | |||
| 41 | USERADD_PACKAGES = "${PN}" | ||
| 42 | NTP_USER_HOME ?= "/var/lib/ntp" | ||
| 43 | USERADD_PARAM_${PN} = "--system --home-dir ${NTP_USER_HOME} \ | ||
| 44 | --no-create-home \ | ||
| 45 | --shell /bin/false --user-group ntp" | ||
| 46 | |||
| 47 | # NB: debug is default-enabled by NTP; keep it default-enabled here. | ||
| 48 | PACKAGECONFIG ??= "cap debug refclocks" | ||
| 49 | PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \ | ||
| 50 | --with-openssl-incdir=${STAGING_INCDIR} \ | ||
| 51 | --with-crypto, \ | ||
| 52 | --without-openssl --without-crypto, \ | ||
| 53 | openssl" | ||
| 54 | PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap" | ||
| 55 | PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline" | ||
| 56 | PACKAGECONFIG[refclocks] = "--enable-all-clocks,--disable-all-clocks,pps-tools" | ||
| 57 | PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging" | ||
| 58 | |||
| 59 | do_install_append() { | ||
| 60 | install -d ${D}${sysconfdir}/init.d | ||
| 61 | install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir} | ||
| 62 | install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d | ||
| 63 | install -d ${D}${bindir} | ||
| 64 | install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync | ||
| 65 | |||
| 66 | install -m 755 -d ${D}${NTP_USER_HOME} | ||
| 67 | chown ntp:ntp ${D}${NTP_USER_HOME} | ||
| 68 | |||
| 69 | # Fix hardcoded paths in scripts | ||
| 70 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | ||
| 71 | sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | ||
| 72 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | ||
| 73 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | ||
| 74 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync | ||
| 75 | sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace | ||
| 76 | sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace | ||
| 77 | sed -i '1s,#!.*perl,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait | ||
| 78 | sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait | ||
| 79 | sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/calc_tickadj | ||
| 80 | sed -i '/use/i use warnings;' ${D}${sbindir}/calc_tickadj | ||
| 81 | |||
| 82 | install -d ${D}/${sysconfdir}/default | ||
| 83 | install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate | ||
| 84 | install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/ | ||
| 85 | |||
| 86 | install -d ${D}/${sysconfdir}/network/if-up.d | ||
| 87 | ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d | ||
| 88 | |||
| 89 | install -d ${D}${systemd_unitdir}/system | ||
| 90 | install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/ | ||
| 91 | install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ | ||
| 92 | install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/ | ||
| 93 | |||
| 94 | install -d ${D}${systemd_unitdir}/ntp-units.d | ||
| 95 | install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list | ||
| 96 | } | ||
| 97 | |||
| 98 | PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils" | ||
| 99 | # NOTE: you don't need ntpdate, use "ntpd -q -g -x" | ||
| 100 | |||
| 101 | # ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms | ||
| 102 | # with wonky clocks (e.g. OpenSlug) | ||
| 103 | RDEPENDS_${PN} = "${PN}-tickadj" | ||
| 104 | # Handle move from bin to utils package | ||
| 105 | RPROVIDES_${PN}-utils = "${PN}-bin" | ||
| 106 | RREPLACES_${PN}-utils = "${PN}-bin" | ||
| 107 | RCONFLICTS_${PN}-utils = "${PN}-bin" | ||
| 108 | |||
| 109 | SYSTEMD_PACKAGES = "${PN} ntpdate sntp" | ||
| 110 | SYSTEMD_SERVICE_${PN} = "ntpd.service" | ||
| 111 | SYSTEMD_SERVICE_ntpdate = "ntpdate.service" | ||
| 112 | SYSTEMD_SERVICE_sntp = "sntp.service" | ||
| 113 | |||
| 114 | RPROVIDES_${PN} += "${PN}-systemd" | ||
| 115 | RREPLACES_${PN} += "${PN}-systemd" | ||
| 116 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
| 117 | |||
| 118 | RPROVIDES_ntpdate += "ntpdate-systemd" | ||
| 119 | RREPLACES_ntpdate += "ntpdate-systemd" | ||
| 120 | RCONFLICTS_ntpdate += "ntpdate-systemd" | ||
| 121 | |||
| 122 | RSUGGESTS_${PN} = "iana-etc" | ||
| 123 | |||
| 124 | FILES_${PN} = "${sbindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \ | ||
| 125 | ${NTP_USER_HOME} \ | ||
| 126 | ${systemd_unitdir}/ntp-units.d/60-ntpd.list \ | ||
| 127 | " | ||
| 128 | FILES_${PN}-tickadj = "${sbindir}/tickadj" | ||
| 129 | FILES_${PN}-utils = "${sbindir} ${datadir}/ntp/lib" | ||
| 130 | RDEPENDS_${PN}-utils += "perl" | ||
| 131 | FILES_ntpdate = "${sbindir}/ntpdate \ | ||
| 132 | ${sysconfdir}/network/if-up.d/ntpdate-sync \ | ||
| 133 | ${bindir}/ntpdate-sync \ | ||
| 134 | ${sysconfdir}/default/ntpdate \ | ||
| 135 | ${systemd_unitdir}/system/ntpdate.service \ | ||
| 136 | " | ||
| 137 | FILES_sntp = "${sbindir}/sntp \ | ||
| 138 | ${sysconfdir}/default/sntp \ | ||
| 139 | ${systemd_unitdir}/system/sntp.service \ | ||
| 140 | " | ||
| 141 | |||
| 142 | CONFFILES_${PN} = "${sysconfdir}/ntp.conf" | ||
| 143 | CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate" | ||
| 144 | |||
| 145 | INITSCRIPT_NAME = "ntpd" | ||
| 146 | # No dependencies, so just go in at the standard level (20) | ||
| 147 | INITSCRIPT_PARAMS = "defaults" | ||
| 148 | |||
| 149 | pkg_postinst_ntpdate() { | ||
| 150 | if ! grep -q -s ntpdate $D/var/spool/cron/root; then | ||
| 151 | echo "adding crontab" | ||
| 152 | test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron | ||
| 153 | echo "30 * * * * ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root | ||
| 154 | fi | ||
| 155 | } | ||
| 156 | |||
