File asterisk18-python-to-python2.patch of Package asterisk

diff -Naur a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper
--- a/contrib/scripts/ast_coredumper	2020-04-30 22:28:46.000000000 +0800
+++ b/contrib/scripts/ast_coredumper	2020-10-25 10:19:03.467488000 +0800
@@ -251,7 +251,7 @@
 # For *BSD, the preferred gdb may be in /usr/local/bin so we
 # need to search for one that supports python.
 for g in $(which -a gdb) ; do
-	result=$($g --batch --ex "python print('hello')" 2>/dev/null || : )
+	result=$($g --batch --ex "python2 print('hello')" 2>/dev/null || : )
 	if [[ "$result" =~ ^hello$ ]] ; then
 		GDB=$g
 		break
@@ -562,7 +562,7 @@
 # are only valid for a running program.
 
 #@@@SCRIPTSTART@@@
-python
+python2
 
 import datetime
 
diff -Naur a/contrib/scripts/ast_loggrabber b/contrib/scripts/ast_loggrabber
--- a/contrib/scripts/ast_loggrabber	2020-04-30 22:28:46.000000000 +0800
+++ b/contrib/scripts/ast_loggrabber	2020-10-25 10:19:25.786488000 +0800
@@ -197,7 +197,7 @@
 	mkdir -p "$destdir" 2>/dev/null || :
 	if [ -n "$LOG_DATEFORMAT" ] ; then
 		echo "Converting $lf"
-		cat "$lf" | python /tmp/.ast_tsconvert.py --format="$LOG_DATEFORMAT" --timezone="$LOG_TIMEZONE" > "${destfile}"
+		cat "$lf" | python2 /tmp/.ast_tsconvert.py --format="$LOG_DATEFORMAT" --timezone="$LOG_TIMEZONE" > "${destfile}"
 	else
 		echo "Copying $lf"
 		cp "$lf" "${destfile}"
diff -Naur a/contrib/scripts/refcounter.py b/contrib/scripts/refcounter.py
--- a/contrib/scripts/refcounter.py	2020-04-30 22:28:46.000000000 +0800
+++ b/contrib/scripts/refcounter.py	2020-10-25 10:17:30.628488000 +0800
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 """Process a ref debug log
 
  This file will process a log file created by enabling
diff -Naur a/contrib/scripts/reflocks.py b/contrib/scripts/reflocks.py
--- a/contrib/scripts/reflocks.py	2020-04-30 22:28:46.000000000 +0800
+++ b/contrib/scripts/reflocks.py	2020-10-25 10:17:37.772488000 +0800
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 """Process a ref debug log for lock usage
 
  This file will process a log file created by Asterisk
diff -Naur a/contrib/scripts/refstats.py b/contrib/scripts/refstats.py
--- a/contrib/scripts/refstats.py	2020-04-30 22:28:46.000000000 +0800
+++ b/contrib/scripts/refstats.py	2020-10-25 10:17:45.116488000 +0800
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 """Process a ref debug log for memory usage
 
  This will provide information about total and peak
diff -Naur a/contrib/scripts/spandspflow2pcap.py b/contrib/scripts/spandspflow2pcap.py
--- a/contrib/scripts/spandspflow2pcap.py	2020-04-30 22:28:46.000000000 +0800
+++ b/contrib/scripts/spandspflow2pcap.py	2020-10-25 10:18:12.187488000 +0800
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # vim: set ts=8 sw=4 sts=4 et ai tw=79:
 '''
 Usage: ./spandspflow2pcap.py SPANDSP_LOG SENDFAX_PCAP
diff -Naur a/contrib/scripts/voicemailpwcheck.py b/contrib/scripts/voicemailpwcheck.py
--- a/contrib/scripts/voicemailpwcheck.py	2020-04-30 22:28:46.000000000 +0800
+++ b/contrib/scripts/voicemailpwcheck.py	2020-10-25 10:17:51.700488000 +0800
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 ''' Sample externpasscheck script for use with voicemail.conf
 
 Copyright (C) 2010, Digium, Inc.
openSUSE Build Service is sponsored by