Re: [ntp:questions] NTP, GPSD PPS

2014-12-13 Thread David Taylor

On 10/12/2014 12:39, Miroslav Lichvar wrote:

On Wed, Dec 10, 2014 at 11:50:22AM +, David Taylor wrote:

With -D 4 I get a list of devices ending with PPS, but presumably that is
not the same as KPPS?


In gpsd the PPS without K is the userspace timestamping. With kernel
timestamping the log looks like this:

gpsd:PROG: PPS edge: 1, cycle: 100 uSec, duration:  78 uSec @ 
1418214654.07216
gpsd:INFO: PPS hooks called with accepted 1418214653.99223 offset 
0.00777
gpsd:PROG: PPS edge accepted 1418214653.99223 offset 0.00777
gpsd:PROG: KPPS assert 1418214653.99223, sequence: 73 - clear  
1418214654.20573, sequence: 73
gpsd:PROG: KPPS data: using clear
gpsd:PROG: KPPS cycle:  99 uSec, duration:  21 uSec @ 
1418214654.20573


I did try an apt-get first to update gpsd but it
seems I have the most recent available.  It seems I have 3.6.  Do I need a
development version or...?


The kernel PPS support was added in 3.0 or so, but gpsd needs to be
compiled with the timepps.h header, similarly to ntpd for the ATOM and
other drivers. Also, some gpsd versions had bugs in the PPS/KPPS
support and I'm not sure if 3.6 was a good or bad. The latest version
- 3.11 is working well for me, 3.10 was not.


Many thanks, Miroslav.

For some reason, gpsd seems to be stuck at a lower release for the 
Raspberry Pi version of Debian, so I will have a go at recompiling it 
once I can find the right instructions!  That's if there's no 
development version I can get with apt-get, and I haven't found out how 
to do that yet.  Still learning!

--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP PPS, part 2 ;)

2014-12-13 Thread Rob
Harlan Stenn st...@ntp.org wrote:
 Rob writes:
 Harlan Stenn st...@ntp.org wrote:
  Rob writes:
  Harlan Stenn st...@ntp.org wrote:
   If you disgree and think NTP should provide the file all the time, then:
  
   - how do you propose we find out if the underlying API is really
   provided in the currently-running kernel?
  
  The source of the includefile does absolutely nothing in the ways of
  solving that problem!
 
  If the file isn't there we don't go looking for the API that isn't
  there, either.
 
  Or am I missing something?
 
 The file is only used at build time.  It tells absolutely nothing
 about the kernel configuration, certainly not in the system the binary
 is running on.

 You and I have completely different understandings about how APIs work
 and what this header file is used for.

 So you want *us* to add kernel-specific files to live along side
 include/timepps-{SCO,Solaris,SunOS}.h, except you want *us* to deal with
 tracking any changes caused by kernel updates?  It's interesting enough
 that we have to do this for Windows.

I am not commenting on the whoe provides what but on your claim that
using an available timepps.h would do anything to detect if the PPS API
is available on the system.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP PPS, part 2 ;)

2014-12-13 Thread Rob
Harlan Stenn st...@ntp.org wrote:
 Paul writes:
 --001a11c12566ef4fbd050a04ed7c
 Content-Type: text/plain; charset=ISO-8859-1
 
 On Dec 12, 2014 12:39 AM, Harlan Stenn st...@ntp.org wrote:
  It's an OS-specific file that should be provided by the OS if the
  underlying API exists.
 
 To repeat what I reminded you of last time.  Linux *doesn't* have the
 API.  The macros in timepps provide the RFC compliant API.  The NTP
 developers should stop depending on the pps-tools maintainer to
 provide the macros and rewrite the module to use the native ioctl
 interface or ask the downstream maintainers to take on that task.

 Who wants to do this work?

 NTF will take it on after it gets funding for developers.  I'd love to
 see that happen sooner rather than later.

Oh come on...  this is just a matter of copying one file of a few KB
into the include directory of the ntp package and you are done.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP PPS, part 2 ;)

