• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.dockerfiles/H07-Jun-2021-11068

.github/H07-Jun-2021-1815

attic/H07-Jun-2021-2,2061,682

contrib/H07-Jun-2021-1,279905

devel/H03-May-2022-15,78412,749

docs/H03-May-2022-18,96015,303

etc/H07-Jun-2021-496355

include/H07-Jun-2021-5,8673,130

libaes_siv/H03-May-2022-2,3981,959

libjsmn/H03-May-2022-1,5101,217

libntp/H07-Jun-2021-8,7845,566

libparse/H07-Jun-2021-5,3953,217

ntpclients/H03-May-2022-8,0416,334

ntpd/H07-Jun-2021-54,96236,841

ntpfrob/H07-Jun-2021-946696

ntptime/H07-Jun-2021-566463

packaging/H07-Jun-2021-1,066800

pylib/H07-Jun-2021-5,9084,595

tests/H07-Jun-2021-19,81715,388

wafhelpers/H07-Jun-2021-1,068819

www/H03-May-2022-3223

.gitignoreH A D07-Jun-202151 76

.gitlab-ci-docker-images.ymlH A D07-Jun-20211.7 KiB8866

.gitlab-ci.ymlH A D07-Jun-202118.2 KiB519454

.gitlab-opttest-ci.ymlH A D07-Jun-20214.6 KiB157136

HOWTO-OpenSSLH A D07-Jun-20211.6 KiB5846

INSTALL.adocH A D07-Jun-202111.1 KiB307222

LICENSE.adocH A D07-Jun-20216.3 KiB140109

NEWS.adocH A D07-Jun-202126.5 KiB680488

README-PYTHONH A D07-Jun-20213.6 KiB9171

README.adocH A D07-Jun-20213.2 KiB9461

VERSIONH A D07-Jun-20216 21

buildprepH A D07-Jun-20218.7 KiB343281

lgtm.template.ymlH A D07-Jun-202118 KiB398383

pylintrcH A D07-Jun-2021739 2621

wafH A D07-Jun-2021102.3 KiB174132

wscriptH A D07-Jun-202141.7 KiB1,164996

README-PYTHON

1If you are trying to debug something like:
2  ImportError: No module named ntp
3you have come to the right place.
4
5The default location where we install our python libraries is
6  /usr/local/lib/pythonX.Y/site-packages/
7where X and Y are the python version numbers.
8
9Unfortunately, that's not on the default search path of several
10OSes/distros, in particular Fedora and NetBSD.
11
12
13Python has a search path that is used to find library modules when
14you import them.  You can see your search path with:
15  python2 -c "import sys; print sys.path"
16or
17  python3 -c "import sys; print(sys.path)"
18
19Info on Python's search path:
20  https://docs.python.org/2/tutorial/modules.html
21or
22  https://docs.python.org/3/tutorial/modules.html
23
24
25
26There are several ways to make things work.
27
281: You can modify the location where waf will install the libraries.
29For NetBSD, something like this should work:
30  ./waf configure \
31    --pythondir=/usr/pkg/lib/python2.7/site-packages \
32    --pythonarchdir=/usr/pkg/lib/python2.7/site-packages \
33    ...
34You need to specify it at configure time.  Install time is too late.
35
36
372: You can setup your PYTHONPATH with something like this:
38  export PYTHONPATH=/usr/local/lib/python2.7/site-packages
39For bash, you can add that line to your .bashrc or the system /etc/bashrc
40If you don't put it in the system file, all users will have to do this,
41including root if root uses any ntp scripts.
42
43
443: You can add to the default search path by setting up a .pth file
45with something like this:
46  echo /usr/local/lib/python2.7/site-packages > \
47    /usr/lib/python2.7/site-packages/ntpsec.pth
48This works for all users, including root.
49Note that the pth file must be on the default Python search path.
50
51
52OTOH if you run into something like:
53    Traceback (most recent call last):
54      File "/usr/bin/ntpdig", line 419, in <module>
55        timeout=timeout)
56      File "/usr/bin/ntpdig", line 109, in queryhost
57        keyid, keytype, passwd)
58      File "/usr/lib/python3/dist-packages/ntp/packet.py", line 1747, in compute_mac
59        if not ntp.ntpc.checkname(keytype):
60    AttributeError: module 'ntp.ntpc' has no attribute 'checkname'
61
62Then you probably want to either uninstall the previous Python extension, or
63install one after 1.1.9 (798b93) by adding the '--enable-pylib ext' option
64without quotes.
65
66OTOH if you are running into something like:
67    Traceback (most recent call last):
68    File "/usr/bin/ntpdig", line 19, in <module>
69        import ntp.packet
70    File "/usr/lib/python3/dist-packages/ntp/packet.py", line 219, in <module>
71        import ntp.ntpc
72    File "/usr/lib/python3/dist-packages/ntp/ntpc.py", line 52, in <module>
73        _ntpc = _importado()
74    File "/usr/lib/python3/dist-packages/ntp/ntpc.py", line 38, in _importado
75        return _dlo(ntpc_paths)
76    File "/usr/lib/python3/dist-packages/ntp/ntpc.py", line 49, in _dlo
77        raise OSError("Can't find %s library" % LIB)
78    OSError: Can't find ntpc library
79
80That means is that ntpc.py looked for libnptc.so in the usual places and could
81not find it.  If it is being installed to the wrong location on your platform,
82you can correct the install location using: waf configure --libdir=  If you
83are intentionally installing to a non-default location, you can modify the
84dynamic linker's search path globally (e.g. /etc/ld.so.conf or
85/etc/ld.so.conf.d/) or in your environment (e.g. LD_LIBRARY_PATH).
86
87On some platforms, it is necessary to run ldconfig after installing libraries.
88This is normally done by the waf install step, but it may have failed.  When
89using a temporary --destdir (e.g. as part of package builds), ldconfig must be
90run manually after the library is installed to its final location.
91

