aboutsummaryrefslogtreecommitdiffstats
path: root/community/ntpsec
diff options
context:
space:
mode:
Diffstat (limited to 'community/ntpsec')
-rw-r--r--community/ntpsec/APKBUILD47
-rw-r--r--community/ntpsec/python-to-python3.patch300
2 files changed, 347 insertions, 0 deletions
diff --git a/community/ntpsec/APKBUILD b/community/ntpsec/APKBUILD
new file mode 100644
index 00000000000..9b1c145edb6
--- /dev/null
+++ b/community/ntpsec/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: tcely <ntpsec+aports@tcely.33mail.com>
+# Maintainer: tcely <ntpsec+aports@tcely.33mail.com>
+pkgname=ntpsec
+pkgver=1.1.3
+pkgrel=0
+pkgdesc="NTP reference implementation, refactored for security"
+url="https://www.ntpsec.org/"
+arch="all"
+license="BSD-2-Clause"
+depends="bash busybox python3 py3-gpsd"
+makedepends="python3-dev bison asciidoc openssl-dev linux-headers"
+subpackages="$pkgname-doc"
+source="https://ftp.ntpsec.org/pub/releases/$pkgname-$pkgver.tar.gz
+ python-to-python3.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+# secfixes:
+# 1.1.3-r0:
+# - CVE-2019-6442
+# - CVE-2019-6443
+# - CVE-2019-6444
+# - CVE-2019-6445
+
+build() {
+ cd "$builddir"
+ ./waf configure \
+ --prefix=/usr \
+ --python=/usr/bin/python3 \
+ --enable-leap-smear \
+ --enable-mssntp \
+ --refclock=all
+
+ ./waf build --verbose
+}
+
+check() {
+ cd "$builddir"
+ ./waf check --verbose
+}
+
+package() {
+ cd "$builddir"
+ ./waf install --destdir="$pkgdir"
+}
+
+sha512sums="df60c5fa63d4c94529ba1e8b21c7d6b5d0c9fb810ed7546a621b072725a6ff03edbd2dcbc3baf19ac3b3a9b82d7aff3ddee4ab8c93559b7065ed06a211b538c4 ntpsec-1.1.3.tar.gz
+27053715fd6d3dbeeaf851faf502df380733826f02542ba73a36bf9129f00d710740f3702b36a7a950f4445e747f52f090c863a1a67680cc389810b117e4603a python-to-python3.patch"
diff --git a/community/ntpsec/python-to-python3.patch b/community/ntpsec/python-to-python3.patch
new file mode 100644
index 00000000000..24b651fe79d
--- /dev/null
+++ b/community/ntpsec/python-to-python3.patch
@@ -0,0 +1,300 @@
+diff --git a/attic/calc_tickadj/calc_tickadj b/attic/calc_tickadj/calc_tickadj
+index c8fda06..df316e0 100755
+--- a/attic/calc_tickadj/calc_tickadj
++++ b/attic/calc_tickadj/calc_tickadj
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # drift of 104.8576 -> +1 tick. Base of 10000 ticks.
+ #
+diff --git a/contrib/cpu-temp-log b/contrib/cpu-temp-log
+index 340c4c8..be9896d 100755
+--- a/contrib/cpu-temp-log
++++ b/contrib/cpu-temp-log
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # coding: utf-8
+ """\
+ Usage: cpu-temper-log
+diff --git a/contrib/make-leap-seconds.py b/contrib/make-leap-seconds.py
+index e1f4fb4..86c3eaa 100755
+--- a/contrib/make-leap-seconds.py
++++ b/contrib/make-leap-seconds.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """\
+ make-leap-seconds.py - make leap second file for testing
+
+diff --git a/contrib/ntpconfigtest b/contrib/ntpconfigtest
+index cc7f893..4c79c6b 100755
+--- a/contrib/ntpconfigtest
++++ b/contrib/ntpconfigtest
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # On Linux systems, read /proc/config.gz and check for the
+ # needed kernel options.
+diff --git a/contrib/ntpheat b/contrib/ntpheat
+index 36f5d06..285c5e4 100755
+--- a/contrib/ntpheat
++++ b/contrib/ntpheat
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # generate some heat!
+ #
+diff --git a/contrib/ntpheatusb b/contrib/ntpheatusb
+index 3fe2618..b9ca6f4 100755
+--- a/contrib/ntpheatusb
++++ b/contrib/ntpheatusb
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # generate some heat!
+ #
+diff --git a/contrib/smartctl-temp-log b/contrib/smartctl-temp-log
+index 9deaa9e..180b91e 100755
+--- a/contrib/smartctl-temp-log
++++ b/contrib/smartctl-temp-log
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # coding: utf-8
+ """\
+ Usage: smartctl-temp-log [device]
+diff --git a/contrib/temper-temp-log b/contrib/temper-temp-log
+index 441d4ff..6f69605 100755
+--- a/contrib/temper-temp-log
++++ b/contrib/temper-temp-log
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # coding: utf-8
+ """\
+ Usage: temper-temper-log
+diff --git a/contrib/zone-temp-log b/contrib/zone-temp-log
+index 96e59b0..84d9857 100755
+--- a/contrib/zone-temp-log
++++ b/contrib/zone-temp-log
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # coding: utf-8
+ """\
+ Usage: zone-temper-log
+diff --git a/devel/linkcheck b/devel/linkcheck
+index 3c42955..21798c4 100755
+--- a/devel/linkcheck
++++ b/devel/linkcheck
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # linkcheck - check link integrity in an asciidoc document tree
+ #
+diff --git a/devel/python_paths.py b/devel/python_paths.py
+index 0005e57..7a9ebfb 100755
+--- a/devel/python_paths.py
++++ b/devel/python_paths.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ """Find all Pythons in the command path, and corresponding exe/lib locations.
+
+diff --git a/ntpclients/ntpdig.py b/ntpclients/ntpdig.py
+index 9154df7..4cc8279 100644
+--- a/ntpclients/ntpdig.py
++++ b/ntpclients/ntpdig.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ """
+ ntpdig - simple SNTP client
+diff --git a/ntpclients/ntpkeygen.py b/ntpclients/ntpkeygen.py
+index 47f777a..f11fd46 100644
+--- a/ntpclients/ntpkeygen.py
++++ b/ntpclients/ntpkeygen.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ #
+ # ntpkeygen - generate cryptographic keys for NTP clients and servers
+diff --git a/ntpclients/ntploggps.py b/ntpclients/ntploggps.py
+index adb0dd2..e396aac 100644
+--- a/ntpclients/ntploggps.py
++++ b/ntpclients/ntploggps.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ """\
+diff --git a/ntpclients/ntplogtemp.py b/ntpclients/ntplogtemp.py
+index 80d8b6c..3bdd620 100644
+--- a/ntpclients/ntplogtemp.py
++++ b/ntpclients/ntplogtemp.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ """\
+diff --git a/ntpclients/ntpmon.py b/ntpclients/ntpmon.py
+index 108c7bc..ee467fd 100644
+--- a/ntpclients/ntpmon.py
++++ b/ntpclients/ntpmon.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ # SPDX-License-Identifier: BSD-2-clause
+diff --git a/ntpclients/ntpq.py b/ntpclients/ntpq.py
+index a581605..ba8717d 100644
+--- a/ntpclients/ntpq.py
++++ b/ntpclients/ntpq.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ #
+ # ntpq - query an NTP server using mode 6 commands
+diff --git a/ntpclients/ntpsnmpd.py b/ntpclients/ntpsnmpd.py
+index 1d2890d..ec6b977 100644
+--- a/ntpclients/ntpsnmpd.py
++++ b/ntpclients/ntpsnmpd.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ from __future__ import print_function, division
+diff --git a/ntpclients/ntpsweep.py b/ntpclients/ntpsweep.py
+index f334178..296c3b1 100644
+--- a/ntpclients/ntpsweep.py
++++ b/ntpclients/ntpsweep.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ """
+ ntpsweep - print various information about given NTP servers
+diff --git a/ntpclients/ntptrace.py b/ntpclients/ntptrace.py
+index 3541883..bd2bcaf 100644
+--- a/ntpclients/ntptrace.py
++++ b/ntpclients/ntptrace.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ """
+ ntptrace - trace peers of an NTP server
+diff --git a/ntpclients/ntpviz.py b/ntpclients/ntpviz.py
+index b8b70aa..a8ea54d 100644
+--- a/ntpclients/ntpviz.py
++++ b/ntpclients/ntpviz.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ """\
+ ntpviz - logfile visualizer for NTP log files
+diff --git a/ntpclients/ntpwait.py b/ntpclients/ntpwait.py
+index fc349e5..149ad6c 100644
+--- a/ntpclients/ntpwait.py
++++ b/ntpclients/ntpwait.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ """\
+ ntpwait - Wait for ntpd to stabilize the system clock.
+diff --git a/pylib/agentx.py b/pylib/agentx.py
+index 0661049..47f26cc 100644
+--- a/pylib/agentx.py
++++ b/pylib/agentx.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ from __future__ import print_function, division
+diff --git a/tests/pylib/jigs.py b/tests/pylib/jigs.py
+index 36dbef8..8006cfb 100644
+--- a/tests/pylib/jigs.py
++++ b/tests/pylib/jigs.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ from __future__ import print_function, division
+diff --git a/tests/pylib/test_agentx_packet.py b/tests/pylib/test_agentx_packet.py
+index 1646c43..68544ab 100644
+--- a/tests/pylib/test_agentx_packet.py
++++ b/tests/pylib/test_agentx_packet.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ import unittest
+diff --git a/tests/pylib/test_packet.py b/tests/pylib/test_packet.py
+index 7373ffb..0df4d20 100644
+--- a/tests/pylib/test_packet.py
++++ b/tests/pylib/test_packet.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ from __future__ import print_function, division
+diff --git a/tests/pylib/test_statfiles.py b/tests/pylib/test_statfiles.py
+index fcd3d71..979e1a0 100644
+--- a/tests/pylib/test_statfiles.py
++++ b/tests/pylib/test_statfiles.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ import unittest
+diff --git a/tests/pylib/test_util.py b/tests/pylib/test_util.py
+index 81b4604..631c2f8 100644
+--- a/tests/pylib/test_util.py
++++ b/tests/pylib/test_util.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ from __future__ import print_function
+diff --git a/waf b/waf
+index c9ecdf0..bd93e55 100755
+--- a/waf
++++ b/waf
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # encoding: ISO8859-1
+ # Thomas Nagy, 2005-2017
+ #
+diff --git a/wafhelpers/pythonize-header b/wafhelpers/pythonize-header
+index cf0e6e4..a08b7e0 100755
+--- a/wafhelpers/pythonize-header
++++ b/wafhelpers/pythonize-header
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ """
+ Generate a Python module from a C file of macro definitions.