Commit Graph

10663 Commits

Author SHA1 Message Date
Richard W.M. Jones
d0e5a819e8 python: Fix missing & additional backslashes which broke python sdist.
Fixes commit e6c89f9631.
2018-02-09 16:00:00 +00:00
Richard W.M. Jones
1e99b96179 Version 1.38.0. v1.38.0 2018-02-09 09:39:02 +00:00
Richard W.M. Jones
ed1c8fcfd7 docs: Finalize release notes for 1.38. 2018-02-09 09:39:00 +00:00
Richard W.M. Jones
dc44de5e23 authors: Add a list of aliases.
This handles the case where a single author has multiple different
names in the git commit history.
2018-02-09 09:39:00 +00:00
Richard W.M. Jones
c00998b90e ocaml: When creating compat Bytes module, create bytes.mli file.
On distros with OCaml < 4.02 we need to create a compatibility Bytes
module.  However we didn't create the interface file (bytes.mli) which
would mean that dependencies wouldn't be created correctly for
parallel builds.  This commit uses ‘ocaml -i’ to create an interface
file which exports everything.
2018-02-08 17:16:41 +00:00
Yuri Chornoivan
7e4f03d2c2 Fix minor typos 2018-02-08 13:20:34 +01:00
Pino Toscano
6acf236d24 python: add missing newline
When checking the return value of guestfs_int_py_fromstring for string
fields of structs, add a newline to generated C code, so it is properly
indented.

Fixes commit 401c445636.
2018-02-08 13:11:51 +01:00
Richard W.M. Jones
d56a3aa0f0 diff: Fix typo in manual page.
Reported by: Yuri Chornoivan
2018-02-07 18:38:13 +00:00
Daniel P. Berrangé
3c7bbf97e2 daemon: add inspector support for MS-DOS distro
An installation of MS-DOS has various files in a /DOS directory,
which COMMAND.COM looking like a reasonable signal that its MS-DOS
or a very close relative there-of.

This is validated with an MS-DOS 6.22 install.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-07 18:18:27 +00:00
Richard W.M. Jones
6893c40627 tmpdirs: Make the ‘su broken’ error message actionable.
Revert "tmpdirs: Blame systemd because su is broken."

This reverts commit 9464304d7a.

Replace with an actionable error message.
2018-02-07 17:26:58 +00:00
Pino Toscano
693a8175ee fish: add a small doc note about -- for args (RHBZ#1536603)
This will hint what to do when any argument of a command starts with a
dash.
2018-02-07 17:33:14 +01:00
Pino Toscano
3d4c84185a v2v: fix -it ssh syntax in example (RHBZ#1540535)
Updates commit 1d38216d20.
2018-02-07 17:26:37 +01:00
Pino Toscano
8ce1373847 customize: avoid Array.mem for now
Since it is available only in OCaml >= 4.03, which is higher than our
requirement, add a simple reimplementation of it.

Fixes commit 719d68fa24.
2018-02-07 16:54:09 +01:00
Richard W.M. Jones
b10aa60d54 docs: Remove or correct links to virt-tools.org.
Unfortunately I wasn't able to find a good reference for checking if
your hardware virt is enabled.

Thanks: Yuri Chornoivan
2018-02-07 14:49:25 +00:00
Richard W.M. Jones
9464304d7a tmpdirs: Blame systemd because su is broken. 2018-02-07 14:36:15 +00:00
Richard W.M. Jones
4a771d30d9 website: Update links to new development branch and stable branches. 2018-02-07 14:35:59 +00:00
Richard W.M. Jones
6bb9884018 maintainer: Update translations from Zanata.
There were some problems with the Ukrainian translations which I have
fixed.  The 3 magic strings __CUSTOMIZE_OPERATIONS__,
__CUSTOMIZE_SYNOPSIS__ and __OPERATIONS__ were translated, breaking
substitutions in virt-builder, virt-customize and virt-sysprep manual
pages.
2018-02-07 14:28:25 +00:00
Richard W.M. Jones
248d91bfa4 maintainer: Update to latest gnulib. 2018-02-07 13:26:23 +00:00
Richard W.M. Jones
900cdc9d8e docs: release notes: Hivex 1.3.14 is _not_ required. 2018-02-07 13:26:23 +00:00
Pino Toscano
82fbf294fd daemon: build also without Hivex.OPEN_UNSAFE (RHBZ#1493048)
Do a configure check for the OPEN_UNSAFE flag in the OCaml binding of
Hivex, using it only when available.  This makes it possible to use
hivex < 1.3.14 to build libguestfs (the daemon, actually).

Amend the building documentation accordingly, bringing the minimum
version of hivex back as it was before
commit 64f49df747.
2018-02-06 17:27:23 +01:00
Richard W.M. Jones
382b544731 Version 1.37.37. v1.37.37 2018-02-06 14:24:18 +00:00
Richard W.M. Jones
ee36f582d4 docs: Update release notes for 1.38 release. 2018-02-06 13:27:45 +00:00
Pino Toscano
719d68fa24 customize: allow missing SELINUXTYPE in SELinux config
libselinux defaults to "targeted" when no SELINUXTYPE is specified in
/etc/config/selinux.  Hence do the same here, instead of failing because
of the missing key.

Add a slow test for checking SELinux relabeling on a Fedora 27 guest,
both with no changes, and with a modified configuration.
2018-01-31 17:50:50 +01:00
Richard W.M. Jones
0c3d2d9430 customize: Correctly handle crypt(3) returning NULL (RHBZ#1539395).
In particular glibc's crypt will return NULL / errno == ENOSYS and
other implementations might do that in future too.

Reported by: David Hill
2018-01-30 14:18:35 +00:00
Richard W.M. Jones
7021a234aa p2v: tests: Fix slow test ‘test-virt-p2v-pxe.sh’.
Since virt-builder Fedora 27 templates now use GPT, the root
filesystem has moved from /dev/sda3 to /dev/sda4.  /dev/sda3 is now a
swap device which could not be mounted as the root device, although
systemd unhelpfully hides the error unless you run qemu interactively.

I think this fixes commit a06e50e263.
2018-01-26 10:52:56 +00:00
Richard W.M. Jones
ff80f294d3 Version 1.37.36. v1.37.36 2018-01-25 14:30:43 +00:00
Richard W.M. Jones
b0df5f26fe customize: Use libxcrypt if available to provide crypt(3).
glibc 2.27 removes crypt(3) and suggests using libxcrypt.
libxcrypt requires <crypt.h> to be included.
2018-01-23 20:57:16 +00:00
Richard W.M. Jones
e4c3968880 lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.
It obscures what's really going on and is no longer necessary
for the original purpose.

This reverts commit d50cb7bbb4.

See also:

  https://www.redhat.com/archives/libguestfs/2017-November/thread.html#00226
  https://www.redhat.com/archives/libguestfs/2017-December/thread.html#00044
2018-01-23 20:57:16 +00:00
Mykola Ivanets
24d1d46c98 lib: docs: guestfs_list_filesystems no longer needs to be used soon after launch when nothing is mounted.
guestfs_list_filesystems uses mount/umount to discover btrfs
sub-volumes and since 1.37 it generates random mountpoint so it will
longer affect already mounted filesystems if either.
2018-01-23 10:22:55 +00:00
Richard W.M. Jones
c3dd3f51a6 lua, perl: Use thread-safe strerror_r instead of strerror (RHBZ#1536763). 2018-01-22 17:52:46 +00:00
Richard W.M. Jones
e04aa823d1 perl: Free array on error path to avoid leak (RHBZ#1536765). 2018-01-22 17:52:46 +00:00
Richard W.M. Jones
a30b51747f launch: direct: Use old-style file= and format= parameters when not disabling locking (RHBZ#1503497).
Ancient qemu 1.5 (in RHEL 7) does not understand the
file.file.filename= and file.driver= parameters.  Go back to using the
old-style file= and format= parameters when we're not trying to set
the file.backing.file.locking=off parameter.

Fixes commit 9fe592808c.

Thanks: Yongkui Guo, Václav Kadlčík.
2018-01-19 16:01:01 +00:00
Richard W.M. Jones
7e43ef4171 common/mlxml: Remove -cclib from ocamlmklib.
ocamlmklib will get confused if the -cclib parameter expands to
anything except a single -lxml2 argument.  In any case it's not
necessary to specify the linker command here since every use of this
library links in a program to libxml2.
2018-01-16 13:03:39 +00:00
Richard W.M. Jones
49263be47a configure: Don't define _FORTIFY_SOURCE.
We routinely test the upstream code by running everything under
valgrind, and in any case _FORTIFY_SOURCE is usually defined by
downstream Linux distros and we can leave the optimization vs safety
decision to them.

See this bug: https://bugs.gentoo.org/640494
2018-01-16 13:03:39 +00:00
Cédric Bosdonnat
7c986228d5 resize: copy GPT partition flags
In some cases, the first stage bootloader needs the 'Legacy BIOS
bootable' flag to be set on the partition. This change copies all
flags (including this one) for each partition of the old disk to the
new one to avoid ending up with non-bootable disks.
2018-01-16 13:03:39 +00:00
Cédric Bosdonnat
c5fdc4f764 New APIs: part_set_gpt_attributes and part_get_gpt_attributes
Allow reading and setting the GPT partition attribute flags.
2018-01-16 13:03:39 +00:00
Cédric Bosdonnat
5f26f70262 daemon: make sgdisk_info_extract_uuid_field more generic
Rename the sgdisk_info_extract_uuid_field to
sgdisk_info_extract_field in order to reuse it for other field types.
Just like its C ancestor, it now needs an extractor function to be
passed as parameter.
2018-01-16 12:51:46 +00:00
Mykola Ivanets
079681058e tests: md: test guestfish finds md and LV devices in different combinations
Test guestfish finds:
1. md device created from physical block device and LV,
2. md device created from LVs
3. LV created on md device

raid0 is used for md device because it is inoperable if one of its components is inaccessible so it is easy observable that md device is missing (raid1 in this case will be operable but in degraded state).
2018-01-16 09:49:21 +00:00
Mykola Ivanets
c71e9e9acd tests: md: test guestfish finds logical volume on md device
Test guestfish finds logical volume (LV) created on md device
2018-01-16 09:49:21 +00:00
Mykola Ivanets
b00379fbd6 appliance: init: Avoid running degraded md devices
The issue:
- raid1 will be in degraded state if one of its components is logical volume (LV)
- raid0 will be inoperable at all (inacessible from within appliance) if one of its component is LV
- raidN: you can expect the same issue for any raid level depends on how many components are inaccessible at the time mdadm is running and raid redundency.

It happens because mdadm is launched prior to lvm AND it is instructed to run found arrays immediately (--run flag) regardless of completeness of their components.
Later (when lvm activates found LVs) md signature on LV might be recognized BUT newly found raid components could't be inserted into already running (in degraded state)
or marked as inoperable raid arrays.

The patch fixes the issue in the following way:

1. Found arrays won't be run immediately unless ALL expected drives (components) are present. Here '--no-degraded' flag comes into a play. See mdadm(8).
2. Second mdadm call (after LVM is scanned) will scan UNUSED yet devices and make an attempt to run all found arrays (even they will be in degraded state).

There is no performance penalty because second pass scans UNUSED yet devices. Here is 'boot-benchmark' before and after patch:

             : libvirt backend : direct backend
------------------------------------------------
master       : 835.2ms ±1.1ms  : 670.4ms ±0.3ms
master+patch : 837.7ms ±2.4ms  : 671.8ms ±0.2ms
2018-01-16 09:49:21 +00:00
Mykola Ivanets
9bdd2cacfd cat: virt-tail: Fix spontaneously failing test
According to 'guestfs_sync' API method documentation: "You should always call this if you have modified a disk image, before closing the handle."
So, 'guestfish --remote sync' is required because changes made on the disk (guestfish --remote rm /tail) should be visible to 'virt-tail' which works in different process and also accessing the same disk.
A you can see, other changes done via 'guestfish --remote' in this test are flushed via a 'sync' command.

The test is failing spontaneously beasue without 'sync' it very depends on outside factors like qemu caching policy, underlying host filesystem etc.
2018-01-16 08:37:16 +00:00
Richard W.M. Jones
4ac3be3d04 daemon: tests: Compile tests with compiler warnings.
And fix the problems.
2018-01-09 12:17:53 +00:00
Richard W.M. Jones
04031269f6 tests: Further instances of $(RPC_CFLAGS). 2018-01-09 12:17:53 +00:00
Richard W.M. Jones
df7f6b9c9a common/protocol: Fix indentation of $(RPC_CFLAGS).
Fixes commit 946d5bf8d4.
2018-01-09 12:17:53 +00:00
Richard W.M. Jones
0a9a3d62d9 diff: Set different identifiers on the two handles.
This allows us to easily see from trace output (‘virt-diff -x’) which
handle is being used for each call.  Otherwise you get meaningless
output such as:

libguestfs: trace: download "/Windows/WindowsUpdate.log" "/tmp/virtdiffy9m5YW/a"
libguestfs: trace: download = 0
libguestfs: trace: download "/Windows/WindowsUpdate.log" "/tmp/virtdiffy9m5YW/b"
libguestfs: trace: download = 0

Thanks: Xiang Hua Chen
2018-01-09 11:12:19 +00:00
Richard W.M. Jones
ab0a3e0276 resize: Clarify example in manual page.
Someone following this example started by literally copying "olddisk"
to "newdisk", which doesn't work (the target must always be blank).
Clarify the wording.
2018-01-05 15:01:20 +00:00
Richard W.M. Jones
212762c593 Update copyright dates for 2018.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2017/$1-2018/g' `git ls-files`
2018-01-04 15:30:10 +00:00
Richard W.M. Jones
dab065a8ee v2v: docs: Match the two instances of /path/to/nbdkit in the documentation.
Fixes commit d81a2ee185.
See also:
https://bugzilla.redhat.com/show_bug.cgi?id=1513884#c5
2017-12-18 10:30:25 +00:00
Richard W.M. Jones
d3afdb6e3e df: Handle block sizes smaller than 1024 bytes (RHBZ#1525241).
Thanks: Nikolay Ivanets
2017-12-14 22:42:06 +00:00
Richard W.M. Jones
2c359583b3 Version 1.37.35. v1.37.35 2017-12-10 09:34:50 +00:00