I believe this warning is bogus, but simply initializing the local
variable is enough to avoid it.
log.c: In function 'do_log':
log.c:390:7: error: 'comm_len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
390 | printf (" %.*s", (int) comm_len, comm);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(cherry picked from commit 4e199494c4)
In OCaml >= 4.09 the return value pointer of caml_named_value is
declared const.
Based on Pino Toscano's original patch to ocaml-augeas.
(cherry picked from commit 74ce7332db)
Since about 2017 OCaml has had a function for creating an initialized
string. This uses the function instead of caml_alloc_string + memcpy
(which doesn't work for OCaml 4.10) and defines a replacement if the
function is missing.
Note this requires configure.ac in libguestfs.git and virt-v2v.git to
define HAVE_CAML_ALLOC_INITIALIZED_STRING.
(cherry picked from commit 398dc56a6cb5d6d01506338fa94ef580e668d5e9)
In OCaml >= 4.09 the return value pointer of caml_named_value is
declared const.
Based on Pino Toscano's original patch to ocaml-augeas.
(cherry picked from commit 9788fa50601ad4f1eab56d0b763591268026e536)
This gives deprecation warnings. It always was simply a char *, and
the recommendation upstream is to replace uses with char *:
9eb9c93275
(cherry picked from commit eb78e990ac)
Newer versions do not have the 24px distributor.png icon; OTOH they have
the 48px version, so look for that one before the 24px one.
Also, bump the size limit to 10K, as newer versions of the icon are
bigger than 3K.
(cherry picked from commit f41a75cea6)
Isolate the code for looking for a PNG file among a specified list from
the icon_ubuntu implementation, and switch that function to it.
This is just code refactoring, with no behaviour changes.
(cherry picked from commit 6ff95acc72)
Use NEVR when querying RPM for the list of files of a package, instead
of ENVR. Also, use the epoch only when non-zero, and version of RPM
supports it.
The approach is basically copied from what supermin does in its RPM
package handler.
(cherry picked from commit 5eafd12731)
So far RBufferOut return values, and FBuffer struct fields are 'str' on
all the versions of Python. Python 3 distinguishes between 'str'
(unicode strings), and 'bytes', with 'str' no more able to hold
arbitrary data.
For this reason, switch the return value of RBufferOut functions, and
FBuffer struct fields to bytes on Python 3: while this is a potentially
incompatibile change, this is the only way to handle safely sequences
of arbitrary bytes.
(cherry picked from commit 0ee02e0117)
Make sure to reference the arguments, to make sure they are kept alive
during the function call; this is visible when setting an event handler
for the CLOSE event, and testing it with Python 3.
This does not seem to create a memory leak e.g. with Python 2.
Also, switch away from the quasi-internal PyEval_CallObject to the
public PyObject_CallObject, which takes care of doing safety checks.
(cherry picked from commit 85235aec83)
Commit 4252a490bb dropped the PO files
for ca (Catalan) and pt_BR (Brazilian Portuguese). However it did not
drop these languages from the linguas line in the Makefile resulting
in a build failure.
./configure output now contains a distinct section for v2v and p2v:
--- Checking the virt-v2v and virt-p2v dependencies ---
checking for the nbdkit python plugin name... python3
checking for --with-gtk option... 2
checking for GTK... yes
checking for DBUS... yes
checking if we can build virt-p2v... yes, with Gtk 2
Thanks: Pino Toscano.
No functional change, but it does allow downstream distributions to
adjust the nbdkit Python plugin used by virt-v2v -o rhv-upload mode:
./configure --with-virt-v2v-nbdkit-python-plugin=...
When parsing "xdev"-kind devices, do not assume that the partition
number can be converted to integer: re_xdev accepts an empty part of the
partition number, so just handle as it is, as string.
This fixes a regression due to the conversion of the inspection code to
OCaml, as the old C version did not have this issue.
We've been carrying this exact patch in RHEL 7 for several years. It
reverts the change made in 2014 where we switched to using the virbr0
bridge for libguestfs networking instead of SLIRP. We thought SLIRP
was going to become unsupported in qemu, but recently there have been
more encouraging signs since it looks like SLIRP will be spun off as a
separate project, running as a modular process and properly secured
and supported.
This reverts commit 224de20b9a.
Do not assume that the Python plugin of nbdkit has the same name of the
Python interpreter.
Use the default upstream name of nbdkit to identify it; downstream
distributions must adjust this variable, in case they rename the Python
plugin of nbdkit.