diff --git a/debian/changelog b/debian/changelog index 14d9b58cd..27444d69a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -83,6 +83,7 @@ linux (4.17.3-1) UNRELEASED; urgency=medium (CVE-2018-12633) * [x86] vboxguest: Enable VBOXGUEST and DRM_VBOXVIDEO as modules * aufs: Update support patchset to aufs4.x-rcN-20180611 + * debian/rules.d/scripts/mod/gendef.py: Use Python 3 [ Romain Perier ] * [x86] amdgpu: Enable DCN 1.0 Raven family (Closes: #901349) diff --git a/debian/rules.d/scripts/mod/Makefile b/debian/rules.d/scripts/mod/Makefile index e57e262aa..35bf77cd2 100644 --- a/debian/rules.d/scripts/mod/Makefile +++ b/debian/rules.d/scripts/mod/Makefile @@ -16,7 +16,7 @@ modpost.real-%: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ modpost-opts.h: $(top_srcdir)/scripts/mod/modpost.c - python $(wrapperdir)/gendef.py $< > $@ + $(wrapperdir)/gendef.py $< > $@ modpost.o: modpost.c modpost-opts.h $(CC) $(CFLAGS) -I $(CURDIR) -c -o $@ $< diff --git a/debian/rules.d/scripts/mod/gendef.py b/debian/rules.d/scripts/mod/gendef.py index 6e1bdf41b..f923d083b 100755 --- a/debian/rules.d/scripts/mod/gendef.py +++ b/debian/rules.d/scripts/mod/gendef.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import re import sys @@ -10,11 +10,11 @@ for line in open(sys.argv[1]): else: raise RuntimeError -print '#define GETOPT_OPTIONS "%s"' % options +print('#define GETOPT_OPTIONS "%s"' % options) -print '#define GETOPT_CASE', +print('#define GETOPT_CASE', end=' ') for c in options: if c == ':' or c == 'T': continue - print "case '%c':" % c, -print + print("case '%c':" % c, end=' ') +print()