Commit Graph

11528 Commits

Author SHA1 Message Date
Richard W.M. Jones
3b1ed4c9bc build: Use correct ounit2 OCaml module.
Also update common module to get the same fix.
2021-03-25 08:26:42 +00:00
Richard W.M. Jones
4991fe5259 bash-completion: Remove completion scripts for tools.
These have moved to guestfs-tools.

Fixes: commit 733d2182b6
2021-03-23 11:08:42 +00:00
Richard W.M. Jones
eb53d74ba2 Don't include huge ChangeLog in the tarball.
Adds a few megabytes which people can easily get from the git
repository.
2021-03-23 10:00:12 +00:00
Richard W.M. Jones
09639387aa Version 1.45.2. v1.45.2 2021-03-22 16:41:30 +00:00
Richard W.M. Jones
008cda2bd2 generator: Do not build mlcustomize if directory does not exist.
When shipping the libguestfs tarball we do not necessarily have
common/mlcustomize.  If we run the generator in this situation then
don't try to generate files in the non-existent directory.

See-also: commit 7ced2b9354
2021-03-22 16:37:55 +00:00
Richard W.M. Jones
b0b2979dce tests: Fix EXTRA_DIST.
Fixes: commit 6d32773e81
2021-03-22 16:27:07 +00:00
Richard W.M. Jones
9dddd8ec62 tests/mount-local/test-parallel-mount-local.c: Fix bogus -fanalyzer warning.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99716 for the reduced
test case.
2021-03-22 15:52:22 +00:00
Richard W.M. Jones
e0a1106103 daemon: Don't return bogus failure from readdir.
This was returning "readdir: Invalid argument" which is actually
impossible (readdir(3) cannot fail with EINVAL).  It turns out that
the problem is just errno from some other place leaking out.
2021-03-22 14:56:10 +00:00
Richard W.M. Jones
e282558581 tests/charsets/test-charset-fidelity.c: Print all errors.
Not just the first error.
2021-03-22 14:49:41 +00:00
Richard W.M. Jones
b5b22893a1 tests/charsets/test-charset-fidelity.c: Fix code indentation regression.
A previous commit adding assert statements (to make -fanalyzer happy)
accidentally broke this test.

Fixes: commit 8a4275c568
2021-03-22 14:49:09 +00:00
Richard W.M. Jones
9108ad152d daemon/btrfs.c: Ignore mkfs.btrfs allocstart option.
This was deprecated in btrfs 4.14.1 and recently removed (see
btrfs-progs commit 4bd94dba8a "btrfs-progs: mkfs: remove alloc start
options and docs").  If the option is set simply ignore it.
2021-03-22 14:26:57 +00:00
Richard W.M. Jones
1eb055bd46 tests/nbd/test-nbd.pl: Multiple improvements.
Use qemu-nbd --pid-file option so we don't have to use an arbitrary
sleep.

Enable all parts of the test, since everything should work now with
various upstream bugs having been fixed in the 8 years since the test
was originally written.
2021-03-22 14:12:43 +00:00
Richard W.M. Jones
d4ab4ff683 tests: Fix test for new libcap output.
libcap commit 177cd41803 ("A more compact form for the text
representation of capabilities.") changed the format used by
cap_to_text(3), breaking our test.  Change the test to cope.  This
will break with older libcap now, but there's not a lot we can do
about it.
2021-03-22 13:52:41 +00:00
Richard W.M. Jones
245d1a3d7c python: Ignore code style error E128. 2021-03-22 13:19:19 +00:00
Richard W.M. Jones
6d32773e81 tests: Run the tests in parallel.
Before this change the tests ran in about 12m34 and afterwards in
about 6m20, although the real change is more dramatic if you only run
tests from the tests/ subdirectory (as language tests still run serially).

This breaks valgrinding for now, which I intend to fix properly later.
2021-03-18 16:28:55 +00:00
Richard W.M. Jones
ff3fdb0418 tests/regressions: Remove virt-resize test rhbz1285847.sh
This test was correctly copied into the new guestfs-tools repository
when virt-resize was moved there along with the other tools.  However
it was never removed from libguestfs.  We were effectively running the
test on the installed virt-resize.

Fixes: commit 733d2182b6
2021-03-18 13:55:20 +00:00
Richard W.M. Jones
22e9b682a4 tests: Remove obsolete automake2junit script.
Originally added in commit 38fbda9d37 as
a way to integrate the output from automake into CI systems, but not
actually used.
2021-03-18 13:54:44 +00:00
Richard W.M. Jones
13ceb6a87b appliance: Use <cpu mode="maximum"/> for -cpu max on libvirt.
Note this requires libvirt >= 7.1.0 which was only released in March 2021.

With an older libvirt you will see this error:

  Original error from libvirt: unsupported configuration: Invalid mode attribute 'maximum' [code=67 int1=-1]

In theory we could check if this is supported by looking at the
libvirt capabilities and fall back, but this commit does not do that,
in the expectation that most people will be using the default backend
(direct) and on Fedora/RHEL we will add an explicit minimum version
dependency to the package.

qemu support has been around quite a bit longer (at least since 2017).

Fixes: commit 30f74f38bd
2021-03-18 12:42:35 +00:00
Richard W.M. Jones
24e112c1b7 perl: Remove dependency on Win::Hivex::*
This is used in virt-win-reg, but that tool have moved out to
guestfs-tools so the dependency is no longer needed by libguestfs
itself.

Fixes: commit 733d2182b6
2021-03-18 12:19:55 +00:00
Richard W.M. Jones
061be6bb84 tests: Remove dependency on Sys::Virt.
This was only used for a single rule (check-valgrind-local-guests)
which ran "make check-valgrind" on local guests.  This was never
really used by me and was fairly inadvisable anyway, so we can easily
remove it and thus remove the dependency on perl Sys::Virt.
2021-03-18 12:16:28 +00:00
Sam Eiderman
5d686b92a6 launch: libvirt, direct: Add force_kvm backend setting.
By using:

  export LIBGUESTFS_BACKEND_SETTINGS=force_kvm

you can force the backend to use KVM and never fall back to
TCG (software emulation).
2021-03-16 16:11:23 +00:00
Richard W.M. Jones
f8f424325c Update common to get OCaml PCRE module fix. 2021-03-16 15:13:49 +00:00
Richard W.M. Jones
82493579f3 Port libguestfs to use pcre2 instead of pcre.
https://bugzilla.redhat.com/show_bug.cgi?id=1938982
2021-03-16 11:24:37 +00:00
Richard W.M. Jones
fbf573d2c9 daemon/daemon-c.c: Fix whitespace. 2021-03-16 11:24:37 +00:00
Richard W.M. Jones
733d2182b6 Remove the tools.
These have now moved to a new repository.  Provisionally it is here:

https://github.com/rwmjones/guestfs-tools/

but this is not the final location, as it will eventually be hosted on
gitlab.com.

The tarballs are here:

https://download.libguestfs.org/guestfs-tools/
2021-03-11 13:58:41 +00:00
Remi Collet
ff4080378d php: Fix the build. 2021-03-05 13:22:05 +00:00
Richard W.M. Jones
a009a4cf6f Version 1.45.1. v1.45.1 2021-03-03 12:35:48 +00:00
Richard W.M. Jones
e743fb94d6 Update common. 2021-03-02 10:43:55 +00:00
Richard W.M. Jones
5f499208cf builder: Don't redefine Val_none (OCaml 4.12).
CC       virt_builder-setlocale-c.o
setlocale-c.c:38: error: "Val_none" redefined [-Werror]
   38 | #define Val_none (Val_int (0))
      |
In file included from /usr/lib64/ocaml/caml/alloc.h:24,
                 from setlocale-c.c:23:
/usr/lib64/ocaml/caml/mlvalues.h:395: note: this is the location of the previous definition
  395 | #define Val_none Val_int(0)
      |
2021-03-02 10:42:49 +00:00
Richard W.M. Jones
21cd97732c daemon: lvm: Use lvcreate --yes to avoid interactive prompts.
See https://bugzilla.redhat.com/show_bug.cgi?id=1930996#c1

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1930996
2021-02-22 11:04:15 +00:00
Richard W.M. Jones
064c3b6a94 Update common submodule. 2021-02-22 10:38:19 +00:00
Richard W.M. Jones
20dbc24d68 lib/fuse.c: Use safe_malloc instead of malloc.
Avoids having to check the return value, and in this case avoids a GCC
analyzer error.
2021-02-22 10:38:19 +00:00
Richard W.M. Jones
c253398247 fuse/guestmount.c: Avoid leaking fp on error path.
Bug found by GCC analyzer.
2021-02-22 10:38:19 +00:00
Richard W.M. Jones
acefa23758 diff: Don't try to call unlink(NULL) on certain error paths.
Actual bug found by GCC analyzer.
2021-02-22 10:38:19 +00:00
Richard W.M. Jones
001c1dc09f daemon/tar.c: Avoid bogus GCC analyzer warning.
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99196
2021-02-22 10:38:19 +00:00
Richard W.M. Jones
4af1c631a2 daemon/command.c daemon/debug.c df/main.c: Ignore bogus GCC analyzer warnings
See upstream bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99193
2021-02-22 10:37:49 +00:00
Richard W.M. Jones
f19fd566f6 appliance: Add dhclient for Arch-like Manjaro distro.
Thanks: hatifnatt on IRC
2021-02-17 09:44:19 +00:00
Richard W.M. Jones
30f74f38bd appliance: Use -cpu max.
QEMU has a newish feature (from about 2017 / qemu 2.9) called -cpu max
which is supposed to select the best CPU, ideal for libguestfs.

After this change, on x86-64:

               KVM                          TCG

Direct         -cpu max                     -cpu max
(non-libvirt)

Libvirt   <cpu mode="host-passthrough">     <cpu mode="host-model">
            <model fallback="allow"/>         <model fallback="allow"/>
          </cpu>                            </cpu>

Thanks: Daniel Berrangé
2021-01-28 14:04:29 +00:00
Richard W.M. Jones
7ac82beb89 fish/tilde.c: Suppress more bogus -fanalyser warnings. 2021-01-28 12:27:41 +00:00
Richard W.M. Jones
fdda111e0e lib/qemu.c: Suppress another bogus -fanalyser warning. 2021-01-28 12:27:41 +00:00
Richard W.M. Jones
4e66dd5736 website/download/builder/index: Automatic update.
Updates: commit 97902a9cf6
2021-01-28 12:27:41 +00:00
Richard W.M. Jones
97902a9cf6 builder: templates: Add ubuntu-20.04.
The reason is wasn't working before is that virt-manager was missing
this fix:

b55b7e9462/virtinst/install/urldetect.py

Thanks: fepitre on IRC
2021-01-28 11:57:36 +00:00
Richard W.M. Jones
8670e4ee90 builder: templates: Added rhel-7.9. 2021-01-27 11:57:41 +00:00
Richard W.M. Jones
03347d49ee lib: Move CLEANUP_GL_RECURSIVE_LOCK_UNLOCK to libguestfs header.
Previously this was in common/utils.  However it is not used anywhere
else, and guestfs-tools wants to remove gnulib dependencies, so move
this to libguestfs.
2021-01-22 13:39:16 +00:00
Richard W.M. Jones
fb7b683a29 appliance: Avoid having ${exec_prefix} in guestfs appliance path.
Normally packagers should try to use ./configure --with-guestfs-path=...
However if they do not, then a regression in 1.44 caused the path to
constain the literal string "${exec_prefix}".  This was because of
autoconf stupidity.

Try to resolve this by expanding ${exec_prefix} to something sensible.

The expansion will often be wrong (but at least it will now be a valid
path), hence the recommendation to always set --libdir and/or
--with-guestfs-path when configuring.

Fixes: commit 94ff24b880
Fixes: https://bugzilla.redhat.com/1915646
2021-01-15 14:20:00 +00:00
Richard W.M. Jones
0c82987531 builder: Fix Fedora 33 boot problem.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1911177
Thanks: Daniel P. Berrangé
2021-01-13 12:35:47 +00:00
Richard W.M. Jones
812f837c97 build: Avoid warnings about unknown pragmas.
In commit 4bbbf03b8b we started to
ignore bogus GCC 11 warnings.  Unfortunately earlier versions of GCC
don't know about those pragmas so give warnings [hence errors in
developer builds] like:

tsk.c:75:32: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]

Turn off these warnings.

Updates: commit 4bbbf03b8b
2021-01-12 10:27:35 +00:00
Richard W.M. Jones
de9a5e59f1 Version 1.44.0. v1.44.0 2021-01-06 10:18:34 +00:00
Richard W.M. Jones
8cf46e4886 docs: Add release notes for libguestfs 1.44.
This is quite a small release.
2021-01-05 19:41:31 +00:00
Richard W.M. Jones
675b336f63 gnulib: Update to latest. 2021-01-05 15:53:51 +00:00