= Guidance for package builders =

== Package parts ==

Some useful components for package bulding can be found in the etc/
subdirectory, including init boot time scripts, systemd unit files,
and boilerplate for default ntpd configuration.

== Platforms without Python ==

Many tools (actually, almost everything except the core daemon itself)
have either been moved from C to Python or are in the process of
translation.  This is an important step for improving maintainability
and reducing attack surface.  However, we know that some platforms
cannot support Python or choose not to include it in their core
configuration.

For these platorms, we recommend using cx_Freeze to render the NTPsec
Python programs, and all their imported modules, into standalone files.
These files can then be copied to a host that does not have Python
installed and executed just as if Python was installed.

cx_Freeze documentation lives
http://cx-freeze.readthedocs.io/en/latest/index.html[here].

Your OS package manager may have a package for cx_Freeze.  If not you
can install it with pip like this:

```
pip install cx_Freeze
````

You may find that you also need to install the package 'patchelf'.

Change to the root directory of the NTPsec source distribution and
run the following command:

```
waf cxfreeze
```

Binary executables corresponding to every Python script will now be in
the directory named dist along with the other files required for them
to run.

You can copy the dist directory, and its contents, to a host that does
not have Python installed and execute the programs there.

There appears to be no speed advantage, or disadvantage, to running the
binaries created by cx_freeze.

// end

