11982 Commits

Author SHA1 Message Date
Richard W.M. Jones
ff3dd6f91f Version 1.53.2. v1.53.2 2024-05-10 16:47:17 +01:00
Richard W.M. Jones
c6c266a85d daemon: Reimplement partition GPT functions using sfdisk
sfdisk can now do everything with GPT that sgdisk was needed for
before.  In particular we are able to reimplement the following
functions using sfdisk:

- part_set_disk_guid   (replace with sfdisk --disk-id)
- part_get_disk_guid
- part_set_disk_guid_random
- part_set_gpt_attributes           (sfdisk --part-attrs)
- part_get_gpt_attributes
- part_set_gpt_guid                 (sfdisk --part-uuid)
- part_get_gpt_guid
- part_set_gpt_type                 (sfdisk --part-type)
- part_get_gpt_type

This allows us to drop the requirement for gdisk in many cases.

There is only one API remaining which requires gdisk, part_expand_gpt,
which we do not use in our tools.  In a prior commit I already moved
this solitary function to a new source file (daemon/gdisk.c).

Fixes: https://issues.redhat.com/browse/RHEL-35998
2024-05-10 16:25:13 +01:00
Richard W.M. Jones
a25f419802 daemon: Add an OCaml binding for get_random_uuid function 2024-05-10 16:07:20 +01:00
Richard W.M. Jones
53eb96099a generator: Allow String(GUID) parameter in daemon OCaml bindings 2024-05-10 15:37:08 +01:00
Richard W.M. Jones
d5c6e15180 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.
2024-05-10 15:36:03 +01:00
Richard W.M. Jones
2811e42b43 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.
2024-05-10 15:29:07 +01:00
Richard W.M. Jones
857615d6d2 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.
2024-05-10 15:29:07 +01:00
rwmjones
8c438e7442 Merge pull request #142 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2024-05-09 10:49:23 +01:00
Weblate
2234390442 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/
2024-05-09 11:36:38 +02:00
zhanchun li
2a611c3a33 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 2.9% (29 of 970 strings)

Translation: libguestfs/libguestfs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-master/zh_CN/
2024-05-09 11:36:37 +02:00
Richard W.M. Jones
c2f1825574 Version 1.53.1. v1.53.1 2024-04-25 13:43:28 +01:00
Richard W.M. Jones
e0ffe31e96 gobject: tests: Don't erase error messages 2024-04-25 13:17:02 +01:00
Richard W.M. Jones
665e0dde81 test-data/binaries: Regenerate LoongArch files with stripping
These were regenerated by Dan Berrange from a known good Debian
container image.  In addition they are stripped.  The commands were:

 $ podman run -it registry.gitlab.com/qemu-project/qemu/qemu/debian-loongarch-cross
 # echo 'int main(){}' > bin.c
 # loongarch64-unknown-linux-gnu-gcc bin.c -o bin-loongarch64
 # loongarch64-unknown-linux-gnu-strip --strip-all bin-loongarch64
 # echo '' > lib.c
 # loongarch64-unknown-linux-gnu-gcc -shared lib.c -o lib-loongarch64.so
 # loongarch64-unknown-linux-gnu-strip --strip-all lib-loongarch64.so

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-04-25 13:00:55 +01:00
Richard W.M. Jones
574a87f889 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.
2024-04-25 13:00:22 +01:00
Richard W.M. Jones
87b4d19f85 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.
2024-04-24 22:17:33 +01:00
Richard W.M. Jones
7968de46f1 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
2024-04-24 12:23:34 +01:00
Richard W.M. Jones
6ba64125d9 website: Update link for forthcoming 1.53 development branch 2024-04-13 10:41:55 +01:00
Richard W.M. Jones
d755070346 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
2024-04-04 09:38:28 +01:00
Richard W.M. Jones
d829778529 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
2024-04-04 09:28:43 +01:00
Richard W.M. Jones
1d760b0d8f python: Fix exception name in example
Fixes: https://github.com/libguestfs/libguestfs/issues/138
2024-03-12 14:08:24 +00:00
Richard W.M. Jones
37d2379be2 daemon: Fix file architecture translation for LoongArch
Fixes: commit 729d6d55ea
2024-03-07 16:50:29 +00:00
Richard W.M. Jones
7211aac047 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
2024-03-07 16:50:29 +00:00
Richard W.M. Jones
c8cefa6f0f daemon: parted: Print field we are extracting in error message 2024-03-07 14:17:45 +00:00
liuxiang
729d6d55ea Add support for LoongArch.
Signed-off-by: liuxiang <liuxiang@loongson.cn>
2024-02-21 10:50:07 +00:00
Bella Zhang
72f99817c7 Add detection support for Circle Linux 2024-02-06 12:22:00 +00:00
Alexey Shabalin
f878f72430 daemon: Add gost checksum command support
gostsum - generates or checks GOST R34.11-94 message digests
gost12sum - generates or checks GOST R34.11-2012 message digests

A reference implementation https://github.com/gost-engine/engine

Fixes: https://github.com/libguestfs/libguestfs/pull/132
Signed-off-by: Alexey Shabalin <shaba@altlinux.org>

[RWMJ: Added documentation, and added gostsum package to
the appliance]
2024-01-25 13:28:22 +00: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