2014-12-13 Thread Rob
Harlan Stenn st...@ntp.org wrote:
 Rob writes:
 Harlan Stenn st...@ntp.org wrote:
  Martin Burnicki writes:
  IMO the best approach would be to detect this at runtime.
 
  That means we'd need a header file...
 
  If I'm not mistaken (and it's getting late for me), if the header file
  is missing we don't expect the API.  If the header file is present we
  expect it to do the right thing and even then we check error returns
  from the API.
 
 But the problem is the file is normally not there, even when the API is.

 No, the problem is that it's not normally there on *linux* boxes where
 the file is maintained in a separate package.

 It *is* provided by the other OSes that implement this API.

Thos OSes probably have no package management and/or always install
everything even when the user has not asked for it.

Again, the solution is simple: building a correct ntpd depends on
the availability of the pps-tools package on the build system.
It should be added to the build dependencies to solve the problem.

Current build dependencies on Debian are:

debhelper (= 4.2.12), libreadline-dev, lynx, libcap-dev, libedit-dev,
libperl-dev, libssl-dev (= 0.9), libsnmp-dev, quilt (= 0.40),
libevent-dev

Add pps-tools to that list and the problem is over, finito.
The only problem we face is that people don't want to type 'A, pps-toolsESCZZ'
and finish a long-running discussion.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP, GPSD PPS

2014-12-13 Thread Paul
On Sat, Dec 13, 2014 at 2:52 AM, David Taylor 
david-tay...@blueyonder.co.uk.invalid wrote:

 For some reason, gpsd seems to be stuck at a lower release for the
 Raspberry Pi version of Debian, so I will have a go at recompiling it once
 I can find the right instructions!  That's if there's no development
 version I can get with apt-get, and I haven't found out how to do that
 yet.  Still learning!


If you don't want to cross-compile you need gcc, libncurses5-dev and
scons.  It's slow but simple.
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP PPS, part 2 ;)

2014-12-13 Thread Paul
On Sat, Dec 13, 2014 at 5:01 AM, Rob nom...@example.com wrote:

 Current build dependencies on Debian are:


That's better said on my install of Debian.  I wouldn't expect it be the
case on all release tracks and it doesn't help Ubuntu.

Of course for an S1 operator the fact that this approach means building
4.2.6p5 or even earlier is another insufficiency.

I don't understand why you continue to suggest using a stale source tree
for building S1 servers.  It's no harder to build from the developer source.
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP PPS, part 2 ;)

2014-12-13 Thread Rob
Paul tik-...@bodosom.net wrote:
 On Sat, Dec 13, 2014 at 5:01 AM, Rob nom...@example.com wrote:

 Current build dependencies on Debian are:


 That's better said on my install of Debian.  I wouldn't expect it be the
 case on all release tracks and it doesn't help Ubuntu.

 Of course for an S1 operator the fact that this approach means building
 4.2.6p5 or even earlier is another insufficiency.

 I don't understand why you continue to suggest using a stale source tree
 for building S1 servers.  It's no harder to build from the developer source.

You know what?  On the ntp-dev package for Debian THE BUILD DEPENDENCIES
ARE INCORRECT AS WELL!!

Those kind of things are hard, very hard, to get fixed.
In fact on OpenSUSE it is the same thing.

It has nothing to do with the ntpd source version, it is just the bickering
about who provides what and who puts what in their package description.

Apparently when you want to run a server PPS, you have to build the
binary yourself.   For no real reason, of course.

Fortunately there is gpsd.  At least those people know that you need
to write a selfcontained package with directions and examples when you
want things to be right.

(another failure of the ntpd project: not providing a usable default
config file, so distributors have to put one together and causing config
mistakes because it is not their field of knowledge)

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] pool.ntp.org and authentication

2014-12-13 Thread d_anderson
Hi all

I was wondering if it makes sense to set up Autokey authentication on a client 
for when it wants to sync time from *.pool.npt.org. My goal is to encrypt 
communication between client and server and to make sure the server is really 
the one it claims to be. Can this be even done with pools?


___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP PPS, part 2 ;)

2014-12-13 Thread Paul
On Sat, Dec 13, 2014 at 3:16 PM, Rob nom...@example.com wrote:

 You know what?  On the ntp-dev package for Debian THE BUILD DEPENDENCIES
 ARE INCORRECT AS WELL!!


This is an example of what NTF doesn't want to deal with.  My instance of
Wheezy doesn't have ntp-dev.


 Fortunately there is gpsd.


You do realize gpsd pps support requires timepps which isn't in the 3.9 or
3.11 tarballs (those are the ones I have at hand).
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP PPS, part 2 ;)

