* [meta-networking][PATCH v2 0/2] ntp fixes
@ 2012-11-22 16:49 Paul Eggleton
2012-11-22 16:49 ` [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support Paul Eggleton
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Paul Eggleton @ 2012-11-22 16:49 UTC (permalink / raw)
To: openembedded-devel
Changes since v1:
* Fix hardcoded paths in scripts
* Move contents of ntp-bin package to previously empty ntp-utils package
* Move the ntp server configuration to runtime (/etc/default/ntpdate)
* Specify configuration files using CONFFILES
* Remove unused init script path from FILES_ntpdate
The following changes since commit d08ee5a51d4e89ae587d170f8b99062689841428:
qt4-embedded: drop bbappend for 4.8.1 (2012-11-22 09:48:36 +0100)
are available in the git repository at:
git://git.openembedded.org/meta-openembedded-contrib paule/ntp
http://cgit.openembedded.org/cgit.cgi/meta-openembedded-contrib/log/?h=paule/ntp
Paul Eggleton (2):
ntp: cleanup recipes and fix SSL support
ntp: make servers configurable and default to none configured
meta-networking/recipes-support/ntp/files/ntp | 31 -------
meta-networking/recipes-support/ntp/files/ntp.conf | 2 +-
meta-networking/recipes-support/ntp/files/ntpdate | 11 ++-
.../recipes-support/ntp/files/ntpdate.default | 7 ++
.../recipes-support/ntp/files/openssl-check.patch | 59 ++++++++++++
.../recipes-support/ntp/ntp-ssl_4.2.6p5.bb | 11 ---
meta-networking/recipes-support/ntp/ntp.inc | 94 ++++++++++++++++----
meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb | 44 +--------
8 files changed, 154 insertions(+), 105 deletions(-)
delete mode 100755 meta-networking/recipes-support/ntp/files/ntp
create mode 100644 meta-networking/recipes-support/ntp/files/ntpdate.default
create mode 100644 meta-networking/recipes-support/ntp/files/openssl-check.patch
delete mode 100644 meta-networking/recipes-support/ntp/ntp-ssl_4.2.6p5.bb
--
1.7.9.5
^ permalink raw reply [flat|nested] 11+ messages in thread
* [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support
2012-11-22 16:49 [meta-networking][PATCH v2 0/2] ntp fixes Paul Eggleton
@ 2012-11-22 16:49 ` Paul Eggleton
2012-12-04 7:44 ` [danny?] " Anders Darander
2012-11-22 16:49 ` [meta-networking][PATCH v2 2/2] ntp: make servers configurable and default to none configured Paul Eggleton
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Paul Eggleton @ 2012-11-22 16:49 UTC (permalink / raw)
To: openembedded-devel
* Move common definitions to the inc file
* Drop override of do_configure which doesn't seem to be needed anymore
* Fold ntp-ssl into the ntp recipe as a PACKAGECONFIG option for those
who want it (default to off) and fix configure-time checks to detect
OpenSSL properly so that it gets enabled when selected
* Remove ntp-bin package and put its contents in currently empty
ntp-utils package (with migration path)
* Fix hardcoded paths in ntpd initscript
* Specify ntpd.conf as a configuration file for packaging purposes
* Rearrange so that packaging definitions are towards the end in the
expected order
* Delete unused "ntp" initscript file
* Add SUMMARY
* Update HOMEPAGE
This reapplies some of the changes from the original patch by
Morgan Little <morgan.little@windriver.com>.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta-networking/recipes-support/ntp/files/ntp | 31 -------
.../recipes-support/ntp/files/openssl-check.patch | 59 +++++++++++++
.../recipes-support/ntp/ntp-ssl_4.2.6p5.bb | 11 ---
meta-networking/recipes-support/ntp/ntp.inc | 87 ++++++++++++++++----
meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb | 44 +---------
5 files changed, 131 insertions(+), 101 deletions(-)
delete mode 100755 meta-networking/recipes-support/ntp/files/ntp
create mode 100644 meta-networking/recipes-support/ntp/files/openssl-check.patch
delete mode 100644 meta-networking/recipes-support/ntp/ntp-ssl_4.2.6p5.bb
diff --git a/meta-networking/recipes-support/ntp/files/ntp b/meta-networking/recipes-support/ntp/files/ntp
deleted file mode 100755
index e91a528..0000000
--- a/meta-networking/recipes-support/ntp/files/ntp
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-
-FLAGS="defaults 23"
-
-test -f /usr/bin/ntpd || exit 0
-
-case "$1" in
- start)
- echo -n "Starting NTP server: ntpd"
- start-stop-daemon --start --quiet --exec /usr/bin/ntpd
- echo "."
- ;;
- stop)
- echo -n "Stopping NTP server: ntpd"
- start-stop-daemon --stop --quiet --exec /usr/bin/ntpd
- echo "."
- ;;
- restart|force-reload)
- echo -n "Restarting NTP server: ntpd... "
- start-stop-daemon --stop --quiet --exec /usr/bin/ntpd
- sleep 2
- start-stop-daemon --start --quiet --exec /usr/bin/ntpd
- echo "done."
- ;;
- *)
- echo "Usage: /etc/init.d/ntp {start|stop|restart|force-reload}"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/meta-networking/recipes-support/ntp/files/openssl-check.patch b/meta-networking/recipes-support/ntp/files/openssl-check.patch
new file mode 100644
index 0000000..8b4a673
--- /dev/null
+++ b/meta-networking/recipes-support/ntp/files/openssl-check.patch
@@ -0,0 +1,59 @@
+Hack OpenSSL check to work when libssl and libcrypto aren't in same dir
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ configure | 4 ++--
+ m4/ntp_openssl.m4 | 4 ++--
+ sntp/configure | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/configure b/configure
+index aae2c01..6a3c15e 100755
+--- a/configure
++++ b/configure
+@@ -22868,8 +22868,8 @@ case "$ans" in
+ test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
+ ;;
+ *)
+- test -f $i/libcrypto.so -a -f $i/libssl.so && break
+- test -f $i/libcrypto.a -a -f $i/libssl.a && break
++ test -f $i/libssl.so && break
++ test -f $i/libssl.a && break
+ ;;
+ esac
+ done
+diff --git a/m4/ntp_openssl.m4 b/m4/ntp_openssl.m4
+index 7d9f477..67bdd55 100644
+--- a/m4/ntp_openssl.m4
++++ b/m4/ntp_openssl.m4
+@@ -41,8 +41,8 @@ case "$ans" in
+ test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
+ ;;
+ *)
+- test -f $i/libcrypto.so -a -f $i/libssl.so && break
+- test -f $i/libcrypto.a -a -f $i/libssl.a && break
++ test -f $i/libssl.so && break
++ test -f $i/libssl.a && break
+ ;;
+ esac
+ done
+diff --git a/sntp/configure b/sntp/configure
+index 7782c29..55e82d9 100755
+--- a/sntp/configure
++++ b/sntp/configure
+@@ -14810,8 +14810,8 @@ case "$ans" in
+ test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
+ ;;
+ *)
+- test -f $i/libcrypto.so -a -f $i/libssl.so && break
+- test -f $i/libcrypto.a -a -f $i/libssl.a && break
++ test -f $i/libssl.so && break
++ test -f $i/libssl.a && break
+ ;;
+ esac
+ done
+--
+1.7.1
+
diff --git a/meta-networking/recipes-support/ntp/ntp-ssl_4.2.6p5.bb b/meta-networking/recipes-support/ntp/ntp-ssl_4.2.6p5.bb
deleted file mode 100644
index a158990..0000000
--- a/meta-networking/recipes-support/ntp/ntp-ssl_4.2.6p5.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require ntp_${PV}.bb
-DEPENDS = "openssl"
-
-S = "${WORKDIR}/ntp-${PV}"
-
-EXTRA_OECONF = "--with-openssl-libdir=${STAGING_LIBDIR} \
- --with-openssl-incdir=${STAGING_INCDIR}/openssl"
-
-
-SRC_URI[md5sum] = "98e16c7aa4ecd4c004b51bff18962e95"
-SRC_URI[sha256sum] = "9f4a5271a285d390c9225e3ea28f70049ea377d30fc6de4659007cfff278671a"
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index 1d740f0..a614e3f 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -1,35 +1,86 @@
+SUMMARY = "Network Time Protocol daemon and utilities"
DESCRIPTION = "The Network Time Protocol (NTP) is used to \
synchronize the time of a computer client or server to \
another server or reference time source, such as a radio \
or satellite receiver or modem."
-HOMEPAGE = "http://ntp.isc.org/bin/view/Main/WebHome"
+HOMEPAGE = "http://support.ntp.org"
SECTION = "console/network"
LICENSE = "ntp"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670"
-RSUGGESTS_${PN} = "iana-etc"
-SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
- file://ipv6only-workaround.patch \
- file://ntpd \
- file://ntp.conf \
- file://ntpdate \
- file://ntpd.service \
-"
+INC_PR = "r2"
-inherit autotools update-rc.d
+SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
+ file://tickadj.c.patch \
+ file://ntp-4.2.4_p6-nano.patch \
+ file://openssl-check.patch \
+ file://ntpd \
+ file://ntp.conf \
+ file://ntpdate \
+ "
-INITSCRIPT_NAME = "ntpd"
-# No dependencies, so just go in at the standard level (20)
-INITSCRIPT_PARAMS = "defaults"
+inherit autotools update-rc.d
# The ac_cv_header_readline_history is to stop ntpdc depending on either
# readline or curses
-EXTRA_OECONF = "--without-openssl --without-crypto ac_cv_header_readline_history_h=no"
+EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no"
CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
-PACKAGES += "ntpdate ${PN}-bin ${PN}-tickadj ${PN}-utils"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
+ --with-openssl-incdir=${STAGING_INCDIR} \
+ --with-crypto, \
+ --without-openssl --without-crypto, \
+ openssl"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
+ install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
+
+ # Fix hardcoded paths in scripts
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd
+ sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd
+ sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd
+
+ install -d ${D}${sysconfdir}/network/if-up.d
+ install -m 755 ${WORKDIR}/ntpdate ${D}${sysconfdir}/network/if-up.d
+}
+
+PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils"
# NOTE: you don't need ntpdate, use "ntpd -q -g -x"
-# or the ntpdate systemd service
-# This should use rc.update
-FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/init.d/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"
+# Handle move from bin to utils package
+RPROVIDES_${PN}-utils = "${PN}-bin"
+RREPLACES_${PN}-utils = "${PN}-bin"
+RCONFLICTS_${PN}-utils = "${PN}-bin"
+
+RSUGGESTS_${PN} = "iana-etc"
+
+FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir}"
+FILES_${PN}-tickadj = "${bindir}/tickadj"
+FILES_${PN}-utils = "${bindir}"
+FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate"
+
+CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
+
+INITSCRIPT_NAME = "ntpd"
+# No dependencies, so just go in at the standard level (20)
+INITSCRIPT_PARAMS = "defaults"
+
+pkg_postinst_ntpdate() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ if ! grep -q -s ntpdate /var/spool/cron/root; then
+ echo "adding crontab"
+ test -d /var/spool/cron || mkdir -p /var/spool/cron
+ echo "30 * * * * /usr/bin/ntpdate -b -s -u pool.ntp.org" >> /var/spool/cron/root
+ fi
+fi
+}
+
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb b/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb
index f7c5b68..f1e9ecd 100644
--- a/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb
+++ b/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb
@@ -1,45 +1,7 @@
require ntp.inc
-SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
- file://tickadj.c.patch \
- file://ntp-4.2.4_p6-nano.patch \
- file://ntpd \
- file://ntp.conf \
- file://ntpdate \
-"
+PR = "${INC_PR}.0"
-SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2"
-SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e"
-
-EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd"
-
-do_install_append() {
- install -d ${D}/${sysconfdir}/init.d
- install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir}
- install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d
- install -d ${D}/${sysconfdir}/network/if-up.d
- install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
-}
-
-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}/*"
-FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/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"
-
-pkg_postinst_ntpdate() {
-if test "x$D" != "x"; then
- exit 1
-else
- if ! grep -q -s ntpdate /var/spool/cron/root; then
- echo "adding crontab"
- test -d /var/spool/cron || mkdir -p /var/spool/cron
- echo "30 * * * * /usr/bin/ntpdate -b -s -u pool.ntp.org" >> /var/spool/cron/root
- fi
-fi
-}
+SRC_URI[md5sum] = "00df80a84ec9528fcfb09498075525bc"
+SRC_URI[sha256sum] = "d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [meta-networking][PATCH v2 2/2] ntp: make servers configurable and default to none configured
2012-11-22 16:49 [meta-networking][PATCH v2 0/2] ntp fixes Paul Eggleton
2012-11-22 16:49 ` [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support Paul Eggleton
@ 2012-11-22 16:49 ` Paul Eggleton
2012-11-22 17:05 ` Paul Eggleton
2012-11-26 16:28 ` [meta-networking][PATCH v2 0/2] ntp fixes Martin Jansa
2012-11-27 19:40 ` Joe MacDonald
3 siblings, 1 reply; 11+ messages in thread
From: Paul Eggleton @ 2012-11-22 16:49 UTC (permalink / raw)
To: openembedded-devel
People can't blindly use pool.ntp.org, especially if they are building
for a product or something that could be used in a product, so at least
try to get people to do the right thing and not use pool.ntp.org by
default.
The previous network interface up script is now installed as
ntpdate-sync in ${bindir} (and symlinked as the network if-up script).
NTPSERVERS needs to be set in /etc/default/ntpdate.default at runtime,
or a different version of this file with a default value can be provided
in a bbappend. (If you intend to use ntpd you will also want to provide
an ntp.conf with the appropriate server(s) set there as well.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta-networking/recipes-support/ntp/files/ntp.conf | 2 +-
meta-networking/recipes-support/ntp/files/ntpdate | 11 ++++++---
.../recipes-support/ntp/files/ntpdate.default | 7 ++++++
meta-networking/recipes-support/ntp/ntp.inc | 25 +++++++++++++-------
4 files changed, 32 insertions(+), 13 deletions(-)
create mode 100644 meta-networking/recipes-support/ntp/files/ntpdate.default
diff --git a/meta-networking/recipes-support/ntp/files/ntp.conf b/meta-networking/recipes-support/ntp/files/ntp.conf
index bf52440..a9cc838 100644
--- a/meta-networking/recipes-support/ntp/files/ntp.conf
+++ b/meta-networking/recipes-support/ntp/files/ntp.conf
@@ -5,7 +5,7 @@ driftfile /etc/ntp.drift
# This obtains a random server which will be close
# (in IP terms) to the machine. Add other servers
# as required, or change this.
-server pool.ntp.org
+server time.server.example.com
# Using local hardware clock as fallback
# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
server 127.127.1.0
diff --git a/meta-networking/recipes-support/ntp/files/ntpdate b/meta-networking/recipes-support/ntp/files/ntpdate
index 784b029..ab0551c 100755
--- a/meta-networking/recipes-support/ntp/files/ntpdate
+++ b/meta-networking/recipes-support/ntp/files/ntpdate
@@ -6,11 +6,16 @@ test -x /usr/bin/ntpdate || exit 0
if test -f /etc/default/ntpdate ; then
. /etc/default/ntpdate
-else
-NTPSERVERS="pool.ntp.org"
fi
-test -n "$NTPSERVERS" || exit 0
+if [ "$NTPSERVERS" = "" ] ; then
+ if [ "$METHOD" = "" -a "$1" != "silent" ] ; then
+ echo "Please set NTPSERVERS in /etc/default/ntpdate"
+ exit 1
+ else
+ exit 0
+ fi
+fi
# This is a heuristic: The idea is that if a static interface is brought
# up, that is a major event, and we can put in some extra effort to fix
diff --git a/meta-networking/recipes-support/ntp/files/ntpdate.default b/meta-networking/recipes-support/ntp/files/ntpdate.default
new file mode 100644
index 0000000..486b6e0
--- /dev/null
+++ b/meta-networking/recipes-support/ntp/files/ntpdate.default
@@ -0,0 +1,7 @@
+# Configuration script used by ntpdate-sync script
+
+NTPSERVERS=""
+
+# Set to "yes" to write time to hardware clock on success
+UPDATE_HWCLOCK="no"
+
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index a614e3f..b3586dc 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -17,6 +17,7 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.g
file://ntpd \
file://ntp.conf \
file://ntpdate \
+ file://ntpdate.default \
"
inherit autotools update-rc.d
@@ -37,15 +38,20 @@ do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
+ install -d ${D}${bindir}
+ install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
# Fix hardcoded paths in scripts
- sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd
- sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd
- sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd
- sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd
-
- install -d ${D}${sysconfdir}/network/if-up.d
- install -m 755 ${WORKDIR}/ntpdate ${D}${sysconfdir}/network/if-up.d
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+ sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+ sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
+ sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync
+
+ install -d ${D}/${sysconfdir}/default
+ install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
+ install -d ${D}/${sysconfdir}/network/if-up.d
+ ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
}
PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils"
@@ -64,9 +70,10 @@ RSUGGESTS_${PN} = "iana-etc"
FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir}"
FILES_${PN}-tickadj = "${bindir}/tickadj"
FILES_${PN}-utils = "${bindir}"
-FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate"
+FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate-sync ${bindir}/ntpdate-sync ${sysconfdir}/default/ntpdate"
CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
+CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate"
INITSCRIPT_NAME = "ntpd"
# No dependencies, so just go in at the standard level (20)
@@ -79,7 +86,7 @@ else
if ! grep -q -s ntpdate /var/spool/cron/root; then
echo "adding crontab"
test -d /var/spool/cron || mkdir -p /var/spool/cron
- echo "30 * * * * /usr/bin/ntpdate -b -s -u pool.ntp.org" >> /var/spool/cron/root
+ echo "30 * * * * ${bindir}/ntpdate-sync silent" >> /var/spool/cron/root
fi
fi
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [meta-networking][PATCH v2 2/2] ntp: make servers configurable and default to none configured
2012-11-22 16:49 ` [meta-networking][PATCH v2 2/2] ntp: make servers configurable and default to none configured Paul Eggleton
@ 2012-11-22 17:05 ` Paul Eggleton
0 siblings, 0 replies; 11+ messages in thread
From: Paul Eggleton @ 2012-11-22 17:05 UTC (permalink / raw)
To: openembedded-devel
On Thursday 22 November 2012 16:49:35 Paul Eggleton wrote:
> People can't blindly use pool.ntp.org, especially if they are building
> for a product or something that could be used in a product, so at least
> try to get people to do the right thing and not use pool.ntp.org by
> default.
>
> The previous network interface up script is now installed as
> ntpdate-sync in ${bindir} (and symlinked as the network if-up script).
> NTPSERVERS needs to be set in /etc/default/ntpdate.default at runtime,
Martin points out that should be "/etc/default/ntpdate" not
"/etc/default/ntpdate.default" - I have fixed the commit message on the branch.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-networking][PATCH v2 0/2] ntp fixes
2012-11-22 16:49 [meta-networking][PATCH v2 0/2] ntp fixes Paul Eggleton
2012-11-22 16:49 ` [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support Paul Eggleton
2012-11-22 16:49 ` [meta-networking][PATCH v2 2/2] ntp: make servers configurable and default to none configured Paul Eggleton
@ 2012-11-26 16:28 ` Martin Jansa
2012-11-27 19:40 ` Joe MacDonald
3 siblings, 0 replies; 11+ messages in thread
From: Martin Jansa @ 2012-11-26 16:28 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 2222 bytes --]
On Thu, Nov 22, 2012 at 04:49:33PM +0000, Paul Eggleton wrote:
> Changes since v1:
> * Fix hardcoded paths in scripts
> * Move contents of ntp-bin package to previously empty ntp-utils package
> * Move the ntp server configuration to runtime (/etc/default/ntpdate)
> * Specify configuration files using CONFFILES
> * Remove unused init script path from FILES_ntpdate
Finally no need to see failed ntp* in systemd log, Thanks!
Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
> The following changes since commit d08ee5a51d4e89ae587d170f8b99062689841428:
>
> qt4-embedded: drop bbappend for 4.8.1 (2012-11-22 09:48:36 +0100)
>
> are available in the git repository at:
>
> git://git.openembedded.org/meta-openembedded-contrib paule/ntp
> http://cgit.openembedded.org/cgit.cgi/meta-openembedded-contrib/log/?h=paule/ntp
>
> Paul Eggleton (2):
> ntp: cleanup recipes and fix SSL support
> ntp: make servers configurable and default to none configured
>
> meta-networking/recipes-support/ntp/files/ntp | 31 -------
> meta-networking/recipes-support/ntp/files/ntp.conf | 2 +-
> meta-networking/recipes-support/ntp/files/ntpdate | 11 ++-
> .../recipes-support/ntp/files/ntpdate.default | 7 ++
> .../recipes-support/ntp/files/openssl-check.patch | 59 ++++++++++++
> .../recipes-support/ntp/ntp-ssl_4.2.6p5.bb | 11 ---
> meta-networking/recipes-support/ntp/ntp.inc | 94 ++++++++++++++++----
> meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb | 44 +--------
> 8 files changed, 154 insertions(+), 105 deletions(-)
> delete mode 100755 meta-networking/recipes-support/ntp/files/ntp
> create mode 100644 meta-networking/recipes-support/ntp/files/ntpdate.default
> create mode 100644 meta-networking/recipes-support/ntp/files/openssl-check.patch
> delete mode 100644 meta-networking/recipes-support/ntp/ntp-ssl_4.2.6p5.bb
>
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-networking][PATCH v2 0/2] ntp fixes
2012-11-22 16:49 [meta-networking][PATCH v2 0/2] ntp fixes Paul Eggleton
` (2 preceding siblings ...)
2012-11-26 16:28 ` [meta-networking][PATCH v2 0/2] ntp fixes Martin Jansa
@ 2012-11-27 19:40 ` Joe MacDonald
3 siblings, 0 replies; 11+ messages in thread
From: Joe MacDonald @ 2012-11-27 19:40 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 1903 bytes --]
[[oe] [meta-networking][PATCH v2 0/2] ntp fixes] On 12.11.22 (Thu 16:49) Paul Eggleton wrote:
> Changes since v1:
> * Fix hardcoded paths in scripts
> * Move contents of ntp-bin package to previously empty ntp-utils package
> * Move the ntp server configuration to runtime (/etc/default/ntpdate)
> * Specify configuration files using CONFFILES
> * Remove unused init script path from FILES_ntpdate
>
>
> The following changes since commit d08ee5a51d4e89ae587d170f8b99062689841428:
>
> qt4-embedded: drop bbappend for 4.8.1 (2012-11-22 09:48:36 +0100)
>
> are available in the git repository at:
>
> git://git.openembedded.org/meta-openembedded-contrib paule/ntp
> http://cgit.openembedded.org/cgit.cgi/meta-openembedded-contrib/log/?h=paule/ntp
>
> Paul Eggleton (2):
> ntp: cleanup recipes and fix SSL support
> ntp: make servers configurable and default to none configured
>
> meta-networking/recipes-support/ntp/files/ntp | 31 -------
> meta-networking/recipes-support/ntp/files/ntp.conf | 2 +-
> meta-networking/recipes-support/ntp/files/ntpdate | 11 ++-
> .../recipes-support/ntp/files/ntpdate.default | 7 ++
> .../recipes-support/ntp/files/openssl-check.patch | 59 ++++++++++++
> .../recipes-support/ntp/ntp-ssl_4.2.6p5.bb | 11 ---
> meta-networking/recipes-support/ntp/ntp.inc | 94 ++++++++++++++++----
> meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb | 44 +--------
> 8 files changed, 154 insertions(+), 105 deletions(-)
> delete mode 100755 meta-networking/recipes-support/ntp/files/ntp
> create mode 100644 meta-networking/recipes-support/ntp/files/ntpdate.default
> create mode 100644 meta-networking/recipes-support/ntp/files/openssl-check.patch
> delete mode 100644 meta-networking/recipes-support/ntp/ntp-ssl_4.2.6p5.bb
>
Merged. Thanks.
--
-Joe MacDonald.
:wq
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [danny?] Re: [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support
2012-11-22 16:49 ` [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support Paul Eggleton
@ 2012-12-04 7:44 ` Anders Darander
2012-12-04 9:21 ` Paul Eggleton
0 siblings, 1 reply; 11+ messages in thread
From: Anders Darander @ 2012-12-04 7:44 UTC (permalink / raw)
To: openembedded-devel
Hi,
* Paul Eggleton <paul.eggleton@linux.intel.com> [121122 17:50]:
> * Move common definitions to the inc file
> * Drop override of do_configure which doesn't seem to be needed anymore
> * Fold ntp-ssl into the ntp recipe as a PACKAGECONFIG option for those
> who want it (default to off) and fix configure-time checks to detect
> OpenSSL properly so that it gets enabled when selected
> * Remove ntp-bin package and put its contents in currently empty
> ntp-utils package (with migration path)
> * Fix hardcoded paths in ntpd initscript
> * Specify ntpd.conf as a configuration file for packaging purposes
> * Rearrange so that packaging definitions are towards the end in the
> expected order
> * Delete unused "ntp" initscript file
> * Add SUMMARY
> * Update HOMEPAGE
Would this patch be acceptable for a push to danny? Or is it to
intrusive?
If it's to intrusive, we need to update the SRC_URI checksums in danny,
as they're currently not matching the downloaded file...
If needed, I can create a SRC_URI-patch for danny, though I'd prefer to
get this one in if possible.
Cheers,
/Anders
--
Anders Darander
ChargeStorm AB / eStorm AB
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [danny?] Re: [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support
2012-12-04 7:44 ` [danny?] " Anders Darander
@ 2012-12-04 9:21 ` Paul Eggleton
2012-12-04 11:20 ` Burton, Ross
2012-12-04 11:56 ` Martin Jansa
0 siblings, 2 replies; 11+ messages in thread
From: Paul Eggleton @ 2012-12-04 9:21 UTC (permalink / raw)
To: Anders Darander; +Cc: openembedded-devel
On Tuesday 04 December 2012 08:44:30 Anders Darander wrote:
> * Paul Eggleton <paul.eggleton@linux.intel.com> [121122 17:50]:
> > * Move common definitions to the inc file
> > * Drop override of do_configure which doesn't seem to be needed anymore
> > * Fold ntp-ssl into the ntp recipe as a PACKAGECONFIG option for those
> > who want it (default to off) and fix configure-time checks to detect
> > OpenSSL properly so that it gets enabled when selected
> > * Remove ntp-bin package and put its contents in currently empty
> > ntp-utils package (with migration path)
> > * Fix hardcoded paths in ntpd initscript
> > * Specify ntpd.conf as a configuration file for packaging purposes
> > * Rearrange so that packaging definitions are towards the end in the
> > expected order
> > * Delete unused "ntp" initscript file
> > * Add SUMMARY
> > * Update HOMEPAGE
>
> Would this patch be acceptable for a push to danny? Or is it to
> intrusive?
>
> If it's to intrusive, we need to update the SRC_URI checksums in danny,
> as they're currently not matching the downloaded file...
>
> If needed, I can create a SRC_URI-patch for danny, though I'd prefer to
> get this one in if possible.
IMO the original recipe was horribly broken, so I'd definitely support having
this patch applied to danny as well, assuming people have given it a
reasonable amount of runtime testing and everything's OK.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [danny?] Re: [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support
2012-12-04 9:21 ` Paul Eggleton
@ 2012-12-04 11:20 ` Burton, Ross
2012-12-04 11:21 ` Burton, Ross
2012-12-04 11:56 ` Martin Jansa
1 sibling, 1 reply; 11+ messages in thread
From: Burton, Ross @ 2012-12-04 11:20 UTC (permalink / raw)
To: openembedded-devel; +Cc: Anders Darander
On 4 December 2012 09:21, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> IMO the original recipe was horribly broken, so I'd definitely support having
> this patch applied to danny as well, assuming people have given it a
> reasonable amount of runtime testing and everything's OK.
It's horribly intrusive but if ntp wasn't usable before, I'm happy to
merge it once it's had some testing.
Ross
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [danny?] Re: [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support
2012-12-04 11:20 ` Burton, Ross
@ 2012-12-04 11:21 ` Burton, Ross
0 siblings, 0 replies; 11+ messages in thread
From: Burton, Ross @ 2012-12-04 11:21 UTC (permalink / raw)
To: openembedded-devel
On 4 December 2012 11:20, Burton, Ross <ross.burton@intel.com> wrote:
> On 4 December 2012 09:21, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
>> IMO the original recipe was horribly broken, so I'd definitely support having
>> this patch applied to danny as well, assuming people have given it a
>> reasonable amount of runtime testing and everything's OK.
>
> It's horribly intrusive but if ntp wasn't usable before, I'm happy to
> merge it once it's had some testing.
Of course ntp isn't in oe-core so ignore my opinion. ;)
Ross
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [danny?] Re: [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support
2012-12-04 9:21 ` Paul Eggleton
2012-12-04 11:20 ` Burton, Ross
@ 2012-12-04 11:56 ` Martin Jansa
1 sibling, 0 replies; 11+ messages in thread
From: Martin Jansa @ 2012-12-04 11:56 UTC (permalink / raw)
To: openembedded-devel; +Cc: Anders Darander
[-- Attachment #1: Type: text/plain, Size: 1693 bytes --]
On Tue, Dec 04, 2012 at 09:21:23AM +0000, Paul Eggleton wrote:
> On Tuesday 04 December 2012 08:44:30 Anders Darander wrote:
> > * Paul Eggleton <paul.eggleton@linux.intel.com> [121122 17:50]:
> > > * Move common definitions to the inc file
> > > * Drop override of do_configure which doesn't seem to be needed anymore
> > > * Fold ntp-ssl into the ntp recipe as a PACKAGECONFIG option for those
> > > who want it (default to off) and fix configure-time checks to detect
> > > OpenSSL properly so that it gets enabled when selected
> > > * Remove ntp-bin package and put its contents in currently empty
> > > ntp-utils package (with migration path)
> > > * Fix hardcoded paths in ntpd initscript
> > > * Specify ntpd.conf as a configuration file for packaging purposes
> > > * Rearrange so that packaging definitions are towards the end in the
> > > expected order
> > > * Delete unused "ntp" initscript file
> > > * Add SUMMARY
> > > * Update HOMEPAGE
> >
> > Would this patch be acceptable for a push to danny? Or is it to
> > intrusive?
> >
> > If it's to intrusive, we need to update the SRC_URI checksums in danny,
> > as they're currently not matching the downloaded file...
> >
> > If needed, I can create a SRC_URI-patch for danny, though I'd prefer to
> > get this one in if possible.
>
> IMO the original recipe was horribly broken, so I'd definitely support having
> this patch applied to danny as well, assuming people have given it a
> reasonable amount of runtime testing and everything's OK.
I agree and I plan to send pull-request for danny with this today.
Cheers,
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-12-04 12:10 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22 16:49 [meta-networking][PATCH v2 0/2] ntp fixes Paul Eggleton
2012-11-22 16:49 ` [meta-networking][PATCH v2 1/2] ntp: cleanup recipes and fix SSL support Paul Eggleton
2012-12-04 7:44 ` [danny?] " Anders Darander
2012-12-04 9:21 ` Paul Eggleton
2012-12-04 11:20 ` Burton, Ross
2012-12-04 11:21 ` Burton, Ross
2012-12-04 11:56 ` Martin Jansa
2012-11-22 16:49 ` [meta-networking][PATCH v2 2/2] ntp: make servers configurable and default to none configured Paul Eggleton
2012-11-22 17:05 ` Paul Eggleton
2012-11-26 16:28 ` [meta-networking][PATCH v2 0/2] ntp fixes Martin Jansa
2012-11-27 19:40 ` Joe MacDonald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox