[PATCH] build: define HAVE_PYCODESTYLE in all the cases
by Pino Toscano
Fixes commit cad3ea9e74bcff0dd42dc2a3710c6b3fa6e868b1 in case Python is
disabled, or not available.
---
m4/guestfs-python.m4 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/m4/guestfs-python.m4 b/m4/guestfs-python.m4
index 505eba5df..2e736875c 100644
--- a/m4/guestfs-python.m4
+++ b/m4/guestfs-python.m4
@@ -88,7 +88,6 @@ AS_IF([test "x$enable_python" != "xno"],[
AC_MSG_RESULT([$PYTHON_EXT_SUFFIX])
AC_CHECK_PROGS([PYCODESTYLE],[pycodestyle],[no])
- AM_CONDITIONAL([HAVE_PYCODESTYLE], [test "x$PYCODESTYLE" != "xno"])
fi
AC_SUBST(PYTHON_PREFIX)
@@ -98,3 +97,5 @@ AS_IF([test "x$enable_python" != "xno"],[
])
AM_CONDITIONAL([HAVE_PYTHON],
[test "x$PYTHON" != "xno" && test "x$have_python_module" = "x1" ])
+AM_CONDITIONAL([HAVE_PYCODESTYLE],
+ [test -n "$PYCODESTYLE" && test "x$PYCODESTYLE" != "xno"])
--
2.24.1
4 years, 11 months
Re: [Libguestfs] python3-libguestfs for EPEL request
by Richard W.M. Jones
On Wed, Jan 15, 2020 at 12:06:45PM +0000, Nick Howitt wrote:
> Hello Richard,
>
> I am using ClearOS7 (a Centos 7 derivative which also uses EPEL) and
> am using various packages in the EPEL repository. I am interested in
> seeing python3-libguestfs added to EPEL in order to use wok-3.0.0
> and kimchi-3.0.0.
>
> Would it be possible for you to maintain the package in EPEL? If not
> do you know of a maintainer who could help you with it? While EPEL
> is more conservative in package maintenance, it does allow for
> updates to later versions when needed.
>
I've no objection to adding it to EPEL 7, but there could be some
technical difficulties.
We distribute libguestfs 1.40.2 in RHEL 7.7 (see
https://bugzilla.redhat.com/1621895). This has a Python 2 subpackage
called python-libguestfs. So you'd have to add python3-libguestfs as
a new package in EPEL 7. It's possible to package only the Python
bindings as an RPM although I don't know anyone who has actually done
it so far.
Note also there is a python3-libguestfs package shipped in RHEL 8+ so
we'd have to be careful not to ship a higher NVR number than that
package. Currently it's
python3-libguestfs-1.40.2-20.module+el8.2.0+5433+9e1420c8
> If you are not interested in EPEL or don't feel like you have the
> time to put your packages into EPEL, the EPEL project would like to
> request that a co-maintainer who is a part of EPEL be added to your
> packages.
>
> The EPEL team appreciate your help with EPEL.
Please suggest a maintainer.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
4 years, 11 months
[PATCH v2v] docs: Fix update-crypto-policies command.
by Richard W.M. Jones
The command as documented was wrong. We need to use the --set option
to change the policy.
Fixes commit d5cbe7b4bee5dec9e28b1db03e933c97ef6d11e0.
Thanks: Xiaodai Wang
---
docs/virt-v2v-input-xen.pod | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod
index bafeabf62..bce0aff45 100644
--- a/docs/virt-v2v-input-xen.pod
+++ b/docs/virt-v2v-input-xen.pod
@@ -36,7 +36,7 @@ to interoperate with RHEL 5 sshd are disabled. To enable them you may
need to run this command on the conversion server (ie. ssh client),
but read L<update-crypto-policies(8)> first:
- # update-crypto-policies LEGACY
+ # update-crypto-policies --set LEGACY
=head2 Test libvirt connection to remote Xen host
--
2.24.1
4 years, 11 months
[PATCH 0/7] Various Python cleanups.
by Pino Toscano
Patch #7 depends on:
https://www.redhat.com/archives/libguestfs/2020-January/msg00035.html
No, Python < 3 support is not dropped yet, however it will be easier
after this series.
Pino Toscano (7):
build: enforce a minimum Python version
python: drop code for Python < 2.5
python: assume support for Capsules
python: remove compile time check for PyString_AsString
python: replace guestfs_int_py_fromstringsize in Py2 branches
python: stop including config.h
python: stop bundling config.h in dist archives
.gitignore | 1 -
generator/python.ml | 32 ++------------------------------
m4/guestfs-python.m4 | 21 +++++----------------
python/MANIFEST.in | 1 -
python/Makefile.am | 5 -----
python/handle.c | 8 +++-----
6 files changed, 10 insertions(+), 58 deletions(-)
--
2.24.1
4 years, 11 months
[PATCH] Link .mli files corresponding to autorgenerated .ml files into builddir
by Hilko Bengen
This avoids build failures in separate builds such as this one:
,----
| ocamlfind ocamlc -package str,unix -I . -a guestfs_config.cmo stringMap.cmo stringSet.cmo std_utils.cmo -o mlstdutils.cma
| ar cr libmlstdutils.a libmlstdutils_a-dummy.o
| ranlib libmlstdutils.a
| File "_none_", line 1:
| Error: Files std_utils.cmo and guestfs_config.cmo
| make inconsistent assumptions over interface Guestfs_config
| make[4]: *** [Makefile:2580: mlstdutils.cma] Error 2
`----
---
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
index 5f8310a640..77a1e986cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -353,6 +353,10 @@ AC_CONFIG_FILES([Makefile
tools/Makefile
website/index.html])
+AC_CONFIG_LINKS([common/mlstdutils/guestfs_config.mli:common/mlstdutils/guestfs_config.mli
+ daemon/daemon_config.mli:daemon/daemon_config.mli
+ v2v/config.mli:v2v/config.mli])
+
AC_OUTPUT
dnl Produce summary.
--
2.25.0.rc2
4 years, 11 months
[PATCH v2 0/8] Various Python pycodestyle fixes
by Pino Toscano
Fixes all the pycodestyle issues in the Python bindings, overring one
that does not make sense to change (and it's in setup.py, so almost
irrelevant).
Add a simple optional pycodestyle-based test to avoid regressions in the
future.
Pino Toscano (8):
python: PEP 8: adapt empty lines
python: PEP 8: adapt whitespaces in lines
python: tests: catch specific exception
python: tests: improve variable naming
python: tests: remove unused imports
python: improve errors in inspect_vm example
python: skip line length check in license line
python: add a pycodestyle test
config.sh.in | 1 +
generator/python.ml | 5 ++---
m4/guestfs-python.m4 | 3 +++
python/Makefile.am | 5 +++++
python/examples/inspect_vm.py | 7 +++++--
python/setup.py.in | 2 +-
python/t/test020Create.py | 1 +
python/t/test030CreateFlags.py | 3 ++-
python/t/test040CreateMultiple.py | 2 ++
python/t/test050HandleProperties.py | 1 +
python/t/test070OptArgs.py | 1 -
python/t/test080Version.py | 2 --
python/t/test090RetValues.py | 10 +++++-----
python/t/test100Launch.py | 1 -
python/t/test410CloseEvent.py | 1 -
python/t/test420LogMessages.py | 1 -
python/t/test430ProgressMessages.py | 3 ++-
python/t/test800ExplicitClose.py | 1 -
python/t/test820RHBZ912499.py | 3 +--
python/t/test910Libvirt.py | 1 -
python/t/tests_helper.py.in | 2 +-
python/test-pycodestyle.sh | 28 ++++++++++++++++++++++++++++
22 files changed, 60 insertions(+), 24 deletions(-)
create mode 100755 python/test-pycodestyle.sh
--
2.24.1
4 years, 11 months
[v2v PATCH 0/6] Various Python pycodestyle fixes
by Pino Toscano
Fixes the majority of the pycodestyle issues in the Python scripts, and
fix the existing test-v2v-python-syntax.sh to use pycodestyle to
actually perform style checks.
Pino Toscano (6):
PEP 8: adapt whitespaces in lines
PEP 8: move imports at the top
PEP 8: adapt empty lines
tests: find all the Python scripts for syntax checks
-o rhv-upload: remove unused Python imports
Revamp check for Python code style
config.sh.in | 1 +
m4/guestfs-progs.m4 | 3 +
.../ovirtsdk4/__init__.py | 39 +++++--
.../ovirtsdk4/types.py | 40 ++++---
v2v/rhv-upload-createvm.py | 20 ++--
v2v/rhv-upload-deletedisks.py | 14 +--
v2v/rhv-upload-plugin.py | 105 ++++++++++++------
v2v/rhv-upload-precheck.py | 18 ++-
v2v/rhv-upload-vmcheck.py | 16 ++-
v2v/test-v2v-python-syntax.sh | 17 ++-
10 files changed, 165 insertions(+), 108 deletions(-)
--
2.24.1
4 years, 11 months
[PATCH 0/7] Various Python pycodestyle fixes
by Pino Toscano
Fixes the majority of the pycodestyle issues in the Python bindings,
leaving only an overly length line in setup.py.
Add a simple optional pycodestyle-based test to avoid regressions in the
future.
Pino Toscano (7):
python: PEP 8: adapt empty lines
python: PEP 8: adapt whitespaces in lines
python: tests: catch specific exception
python: tests: improve variable naming
python: tests: remove unused imports
python: improve errors in inspect_vm example
python: add a pycodestyle test
config.sh.in | 1 +
generator/python.ml | 5 ++---
m4/guestfs-python.m4 | 3 +++
python/Makefile.am | 5 +++++
python/examples/inspect_vm.py | 7 +++++--
python/t/test020Create.py | 1 +
python/t/test030CreateFlags.py | 3 ++-
python/t/test040CreateMultiple.py | 2 ++
python/t/test050HandleProperties.py | 1 +
python/t/test070OptArgs.py | 1 -
python/t/test080Version.py | 2 --
python/t/test090RetValues.py | 10 +++++-----
python/t/test100Launch.py | 1 -
python/t/test410CloseEvent.py | 1 -
python/t/test420LogMessages.py | 1 -
python/t/test430ProgressMessages.py | 3 ++-
python/t/test800ExplicitClose.py | 1 -
python/t/test820RHBZ912499.py | 3 +--
python/t/test910Libvirt.py | 1 -
python/t/tests_helper.py.in | 2 +-
python/test-pycodestyle.sh | 30 +++++++++++++++++++++++++++++
21 files changed, 61 insertions(+), 23 deletions(-)
create mode 100755 python/test-pycodestyle.sh
--
2.24.1
4 years, 11 months
[common/libguestfs PATCH] utils: conditionally include config.h on HAVE_CONFIG_H
by Pino Toscano
autotools define HAVE_CONFIG_H to signal a config.h was generated; since
this file is built directly also in bindings without the use of
config.h, make sure config.h is not requested in those cases.
This file uses only POSIX functions anyway, so it should not be a
problem.
---
utils/stringlists-utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/utils/stringlists-utils.c b/utils/stringlists-utils.c
index 92c8030..97ad360 100644
--- a/utils/stringlists-utils.c
+++ b/utils/stringlists-utils.c
@@ -23,7 +23,9 @@
* such as C<safe_*>, C<error> or C<perrorf>, or any C<guestfs_int_*>.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdlib.h>
#include <string.h>
--
2.24.1
4 years, 11 months