commit
d5c7921bdc
65
0001-libguestfs-PYTHON_LIBS-is-not-set-in-Python-3.8.patch
Normal file
65
0001-libguestfs-PYTHON_LIBS-is-not-set-in-Python-3.8.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
From 5791e6ec31d267fd109e644efc76d465e019379c Mon Sep 17 00:00:00 2001
|
||||||
|
From: chengzihan2 <chengzihan1111@163.com>
|
||||||
|
Date: Sat, 20 Jun 2020 21:51:22 +0800
|
||||||
|
Subject: [PATCH] libguestfs: PYTHON_LIBS is not set in Python 3.8
|
||||||
|
|
||||||
|
Follow those steps:
|
||||||
|
- obs build
|
||||||
|
|
||||||
|
and then obs build faild:
|
||||||
|
error: File not found:
|
||||||
|
/usr/lib64/python3.8/site-packages/libguestfsmod*.so
|
||||||
|
/usr/lib64/python3.8/site-packages/guestfs.py
|
||||||
|
/usr/lib64/python3.8/site-packages/__pycache__/guestfs*.py
|
||||||
|
|
||||||
|
Python 3.8 no longer links C extensions to -lpython, instead relying
|
||||||
|
on the fact that the python binary itself already contains those
|
||||||
|
symbols. This means $PYTHON_LIBS is empty and so the Python bindings
|
||||||
|
are not built.
|
||||||
|
|
||||||
|
Use a different test to see if the python module is avaiblable.
|
||||||
|
|
||||||
|
Signed-off-by: chengzihan2 <chengzihan1111@163.com>
|
||||||
|
---
|
||||||
|
m4/guestfs-python.m4 | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/m4/guestfs-python.m4 b/m4/guestfs-python.m4
|
||||||
|
index 7d4c991..befa9b1 100644
|
||||||
|
--- a/m4/guestfs-python.m4
|
||||||
|
+++ b/m4/guestfs-python.m4
|
||||||
|
@@ -33,14 +33,17 @@ AS_IF([test "x$enable_python" != "xno"],[
|
||||||
|
PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info@<:@1@:>@)"`
|
||||||
|
PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR"
|
||||||
|
AC_MSG_RESULT([$PYTHON_VERSION])
|
||||||
|
+
|
||||||
|
# Debian: python-2.7.pc, python-3.2.pc
|
||||||
|
PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"],[
|
||||||
|
+ have_python_module=1
|
||||||
|
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],[
|
||||||
|
+ have_python_module=1
|
||||||
|
AC_SUBST([PYTHON_CFLAGS])
|
||||||
|
AC_SUBST([PYTHON_LIBS])
|
||||||
|
AC_SUBST([PYTHON_VERSION])
|
||||||
|
@@ -49,6 +52,7 @@ AS_IF([test "x$enable_python" != "xno"],[
|
||||||
|
AC_MSG_WARN([python $PYTHON_VERSION not found])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
+
|
||||||
|
AC_MSG_CHECKING([Python prefix])
|
||||||
|
PYTHON_PREFIX=`$PYTHON -c "import sys; print (sys.prefix)"`
|
||||||
|
AC_MSG_RESULT([$PYTHON_PREFIX])
|
||||||
|
@@ -101,4 +105,4 @@ AS_IF([test "x$enable_python" != "xno"],[
|
||||||
|
AC_SUBST(PYTHON_EXT_SUFFIX)
|
||||||
|
])
|
||||||
|
AM_CONDITIONAL([HAVE_PYTHON],
|
||||||
|
- [test "x$PYTHON" != "xno" && test "x$PYTHON_LIBS" != "x" ])
|
||||||
|
+ [test "x$PYTHON" != "xno" && test "x$have_python_module" = "x1" ])
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: libguestfs
|
Name: libguestfs
|
||||||
Version: 1.40.2
|
Version: 1.40.2
|
||||||
Release: 7
|
Release: 8
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: A set of tools for accessing and modifying virtual machine (VM) disk images
|
Summary: A set of tools for accessing and modifying virtual machine (VM) disk images
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -12,6 +12,7 @@ URL: http://libguestfs.org/
|
|||||||
Source0: http://download.libguestfs.org/1.40-stable/libguestfs-1.40.2.tar.gz
|
Source0: http://download.libguestfs.org/1.40-stable/libguestfs-1.40.2.tar.gz
|
||||||
Source1: guestfish.sh
|
Source1: guestfish.sh
|
||||||
Source2: yum.conf.in
|
Source2: yum.conf.in
|
||||||
|
Patch0000: 0001-libguestfs-PYTHON_LIBS-is-not-set-in-Python-3.8.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++, rpcgen, libtirpc-devel, supermin-devel >= 5.1.18, hivex-devel >= 1.2.7-7, ocaml-hivex-devel, perl(Pod::Simple), perl(Pod::Man)
|
BuildRequires: gcc-c++, rpcgen, libtirpc-devel, supermin-devel >= 5.1.18, hivex-devel >= 1.2.7-7, ocaml-hivex-devel, perl(Pod::Simple), perl(Pod::Man)
|
||||||
BuildRequires: /usr/bin/pod2text, po4a, augeas-devel >= 1.7.0, readline-devel, genisoimage, libxml2-devel, createrepo, glibc-static, libselinux-utils
|
BuildRequires: /usr/bin/pod2text, po4a, augeas-devel >= 1.7.0, readline-devel, genisoimage, libxml2-devel, createrepo, glibc-static, libselinux-utils
|
||||||
@ -20,13 +21,13 @@ BuildRequires: zip, unzip, systemd-units, netpbm-progs, icoutils, libvirt-daemon
|
|||||||
BuildRequires: systemd-devel, bash-completion, /usr/bin/ping, /usr/bin/wget, curl, xz, gtk3-devel, dbus-devel, /usr/bin/qemu-img, perl(Win::Hivex)
|
BuildRequires: systemd-devel, bash-completion, /usr/bin/ping, /usr/bin/wget, curl, xz, gtk3-devel, dbus-devel, /usr/bin/qemu-img, perl(Win::Hivex)
|
||||||
BuildRequires: perl(Win::Hivex::Regedit), ocaml, ocaml-ocamldoc, ocaml-findlib-devel, ocaml-gettext-devel, ocaml-ounit-devel, ocaml-libvirt-devel >= 0.6.1.4-5
|
BuildRequires: perl(Win::Hivex::Regedit), ocaml, ocaml-ocamldoc, ocaml-findlib-devel, ocaml-gettext-devel, ocaml-ounit-devel, ocaml-libvirt-devel >= 0.6.1.4-5
|
||||||
BuildRequires: lua, lua-devel, perl-devel, perl-generators, perl-macros, perl(Sys::Virt), perl(Test::More), perl(Test::Pod) >= 1.00, perl(Test::Pod::Coverage) >= 1.00
|
BuildRequires: lua, lua-devel, perl-devel, perl-generators, perl-macros, perl(Sys::Virt), perl(Test::More), perl(Test::Pod) >= 1.00, perl(Test::Pod::Coverage) >= 1.00
|
||||||
BuildRequires: perl(Module::Build), perl(ExtUtils::CBuilder), perl(Locale::TextDomain), python2-devel, python-unversioned-command, python2-libvirt, python3-devel
|
BuildRequires: perl(Module::Build), perl(ExtUtils::CBuilder), perl(Locale::TextDomain), python2-devel, python-unversioned-command, python3-devel
|
||||||
BuildRequires: libvirt-python3, ruby-devel, rubygem-rake, rubygem(json), rubygem(rdoc), rubygem(test-unit), ruby-irb, java-1.8.0-openjdk, java-1.8.0-openjdk-devel
|
BuildRequires: libvirt-python3, ruby-devel, rubygem-rake, rubygem(json), rubygem(rdoc), rubygem(test-unit), ruby-irb, java-1.8.0-openjdk, java-1.8.0-openjdk-devel
|
||||||
BuildRequires: jpackage-utils, php-devel, gobject-introspection-devel, gjs, acl, attr, augeas-libs, bash, binutils, btrfs-progs, lzop, mdadm, nilfs-utils
|
BuildRequires: jpackage-utils, php-devel, gobject-introspection-devel, gjs, acl, attr, augeas-libs, bash, binutils, btrfs-progs, lzop, mdadm, nilfs-utils
|
||||||
BuildRequires: bzip2, coreutils, cpio, cryptsetup, debootstrap, dhclient, diffutils, dosfstools, e2fsprogs, file, findutils, gawk, gdisk, gfs2-utils
|
BuildRequires: bzip2, coreutils, cpio, cryptsetup, debootstrap, dhclient, diffutils, dosfstools, e2fsprogs, file, findutils, gawk, gdisk, gfs2-utils
|
||||||
BuildRequires: grep, gzip, hivex, iproute, iputils, jfsutils, kernel, kmod, kpartx, less, libcap, libldm, libselinux, libxml2, lsof, lsscsi, lvm2, strace
|
BuildRequires: grep, gzip, hivex, iproute, iputils, jfsutils, kernel, kmod, kpartx, less, libcap, libldm, libselinux, libxml2, lsof, lsscsi, lvm2, strace
|
||||||
BuildRequires: openssh-clients, parted, pciutils, pcre, policycoreutils, procps, psmisc, qemu-img, reiserfs-utils, rsync, scrub, sed, sleuthkit, squashfs-tools
|
BuildRequires: openssh-clients, parted, pciutils, pcre, policycoreutils, procps, psmisc, qemu-img, reiserfs-utils, rsync, scrub, sed, sleuthkit, squashfs-tools
|
||||||
BuildRequires: systemd, tar, udev, util-linux, vim-minimal, which, xfsprogs, yajl, zerofree, hfsplus-tools, ntfs-3g, ntfsprogs
|
BuildRequires: systemd, tar, udev, util-linux, vim-minimal, which, xfsprogs, yajl, zerofree, hfsplus-tools, ntfs-3g, ntfsprogs gettext-devel
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
BuildRequires: syslinux syslinux-extlinux
|
BuildRequires: syslinux syslinux-extlinux
|
||||||
%endif
|
%endif
|
||||||
@ -377,6 +378,11 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/
|
|||||||
%exclude %{_mandir}/man1/virt-tar.1*
|
%exclude %{_mandir}/man1/virt-tar.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jun 20 2020 chengzihan <chengzihan2@huawei.com> - 1:1.40.2-8
|
||||||
|
- fix the problem: PYTHON_LIBS is not set in Python 3.8
|
||||||
|
- and add BuildRequires: gettext-devel
|
||||||
|
- delete BuildRequires: python2-libvirt, which is no longer provided
|
||||||
|
|
||||||
* Fri May 29 2020 lizhenhua <lizhenhua21@huawei.com> - 1:1.40.2-7
|
* Fri May 29 2020 lizhenhua <lizhenhua21@huawei.com> - 1:1.40.2-7
|
||||||
- Disable appliance
|
- Disable appliance
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user