--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Dear release team,
please allow libguestfs 1.34.6-1 into testing. This is a new upstream
sub-version that only introduces bugfixes and does not break existing
APIs.
A filtered debdiff is attached, the following command was used to
generate it:
,----
| debdiff -w libguestfs_1.34.4-1.dsc libguestfs_1.34.6-1.dsc \
| | filterdiff -p1 -x 'aclocal.m4' -x 'bootstrap' \
| -x configure -x 'config.*' -x Makefile.in -x '*/Makefile.in' \
| -x 'build-aux/*' -x 'gnulib/*' -x 'm4/*.m4' -x .gitignore \
| -x maint.mk -x GNUmakefile \
| -x 'po/*' -x 'po-docs/*' -x '*.html' -x '*.sgml' \
| -X libguestfs/generator/files-generated.txt \
| | grep -v '^Binary files .* differ$' \
| > libguestfs_1.34.6-1.debdiff
`----
Upstream has a sane stable release policy as documented in guestfs(3):
,----
| LIBGUESTFS VERSION NUMBERS
| Since April 2010, libguestfs has started to make separate
| development and stable releases, along with corresponding
| branches in our git repository. These separate releases can
| be identified by version number:
|
| even numbers for stable: 1.2.x, 1.4.x, ...
| .-------- odd numbers for development: 1.3.x, 1.5.x, ...
| |
| v
| 1 . 3 . 5
| ^ ^
| | |
| | `-------- sub-version
| |
| `------ always '1' because we don't change the ABI
|
| Thus "1.3.5" is the 5th update to the development branch
| "1.3".
|
| As time passes we cherry pick fixes from the development
| branch and backport those into the stable branch, the effect
| being that the stable branch should get more stable and less
| buggy over time. So the stable releases are ideal for
| people who don't need new features but would just like the
| software to work.
|
| Our criteria for backporting changes are:
|
| * Documentation changes which don't affect any code are
| backported unless the documentation refers to a future
| feature which is not in stable.
|
| * Bug fixes which are not controversial, fix obvious
| problems, and have been well tested are backported.
|
| * Simple rearrangements of code which shouldn't affect how
| it works get backported. This is so that the code in
| the two branches doesn't get too far out of step,
| allowing us to backport future fixes more easily.
|
| * We don't backport new features, new APIs, new tools etc,
| except in one exceptional case: the new feature is
| required in order to implement an important bug fix.
|
| A new stable branch starts when we think the new features in
| development are substantial and compelling enough over the
| current stable branch to warrant it. When that happens we
| create new stable and development versions 1.N.0 and
| 1.(N+1).0 [N is even]. The new dot-oh release won't
| necessarily be so stable at this point, but by backporting
| fixes from development, that branch will stabilize over
| time.
`----
Cheers,
-Hilko
diff -Nru -w libguestfs-1.34.4/BUGS libguestfs-1.34.6/BUGS
--- libguestfs-1.34.4/BUGS 2017-01-29 22:44:12.000000000 +0100
+++ libguestfs-1.34.6/BUGS 2017-03-08 11:33:43.000000000 +0100
@@ -1,5 +1,5 @@
NOTE: This file is automatically generated from "update-bugs.sh".
-Last updated: 2017-01-29
+Last updated: 2017-03-08
This contains a local list of the bugs that are open against
libguestfs. Bugs are tracked in the Red Hat Bugzilla database
@@ -218,9 +218,6 @@
1152818 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1152818
llz give ? for the security context of a file, which is wrong
-1152819 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1152819
- Can not end a running command in virt-rescue by press ^C or other keys, the only way is to exit virt-rescue
-
1153702 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1153702
Using "upload - XXX" doesn't work with remote
@@ -230,15 +227,9 @@
1155229 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1155229
RFE: Allow uploading virt-v2v converted images directly to Cinder
-1161019 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1161019
- RFE: Only install RHEV-APT if virt-v2v -o rhev/-o vdsm option is used
-
1170771 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1170771
virt-sparsify fails to sparsify CentOS 7 SWAP
-1171654 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1171654
- Modify a file in virt-rescue with vi on some linux terminal such as yakuake, can lead to abnormal display in virt-rescue shell
-
1172425 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1172425
[RFE]virt-v2v failed to convert VMware ESX VM with snapshot
@@ -287,36 +278,21 @@
1232477 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1232477
guestfs_add_drive_opts incorrectly quotes query parameters
-1233093 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1233093
- QXL driver is not installed for some version of windows guest after convert to RHEV
-
-1237250 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1237250
- aarch64: libguestfs should now prefer virtio-pci
-
1242028 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1242028
virt-make-fs cannot set g+s bit on vfat
1250670 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1250670
libguestfs-test-tool succeeds but guestmount fails
-1252701 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1252701
- virt-p2v cannot convert older HP Smart Array servers which require cciss driver
-
1253593 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1253593
[RFE]virt-p2v support conversion of citrix xen guest
-1255610 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1255610
- W2K8R2 FC guest has no VGA driver on RHEV
-
1265588 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1265588
Windows guest with dynamic disk cannot show RAID(E:) Disk on rhev after conversion by virt-p2v
1270686 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1270686
libguestfs-1.31.15-1.fc24 FTBFS: cp: missing file operand
-1272119 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1272119
- virt-v2v on W2K3 32-bit image fails
-
1277744 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1277744
When VirtualBox is running, libguestfs fails with ioctl(KVM_CREATE_VM) failed: 16 Device or resource busy
@@ -335,9 +311,6 @@
1308535 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1308535
RFE: v2v: Copy bios.hddOrder to target
-1311890 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1311890
- virt-v2v: error: libguestfs error: hivex_open: hivex failed to open /Windows/System32/config/SOFTWARE: Operation not supported
-
1314739 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1314739
The X server of Xen rhel5.11 can't start successfully after converted by virt-p2v
@@ -347,9 +320,6 @@
1318922 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1318922
network name mangling after virt-v2v conversion causes old-style network scripts to fail
-1322512 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1322512
- Libguestfs error: filesize: /var/lib/rpm/Name: No such file or directory
-
1322837 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1322837
Setting LIBGUESTFS_HV causes security context to be reset
@@ -363,7 +333,7 @@
Part-init and part-add failed to create partition with mac parttype on aarch64
1341619 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1341619
- Sendkey"ctrl+alt+detele" is not useful at p2v client GUI mode
+ Sendkey"ctrl+alt+delete" is not useful at p2v client GUI mode
1346818 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1346818
RFE: virt-get-kernel should be able to extract the kernel command line too
@@ -377,20 +347,8 @@
1351000 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1351000
virt-customize --commands-from-file will fail if there is an extra blank in the file
-1354507 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1354507
- virt-v2v conversions from vCenter do not consistently obey the proxy environment variables
-
-1354509 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1354509
- v2v: Map Windows 8.1 client to Windows 8.1 in oVirt
-
-1356550 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1356550
- QXL driver can't be installed automatically when convert win7 or win2008r2 from kvm to rhev by virt-v2v
-
-1357427 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1357427
- virtio driver can't be installed for netwrok automatically in win2012 guest sometimes when convert the guest using virt-v2v by auto
-
-1359086 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1359086
- Rebase libguestfs in RHEL 7.4
+1356339 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1356339
+ Unable to update RHEL 7 KVM Guest Image with virt-customize
1362497 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1362497
[RFE] Add support for importing Debian/Ubuntu guests with virt-v2v
@@ -404,11 +362,8 @@
1364058 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1364058
[RFE] virt-v2v should provide an option to store the traces to log file
-1364518 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1364518
- libguestfs-java: mismatch class version vs java dependency
-
1365473 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1365473
- Can't convert rhel6.8 x86-lpfc host by virt-p2v
+ virt-p2v fails when source machine is using tboot (Intel Trusted Boot pre-kernel module)
1368599 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1368599
pip install fails with ImportError: /usr/lib64/python2.7/site-packages/libguestfsmod.so: undefined symbol: put_isoinfo
@@ -425,36 +380,15 @@
1372037 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1372037
txz-in hangs on btrfs filesystem
-1372671 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1372671
- Graphics type of guest become sdl after converted by virt-v2v -i disk
-
-1373879 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1373879
- virt-resize --expand fails with win2008 x86 image on aarch64 uefi host
-
-1374232 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1374232
- selinux relabel fails on RHEL 6.2 guests with "libguestfs error: selinux_relabel: : Success"
-
1374254 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1374254
Failed to boot up Win7sp1 for first time which installed on fc hardware after converting to rhv4.0
1374629 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1374629
- [virt-p2v]virt-p2v recognize LCDRIVE & virtual floppy as hard disks
-
-1379579 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1379579
- guestfish mistakely parse nbd exportname
-
-1382275 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1382275
- virt-v2v is pulling in the X11 stack
+ virt-p2v sees LCDRIVE & virtual floppy as hard disks, they are in fact removable
1383048 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1383048
Device.map which is /dev/sdb or /dev/mapper/mpatha can't be updated to vda after p2v conversion
-1383665 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1383665
- mount: unknown filesystem type 'xfs' error while converting centos VMware VM to glance image.
-
-1387213 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1387213
- [RFE] Add support for importing Debian/Ubuntu guests with virt-v2v
-
1393747 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1393747
RFE: Libguestfs should support LUKS partition in guest image
@@ -464,9 +398,6 @@
1400332 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1400332
RFE: virt-builder should support templates with encrypted filesystems
-1404182 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1404182
- RFE: virt-resize should support a URL as the outdisk
-
1405273 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1405273
RFE: virt-builder should support a URL as the output diskimage
@@ -476,30 +407,27 @@
1409024 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1409024
[Debian] Missing db_dump abort inspection
-1409637 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1409637
- 0x0000007B BSOD after converting Windows 2008 R2 using p2v
-
1410102 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1410102
Make install error for libguestfs-1.35.19
-1412090 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1412090
- Virt-v2v will use the latest kernel instead of the default kernel.
-
1413489 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1413489
Inspection doesn't find any OS in cirros-d161201-x86_64-disk.img
-1414505 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1414505
- virt-p2v needs RHEL 5 build to support LSI Logic / Symbios Logic MegaRAID SAS 8208ELP/8208ELP
-
-1415935 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1415935
- virt-v2v auto running convert esx guests failed with error "qemu-img: error while reading sector 24942336: Protocol error"
-
1415955 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1415955
Ubuntu 14 doesn't generate ssh host keys during first boot
1417306 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1417306
QEMU image file locking (libguestfs)
+1420103 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1420103
+ [RFE] Hyper-V support in v2v
+
+1429643 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1429643
+ virt-v2v should depend on OVMF/AAVMF
+
+1430287 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1430287
+ Convert a guest from vmware to kvm by virt-v2v can't be finished in 2 hours
+
503134 ASSIGNED https://bugzilla.redhat.com/show_bug.cgi?id=503134
guestfish's list splitting does not recognize internal quoting
@@ -548,9 +476,6 @@
1144138 ASSIGNED https://bugzilla.redhat.com/show_bug.cgi?id=1144138
virt-inspector fails on FreeBSD 9.3 guest
-1167623 ASSIGNED https://bugzilla.redhat.com/show_bug.cgi?id=1167623
- Remove "If reporting bugs, run virt-v2v with debugging enabled .." message when running virt-p2v
-
1183493 ASSIGNED https://bugzilla.redhat.com/show_bug.cgi?id=1183493
RFE: virt-rescue: add a flag to autorun the suggested mount commands and chroot, suggested with --suggest
@@ -560,92 +485,155 @@
1213844 ASSIGNED https://bugzilla.redhat.com/show_bug.cgi?id=1213844
guestfish should reset the console on ^Z
-(180 bugs)
+(155 bugs)
--------------------------------------------------
Bugs in MODIFIED, POST or ON_QA state are fixed.
You can help by testing the fixes.
-1141631 POST https://bugzilla.redhat.com/show_bug.cgi?id=1141631
- [RFE] virt-v2v should support convert a guest to a dir-pool with using pool's uuid
+1152819 POST https://bugzilla.redhat.com/show_bug.cgi?id=1152819
+ Can not end a running command in virt-rescue by press ^C or other keys, the only way is to exit virt-rescue
+
+1171654 POST https://bugzilla.redhat.com/show_bug.cgi?id=1171654
+ Modify a file in virt-rescue with vi on some linux terminal such as yakuake, can lead to abnormal display in virt-rescue shell
+
+1372671 POST https://bugzilla.redhat.com/show_bug.cgi?id=1372671
+ Graphics type of guest become sdl after converted by virt-v2v -i disk
+
+1374232 POST https://bugzilla.redhat.com/show_bug.cgi?id=1374232
+ selinux relabel fails on RHEL 6.2 guests with "libguestfs error: selinux_relabel: : Success"
+
+1379585 POST https://bugzilla.redhat.com/show_bug.cgi?id=1379585
+ guestfish mistakely parse nbd exportname
+
+1384241 POST https://bugzilla.redhat.com/show_bug.cgi?id=1384241
+ The tar-in command does not allow restoring file capabilities
+
+1429430 POST https://bugzilla.redhat.com/show_bug.cgi?id=1429430
+ Should remove --dcpath and --dcPath options in virt-v2v help info
+
+1429491 POST https://bugzilla.redhat.com/show_bug.cgi?id=1429491
+ Should rename network name of rhv in virt-v2v man page
+
+1429506 POST https://bugzilla.redhat.com/show_bug.cgi?id=1429506
+ RFE: OVMF should be detected on conversion server to prevent failed conversion
+
+1430184 POST https://bugzilla.redhat.com/show_bug.cgi?id=1430184
+ virt-dib should generate sha256 checksum instead of sha512
+
+1430203 POST https://bugzilla.redhat.com/show_bug.cgi?id=1430203
+ Should remove SLES and openSUSE XEN host info in virt-v2v man page
+
+1053847 MODIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1053847
+ Recommended default clock/timer settings
+
+1354507 MODIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1354507
+ virt-v2v conversions from vCenter do not consistently obey the proxy environment variables
-1152369 POST https://bugzilla.redhat.com/show_bug.cgi?id=1152369
+1152369 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1152369
virt-v2v failed to convert RHEL 6.7 UEFI guest: no grub1/grub-legacy or grub2 configuration file was found
-1164765 POST https://bugzilla.redhat.com/show_bug.cgi?id=1164765
+1161019 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1161019
+ RFE: Only install RHEV-APT if virt-v2v -o rhev/-o vdsm option is used
+
+1164765 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1164765
[RFE] Add a new API to scan devices for a btrfs filesystem
-1362649 POST https://bugzilla.redhat.com/show_bug.cgi?id=1362649
+1167623 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1167623
+ Remove "If reporting bugs, run virt-v2v with debugging enabled .." message when running virt-p2v
+
+1233093 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1233093
+ QXL driver is not installed for some version of windows guest after convert to RHEV
+
+1237250 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1237250
+ aarch64: libguestfs should now prefer virtio-pci
+
+1255610 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1255610
+ W2K8R2 FC guest has no VGA driver on RHEV
+
+1311890 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1311890
+ virt-v2v: error: libguestfs error: hivex_open: hivex failed to open /Windows/System32/config/SOFTWARE: Operation not supported
+
+1356550 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1356550
+ QXL driver can't be installed automatically when convert win7 or win2008r2 from kvm to rhev by virt-v2v
+
+1357427 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1357427
+ virtio driver can't be installed for network automatically in win2012 guest sometimes when convert the guest using virt-v2v by auto
+
+1359086 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1359086
+ Rebase libguestfs in RHEL 7.4
+
+1362649 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1362649
RFE: virt-sysprep does not utilize libguestfs encryption support
-1367738 POST https://bugzilla.redhat.com/show_bug.cgi?id=1367738
+1364518 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1364518
+ libguestfs-java: mismatch class version vs java dependency
+
+1367738 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1367738
Missing bash completion scripts for: virt-diff guestunmount virt-copy-in virt-copy-out virt-customize virt-get-kernel virt-p2v-make-disk virt-p2v-make-kickstart virt-tar-in virt-tar-out virt-v2v-copy-to-local virt-win-reg
-1372668 POST https://bugzilla.redhat.com/show_bug.cgi?id=1372668
+1372668 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1372668
Process status is not normal in windows guest after converted from kvm to rhev by virt-v2v
-1374405 POST https://bugzilla.redhat.com/show_bug.cgi?id=1374405
- There is HTTP 404 error info when convert guest to glance by virt-v2v
-
-1374651 POST https://bugzilla.redhat.com/show_bug.cgi?id=1374651
+1374651 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1374651
Can't install qxl driver for display device in win7 guest after converting to glance by virt-v2v
-1375157 POST https://bugzilla.redhat.com/show_bug.cgi?id=1375157
+1375157 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1375157
virt-v2v: -i ova: Permission denied when using libvirt and running as root
-1377081 POST https://bugzilla.redhat.com/show_bug.cgi?id=1377081
+1377081 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1377081
virt-p2v manual should update the new dialog information
-1378022 POST https://bugzilla.redhat.com/show_bug.cgi?id=1378022
+1378022 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1378022
There is virt-v2v warning about <listen type='none'> during converting a guest which has listen type='none' in XML
-1379240 POST https://bugzilla.redhat.com/show_bug.cgi?id=1379240
+1379240 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1379240
virt-v2v should not report error any more since libvirt bug 1134592 has been fixed
-1379289 POST https://bugzilla.redhat.com/show_bug.cgi?id=1379289
+1379289 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1379289
RFE: virt-p2v should support mnemonic operations
-1379585 POST https://bugzilla.redhat.com/show_bug.cgi?id=1379585
- guestfish mistakely parse nbd exportname
+1382275 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1382275
+ virt-v2v is pulling in the X11 stack
-1383517 POST https://bugzilla.redhat.com/show_bug.cgi?id=1383517
+1383517 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1383517
virt-v2v fails with /etc/fstab containing btrfs with two or more mount options
-1384241 POST https://bugzilla.redhat.com/show_bug.cgi?id=1384241
- The tar-in command does not allow restoring file capabilities
-
-1390876 POST https://bugzilla.redhat.com/show_bug.cgi?id=1390876
- "--machine-readable" info should be updated in virt-v2v manual page
+1387213 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1387213
+ [RFE] Add support for importing Debian/Ubuntu guests with virt-v2v
-1392798 POST https://bugzilla.redhat.com/show_bug.cgi?id=1392798
+1392798 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1392798
secrets from libvirt domains are not read
-1398070 POST https://bugzilla.redhat.com/show_bug.cgi?id=1398070
+1398070 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1398070
typo error in man page
-1400205 POST https://bugzilla.redhat.com/show_bug.cgi?id=1400205
+1400205 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1400205
Add --vdsm-compat=1.1 flag for VDSM
-1401474 POST https://bugzilla.redhat.com/show_bug.cgi?id=1401474
- Importing VMs from VMware is failing with error "Inspection field 'i_arch' was 'unknown'"
-
-1402301 POST https://bugzilla.redhat.com/show_bug.cgi?id=1402301
+1402301 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1402301
Improve OVA import compatibility
-1404287 POST https://bugzilla.redhat.com/show_bug.cgi?id=1404287
+1404182 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1404182
+ RFE: virt-resize should support a URL as the outdisk
+
+1404287 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1404287
qemu-kvm cannot boot RHEL 7 kernel with TCG, hangs at "Probing EDD (edd=off to disable)..."
-1053847 MODIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1053847
- Recommended default clock/timer settings
+1418283 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1418283
+ virt-v2v: appliance runs out of memory running setfiles command
-1213691 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1213691
- Win2012R2 guest fails to boot on iscsi data domain after conversion by virt-v2v
+1425306 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1425306
+ typo error in virt-tail man page
-(25 bugs)
+(45 bugs)
--------------------------------------------------
These bugs are in the VERIFIED state.
+1141631 VERIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1141631
+ [RFE] virt-v2v should support convert a guest to a dir-pool with using pool's uuid
+
1165564 VERIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1165564
Provide Reboot/Shutdown button after virt-p2v
@@ -664,9 +652,18 @@
1358332 VERIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1358332
virt-p2v to become supported tool in RHEL 7.3
+1374405 VERIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1374405
+ There is HTTP 404 error info when convert guest to glance by virt-v2v
+
1388407 VERIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1388407
virt-sysprep will fail detecting OS if "/usr" is a distinct partition mounted in "/" via fstab
-(7 bugs)
+1390876 VERIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1390876
+ "--machine-readable" info should be updated in virt-v2v manual page
+
+1401474 VERIFIED https://bugzilla.redhat.com/show_bug.cgi?id=1401474
+ Importing VMs from VMware is failing with error "Inspection field 'i_arch' was 'unknown'"
+
+(11 bugs)
End of BUGS file.
diff -Nru -w libguestfs-1.34.4/builder/index-validate.c libguestfs-1.34.6/builder/index-validate.c
--- libguestfs-1.34.4/builder/index-validate.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/builder/index-validate.c 2017-03-07 14:34:53.000000000 +0100
@@ -38,7 +38,7 @@
extern int do_parse (struct parse_context *context, FILE *in);
-static void
+static void __attribute__((noreturn))
usage (int exit_status)
{
printf ("%s index\n", getprogname ());
diff -Nru -w libguestfs-1.34.4/cat/filesystems.c libguestfs-1.34.6/cat/filesystems.c
--- libguestfs-1.34.4/cat/filesystems.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/cat/filesystems.c 2017-03-07 14:35:02.000000000 +0100
@@ -33,6 +33,7 @@
#include "c-ctype.h"
#include "human.h"
+#include "intprops.h"
#include "getprogname.h"
#include "guestfs.h"
@@ -864,7 +865,7 @@
size_t len = 0;
char hum[LONGEST_HUMAN_READABLE];
char num[256];
- char mbr_id_str[3];
+ char mbr_id_str[INT_BUFSIZE_BOUND (mbr_id)];
if ((columns & COLUMN_NAME))
strings[len++] = name;
diff -Nru -w libguestfs-1.34.4/cat/ls.c libguestfs-1.34.6/cat/ls.c
--- libguestfs-1.34.4/cat/ls.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/cat/ls.c 2017-03-07 15:12:04.000000000 +0100
@@ -31,7 +31,14 @@
#include <assert.h>
#include <time.h>
#include <libintl.h>
+
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
+#else
+#include <sys/types.h>
+#endif
#include "human.h"
#include "getprogname.h"
diff -Nru -w libguestfs-1.34.4/ChangeLog libguestfs-1.34.6/ChangeLog
--- libguestfs-1.34.4/ChangeLog 2017-01-29 22:44:12.000000000 +0100
+++ libguestfs-1.34.6/ChangeLog 2017-03-08 11:33:43.000000000 +0100
@@ -1,3 +1,503 @@
+commit a0b0cf6bc057505308aa23c1dc9972d7d38e11d9
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Wed Mar 8 10:21:07 2017 +0000
+
+ java: Use String.uppercase instead of uppercase_ascii.
+
+ Older OCaml doesn't have String.uppercase_ascii, and because this
+ stable branch of libguestfs doesn't use Common_utils in the generator
+ subdirectory we cannot easily use our replacement.
+
+ Fixes commit bac25e0bfd481e5a7c2a73e88ad2df253e5f1f08.
+
+commit de8dd041e2e60e3c492685e5240e15e27a17e4ae
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Tue Mar 7 19:35:11 2017 +0000
+
+ Version 1.34.5.
+
+commit 3c31a722e88e618d24caad2515ef949aa74621a5
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Tue Mar 7 10:50:25 2017 +0000
+
+ docs: Document vulnerabilities in icoutils wrestool affecting libguestfs.
+
+ (cherry picked from commit 9f447837ae14651d06228ff77ae9196e258ca3f3)
+ (cherry picked from commit b69421590f78fbec7f5c88da14a156739ef19a1d)
+
+commit d9dfc1531c7a98fd25902e60386413d3d9a407da
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Mon Mar 6 18:11:29 2017 +0000
+
+ v2v: -o local: Check that UEFI firmware is installed before conversion (RHBZ#1429506).
+
+ Avoids a lengthy conversion followed by failure if we discover at the
+ end that OVMF is not installed.
+
+ This also changes the order of the methods in -o libvirt and -o qemu
+ so that it matches the order in the class interface, and also
+ logically makes more sense.
+
+ Thanks: Christopher Brown
+ (cherry picked from commit a05e0fc0e8ffa2638e66ed1d71d41c470eadc4d7)
+ (cherry picked from commit 5059b7c5871aa4861d625041847465e21c2ec4f5)
+
+commit 57b203a803d32a79fe0f4fecbf32f4685626ea43
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Mon Mar 6 16:07:04 2017 +0000
+
+ v2v: Fix typo in previous commit (RHBZ#1374232).
+
+ Fixes commit 25772a8123a1a800caf3472fb79c8eb3b4a074f3.
+
+ (cherry picked from commit c6d8d68a4643794128c1d617bc83fc22438cc7c5)
+ (cherry picked from commit ecd4d5b873da97b2e77746881c4c6542c1657e8e)
+
+commit ed825a51522f0675fc3f5255f5cc707709be0091
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Mon Mar 6 10:42:03 2017 +0000
+
+ v2v: Fix invalid regexp in file_contexts file (RHBZ#1374232).
+
+ Instead of just documenting this bug, fix it in the file_contexts
+ file.
+
+ Replaces commit ad3c8fe7f49c4991e1aa536856a1a408f55d5409.
+
+ (cherry picked from commit 25772a8123a1a800caf3472fb79c8eb3b4a074f3)
+ (cherry picked from commit 3a2e64c9feab090b1d35605303f4544901b47201)
+
+commit e4824616d19d400dcfccf762e687e06d5853c835
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Mon Mar 6 14:23:55 2017 +0100
+
+ lib: qemu: improve handling of FILE*
+
+ Create own blocks for all the parts dealing with FILE*: this way there
+ is no need to recycle the same FILE* variable for all the operations,
+ and have each block its own variable automatically cleaned up.
+
+ This also fixes a potential undefined behaviour on error: POSIX says
+ that after a call fclose(), a FILE* cannot be used anymore, not even
+ on fclose() failure. The previous behaviour for fclose == -1 was to jump
+ to the error label, which would then try to call fclose() again (since
+ the FILE* pointer was still non-null).
+
+ (cherry picked from commit d36940992ed81053fdbf8117ce6da30a8fef2a0f)
+ (cherry picked from commit dd9fde4f6fcc7363c61704fdb6bb6cb023dcb8ed)
+
+commit bac25e0bfd481e5a7c2a73e88ad2df253e5f1f08
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Mon Mar 6 13:25:48 2017 +0100
+
+ java: use cleanup handlers for structs (lists) as return values
+
+ Filling some of their fields may cause the flow to skip to throw the
+ "out of memory" exception, and return immediately. To avoid leaking the
+ struct, or struct list, from the C implementation, use a cleanup handler
+ so there is no need to manually clean it up.
+
+ (cherry picked from commit 18ee68ad1240b84739b603ee03e53b552f904e8c)
+ (cherry picked from commit f2e5424b66934425eac0041394d7782d47b1bc7d)
+
+commit 6eddd05078d7e410a355b1f5e5d57747cde8ec38
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Mon Mar 6 11:38:37 2017 +0100
+
+ daemon: btrfs: check end_stringsbuf return values everywhere
+
+ Make sure to check the return value of end_stringsbuf everywhere, as
+ that would generate invalid string lists.
+
+ (cherry picked from commit c5fa352087dc4ebc5270ca2ee47487cf9a44d827)
+ (cherry picked from commit ec3b1125a7537f26e4d27c2bc82991f3e9220ec3)
+
+commit 36dbab881cae0b54bb1890b4bfa464d657e7a74a
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Fri Mar 3 14:16:22 2017 +0000
+
+ Use gnulib set_cloexec_flag in a few places.
+
+ (cherry picked from commit e5474df1acdb0a8eaeb50886c928e0c2ec4ebad7)
+ (cherry picked from commit 39f82bfefb9ad4838eb8276b20213c914ea5b728)
+
+commit 436b5417cd6602ed00504f46d03ad72ded10127c
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Fri Mar 3 14:08:36 2017 +0000
+
+ Use gnulib set_nonblocking_flag function instead of fcntl.
+
+ The previous code:
+
+ fcntl (fd, F_SETFL, O_NONBLOCK)
+
+ was technically incorrect, because it would have reset any
+ other flags on the file descriptor.
+
+ Thanks: Eric Blake
+ (cherry picked from commit 58d6becc8af28babca0d52cef05eb8826231ae35)
+ (cherry picked from commit c4e4f630937e1c1cd1861ee78f504bd1d51e1528)
+
+commit f598c3a1727a90b9e353dff2eb5e5897f5c3fd07
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Fri Mar 3 13:50:46 2017 +0100
+
+ java: do not try to malloc 0 elements in get_all_event_callbacks
+
+ In case there are no event handlers registered with the handle,
+ get_all_event_callbacks will count 0 elements, trying to malloc a buffer
+ of that size. POSIX says that this can result in either a null pointer,
+ or an unusable pointer.
+
+ Short-circuit get_all_event_callbacks to allocate nothing when there are
+ no events, making sure to use its results only when there were events.
+
+ (cherry picked from commit c6543875aea501dd1c1db1873276526f3eca494f)
+ (cherry picked from commit 5755eed6d790832f1fd7fab62bd0426e1af27f5f)
+
+commit 8afa265387041c100892515171c5d7c7d147abe4
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Fri Mar 3 13:48:25 2017 +0100
+
+ ruby: do not try to malloc 0 elements in get_all_event_callbacks
+
+ In case there are no event handlers registered with the handle,
+ get_all_event_callbacks will count 0 elements, trying to malloc a buffer
+ of that size. POSIX says that this can result in either a null pointer,
+ or an unusable pointer.
+
+ Short-circuit get_all_event_callbacks to allocate nothing when there are
+ no events, making sure to use its results only when there were events.
+
+ (cherry picked from commit 4fc85f27c492e8e97b46083a2bcb11c81846f5a0)
+ (cherry picked from commit 43ef692c449b3b3463f6ee9e0272420f4df22399)
+
+commit 598fe2b29fae86cd0359f9c5a62a65dcd3ea21d2
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Fri Mar 3 13:47:48 2017 +0100
+
+ python: do not try to malloc 0 elements in get_all_event_callbacks
+
+ In case there are no event handlers registered with the handle,
+ get_all_event_callbacks will count 0 elements, trying to malloc a buffer
+ of that size. POSIX says that this can result in either a null pointer,
+ or an unusable pointer.
+
+ Short-circuit get_all_event_callbacks to allocate nothing when there are
+ no events, making sure to use its results only when there were events.
+
+ (cherry picked from commit b890fd2900310c9e4f0781aa3427a3bb114788b1)
+ (cherry picked from commit 63e9cd5536f0d92cb93a01c5ecac764e9c591ca5)
+
+commit 70b745209f44c38bbd6b4a74e73e9df3e852c8a8
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Fri Mar 3 13:40:17 2017 +0100
+
+ ocaml: do not try to malloc 0 elements in get_all_event_callbacks
+
+ In case there are no event handlers registered with the handle,
+ get_all_event_callbacks will count 0 elements, trying to malloc a buffer
+ of that size. POSIX says that this can result in either a null pointer,
+ or an unusable pointer.
+
+ Short-circuit get_all_event_callbacks to allocate nothing when there are
+ no events, making sure to use its results only when there were events.
+
+ (cherry picked from commit 64e1101631778b4167218adc93101a1587215f02)
+ (cherry picked from commit 4208be6f9762540e7d53a88462b19bc221cf0da5)
+
+commit 7ca8214cf8a0617334ddc84317ccb5f91ac43c14
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Fri Mar 3 11:00:37 2017 +0100
+
+ fish: fully init the msghdr buffers
+
+ This way no fields (msg_flags in particular) remain uninitialized.
+
+ (cherry picked from commit be82ba38df31730a2910aeb962bbafa29851f920)
+ (cherry picked from commit 6a3741e8ca884b4a8f1687a1897b4a3d82098d7e)
+
+commit 32ac85e05bde89b9e2c2c0700bba0d07ed476f06
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Fri Mar 3 10:39:10 2017 +0100
+
+ java: fix possible memory leak on error
+
+ Use CLEANUP_FREE to properly dispose the temporary array used for
+ StringList, DeviceList, FilenameList, and OStringList parameters: this
+ way, an early return (jumping to the ret_error label) will not forget
+ cleaning them up.
+
+ (cherry picked from commit bd55fa553f16aca12d5c882be26e528f35752ae8)
+ (cherry picked from commit c702acbc1f1c02b9932d2570455045faf7510401)
+
+commit 3e99879829fc12547c6a0915dd8c81c1bd76a1d3
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Thu Mar 2 17:42:10 2017 +0100
+
+ daemon: tsk: properly use GUESTFS_MAX_CHUNK_SIZE
+
+ Pass to fread the size of the buffer allocated, so it can be filled
+ completely. This is even faster than reading only 4/8 bytes each
+ iteration.
+
+ (cherry picked from commit 9aef2c7e3a5b9d6dd35378082357d96c921e78c1)
+ (cherry picked from commit b610f82d7bfc9eedcecd311761140fcdc1baf2c1)
+
+commit 8a410fedde457f16e80023832288d855494320cd
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Thu Mar 2 17:32:58 2017 +0100
+
+ java: fix invalid memory access for FBuffer in struct lists
+
+ When convering FBuffer fields of structs in each element of the return
+ list, make sure to allocate enough buffer to hold also the trailing null
+ character.
+
+ (cherry picked from commit c9df2d44cd4301b6522cd26d8791093033c4a340)
+ (cherry picked from commit 79d5e0c37a3a6bbba9626040d5359f9bc4fb815c)
+
+commit 4331d4fcc84050b5d271574ccda097bb5ca93766
+Author: Pino Toscano <ptoscano@redhat.com>
+Date: Thu Mar 2 17:30:16 2017 +0100
+
+ java: link libguestfs_jni against libutils
+
+ The JNI library uses CLEANUP_FREE macros, whose functions are built in
+ the internal libutils. Currently, trying to use functions that use
+ CLEANUP_FREE variables will cause the java execution to stop with a
+ symbol lookup error (for guestfs_int_cleanup_free).
+
+ (cherry picked from commit eeacc86a106471ecf0bf061e1951284fdb262107)
+ (cherry picked from commit a4a6f69835620db8c10b3294f9296421990a62e6)
+
+commit 0a464ac83cbf251369ce8ecf501e72c805f82599
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Thu Mar 2 11:35:38 2017 +0000
+
+ erlang: Rename 'message' to something less generic.
+
+ It's not possible to define an action which takes a parameter called
+ 'message' because the Erlang bindings use that as the name of an
+ internal variable. Solve this by renaming the Erlang internal
+ variable.
+
+ Fixes commit 84763d7fca3668c62ee3fe53d0e00a5a672f687b.
+
+ (cherry picked from commit 843d61c2d405f011853e4f33d3e3306d3d1ca6d3)
+ (cherry picked from commit 5bd55b59faca465a5923d7bd6e8d4ab579530a12)
+
+commit b44fb1fede369aa3919763a6f9da2e5524a43855
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Wed Mar 1 11:36:26 2017 +0000
+
+ Use AC_HEADER_MAJOR to find definitions of major, minor, makedev.
+
+ Note this requires either the following fix in autoconf:
+
+ http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98
+
+ OR gnulib sys_types module plus gnulib
+ commit a512e041120e9012e69afa2f5c3adc196ec4999a (any gnulib more
+ recent than Sep 2016) which corrects the AC_HEADER_MAJOR macro in a
+ similar way.
+
+ (cherry picked from commit 7a26804569703166a30bbc545986218ede03de04)
+ (cherry picked from commit 3836d61dc83466afe500ad9e5563eab074a0e9b1)
+
+commit 84a3151fadcc07ef42f0b700494d8cc0195771dd
+Author: Dawid Zamirski <dzamirski@datto.com>
+Date: Thu Mar 2 17:44:40 2017 -0500
+
+ parted: add more udev_settle calls.
+
+ add udev_settle calls to print_partition_table and
+ sgdisk_info_extract_field because the inspect-os calls
+ guestfs_part_get_parttype and guestfs_part_get_gpt_guid for all
+ parition devices found and this causes intermittent with opening block
+ devices that are certainly present yet RESOLVE_DEVICE macro would fail
+ wiht ENOENT.
+
+ (cherry picked from commit 4fd6c3ad6e04f6b8133439094c9bcb403c03ca03)
+ (cherry picked from commit b074c09475467f5c5c5620078ba1e3a100091e84)
+
+commit dcb256a646124e98f47efe692e109281c1e5ddbb
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Wed Mar 1 15:07:00 2017 +0000
+
+ ruby: Simplify and fix regression test.
+
+ This test failed on ppc64le with:
+
+ Failure:
+ </wrong argument type Fixnum \(expected Array\)/> was expected to be =~
+ <"wrong argument type Integer (expected Array)">.
+
+ In addition the test generated a warning:
+
+ tc_800_rhbz507346.rb:29: warning: ambiguous first argument; put parentheses or a space even after `/' operator
+
+ This commit fixes both of these and also makes it simpler and faster
+ by not bothering to launch the appliance.
+
+ Fixes commit 227b1eea90713d190a9cf5463af106af0b4eee2c.
+
+ (cherry picked from commit 9fbdea695b70918b37dd42310bf6ba5a5240c67f)
+ (cherry picked from commit c1dd33e612067c5581416168daad99876666eed6)
+
+commit 17c31eac3cd52dcee1483de16d1aacd67f0a8e17
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Thu Feb 23 13:33:48 2017 +0000
+
+ tests: regressions: Ignore SIGPIPE in test.
+
+ The test tests/regressions/rhbz914931.c works by causing the daemon to
+ segfault while writing to it.
+
+ For reasons unknown, when configured --without-libvirt, this causes
+ the test to fail receiving SIGPIPE (exit code 141). We can prevent
+ this by installing a signal handler to ignore SIGPIPE, so the signal
+ is converted to EPIPE which the code handles properly.
+
+ (cherry picked from commit a7bd49924445d11fe1843db659e61ca6fb2bb5cf)
+
+commit 2d30305243aba60bdf7b8d38d0c54b79c88aa0a6
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Mon Feb 20 20:09:30 2017 +0000
+
+ p2v: Fix slow test to pass LIBGUESTFS_PATH & LIBGUESTFS_CACHEDIR to virt-v2v.
+
+ Adding a new optional parameter to hivex_open in
+ commit 1f99251223ccee252ee1259bc2bdb9b64e3df96b reveals a subtle bug
+ in the virt-p2v slow test.
+
+ Because we didn't pass LIBGUESTFS_PATH through to the instance of
+ virt-v2v, it was running with the new binary and library code, but
+ with the installed appliance (or would have failed if libguestfs
+ wasn't installed on the host when running the test). In particular
+ this bug was revealed when the new virt-v2v binary passed the
+ GUESTFS_HIVEX_OPEN_UNSAFE flag to the guestfs_hivex_open call, which
+ the (old, installed) daemon did not recognize and rejected with an
+ error.
+
+ For the same reason we also have to pass in LIBGUESTFS_CACHEDIR to
+ make sure that supermin doesn't reuse the cached appliance from
+ /var/tmp.
+
+ (cherry picked from commit 08e7506abacee23d635bd37fc9586be3cad9099f)
+
+commit afb5f9880a35ec0a077b16aa6f6312945f076a5e
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Thu Feb 16 14:06:18 2017 +0000
+
+ v2v: Document conversion failure with RHEL 6.2 (RHBZ#1374232).
+
+ (cherry picked from commit ad3c8fe7f49c4991e1aa536856a1a408f55d5409)
+
+commit 3b716f2285719028aee0f771332ce08d515947ab
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Wed Feb 15 14:24:14 2017 +0000
+
+ docs/C_SOURCE_FILES, po/POTFILES: Remove duplicate files.
+
+ Because v2v/test-harness is a subdirectory of v2v, and because both
+ paths are listed in $(DIST_SUBDIRS), using find $(DIST_SUBDIRS) will
+ list files in v2v/test-harness twice. (This probably happens in other
+ directories too, but I noticed it here.) The easiest fix for this is
+ simply to use 'sort -u' to remove the duplicates.
+
+ (cherry picked from commit e46b07ca1bef6c63d742e67f731a6244d75eda6d)
+
+commit 81b2faba4bac802e5d68e97bf1195691401b0b14
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Wed Feb 15 13:44:27 2017 +0000
+
+ Update gnulib to latest.
+
+ (cherry picked from commit 6dcfd85623e9a0dedcae3e9c3ea88af526dc2391)
+
+commit 4585b8822c0516cccc08af717ee7359e04478f3a
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Tue Feb 14 14:52:53 2017 +0000
+
+ GCC 7: Allocate sufficient space for sprintf output.
+
+ GCC 7.0.1 can determine if there is likely to be sufficient space in
+ the output buffer when using sprintf/snprintf, based on the format
+ string.
+
+ The errors were all either of this form:
+
+ bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=]
+ snprintf (strs[i], 16, "%zu", i);
+ ^~~
+ bindtests.c:717:28: note: directive argument in the range [0, 2305843009213693951]
+ snprintf (strs[i], 16, "%zu", i);
+ ^~~~~
+
+ or this form:
+
+ sync.c: In function 'fsync_devices':
+ sync.c:108:50: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 251 [-Werror=format-truncation=]
+ snprintf (dev_path, sizeof dev_path, "/dev/%s", d->d_name);
+ ^~
+
+ Fixed by converting these into dynamic allocation, or making the
+ output buffer larger, whichever was easier.
+
+ There is a gnulib macro we can use to make this simpler for integers.
+ It requires a new gnulib module (intprops), but it turns out that we
+ were already pulling that in through dependencies, so the change to
+ bootstrap is a no-op. (thanks: Dan Berrange)
+
+ (cherry picked from commit a75076f271680122a17614e4721be48e9251b21c)
+
+commit 634b2d62abf0df74992f2f43ecb7b1282caa67e8
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Tue Feb 14 14:51:39 2017 +0000
+
+ GCC 7: Add __attribute__((noreturn)) to some usage functions which call exit.
+
+ This happens with GCC 7.0.1. The errors were all of the form:
+
+ qemu-speed-test.c: In function 'main':
+ qemu-speed-test.c:153:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
+ usage (EXIT_SUCCESS);
+ ^~~~~~~~~~~~~~~~~~~~
+ qemu-speed-test.c:155:5: note: here
+ default:
+ ^~~~~~~
+
+ (cherry picked from commit 0b3a5a0b00bf3f677d570281c0fcf06a54bdeca3)
+
+commit 14753d0f62ba4e20bd391214828a33b15e3eb5cc
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Fri Feb 3 15:08:52 2017 +0000
+
+ lib: g->program is now never the empty string.
+
+ The getprogname module either sets g->program to a string derived from
+ argv[0] or fails at compile time.
+
+ Fixes commit eea210dbf7d781bc253f927977868dbc6776f20d.
+
+ (cherry picked from commit 10a5567dc785cb0b840fcc4fdf2c0b9480857492)
+
+commit 4bd9b4090d899823ef217fdd3894ed3e63a36280
+Author: Richard W.M. Jones <rjones@redhat.com>
+Date: Wed Feb 1 13:36:07 2017 +0000
+
+ v2v: Further increase memory allocated to the appliance (RHBZ#1418283).
+
+ In commit 08f82f2e3d6975b72340dd59f438862e152a15ef we increased the
+ memory size to 800MB (on x86) so that the semodule command would work.
+
+ However it has been discovered that another SELinux command takes
+ large amounts of RAM (setfiles during the SELinux relabel step).
+ Therefore increase the memory size again, this time to 2000MB.
+
+ (cherry picked from commit 2b5173712ba07e3e89926c82a236390a4ea6626a)
+
commit 554abd2dae8f681b1833de88f42069cac1c9589c
Author: Richard W.M. Jones <rjones@redhat.com>
Date: Sun Jan 29 13:35:57 2017 +0000
diff -Nru -w libguestfs-1.34.4/configure.ac libguestfs-1.34.6/configure.ac
--- libguestfs-1.34.4/configure.ac 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/configure.ac 2017-03-08 11:22:35.000000000 +0100
@@ -20,13 +20,13 @@
# freeform string.
m4_define([libguestfs_major], [1])
m4_define([libguestfs_minor], [34])
-m4_define([libguestfs_release], [4])
+m4_define([libguestfs_release], [6])
AC_INIT([libguestfs],libguestfs_major.libguestfs_minor.libguestfs_release)
dnl The date that the above version was released. This is used in
dnl the website 'index.html' file.
-AC_SUBST([RELEASE_DATE], [2016-10-27])
+AC_SUBST([RELEASE_DATE], [2016-03-08])
AC_CONFIG_AUX_DIR([build-aux])
AC_REQUIRE_AUX_FILE([guestfs-test-driver])
diff -Nru -w libguestfs-1.34.4/customize/SELinux_relabel.ml libguestfs-1.34.6/customize/SELinux_relabel.ml
--- libguestfs-1.34.4/customize/SELinux_relabel.ml 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/customize/SELinux_relabel.ml 2017-03-07 15:12:05.000000000 +0100
@@ -44,6 +44,26 @@
let specfile =
sprintf "/etc/selinux/%s/contexts/files/file_contexts" policy in
+ (* RHEL 6.2 - 6.5 had a malformed specfile that contained the
+ * invalid regular expression "/var/run/spice-vdagentd.\pid"
+ * (instead of "\.p"). This stops setfiles from working on
+ * the guest.
+ *
+ * Because an SELinux relabel writes all over the filesystem,
+ * it seems reasonable to fix this problem in the specfile
+ * at the same time. (RHBZ#1374232)
+ *)
+ if g#grep ~fixed:true "vdagentd.\\pid" specfile <> [||] then (
+ debug "fixing invalid regular expression in %s" specfile;
+ let old_specfile = specfile ^ "~" in
+ g#mv specfile old_specfile;
+ let content = g#read_file old_specfile in
+ let content =
+ String.replace content "vdagentd.\\pid" "vdagentd\\.pid" in
+ g#write specfile content;
+ g#copy_attributes ~all:true old_specfile specfile
+ );
+
(* Relabel everything. *)
g#selinux_relabel ~force:true specfile "/";
diff -Nru -w libguestfs-1.34.4/daemon/9p.c libguestfs-1.34.6/daemon/9p.c
--- libguestfs-1.34.4/daemon/9p.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/daemon/9p.c 2017-03-07 14:35:02.000000000 +0100
@@ -71,9 +71,13 @@
if (d == NULL) break;
if (STRPREFIX (d->d_name, "virtio")) {
- char mount_tag_path[256];
- snprintf (mount_tag_path, sizeof mount_tag_path,
- BUS_PATH "/%s/mount_tag", d->d_name);
+ CLEANUP_FREE char *mount_tag_path = NULL;
+ if (asprintf (&mount_tag_path, BUS_PATH "/%s/mount_tag",
+ d->d_name) == -1) {
+ reply_with_perror ("asprintf");
+ closedir (dir);
+ return NULL;
+ }
/* A bit unclear, but it looks like the virtio transport allows
* the mount tag length to be unlimited (or up to 65536 bytes).
diff -Nru -w libguestfs-1.34.4/daemon/btrfs.c libguestfs-1.34.6/daemon/btrfs.c
--- libguestfs-1.34.4/daemon/btrfs.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/daemon/btrfs.c 2017-03-07 15:12:05.000000000 +0100
@@ -2280,7 +2280,8 @@
}
}
- end_stringsbuf (&ret);
+ if (end_stringsbuf (&ret) == -1)
+ return NULL;
return take_stringsbuf (&ret);
}
diff -Nru -w libguestfs-1.34.4/daemon/debug.c libguestfs-1.34.6/daemon/debug.c
--- libguestfs-1.34.4/daemon/debug.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/daemon/debug.c 2017-03-07 14:35:02.000000000 +0100
@@ -161,7 +161,7 @@
FILE *fp;
DIR *dir;
struct dirent *d;
- char fname[256], link[256];
+ char link[256];
struct stat statbuf;
fp = open_memstream (&out, &size);
@@ -178,10 +178,18 @@
}
while ((d = readdir (dir)) != NULL) {
+ CLEANUP_FREE char *fname = NULL;
+
if (STREQ (d->d_name, ".") || STREQ (d->d_name, ".."))
continue;
- snprintf (fname, sizeof fname, "/proc/self/fd/%s", d->d_name);
+ if (asprintf (&fname, "/proc/self/fd/%s", d->d_name) == -1) {
+ reply_with_perror ("asprintf");
+ fclose (fp);
+ free (out);
+ closedir (dir);
+ return NULL;
+ }
r = lstat (fname, &statbuf);
if (r == -1) {
diff -Nru -w libguestfs-1.34.4/daemon/devsparts.c libguestfs-1.34.6/daemon/devsparts.c
--- libguestfs-1.34.4/daemon/devsparts.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/daemon/devsparts.c 2017-03-07 14:35:53.000000000 +0100
@@ -42,7 +42,6 @@
DIR *dir;
int err = 0;
struct dirent *d;
- char dev_path[256];
int fd;
dir = opendir ("/sys/block");
@@ -61,7 +60,12 @@
STREQLEN (d->d_name, "ubd", 3) ||
STREQLEN (d->d_name, "vd", 2) ||
STREQLEN (d->d_name, "sr", 2)) {
- snprintf (dev_path, sizeof dev_path, "/dev/%s", d->d_name);
+ CLEANUP_FREE char *dev_path = NULL;
+ if (asprintf (&dev_path, "/dev/%s", d->d_name) == -1) {
+ reply_with_perror ("asprintf");
+ closedir (dir);
+ return NULL;
+ }
/* Ignore the root device. */
if (is_root_device (dev_path))
@@ -155,8 +159,12 @@
struct dirent *d;
while ((d = readdir (dir)) != NULL) {
if (STREQLEN (d->d_name, device, strlen (device))) {
- char part[256];
- snprintf (part, sizeof part, "/dev/%s", d->d_name);
+ CLEANUP_FREE char *part = NULL;
+ if (asprintf (&part, "/dev/%s", d->d_name) == -1) {
+ perror ("asprintf");
+ closedir (dir);
+ return -1;
+ }
if (add_string (r, part) == -1) {
closedir (dir);
diff -Nru -w libguestfs-1.34.4/daemon/errnostring-gperf.c libguestfs-1.34.6/daemon/errnostring-gperf.c
--- libguestfs-1.34.4/daemon/errnostring-gperf.c 2017-01-29 22:29:14.000000000 +0100
+++ libguestfs-1.34.6/daemon/errnostring-gperf.c 2017-01-28 13:14:51.000000000 +0100
@@ -1,4 +1,4 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
/* Command-line: gperf -t errnostring-gperf.gperf */
/* Computed positions: -k'2-3,5-6' */
@@ -26,7 +26,7 @@
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
-#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
#line 29 "errnostring-gperf.gperf"
@@ -452,7 +452,7 @@
#endif
#endif
static unsigned int
-hash (register const char *str, register unsigned int len)
+hash (register const char *str, register size_t len)
{
static const unsigned short asso_values[] =
{
@@ -483,7 +483,7 @@
361, 361, 361, 361, 361, 361, 361, 361, 361, 361,
361, 361, 361, 361, 361, 361
};
- register int hval = len;
+ register unsigned int hval = len;
switch (hval)
{
@@ -504,14 +504,8 @@
return hval;
}
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const struct errnostring_entry *
-guestfs_int_string_to_errno_lookup (register const char *str, register unsigned int len)
+guestfs_int_string_to_errno_lookup (register const char *str, register size_t len)
{
static const struct errnostring_entry wordlist[] =
{
@@ -866,9 +860,9 @@
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = hash (str, len);
+ register unsigned int key = hash (str, len);
- if (key <= MAX_HASH_VALUE && key >= 0)
+ if (key <= MAX_HASH_VALUE)
{
register const char *s = wordlist[key].name;
diff -Nru -w libguestfs-1.34.4/daemon/inotify.c libguestfs-1.34.6/daemon/inotify.c
--- libguestfs-1.34.4/daemon/inotify.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/daemon/inotify.c 2017-03-07 15:12:05.000000000 +0100
@@ -29,6 +29,9 @@
#include <sys/inotify.h>
#endif
+#include "cloexec.h"
+#include "nonblocking.h"
+
#include "guestfs_protocol.h"
#include "daemon.h"
#include "actions.h"
@@ -112,14 +115,14 @@
reply_with_perror ("inotify_init");
return -1;
}
- if (fcntl (inotify_fd, F_SETFL, O_NONBLOCK) == -1) {
- reply_with_perror ("fcntl: O_NONBLOCK");
+ if (set_nonblocking_flag (inotify_fd, 1) == -1) {
+ reply_with_perror ("set_nonblocking_flag");
close (inotify_fd);
inotify_fd = -1;
return -1;
}
- if (fcntl (inotify_fd, F_SETFD, FD_CLOEXEC) == -1) {
- reply_with_perror ("fcntl: FD_CLOEXEC");
+ if (set_cloexec_flag (inotify_fd, 1) == -1) {
+ reply_with_perror ("set_cloexec_flag");
close (inotify_fd);
inotify_fd = -1;
return -1;
diff -Nru -w libguestfs-1.34.4/daemon/mknod.c libguestfs-1.34.6/daemon/mknod.c
--- libguestfs-1.34.4/daemon/mknod.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/daemon/mknod.c 2017-03-07 15:12:04.000000000 +0100
@@ -25,7 +25,13 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
+
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
+/* else it's in sys/types.h, included above */
+#endif
#include "guestfs_protocol.h"
#include "daemon.h"
diff -Nru -w libguestfs-1.34.4/daemon/parted.c libguestfs-1.34.6/daemon/parted.c
--- libguestfs-1.34.4/daemon/parted.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/daemon/parted.c 2017-03-07 15:12:04.000000000 +0100
@@ -320,6 +320,8 @@
CLEANUP_FREE char *err = NULL;
int r;
+ udev_settle ();
+
if (add_m_option)
r = command (&out, &err, str_parted, "-m", "-s", "--", device,
"unit", "b",
@@ -328,6 +330,9 @@
r = command (&out, &err, str_parted, "-s", "--", device,
"unit", "b",
"print", NULL);
+
+ udev_settle ();
+
if (r == -1) {
int errcode = 0;
@@ -665,6 +670,8 @@
return NULL;
}
+ udev_settle ();
+
CLEANUP_FREE char *err = NULL;
int r = commandf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
str_sgdisk, device, "-i", partnum_str, NULL);
@@ -674,6 +681,8 @@
return NULL;
}
+ udev_settle ();
+
CLEANUP_FREE_STRING_LIST char **lines = split_lines (err);
if (lines == NULL) {
reply_with_error ("'%s %s -i %i' returned no output",
diff -Nru -w libguestfs-1.34.4/daemon/sleuthkit.c libguestfs-1.34.6/daemon/sleuthkit.c
--- libguestfs-1.34.4/daemon/sleuthkit.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/daemon/sleuthkit.c 2017-03-07 15:12:05.000000000 +0100
@@ -122,7 +122,7 @@
/* Send reply message before the file content. */
reply (NULL, NULL);
- while ((ret = fread (buffer, 1, sizeof buffer, fp)) > 0) {
+ while ((ret = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
ret = send_file_write (buffer, ret);
if (ret < 0) {
pclose (fp);
diff -Nru -w libguestfs-1.34.4/daemon/sync.c libguestfs-1.34.6/daemon/sync.c
--- libguestfs-1.34.4/daemon/sync.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/daemon/sync.c 2017-03-07 14:35:02.000000000 +0100
@@ -86,7 +86,6 @@
{
DIR *dir;
struct dirent *d;
- char dev_path[256];
int fd;
dir = opendir ("/sys/block");
@@ -105,7 +104,11 @@
STREQLEN (d->d_name, "ubd", 3) ||
STREQLEN (d->d_name, "vd", 2) ||
STREQLEN (d->d_name, "sr", 2)) {
- snprintf (dev_path, sizeof dev_path, "/dev/%s", d->d_name);
+ CLEANUP_FREE char *dev_path = NULL;
+ if (asprintf (&dev_path, "/dev/%s", d->d_name) == -1) {
+ perror ("asprintf");
+ continue;
+ }
/* Ignore the root device. */
if (is_root_device (dev_path))
diff -Nru -w libguestfs-1.34.4/debian/changelog libguestfs-1.34.6/debian/changelog
--- libguestfs-1.34.4/debian/changelog 2017-01-31 23:53:16.000000000 +0100
+++ libguestfs-1.34.6/debian/changelog 2017-03-09 10:14:14.000000000 +0100
@@ -1,3 +1,9 @@
+libguestfs (1:1.34.6-1) unstable; urgency=medium
+
+ * New upstream version
+
+ -- Hilko Bengen <bengen@debian.org> Thu, 09 Mar 2017 10:14:14 +0100
+
libguestfs (1:1.34.4-1) unstable; urgency=medium
* New upstream version
diff -Nru -w libguestfs-1.34.4/diff/diff.c libguestfs-1.34.6/diff/diff.c
--- libguestfs-1.34.4/diff/diff.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/diff/diff.c 2017-03-07 15:12:04.000000000 +0100
@@ -32,7 +32,14 @@
#include <time.h>
#include <libintl.h>
#include <sys/wait.h>
+
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
+#else
+#include <sys/types.h>
+#endif
#include "c-ctype.h"
#include "human.h"
diff -Nru -w libguestfs-1.34.4/docs/guestfs-security.pod libguestfs-1.34.6/docs/guestfs-security.pod
--- libguestfs-1.34.4/docs/guestfs-security.pod 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/docs/guestfs-security.pod 2017-03-07 15:12:05.000000000 +0100
@@ -351,6 +351,28 @@
OCaml compiler where this bug has been fixed (or ask your Linux distro
to do the same).
+=head2 CVE-2017-5208, CVE-2017-5331, CVE-2017-5332, CVE-2017-5333,
+CVE-2017-6009, CVE-2017-6010, CVE-2017-6011
+
+Multiple vulnerabilities in the L<wrestool(1)> program in the
+C<icoutils> package can be exploited for local code execution on the
+host.
+
+When libguestfs inspection (see L</Inspection security> above) detects
+a Windows XP or Windows 7 guest and is asked to find an associated
+icon for the guest, it will download an untrusted file from the guest
+and run C<wrestool -x> on that file. This can lead to local code
+execution on the host. Any disk image or guest can be crafted to look
+like a Windows guest to libguestfs inspection, so just because you do
+not have Windows guests does not help.
+
+Any program calling the libguestfs API C<guestfs_inspect_get_icon>
+could be vulnerable. This includes L<virt-inspector(1)> and
+L<virt-manager(1)>.
+
+The solution is to update to the non-vulnerable version of icoutils
+(at least 0.31.1).
+
=head1 SEE ALSO
L<guestfs(3)>,
diff -Nru -w libguestfs-1.34.4/fish/cmds-gperf.c libguestfs-1.34.6/fish/cmds-gperf.c
--- libguestfs-1.34.4/fish/cmds-gperf.c 2017-01-29 22:38:13.000000000 +0100
+++ libguestfs-1.34.6/fish/cmds-gperf.c 2017-01-28 14:26:15.000000000 +0100
@@ -1,4 +1,4 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
/* Command-line: gperf -t cmds-gperf.gperf */
/* Computed positions: -k'1-12,14,17,$' */
@@ -26,7 +26,7 @@
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
-#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
#line 30 "cmds-gperf.gperf"
@@ -688,7 +688,7 @@
#endif
#endif
static unsigned int
-hash (register const char *str, register unsigned int len)
+hash (register const char *str, register size_t len)
{
static const unsigned short asso_values[] =
{
@@ -719,7 +719,7 @@
9163, 9163, 9163, 9163, 9163, 9163, 9163, 9163, 9163, 9163,
9163, 9163, 9163, 9163, 9163, 9163, 9163
};
- register int hval = len;
+ register unsigned int hval = len;
switch (hval)
{
@@ -772,14 +772,8 @@
return hval + asso_values[(unsigned char)str[len - 1]];
}
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const struct command_table *
-lookup_fish_command (register const char *str, register unsigned int len)
+lookup_fish_command (register const char *str, register size_t len)
{
static const struct command_table wordlist[] =
{
@@ -5316,9 +5310,9 @@
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = hash (str, len);
+ register unsigned int key = hash (str, len);
- if (key <= MAX_HASH_VALUE && key >= 0)
+ if (key <= MAX_HASH_VALUE)
{
register const char *s = wordlist[key].name;
diff -Nru -w libguestfs-1.34.4/fish/rc.c libguestfs-1.34.6/fish/rc.c
--- libguestfs-1.34.4/fish/rc.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/fish/rc.c 2017-03-07 15:12:05.000000000 +0100
@@ -101,14 +101,13 @@
int fd;
char buf[1];
+ memset (&msg, 0, sizeof msg);
+
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
iov.iov_base = buf;
iov.iov_len = sizeof buf;
- msg.msg_name = NULL;
- msg.msg_namelen = 0;
-
msg.msg_control = control_un.control;
msg.msg_controllen = sizeof (control_un.control);
@@ -163,6 +162,7 @@
* It's unclear if this is hiding a real problem or not. XXX
*/
memset (&control_un, 0, sizeof control_un);
+ memset (&msg, 0, sizeof msg);
/* On Linux you have to transmit at least 1 byte of real data. */
msg.msg_iov = &iov;
@@ -171,9 +171,6 @@
iov.iov_base = buf;
iov.iov_len = sizeof buf;
- msg.msg_name = NULL;
- msg.msg_namelen = 0;
-
msg.msg_control = control_un.control;
msg.msg_controllen = sizeof (control_un.control);
diff -Nru -w libguestfs-1.34.4/fuse/test-guestunmount-fd.c libguestfs-1.34.6/fuse/test-guestunmount-fd.c
--- libguestfs-1.34.4/fuse/test-guestunmount-fd.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/fuse/test-guestunmount-fd.c 2017-03-07 15:12:05.000000000 +0100
@@ -32,6 +32,7 @@
#include <sys/types.h>
#include <sys/wait.h>
+#include "cloexec.h"
#include "ignore-value.h"
#include "guestfs.h"
@@ -77,7 +78,7 @@
/* Parent continues. */
close (pipefd[0]);
- ignore_value (fcntl (pipefd[1], F_SETFD, FD_CLOEXEC));
+ ignore_value (set_cloexec_flag (pipefd[1], 1));
/* Sleep a bit and test that the guestunmount process is still running. */
sleep (2);
diff -Nru -w libguestfs-1.34.4/generator/actions.ml libguestfs-1.34.6/generator/actions.ml
--- libguestfs-1.34.4/generator/actions.ml 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/generator/actions.ml 2017-03-07 14:49:30.000000000 +0100
@@ -3145,8 +3145,8 @@
main program may optionally set in the handle.
When the handle is created, the program name in the handle is
-set to the basename from C<argv[0]>. If that was not possible,
-it is set to the empty string (but never C<NULL>)." };
+set to the basename from C<argv[0]>. The program name can never
+be C<NULL>." };
{ defaults with
name = "get_program"; added = (1, 21, 29);
diff -Nru -w libguestfs-1.34.4/generator/bindtests.ml libguestfs-1.34.6/generator/bindtests.ml
--- libguestfs-1.34.4/generator/bindtests.ml 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/generator/bindtests.ml 2017-03-07 14:35:02.000000000 +0100
@@ -47,6 +47,8 @@
#include \"guestfs-internal-actions.h\"
#include \"guestfs_protocol.h\"
+#include \"intprops.h\"
+
int
guestfs_impl_internal_test_set_output (guestfs_h *g, const char *filename)
{
@@ -257,8 +259,8 @@
pr " }\n";
pr " strs = safe_malloc (g, (n+1) * sizeof (char *));\n";
pr " for (i = 0; i < n; ++i) {\n";
- pr " strs[i] = safe_malloc (g, 16);\n";
- pr " snprintf (strs[i], 16, \"%%zu\", i);\n";
+ pr " strs[i] = safe_malloc (g, INT_BUFSIZE_BOUND (i));\n";
+ pr " snprintf (strs[i], INT_BUFSIZE_BOUND (i), \"%%zu\", i);\n";
pr " }\n";
pr " strs[n] = NULL;\n";
pr " return strs;\n"
@@ -289,10 +291,10 @@
pr " }\n";
pr " strs = safe_malloc (g, (n*2+1) * sizeof (*strs));\n";
pr " for (i = 0; i < n; ++i) {\n";
- pr " strs[i*2] = safe_malloc (g, 16);\n";
- pr " strs[i*2+1] = safe_malloc (g, 16);\n";
- pr " snprintf (strs[i*2], 16, \"%%zu\", i);\n";
- pr " snprintf (strs[i*2+1], 16, \"%%zu\", i);\n";
+ pr " strs[i*2] = safe_malloc (g, INT_BUFSIZE_BOUND (i));\n";
+ pr " strs[i*2+1] = safe_malloc (g, INT_BUFSIZE_BOUND (i));\n";
+ pr " snprintf (strs[i*2], INT_BUFSIZE_BOUND (i), \"%%zu\", i);\n";
+ pr " snprintf (strs[i*2+1], INT_BUFSIZE_BOUND (i), \"%%zu\", i);\n";
pr " }\n";
pr " strs[n*2] = NULL;\n";
pr " return strs;\n"
diff -Nru -w libguestfs-1.34.4/generator/erlang.ml libguestfs-1.34.6/generator/erlang.ml
--- libguestfs-1.34.4/generator/erlang.ml 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/generator/erlang.ml 2017-03-07 15:12:04.000000000 +0100
@@ -191,7 +191,7 @@
extern guestfs_h *g;
-extern ETERM *dispatch (ETERM *message);
+extern ETERM *dispatch (ETERM *args_tuple);
extern int atom_equals (ETERM *atom, const char *name);
extern ETERM *make_error (const char *funname);
extern ETERM *unknown_optarg (const char *funname, ETERM *optargname);
@@ -204,7 +204,7 @@
extern int get_int (ETERM *term);
extern int64_t get_int64 (ETERM *term);
-#define ARG(i) (ERL_TUPLE_ELEMENT(message,(i)+1))
+#define ARG(i) (ERL_TUPLE_ELEMENT(args_tuple,(i)+1))
";
@@ -228,7 +228,7 @@
List.iter (
fun { name = name } ->
- pr "ETERM *run_%s (ETERM *message);\n" name
+ pr "ETERM *run_%s (ETERM *args_tuple);\n" name
) (actions |> external_functions |> sort);
pr "\n";
@@ -354,7 +354,7 @@
c_function = c_function; c_optarg_prefix = c_optarg_prefix } ->
pr "\n";
pr "ETERM *\n";
- pr "run_%s (ETERM *message)\n" name;
+ pr "run_%s (ETERM *args_tuple)\n" name;
pr "{\n";
iteri (
@@ -545,11 +545,11 @@
#include \"actions.h\"
ETERM *
-dispatch (ETERM *message)
+dispatch (ETERM *args_tuple)
{
ETERM *fun;
- fun = ERL_TUPLE_ELEMENT (message, 0);
+ fun = ERL_TUPLE_ELEMENT (args_tuple, 0);
/* XXX We should use gperf here. */
";
@@ -557,7 +557,7 @@
List.iter (
fun { name = name; style = ret, args, optargs } ->
pr "if (atom_equals (fun, \"%s\"))\n" name;
- pr " return run_%s (message);\n" name;
+ pr " return run_%s (args_tuple);\n" name;
pr " else ";
) (actions |> external_functions |> sort);
diff -Nru -w libguestfs-1.34.4/generator/java.ml libguestfs-1.34.6/generator/java.ml
--- libguestfs-1.34.4/generator/java.ml 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/generator/java.ml 2017-03-08 11:20:44.000000000 +0100
@@ -684,13 +684,15 @@
pr " jobject jr;\n";
pr " jclass cl;\n";
pr " jfieldID fl;\n";
- pr " struct guestfs_%s *r;\n" typ
+ pr " CLEANUP_FREE_%s struct guestfs_%s *r = NULL;\n"
+ (String.uppercase typ) typ
| RStructList (_, typ) ->
pr " jobjectArray jr;\n";
pr " jclass cl;\n";
pr " jfieldID fl;\n";
pr " jobject jfl;\n";
- pr " struct guestfs_%s_list *r;\n" typ
+ pr " CLEANUP_FREE_%s_LIST struct guestfs_%s_list *r = NULL;\n"
+ (String.uppercase typ) typ
| RBufferOut _ ->
pr " jstring jr;\n";
pr " char *r;\n";
@@ -713,7 +715,7 @@
pr " size_t %s_size;\n" n
| StringList n | DeviceList n | FilenameList n ->
pr " size_t %s_len;\n" n;
- pr " char **%s;\n" n
+ pr " CLEANUP_FREE char **%s = NULL;\n" n
| Bool n
| Int n ->
pr " int %s;\n" n
@@ -732,7 +734,7 @@
| OBool _ | OInt _ | OInt64 _ | OString _ -> ()
| OStringList n ->
pr " size_t %s_len;\n" n;
- pr " char **%s;\n" n
+ pr " CLEANUP_FREE char **%s = NULL;\n" n
) optargs
);
@@ -855,7 +857,6 @@
n;
pr " (*env)->ReleaseStringUTFChars (env, o, %s[i]);\n" n;
pr " }\n";
- pr " free (%s);\n" n
| Bool _
| Int _
| Int64 _
@@ -873,7 +874,6 @@
n;
pr " (*env)->ReleaseStringUTFChars (env, o, optargs_s.%s[i]);\n" n;
pr " }\n";
- pr " free (%s);\n" n
) optargs;
pr "\n";
@@ -998,7 +998,6 @@
pr " fl = (*env)->GetFieldID (env, cl, \"%s\", \"C\");\n" name;
pr " (*env)->SetCharField (env, jr, fl, r->%s);\n" name;
) cols;
- pr " guestfs_free_%s (r);\n" typ;
pr " return jr;\n"
and generate_java_struct_list_return typ jtyp cols =
@@ -1036,7 +1035,7 @@
| FBuffer ->
pr " {\n";
pr " size_t len = r->val[i].%s_len;\n" name;
- pr " CLEANUP_FREE char *s = malloc (len);\n";
+ pr " CLEANUP_FREE char *s = malloc (len + 1);\n";
pr " if (s == NULL) {\n";
pr " throw_out_of_memory (env, \"malloc\");\n";
pr " goto ret_error;\n";
@@ -1059,7 +1058,6 @@
pr " (*env)->SetObjectArrayElement (env, jr, i, jfl);\n";
pr " }\n";
pr "\n";
- pr " guestfs_free_%s_list (r);\n" typ;
pr " return jr;\n"
and generate_java_makefile_inc () =
diff -Nru -w libguestfs-1.34.4/java/handle.c libguestfs-1.34.6/java/handle.c
--- libguestfs-1.34.4/java/handle.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/java/handle.c 2017-03-07 15:12:05.000000000 +0100
@@ -85,7 +85,7 @@
(JNIEnv *env, jobject obj, jlong jg)
{
guestfs_h *g = (guestfs_h *) (long) jg;
- size_t len, i;
+ size_t len;
struct callback_data **data;
/* There is a nasty, difficult to solve case here where the
@@ -96,12 +96,15 @@
guestfs_close (g);
+ if (len > 0) {
+ size_t i;
for (i = 0; i < len; ++i) {
(*env)->DeleteGlobalRef (env, data[i]->callback);
free (data[i]);
}
free (data);
}
+}
/* See EventCallback interface. */
#define METHOD_NAME "event"
@@ -274,6 +277,10 @@
data = guestfs_next_private (g, &key);
}
+ /* No events, so no need to allocate anything. */
+ if (*len_rtn == 0)
+ return NULL;
+
/* Copy them into the return array. */
r = malloc (sizeof (struct callback_data *) * (*len_rtn));
if (r == NULL) {
diff -Nru -w libguestfs-1.34.4/java/Makefile.am libguestfs-1.34.6/java/Makefile.am
--- libguestfs-1.34.4/java/Makefile.am 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/java/Makefile.am 2017-03-07 15:12:04.000000000 +0100
@@ -114,7 +114,9 @@
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
$(JNI_CFLAGS)
-libguestfs_jni_la_LIBADD = $(top_builddir)/src/libguestfs.la
+libguestfs_jni_la_LIBADD = \
+ $(top_builddir)/src/libutils.la \
+ $(top_builddir)/src/libguestfs.la
libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO) -shared
diff -Nru -w libguestfs-1.34.4/m4/.gitignore libguestfs-1.34.6/m4/.gitignore
--- libguestfs-1.34.4/m4/.gitignore 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/m4/.gitignore 2017-03-07 15:12:05.000000000 +0100
@@ -7,6 +7,7 @@
/asm-underscore.m4
/base64.m4
/btowc.m4
+/builtin-expect.m4
/byteswap.m4
/canonicalize-lgpl.m4
/chdir-long.m4
@@ -40,6 +41,7 @@
/exponentd.m4
/extensions.m4
/extern-inline.m4
+/fatal-signal.m4
/fchdir.m4
/fclose.m4
/fcntl_h.m4
@@ -74,6 +76,7 @@
/getdtablesize.m4
/getgroups.m4
/getline.m4
+/getlogin.m4
/getlogin_r.m4
/getopt.m4
/getpagesize.m4
@@ -104,6 +107,7 @@
/ioctl.m4
/i-ring.m4
/isatty.m4
+/isblank.m4
/isc-posix.m4
/langinfo_h.m4
/largefile.m4
@@ -112,6 +116,7 @@
/lib-ld.m4
/lib-link.m4
/lib-prefix.m4
+/limits-h.m4
/localcharset.m4
/localeconv.m4
/locale-fr.m4
@@ -139,6 +144,7 @@
/mempcpy.m4
/memrchr.m4
/mgetgroups.m4
+/minmax.m4
/mkdir.m4
/mkdtemp.m4
/mkstemps.m4
@@ -151,6 +157,7 @@
/netdb_h.m4
/netinet_in_h.m4
/nocrash.m4
+/nonblocking.m4
/off_t.m4
/onceonly.m4
/openat.m4
@@ -160,9 +167,11 @@
/perror.m4
/pipe2.m4
/pipe.m4
+/posix_spawn.m4
/pread.m4
/printf.m4
/priv-set.m4
+/pthread_rwlock_rdlock.m4
/ptsname_r.m4
/putenv.m4
/quotearg.m4
@@ -180,12 +189,14 @@
/safe-read.m4
/safe-write.m4
/save-cwd.m4
+/sched_h.m4
/secure_getenv.m4
/select.m4
/servent.m4
/setenv.m4
/setlocale.m4
/sigaction.m4
+/sig_atomic_t.m4
/signalblocking.m4
/signal_h.m4
/signed.m4
@@ -196,6 +207,7 @@
/sockets.m4
/socklen.m4
/sockpfaf.m4
+/spawn_h.m4
/ssize_t.m4
/stat.m4
/stat-time.m4
@@ -243,12 +255,16 @@
/unlinkat.m4
/unlinkdir.m4
/unlink.m4
+/usleep.m4
/utimbuf.m4
/utimecmp.m4
/utimens.m4
/utimes.m4
/vasnprintf.m4
/vasprintf.m4
+/vsnprintf.m4
+/waitpid.m4
+/wait-process.m4
/warnings.m4
/warn-on-use.m4
/wchar_h.m4
diff -Nru -w libguestfs-1.34.4/Makefile.am libguestfs-1.34.6/Makefile.am
--- libguestfs-1.34.4/Makefile.am 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/Makefile.am 2017-03-07 15:12:04.000000000 +0100
@@ -312,7 +312,7 @@
grep -v -E '/(guestfs|rc)_protocol\.' | \
grep -v -E '.*/errnostring\.' | \
grep -v -E '.*-gperf\.' | \
- LC_ALL=C sort > $@-t
+ LC_ALL=C sort -u > $@-t
mv $@-t $@
# For more information about translations, see po/Makefile.am.
@@ -324,7 +324,7 @@
grep -v -E '/((guestfs|rc)_protocol\.c)$$' | \
grep -v -E '^python/utils\.c$$' | \
grep -v -E '^perl/lib/Sys/Guestfs\.c$$' | \
- LC_ALL=C sort > $@-t
+ LC_ALL=C sort -u > $@-t
mv $@-t $@
po/POTFILES-ml: configure.ac
diff -Nru -w libguestfs-1.34.4/mllib/dev_t-c.c libguestfs-1.34.6/mllib/dev_t-c.c
--- libguestfs-1.34.4/mllib/dev_t-c.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/mllib/dev_t-c.c 2017-03-07 15:12:04.000000000 +0100
@@ -21,7 +21,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
+
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
+/* else it's in sys/types.h, included above */
+#endif
#include <caml/mlvalues.h>
diff -Nru -w libguestfs-1.34.4/ocaml/guestfs-c.c libguestfs-1.34.6/ocaml/guestfs-c.c
--- libguestfs-1.34.4/ocaml/guestfs-c.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/ocaml/guestfs-c.c 2017-03-07 15:12:05.000000000 +0100
@@ -75,7 +75,7 @@
* user deletes events in one of the callbacks that we are
* about to invoke, resulting in a double-free. XXX
*/
- size_t len, i;
+ size_t len;
value **roots = get_all_event_callbacks (g, &len);
/* Close the handle: this could invoke callbacks from the list
@@ -85,6 +85,8 @@
guestfs_close (g);
/* Now unregister the global roots. */
+ if (len > 0) {
+ size_t i;
for (i = 0; i < len; ++i) {
caml_remove_generational_global_root (roots[i]);
free (roots[i]);
@@ -92,6 +94,7 @@
free (roots);
}
}
+}
static struct custom_operations guestfs_custom_operations = {
(char *) "guestfs_custom_operations",
@@ -310,6 +313,10 @@
root = guestfs_next_private (g, &key);
}
+ /* No events, so no need to allocate anything. */
+ if (*len_rtn == 0)
+ return NULL;
+
/* Copy them into the return array. */
r = malloc (sizeof (value *) * (*len_rtn));
if (r == NULL) caml_raise_out_of_memory ();
diff -Nru -w libguestfs-1.34.4/p2v/main.c libguestfs-1.34.6/p2v/main.c
--- libguestfs-1.34.4/p2v/main.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/p2v/main.c 2017-03-07 15:12:04.000000000 +0100
@@ -32,7 +32,13 @@
#include <libintl.h>
#include <sys/types.h>
#include <sys/stat.h>
+
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
+/* else it's in sys/types.h, included above */
+#endif
/* errors in <gtk.h> */
#pragma GCC diagnostic push
diff -Nru -w libguestfs-1.34.4/p2v/Makefile.am libguestfs-1.34.6/p2v/Makefile.am
--- libguestfs-1.34.4/p2v/Makefile.am 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/p2v/Makefile.am 2017-03-07 15:12:04.000000000 +0100
@@ -299,7 +299,7 @@
test-virt-p2v-pxe.authorized_keys: test-virt-p2v-pxe.id_rsa.pub $(top_builddir)/run
rm -f $@ $@-t
- $(top_builddir)/run sh -c 'echo -n environment=\"PATH=$$PATH\",environment=\"LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs\"\ ' > $@-t
+ $(top_builddir)/run sh -c 'echo -n environment=\"PATH=$$PATH\",environment=\"LD_LIBRARY_PATH=$(abs_top_builddir)/src/.libs\",environment=\"LIBGUESTFS_PATH=$(abs_top_builddir)/appliance\",environment=\"LIBGUESTFS_CACHEDIR=$(abs_top_builddir)/tmp\"\ ' > $@-t
cat $< >> $@-t
mv $@-t $@
diff -Nru -w libguestfs-1.34.4/python/handle.c libguestfs-1.34.6/python/handle.c
--- libguestfs-1.34.4/python/handle.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/python/handle.c 2017-03-07 15:12:05.000000000 +0100
@@ -71,7 +71,7 @@
PyThreadState *py_save = NULL;
PyObject *py_g;
guestfs_h *g;
- size_t i, len;
+ size_t len;
PyObject **callbacks;
if (!PyArg_ParseTuple (args, (char *) "O:guestfs_close", &py_g))
@@ -81,9 +81,14 @@
/* As in the OCaml bindings, there is a hard to solve case where the
* caller can delete a callback from within the callback, resulting
* in a double-free here. XXX
+ *
+ * Take care of the result of get_all_event_callbacks: NULL can be
+ * both an error (and some PyErr_* was called), and no events.
+ * 'len' is specifically 0 only in the latter case, so filter that
+ * out.
*/
callbacks = get_all_event_callbacks (g, &len);
- if (callbacks == NULL)
+ if (len != 0 && callbacks == NULL)
return NULL;
if (PyEval_ThreadsInitialized ())
@@ -92,9 +97,12 @@
if (PyEval_ThreadsInitialized ())
PyEval_RestoreThread (py_save);
+ if (len > 0) {
+ size_t i;
for (i = 0; i < len; ++i)
Py_XDECREF (callbacks[i]);
free (callbacks);
+ }
Py_INCREF (Py_None);
return Py_None;
@@ -260,6 +268,10 @@
cb = guestfs_next_private (g, &key);
}
+ /* No events, so no need to allocate anything. */
+ if (*len_rtn == 0)
+ return NULL;
+
/* Copy them into the return array. */
r = malloc (sizeof (PyObject *) * (*len_rtn));
if (r == NULL) {
diff -Nru -w libguestfs-1.34.4/ruby/ext/guestfs/handle.c libguestfs-1.34.6/ruby/ext/guestfs/handle.c
--- libguestfs-1.34.4/ruby/ext/guestfs/handle.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/ruby/ext/guestfs/handle.c 2017-03-07 15:12:05.000000000 +0100
@@ -54,7 +54,7 @@
* the callbacks that we are about to invoke, resulting in
* a double-free. XXX
*/
- size_t len, i;
+ size_t len;
VALUE **roots = get_all_event_callbacks (g, &len);
/* Close the handle: this could invoke callbacks from the list
@@ -64,6 +64,8 @@
guestfs_close (g);
/* Now unregister the global roots. */
+ if (len > 0) {
+ size_t i;
for (i = 0; i < len; ++i) {
rb_gc_unregister_address (roots[i]);
free (roots[i]);
@@ -71,6 +73,7 @@
free (roots);
}
}
+}
/* This is the ruby internal alloc function for the class. We do nothing
* here except allocate an object containing a NULL guestfs handle.
@@ -384,6 +387,10 @@
root = guestfs_next_private (g, &key);
}
+ /* No events, so no need to allocate anything. */
+ if (*len_rtn == 0)
+ return NULL;
+
/* Copy them into the return array. */
r = malloc (sizeof (VALUE *) * (*len_rtn));
if (r == NULL)
diff -Nru -w libguestfs-1.34.4/ruby/t/tc_800_rhbz507346.rb libguestfs-1.34.6/ruby/t/tc_800_rhbz507346.rb
--- libguestfs-1.34.4/ruby/t/tc_800_rhbz507346.rb 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/ruby/t/tc_800_rhbz507346.rb 2017-03-07 15:12:04.000000000 +0100
@@ -20,12 +20,10 @@
class Test800RHBZ507346 < MiniTest::Unit::TestCase
def test_800_rhbz507346
g = Guestfs::Guestfs.new()
- g.add_drive_scratch(10*1024*1024)
- g.launch()
-
exception = assert_raises TypeError do
- g.command(1)
+ g.parse_environment_list(1)
end
- assert_match /wrong argument type Fixnum \(expected Array\)/, exception.message
+ assert_match(/wrong argument type .* \(expected Array\)/,
+ exception.message)
end
end
diff -Nru -w libguestfs-1.34.4/src/conn-socket.c libguestfs-1.34.6/src/conn-socket.c
--- libguestfs-1.34.4/src/conn-socket.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/src/conn-socket.c 2017-03-07 15:12:05.000000000 +0100
@@ -37,6 +37,7 @@
#include <libintl.h>
#include "ignore-value.h"
+#include "nonblocking.h"
#include "guestfs.h"
#include "guestfs-internal.h"
@@ -129,8 +130,8 @@
conn->daemon_sock = sock;
/* Make sure the new socket is non-blocking. */
- if (fcntl (conn->daemon_sock, F_SETFL, O_NONBLOCK) == -1) {
- perrorf (g, "accept_connection: fcntl");
+ if (set_nonblocking_flag (conn->daemon_sock, 1) == -1) {
+ perrorf (g, "accept_connection: set_nonblocking_flag");
return -1;
}
@@ -438,14 +439,14 @@
assert (daemon_accept_sock >= 0);
- if (fcntl (daemon_accept_sock, F_SETFL, O_NONBLOCK) == -1) {
- perrorf (g, "new_conn_socket_listening: fcntl");
+ if (set_nonblocking_flag (daemon_accept_sock, 1) == -1) {
+ perrorf (g, "new_conn_socket_listening: set_nonblocking_flag");
return NULL;
}
if (console_sock >= 0) {
- if (fcntl (console_sock, F_SETFL, O_NONBLOCK) == -1) {
- perrorf (g, "new_conn_socket_listening: fcntl");
+ if (set_nonblocking_flag (console_sock, 1) == -1) {
+ perrorf (g, "new_conn_socket_listening: set_nonblocking_flag");
return NULL;
}
}
@@ -478,14 +479,14 @@
assert (daemon_sock >= 0);
- if (fcntl (daemon_sock, F_SETFL, O_NONBLOCK) == -1) {
- perrorf (g, "new_conn_socket_connected: fcntl");
+ if (set_nonblocking_flag (daemon_sock, 1) == -1) {
+ perrorf (g, "new_conn_socket_connected: set_nonblocking_flag");
return NULL;
}
if (console_sock >= 0) {
- if (fcntl (console_sock, F_SETFL, O_NONBLOCK) == -1) {
- perrorf (g, "new_conn_socket_connected: fcntl");
+ if (set_nonblocking_flag (console_sock, 1) == -1) {
+ perrorf (g, "new_conn_socket_connected: set_nonblocking_flag");
return NULL;
}
}
diff -Nru -w libguestfs-1.34.4/src/errnostring-gperf.c libguestfs-1.34.6/src/errnostring-gperf.c
--- libguestfs-1.34.4/src/errnostring-gperf.c 2017-01-29 22:29:02.000000000 +0100
+++ libguestfs-1.34.6/src/errnostring-gperf.c 2017-01-28 13:14:24.000000000 +0100
@@ -1,4 +1,4 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
/* Command-line: gperf -t errnostring-gperf.gperf */
/* Computed positions: -k'2-3,5-6' */
@@ -26,7 +26,7 @@
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
-#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
#line 29 "errnostring-gperf.gperf"
@@ -452,7 +452,7 @@
#endif
#endif
static unsigned int
-hash (register const char *str, register unsigned int len)
+hash (register const char *str, register size_t len)
{
static const unsigned short asso_values[] =
{
@@ -483,7 +483,7 @@
361, 361, 361, 361, 361, 361, 361, 361, 361, 361,
361, 361, 361, 361, 361, 361
};
- register int hval = len;
+ register unsigned int hval = len;
switch (hval)
{
@@ -504,14 +504,8 @@
return hval;
}
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const struct errnostring_entry *
-guestfs_int_string_to_errno_lookup (register const char *str, register unsigned int len)
+guestfs_int_string_to_errno_lookup (register const char *str, register size_t len)
{
static const struct errnostring_entry wordlist[] =
{
@@ -866,9 +860,9 @@
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = hash (str, len);
+ register unsigned int key = hash (str, len);
- if (key <= MAX_HASH_VALUE && key >= 0)
+ if (key <= MAX_HASH_VALUE)
{
register const char *s = wordlist[key].name;
diff -Nru -w libguestfs-1.34.4/src/fuse.c libguestfs-1.34.6/src/fuse.c
--- libguestfs-1.34.4/src/fuse.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/src/fuse.c 2017-03-07 15:12:04.000000000 +0100
@@ -26,7 +26,13 @@
#include <sys/wait.h>
#include <string.h>
#include <libintl.h>
+
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
+/* else it's in sys/types.h, included above */
+#endif
#if HAVE_FUSE
/* See <attr/xattr.h> */
diff -Nru -w libguestfs-1.34.4/src/qemu.c libguestfs-1.34.6/src/qemu.c
--- libguestfs-1.34.4/src/qemu.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/src/qemu.c 2017-03-07 15:12:05.000000000 +0100
@@ -80,7 +80,6 @@
struct stat statbuf;
CLEANUP_FREE char *cachedir = NULL, *qemu_stat_filename = NULL,
*qemu_help_filename = NULL, *qemu_devices_filename = NULL;
- FILE *fp;
int generation;
uint64_t prev_size, prev_mtime;
@@ -101,15 +100,16 @@
debug (g, "checking for previously cached test results of %s, in %s",
g->hv, cachedir);
+ {
+ CLEANUP_FCLOSE FILE *fp = NULL;
fp = fopen (qemu_stat_filename, "r");
if (fp == NULL)
goto do_test;
if (fscanf (fp, "%d %" SCNu64 " %" SCNu64,
&generation, &prev_size, &prev_mtime) != 3) {
- fclose (fp);
goto do_test;
}
- fclose (fp);
+ }
if (generation == MEMO_GENERATION &&
(uint64_t) statbuf.st_size == prev_size &&
@@ -153,40 +153,41 @@
/* Now memoize the qemu output in the cache directory. */
debug (g, "saving test results");
+ {
+ CLEANUP_FCLOSE FILE *fp = NULL;
fp = fopen (qemu_help_filename, "w");
if (fp == NULL) {
help_error:
perrorf (g, "%s", qemu_help_filename);
- if (fp != NULL) fclose (fp);
guestfs_int_free_qemu_data (data);
return NULL;
}
if (fprintf (fp, "%s", data->qemu_help) == -1)
goto help_error;
- if (fclose (fp) == -1)
- goto help_error;
+ }
+ {
+ CLEANUP_FCLOSE FILE *fp = NULL;
fp = fopen (qemu_devices_filename, "w");
if (fp == NULL) {
devices_error:
perrorf (g, "%s", qemu_devices_filename);
- if (fp != NULL) fclose (fp);
guestfs_int_free_qemu_data (data);
return NULL;
}
if (fprintf (fp, "%s", data->qemu_devices) == -1)
goto devices_error;
- if (fclose (fp) == -1)
- goto devices_error;
+ }
+ {
/* Write the qemu.stat file last so that its presence indicates that
* the qemu.help and qemu.devices files ought to exist.
*/
+ CLEANUP_FCLOSE FILE *fp = NULL;
fp = fopen (qemu_stat_filename, "w");
if (fp == NULL) {
stat_error:
perrorf (g, "%s", qemu_stat_filename);
- if (fp != NULL) fclose (fp);
guestfs_int_free_qemu_data (data);
return NULL;
}
@@ -199,8 +200,7 @@
(uint64_t) statbuf.st_mtime,
g->hv) == -1)
goto stat_error;
- if (fclose (fp) == -1)
- goto stat_error;
+ }
return data;
}
diff -Nru -w libguestfs-1.34.4/tests/c-api/test-user-cancel.c libguestfs-1.34.6/tests/c-api/test-user-cancel.c
--- libguestfs-1.34.4/tests/c-api/test-user-cancel.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/tests/c-api/test-user-cancel.c 2017-03-07 15:12:05.000000000 +0100
@@ -45,6 +45,8 @@
#include <pthread.h>
+#include "cloexec.h"
+
#include "guestfs.h"
#include "guestfs-internal-frontend.h"
@@ -102,9 +104,9 @@
error (EXIT_FAILURE, errno, "pipe");
/* We don't want the pipe to be passed to subprocesses. */
- if (fcntl (fds[0], F_SETFD, FD_CLOEXEC) == -1 ||
- fcntl (fds[1], F_SETFD, FD_CLOEXEC) == -1)
- error (EXIT_FAILURE, errno, "fcntl");
+ if (set_cloexec_flag (fds[0], 1) == -1 ||
+ set_cloexec_flag (fds[1], 1) == -1)
+ error (EXIT_FAILURE, errno, "set_cloexec_flag");
data.fd = fds[1];
snprintf (dev_fd, sizeof dev_fd, "/dev/fd/%d", fds[0]);
@@ -160,9 +162,9 @@
error (EXIT_FAILURE, errno, "pipe");
/* We don't want the pipe to be passed to subprocesses. */
- if (fcntl (fds[0], F_SETFD, FD_CLOEXEC) == -1 ||
- fcntl (fds[1], F_SETFD, FD_CLOEXEC) == -1)
- error (EXIT_FAILURE, errno, "fcntl");
+ if (set_cloexec_flag (fds[0], 1) == -1 ||
+ set_cloexec_flag (fds[1], 1) == -1)
+ error (EXIT_FAILURE, errno, "set_cloexec_flag");
data.fd = fds[0];
snprintf (dev_fd, sizeof dev_fd, "/dev/fd/%d", fds[1]);
diff -Nru -w libguestfs-1.34.4/tests/daemon/captive-daemon.pm libguestfs-1.34.6/tests/daemon/captive-daemon.pm
--- libguestfs-1.34.4/tests/daemon/captive-daemon.pm 2017-01-29 22:25:58.000000000 +0100
+++ libguestfs-1.34.6/tests/daemon/captive-daemon.pm 2017-03-08 11:27:11.000000000 +0100
@@ -30,8 +30,8 @@
# Filled in by autoconf.
my %var;
$var{top_builddir} = "../..";
-$var{abs_top_srcdir} = "/tmp/goaljobstmpbb34ea4c181c3623d42bfcc45ad0dc17/libguestfs";
-$var{abs_top_builddir} = "/tmp/goaljobstmpbb34ea4c181c3623d42bfcc45ad0dc17/libguestfs";
+$var{abs_top_srcdir} = "/home/rjones/d/libguestfs-1.34";
+$var{abs_top_builddir} = "/home/rjones/d/libguestfs-1.34";
$var{VALGRIND} = "valgrind";
# Now we have to substitute the above variables into this one:
diff -Nru -w libguestfs-1.34.4/tests/regressions/rhbz914931.c libguestfs-1.34.6/tests/regressions/rhbz914931.c
--- libguestfs-1.34.4/tests/regressions/rhbz914931.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/tests/regressions/rhbz914931.c 2017-03-07 15:12:04.000000000 +0100
@@ -27,6 +27,7 @@
#include <string.h>
#include <unistd.h>
#include <assert.h>
+#include <signal.h>
#include <errno.h>
#include <error.h>
@@ -38,6 +39,7 @@
int
main (int argc, char *argv[])
{
+ struct sigaction sa;
guestfs_h *g;
int r;
char *str;
@@ -50,6 +52,14 @@
exit (77);
}
+ /* This test can fail with SIGPIPE (shows up as exit code 141)
+ * unless we ignore that signal.
+ */
+ memset (&sa, 0, sizeof sa);
+ sa.sa_handler = SIG_IGN;
+ sa.sa_flags = SA_RESTART;
+ sigaction (SIGPIPE, &sa, NULL);
+
g = guestfs_create ();
if (!g)
error (EXIT_FAILURE, errno, "guestfs_create");
diff -Nru -w libguestfs-1.34.4/utils/boot-analysis/boot-analysis.c libguestfs-1.34.6/utils/boot-analysis/boot-analysis.c
--- libguestfs-1.34.4/utils/boot-analysis/boot-analysis.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/utils/boot-analysis/boot-analysis.c 2017-03-07 14:34:53.000000000 +0100
@@ -88,7 +88,7 @@
static void free_pass_data (void);
static void free_final_timeline (void);
-static void
+static void __attribute__((noreturn))
usage (int exitcode)
{
guestfs_h *g;
diff -Nru -w libguestfs-1.34.4/utils/boot-benchmark/boot-benchmark.c libguestfs-1.34.6/utils/boot-benchmark/boot-benchmark.c
--- libguestfs-1.34.4/utils/boot-benchmark/boot-benchmark.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/utils/boot-benchmark/boot-benchmark.c 2017-03-07 14:34:53.000000000 +0100
@@ -51,7 +51,7 @@
static guestfs_h *create_handle (void);
static void add_drive (guestfs_h *g);
-static void
+static void __attribute__((noreturn))
usage (int exitcode)
{
guestfs_h *g;
diff -Nru -w libguestfs-1.34.4/utils/qemu-boot/qemu-boot.c libguestfs-1.34.6/utils/qemu-boot/qemu-boot.c
--- libguestfs-1.34.4/utils/qemu-boot/qemu-boot.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/utils/qemu-boot/qemu-boot.c 2017-03-07 14:34:53.000000000 +0100
@@ -74,7 +74,7 @@
static void *start_thread (void *thread_data_vp);
static void message_callback (guestfs_h *g, void *opaque, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len);
-static void
+static void __attribute__((noreturn))
usage (int exitcode)
{
fprintf (stderr,
diff -Nru -w libguestfs-1.34.4/utils/qemu-speed-test/qemu-speed-test.c libguestfs-1.34.6/utils/qemu-speed-test/qemu-speed-test.c
--- libguestfs-1.34.4/utils/qemu-speed-test/qemu-speed-test.c 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/utils/qemu-speed-test/qemu-speed-test.c 2017-03-07 14:34:53.000000000 +0100
@@ -66,7 +66,7 @@
}
}
-static void
+static void __attribute__((noreturn))
usage (int exitcode)
{
fprintf (stderr,
diff -Nru -w libguestfs-1.34.4/v2v/output_libvirt.ml libguestfs-1.34.6/v2v/output_libvirt.ml
--- libguestfs-1.34.4/v2v/output_libvirt.ml 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/v2v/output_libvirt.ml 2017-03-07 15:12:05.000000000 +0100
@@ -354,8 +354,6 @@
| None -> sprintf "-o libvirt -os %s" output_pool
| Some uri -> sprintf "-o libvirt -oc %s -os %s" uri output_pool
- method supported_firmware = [ TargetBIOS; TargetUEFI ]
-
method prepare_targets source targets =
(* Get the capabilities from libvirt. *)
let xml = Domainxml.capabilities ?conn:oc () in
@@ -418,6 +416,8 @@
{ t with target_file = target_file }
) targets
+ method supported_firmware = [ TargetBIOS; TargetUEFI ]
+
method check_target_firmware guestcaps target_firmware =
match target_firmware with
| TargetBIOS -> ()
diff -Nru -w libguestfs-1.34.4/v2v/output_local.ml libguestfs-1.34.6/v2v/output_local.ml
--- libguestfs-1.34.4/v2v/output_local.ml 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/v2v/output_local.ml 2017-03-07 15:12:05.000000000 +0100
@@ -29,8 +29,6 @@
method as_options = sprintf "-o local -os %s" dir
- method supported_firmware = [ TargetBIOS; TargetUEFI ]
-
method prepare_targets source targets =
List.map (
fun t ->
@@ -38,6 +36,17 @@
{ t with target_file = target_file }
) targets
+ method supported_firmware = [ TargetBIOS; TargetUEFI ]
+
+ method check_target_firmware guestcaps target_firmware =
+ match target_firmware with
+ | TargetBIOS -> ()
+ | TargetUEFI ->
+ (* This will fail with an error if the target firmware is
+ * not installed on the host.
+ *)
+ ignore (find_uefi_firmware guestcaps.gcaps_arch)
+
method create_metadata source _ target_buses guestcaps _ target_firmware =
(* We don't know what target features the hypervisor supports, but
* assume a common set that libvirt supports.
diff -Nru -w libguestfs-1.34.4/v2v/output_qemu.ml libguestfs-1.34.6/v2v/output_qemu.ml
--- libguestfs-1.34.4/v2v/output_qemu.ml 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/v2v/output_qemu.ml 2017-03-07 15:12:05.000000000 +0100
@@ -31,8 +31,6 @@
method as_options =
sprintf "-o qemu -os %s%s" dir (if qemu_boot then " --qemu-boot" else "")
- method supported_firmware = [ TargetBIOS; TargetUEFI ]
-
method prepare_targets source targets =
List.map (
fun t ->
@@ -40,6 +38,8 @@
{ t with target_file = target_file }
) targets
+ method supported_firmware = [ TargetBIOS; TargetUEFI ]
+
method check_target_firmware guestcaps target_firmware =
match target_firmware with
| TargetBIOS -> ()
diff -Nru -w libguestfs-1.34.4/v2v/v2v.ml libguestfs-1.34.6/v2v/v2v.ml
--- libguestfs-1.34.4/v2v/v2v.ml 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/v2v/v2v.ml 2017-03-07 14:41:28.000000000 +0100
@@ -75,7 +75,7 @@
);
let g = open_guestfs ~identifier:"v2v" () in
- g#set_memsize (g#get_memsize () * 8 / 5);
+ g#set_memsize (g#get_memsize () * 20 / 5);
(* The network is only used by the unconfigure_vmware () function. *)
g#set_network true;
(match conversion_mode with
diff -Nru -w libguestfs-1.34.4/v2v/virt-v2v.pod libguestfs-1.34.6/v2v/virt-v2v.pod
--- libguestfs-1.34.4/v2v/virt-v2v.pod 2017-01-29 22:22:40.000000000 +0100
+++ libguestfs-1.34.6/v2v/virt-v2v.pod 2017-03-07 15:12:05.000000000 +0100
@@ -1611,7 +1611,7 @@
Virt-v2v is not especially compute or RAM intensive. If you are
running many parallel conversions, then you may consider allocating
-one CPU core and between 512 MB and 1 GB of RAM per running instance.
+one CPU core and 2 GB of RAM per running instance.
Virt-v2v can be run in a virtual machine.
--- End Message ---