11973 Commits

Author SHA1 Message Date
Richard W.M. Jones
06205bdf30 Version 1.52.1. v1.52.1 2024-05-13 14:54:14 +01:00
Richard W.M. Jones
c76fc5447e gobject: Add libguestfs-gobject-1.0.deps to main EXTRA_DIST line
Move this outside the 'if HAVE_INTROSPECTION' conditional so that we
get this object in the tarball even if using ./configure --disable-gobject

(cherry picked from commit 27deba4074)
2024-05-13 14:53:53 +01:00
Richard W.M. Jones
f970f093fb tests: btrfs: Remove another test that used qgroup 0/*
This was failing with recent Linux:

  libguestfs: error: btrfs_subvolume_snapshot: /dir/test3: /dir/test6: ERROR: cannot snapshot '/sysroot/dir/test3': Invalid argument

I tried to change the test to use 1/1000 instead, but that fails with
a different error which I don't understand at all.

As we're not meant to be testing btrfs here, only that libguestfs can
translate between the guestfs API and btrfs commands and we know it
can do that, I simply deleted the sub-test entirely.

(cherry picked from commit c7fe9fd917)
2024-05-13 14:43:54 +01:00
Richard W.M. Jones
ae2344f8f2 daemon: Add an OCaml binding for get_random_uuid function
(cherry picked from commit a25f419802)
2024-05-13 14:17:49 +01:00
Richard W.M. Jones
f29092e8f4 generator: Allow String(GUID) parameter in daemon OCaml bindings
(cherry picked from commit 53eb96099a)
2024-05-13 14:17:46 +01:00
Richard W.M. Jones
d400b0637e daemon: Move gdisk function to a new file
After subsequent commits, this will be the only remaining use of
gdisk, so put it in its own file now.

(cherry picked from commit d5c6e15180)
2024-05-13 14:17:41 +01:00
Richard W.M. Jones
cbfe36b7c7 daemon: part_get_gpt_type: Remove unhelpful MBR fallback behaviour
This was an accident of the parted implementation, and wasn't really
used anywhere.  Remove it.

(cherry picked from commit 2811e42b43)
2024-05-13 14:17:35 +01:00
Richard W.M. Jones
c749314646 daemon/parted: Assume sfdisk --part-type exists
This "new" parameter was added in 2014:

  commit 8eab3194ce1737a167812d5e84d83b0dfc253fac
  Author: Karel Zak <kzak@redhat.com>
  Date:   Mon Sep 15 12:37:52 2014 +0200

    sfdisk: add --parttype

    The patch also makes --{id,change-id,print-id} deprecated in favour
    of --parttype. The original --id is too generic option name and the
    --print-id and --change-id are unnecessary and inconsistent with
    another sfdisk options (e.g. we don't have --change-bootable)

Also remove an extraneous / incorrect comment about parted.  As
history has played out, sfdisk proves to be the better tool and parted
is a PITA.

(cherry picked from commit 857615d6d2)
2024-05-13 14:17:29 +01:00
Richard W.M. Jones
073fd0aa86 gobject: tests: Don't erase error messages
(cherry picked from commit e0ffe31e96)
2024-05-13 14:17:18 +01:00
Richard W.M. Jones
8cd31e58fd test-data/binaries: Remove +x attribute
These binaries are not meant to be run, they are purely data files
used for testing.  Remove the +x attribute to prevent accidentally
running them.

However to avoid breaking the phony guests, we need to chmod +x the
files when we upload them into those guests.

(cherry picked from commit 574a87f889)
2024-05-13 14:17:01 +01:00
Richard W.M. Jones
17061cf496 po-docs: Make sure guestmount.1 depends on includes
guestmount.1 depends on translated files blocksize-option.pod,
key-option.pod & keys-from-stdin-option.pod (via __INCLUDE__
directives).  If these are not yet translated by the time we try to
generate guestmount.1 then it will fail with:

podwrapper.pl: key-option.pod: cannot find input file on path at /builddir/build/BUILD/libguestfs-1.50.1/podwrapper.pl line 672.

This happens especially in parallel builds.  Fix this by writing the
guestmount.1 rule explicitly, with the correct dependencies.

(cherry picked from commit 87b4d19f85)
2024-05-13 14:16:54 +01:00
Richard W.M. Jones
42e15f8cf1 Update common submodule
In particular pick this:

  commit 93a7f3af5c23ece6a8e092827ed5928a8973fd3c
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Wed Apr 24 12:08:01 2024 +0100

    options: Allow nbd+unix:// URIs

(cherry picked from commit 7968de46f1)

RWMJ: Although this is strictly a new feature, we don't have much
choice except to pick it for the stable 1.52 branch since it's part of
the submodule.  However it's probably a good idea to have this as it
aligns with our goal to have better support NBD URIs everywhere.
2024-05-13 14:15:16 +01:00
Richard W.M. Jones
bebec890e2 po-docs: Run po4a-translate and sed commands separately
I noticed that 1-byte translated POD files were being generated in the
output directory (po-docs/ja/).  This seems to have happened because
po4a-translate was generating an error, but because we were
immediately pipeing the output into sed the error was suppressed.

By running them as two separate commands this cannot happen.

Fixes: commit bd896d68c0
(cherry picked from commit d755070346)
2024-05-13 14:14:43 +01:00
Richard W.M. Jones
4a04ab9255 po-docs: Rename guestfs-release-notes-historical to guestfs-release-notes
This was missed from earlier commit 25ddaefb03 ("docs: Recreate
guestfs-release-notes(1) page").

Fixes: commit 25ddaefb03
(cherry picked from commit d829778529)
2024-05-13 14:14:38 +01:00
Richard W.M. Jones
b56b5ca46c python: Fix exception name in example
Fixes: https://github.com/libguestfs/libguestfs/issues/138
(cherry picked from commit 1d760b0d8f)
2024-05-13 14:14:34 +01:00
Richard W.M. Jones
6cfcbfd9a2 tests: btrfs: Don't try to create qgroup 0/_
This used to work in kernel <= 6.7 but has been forbidden in later
kernels:
0c309d66da

Reported-by: David Runge
Thanks: Jan Alexander Steffens
Fixes: https://github.com/libguestfs/libguestfs/issues/136
(cherry picked from commit 7211aac047)
2024-05-13 14:14:27 +01:00
Richard W.M. Jones
4fdc89fb51 daemon: parted: Print field we are extracting in error message
(cherry picked from commit c8cefa6f0f)
2024-05-13 14:14:18 +01:00
Richard W.M. Jones
e9a728bb22 generator/customize.ml: Split --chown parameter on ':' character
The previous code split it on ',' which was completely wrong.
(It reveals the lack of testing however).

Fixes: commit c08032ebe2
Reported-by: Yongkui Guo
2024-01-19 13:24:37 +00:00
Richard W.M. Jones
836a977c16 Version 1.52.0. v1.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
4e4801a2c3 bugs-in-changelog.sh: Use grep -E instead of egrep
New version of coreutils egrep whinges.
2024-01-04 13:43:15 +00:00
Richard W.M. Jones
465db54be3 Version 1.51.10. v1.51.10 2023-12-19 15:30:45 +00:00
Juergen Hoetzel
102e503648 daemon/btrfs: Use new syntax for balance command
Support for the obsolete short syntax 'btrfs balance /path' was
removed in btrfs-progs 6.6.
2023-12-14 16:53:50 +00:00
Richard W.M. Jones
40f43cc8ea tests: Test guestfish --key all:... selector 2023-12-14 09:15:08 +00:00
Richard W.M. Jones
7fd41b5a02 Update common submodule
The list of patches is below.  The one which matters for guestfish is
addition of --key all:... selector.

Andrey Drobyshev (1):
      mldrivers: look for bootloader config in /boot/grub/grub.cfg in case of UEFI

Richard W.M. Jones (5):
      mlxml: Include <libxml/parser.h> for xmlReadMemory
      options/keys.c: Rewrite confusing match statement
      options: Rewrite --key documentation fragment
      options: Allow --key all:SELECTOR to be used to match any device
      mltools/libosinfo-c.c: Fix off-by-one error

Fixes: https://issues.redhat.com/browse/RHEL-19367
2023-12-14 09:04:56 +00:00
Richard W.M. Jones
e93fd7e8ac ocaml: Nullify custom block before releasing runtime lock
Avoids a potential, though if possible then very rare, double free
path.

Suggested-by: Guillaume Munch-Maccagnoni
See: https://github.com/ocaml/ocaml/issues/12820
2023-12-14 08:35:46 +00:00
Richard W.M. Jones
61418535ad ocaml: Use Gc.finalise instead of a C finalizer
Since OCaml 5.1.1, changes to custom blocks caused C finalizers that
call caml_enter_blocking_section to stop working (if they ever did
before).  They are relatively inflexible compared to registering an
OCaml finalizer (Gc.finalise) to call Guestfs.close, so use that
instead.

Suggested-by: Guillaume Munch-Maccagnoni
See: https://github.com/ocaml/ocaml/issues/12820
See: db48794fa8
2023-12-13 22:55:03 +00:00
Richard W.M. Jones
e5788357cf Version 1.51.9. v1.51.9 2023-12-09 11:47:32 +00:00
Richard W.M. Jones
02c39dc5e8 lib: Include <libxml/parser.h> for xmlReadMemory
Since libxml2 2.12.1 including this header is required to have this
function declared.
2023-11-27 14:12:37 +00:00
rwmjones
0ea7684d28 Merge pull request #130 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2023-11-27 10:13:26 +00:00
Temuri Doghonadze
5ff1aca486 Translated using Weblate (Georgian)
Currently translated at 16.3% (159 of 970 strings)

Translation: libguestfs/libguestfs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-master/ka/
2023-11-26 22:01:17 +01:00
rwmjones
5efea5ee8d Merge pull request #129 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2023-11-24 19:15:39 +00:00
Weblate
62a4df0989 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: libguestfs/libguestfs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-master/
2023-11-24 20:05:56 +01:00
Richard W.M. Jones
1dd3f3540e Version 1.51.8. v1.51.8 2023-11-16 13:27:49 +00:00
Richard W.M. Jones
b2f3994de2 New mailing list archives 2023-11-16 10:52:11 +00:00
Richard W.M. Jones
0b8b1e4b2d New mailing list email address 2023-11-16 10:38:59 +00:00
Richard W.M. Jones
f53859723e appliance: Wait for /etc/resolv.conf to be populated
Work around this issue with dhcpcd:
https://github.com/NetworkConfiguration/dhcpcd/issues/258

Fixes: commit 0e37e5feea
2023-11-16 10:17:35 +00:00
Richard W.M. Jones
0e37e5feea appliance: Allow dhcpcd to be used on Red Hat platforms
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2247057
Fixes: https://github.com/libguestfs/libguestfs/issues/121
2023-10-30 14:31:26 +00:00
Richard W.M. Jones
b5f7b0ec18 generator: Add new virt-customize --tar-in operation
Using 'virt-customize --tar-in some.tar:/dir -a disk.img' will unpack
'some.tar' into '/dir' in the guest.  Note that this will not work for
compressed tar files as written since the underlying guestfs_tar_in
function requires the compression type to be set explicitly and
defaults to no compression (it does not auto-detect or default to
compression).
2023-10-26 21:16:41 +01:00
Richard W.M. Jones
297db5cccc generator: Sort virt-customize options into alphabetical order 2023-10-26 21:07:57 +01:00
Richard W.M. Jones
f8cbd71400 daemon: Find -lcamlstr{nat,byt} and -lunix{nat,byt}, and require -lzstd
OCaml 5.1 changes the names of these libraries for some reason.

Also in OCaml 5.1, if using those libraries you must link with -lzstd.
Since zstd was already described as "required" (although we only used
it in the appliance), there is no official change to the requirements,
but I have added a configure time check for the library.

Thanks: Jerry James <loganjerry@gmail.com>
2023-10-06 11:23:52 +01:00
Richard W.M. Jones
62b1deb125 Version 1.51.7. v1.51.7 2023-09-21 15:35:01 +01:00
Richard W.M. Jones
ecf361d723 ruby: Get rid of old Test::Unit compatibility
See this commit in hivex:
6dbbc474d3
2023-09-21 15:21:18 +01:00
Richard W.M. Jones
d25a48e2dd ruby: Replace MiniTest with Minitest
See this commit in hivex:
fbcff7fbd8
2023-09-21 15:16:51 +01:00
Richard W.M. Jones
c95d8c4cf6 daemon: Omit 'file -S' option on older distros that lack support
OpenSUSE LEAP 15 lacks support for this option, so test for it before
using it.

See also:
https://listman.redhat.com/archives/libguestfs/2023-September/032613.html

Reported-by: Olaf Hering
Fixes: commit 23986d3c4f
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2023-09-21 15:09:14 +01:00
cunshunxia
188c5f7d93 support OpencloudOS
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Fixes: https://github.com/libguestfs/libguestfs/pull/125
2023-09-19 11:02:23 +01:00
rwmjones
f76c871adb Merge pull request #123 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2023-08-07 13:05:44 +01:00