From fec2da296e4b62ab2a9e97dcff8736dd12e9182c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 10 Jun 2019 09:38:05 +0100 Subject: [PATCH] Further fix for Python 3.8 embed brokenness. --- ...Further-fix-for-Python-3.8-embedding.patch | 49 +++++++++++++++++++ nbdkit.spec | 9 +++- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 0001-python-Further-fix-for-Python-3.8-embedding.patch diff --git a/0001-python-Further-fix-for-Python-3.8-embedding.patch b/0001-python-Further-fix-for-Python-3.8-embedding.patch new file mode 100644 index 0000000..438cff9 --- /dev/null +++ b/0001-python-Further-fix-for-Python-3.8-embedding.patch @@ -0,0 +1,49 @@ +From 4840b5e8293287af45f1e6062e5272a9b2ee0535 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 10 Jun 2019 09:34:59 +0100 +Subject: [PATCH] python: Further fix for Python 3.8 embedding. + +Further attempt to fix Python 3.8; see also +commit fb1a74b3d84571bc4c6bb57b26128c92b3368c52 +and https://bugzilla.redhat.com/show_bug.cgi?id=1718294 +--- + configure.ac | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3489ae1..24d986f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -474,18 +474,12 @@ AS_IF([test "x$PYTHON" != "xno" && test "x$enable_python" != "xno"],[ + ]) + + dnl Check for Python CFLAGS, libraries. +- dnl For Python >= 3.8 we have to use python-embed.pc, see: ++ dnl For Python >= 3.8 we have to use python--embed.pc, see: + dnl https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build + dnl The python.pc is called python-.pc on Debian and + dnl later versions of Fedora, and python.pc on older versions + dnl of Fedora. +- PKG_CHECK_MODULES([PYTHON], [python-embed-"$PYTHON_VERSION"], [ +- AC_SUBST([PYTHON_CFLAGS]) +- AC_SUBST([PYTHON_LIBS]) +- AC_SUBST([PYTHON_VERSION]) +- AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time]) +- ],[ +- PKG_CHECK_MODULES([PYTHON], [python-embed], [ ++ PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"-embed], [ + AC_SUBST([PYTHON_CFLAGS]) + AC_SUBST([PYTHON_LIBS]) + AC_SUBST([PYTHON_VERSION]) +@@ -505,7 +499,7 @@ AS_IF([test "x$PYTHON" != "xno" && test "x$enable_python" != "xno"],[ + ],[ + AC_MSG_WARN([python $PYTHON_VERSION not found]) + enable_python=no +- ])])])]) ++ ])])]) + + dnl Check for various functions needed by the bindings. + old_LIBS="$LIBS" +-- +2.22.0 + diff --git a/nbdkit.spec b/nbdkit.spec index d1bdb7b..0939c95 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -21,14 +21,14 @@ %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 # The source directory. %global source_directory 1.13-development Name: nbdkit Version: 1.13.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: NBD server License: BSD @@ -41,6 +41,8 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name Source2: libguestfs.keyring %endif +Patch1: 0001-python-Further-fix-for-Python-3.8-embedding.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -834,6 +836,9 @@ make %{?_smp_mflags} check || { %changelog +* Mon Jun 10 2019 Richard W.M. Jones - 1.13.5-2 +- Further fix for Python 3.8 embed brokenness. + * Sun Jun 09 2019 Richard W.M. Jones - 1.13.5-1 - New upstream version 1.13.5.