[PATCH v2 0/4] Switch augeas APIs to OCaml
by Pino Toscano
This reimplements the augeas APIs using ocaml-augeas (dropping all the
C code).
The behaviour seems unchanged, although I may have not tested all the
various corner cases.
Pino Toscano (4):
daemon: fix/enhance error reporting of Augeas exceptions
Revert "Revert "daemon: implement OptString for OCaml APIs""
daemon: move augeas APIs to OCaml
daemon: drop usage of C augeas library
.gitignore | 1 +
daemon/Makefile.am | 7 +-
daemon/aug.ml | 143 +++++++++++
daemon/aug_utils.ml | 42 +++
daemon/aug_utils.mli | 32 +++
daemon/augeas.c | 493 ------------------------------------
daemon/cleanups.c | 11 -
daemon/daemon-c.c | 29 ++-
daemon/daemon-c.h | 1 +
daemon/daemon.h | 35 ---
daemon/lvm-filter.c | 2 -
daemon/mount.c | 3 +-
daemon/mount_utils.ml | 2 +-
docs/C_SOURCE_FILES | 1 -
generator/actions_augeas.ml | 15 ++
generator/actions_core.ml | 2 +
generator/daemon.ml | 18 +-
po/POTFILES | 1 -
18 files changed, 288 insertions(+), 550 deletions(-)
create mode 100644 daemon/aug.ml
create mode 100644 daemon/aug_utils.ml
create mode 100644 daemon/aug_utils.mli
delete mode 100644 daemon/augeas.c
--
2.24.1
4 years, 11 months
[PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
by Richard W.M. Jones
libguestfs usually needs qemu. However it only requires an emulator
for the same architecture, not for all architectures.
libvirt-daemon-kvm pulls in qemu which pulls in emulators for all
architectures, as well as a bunch of other stuff we don't need at all
like network interface support and nwfilter.
There are no Fedora TCG-only arches, so drop the conditional section.
I also made support for storage backends "Recommends" so that people
can get rid of things like Gluster if they want.
---
libguestfs.spec | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/libguestfs.spec b/libguestfs.spec
index 0d32ef0..71f97c6 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -211,12 +211,16 @@ Requires: fuse
# For core disk-create API.
Requires: /usr/bin/qemu-img
-# For libvirt backend.
-%ifarch %{ix86} x86_64 %{arm} aarch64
-Requires: libvirt-daemon-kvm >= 0.10.2-3
-%else
+# For qemu direct and libvirt backends.
+Requires: qemu-kvm-core
+Requires: libvirt-daemon-driver-qemu
+Recommends: libvirt-daemon-driver-storage-disk
+Recommends: libvirt-daemon-driver-storage-gluster
+Recommends: libvirt-daemon-driver-storage-iscsi
+Recommends: libvirt-daemon-driver-storage-logical
+Recommends: libvirt-daemon-driver-storage-rbd
+Recommends: libvirt-daemon-driver-storage-scsi
Requires: libvirt-daemon-qemu >= 0.10.2-3
-%endif
Recommends: libvirt-daemon-config-network
Requires: selinux-policy >= 3.11.1-63
--
2.24.1
4 years, 11 months
[PATCH] Fix lossy conversion of Content-Length
by Adrian Ambrożewicz
Actual variable holding content length is int64_t, but it was assigned
by explicit cast to size_t. On 32-bit systems it's a lossy conversion,
so it was replaced by casting to int64_t instead.
Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz(a)linux.intel.com>
---
plugins/curl/curl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c
index 031bd32..fe1330e 100644
--- a/plugins/curl/curl.c
+++ b/plugins/curl/curl.c
@@ -389,7 +389,7 @@ curl_open (int readonly)
goto err;
}
- h->exportsize = (size_t) d;
+ h->exportsize = (int64_t) d;
nbdkit_debug ("content length: %" PRIi64, h->exportsize);
if (strncasecmp (url, "http://", strlen ("http://")) == 0 ||
--
2.17.1
4 years, 11 months
bug report
by 谢威
Hi,
I have use kvm 、 virsh 、 virt for almost half year ,all things goes well 。
but recently, I use virt-copy-in found some problem , I have do nothing with my server ,but the problem appear .
Here is the error message blow . I really appreciate your geneous help
[root@gz-op-vmhost01 vmdata]# uname -r && cat /etc/redhat-release && virsh -V
4.19.8-1.el7.elrepo.x86_64
CentOS Linux release 7.2.1511 (Core)
Virsh command line tool of libvirt 4.5.0
See web site at https://libvirt.org/
Compiled with support for:
Hypervisors: QEMU/KVM LXC ESX Test
Networking: Remote Network Bridging Interface netcf Nwfilter VirtualPort
Storage: Dir Disk Filesystem SCSI Multipath iSCSI LVM RBD Gluster
Miscellaneous: Daemon Nodedev SELinux Secrets Debug DTrace Readline
[root@gz-op-vmhost01 vmdata]# libguestfs-test-tool
************************************************************
* IMPORTANT NOTICE
*
* When reporting bugs, include the COMPLETE, UNEDITED
* output below in your bug report.
*
************************************************************
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
LIBGUESTFS_DEBUG=1
LIBGUESTFS_TRACE=1
PATH=/usr/java/jdk1.8.0_151/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
SELinux: Disabled
libguestfs: trace: add_drive_scratch 104857600
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsr2XJRP/scratch1.img" "raw" 104857600
libguestfs: trace: disk_create = 0
libguestfs: trace: add_drive "/tmp/libguestfsr2XJRP/scratch1.img" "format:raw" "cachemode:unsafe"
libguestfs: trace: add_drive = 0
libguestfs: trace: add_drive_scratch = 0
libguestfs: trace: get_append
libguestfs: trace: get_append = "NULL"
guestfs_get_append: (null)
libguestfs: trace: get_autosync
libguestfs: trace: get_autosync = 1
guestfs_get_autosync: 1
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
guestfs_get_backend: libvirt
libguestfs: trace: get_backend_settings
libguestfs: trace: get_backend_settings = []
guestfs_get_backend_settings: []
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
guestfs_get_cachedir: /var/tmp
libguestfs: trace: get_hv
libguestfs: trace: get_hv = "/usr/libexec/qemu-kvm"
guestfs_get_hv: /usr/libexec/qemu-kvm
libguestfs: trace: get_memsize
libguestfs: trace: get_memsize = 500
guestfs_get_memsize: 500
libguestfs: trace: get_network
libguestfs: trace: get_network = 0
guestfs_get_network: 0
libguestfs: trace: get_path
libguestfs: trace: get_path = "/usr/lib64/guestfs"
guestfs_get_path: /usr/lib64/guestfs
libguestfs: trace: get_pgroup
libguestfs: trace: get_pgroup = 0
guestfs_get_pgroup: 0
libguestfs: trace: get_program
libguestfs: trace: get_program = "libguestfs-test-tool"
guestfs_get_program: libguestfs-test-tool
libguestfs: trace: get_recovery_proc
libguestfs: trace: get_recovery_proc = 1
guestfs_get_recovery_proc: 1
libguestfs: trace: get_smp
libguestfs: trace: get_smp = 1
guestfs_get_smp: 1
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
guestfs_get_sockdir: /tmp
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
guestfs_get_tmpdir: /tmp
libguestfs: trace: get_trace
libguestfs: trace: get_trace = 1
guestfs_get_trace: 1
libguestfs: trace: get_verbose
libguestfs: trace: get_verbose = 1
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 38, release: 2, extra: rhel=7,release=12.el7_6.2,libvirt, >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.38.2rhel=7,release=12.el7_6.2,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=libvirt
libguestfs: launch: tmpdir=/tmp/libguestfsr2XJRP
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: libvirt version = 4005000 (4.5.0)
libguestfs: guest random name = guestfs-tv134tqwpax481b9
libguestfs: connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x564c2ce63ab0
libguestfs: qemu version (reported by libvirt) = 2012000 (2.12.0)
libguestfs: get libvirt capabilities
libguestfs: parsing capabilities XML
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_label"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_imagelabel"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_norelabel_disks"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: build appliance
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.19
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: trace: disk_create "/tmp/libguestfsr2XJRP/overlay2.qcow2" "qcow2" -1 "backingfile:/var/tmp/.guestfs-0/appliance.d/root" "backingformat:raw"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/var/tmp/.guestfs-0/appliance.d/root,backing_fmt=raw
libguestfs: command: run: \ /tmp/libguestfsr2XJRP/overlay2.qcow2
qemu-img: /tmp/libguestfsr2XJRP/overlay2.qcow2: Could not open '/var/tmp/.guestfs-0/appliance.d/root': No such file or directory
Could not open backing image to determine size.
libguestfs: error: qemu-img: /tmp/libguestfsr2XJRP/overlay2.qcow2: qemu-img exited with error status 1, see debug messages above
libguestfs: trace: disk_create = -1 (error)
libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL: Invalid argument [you can ignore this message if you are not using SELinux + sVirt]
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x564c2ce63000 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsr2XJRP
[root@gz-op-vmhost01 vmdata]# ll /var/tmp/.guestfs-0/appliance.d/root
ls: cannot access /var/tmp/.guestfs-0/appliance.d/root: No such file or directory
[root@gz-op-vmhost01 vmdata]# ll /var/tmp/.guestfs-0/appliance.d/
total 10192
-rw-r--r-- 1 qemu qemu 3335680 Jan 3 13:36 initrd
-rwxr-xr-x 1 qemu qemu 7095680 Jan 3 13:36 kernel
[root@gz-op-vmhost01 vmdata]# mkdir /var/tmp/.guestfs-0/appliance.d/root
[root@gz-op-vmhost01 vmdata]# libguestfs-test-tool
************************************************************
* IMPORTANT NOTICE
*
* When reporting bugs, include the COMPLETE, UNEDITED
* output below in your bug report.
*
************************************************************
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
LIBGUESTFS_DEBUG=1
LIBGUESTFS_TRACE=1
PATH=/usr/java/jdk1.8.0_151/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
SELinux: Disabled
libguestfs: trace: add_drive_scratch 104857600
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsn1zUMm/scratch1.img" "raw" 104857600
libguestfs: trace: disk_create = 0
libguestfs: trace: add_drive "/tmp/libguestfsn1zUMm/scratch1.img" "format:raw" "cachemode:unsafe"
libguestfs: trace: add_drive = 0
libguestfs: trace: add_drive_scratch = 0
libguestfs: trace: get_append
libguestfs: trace: get_append = "NULL"
guestfs_get_append: (null)
libguestfs: trace: get_autosync
libguestfs: trace: get_autosync = 1
guestfs_get_autosync: 1
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
guestfs_get_backend: libvirt
libguestfs: trace: get_backend_settings
libguestfs: trace: get_backend_settings = []
guestfs_get_backend_settings: []
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
guestfs_get_cachedir: /var/tmp
libguestfs: trace: get_hv
libguestfs: trace: get_hv = "/usr/libexec/qemu-kvm"
guestfs_get_hv: /usr/libexec/qemu-kvm
libguestfs: trace: get_memsize
libguestfs: trace: get_memsize = 500
guestfs_get_memsize: 500
libguestfs: trace: get_network
libguestfs: trace: get_network = 0
guestfs_get_network: 0
libguestfs: trace: get_path
libguestfs: trace: get_path = "/usr/lib64/guestfs"
guestfs_get_path: /usr/lib64/guestfs
libguestfs: trace: get_pgroup
libguestfs: trace: get_pgroup = 0
guestfs_get_pgroup: 0
libguestfs: trace: get_program
libguestfs: trace: get_program = "libguestfs-test-tool"
guestfs_get_program: libguestfs-test-tool
libguestfs: trace: get_recovery_proc
libguestfs: trace: get_recovery_proc = 1
guestfs_get_recovery_proc: 1
libguestfs: trace: get_smp
libguestfs: trace: get_smp = 1
guestfs_get_smp: 1
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
guestfs_get_sockdir: /tmp
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
guestfs_get_tmpdir: /tmp
libguestfs: trace: get_trace
libguestfs: trace: get_trace = 1
guestfs_get_trace: 1
libguestfs: trace: get_verbose
libguestfs: trace: get_verbose = 1
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 38, release: 2, extra: rhel=7,release=12.el7_6.2,libvirt, >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.38.2rhel=7,release=12.el7_6.2,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=libvirt
libguestfs: launch: tmpdir=/tmp/libguestfsn1zUMm
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: libvirt version = 4005000 (4.5.0)
libguestfs: guest random name = guestfs-6jipufmlo60389k4
libguestfs: connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x563ac943fab0
libguestfs: qemu version (reported by libvirt) = 2012000 (2.12.0)
libguestfs: get libvirt capabilities
libguestfs: parsing capabilities XML
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_label"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_imagelabel"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_norelabel_disks"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: build appliance
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.19
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: trace: disk_create "/tmp/libguestfsn1zUMm/overlay2.qcow2" "qcow2" -1 "backingfile:/var/tmp/.guestfs-0/appliance.d/root" "backingformat:raw"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/var/tmp/.guestfs-0/appliance.d/root,backing_fmt=raw
libguestfs: command: run: \ /tmp/libguestfsn1zUMm/overlay2.qcow2
qemu-img: /tmp/libguestfsn1zUMm/overlay2.qcow2: A regular file was expected by the 'file' driver, but something else was given
Could not open backing image to determine size.
libguestfs: error: qemu-img: /tmp/libguestfsn1zUMm/overlay2.qcow2: qemu-img exited with error status 1, see debug messages above
libguestfs: trace: disk_create = -1 (error)
libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL: Invalid argument [you can ignore this message if you are not using SELinux + sVirt]
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x563ac943f000 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsn1zUMm
[root@gz-op-vmhost01 vmdata]#
[root@gz-op-vmhost01 vmdata]# virt-copy-in /etc/resolv.conf -a 10.188.2.9.sys.img /etc/
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x55f344b7f650, program = virt-copy-in
libguestfs: trace: set_pgroup true
libguestfs: trace: set_pgroup = 0
libguestfs: trace: add_drive "10.188.2.9.sys.img"
libguestfs: trace: add_drive = 0
libguestfs: trace: is_config
libguestfs: trace: is_config = 1
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 38, release: 2, extra: rhel=7,release=12.el7_6.2,libvirt, >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
libguestfs: launch: program=virt-copy-in
libguestfs: launch: version=1.38.2rhel=7,release=12.el7_6.2,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=libvirt
libguestfs: launch: tmpdir=/tmp/libguestfsHRQGUn
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: libvirt version = 4005000 (4.5.0)
libguestfs: guest random name = guestfs-yxto5xhpuo3fwlvw
libguestfs: connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x55f344b800c0
libguestfs: qemu version (reported by libvirt) = 2012000 (2.12.0)
libguestfs: get libvirt capabilities
libguestfs: parsing capabilities XML
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_label"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_imagelabel"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_norelabel_disks"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: build appliance
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.19
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: trace: disk_create "/tmp/libguestfsHRQGUn/overlay1.qcow2" "qcow2" -1 "backingfile:/var/tmp/.guestfs-0/appliance.d/root" "backingformat:raw"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/var/tmp/.guestfs-0/appliance.d/root,backing_fmt=raw
libguestfs: command: run: \ /tmp/libguestfsHRQGUn/overlay1.qcow2
qemu-img: /tmp/libguestfsHRQGUn/overlay1.qcow2: A regular file was expected by the 'file' driver, but something else was given
Could not open backing image to determine size.
libguestfs: error: qemu-img: /tmp/libguestfsHRQGUn/overlay1.qcow2: qemu-img exited with error status 1, see debug messages above
libguestfs: trace: disk_create = -1 (error)
libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL: Invalid argument [you can ignore this message if you are not using SELinux + sVirt]
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x55f344b7f650 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsHRQGUn
4 years, 11 months
[v2v PATCH] build: add --with-extra configure parameter
by Pino Toscano
Borrow this feature from libguestfs, so it is possible to "watermark"
the virt-v2v executable with a extra string to the version string.
---
configure.ac | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 00246f29..e2418564 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-AC_INIT([virt-v2v],1.41.8)
+# The major, minor, and release fields MUST be numbers. Packagers can
+# add extra information using --with-extra="..." which may be any
+# freeform string.
+m4_define([v2v_major], [1])
+m4_define([v2v_minor], [41])
+m4_define([v2v_release], [8])
+
+AC_INIT([virt-v2v],v2v_major.v2v_minor.v2v_release)
# Headings within the configure script output.
m4_define([HEADING],
@@ -37,6 +44,25 @@ AC_CONFIG_MACRO_DIR([m4])
dnl Initialize libtool.
LT_INIT
+dnl Extra string, a freeform string defined by packagers.
+AC_ARG_WITH([extra],
+ [AS_HELP_STRING([--with-extra],
+ [extra version string (for use by packagers)])],
+ [v2v_extra="$withval"],
+ [v2v_extra=]
+)
+
+AC_MSG_NOTICE([virt-v2v version v2v_major.v2v_minor.v2v_release$v2v_extra])
+
+dnl Split up the version string.
+AC_DEFINE([PACKAGE_VERSION_MAJOR],[v2v_major],[Major version number.])
+AC_DEFINE([PACKAGE_VERSION_MINOR],[v2v_minor],[Minor version number.])
+AC_DEFINE([PACKAGE_VERSION_RELEASE],[v2v_release],[Release number.])
+AC_DEFINE_UNQUOTED([PACKAGE_VERSION_EXTRA],["$v2v_extra"],[Extra version string.])
+PACKAGE_VERSION_FULL="v2v_major.v2v_minor.v2v_release${v2v_extra}"
+AC_DEFINE_UNQUOTED([PACKAGE_VERSION_FULL],["$PACKAGE_VERSION_FULL"],[Full version string.])
+AC_SUBST([PACKAGE_VERSION_FULL])
+
dnl Early gnulib initialization.
HEADING([Configuring Gnulib])
gl_EARLY
@@ -79,8 +105,6 @@ dnl These are required to get common/*/Makefile.am files
dnl to work. We should further decouple these in future XXX
AM_CONDITIONAL([ENABLE_APPLIANCE],[true])
AM_CONDITIONAL([HAVE_PYTHON],[false]) dnl Disables a test
-AC_DEFINE_UNQUOTED([PACKAGE_VERSION_FULL],["$PACKAGE_VERSION"],[Version string.])
-AC_SUBST([PACKAGE_VERSION_FULL], [$PACKAGE_VERSION])
dnl Produce output files.
HEADING([Generating output files])
--
2.23.0
4 years, 11 months
[v2v PATCH] po: do not extract tests
by Pino Toscano
They do not contain messages.
---
Makefile.am | 1 +
po/POTFILES-ml | 11 -----------
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4dde5002..46a52ca3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -115,6 +115,7 @@ po/POTFILES-ml: configure.ac
grep -v '^common/mlprogress/' | \
grep -v '^common/mlvisit/' | \
grep -v '^v2v/config.ml$$' | \
+ grep -v -E '.*_tests\.ml$$' | \
LC_ALL=C sort > $@-t
mv $@-t $@
diff --git a/po/POTFILES-ml b/po/POTFILES-ml
index dae9bd1a..7512d63b 100644
--- a/po/POTFILES-ml
+++ b/po/POTFILES-ml
@@ -3,32 +3,23 @@ common/mlcustomize/customize_cmdline.ml
common/mlcustomize/firstboot.ml
common/mlgettext/common_gettext.ml
common/mlpcre/PCRE.ml
-common/mlpcre/pcre_tests.ml
common/mlstdutils/guestfs_config.ml
common/mlstdutils/std_utils.ml
-common/mlstdutils/std_utils_tests.ml
common/mlstdutils/stringMap.ml
common/mlstdutils/stringSet.ml
common/mltools/JSON.ml
common/mltools/JSON_parser.ml
-common/mltools/JSON_parser_tests.ml
-common/mltools/JSON_tests.ml
common/mltools/URI.ml
common/mltools/checksums.ml
common/mltools/curl.ml
common/mltools/getopt.ml
-common/mltools/getopt_tests.ml
-common/mltools/machine_readable_tests.ml
common/mltools/planner.ml
common/mltools/regedit.ml
common/mltools/registry.ml
-common/mltools/tools_messages_tests.ml
common/mltools/tools_utils.ml
-common/mltools/tools_utils_tests.ml
common/mltools/urandom.ml
common/mltools/xpath_helpers.ml
common/mlutils/c_utils.ml
-common/mlutils/c_utils_unit_tests.ml
common/mlutils/unix_utils.ml
common/mlv2v/uefi.ml
common/mlxml/xml.ml
@@ -86,9 +77,7 @@ v2v/target_bus_assignment.ml
v2v/types.ml
v2v/utils.ml
v2v/v2v.ml
-v2v/v2v_unit_tests.ml
v2v/vCenter.ml
v2v/var_expander.ml
-v2v/var_expander_tests.ml
v2v/windows.ml
v2v/windows_virtio.ml
--
2.24.1
4 years, 11 months
Re: [Libguestfs] Libguestfs with Yara rules error
by Luis Fueris
Sorry Richard. Now I will attach you debug file.
El 21/12/2019 a las 16:38, Luis Fueris escribió:
>
> Hi Richard.
>
> Few days ago, I installed libyara a libguestfs properly. But when I
> load a yara rule and scan it via guestfs_yara_scan, my binary
> throughts following error:
>
> libguestfs: error: deserialise_yara_detection_list: Success
>
> And function exists with NULL value. As we can see this function is on
> lib/yara.c from libguestfs git. I think that these yara functions are
> an integration for yara C api. All debug and trace log is in
> libguestfs-yara.debug file.
>
>
> El 10/12/2019 a las 09:46, Richard W.M. Jones escribió:
>> On Tue, Dec 10, 2019 at 09:19:47AM +0100, Luis wrote:
>>> I am using libguestfs 1.40.2 and yara 3.11.0 but when I execute my program
>>> it thoughts the following error:
>>>
>>> $> ./yara-guestfs
>>> libguestfs: error: yara_load: feature 'libyara' is not available in this
>>> build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for
>>>
>>> If we check the manual, in guestfs appears guestfs_yara_load function so
>>> libyara is installed. I installed and compiled it from tarballs.
>> This function:
>>
>> https://github.com/libguestfs/libguestfs/blob/4aa4edf972bc8df8869cdcaa4ab...
>>
>> returns 1 if HAVE_YARA is defined. This is defined by this
>> ./configure test:
>>
>> https://github.com/libguestfs/libguestfs/blob/4aa4edf972bc8df8869cdcaa4ab...
>>
>> In other words it depends how libguestfs was configured. Where
>> did you get libguestfs from? How was it compiled?
>>
>> Rich.
>>
4 years, 11 months
[common/libguestfs PATCH 0/2] Fix OCaml/Python linking
by Pino Toscano
Make sure they can build also in no as-neede setups.
Pino Toscano (1):
utils: split string list functions in own file
build: use split stringlist functions from common/utils
utils/Makefile.am | 2 +
utils/guestfs-stringlists-utils.h | 30 +++++
utils/guestfs-utils.h | 7 +-
utils/stringlists-utils.c | 197 ++++++++++++++++++++++++++++++
utils/utils.c | 165 -------------------------
5 files changed, 230 insertions(+), 171 deletions(-)
create mode 100644 utils/guestfs-stringlists-utils.h
create mode 100644 utils/stringlists-utils.c
--
2.24.1
4 years, 11 months