Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [meta-networking][PATCH 0/2] ntp fixes
@ 2012-11-21 17:29 Paul Eggleton
  2012-11-21 17:29 ` [meta-networking][PATCH 1/2] ntp: cleanup recipes and fix SSL support Paul Eggleton
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Paul Eggleton @ 2012-11-21 17:29 UTC (permalink / raw)
  To: openembedded-devel

The following changes since commit 9637cb304f1e9116b037d0afd69014836a2fa512:

  Revert "ntp: Clean up recipes" (2012-11-21 08:32:18 -0500)

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

 .../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        |   83 ++++++++++++++++----
 meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb |   44 +----------
 4 files changed, 130 insertions(+), 67 deletions(-)
 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] 7+ messages in thread

* [meta-networking][PATCH 1/2] ntp: cleanup recipes and fix SSL support
  2012-11-21 17:29 [meta-networking][PATCH 0/2] ntp fixes Paul Eggleton
@ 2012-11-21 17:29 ` Paul Eggleton
  2012-11-21 17:29 ` [meta-networking][PATCH 2/2] ntp: make servers configurable and default to none configured Paul Eggleton
  2012-11-21 20:31 ` [meta-networking][PATCH 0/2] ntp fixes Otavio Salvador
  2 siblings, 0 replies; 7+ messages in thread
From: Paul Eggleton @ 2012-11-21 17:29 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
* Rearrange so that packaging definitions are towards the end in the
  expected order
* 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>
---
 .../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        |   73 ++++++++++++++++----
 meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb |   44 +-----------
 4 files changed, 120 insertions(+), 67 deletions(-)
 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/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..d20bc2e 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -1,35 +1,78 @@
+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"
 
+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
+	install -d ${D}/${sysconfdir}/network/if-up.d
+	install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
+}
+
 PACKAGES += "ntpdate ${PN}-bin ${PN}-tickadj ${PN}-utils"
 # NOTE: you don't need ntpdate, use "ntpd -q -g -x"
 # or the ntpdate systemd service
 
+# 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"
+
+RSUGGESTS_${PN} = "iana-etc"
+
+FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace \
+                   ${bindir}/sntp ${bindir}/ntp-keygen"
+FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir}"
+FILES_${PN}-tickadj = "${bindir}/tickadj"
+FILES_${PN}-utils = "${bindir}/*"
+
 # This should use rc.update
-FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/init.d/ntpdate"
+FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate ${sysconfdir}/init.d/ntpdate"
+
+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] 7+ messages in thread

* [meta-networking][PATCH 2/2] ntp: make servers configurable and default to none configured
  2012-11-21 17:29 [meta-networking][PATCH 0/2] ntp fixes Paul Eggleton
  2012-11-21 17:29 ` [meta-networking][PATCH 1/2] ntp: cleanup recipes and fix SSL support Paul Eggleton
@ 2012-11-21 17:29 ` Paul Eggleton
  2012-11-21 17:37   ` Martin Jansa
  2012-11-21 20:31 ` [meta-networking][PATCH 0/2] ntp fixes Otavio Salvador
  2 siblings, 1 reply; 7+ messages in thread
From: Paul Eggleton @ 2012-11-21 17:29 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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta-networking/recipes-support/ntp/ntp.inc |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index d20bc2e..b54608a 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -33,12 +33,22 @@ PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
                           --without-openssl --without-crypto, \
                           openssl"
 
+# This should be set in the distro configuration
+NTP_SERVERS ??= ""
+
+python __anonymous() {
+    if not d.getVar("NTP_SERVERS", True):
+        raise bb.parse.SkipPackage("Please set NTP_SERVERS in order to build ntp - see http://www.openembedded.org/wiki/NTP for details")
+}
+
 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
+
+	sed -i "s/pool.ntp.org/${NTP_SERVERS}/g" ${D}/${sysconfdir}/ntp.conf ${D}/${sysconfdir}/network/if-up.d/ntpdate
 }
 
 PACKAGES += "ntpdate ${PN}-bin ${PN}-tickadj ${PN}-utils"
@@ -71,7 +81,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 * * * *    /usr/bin/ntpdate -b -s -u ${NTP_SERVERS}" >> /var/spool/cron/root
         fi
 fi
 }
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [meta-networking][PATCH 2/2] ntp: make servers configurable and default to none configured
  2012-11-21 17:29 ` [meta-networking][PATCH 2/2] ntp: make servers configurable and default to none configured Paul Eggleton
@ 2012-11-21 17:37   ` Martin Jansa
  2012-11-21 17:51     ` Paul Eggleton
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2012-11-21 17:37 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3117 bytes --]

On Wed, Nov 21, 2012 at 05:29:30PM +0000, 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.
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  meta-networking/recipes-support/ntp/ntp.inc |   12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
> index d20bc2e..b54608a 100644
> --- a/meta-networking/recipes-support/ntp/ntp.inc
> +++ b/meta-networking/recipes-support/ntp/ntp.inc
> @@ -33,12 +33,22 @@ PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
>                            --without-openssl --without-crypto, \
>                            openssl"
>  
> +# This should be set in the distro configuration
> +NTP_SERVERS ??= ""
> +
> +python __anonymous() {
> +    if not d.getVar("NTP_SERVERS", True):
> +        raise bb.parse.SkipPackage("Please set NTP_SERVERS in order to build ntp - see http://www.openembedded.org/wiki/NTP for details")
> +}

Cannot we move this logic to target?

I mean ntpdate can be usefull for end-user even without this cron job.

We can add something like
/etc/default/ntp
NTP_SERVERS=""

And change cron job as well as that systemd .service file we talked
about before to show
"Please set correct NPT_SERVERS in /etc/default/ntp"
instead of failing (in systemd .service file case) or not being able to
build ntpdate package unless you have distro with own ntp pool.

On other hand distro with own ntp pool can provide own value in
/etc/default/ntp with .bbappend, so their users won't ever see this on
target.

Cheers,

> +
>  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
> +
> +	sed -i "s/pool.ntp.org/${NTP_SERVERS}/g" ${D}/${sysconfdir}/ntp.conf ${D}/${sysconfdir}/network/if-up.d/ntpdate
>  }
>  
>  PACKAGES += "ntpdate ${PN}-bin ${PN}-tickadj ${PN}-utils"
> @@ -71,7 +81,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 * * * *    /usr/bin/ntpdate -b -s -u ${NTP_SERVERS}" >> /var/spool/cron/root
>          fi
>  fi
>  }
> -- 
> 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] 7+ messages in thread

* Re: [meta-networking][PATCH 2/2] ntp: make servers configurable and default to none configured
  2012-11-21 17:37   ` Martin Jansa
@ 2012-11-21 17:51     ` Paul Eggleton
  2012-11-22  9:34       ` Jack Mitchell
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Eggleton @ 2012-11-21 17:51 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

