Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-networking][PATCH 2/2] ntp: make servers configurable and default to none configured
Date: Wed, 21 Nov 2012 17:51:10 +0000	[thread overview]
Message-ID: <2060735.4IBGo344JD@helios> (raw)
In-Reply-To: <20121121173754.GN12637@jama.jama.net>

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



  reply	other threads:[~2012-11-21 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-11-22  9:34       ` Jack Mitchell
2012-11-21 20:31 ` [meta-networking][PATCH 0/2] ntp fixes Otavio Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2060735.4IBGo344JD@helios \
    --to=paul.eggleton@linux.intel.com \
    --cc=martin.jansa@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox