aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/ntpsec/APKBUILD2
-rw-r--r--community/ntpsec/python-to-python3.patch162
2 files changed, 134 insertions, 30 deletions
diff --git a/community/ntpsec/APKBUILD b/community/ntpsec/APKBUILD
index a57fab3d4af..4a3949089a8 100644
--- a/community/ntpsec/APKBUILD
+++ b/community/ntpsec/APKBUILD
@@ -45,4 +45,4 @@ gpg_signature_extensions="asc"
gpgfingerprints="good:B482 3776 1A26 9022 2C99 5F44 5A22 E330 161C 3978"
sha512sums="f57fde6f329a858313968798d64df5e93d7eba43edf4752cd0eb45ff1a2237ce2731b4603ec997c493dea85edb42976f96eb1508beae087a8c2ae8a76c0a6941 ntpsec-1.1.6.tar.gz
-27053715fd6d3dbeeaf851faf502df380733826f02542ba73a36bf9129f00d710740f3702b36a7a950f4445e747f52f090c863a1a67680cc389810b117e4603a python-to-python3.patch"
+a813811109f0df7b6c408b1c7566f986c149f201eca9ed909e1a08e0e8240bde2986ca7e7c719edf9bd9aa9f2f683b0f67467fc4b3b118b56f9c89a113c70b36 python-to-python3.patch"
diff --git a/community/ntpsec/python-to-python3.patch b/community/ntpsec/python-to-python3.patch
index 24b651fe79d..5c7ff078000 100644
--- a/community/ntpsec/python-to-python3.patch
+++ b/community/ntpsec/python-to-python3.patch
@@ -8,6 +8,28 @@ index c8fda06..df316e0 100755
#
# drift of 104.8576 -> +1 tick. Base of 10000 ticks.
#
+diff --git a/buildprep b/buildprep
+index 9de9cb8..60fae56 100755
+--- a/buildprep
++++ b/buildprep
+@@ -54,7 +54,7 @@ done
+ # Python 3 equivalents with a python3 prefix. Compute the correct value for the
+ # infix based on system Python. This eill start to be significant after Python 2
+ # EOLs at the beginning of 2020.
+-PYVERS=`python --version 2>&1 | sed -n -e '/Python \([0-9]\).*/s//\1/p'`
++PYVERS=`python3 --version 2>&1 | sed -n -e '/Python \([0-9]\).*/s//\1/p'`
+ if [ "$PYVERS" = "2" ]
+ then
+ PYVERS=""
+@@ -164,7 +164,7 @@ daemon () {
+ # Prerequisites to build the daemon: bison, pps-tools, service libraries
+ case $installer in
+ apk)
+- $install build-base python # basic tools
++ $install build-base python${PYVERS} # basic tools
+ $install bison python${PYVERS}-dev linux-headers
+ $install openssl-dev libcap-dev libseccomp-dev
+ # probably needs more, but this builds
diff --git a/contrib/cpu-temp-log b/contrib/cpu-temp-log
index 340c4c8..be9896d 100755
--- a/contrib/cpu-temp-log
@@ -19,7 +41,7 @@ index 340c4c8..be9896d 100755
"""\
Usage: cpu-temper-log
diff --git a/contrib/make-leap-seconds.py b/contrib/make-leap-seconds.py
-index e1f4fb4..86c3eaa 100755
+index 89fb475..a5b3837 100755
--- a/contrib/make-leap-seconds.py
+++ b/contrib/make-leap-seconds.py
@@ -1,4 +1,4 @@
@@ -29,7 +51,7 @@ index e1f4fb4..86c3eaa 100755
make-leap-seconds.py - make leap second file for testing
diff --git a/contrib/ntpconfigtest b/contrib/ntpconfigtest
-index cc7f893..4c79c6b 100755
+index 6f76150..e494a78 100755
--- a/contrib/ntpconfigtest
+++ b/contrib/ntpconfigtest
@@ -1,4 +1,4 @@
@@ -49,7 +71,7 @@ index 36f5d06..285c5e4 100755
# generate some heat!
#
diff --git a/contrib/ntpheatusb b/contrib/ntpheatusb
-index 3fe2618..b9ca6f4 100755
+index 496047e..6011258 100755
--- a/contrib/ntpheatusb
+++ b/contrib/ntpheatusb
@@ -1,4 +1,4 @@
@@ -79,7 +101,7 @@ index 441d4ff..6f69605 100755
"""\
Usage: temper-temper-log
diff --git a/contrib/zone-temp-log b/contrib/zone-temp-log
-index 96e59b0..84d9857 100755
+index a3cbbce..5277a0f 100755
--- a/contrib/zone-temp-log
+++ b/contrib/zone-temp-log
@@ -1,4 +1,4 @@
@@ -89,7 +111,7 @@ index 96e59b0..84d9857 100755
"""\
Usage: zone-temper-log
diff --git a/devel/linkcheck b/devel/linkcheck
-index 3c42955..21798c4 100755
+index 528de19..bf31e65 100755
--- a/devel/linkcheck
+++ b/devel/linkcheck
@@ -1,4 +1,4 @@
@@ -99,7 +121,7 @@ index 3c42955..21798c4 100755
# 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
+index d17e592..d4dc616 100755
--- a/devel/python_paths.py
+++ b/devel/python_paths.py
@@ -1,4 +1,4 @@
@@ -108,8 +130,57 @@ index 0005e57..7a9ebfb 100755
"""Find all Pythons in the command path, and corresponding exe/lib locations.
+diff --git a/devel/release.nix b/devel/release.nix
+index 9bc7e32..db87d23 100644
+--- a/devel/release.nix
++++ b/devel/release.nix
+@@ -29,7 +29,7 @@ in with derivationOptions; rec {
+ runHook preDist
+
+ echo "dist flags: $distFlags ''${distFlagsArray[@]}"
+- python waf dist $distFlags "''${distFlagsArray[@]}"
++ python3 waf dist $distFlags "''${distFlagsArray[@]}"
+
+ if [ "$dontCopyDist" != 1 ]; then
+ mkdir -p "$out/tarballs"
+@@ -57,7 +57,7 @@ in with derivationOptions; rec {
+ fi
+
+ echo "configure flags: $configureFlags ''${configureFlagsArray[@]}"
+- python waf configure $configureFlags "''${configureFlagsArray[@]}"
++ python3 waf configure $configureFlags "''${configureFlagsArray[@]}"
+
+ runHook postConfigure
+ '';
+@@ -66,7 +66,7 @@ in with derivationOptions; rec {
+ runHook preBuild
+
+ echo "build flags: $makeFlags ''${makeFlagsArray[@]} $buildFlags ''${buildFlagsArray[@]}"
+- python waf build \
++ python3 waf build \
+ ''${enableParallelBuilding:+-j$NIX_BUILD_CORES} \
+ $makeFlags "''${makeFlagsArray[@]}" \
+ $buildFlags "''${buildFlagsArray[@]}"
+@@ -79,7 +79,7 @@ in with derivationOptions; rec {
+ runHook preCheck
+
+ echo "check flags: $makeFlags ''${makeFlagsArray[@]} ''${checkFlags:+-v} ''${checkFlagsArray[@]}"
+- python waf check \
++ python3 waf check \
+ ''${enableParallelBuilding:+-j$NIX_BUILD_CORES} \
+ $makeFlags "''${makeFlagsArray[@]}" \
+ ''${checkFlags:+-v} "''${checkFlagsArray[@]}"
+@@ -94,7 +94,7 @@ in with derivationOptions; rec {
+ mkdir -p "$prefix"
+
+ echo "install flags: $makeFlags ''${makeFlagsArray[@]} ''${installFlags:+-v} ''${installFlagsArray[@]}"
+- python waf install \
++ python3 waf install \
+ $makeFlags "''${makeFlagsArray[@]}" \
+ ''${installFlags:+-v} "''${installFlagsArray[@]}"
+
diff --git a/ntpclients/ntpdig.py b/ntpclients/ntpdig.py
-index 9154df7..4cc8279 100644
+index 9dc5aab..56dfc47 100644
--- a/ntpclients/ntpdig.py
+++ b/ntpclients/ntpdig.py
@@ -1,4 +1,4 @@
@@ -119,17 +190,17 @@ index 9154df7..4cc8279 100644
"""
ntpdig - simple SNTP client
diff --git a/ntpclients/ntpkeygen.py b/ntpclients/ntpkeygen.py
-index 47f777a..f11fd46 100644
+index 8d3b37d..d9ab0ba 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
+ '''
+ ntpkeygen - generate cryptographic keys for NTP clients and servers
diff --git a/ntpclients/ntploggps.py b/ntpclients/ntploggps.py
-index adb0dd2..e396aac 100644
+index fe44914..8d498b9 100644
--- a/ntpclients/ntploggps.py
+++ b/ntpclients/ntploggps.py
@@ -1,4 +1,4 @@
@@ -139,7 +210,7 @@ index adb0dd2..e396aac 100644
"""\
diff --git a/ntpclients/ntplogtemp.py b/ntpclients/ntplogtemp.py
-index 80d8b6c..3bdd620 100644
+index 3129822..3a4b00a 100644
--- a/ntpclients/ntplogtemp.py
+++ b/ntpclients/ntplogtemp.py
@@ -1,4 +1,4 @@
@@ -149,7 +220,7 @@ index 80d8b6c..3bdd620 100644
"""\
diff --git a/ntpclients/ntpmon.py b/ntpclients/ntpmon.py
-index 108c7bc..ee467fd 100644
+index d286f67..25083b2 100644
--- a/ntpclients/ntpmon.py
+++ b/ntpclients/ntpmon.py
@@ -1,4 +1,4 @@
@@ -157,9 +228,9 @@ index 108c7bc..ee467fd 100644
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
- # SPDX-License-Identifier: BSD-2-clause
+ # SPDX-License-Identifier: BSD-2-Clause
diff --git a/ntpclients/ntpq.py b/ntpclients/ntpq.py
-index a581605..ba8717d 100644
+index 5e17df0..7bba901 100644
--- a/ntpclients/ntpq.py
+++ b/ntpclients/ntpq.py
@@ -1,4 +1,4 @@
@@ -169,7 +240,7 @@ index a581605..ba8717d 100644
#
# ntpq - query an NTP server using mode 6 commands
diff --git a/ntpclients/ntpsnmpd.py b/ntpclients/ntpsnmpd.py
-index 1d2890d..ec6b977 100644
+index 1382f19..34a9448 100644
--- a/ntpclients/ntpsnmpd.py
+++ b/ntpclients/ntpsnmpd.py
@@ -1,4 +1,4 @@
@@ -179,7 +250,7 @@ index 1d2890d..ec6b977 100644
from __future__ import print_function, division
diff --git a/ntpclients/ntpsweep.py b/ntpclients/ntpsweep.py
-index f334178..296c3b1 100644
+index 22b2a45..732b2b1 100644
--- a/ntpclients/ntpsweep.py
+++ b/ntpclients/ntpsweep.py
@@ -1,4 +1,4 @@
@@ -189,7 +260,7 @@ index f334178..296c3b1 100644
"""
ntpsweep - print various information about given NTP servers
diff --git a/ntpclients/ntptrace.py b/ntpclients/ntptrace.py
-index 3541883..bd2bcaf 100644
+index 09c857e..1adea21 100644
--- a/ntpclients/ntptrace.py
+++ b/ntpclients/ntptrace.py
@@ -1,4 +1,4 @@
@@ -199,7 +270,7 @@ index 3541883..bd2bcaf 100644
"""
ntptrace - trace peers of an NTP server
diff --git a/ntpclients/ntpviz.py b/ntpclients/ntpviz.py
-index b8b70aa..a8ea54d 100644
+index 163f998..d501f0d 100644
--- a/ntpclients/ntpviz.py
+++ b/ntpclients/ntpviz.py
@@ -1,4 +1,4 @@
@@ -207,9 +278,9 @@ index b8b70aa..a8ea54d 100644
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""\
- ntpviz - logfile visualizer for NTP log files
+ ntpviz - visualizer for NTP log files
diff --git a/ntpclients/ntpwait.py b/ntpclients/ntpwait.py
-index fc349e5..149ad6c 100644
+index 972e83e..d879682 100644
--- a/ntpclients/ntpwait.py
+++ b/ntpclients/ntpwait.py
@@ -1,4 +1,4 @@
@@ -219,7 +290,7 @@ index fc349e5..149ad6c 100644
"""\
ntpwait - Wait for ntpd to stabilize the system clock.
diff --git a/pylib/agentx.py b/pylib/agentx.py
-index 0661049..47f26cc 100644
+index c018ac1..f1dd5f6 100644
--- a/pylib/agentx.py
+++ b/pylib/agentx.py
@@ -1,4 +1,4 @@
@@ -228,8 +299,31 @@ index 0661049..47f26cc 100644
# -*- coding: utf-8 -*-
from __future__ import print_function, division
+diff --git a/pylib/poly.py b/pylib/poly.py
+index 8d29d67..d23606e 100644
+--- a/pylib/poly.py
++++ b/pylib/poly.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # SPDX-License-Identifier: BSD-2-Clause
+ """Handle bytes and strings in a polyglot fashion.
+diff --git a/tests/option-tester.sh b/tests/option-tester.sh
+index 0a513df..5dd9937 100755
+--- a/tests/option-tester.sh
++++ b/tests/option-tester.sh
+@@ -77,7 +77,7 @@ grep "The configuration failed" test*/test.log
+ grep ^Trouble test*/test.log
+ echo
+
+-echo -n "## "; python --version
++echo -n "## "; python3 --version
+ if test -n "$PYTHONPATH"
+ then
+ echo "## PYTHONPATH is" \"$PYTHONPATH\"
diff --git a/tests/pylib/jigs.py b/tests/pylib/jigs.py
-index 36dbef8..8006cfb 100644
+index ca67c17..9cbc693 100644
--- a/tests/pylib/jigs.py
+++ b/tests/pylib/jigs.py
@@ -1,4 +1,4 @@
@@ -238,8 +332,18 @@ index 36dbef8..8006cfb 100644
# -*- coding: utf-8 -*-
from __future__ import print_function, division
+diff --git a/tests/pylib/test_agentx.py b/tests/pylib/test_agentx.py
+index 211b3f9..cbf322a 100644
+--- a/tests/pylib/test_agentx.py
++++ b/tests/pylib/test_agentx.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ import ntp.agentx as AX
diff --git a/tests/pylib/test_agentx_packet.py b/tests/pylib/test_agentx_packet.py
-index 1646c43..68544ab 100644
+index 41ee384..ded4628 100644
--- a/tests/pylib/test_agentx_packet.py
+++ b/tests/pylib/test_agentx_packet.py
@@ -1,4 +1,4 @@
@@ -249,7 +353,7 @@ index 1646c43..68544ab 100644
import unittest
diff --git a/tests/pylib/test_packet.py b/tests/pylib/test_packet.py
-index 7373ffb..0df4d20 100644
+index 0ffb0d2..4825f54 100644
--- a/tests/pylib/test_packet.py
+++ b/tests/pylib/test_packet.py
@@ -1,4 +1,4 @@
@@ -259,7 +363,7 @@ index 7373ffb..0df4d20 100644
from __future__ import print_function, division
diff --git a/tests/pylib/test_statfiles.py b/tests/pylib/test_statfiles.py
-index fcd3d71..979e1a0 100644
+index 307ca87..d133727 100644
--- a/tests/pylib/test_statfiles.py
+++ b/tests/pylib/test_statfiles.py
@@ -1,4 +1,4 @@
@@ -269,7 +373,7 @@ index fcd3d71..979e1a0 100644
import unittest
diff --git a/tests/pylib/test_util.py b/tests/pylib/test_util.py
-index 81b4604..631c2f8 100644
+index 3a3ce85..64f2955 100644
--- a/tests/pylib/test_util.py
+++ b/tests/pylib/test_util.py
@@ -1,4 +1,4 @@
@@ -279,7 +383,7 @@ index 81b4604..631c2f8 100644
from __future__ import print_function
diff --git a/waf b/waf
-index c9ecdf0..bd93e55 100755
+index 044af45..24eb3dd 100755
--- a/waf
+++ b/waf
@@ -1,4 +1,4 @@
@@ -289,7 +393,7 @@ index c9ecdf0..bd93e55 100755
# Thomas Nagy, 2005-2017
#
diff --git a/wafhelpers/pythonize-header b/wafhelpers/pythonize-header
-index cf0e6e4..a08b7e0 100755
+index c58542a..f5ce2ad 100755
--- a/wafhelpers/pythonize-header
+++ b/wafhelpers/pythonize-header
@@ -1,4 +1,4 @@