2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/Config.mk
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/Config.mk
|
|
|
|
+++ xen-4.19.0-testing/Config.mk
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -77,7 +77,7 @@ EXTRA_INCLUDES += $(EXTRA_PREFIX)/includ
|
|
|
|
EXTRA_LIB += $(EXTRA_PREFIX)/lib
|
|
|
|
endif
|
|
|
|
|
|
|
|
-PYTHON ?= python
|
|
|
|
+PYTHON ?= python3
|
|
|
|
PYTHON_PREFIX_ARG ?= --prefix="$(prefix)"
|
|
|
|
# The above requires that prefix contains *no spaces*. This variable is here
|
|
|
|
# to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug:
|
2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/tools/configure
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/tools/configure
|
|
|
|
+++ xen-4.19.0-testing/tools/configure
|
|
|
|
@@ -8297,15 +8297,15 @@ if test x"${PYTHONPATH}" = x"no"
|
2024-05-04 02:04:11 +02:00
|
|
|
then
|
|
|
|
as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5
|
|
|
|
fi
|
2024-10-18 15:48:08 +02:00
|
|
|
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.7 " >&5
|
|
|
|
-printf %s "checking for python version >= 2.7 ... " >&6; }
|
|
|
|
-`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 7)"))'`
|
|
|
|
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 3.0 " >&5
|
|
|
|
+printf %s "checking for python version >= 3.0 ... " >&6; }
|
2024-05-04 02:04:11 +02:00
|
|
|
+`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (3, 0)"))'`
|
|
|
|
if test "$?" != "0"
|
|
|
|
then
|
|
|
|
python_version=`$PYTHON -V 2>&1`
|
2024-10-18 15:48:08 +02:00
|
|
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
|
printf "%s\n" "no" >&6; }
|
|
|
|
- as_fn_error $? "$python_version is too old, minimum required version is 2.7" "$LINENO" 5
|
2024-05-04 02:04:11 +02:00
|
|
|
+ as_fn_error $? "$python_version is too old, minimum required version is 3.0" "$LINENO" 5
|
|
|
|
else
|
2024-10-18 15:48:08 +02:00
|
|
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
|
printf "%s\n" "yes" >&6; }
|
|
|
|
Index: xen-4.19.0-testing/tools/libs/light/idl.py
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/tools/libs/light/idl.py
|
|
|
|
+++ xen-4.19.0-testing/tools/libs/light/idl.py
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -271,7 +271,7 @@ class KeyedUnion(Aggregate):
|
|
|
|
if not isinstance(keyvar_type, Enumeration):
|
|
|
|
raise ValueError
|
|
|
|
|
|
|
|
- kv_kwargs = dict([(x.lstrip('keyvar_'),y) for (x,y) in kwargs.items() if x.startswith('keyvar_')])
|
|
|
|
+ kv_kwargs = dict([(x.lstrip('keyvar_'),y) for (x,y) in list(kwargs.items()) if x.startswith('keyvar_')])
|
|
|
|
|
|
|
|
self.keyvar = Field(keyvar_type, keyvar_name, **kv_kwargs)
|
|
|
|
|
|
|
|
@@ -317,7 +317,7 @@ class Array(Type):
|
|
|
|
kwargs.setdefault('json_parse_type', 'JSON_ARRAY')
|
|
|
|
Type.__init__(self, namespace=elem_type.namespace, typename=elem_type.rawname + " *", **kwargs)
|
|
|
|
|
|
|
|
- lv_kwargs = dict([(x.lstrip('lenvar_'),y) for (x,y) in kwargs.items() if x.startswith('lenvar_')])
|
|
|
|
+ lv_kwargs = dict([(x.lstrip('lenvar_'),y) for (x,y) in list(kwargs.items()) if x.startswith('lenvar_')])
|
|
|
|
|
|
|
|
self.lenvar = Field(integer, lenvar_name, **lv_kwargs)
|
|
|
|
self.elem_type = elem_type
|
|
|
|
@@ -353,7 +353,7 @@ def parse(f):
|
|
|
|
globs = {}
|
|
|
|
locs = OrderedDict()
|
|
|
|
|
|
|
|
- for n,t in globals().items():
|
|
|
|
+ for n,t in list(globals().items()):
|
|
|
|
if isinstance(t, Type):
|
|
|
|
globs[n] = t
|
|
|
|
elif isinstance(t,type(object)) and issubclass(t, Type):
|
2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/tools/libs/light/gentest.py
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/tools/libs/light/gentest.py
|
|
|
|
+++ xen-4.19.0-testing/tools/libs/light/gentest.py
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/python
|
|
|
|
+#!/usr/bin/python3
|
|
|
|
|
|
|
|
from __future__ import print_function
|
|
|
|
|
2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/tools/libs/light/gentypes.py
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/tools/libs/light/gentypes.py
|
|
|
|
+++ xen-4.19.0-testing/tools/libs/light/gentypes.py
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/python
|
|
|
|
+#!/usr/bin/python3
|
|
|
|
|
|
|
|
from __future__ import print_function
|
|
|
|
|
2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/tools/include/xen-foreign/mkheader.py
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/tools/include/xen-foreign/mkheader.py
|
|
|
|
+++ xen-4.19.0-testing/tools/include/xen-foreign/mkheader.py
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/python
|
|
|
|
+#!/usr/bin/python3
|
|
|
|
|
|
|
|
from __future__ import print_function
|
|
|
|
|
2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/tools/include/xen-foreign/mkchecker.py
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/tools/include/xen-foreign/mkchecker.py
|
|
|
|
+++ xen-4.19.0-testing/tools/include/xen-foreign/mkchecker.py
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/python
|
|
|
|
+#!/usr/bin/python3
|
|
|
|
|
|
|
|
import sys;
|
|
|
|
from structs import structs, compat_arches;
|
2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/xen/tools/gen-cpuid.py
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/xen/tools/gen-cpuid.py
|
|
|
|
+++ xen-4.19.0-testing/xen/tools/gen-cpuid.py
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/env python
|
|
|
|
+#!/usr/bin/python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
import sys, os, re
|
2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/xen/tools/compat-build-source.py
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/xen/tools/compat-build-source.py
|
|
|
|
+++ xen-4.19.0-testing/xen/tools/compat-build-source.py
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/env python
|
|
|
|
+#!/usr/bin/python3
|
|
|
|
|
|
|
|
import re,sys
|
|
|
|
|
2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/xen/tools/compat-build-header.py
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/xen/tools/compat-build-header.py
|
|
|
|
+++ xen-4.19.0-testing/xen/tools/compat-build-header.py
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/env python
|
|
|
|
+#!/usr/bin/python3
|
|
|
|
|
|
|
|
import re,sys
|
|
|
|
|
2024-10-18 15:48:08 +02:00
|
|
|
Index: xen-4.19.0-testing/tools/misc/xensymoops
|
2024-05-04 02:04:11 +02:00
|
|
|
===================================================================
|
2024-10-18 15:48:08 +02:00
|
|
|
--- xen-4.19.0-testing.orig/tools/misc/xensymoops
|
|
|
|
+++ xen-4.19.0-testing/tools/misc/xensymoops
|
2024-05-04 02:04:11 +02:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/env python
|
|
|
|
+#!/usr/bin/python3
|
|
|
|
|
|
|
|
# An oops analyser for Xen
|
|
|
|
# Usage: xensymoops path-to-xen.s < oops-message
|
|
|
|
@@ -43,12 +43,12 @@ def read_oops():
|
|
|
|
return (eip_addr, stack_addresses)
|
|
|
|
|
|
|
|
def usage():
|
|
|
|
- print >> sys.stderr, """Usage: %s path-to-asm < oops-msg
|
|
|
|
+ print("""Usage: %s path-to-asm < oops-msg
|
|
|
|
The oops message should be fed to the standard input. The
|
|
|
|
command-line argument specifies the path to the Xen assembly dump
|
|
|
|
produced by \"make debug\". The location of EIP and the backtrace
|
|
|
|
will be output to standard output.
|
|
|
|
- """ % sys.argv[0]
|
|
|
|
+ """ % sys.argv[0], file=sys.stderr)
|
|
|
|
sys.exit()
|
|
|
|
|
|
|
|
##### main
|
|
|
|
@@ -99,7 +99,7 @@ while True:
|
|
|
|
|
|
|
|
# if this address was seen as a potential code address in the backtrace then
|
|
|
|
# record it in the backtrace list
|
|
|
|
- if stk_addrs.has_key(address):
|
|
|
|
+ if address in stk_addrs:
|
|
|
|
backtrace.append((stk_addrs[address], address, func))
|
|
|
|
|
|
|
|
# if this was the address that EIP...
|
|
|
|
@@ -107,12 +107,12 @@ while True:
|
|
|
|
eip_func = func
|
|
|
|
|
|
|
|
|
|
|
|
-print "EIP %s in function %s" % (eip_addr, eip_func)
|
|
|
|
-print "Backtrace:"
|
|
|
|
+print("EIP %s in function %s" % (eip_addr, eip_func))
|
|
|
|
+print("Backtrace:")
|
|
|
|
|
|
|
|
# sorting will order primarily by the first element of each tuple,
|
|
|
|
# i.e. the order in the original oops
|
|
|
|
backtrace.sort()
|
|
|
|
|
|
|
|
for (i, a, f) in backtrace:
|
|
|
|
- print "%s in function %s" % ( a, f )
|
|
|
|
+ print("%s in function %s" % ( a, f ))
|