2014-12-13 Thread Harlan Stenn
Rob writes:
 Harlan Stenn st...@ntp.org wrote:
  Paul writes:
  --001a11c12566ef4fbd050a04ed7c
  Content-Type: text/plain; charset=ISO-8859-1
  
  On Dec 12, 2014 12:39 AM, Harlan Stenn st...@ntp.org wrote:
   It's an OS-specific file that should be provided by the OS if the
   underlying API exists.
  
  To repeat what I reminded you of last time.  Linux *doesn't* have the
  API.  The macros in timepps provide the RFC compliant API.  The NTP
  developers should stop depending on the pps-tools maintainer to
  provide the macros and rewrite the module to use the native ioctl
  interface or ask the downstream maintainers to take on that task.
 
  Who wants to do this work?
 
  NTF will take it on after it gets funding for developers.  I'd love to
  see that happen sooner rather than later.
 
 Oh come on...  this is just a matter of copying one file of a few KB
 into the include directory of the ntp package and you are done.

You have clearly never done releng work.

H
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] pool.ntp.org and authentication

2014-12-13 Thread Harlan Stenn
d_anderson writes:
 Hi all
 
 I was wondering if it makes sense to set up Autokey authentication on
 a client for when it wants to sync time from *.pool.npt.org. My goal
 is to encrypt communication between client and server and to make sure
 the server is really the one it claims to be. Can this be even done
 with pools?

Not with the current technology.

First, autokey is about to become deprecated in favor of NTS - Network
Time Security:

 https://tools.ietf.org/html/draft-ietf-ntp-network-time-security-05

If that wasn't the case, autokey (which was designed a long time ago)
needs the server to have a unique key.  For pool servers, every pool
server would have to share the same private key.  That would make the
security provided almost nonexistent.  If we changed the protocol to use
some other mechanism to get the server's key (probably based on the IP)
we'd need to change the autokey protocol.  That would not appear to be a
worthwhile exercise given that we intend to deprecate autokey in favor
of NTS soon.

H
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Number of Stratum 1 Stratum 2 Peers

2014-12-13 Thread Brian Inglis

On 2014-12-12 03:25, Harlan Stenn wrote:


It's pretty easy to download and install a leapsecond file, and ntpd
will pay attention to that...


Not that easy - unless you are one of the lucky few to have encrypted
access to a NIST source, when it may be automatic.

You have to use a NIST server, as no other sources provide access to the NIST
leapseconds file, find one where FTP access is available and/or works reliably
from your system, schedule a download every six months, check the signature,
and if all goes well, replace your current file.

They also use their own weird approach to checking the file signature from
the last century, and source code to build to do so, rather than standard
approaches built into utilities available for and on modern systems.

You also have to specify in ntp.conf where the leapseconds file is stored,
whereas most other external configuration information can be passed on the
ntpd command line.

It would be interesting to know what percentage of the pool servers even use
a leapseconds file, and how many of those have a valid copy.
I am certain that very few clients use a leapseconds file.

OTOH the timezone/zoneinfo package uses its own leapseconds file (for right
time - now zoneinfo-leaps), and distributes that and the original, a script
that checks and converts it to their own format, and utilities that use it.

--
Take care. Thanks, Brian Inglis
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Number of Stratum 1 Stratum 2 Peers

2014-12-13 Thread Harlan Stenn
Brian Inglis writes:
 On 2014-12-12 03:25, Harlan Stenn wrote:
 
  It's pretty easy to download and install a leapsecond file, and ntpd
  will pay attention to that...
 
 Not that easy - unless you are one of the lucky few to have encrypted
 access to a NIST source, when it may be automatic.

http://www.ietf.org/timezones/data/leap-seconds.list

H
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Number of Stratum 1 Stratum 2 Peers

2014-12-13 Thread Jan Ceuleers
On 14/12/14 03:28, Harlan Stenn wrote:
 Not that easy - unless you are one of the lucky few to have encrypted
 access to a NIST source, when it may be automatic.
 
 http://www.ietf.org/timezones/data/leap-seconds.list

Added to the Wiki at http://support.ntp.org/bin/view/Support/ConfiguringNTP

The IETF also serve their content over SSL if anyone thinks this
increases the level of trust one can have in that content.
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions