Commit Graph

11852 Commits

Author SHA1 Message Date
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
rwmjones
e4f0733bd7 Merge pull request #108 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2023-02-05 15:31:05 +00:00
Weblate
a1822fa1c6 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-02-05 16:20:48 +01:00
Emilio Herrera
4bdefd23d3 Translated using Weblate (Spanish)
Currently translated at 2.0% (335 of 16046 strings)

Translation: libguestfs/libguestfs-docs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-docs-master/es/
2023-02-05 16:20:48 +01: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
4f58017a5e lib/guestfs-internal-all.h: Use __restrict__ keyword for very old GCC
RHEL 7 GCC 4.8.5 does not allow the restrict keyword.  Use the
permitted alternative.
2023-01-31 15:54:46 +00:00
Richard W.M. Jones
8f6b82bc45 lib/guestfs-internal-all.h: Fix whitespace 2023-01-31 15:54:46 +00:00
Richard W.M. Jones
973e26dbd8 Update common module
Update common module to 3253cd99d135d5eb788a0477459b43a269e8cca6

No significant changes that affect virt-v2v now, but it adds some
extra functions to Std_utils that might be used one day.

Cherry picked from virt-v2v commit c7c9dac4f84580190b0e4f7c2e68970192f4bad3
2023-01-28 15:06:33 +00:00
Richard W.M. Jones
09c2a5404a Version 1.49.9. v1.49.9 2023-01-19 23:29:00 +00:00
Richard W.M. Jones
ed8a960bb8 build: Ignore new common/mldrivers in maintainer-check-extra-dist
This directory is not distributed in the tarball.

Fixes: commit 1a6485001c
2023-01-19 23:28:14 +00:00
Richard W.M. Jones
1a6485001c Update common submodule 2023-01-19 23:00:36 +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
e0d23c861c generator: customize: Add --inject-qemu-ga and --inject-virtio-win
Add the new flags / operations for virt-customize.
2023-01-17 11:59:00 +00:00
rwmjones
76599aae80 Merge pull request #107 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2023-01-13 20:23:51 +00:00
Temuri Doghonadze
f325b26e4b Translated using Weblate (Georgian)
Currently translated at 14.4% (140 of 967 strings)

Translation: libguestfs/libguestfs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-master/ka/
2023-01-13 21:20:16 +01:00
rwmjones
c75a323bf0 Merge pull request #106 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2022-12-23 19:04:18 +00:00
Jan Kuparinen
7dea806091 Translated using Weblate (Finnish)
Currently translated at 0.8% (138 of 16048 strings)

Translation: libguestfs/libguestfs-docs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-docs-master/fi/
2022-12-23 19:20:01 +01:00
Temuri Doghonadze
c2d20611f2 Translated using Weblate (Georgian)
Currently translated at 14.3% (139 of 967 strings)

Translation: libguestfs/libguestfs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-master/ka/
2022-12-23 19:20:01 +01:00
rwmjones
b258185eb4 Merge pull request #105 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2022-12-13 21:14:20 +00:00
Yuri Chornoivan
ad02353bf9 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (967 of 967 strings)

Translation: libguestfs/libguestfs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-master/uk/
2022-12-12 20:20:02 +01:00
rwmjones
23ae55a470 Merge pull request #104 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2022-12-11 19:26:10 +00:00
Weblate
56b1345399 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/
2022-12-11 17:21:32 +01:00
Emilio Herrera
747ae003d5 Translated using Weblate (Spanish)
Currently translated at 2.0% (330 of 16046 strings)

Translation: libguestfs/libguestfs-docs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-docs-master/es/
2022-12-11 17:21:31 +01:00
Richard W.M. Jones
73fb8719d2 Version 1.49.8. v1.49.8 2022-12-10 12:17:12 +00:00
Andrey Drobyshev
188aa9947f m4/guestfs-appliance.m4: add VIRTUOZZO to RedHat-based distros
This allows to detect VzLinux guest.

Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
2022-12-09 19:01:00 +00:00
Richard W.M. Jones
a84ff62478 tests/nbd: Remove bogus sleep
This is no longer needed since qemu-nbd now supports pidfiles