README.adoc

1= The NTPsec distribution base directory =
2
3This directory and its subdirectories contain NTPSec, a
4security-hardened implementation of Network Time Protocol Version 4.
5You can browse a summary of differences from legacy NTP here:
6
7https://docs.ntpsec.org/latest/ntpsec.html
8
9The contents of the base directory are given in this file. The contents of
10subdirectories are usually given in the README files in each subdirectory.
11
12The base directory ./ contains the configuration files, source
13directories and related stuff:
14
15INSTALL.adoc::	Generic installation instructions.
16
17LICENSE.adoc::	Software licensing agreement.
18
19NEWS.adoc::	What's new in this release.
20
21README.adoc::	This file.
22
23VERSION::	The version stamp, to be used by scripts and programs.
24
25lgtm.template.yml:: Configuration file for LGTM code analysis
26
27attic/::	Directory containing source code that is *not* part of a
28		normal installation. Things can disappear from here at any
29		time.
30
31buildprep::	Executable script for fetching installation prerequisites.
32
33contrib/::	Directory containing contributed scripts, dragons dwell here.
34		Some of this might eventually move to being supported code.
35
36devel/::	Documentation and small tools aimed at developers.
37		Includes a hacking guide and a tour of the internals.
38
39docs/::		Directory containing a complete set of documentation on
40		building and configuring a NTP server or client. The files
41		are in asciidoc markup.  This replaces the 'html' directory
42		of previous versions, but html can be generated from it.
43
44etc/::		Directory containing a motley collection of configuration files
45		and launch scripts for various systems. For example
46		only.
47
48include/::	Directory containing include header files used by most
49		programs in the distribution.
50
51libjsmn/::	A minimal JSON library used by the GPSD-JSON driver.
52
53libntp/::	Directory containing library source code used by most
54		programs in the distribution.
55
56libparse/::	This directory contains the files making up the parser for
57		the parse refclock driver. For reasonably sane clocks
58		this refclock drivers allows a refclock implementation
59		by just providing a conversion routine and the
60		appropriate NTP parameters
61
62ntpclients/::   Directory containing sources for clients - utility programs
63		to query local and remote NTP installations for log status,
64		state variables, and other timekeeping information.  The term
65		"clients" is used quite loosely here; any tool that is not a
66		multi-file C program probably lives in this directory.
67
68ntpd/::		Sources for the main time-synchronization daemon.
69
70ntpfrob/::      The ntpfrob utility collects several small diagnostic
71		functions for reading and tweaking the local clock
72		hardware, including reading the clock tick rate,
73		precision, and jitter.
74
75ntptime/::	Directory containing a utility for reading and modifying
76		kernel parameters related to the local clock.
77
78packaging/::	Parts and guidance for distribution packagers.
79
80pylib/::	Installable Python helper modules for scripts.
81
82tests/::	Self-test code.
83
84waf::		A copy of the waf builder.  This is the engine used to configure
85		and build the codebase.
86
87wafhelpers/::	A library of Python procedures used by the waf build system.
88
89wscript::	NTP-specific waf rules.
90
91www/::		Sample ntpviz files
92
93// end
94