From 5babb449cb2a3b10814daf240c884c36e547ed28 Mon Sep 17 00:00:00 2001 From: Dirk Opfer Date: Tue, 4 Aug 2009 11:56:03 +0200 Subject: ntp: update to 4.2.4p7 --- recipes/ntp/ntp-4.2.2p3/ipv6only-workaround.patch | 13 ------- recipes/ntp/ntp-4.2.2p3/tickadj.c.patch | 32 ------------------ recipes/ntp/ntp-4.2.4p7/tickadj.c.patch | 32 ++++++++++++++++++ recipes/ntp/ntp_4.2.2p3.bb | 41 ----------------------- recipes/ntp/ntp_4.2.4p7.bb | 40 ++++++++++++++++++++++ 5 files changed, 72 insertions(+), 86 deletions(-) delete mode 100644 recipes/ntp/ntp-4.2.2p3/ipv6only-workaround.patch delete mode 100644 recipes/ntp/ntp-4.2.2p3/tickadj.c.patch create mode 100644 recipes/ntp/ntp-4.2.4p7/tickadj.c.patch delete mode 100644 recipes/ntp/ntp_4.2.2p3.bb create mode 100644 recipes/ntp/ntp_4.2.4p7.bb diff --git a/recipes/ntp/ntp-4.2.2p3/ipv6only-workaround.patch b/recipes/ntp/ntp-4.2.2p3/ipv6only-workaround.patch deleted file mode 100644 index 5301621dc2..0000000000 --- a/recipes/ntp/ntp-4.2.2p3/ipv6only-workaround.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ntp-4.2.2p3/ntpdate/ntpdate.c -=================================================================== ---- ntp-4.2.2p3.orig/ntpdate/ntpdate.c -+++ ntp-4.2.2p3/ntpdate/ntpdate.c -@@ -1777,8 +1777,6 @@ init_io(void) - if (res->ai_family == AF_INET6) - if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) { - netsyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m"); -- exit(1); -- /*NOTREACHED*/ - } - #endif - diff --git a/recipes/ntp/ntp-4.2.2p3/tickadj.c.patch b/recipes/ntp/ntp-4.2.2p3/tickadj.c.patch deleted file mode 100644 index 9ef9de9e1f..0000000000 --- a/recipes/ntp/ntp-4.2.2p3/tickadj.c.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: ntp-4.2.2p3-r0/ntp-4.2.2p3/util/tickadj.c -=================================================================== ---- ntp-4.2.2p3/util/tickadj.c 2004-02-25 06:58:33.000000000 +0100 -+++ ntp-4.2.2p3/util/tickadj.c 2007-07-07 01:00:54.000000000 +0200 -@@ -21,7 +21,8 @@ - # include - #endif /* HAVE_UNISTD_H */ - --#ifdef HAVE___ADJTIMEX /* Linux */ -+/* proper handling here has been moved to upstream ntp bugzilla */ -+#ifdef linux - - #include - struct timex txc; -@@ -91,7 +92,7 @@ - } - - if (!errflg) { -- if (__adjtimex(&txc) < 0) -+ if (adjtimex(&txc) < 0) - perror("adjtimex"); - else if (!quiet) - printf("tick = %ld\ntick_adj = %d\n", -@@ -146,7 +147,7 @@ - #endif - } - -- if (__adjtimex(&txc) < 0) -+ if (adjtimex(&txc) < 0) - { - perror("adjtimex"); - } diff --git a/recipes/ntp/ntp-4.2.4p7/tickadj.c.patch b/recipes/ntp/ntp-4.2.4p7/tickadj.c.patch new file mode 100644 index 0000000000..9ef9de9e1f --- /dev/null +++ b/recipes/ntp/ntp-4.2.4p7/tickadj.c.patch @@ -0,0 +1,32 @@ +Index: ntp-4.2.2p3-r0/ntp-4.2.2p3/util/tickadj.c +=================================================================== +--- ntp-4.2.2p3/util/tickadj.c 2004-02-25 06:58:33.000000000 +0100 ++++ ntp-4.2.2p3/util/tickadj.c 2007-07-07 01:00:54.000000000 +0200 +@@ -21,7 +21,8 @@ + # include + #endif /* HAVE_UNISTD_H */ + +-#ifdef HAVE___ADJTIMEX /* Linux */ ++/* proper handling here has been moved to upstream ntp bugzilla */ ++#ifdef linux + + #include + struct timex txc; +@@ -91,7 +92,7 @@ + } + + if (!errflg) { +- if (__adjtimex(&txc) < 0) ++ if (adjtimex(&txc) < 0) + perror("adjtimex"); + else if (!quiet) + printf("tick = %ld\ntick_adj = %d\n", +@@ -146,7 +147,7 @@ + #endif + } + +- if (__adjtimex(&txc) < 0) ++ if (adjtimex(&txc) < 0) + { + perror("adjtimex"); + } diff --git a/recipes/ntp/ntp_4.2.2p3.bb b/recipes/ntp/ntp_4.2.2p3.bb deleted file mode 100644 index e53594c259..0000000000 --- a/recipes/ntp/ntp_4.2.2p3.bb +++ /dev/null @@ -1,41 +0,0 @@ -require ntp.inc - -PR = "r2" - -SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ - file://ipv6only-workaround.patch;patch=1 \ - file://tickadj.c.patch;patch=1 \ - file://ntp-4.2.4_p6-nano.patch;patch=1 \ - file://ntpd \ - file://ntp.conf \ - file://ntpdate" - - -# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms -# with wonky clocks (e.g. OpenSlug) -RDEPENDS_${PN} = "${PN}-tickadj" -FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace" -FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd" -FILES_${PN}-tickadj = "${bindir}/tickadj" -FILES_ntp-utils = "${bindir}/*" - -do_install_append() { - install -d ${D}/${sysconfdir}/init.d - install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir} - install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/init.d - install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d -} - -pkg_postinst_ntpdate() { -if test "x$D" != "x"; then - exit 1 -else - if ! grep -q ntpdate /etc/cron/crontabs/root; then - echo "adding crontab" - test -d /etc/cron/crontabs || mkdir -p /etc/cron/crontabs - echo "30 * * * * /usr/bin/ntpdate -s -u pool.ntp.org" >> /etc/cron/crontabs/root - fi - update-rc.d -s busybox-cron defaults - update-rc.d -s ntpdate defaults 30 -fi -} diff --git a/recipes/ntp/ntp_4.2.4p7.bb b/recipes/ntp/ntp_4.2.4p7.bb new file mode 100644 index 0000000000..5e24e8adb1 --- /dev/null +++ b/recipes/ntp/ntp_4.2.4p7.bb @@ -0,0 +1,40 @@ +require ntp.inc + +PR = "r0" + +SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ + file://tickadj.c.patch;patch=1 \ + file://ntp-4.2.4_p6-nano.patch;patch=1 \ + file://ntpd \ + file://ntp.conf \ + file://ntpdate" + + +# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms +# with wonky clocks (e.g. OpenSlug) +RDEPENDS_${PN} = "${PN}-tickadj" +FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace" +FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd" +FILES_${PN}-tickadj = "${bindir}/tickadj" +FILES_ntp-utils = "${bindir}/*" + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir} + install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/init.d + install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d +} + +pkg_postinst_ntpdate() { +if test "x$D" != "x"; then + exit 1 +else + if ! grep -q ntpdate /etc/cron/crontabs/root; then + echo "adding crontab" + test -d /etc/cron/crontabs || mkdir -p /etc/cron/crontabs + echo "30 * * * * /usr/bin/ntpdate -s -u pool.ntp.org" >> /etc/cron/crontabs/root + fi + update-rc.d -s busybox-cron defaults + update-rc.d -s ntpdate defaults 30 +fi +} -- cgit v1.2.3