Fixes: commit 1eb055bd46
2022-12-02 12:02:49 +00:00
Richard W.M. Jones
dc9bdda084 tests/nbd: Unlink pidfile before running qemu-nbd
It might be left over from a previous failed run.  Best to unlink the
old file before starting qemu-nbd, so there's no possibility of
getting confused later when we wait for the file to appear.
2022-12-02 11:57:16 +00:00
Richard W.M. Jones
98ab261a05 tests/nbd: Move temporary files into tests/nbd/ subdirectory
This test fails for reasons I have not fully understood yet.  However
one thing I noticed is that the Unix domain socket and PID file used
the tests are placed in the tests/ directory, not the tests/nbd/
subdirectory, so let's fix that:

Starting qemu-nbd fedora-nbd.img -t --pid-file /home/rjones/d/libguestfs-rhel-9.2/tests/nbd.pid --format raw -p 63668 ...
Starting qemu-nbd fedora-nbd.img -t --pid-file /home/rjones/d/libguestfs-rhel-9.2/tests/nbd.pid --format raw -p 60684 ...
Starting qemu-nbd fedora-nbd.img -t --pid-file /home/rjones/d/libguestfs-rhel-9.2/tests/nbd.pid --format raw -k /home/rjones/d/libguestfs-rhel-9.2/tests/unix.sock ...

Fixes: commit 6d32773e81
2022-12-02 11:38:17 +00:00
Richard W.M. Jones
824c745748 lib: Return correct osinfo field for Windows 11
For Windows Client, we can only distinguish between Windows 10 and
Windows 11 using the build ID.  The product name in both cases is
"Windows 10 <something>", apparently intentionally.

References:
https://learn.microsoft.com/en-us/answers/questions/586619/windows-11-build-ver-is-still-10022000194.html
a263fe0b26/winsup/cygwin/wincap.cc (L429)
https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions

After this fix, the output of virt-inspector changes to this, which is
a bit odd, but correct:

    <name>windows</name>
    <arch>x86_64</arch>
    <distro>windows</distro>
    <product_name>Windows 10 Pro</product_name>
    <product_variant>Client</product_variant>
    <major_version>10</major_version>
    <minor_version>0</minor_version>
    <windows_systemroot>/Windows</windows_systemroot>
    <windows_current_control_set>ControlSet001</windows_current_control_set>
    <osinfo>win11</osinfo>

Thanks: Yaakov Selkowitz
Reported-by: Yongkui Guo
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2012658
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2022-12-02 10:16:57 +00:00
Richard W.M. Jones
f3dd67affe New API: inspect_get_build_id
Add an API to return the build ID of the guest.  This to allow a
future change to be able to distinguish between Windows 10 and Windows 11
which can only be done using the build ID.

For Windows we can read the CurrentBuildNumber key from the registry.
For Linux there happens to be a BUILD_ID field in /etc/os-release.
I've never seen a Linux distro that actually uses this.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2022-12-02 10:16:57 +00:00
rwmjones
6efb44c4ff Merge pull request #103 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2022-12-01 20:47:31 +00:00
Yuri Chornoivan
32467fc6d4 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (966 of 966 strings)

Translation: libguestfs/libguestfs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-master/uk/
2022-12-01 20:19:49 +01:00
rwmjones
6397dbca64 Merge pull request #102 from weblate/weblate-libguestfs-libguestfs-master
Translations update from Fedora Weblate
2022-11-30 19:25:54 +00:00
Weblate
5c864d1e80 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/
2022-11-30 19:20:36 +01:00
Temuri Doghonadze
772d7cb61f Translated using Weblate (Georgian)
Currently translated at 14.3% (138 of 965 strings)

Translation: libguestfs/libguestfs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/libguestfs-master/ka/
2022-11-30 19:20:35 +01:00
Richard W.M. Jones
55fdf761b1 Version 1.49.7. v1.49.7 2022-11-28 11:08:52 +00:00
Richard W.M. Jones
fa305b709a python: Fix code style ("missing whitespace after keyword") 2022-11-28 10:32:21 +00:00
Richard W.M. Jones
23986d3c4f file: Use -S option with -z
The file(1) manual suggests using -S (disable seccomp) with -z since
the set of system calls provided by the seccomp policy does not allow
the subprocess to run.  This is obvious when you use file -z on a
compressed file on a Linux distro that enables file's seccomp policy
(Arch does this, Fedora does not):

  $ file -zbsL lib-i586.so.zst
  Bad system call

I also fixed some incorrect text in the manual.

Thanks: Toolybird for pointing to this fix
Reported-by: David Runge
Fixes: https://github.com/libguestfs/libguestfs/issues/100
2022-11-28 10:21:00 +00:00
Richard W.M. Jones
e657e45b43 tests: Increase size of disk in xfs_growfs_0 test
I cannot reproduce the originally reported error:

libguestfs: error: mkfs: xfs: /dev/VG/LV: Filesystem must be larger than 300MB.

Thanks: David Runge
Related: https://github.com/libguestfs/libguestfs/issues/100
2022-11-22 16:32:08 +00:00
Richard W.M. Jones
6bfb73cdb0 gnulib/lib/c-ctype.h: Remove executable bit
$ ls -l `find -name c-ctype.h`
-rwxr-xr-x. 1 rjones rjones 9647 Dec  3  2021 ./gnulib/lib/c-ctype.h
$ chmod -x `find -name c-ctype.h`
$ ls -l `find -name c-ctype.h`
-rw-r--r--. 1 rjones rjones 9647 Dec  3  2021 ./gnulib/lib/c-ctype.h

RPM builds actually gave a warning about this which is how I noticed
the problem:

*** WARNING: ./usr/src/debug/guestfs-tools-1.48.2-2.fc36.x86_64/gnulib/lib/c-ctype.h is executable but has no shebang, removing executable bit

