Comment 1 for bug 1512980

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Some initial analysis to support further decisions

#### Version check ####

Version upstream
4.2.8p4 2015/10/21

Latest versions in Ubuntu
1:4.2.6.p3+dfsg-1ubuntu3.6 | precise-security
1:4.2.6.p5+dfsg-3ubuntu2.14.04.5 | trusty-security
1:4.2.6.p5+dfsg-3ubuntu6.2 | vivid-security
1:4.2.6.p5+dfsg-3ubuntu8.1 | wily-security
1:4.2.6.p5+dfsg-3ubuntu8.1 | xenial

Latest versions in Debian
1:4.2.6.p2+dfsg-1+b1 | squeeze
1:4.2.6.p2+dfsg-1+deb6u4 | squeeze-lts
1:4.2.6.p5+dfsg-2+deb7u6 | wheezy-security
1:4.2.6.p5+dfsg-7 | jessie
1:4.2.6.p5+dfsg-7+deb8u1 | jessie-security
1:4.2.8p4+dfsg-3 | stretch
1:4.2.8p4+dfsg-3+b1 | sid

Since Ubuntu is still on 4.2.6 it is worth to check how much the diff 4.2.6p5 to 4.2.8p4 will be.
After doing so it is clear, that this is a new major version.
The changelog between those versions is 2482 entries long.

To the pps functionality alone there were 12 patches.
There are also some preventive security fixing which has no CVE to cause it to go into ubuntu yet which might be worth to leverage.

#### Get it to build ####

Testing "buildability" of debians 4.2.8p4 + PPS in Xenial environment.
A config currently delivers that regarding PPS:
checking for sys/timepps.h... no
checking timepps.h usability... no
checking timepps.h presence... no
checking for timepps.h... no
checking sys/ppsclock.h usability... no
checking sys/ppsclock.h presence... no
checking for sys/ppsclock.h... no
checking sys/ppstime.h usability... no
checking sys/ppstime.h presence... no
checking for sys/ppstime.h... no
checking for struct ppsclockev... no
checking for TTY PPS ioctl TIOCGPPSEV... no
checking for TTY PPS ioctl TIOCSPPS... no
checking for TTY PPS ioctl CIOGETEV... no
checking ATOM PPS interface... yes
checking for sys/timepps.h... no

So most resolve to no due to the lack of sys/timepps.h being around.
The next missing is sys/ppstime.h

There is no explicit pps configure option to be considered, so building with might "just" need providing the headers.
To get those one would "just need" a build dependency to pps-tools.

Installing pps-tools provides sys/timepps.h but that doesn't APPERA to fix everything

checking for sys/timepps.h... yes
checking timepps.h usability... no
checking timepps.h presence... no
checking for timepps.h... no
checking sys/ppsclock.h usability... no
checking sys/ppsclock.h presence... no
checking for sys/ppsclock.h... no
checking sys/ppstime.h usability... no
checking sys/ppstime.h presence... no
checking for sys/ppstime.h... no
checking for struct ppsclockev... no
checking for sys/timepps.h... yes

Most solutions out there for ubuntu/debian recompile ntp and sometimes also the kernel for kernel support.
Whoever works on this should study:
- http://superuser.com/questions/828036/how-can-i-check-whether-my-ntp-daemon-has-pps-support
- http://www.worldtimesolutions.com/support/ntp/Debian_Lenny_Linux_PPS_support_for_ntpd.html

ppsclock.h seems to be an older version and we don't have to care too much.

Also these checks refer to older positions of the library formerly in /usr/include now in /usr/include/sys
  checking timepps.h usability... no
  checking timepps.h presence... no

So while the configure output can be confusing having pps-tools around will make it work.
So it really just should be a build dependency.

#### Discussions around this ####

But as things are never easy it turned out that this is quite a bit of back and forth that has to be resolved first:
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/826873 - ATOM refclock driver not compiled into ntpd
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/805661 - NO reference clock support. I need Oncore ref clock support in ntp

Both end with it should be fixed in debian as already suggested multiple times, but so far no one in debian did.

So even more related discussions can be found in:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691672 - build-depend on pps-tools - STALLED, no progress since July
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570233 - libc6-dev: please add timepps.h - CLOSED by creating pps-tools
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=241548 - Request PPS refclock support (Oncore) - BLOCKED waiting on 691672
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790973 - ntp: does not do PPS sync - OPEN
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=793940 - ntp: does not use pps

#### TL;DR ####
- Debian 241548, 790973, 793940 are acctually clones of 691672
- LP 805661, 826873 wait for Debian 691672
- Latest Debian is a major version ahead (~2482 changes, 12 to PPS, 29 Security)
- For pps we essentially miss a build dependency to pps-tools from universe (MIR) (no ubuntu delta)
- Discussion in Debian 691672 came to the right conclusion, but makes no progress