From 6b0f911b9aaef49e705c7e744cb3b223eb681df6 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 22 Apr 2021 00:21:58 +0200 Subject: [PATCH 1/3] Use Python 3 instead of Python 2 to generate test files Python 2 is no longer officially supported, but we were still using it to generate test suite .c files from .function files when using GNU make. Switch to looking for Python 3. This change was done for CMake a long time ago. Signed-off-by: Gilles Peskine --- tests/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index d250d717ac..59ed45a66e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -54,8 +54,7 @@ else DLEXT ?= so EXEXT= SHARED_SUFFIX= -# python2 for POSIX since FreeBSD has only python2 as default. -PYTHON ?= python2 +PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi) endif # Zlib shared library extensions: From e0de27729e6afc076f5560c7a408af797465c392 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 6 May 2021 11:34:07 +0200 Subject: [PATCH 2/3] Changelog entry for no longer explicitly invoking python2 Signed-off-by: Gilles Peskine --- ChangeLog.d/make-generate-tests-python.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ChangeLog.d/make-generate-tests-python.txt diff --git a/ChangeLog.d/make-generate-tests-python.txt b/ChangeLog.d/make-generate-tests-python.txt new file mode 100644 index 0000000000..4b9009d6f8 --- /dev/null +++ b/ChangeLog.d/make-generate-tests-python.txt @@ -0,0 +1,3 @@ +Changes + * When building the test suites with GNU make, invoke python3 or python, not + python2, which is no longer supported upstream. From 99cce1dd4fe7b18b8c219a52ba49f51e6e48acb6 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 6 May 2021 11:36:50 +0200 Subject: [PATCH 3/3] Remove copy-pasted definition of PYTHON that wasn't used Signed-off-by: Gilles Peskine --- programs/fuzz/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/programs/fuzz/Makefile b/programs/fuzz/Makefile index fa17918fad..084fc241ec 100644 --- a/programs/fuzz/Makefile +++ b/programs/fuzz/Makefile @@ -20,8 +20,6 @@ endif DLEXT ?= so EXEXT= SHARED_SUFFIX= -# python2 for POSIX since FreeBSD has only python2 as default. -PYTHON ?= python2 # Zlib shared library extensions: ifdef ZLIB