(cherry picked from
guestfs-tools commit 566267a3d447eb97b4a0637adbe3e45c09ba090f)
2022-11-21 21:13:37 +00:00
Richard W.M. Jones
1bcf0bc5dd Version 1.49.6. v1.49.6 2022-11-21 16:46:05 +00:00
Richard W.M. Jones
d5472a2219 appliance: Add back libldm (ldmtool) and libxml2 to package list
Commit 133a491677 ("Use guestfsd binary to auto-generate library
dependencies for appliance", October 2020) removed explicit
dependencies for various system packages that the daemon links
directly to, ie. all of these libraries:

$ objdump -p daemon/guestfsd | grep NEEDED | sort
  NEEDED               libacl.so.1
  NEEDED               libaugeas.so.0
  NEEDED               libcap.so.2
  NEEDED               libc.so.6
  NEEDED               libgcc_s.so.1
  NEEDED               libhivex.so.0
  NEEDED               libjansson.so.4
  NEEDED               libm.so.6
  NEEDED               libpcre2-8.so.0
  NEEDED               librpm.so.9
  NEEDED               libselinux.so.1
  NEEDED               libsystemd.so.0
  NEEDED               libtirpc.so.3
(plus libyara which I don't have installed.)

This avoids having to update these dependencies if they change, eg.
when we switched from PCRE to PCRE2 we did not need to update this
file.

However the same commit also incorrectly removed two apparent library
packages (libldm, libxml2) which the daemon does not link to, but
which we'd like to pull in because of tools they provide, in
particular ldmtool.

Re-add those two explicit dependencies.

Fixes: commit 133a491677
2022-11-07 12:44:07 +00:00
Richard W.M. Jones
26940f64a7 build: Replace Python distutils by sysconfig
This module has been deprecated in Python >= 3.10
(https://peps.python.org/pep-0632/).  Replace distutils.sysconfig with
sysconfig which is not quite a drop-in replacement.

This fix is incomplete as we still reference distutils in
python/setup.py.in.  However that is only used for PIP-style
distributions (make -C python sdist) which we don't really use or
recommend.

Thanks: Miro Hrončok
See-also: https://peps.python.org/pep-0632/
See-also: https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/N6ITYHLRWIDNYNXGPYG2ZHF3ZLQWZN7L/
2022-10-24 17:11:31 +01:00
Richard W.M. Jones
5c63ec2a53 gobject: Remove bogus NULL test for UUIDs
Many warnings such as:

src/session.c: In function 'guestfs_session_internal_test_rstruct':
src/session.c:14755:7: warning: the comparison will always evaluate as 'true' for the address of 'pv_uuid' will never be NULL [-Waddress]
14755 |   if (ret->pv_uuid) memcpy (s->pv_uuid, ret->pv_uuid, sizeof (s->pv_uuid));
      |       ^~~
In file included from src/session.c:40:
../include/guestfs.h:551:8: note: 'pv_uuid' declared here
  551 |   char pv_uuid[32]; /* this is NOT nul-terminated, be careful when printing */
      |        ^~~~~~~
2022-10-24 11:27:53 +01:00
Richard W.M. Jones
19c40e6717 gobject: Use G_ADD_PRIVATE
Deprecation warnings include:

src/optargs-xfs_growfs.c: In function 'guestfs_xfs_growfs_init':
src/optargs-xfs_growfs.c:311:13: warning: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
  311 |   o->priv = GUESTFS_XFS_GROWFS_GET_PRIVATE (o);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is based on the same change made here:

https://github.com/nzjrs/osm-gps-map/pull/78/files
2022-10-24 11:25:42 +01:00
Richard W.M. Jones
001683e885 appliance: Remove LD_PRELOAD=libSegFault.so
This feature was removed in glibc 2.35:
https://savannah.gnu.org/forum/forum.php?forum_id=10111
2022-10-24 10:41:09 +01:00
Richard W.M. Jones
3f5bdce111 Update common submodule
utils: Fix rogue include of nbdkit-plugin.h
2022-10-15 08:07:42 +01:00
Richard W.M. Jones
e1c9bbb3d1 lib: Avoid calling setenv between fork and exec
setenv can call malloc and is not safe to call here.  Glibc is usually
tolerant of this and we haven't had problems before, but if you use
GLIBC_TUNABLES glibc.malloc.check=1 (or any alternate malloc / libc
which serializes) then you would see hangs if starting multiple
libguestfs handles from different threads at the same time.

This commit also updates the common submodule to pick up:

  commit 3c64bcdeaf684f05f46f3928b55aadafdfe72720
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Fri Oct 14 11:07:21 2022 +0100

    utils: Add function for copying the environment and adding new entries

    libguestfs is currently calling setenv at an unsafe location between
    fork and exec.  To fix this we need a way to copy and modify the
    environment before fork and then we can pass the modified environ to
    execve-like functions.  nbdkit already does the same so use that code.

    This function is copied and adapted from here under a compatible license:
    https://gitlab.com/nbdkit/nbdkit/-/blob/master/common/utils/environ.c

Thanks: Siddhesh Poyarekar
2022-10-14 11:40:12 +01:00
Richard W.M. Jones
4004e8eb36 appliance: Create symlink /etc/crypto-policies/back-ends/opensslcnf.config
Downstream patched openssl in Fedora 37+ broke unless
/etc/crypto-policies/back-ends/opensslcnf.conf is present.  Files in
this directory are generated by %post rules that use scripting
languages so cannot easily be created by supermin.

Add a symlink to the DEFAULT policy file if the configuration file
doesn't exist.

A symptom of this problem is the error:

  Requested hash sha256 is not supported.
  Failed to set pbkdf parameters.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2133884
Updates: commit d6ba398825
2022-10-12 12:42:15 +01:00
Richard W.M. Jones
f73c653cc0 Revert "appliance: Copy in /etc/crypto-policies/back-ends/ files"
This reverts commit d6ba398825.
2022-10-12 10:08:14 +01:00