Commit Graph

284 Commits

Author SHA1 Message Date
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
Richard W.M. Jones
403d17a876 python: Drop support for Python 2.
Python 2 reached end of life on 2020-01-01:
https://python3statement.org/
https://pythonclock.org/

The minimum version required is now Python 3.4 (since that is the
version in Debian oldoldstable), but 3.6 is the minimum version that
I actually test.
2020-07-06 12:40:33 +01:00
Sergei Golovan
987734fcca erlang: Port to libei for Erlang 23
Replace the use of liberl_interface, which is removed in Erlang 23,
by libei. The implementation uses the ei_decode_iodata() function
which has been introduces only for Erlang 23, so it doesnt work with
earlier Erlang versions.
2020-06-04 13:49:35 +01:00
Geoff Toole
ef2761eaa0 build: Fix linking of OCaml components when srcdir != builddir
ocaml-link.sh is a generated file, so run it from the build directory.
Remove it from EXTRA_DIST and also adjust docs/guestfs-hacking.pod
accordingly.
2020-04-20 09:31:35 +01:00
Richard W.M. Jones
bfe98ffe13 Update release notes for 1.42.
Also update generator/authors.ml so that ‘make maintainer-check-authors’
passes.
2020-03-09 13:35:40 +00:00
Richard W.M. Jones
0e17236d7d Update copyright dates to 2020. 2020-03-06 19:32:32 +00:00
Richard W.M. Jones
18c3f40c60 appliance: Pass root=UUID=<uuid> instead of appliance device name (RHBZ#1804207).
Appliance device names are not reliable since the kernel no longer
enumerates virtio-scsi devices serially.  Instead get the UUID of the
appliance and pass this as the parameter.

Note this requires supermin >= 5.1.18 (from around July 2017).
2020-03-06 19:03:03 +00:00
Daniel P. Berrangé
7db041a660 docs: fix instructions for building from git
On current Fedora releases the ocaml modules will fail to
link unless CFLAGS contains -fPIC.

The autogen.sh script only updates the 'gnulib' submodule,
and so the build will fail due to the missing 'common'
submodule. This needs to be manually initialized at checkout.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-02-24 13:25:59 +00:00
Richard W.M. Jones
bd4d9264e5 docs: Update release notes in preparation for 1.42 release. 2020-01-22 13:03:03 +00:00
Richard W.M. Jones
54ccd4fee9 docs: Document that Python 2.7 or above is now required.
Updates commit 444750bfd1.
2020-01-22 10:45:37 +00:00
Pino Toscano
2c4aec6dcf build: update miscellaneous files
C_SOURCE_FILES
POTFILES

Followup of commit cb0edd4354.
2020-01-09 15:47:56 +01:00
Pino Toscano
98700b6d8c docs: exclude dummy.c sources
They are empty sources used to build OCaml-only targets using automake,
so there is no documentation to extract.
2019-12-18 11:01:58 +01:00
Pino Toscano
957549cd2d Remove mlaugeas and mllibvirt leftovers
Update according to the removal of the embedded copies of augeas-ocaml,
and libvirt-ocaml from the common submodule.
2019-12-16 18:55:01 +01:00
Pino Toscano
fb7e21be96 build: switch embedded copy of ocaml-augeas
Use the newer copy shipped locally as bundled, instead of the one in
the common submodule, as the latter copy will go away soon.
2019-12-16 18:33:49 +01:00
Pino Toscano
e17f9f43fd docs: fix out-of-source documentation build
Invoke make-internal-documentation.pl by its path in the source
directory.

Also, depend on it to regenerate the documentation in case
make-internal-documentation.pl changes.
2019-12-12 18:01:32 +01:00
Richard W.M. Jones
58ab39ba34 Remove boot and qemu analysis tools into a separate project.
These have now moved here:
https://github.com/libguestfs/libguestfs-analysis-tools

This commit removes them and updates guestfs-performance(1) to point
to the new location.
2019-11-28 15:37:31 +00:00
Richard W.M. Jones
85c99edec1 v2v: Remove virt-v2v.
It has moved to a new repository:
https://github.com/libguestfs/virt-v2v
2019-11-13 12:49:55 +00:00
Richard W.M. Jones
e9eaf4d889 docs: Split release notes by release.
See analogous change in nbdkit for the rationale:

98395d6f7a
2019-11-13 12:49:54 +00:00
Richard W.M. Jones
8097dc16e7 Version 1.41.6. 2019-10-15 13:34:40 +01:00
Richard W.M. Jones
20c2dfbe00 generator, customize, v2v: Only place generated files in libguestfs or common.
After the proposed split of the libguestfs repo, we will end up with
the following layout:

  libguestfs.git
      common -> git submodule libguestfs-common.git
      generator

  virt-v2v.git
      common -> git submodule libguestfs-common.git

  guestfs-tools.git
      common -> git submodule libguestfs-common.git

The generator will only be able to write to libguestfs directories and
the common directory/submodule.  This is mostly the case already with
only 6 exceptions:

  customize/customize-options.pod
  customize/customize-synopsis.pod
  customize/customize_cmdline.ml
  customize/customize_cmdline.mli
  v2v/uefi.ml
  v2v/uefi.mli

This commit moves these files around so they appear under common/ml*

It is somewhat unsatisfactory because it involves copying files
around, but there are some mitigating factors:

(1) Any changes now give us more freedom to develop faster and thus
clean things up in future.

(2) The v2v/uefi files ought to go away in future anyway.

This is simple code motion and should have no effect on the built
programs or tests.
2019-10-14 18:37:29 +01:00
Richard W.M. Jones
ddfec6a97d customize: Move Firstboot and SELinux_relabel modules to common/mlcustomize.
These two modules are a dependency of virt-v2v.  Since we intend to
split virt-v2v from the other OCaml virt-* programs, we cannot have a
dependency between virt-v2v and virt-customize.  Instead we must move
the modules to a common directory (common/mlcustomize) and have both
tools depending on the modules from there.

This is simple refactoring and should not affect how the programs work
or are tested.
2019-10-14 12:36:47 +01:00
Richard W.M. Jones
0977f4b909 v2v: xen: Replace qemu block ssh driver with nbdkit-ssh-plugin.
Initially this is a like-for-like replacement, but in future commits
this will allow us to implement:

 - password authentication (instead of SSH agent)

 - bandwidth throttling

 - readahead

Note this requires nbdkit >= 1.12.
2019-10-08 13:15:10 +01:00
Pino Toscano
dea9636c59 Remove remaining virt-p2v bits
Remove (almost) all the remaining bits related to virt-p2v.
2019-09-10 17:52:16 +02:00
Richard W.M. Jones
cce016dfe3 docs: Remove p2v/ directory from generated docs files.
make[2]: *** No rule to make target '../p2v/about-authors.c', needed by 'internal-documentation.pod'.  Stop.

Since we're going to remove the whole p2v subdirectory shortly anyway,
it was simplest to ignore the whole directory.
2019-09-02 12:34:07 +01:00
Richard W.M. Jones
0d0c3eb1dd docs: Remove generated file common/mllibvirt/libvirt_c.c.
Avoids this error when building from git:

make[2]: *** No rule to make target '../common/mllibvirt/libvirt_c.c', needed by 'internal-documentation.pod'.  Stop.

This file doesn't have any generated docs or gettext annotations in it
so adding it to these files is useless anyway.
2019-09-02 12:22:25 +01:00
Richard W.M. Jones
2a5ea2892e Version 1.41.1. 2019-09-02 10:12:38 +01:00
Richard W.M. Jones
c873e04b26 Update docs/C_SOURCE_FILES. 2019-08-20 16:11:49 +01:00
Richard W.M. Jones
ab09bc25c7 build: Update miscellaneous files.
BUGS
docs/C_SOURCE_FILES
po/POTFILES
po/POTFILES-ml

These files are normally updated by ‘make dist’ but as we've not had a
release in a while they had not been updated for some time.
2019-07-29 12:57:24 +01:00
Pino Toscano
fe96e24001 p2v: generate C about data authors from AUTHORS file
Create a small Perl script to generate about-authors.c from the p2v
AUTHORS file at build time, instead of generating in the generator
at dist time.
2019-07-03 12:41:02 +02:00
Pino Toscano
796ce74f31 p2v: move kernel config to perl script
Instead of generating the p2v kernel config using the OCaml generator,
create a Perl script to do this job, mostly at build time.  This is done
to rely less on the generator for p2v, and because the generation of
these sources is quick enough that it can be done at build time (instead
of shipping the generated sources in dist tarballs).

The generate-p2v-config.pl mimics what generator/p2v_config.ml --
namings, and general structure are kept close to that for comparison.

The two C sources are created at build time by the script; however, the
p2v-config.h header is generated at configure time: this is done because
p2v-config.h is included by p2v.h (another header), which in turn is
included by all the p2v C sources -- automake is not able to properly
resolve the dependency, and thus it would not be generated properly.
2019-07-01 13:58:13 +02:00
Pino Toscano
31d72dc463 build: raise augeas requirement to 1.2.0
It is widely available also on older distributions.
2019-05-30 09:12:32 +02:00