On Wednesday 21 November 2012 18:37:54 Martin Jansa wrote:
> On Wed, Nov 21, 2012 at 05:29:30PM +0000, 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.
> > 
> > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > ---
> > 
> >  meta-networking/recipes-support/ntp/ntp.inc |   12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta-networking/recipes-support/ntp/ntp.inc
> > b/meta-networking/recipes-support/ntp/ntp.inc index d20bc2e..b54608a
> > 100644
> > --- a/meta-networking/recipes-support/ntp/ntp.inc
> > +++ b/meta-networking/recipes-support/ntp/ntp.inc
> > @@ -33,12 +33,22 @@ PACKAGECONFIG[openssl] =
> > "--with-openssl-libdir=${STAGING_LIBDIR} \> 
> >                            --without-openssl --without-crypto, \
> >                            openssl"
> > 
> > +# This should be set in the distro configuration
> > +NTP_SERVERS ??= ""
> > +
> > +python __anonymous() {
> > +    if not d.getVar("NTP_SERVERS", True):
> > +        raise bb.parse.SkipPackage("Please set NTP_SERVERS in order to
> > build ntp - see http://www.openembedded.org/wiki/NTP for details") +}
> 
> Cannot we move this logic to target?
> 
> I mean ntpdate can be usefull for end-user even without this cron job.
> 
> We can add something like
> /etc/default/ntp
> NTP_SERVERS=""
> 
> And change cron job as well as that systemd .service file we talked
> about before to show
> "Please set correct NPT_SERVERS in /etc/default/ntp"
> instead of failing (in systemd .service file case) or not being able to
> build ntpdate package unless you have distro with own ntp pool.
> 
> On other hand distro with own ntp pool can provide own value in
> /etc/default/ntp with .bbappend, so their users won't ever see this on
> target.

Sure, this is an alternative approach. It will work for everything except 
ntp.conf, although for that we can just clear out that value in the file and 
get the distro to set their own custom version if they're going to use ntpd.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [meta-networking][PATCH 0/2] ntp fixes
  2012-11-21 17:29 [meta-networking][PATCH 0/2] ntp fixes Paul Eggleton
  2012-11-21 17:29 ` [meta-networking][PATCH 1/2] ntp: cleanup recipes and fix SSL support Paul Eggleton
  2012-11-21 17:29 ` [meta-networking][PATCH 2/2] ntp: make servers configurable and default to none configured Paul Eggleton
@ 2012-11-21 20:31 ` Otavio Salvador
  2 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2012-11-21 20:31 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Nov 21, 2012 at 3:29 PM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> The following changes since commit 9637cb304f1e9116b037d0afd69014836a2fa512:
>
>   Revert "ntp: Clean up recipes" (2012-11-21 08:32:18 -0500)
>
> 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

Did you check my previous patches which move it to meta-networking? We
need to fix it for systemd.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [meta-networking][PATCH 2/2] ntp: make servers configurable and default to none configured
  2012-11-21 17:51     ` Paul Eggleton
@ 2012-11-22  9:34       ` Jack Mitchell
  0 siblings, 0 replies; 7+ messages in thread
From: Jack Mitchell @ 2012-11-22  9:34 UTC (permalink / raw)
  To: openembedded-devel

On 21/11/12 17:51, Paul Eggleton wrote:
> On Wednesday 21 November 2012 18:37:54 Martin Jansa wrote:
>> On Wed, Nov 21, 2012 at 05:29:30PM +0000, 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.
>>>
>>> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
>>> ---
>>>
>>>   meta-networking/recipes-support/ntp/ntp.inc |   12 +++++++++++-
>>>   1 file changed, 11 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta-networking/recipes-support/ntp/ntp.inc
>>> b/meta-networking/recipes-support/ntp/ntp.inc index d20bc2e..b54608a
>>> 100644
>>> --- a/meta-networking/recipes-support/ntp/ntp.inc
>>> +++ b/meta-networking/recipes-support/ntp/ntp.inc
>>> @@ -33,12 +33,22 @@ PACKAGECONFIG[openssl] =
>>> "--with-openssl-libdir=${STAGING_LIBDIR} \>
>>>                             --without-openssl --without-crypto, \
>>>                             openssl"
>>>
>>> +# This should be set in the distro configuration
>>> +NTP_SERVERS ??= ""
>>> +
>>> +python __anonymous() {
>>> +    if not d.getVar("NTP_SERVERS", True):
>>> +        raise bb.parse.SkipPackage("Please set NTP_SERVERS in order to
>>> build ntp - see http://www.openembedded.org/wiki/NTP for details") +}
>> Cannot we move this logic to target?
>>
>> I mean ntpdate can be usefull for end-user even without this cron job.
>>
>> We can add something like
>> /etc/default/ntp
>> NTP_SERVERS=""
>>
>> And change cron job as well as that systemd .service file we talked
>> about before to show
>> "Please set correct NPT_SERVERS in /etc/default/ntp"
>> instead of failing (in systemd .service file case) or not being able to
>> build ntpdate package unless you have distro with own ntp pool.
>>
>> On other hand distro with own ntp pool can provide own value in
>> /etc/default/ntp with .bbappend, so their users won't ever see this on
>> target.
> Sure, this is an alternative approach. It will work for everything except
> ntp.conf, although for that we can just clear out that value in the file and
> get the distro to set their own custom version if they're going to use ntpd.
>
> Cheers,
> Paul
>

This would be beneficial for me too as we intend to ship ntpd but it 
will be mainly for use with internal servers so I will not want or need 
a default server set.

Cheers,

-- 

   Jack Mitchell (jack@embed.me.uk)
   Embedded Systems Engineer
   http://www.embed.me.uk

--




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-22  9:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-21 17:29 [meta-networking][PATCH 0/2] ntp fixes Paul Eggleton
2012-11-21 17:29 ` [meta-networking][PATCH 1/2] ntp: cleanup recipes and fix SSL support Paul Eggleton
2012-11-21 17:29 ` [meta-networking][PATCH 2/2] ntp: make servers configurable and default to none configured Paul Eggleton
2012-11-21 17:37   ` Martin Jansa
2012-11-21 17:51     ` Paul Eggleton
2012-11-22  9:34       ` Jack Mitchell
2012-11-21 20:31 ` [meta-networking][PATCH 0/2] ntp fixes Otavio Salvador

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox