314 Commits

Author SHA1 Message Date
Richard W.M. Jones
836a977c16 Version 1.52.0. 2024-01-04 17:31:41 +00:00
Richard W.M. Jones
9bfd3f9b25 docs: Fix AUTHORS to account for changes to common submodule
Updates: commit 68fcf11456
2024-01-04 16:51:01 +00:00
Richard W.M. Jones
08f6140398 docs: Further small revisions to libguestfs 1.52 release notes
Updates: commit 68fcf11456
2024-01-04 16:44:17 +00:00
Richard W.M. Jones
7b7f326767 docs: Fix description of new LVM mapper in --key feature
Fixes: commit 68fcf11456
2024-01-04 16:36:13 +00:00
Richard W.M. Jones
68fcf11456 docs: Add outline release notes for libguestfs 1.52 2024-01-04 13:47:34 +00:00
Richard W.M. Jones
b2f3994de2 New mailing list archives 2023-11-16 10:52:11 +00:00
Richard W.M. Jones
3cb094083e Replace Pervasives.* with Stdlib.*
Since OCaml 4.07 (released 2018-07-10) the always-loaded standard
library module has been called Stdlib.  The old Pervasives module was
finally removed in OCaml 5.

$ perl -pi.bak -e 's/Pervasives\./Stdlib./g' -- `git ls-files`

OCaml >= 4.07 is now required.

Also update the common submodule with:

  commit d61cd820b49e403848d15c5deaccbf8dd7045370
  Author: Jürgen Hötzel
  Date:   Sat May 20 18:16:40 2023 +0200

    Add support for OCaml 5.0
2023-05-22 16:42:31 +01:00
Richard W.M. Jones
ceb1cf50e6 Version 1.50.0. 2023-02-07 11:23:45 +00:00
Richard W.M. Jones
e2c7bddf10 Update copyright dates for 2023
Run this command across the source:

  perl -pi.bak -e 's/(20[012][0-9])-20[12][012]/$1-2023/g' `git ls-files`

and remove changes to po{,-docs}/*.po{,t} (these will be regenerated
later when we run 'make dist').
2023-02-07 10:50:48 +00:00
Richard W.M. Jones
34d378cef2 docs: Add outline release notes for forthcoming 1.50 stable release 2023-01-31 15:54:46 +00:00
Richard W.M. Jones
fbf7fe8793 build: Remove bundled copy of ocaml-augeas
This is now an external dependency.
2023-01-19 23:00:23 +00:00
Richard W.M. Jones
1bcf0bc5dd Version 1.49.6. 2022-11-21 16:46:05 +00:00
Richard W.M. Jones
cf89757883 Version 1.49.5. 2022-10-11 14:54:08 +01:00
Richard W.M. Jones
b018b35bd4 lib: Remove dtrace/systemtap probes
These were added in libguestfs 1.14, but never really used.  Only a
handful of probes were available.  When I was benchmarking libguestfs
in 2016 I didn't even use these probes because better/simpler
techniques were available.
2022-08-16 15:35:17 +01:00
Richard W.M. Jones
c51d1cfe9a m4: Check for GNU realpath program
It is a dependency of the ocaml-dep.sh script, required for all builds.
2022-08-16 13:45:14 +01:00
Richard W.M. Jones
0b3c6cc0c0 daemon: Remove remaining uses of custom printf %Q and %R
We have traditionally used custom printf formatters %Q and %R, where
%Q replaces the argument with a shell-quoted string, and %R replaces
the argument with a sysroot-prefixed shell-quoted string.  They are
actually pretty useful, but unfortunately only supported by glibc.

We only used them in about a dozen places in the daemon (much code
having been replaced by OCaml which does not need them).

In every remaining case we were constructing a command using code like
this:

  asprintf_nowarn (&cmd,
         "cd %Q && find -print0 | %s -0 -o -H %s --quiet", ...);

We can replace this with:

  char *cmd;
  size_t cmd_size;
  fp = open_memstream (&cmd, &cmd_size);
  fprintf (fp, "cd ");
  shell_quote (dir, fp);
  fprintf (fp, " && find -print0 | %s -0 -o -H %s --quiet", ...);
  fclose (fp);
2022-08-16 10:39:01 +01:00
Richard W.M. Jones
0e784824e8 daemon: Add zstd support to guestfs_file_architecture
This is required so we can determine the file architecture of
zstd-compressed Linux kernel modules as used by OpenSUSE and maybe
other distros in future.

Note that zstd becomes a required package, but it is widely available
in current Linux distros.

The package names come from https://pkgs.org/download/zstd and my own
research.
2022-08-09 19:04:41 +01:00
Richard W.M. Jones
adfaf25a12 m4: Fix ./configure --disable-ocaml
OCaml is required to compile libguestfs, however we should still be
able to disable the OCaml bindings.  This didn't work because using
--disable-ocaml caused various configure tests to be skipped which are
required to compile the daemon.  In particular the check for
caml_alloc_initialized_string, resulting in this error:

pcre-c.c:47:1: error: static declaration of ‘caml_alloc_initialized_string’ follows non-static declaration
 caml_alloc_initialized_string (mlsize_t len, const char *p)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Also OCaml gettext is not required by libguestfs.  There are no *.ml
files used by libguestfs which require translation.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2108425
Fixes: https://bugs.gentoo.org/820053
Fixes: commit 733d2182b6
2022-07-20 10:11:09 +01:00
Richard W.M. Jones
d68d1b2780 Version 1.49.3. 2022-07-01 15:27:25 +01:00
Laszlo Ersek
99844660b4 docs/guestfs-security: document CVE-2022-2211
Short log for the common submodule, commit range
f8de5508fe75..35467027f657:

Laszlo Ersek (2):
      mlcustomize: factor out pkg install/update/uninstall from guestfs-tools
      options: fix buffer overflow in get_keys() [CVE-2022-2211]

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1809453
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2100862
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20220628115418.5376-2-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2022-06-29 15:29:37 +02:00
Richard W.M. Jones
a4f668fad3 Version 1.49.1. 2022-05-12 14:45:14 +01:00
Richard W.M. Jones
1b61ad0d3f Version 1.48.0. 2022-03-14 13:38:28 +00:00
Richard W.M. Jones
5bb4323fa2 docs/guestfs-release-notes-1.48.pod: Add fixed bugs to release notes
Updates: commit 2f4fb09de3
2022-03-12 22:48:42 +00:00
Richard W.M. Jones
96a887a9bf docs: Update release notes for 1.48
Updates: commit 2f4fb09de3
2022-03-10 10:14:06 +00:00
Richard W.M. Jones
4256737227 lib: Remove drive hotplugging support
This was a feature that allowed you to add drives to the appliance
after launching it.  It was complicated to implement, and only worked
for the libvirt backend (not "direct", which is the default backend).

It also turned out to be a bad idea.  The original concept was that
appliance creation was slow, so to examine multiple guests you should
launch the handle once then hot-add the disks from each guest in turn
to manipulate them.  However this is terrible from a security point of
view, especially for multi-tenant, because the drives from one guest
might compromise the appliance and thus the filesystems/drives from
subsequent guests.

It also turns out that hotplugging is very slow.  Nowadays appliance
creation should be faster than hotplugging.

The main use case for this was virt-df, but virt-df no longer uses it
after we discovered the problems outlined above.
2022-03-09 09:28:02 +00:00
Richard W.M. Jones
b9b0a90487 lib: Remove User-Mode Linux
User-Mode Linux was an alternative hypervisor that could run the
appliance, instead of using qemu.  It had many limitations including
lack of network, and UML support in Linux has been semi-broken for a
long time.  It was also slower than KVM on baremeal in general and had
various corner cases which were much slower including the emulated
serial port which made bulk uploads and downloads painful.  Also of
course it lacked qemu-specific features like qcow2 or any
network-backed disk, so many disk images could not be opened this way.

This was never supported in RHEL.

See-also: https://bugzilla.redhat.com/1144197
2022-03-09 09:28:02 +00:00
Richard W.M. Jones
dbc2fd8dc8 lib: Remove libguestfs live
This experimental feature allowed you (in theory) to connect to an
existing instance of the libguestfs daemon.  (Again, in theory) it
allowed you to attach to running guests.  This didn't work well in
practice.  If you want to do this, install qemu-guest-agent inside
your guest instead.

This also disables the --live options in guestfish and guestmount.
(The option now prints an error).

This was never supported in RHEL.

The daemon tests relied on this connection method to perform tests on
a bare daemon, so this removes those tests.  They were not especially
valuable.

See-also: https://bugzilla.redhat.com/798980
2022-03-09 09:27:19 +00:00
Richard W.M. Jones
2f4fb09de3 docs: Add preliminary release notes for 1.48 2022-03-08 12:26:09 +00:00
Richard W.M. Jones
25ddaefb03 docs: Recreate guestfs-release-notes(1) page
Commit e9eaf4d889 ("docs: Split release notes by release.")  split the
old guestfs-release-notes(1) page by release, but left now-broken
links to guestfs-release-notes(1) in various places in the
documentation.

The easiest way to fix this is to recreate this page by renaming
guestfs-release-notes-historical(1) as guestfs-release-notes(1) and
adding links to the other release notes pages.

Fixes: commit e9eaf4d889
2022-03-08 11:05:04 +00:00
Richard W.M. Jones
60e9232f4e Move minimum OCaml version to 4.04.
Synchronize with common module which also requires 4.04.

Small adjustment to use of List.sort_uniq because the signature
changed slightly.
2021-11-09 10:21:30 +00:00
Laszlo Ersek
f34bd6b12f build, docs: spell out minimum version (4.0.0) for the (optional) Yara lib
Commit e597fc5317 ("daemon/yara: fix undefined behavior due to Yara 4.0
API changes", 2021-10-12) prevents the daemon from using such a Yara
version that precedes 4.0.0.

If only yara < 4 is found, treat the library as absent, rather than
attempting and failing to compile the yara module of the daemon. Note the
version requirement in the documentation too.

Suggested-by: Eric Blake <eblake@redhat.com>
Suggested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20211013133611.21599-4-lersek@redhat.com>
Acked-by: Eric Blake <eblake@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
2021-10-14 19:45:07 +02:00
Richard W.M. Jones
ab2d624f46 docs: Finalize release notes for 1.46 release today 2021-09-23 09:44:08 +01:00
Richard W.M. Jones
46ab3dbbc0 docs: Prepare draft release notes for 1.46 2021-09-13 19:29:17 +01:00
Daniel P. Berrangé
5e98999b1f point users to Libera Chat rather than FreeNode
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-27 13:00:36 +01:00
Richard W.M. Jones
536b5ed993 Version 1.45.5. 2021-04-09 11:39:10 +01:00
Richard W.M. Jones
0f54df53d2 build: Remove gnulib.
As part of our efforts to clean up and simplify libguestfs, removing
gnulib deletes a large dependency that we mostly no longer use and
causes problems for new users trying to build the library from source.

A few modules from gnulib are still used (under a compatible license)
and these are copied into gnulib/lib/
2021-04-08 11:36:40 +01:00
Richard W.M. Jones
efb8a766ca daemon: Allow xorriso as an alternative to isoinfo.
Currently the guestfs_isoinfo and guestfs_isoinfo_device APIs run
isoinfo inside the appliance to extract the information.

isoinfo is part of genisoimage which is somewhat dead upstream.
xorriso is supposedly the new thing.  (For a summary of the situation
see: https://wiki.debian.org/genisoimage).

This commit rewrites the parsing from C to OCaml to make it easier to
deal with, and allows you to use either isoinfo or xorriso.

Mostly the same fields are available from either tool, but xorriso is
a bit more awkward to parse.
2021-03-30 15:21:54 +01:00
Richard W.M. Jones
2216ab2e32 tests: Prefer xorriso over genisoimage to generate test.iso
This Debian page explains the upstream situation:
https://wiki.debian.org/genisoimage

On Fedora, xorriso provides a compatibility program called "mkisofs".
However this is not present in Debian.  Hence the choice to look for
the program called "xorrisofs".
2021-03-30 13:57:30 +01:00
Richard W.M. Jones
c9ee831aff inspection: Fix inspection of recent RPM guests using non-BDB.
Recent RPM-based guests have switched from using Berkeley DB (BDB) to
sqlite.  In order to inspect these guests (and earlier ones) we need
to stop using the hokey parsing of the BDB and use librpm APIs
instead.

This commit adds a new internal API so we can call librpm from the
daemon, and changes the library part to use the new API for RPM-based
guests.

This change removes the requirement for BDB tools like db_dump.

See also:
http://lists.rpm.org/pipermail/rpm-ecosystem/2021-March/000751.html
http://lists.rpm.org/pipermail/rpm-ecosystem/2021-March/000754.html
https://blog.fpmurphy.com/2011/08/programmatically-retrieve-rpm-package-details.html

This breaks the virt-inspector test (now in the separate guestfs-tools
repository).  However this is not a bug in libguestfs, but a bug in
the phoney Fedora guest that we use for testing - we created a
BDB-style RPM database which was supposed to be just enough to make
the old code work.  The new code using real librpm needs
/usr/lib/rpm/rpmrc (not present in the phoney image) and also cannot
parse the phoney database, so we will need to separately rework that
test.

Thanks: Panu Matilainen
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1766487
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1409024
2021-03-26 16:26:00 +00:00
Richard W.M. Jones
09639387aa Version 1.45.2. 2021-03-22 16:41:30 +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
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
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
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
Thierry Vignaud
e62ccfca4a explain how to install on Mageia 2020-11-24 09:28:05 +00:00
Richard W.M. Jones
75abec1f70 include: Move lib/guestfs.h to include/guestfs.h
This brings libguestfs into line with other projects which have a
separate include/ directory for the public header.

It's also the case that <guestfs.h> has never particularly belonged in
the lib/ subdirectory.  Some tools add -Ilib/ but they only need
<guestfs.h> and not any other headers from that directory, and
separating out the public header allows us to clean those up.  This is
certainly the case for examples, and some language bindings and some
tests.

In future I'm hopeful we can use this as the basis to tease out other
dependencies, as a prelude to separating them out from the repo.
2020-09-21 18:38:28 +01:00
Yuri Chornoivan
fce82fe55a Fix minor typos 2020-08-24 16:24:38 +01:00
Pino Toscano
9a986ed60a Remove references to Zanata
We migrated to Weblate, and Zanata is being decommissioned.
2020-08-13 11:27:44 +02:00
Richard W.M. Jones
c5eec6c17b docs: Increase minimum version of Python to 3.6.
3.5 is needed to support type hints.

Debian oldstable has 3.5 (oldoldstable needed 3.4).
2020-07-06 20:37:51 +01:00