Roland's homepage

My random knot in the Web

Install ntpsec on FreeBSD

A short article on how to install ntpsec on FreeBSD. Tested with 0.9.7 and 1.0.0.

Downloading

You can find several download methods on the ntpsec website.

Installation

As of 2017-07-29, the is no port for ntpsec yet. So on FreeBSD you have to compile it yourself. Fortunately, this is not difficult.

Prequisites

You will need Python to build ntpsec. Additionally, many of the helper programs are written in Python. In this article, I’ll be using Python 3.6.

The asciidoc program and the DocBook stylesheets are needed to build the documentation.

Building the software

To build the software, I downloaded the source distribution from the FTP site. Cloning the repo from gitlab also worked.

Downloading a tarball from gitlab or github would complain about a missing .autorevision-cache file during the build.

> python3 waf configure --prefix=/usr/local --python=/usr/local/bin/python3
> python3 waf build
> cd build/main/ntpclients/
> sed -i '' -e 's/env python/env python3/' ntp*
> cd -
# python3 waf install

The sed command is necessary because the scripts call python, not python3.

Configuration

The standard /etc/rc.d/ntpd seems to work well, provided I set the following in my /etc/rc.conf:

ntpd_enable="YES"
ntpd_program="/usr/local/sbin/ntpd"
ntpd_sync_on_start="YES"

←  Fixing dependencies after mesa ports consolidation