aboutsummaryrefslogtreecommitdiffstats
path: root/community/ntpsec/python-to-python3.patch
blob: 46c202cfa450840ea6786b29cdcfe5fa212ca183 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
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/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
+++ 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 89fb475..a5b3837 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 6f76150..e494a78 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 496047e..6011258 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 a3cbbce..5277a0f 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 528de19..bf31e65 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 d17e592..d4dc616 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/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 9dc5aab..56dfc47 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 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
diff --git a/ntpclients/ntploggps.py b/ntpclients/ntploggps.py
index fe44914..8d498b9 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 3129822..3a4b00a 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 d286f67..25083b2 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 5e17df0..7bba901 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 1382f19..34a9448 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 22b2a45..732b2b1 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 09c857e..1adea21 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 163f998..d501f0d 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 - visualizer for NTP log files
diff --git a/ntpclients/ntpwait.py b/ntpclients/ntpwait.py
index 972e83e..d879682 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 c018ac1..f1dd5f6 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/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 ca67c17..9cbc693 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.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 41ee384..ded4628 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 0ffb0d2..4825f54 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 307ca87..d133727 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 3a3ce85..64f2955 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 044af45..24eb3dd 100755
--- a/waf
+++ b/waf
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # encoding: latin-1
 # Thomas Nagy, 2005-2018
 #
diff --git a/wafhelpers/pythonize-header b/wafhelpers/pythonize-header
index c58542a..f5ce2ad 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.