Re: [Libguestfs] [PATCH] tests: Increase appliance memory when testing 256+ disks.

2018-05-16 Thread Daniel P . Berrangé
On Wed, May 16, 2018 at 12:51:19PM +0100, Richard W.M. Jones wrote: > Currently the tests fail on x86 with recent kernels: > > FAIL: test-255-disks.sh > > This confused me for a while because our other test program > (utils/max-disks/max-disks.pl) reports that it should be possible to > add

Re: [Libguestfs] [PATCH for discussion only] lib: libvirt: If root, run qemu subprocess as root.root.

2018-05-21 Thread Daniel P . Berrangé
On Mon, May 21, 2018 at 06:22:06PM +0100, Richard W.M. Jones wrote: > libvirt doesn't have a concept of "session qemu" for root: > > https://bugzilla.redhat.com/show_bug.cgi?id=890291 > > When a libguestfs-using process runs as root, and libvirt runs a qemu > subprocess, the qemu subprocess is

[Libguestfs] [PATCH] daemon: add inspector support for MS-DOS distro

2018-02-07 Thread Daniel P . Berrangé
An installation of MS-DOS has various files in a /DOS directory, which COMMAND.COM looking like a reasonable signal that its MS-DOS or a very close relative there-of. This is validated with an MS-DOS 6.22 install. Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> --- BTW, I'm u

[Libguestfs] [PATCH v2] daemon: add inspector support for MS-DOS distro

2018-02-07 Thread Daniel P . Berrangé
An installation of MS-DOS has various files in a /DOS directory, which COMMAND.COM looking like a reasonable signal that its MS-DOS or a very close relative there-of. This is validated with an MS-DOS 6.22 install. Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> --- daemon/inspect

Re: [Libguestfs] 1.39 proposal: Let's split up the libguestfs git repo and tarballs

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 12:09:23PM +, Richard W.M. Jones wrote: > On Mon, Feb 12, 2018 at 09:22:30AM +0000, Daniel P. Berrangé wrote: > > On Fri, Feb 09, 2018 at 06:01:53PM +, Richard W.M. Jones wrote: > > > My contention is that the libguestfs git repos

Re: [Libguestfs] 1.39 proposal: Let's split up the libguestfs git repo and tarballs

2018-02-12 Thread Daniel P . Berrangé
On Fri, Feb 09, 2018 at 06:01:53PM +, Richard W.M. Jones wrote: > My contention is that the libguestfs git repository is too large and > unwieldy. There are too many separate, unrelated projects and as a > result of that the source has too many dependencies and takes too long > to build and

Re: [Libguestfs] [PATCH] v2v: Set machine type explicitly for outputs which support it (RHBZ#1581428).

2018-06-19 Thread Daniel P . Berrangé
On Tue, Jun 19, 2018 at 12:12:30PM +0100, Richard W.M. Jones wrote: > On Tue, Jun 19, 2018 at 11:43:38AM +0100, Daniel P. Berrangé wrote: > > I'd encourage apps to check the capabilities XML to see what > > machine types are available. > > One issue is we don't always have

Re: [Libguestfs] [PATCH nbdkit] protocol: Implement NBD_OPT_GO.

2018-08-06 Thread Daniel P . Berrangé
On Mon, Aug 06, 2018 at 05:31:54PM +0300, Nir Soffer wrote: > On Mon, Aug 6, 2018 at 5:06 PM Eric Blake wrote: > > > On 08/06/2018 02:54 AM, Richard W.M. Jones wrote: > > > On Sun, Aug 05, 2018 at 12:11:04AM +0300, Nir Soffer wrote: > > >> But we have a bug - server configure to allow access to

Re: [Libguestfs] Tests and trimming vfat

2018-09-05 Thread Daniel P . Berrangé
On Wed, Sep 05, 2018 at 04:37:05PM +0100, Richard W.M. Jones wrote: > > Here's a fun one: > > + guestfish -N test-virt-sparsify-in-place-fstrim-unsupported.img=fs:vfat exit > + virt-sparsify --in-place test-virt-sparsify-in-place-fstrim-unsupported.img > + tee

Re: [Libguestfs] Tests and trimming vfat

2018-09-05 Thread Daniel P . Berrangé
On Wed, Sep 05, 2018 at 04:45:51PM +0100, Richard W.M. Jones wrote: > On Wed, Sep 05, 2018 at 04:41:01PM +0100, Daniel P. Berrangé wrote: > > On Wed, Sep 05, 2018 at 04:37:05PM +0100, Richard W.M. Jones wrote: > > > > > > Here's a fun one: > > > > > &g

Re: [Libguestfs] Tests and trimming vfat

2018-09-05 Thread Daniel P . Berrangé
On Wed, Sep 05, 2018 at 04:53:03PM +0100, Daniel P. Berrangé wrote: > On Wed, Sep 05, 2018 at 04:45:51PM +0100, Richard W.M. Jones wrote: > > On Wed, Sep 05, 2018 at 04:41:01PM +0100, Daniel P. Berrangé wrote: > > > On Wed, Sep 05, 2018 at 04:37:05PM +0100, Richar

Re: [Libguestfs] [PATCH] sparsify: Fix test-virt-sparsify-in-place-fstrim-unsupported.sh

2018-09-05 Thread Daniel P . Berrangé
hanks: Daniel P. Berrangé and Pino Toscano. > --- > ...virt-sparsify-in-place-fstrim-unsupported.sh | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-https://www.fli

Re: [Libguestfs] [PATCH nbdkit] python: Turn python exceptions into nbdkit errors

2018-04-05 Thread Daniel P . Berrangé
On Thu, Apr 05, 2018 at 01:47:30PM +0100, Richard W.M. Jones wrote: > Much more annoying that it needs to be, but I have tested it and it > works on Python 2 & 3. Note this will not work on Python 3.0 - 3.2, > but I guess we don't care about those versions. What's the problem that impacts 3.0 ->

Re: [Libguestfs] [PATCH nbdkit] tls: Implement Pre-Shared Keys (PSK) authentication.

2018-06-28 Thread Daniel P . Berrangé
On Thu, Jun 28, 2018 at 10:18:25AM -0500, Eric Blake wrote: > On 06/25/2018 12:01 PM, Richard W.M. Jones wrote: > > --- > > docs/nbdkit.pod.in | 45 +-- > > src/crypto.c | 234 > > + > > src/internal.h | 1 + > >

Re: [Libguestfs] collectd leaks SIGCHLD == SIG_IGN into plugins

2018-11-13 Thread Daniel P . Berrangé
On Tue, Nov 13, 2018 at 10:42:20AM +, Richard W.M. Jones wrote: > On Tue, Nov 13, 2018 at 10:04:33AM +0000, Daniel P. Berrangé wrote: > > On Fri, Nov 09, 2018 at 12:19:30PM +, Richard W.M. Jones wrote: > > > Peter Dimitrov and myself were debugging a very peculiar bug whe

Re: [Libguestfs] collectd leaks SIGCHLD == SIG_IGN into plugins

2018-11-13 Thread Daniel P . Berrangé
On Fri, Nov 09, 2018 at 12:19:30PM +, Richard W.M. Jones wrote: > Peter Dimitrov and myself were debugging a very peculiar bug when > libguestfs is run as a plugin from collectd: > > https://www.redhat.com/archives/libguestfs/2018-November/thread.html#00023 > > The long story short is that

Re: [Libguestfs] virt-builder fail with "bridge ‘virbr0’ not found" (fixed by LIBGUESTFS_BACKEND=direct ?!)

2018-10-10 Thread Daniel P . Berrangé
On Wed, Oct 10, 2018 at 02:27:44PM +0300, Nir Soffer wrote: > On Wed, Oct 10, 2018 at 10:18 AM Pino Toscano wrote: > > > On Tuesday, 9 October 2018 20:16:04 CEST Nir Soffer wrote: > > > I'm trying to build fedora-27 image for testing uploads: > > > > > > $ virt-builder fedora-27 -o

Re: [Libguestfs] [PATCH v2 7/7] build: stop looking for ocaml-libvirt

2018-11-27 Thread Daniel P . Berrangé
On Tue, Nov 27, 2018 at 11:59:08AM +0100, Pino Toscano wrote: > We ship our own copy of it, so we do not need the external version. > (Also, the latest upstream version of ocaml-libvirt was already not > usable to build the test harness of v2v.) This is a significant step backwards from a Fedora

Re: [Libguestfs] 1.39 proposal: Let's split up the libguestfs git repo and tarballs

2019-06-10 Thread Daniel P . Berrangé
On Mon, Jun 10, 2019 at 04:35:52PM +0100, Richard W.M. Jones wrote: > Sorry for the late reply to this ... > > On Tue, Apr 30, 2019 at 06:28:01PM +0200, Pino Toscano wrote: > > The other problem is how to split the repository, as the various bits > > are in different places: > > a) git

Re: [Libguestfs] [libnbd] How close are we to declaring a stable API?

2019-07-03 Thread Daniel P . Berrangé
On Tue, Jul 02, 2019 at 08:48:15PM -0500, Eric Blake wrote: > On 6/29/19 5:25 AM, Richard W.M. Jones wrote: > > As the subject says, how close are we to being able to declare a > > stable API for libnbd? > > > > I believe these are the main topics: > > > > * Do we need to have an extra thread

Re: [Libguestfs] Debian 10 with libguestfs

2019-08-21 Thread Daniel P . Berrangé
On Wed, Aug 21, 2019 at 01:15:57PM +0100, Richard W.M. Jones wrote: > On Wed, Aug 21, 2019 at 12:03:15PM +0200, Julian Hyordey wrote: > > As I said, it works, but you just forgot to modifiy /etc/hosts : > > > > 127.0.1.1 ibm-p8-kvm-03-guest-02.virt.pnr.lab.eng.rdu2.redhat.com > > Yes this

Re: [Libguestfs] [PATCH nbdkit] python: Drop support for Python 2.

2019-09-12 Thread Daniel P . Berrangé
On Wed, Sep 11, 2019 at 08:42:29PM +0100, Richard W.M. Jones wrote: > This patch proposes to drop support for Python 2 in nbdkit. > > Rather than abruptly drop it everywhere, my proposal is that we point > people to nbdkit 1.14 (the current stable version) if they want to > continue with Python 2

Re: [Libguestfs] [p2v PATCH] Fix FSF address

2019-09-12 Thread Daniel P . Berrangé
On Thu, Sep 12, 2019 at 05:14:47PM +0200, Pino Toscano wrote: > Adjust license headers to use the current FSF postal address. > > Spotted by Rpmlint. > --- > launch-virt-p2v | 2 +- > p2v.ks.in | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/launch-virt-p2v

Re: [Libguestfs] [PATCH libnbd] lib: Use symbol versions.

2019-07-29 Thread Daniel P . Berrangé
On Sat, Jul 27, 2019 at 02:19:47PM +0100, Richard W.M. Jones wrote: > This patch adds support for symbol versions. It is based on what > libvirt does. > > The generated syms file looks like: > > LIBNBD_1.0 { > global: > nbd_...; > nbd_...; > local: *; > }; > > In a future stable

Re: [Libguestfs] Extending the nbdkit python plugin

2019-11-21 Thread Daniel P . Berrangé
On Thu, Nov 21, 2019 at 01:57:28PM +, Richard W.M. Jones wrote: > We have an nbdkit plugin that lets you write NBD servers in Python. > An example of an existing Python plugin is here: > > > https://github.com/libguestfs/nbdkit/blob/master/plugins/python/example.py#L1 > > This morning I

Re: [Libguestfs] [PATCH nbdkit] Add support for AF_VSOCK.

2019-10-18 Thread Daniel P . Berrangé
On Fri, Oct 18, 2019 at 11:16:16AM -0500, Eric Blake wrote: > On 10/18/19 10:38 AM, Richard W.M. Jones wrote: > > On platforms which support it (only Linux currently) nbdkit can act as > > a vsock server. Guests running on the host see a raw NBD socket which > > it can connect to by opening an

Re: [Libguestfs] Continuing the split (was: Let's split up the libguestfs git repo and tarballs)

2019-11-29 Thread Daniel P . Berrangé
On Fri, Nov 29, 2019 at 12:09:47PM +, Richard W.M. Jones wrote: > So, the difficulty of git submodules aside, we have now split off > virt-v2v and virt-p2v into separate projects. > > I also yesterday split off the boot analysis tools into a repo which > is likely to be rarely used and which

Re: [Libguestfs] Continuing the split (was: Let's split up the libguestfs git repo and tarballs)

2019-11-29 Thread Daniel P . Berrangé
On Fri, Nov 29, 2019 at 05:04:14PM +0100, Pino Toscano wrote: > On Friday, 29 November 2019 13:09:47 CET Richard W.M. Jones wrote: > > So, the difficulty of git submodules aside, we have now split off > > virt-v2v and virt-p2v into separate projects. > > > > I also yesterday split off the boot

Re: [Libguestfs] [PATCH] lib: command: switch from select() to poll()

2020-02-26 Thread Daniel P . Berrangé
On Wed, Feb 26, 2020 at 02:39:04PM +0100, Pino Toscano wrote: > select() has a maximum value for the FDs it can monitor, and since > the libguestfs library can be used in other applications, this limit > may be hit by users in case lots of FDs are opened. > > As solution, switch to poll(): it has

Re: [Libguestfs] [PATCH 1/1] windows: delay installation of qemu-ga MSI

2020-03-02 Thread Daniel P . Berrangé
On Mon, Mar 02, 2020 at 12:26:00PM +0100, Tomáš Golembiovský wrote: > Instead of running firstboot script during early boot schedule a task > delayed for 1-2 minute. IIUC, you picked 119 seconds, so effectively 2 minutes. IOW, s/1-2/2/ > During the first boot, after virt-v2v conversion, Windows

Re: [Libguestfs] [PATCH 1/1] windows: delay installation of qemu-ga MSI

2020-03-03 Thread Daniel P . Berrangé
On Tue, Mar 03, 2020 at 02:27:46PM +0100, Tomáš Golembiovský wrote: > On Mon, Mar 02, 2020 at 11:35:29AM +0000, Daniel P. Berrangé wrote: > > On Mon, Mar 02, 2020 at 12:26:00PM +0100, Tomáš Golembiovský wrote: > > > Instead of running firstboot script during early bo

[Libguestfs] [PATCH] docs: fix instructions for building from git

2020-02-24 Thread Daniel P . Berrangé
On current Fedora releases the ocaml modules will fail to link unless CFLAGS contains -fPIC. The autogen.sh script only updates the 'gnulib' submodule, and so the build will fail due to the missing 'common' submodule. This needs to be manually initialized at checkout. Signed-off-by: Daniel P

Re: [Libguestfs] [PATCH libnbd] PROPOSAL Add nbdcp (NBD copying) tool.

2020-01-23 Thread Daniel P . Berrangé
On Wed, Jan 22, 2020 at 02:40:37PM +, Richard W.M. Jones wrote: > This is a proposal for an NBD to/from file copying tool (not actually > written). Obviously this would duplicate functionality which is > already available in qemu-img convert. > > The reasons for writing this tool would be: >

Re: [Libguestfs] [RFC] lib: allow to specify physical/logical block size for disks

2020-02-10 Thread Daniel P . Berrangé
On Sat, Feb 08, 2020 at 01:25:28AM +0200, Mykola Ivanets wrote: > From: Nikolay Ivanets > > I faced with situation where libguestfs cannot recognize partitions on a > disk image which was partitioned on a system with "4K native" sector > size support. What type of partition table is this

Re: [Libguestfs] [PATCH Fedora libguestfs v4] Don't depend on libvirt-daemon-kvm monolith.

2020-01-13 Thread Daniel P . Berrangé
ests: qemu-block-gluster > +Suggests: qemu-block-iscsi > +Suggests: qemu-block-rbd > +Suggests: qemu-block-ssh > +Requires: libvirt-daemon-driver-qemu > +Requires: libvirt-daemon-driver-secret > +Recommends:libvirt-daemon-driver-storage-core >

Re: [Libguestfs] [PATCH v2v] docs: Fix update-crypto-policies command.

2020-01-15 Thread Daniel P . Berrangé
On Wed, Jan 15, 2020 at 01:21:25PM +, Richard W.M. Jones wrote: > On Wed, Jan 15, 2020 at 11:03:24AM +0000, Daniel P. Berrangé wrote: > > On Wed, Jan 15, 2020 at 10:57:36AM +, Richard W.M. Jones wrote: > > > The command as documented was wrong. We need to us

Re: [Libguestfs] [PATCH v2v] docs: Fix update-crypto-policies command.

2020-01-15 Thread Daniel P . Berrangé
On Wed, Jan 15, 2020 at 10:57:36AM +, Richard W.M. Jones wrote: > The command as documented was wrong. We need to use the --set option > to change the policy. > > Fixes commit d5cbe7b4bee5dec9e28b1db03e933c97ef6d11e0. > Thanks: Xiaodai Wang > --- > docs/virt-v2v-input-xen.pod | 2 +- > 1

Re: [Libguestfs] [PATCH 0/4] Use libvirt firmware autoselection

2020-01-16 Thread Daniel P . Berrangé
On Thu, Jan 16, 2020 at 01:49:09PM +0100, Michal Privoznik wrote: > On 1/16/20 1:27 PM, Pino Toscano wrote: > > Starting with 5.2.0, libvirt has a way to select the firmware by > > specifying its type, provided configuration files for the firmware are > > shipped. Currently we start the appliance

Re: [Libguestfs] [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.

2020-01-10 Thread Daniel P . Berrangé
On Fri, Jan 10, 2020 at 03:10:51PM +0100, Pino Toscano wrote: > On Friday, 10 January 2020 15:05:33 CET Richard W.M. Jones wrote: > > libguestfs usually needs qemu. However it only requires an emulator > > for the same architecture, not for all architectures. > > libvirt-daemon-kvm pulls in qemu

Re: [Libguestfs] [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.

2020-01-10 Thread Daniel P . Berrangé
er-storage-rbd > +Recommends:libvirt-daemon-driver-storage-scsi > Requires: libvirt-daemon-qemu >= 0.10.2-3 You need to cull this last existing line too > -%endif > Recommends:libvirt-daemon-config-network > Requires: selinux-policy >= 3.11.1-63 Reviewe

Re: [Libguestfs] [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.

2020-01-10 Thread Daniel P . Berrangé
On Fri, Jan 10, 2020 at 02:26:35PM +, Richard W.M. Jones wrote: > On Fri, Jan 10, 2020 at 02:15:10PM +0000, Daniel P. Berrangé wrote: > > Do you use the libvirt "secret" APIs at all (disk encryption, network > > disk auth passwords) ? If so you will need "libvirt

Re: [Libguestfs] [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.

2020-01-10 Thread Daniel P . Berrangé
On Fri, Jan 10, 2020 at 05:41:54PM +0100, Pino Toscano wrote: > On Friday, 10 January 2020 17:34:27 CET Daniel P. Berrangé wrote: > > > > > virStoragePoolFree ( > > > > > virStoragePoolGetInfo ( > > > > > virStoragePoolLookupByName ( > > &g

Re: [Libguestfs] [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.

2020-01-10 Thread Daniel P . Berrangé
On Fri, Jan 10, 2020 at 05:21:23PM +0100, Pino Toscano wrote: > On Friday, 10 January 2020 15:39:21 CET Daniel P. Berrangé wrote: > > On Fri, Jan 10, 2020 at 02:26:35PM +, Richard W.M. Jones wrote: > > > On Fri, Jan 10, 2020 at 02:15:10PM +, Daniel P. Berrangé wrote:

Re: [Libguestfs] [PATCH Fedora libguestfs v2] Don't depend on libvirt-daemon-kvm monolith.

2020-01-10 Thread Daniel P . Berrangé
-network > > Requires: selinux-policy >= 3.11.1-63 > > As pointed out in the discussion of v1, can you please add > libvirt-daemon-driver-storage-core as suggest? > > Otherwise LGTM -- I'd wait for Dan to take a look at it too, to be > double sure we are not mis

Re: [Libguestfs] [PATCH] lib: Autodetect backing format and specify it explicitly.

2020-03-09 Thread Daniel P . Berrangé
On Mon, Mar 09, 2020 at 11:19:39AM +, Richard W.M. Jones wrote: > On Mon, Mar 09, 2020 at 12:07:08PM +0100, Pino Toscano wrote: > > On Monday, 9 March 2020 11:40:46 CET Richard W.M. Jones wrote: > > > On Mon, Mar 09, 2020 at 11:07:20AM +0100, Pino Toscano wrote: > > > > On Thursday, 6 February

Re: [Libguestfs] [PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.

2020-04-07 Thread Daniel P . Berrangé
On Tue, Apr 07, 2020 at 02:33:20PM +0200, Pino Toscano wrote: > On Tuesday, 7 April 2020 14:18:47 CEST Richard W.M. Jones wrote: > > On Tue, Apr 07, 2020 at 01:25:02PM +0200, Pino Toscano wrote: > > > The important thing is still that that you need to have space for the > > > temporary files

Re: [Libguestfs] [PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.

2020-04-07 Thread Daniel P . Berrangé
On Tue, Apr 07, 2020 at 01:18:47PM +0100, Richard W.M. Jones wrote: > Another issue, incidental to this but related, is that we cannot use > the fixed appliance because docker/podman have broken support for > sparse files. (It's possible to configure libguestfs to use qcow2 for > fixed

Re: [Libguestfs] [PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.

2020-04-06 Thread Daniel P . Berrangé
On Thu, Apr 02, 2020 at 05:51:32PM +0200, Pino Toscano wrote: > On Thursday, 2 April 2020 17:30:39 CEST Richard W.M. Jones wrote: > > On Thu, Apr 02, 2020 at 03:21:14PM +0200, Pino Toscano wrote: > > > On Thursday, 2 April 2020 14:49:18 CEST Richard W.M. Jones wrote: > > > > Previously we placed

Re: [Libguestfs] [PATCH virt-v2v v2 2/2] v2v: Allow large temporary directory to be set on a global basis.

2020-04-06 Thread Daniel P . Berrangé
On Mon, Apr 06, 2020 at 01:12:38PM +0200, Pino Toscano wrote: > On Monday, 6 April 2020 11:19:12 CEST Richard W.M. Jones wrote: > > Previously we placed large files in g#get_cachedir () (usually > > /var/tmp). However the problem is this ties the libguestfs appliance > > and the virt-v2v overlay

Re: [Libguestfs] [PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.

2020-04-06 Thread Daniel P . Berrangé
On Thu, Apr 02, 2020 at 03:21:14PM +0200, Pino Toscano wrote: > On Thursday, 2 April 2020 14:49:18 CEST Richard W.M. Jones wrote: > > Previously we placed large files in g#get_cachedir () (usually > > /var/tmp). However the problem is this ties the libguestfs appliance > > and the virt-v2v

Re: [Libguestfs] [PATCH nbdkit v2] Add the ability to write plugins in golang.

2020-04-21 Thread Daniel P . Berrangé
On Tue, Apr 21, 2020 at 11:44:59AM +0100, Richard W.M. Jones wrote: > Thanks: Dan Berrangé > > XXX UNFINISHED: > > - Is using uintptr for the handle a good idea? Plugins must return >something != 0. In other languages we would allow plugins to >return an arbitrary object here, but

Re: [Libguestfs] [PATCH] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)

2020-04-20 Thread Daniel P . Berrangé
On Mon, Apr 20, 2020 at 01:17:35PM +0300, Sam Eiderman wrote: > The python3 bindings create unicode objects from application strings > on the guest (i.e. installed rpm, deb packages). > It is documented that rpm package fields such as description should be > utf8 encoded - however in some cases

Re: [Libguestfs] [PATCH v2] python: Fix UnicodeError in inspect_list_applications2() (RHBZ#1684004)

2020-04-20 Thread Daniel P . Berrangé
e_FromString (str); > + return PyUnicode_Decode(str, strlen(str), "utf-8", "replace"); > #endif > } > > @@ -397,7 +397,7 @@ guestfs_int_py_fromstringsize (const char *str, size_t > size) > #if PY_MAJOR_VERSION < 3 >return PyString_FromStringAndSize (str, size); &

Re: [Libguestfs] [PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.

2020-04-03 Thread Daniel P . Berrangé
On Fri, Apr 03, 2020 at 12:53:14PM +0100, Richard W.M. Jones wrote: > On Thu, Apr 02, 2020 at 05:51:32PM +0200, Pino Toscano wrote: > > On Thursday, 2 April 2020 17:30:39 CEST Richard W.M. Jones wrote: > > > On Thu, Apr 02, 2020 at 03:21:14PM +0200, Pino Toscano wrote: > > > > On Thursday, 2 April

Re: [Libguestfs] [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).

2020-03-25 Thread Daniel P . Berrangé
On Wed, Mar 25, 2020 at 09:42:19AM +, Richard W.M. Jones wrote: > Now runs a complete set of tests, notably including the AIO test. > > File descriptors are passed in and out as plain ints (instead of > *os.File) for a couple of reasons: (1) We have to pass the plain int > to syscall.Select.

Re: [Libguestfs] [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).

2020-03-25 Thread Daniel P . Berrangé
On Wed, Mar 25, 2020 at 10:01:02AM +, Richard W.M. Jones wrote: > On Wed, Mar 25, 2020 at 09:48:02AM +0000, Daniel P. Berrangé wrote: > > On Wed, Mar 25, 2020 at 09:42:19AM +, Richard W.M. Jones wrote: > > > Now runs a complete set of tests, notably incl

Re: [Libguestfs] [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).

2020-03-25 Thread Daniel P . Berrangé
On Wed, Mar 25, 2020 at 10:23:09AM +, Richard W.M. Jones wrote: > On Wed, Mar 25, 2020 at 10:14:30AM +0000, Daniel P. Berrangé wrote: > > On Wed, Mar 25, 2020 at 10:01:02AM +, Richard W.M. Jones wrote: > > > On Wed, Mar 25, 2020 at 09:48:02AM +, Daniel P. Berrangé wro

Re: [Libguestfs] [PATCH nbdkit v2] Add the ability to write plugins in golang.

2020-04-23 Thread Daniel P . Berrangé
On Thu, Apr 23, 2020 at 10:03:45AM +0100, Richard W.M. Jones wrote: > On Tue, Apr 21, 2020 at 05:07:43PM +0100, Daniel P. Berrangé wrote: > > On Tue, Apr 21, 2020 at 11:44:59AM +0100, Richard W.M. Jones wrote: > > > Thanks: Dan Berrangé > > > > > > XXX UNFINISH

Re: [Libguestfs] [PATCH nbdkit] golang: Compile against the local nbdkit build, not installed.

2020-04-23 Thread Daniel P . Berrangé
On Thu, Apr 23, 2020 at 06:04:20PM +0100, Richard W.M. Jones wrote: > On Thu, Apr 23, 2020 at 05:58:25PM +0100, Daniel P. Berrangé wrote: > > On Thu, Apr 23, 2020 at 05:55:14PM +0100, Richard W.M. Jones wrote: > > > When compiling when an older nbdkit is installed, th

Re: [Libguestfs] [PATCH nbdkit] golang: Compile against the local nbdkit build, not installed.

2020-04-23 Thread Daniel P . Berrangé
On Thu, Apr 23, 2020 at 05:55:14PM +0100, Richard W.M. Jones wrote: > When compiling when an older nbdkit is installed, the build would fail > because certain symbols such as .get_ready were not defined: > > ../../src/libguestfs.org/nbdkit/nbdkit.go:541:8: plugin.get_ready undefined > (type

Re: [Libguestfs] [PATCH nbdkit 0/2 v2] golang: Compile against the local nbdkit build.

2020-04-23 Thread Daniel P . Berrangé
lar tricks in libguestfs and libvirt). For both patches Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org

Re: [Libguestfs] [PATCH nbdkit UNFINISHED] Add the ability to write plugins in golang.

2020-04-15 Thread Daniel P . Berrangé
On Fri, Apr 10, 2020 at 02:51:52PM +0100, Richard W.M. Jones wrote: > Similar to C, OCaml and Rust, this is not a plugin per se. Instead > it's more of a method and set of tests around writing plugins in > golang. They are standalone programs that compile into shared objects > that nbdkit can

Re: [Libguestfs] [PATCH nbdkit UNFINISHED] Add the ability to write plugins in golang.

2020-04-15 Thread Daniel P . Berrangé
On Wed, Apr 15, 2020 at 06:04:26PM +0100, Richard W.M. Jones wrote: > On Wed, Apr 15, 2020 at 05:27:07PM +0100, Daniel P. Berrangé wrote: > > On Fri, Apr 10, 2020 at 02:51:52PM +0100, Richard W.M. Jones wrote: > > > Similar to C, OCaml and Rust, this is not a plugin per se.

Re: [Libguestfs] [PATCH libnbd v2 2/3] Add outline framework for Go language bindings (golang).

2020-03-18 Thread Daniel P . Berrangé
On Tue, Mar 17, 2020 at 09:20:12PM +, Richard W.M. Jones wrote: > + > +/* > +#cgo CFLAGS: > +#cgo LDFLAGS: -lnbd I assume you support pkg-config for libnbd, and thus you should just do #cgo pkg-config: libnbd > + > +#include > + > +#include > +#include > +#include > + > +#include

Re: [Libguestfs] [PATCH libnbd v2 3/3] golang: Add straightforward bindings, without callbacks.

2020-03-18 Thread Daniel P . Berrangé
On Tue, Mar 17, 2020 at 09:20:13PM +, Richard W.M. Jones wrote: > + | Fd _ -> "int/*XXX*/" snip. > + | RFd -> "int/*XXX*/" snip. > + | RFd -> "0/*XXX*/" snip. > + | RFd -> Some "-1/*XXX*/" snip. For passing file descriptors in or out of Go APIs you'll want to use the os.File

Re: [Libguestfs] [PATCH nbdkit] server/public.c: Uninline nbdkit_strdup_intern to avoid compiler warning.

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 10:47:13AM +0100, Richard W.M. Jones wrote: > > A simple reproducer is: > > -- > #include > #include > #include > #include > > const char * > copyn (const char *str, size_t n) > { > return strndup

Re: [Libguestfs] CI for nbdkit

2020-10-14 Thread Daniel P . Berrangé
On Wed, Oct 14, 2020 at 10:37:26AM +0100, Richard W.M. Jones wrote: > On Tue, Oct 13, 2020 at 03:21:35PM -0600, alan somers wrote: > > Would libguestfs be willing to enable CI for the nbdkit project?  It's very > > easy to set up, at least for the Rust portion.  I'm comfortable with both > >

Re: [Libguestfs] [PATCH v3 0/8] Windows BitLocker support.

2020-10-09 Thread Daniel P . Berrangé
On Fri, Oct 09, 2020 at 04:33:53PM +0100, Richard W.M. Jones wrote: > On Fri, Oct 09, 2020 at 05:02:57PM +0200, Martin Kletzander wrote: > > Still, since you cannot do the test for Bitlocker, my idea was that > > you could make the test for non-lvm parition encrypted by LUKS as > > that would

Re: [Libguestfs] [PATCH nbdkit v2 3/3] ocaml: Add bindings for nbdkit_peer_{pid, uid, gid}.

2020-10-05 Thread Daniel P . Berrangé
On Mon, Oct 05, 2020 at 08:39:41AM -0500, Eric Blake wrote: > On 10/3/20 1:50 PM, Richard W.M. Jones wrote: > > --- > > plugins/ocaml/NBDKit.mli | 7 +++ > > plugins/ocaml/NBDKit.ml | 4 > > plugins/ocaml/bindings.c | 24 > > 3 files changed, 35 insertions(+)

Re: [Libguestfs] [PATCH nbdkit v2 1/3] server: Add new APIs for reading the client’s SO_PEERCRED.

2020-10-05 Thread Daniel P . Berrangé
On Mon, Oct 05, 2020 at 08:21:50AM -0500, Eric Blake wrote: > On 10/3/20 1:50 PM, Richard W.M. Jones wrote: > > New nbdkit_peer_pid, nbdkit_peer_uid and nbdkit_peer_gid calls can be > > used on Linux (only) to read the peer PID, UID and GID from clients > > connected over a Unix domain socket.

Re: [Libguestfs] [PATCH nbdkit v2 2/3] ip: Add filtering by process ID, user ID and group ID.

2020-10-05 Thread Daniel P . Berrangé
On Sat, Oct 03, 2020 at 07:50:01PM +0100, Richard W.M. Jones wrote: > --- > filters/ip/nbdkit-ip-filter.pod | 64 +- > tests/Makefile.am | 14 ++- > filters/ip/ip.c | 69 +--- > tests/test-ip-filter-gid.sh

Re: [Libguestfs] [nbdkit] Windows errno handling

2020-08-17 Thread Daniel P . Berrangé
On Mon, Aug 17, 2020 at 07:36:00PM +0100, Richard W.M. Jones wrote: > The Windows port of nbdkit > (https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw) now works > to some extent. However errno handling doesn't work. The way that > Winsock handles errors is incompatible with the way we

Re: [Libguestfs] [nbdkit] Windows errno handling

2020-08-17 Thread Daniel P . Berrangé
On Mon, Aug 17, 2020 at 01:56:10PM -0500, Eric Blake wrote: > On 8/17/20 1:46 PM, Daniel P. Berrangé wrote: > > On Mon, Aug 17, 2020 at 07:36:00PM +0100, Richard W.M. Jones wrote: > > > The Windows port of nbdkit > > > (https://github.com/rwmjones/nbdkit/tree/20

Re: [Libguestfs] [common PATCH 3/3] mlcustomize: do not relabel if not enforcing (RHBZ#1828952)

2020-09-24 Thread Daniel P . Berrangé
On Thu, Sep 24, 2020 at 11:15:29AM +0100, Richard W.M. Jones wrote: > On Wed, Sep 23, 2020 at 05:57:50PM +0200, Pino Toscano wrote: > > Do not attempt to relabel a guest in case its SELinux enforcing mode is > > not "enforcing", as it is either pointless, or it may fail because of an > > invalid

Re: [Libguestfs] [libnbd PATCH v2] nbdsh: Catch nbd.Error from -c arguments

2020-09-22 Thread Daniel P . Berrangé
++ > sh/test-error.sh | 23 ++- > 2 files changed, 38 insertions(+), 5 deletions(-) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-ht

Re: [Libguestfs] Provide NBD via Browser over Websockets

2020-05-29 Thread Daniel P . Berrangé
On Fri, May 29, 2020 at 07:50:14AM -0500, Eric Blake wrote: > [adding qemu list] > > On 5/29/20 4:37 AM, Richard W.M. Jones wrote: > > Going back to the original email from 2018: > > > > > It might be neat to attach ISOs to KVM guests via websockets.  > > > Basically > > > the  browser

Re: [Libguestfs] [PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.

2020-09-18 Thread Daniel P . Berrangé
On Fri, Sep 18, 2020 at 11:22:15AM +0100, Richard W.M. Jones wrote: > On Fri, Sep 18, 2020 at 10:52:58AM +0100, Daniel P. Berrangé wrote: > > On Fri, Sep 18, 2020 at 10:44:03AM +0100, Richard W.M. Jones wrote: > > > So it didn't make any noticable difference in my test. I wonder

Re: [Libguestfs] [PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.

2020-09-18 Thread Daniel P . Berrangé
On Fri, Sep 18, 2020 at 10:44:03AM +0100, Richard W.M. Jones wrote: > So it didn't make any noticable difference in my test. I wonder if > the test guest I'm using (Fedora 32 using dracut) doesn't use parallel > compression? Do you do anything special to optimize storage ? If the thing using

Re: [Libguestfs] [ovirt-devel] [ARM64] Possiblity to support oVirt on ARM64

2020-07-22 Thread Daniel P . Berrangé
On Sun, Jul 19, 2020 at 09:06:42PM +0300, Nir Soffer wrote: > On Sun, Jul 19, 2020 at 5:04 PM Zhenyu Zheng > wrote: > > > > Hi oVirt, > > > > We are currently trying to make oVirt work on ARM64 platform, since I'm > > quite new to oVirt community, I'm wondering what is the current status > >

Re: [Libguestfs] [PATCH NOT WORKING nbdkit 0/3] python: Allow thread model to be set from Python plugins.

2020-08-05 Thread Daniel P . Berrangé
On Wed, Aug 05, 2020 at 04:40:26PM +0100, Richard W.M. Jones wrote: > Patch 2 certainly allows you to set the thread model. However patch 3 > shows that if you set it to nbdkit.THREAD_MODEL_PARALLEL it will > crash. > > If you look closely at the stack trace (attached below) you can see > that

Re: [Libguestfs] [PATCH] lib: Increase default memsize to 1280 (RHBZ#1837765).

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 05:42:29PM +0100, Richard W.M. Jones wrote: > Argon2 is the default LUKS Password-Based Key Derivation Function > (PBKDF) for some new guests such as RHEL 8.2 and Fedora. It is > designed to be "memory hard", meaning that by design it requires large > amounts of memory,

Re: [Libguestfs] New Rust bindings for nbdkit

2020-06-15 Thread Daniel P . Berrangé
On Mon, Jun 15, 2020 at 02:22:32PM +0100, Richard W.M. Jones wrote: > On Thu, Jun 11, 2020 at 04:19:08PM -0600, alan somers wrote: > > The existing Rust bindings for nbdkit aren't very idiomatic Rust, and they > > are missing a lot of features. So I've rewritten them. The new bindings > > aren't

Re: [Libguestfs] New Rust bindings for nbdkit

2020-06-15 Thread Daniel P . Berrangé
On Mon, Jun 15, 2020 at 08:11:47AM -0600, alan somers wrote: > On Mon, Jun 15, 2020 at 8:04 AM Daniel P. Berrangé > wrote: > > > On Mon, Jun 15, 2020 at 02:22:32PM +0100, Richard W.M. Jones wrote: > > > On Thu, Jun 11, 2020 at 04:19:08PM -0600, alan somers wrote: &

Re: [Libguestfs] [libnbd PATCH] nbdsh: Simplify the script

2021-06-23 Thread Daniel P . Berrangé
On Tue, Jun 22, 2021 at 10:29:14PM +0300, Nir Soffer wrote: > On Tue, Jun 22, 2021 at 9:20 PM Martin Kletzander wrote: > > > > There is no need for any hacks if we just do what execution of the module > > would > > have done. > > > > Signed-off-by: Martin Kletzander > > --- > > sh/nbdsh.in |

Re: [Libguestfs] [libnbd PATCH] ci: Enable python code style

2021-06-23 Thread Daniel P . Berrangé
On Wed, Jun 23, 2021 at 12:31:14PM +0100, Richard W.M. Jones wrote: > On Tue, Jun 22, 2021 at 03:38:13PM +0200, Martin Kletzander wrote: > > Signed-off-by: Martin Kletzander > > --- > > ci/build.sh | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/ci/build.sh b/ci/build.sh > >

[Libguestfs] [PATCH nbdkit] plugins/ssh: remove pointless code fetching SHA1 fingerprint

2021-06-22 Thread Daniel P . Berrangé
fingerprint stored in the $HOME/.ssh/known_hosts file. The hashes in this file will use the algorithm configured for the openssh client, which will usually be SHA256 in modern OS. Signed-off-by: Daniel P. Berrangé --- plugins/ssh/ssh.c | 14 -- 1 file changed, 14 deletions(-) diff

Re: [Libguestfs] [libnbd PATCH 0/5] Introduce automated testing using GitLab CI

2021-05-11 Thread Daniel P . Berrangé
On Tue, May 11, 2021 at 01:34:19PM +0100, Richard W.M. Jones wrote: > On Tue, May 11, 2021 at 12:16:19PM +0100, Richard W.M. Jones wrote: > > On Thu, May 06, 2021 at 01:30:05PM +0200, Martin Kletzander wrote: > > > FreeBSD > > > === > > > > > > The build fails because there is no fallocate()

Re: [Libguestfs] GNU-isms in sed expressions in libnbd tests

2021-05-11 Thread Daniel P . Berrangé
On Tue, May 11, 2021 at 01:41:07PM +0100, Richard W.M. Jones wrote: > > In info/info-text.sh and info/info-list.sh, FreeBSD sed complains: > > + sed -n '/contexts:/ { N; p; q }; $ q1' info-text.out > sed: 1: "/contexts:/ { N; p; q } ...": extra characters at the end of q > command > > If I

[Libguestfs] [PATCH] point users to Libera Chat rather than FreeNode

2021-05-27 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- docs/guestfs-faq.pod | 2 +- website/index.html.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guestfs-faq.pod b/docs/guestfs-faq.pod index bea609591..15b1247b0 100644 --- a/docs/guestfs-faq.pod +++ b/docs/guestfs-faq.pod

Re: [Libguestfs] [PATCH nbdkit] Set visibility to default for exported symbols

2021-06-02 Thread Daniel P . Berrangé
On Wed, Jun 02, 2021 at 09:05:26PM +0100, Richard W.M. Jones wrote: > In plugins we expect the plugin_init function to be exported as well > as *_debug_* variables. In the server various nbdkit_* functions > should be exported. > > If you compile nbdkit with -fvisibility=hidden some of these

Re: [Libguestfs] [PATCH nbdkit] golang: Add go.mod files, remove use of $GOPATH.

2021-04-01 Thread Daniel P . Berrangé
this dir. If desired, you can avoid needing these per-example go.mod files by moving the src/libguestfs.org/nbdkit files into a direct ancestor directory of the examples. Either approach works though, and neither is inherantly bad or wrong, so pick your favourite, and on that basis Reviewed-by

Re: [Libguestfs] [PATCH] docs: Link to protocol security considerations in uri docs

2021-08-18 Thread Daniel P . Berrangé
On Wed, Aug 18, 2021 at 11:02:48AM -0500, Eric Blake wrote: > On Mon, Aug 16, 2021 at 05:25:02PM +0200, Wouter Verhelst wrote: > > > As a followup, I got this reply from Hanno Böck on oss-security: > > > > > > https://www.openwall.com/lists/oss-security/2021/08/11/8 > > > | The buffering

Re: [Libguestfs] Fwd: libnbd | Failed pipeline for master | 2e381ac2

2021-08-27 Thread Daniel P . Berrangé
On Fri, Aug 27, 2021 at 11:09:13AM +0100, Richard W.M. Jones wrote: > >From the log: > https://gitlab.com/nbdkit/libnbd/-/jobs/1540375264 > > opensuse zypper seems to be failing with a recoverable error: > > Resolving package dependencies... > Problem: the to be installed

Re: [Libguestfs] [PATCH] lib: direct: Remove use of sga

2021-09-09 Thread Daniel P . Berrangé
On Wed, Sep 08, 2021 at 04:42:05PM +0100, Richard W.M. Jones wrote: > sga (or "sgabios" or "Serial Graphics Adapter") is an option ROM for > seabios which directs output to the serial adapter. This is very > useful for debugging BIOS problems during boot. > > RHEL wants to deprecate this feature

Re: [Libguestfs] [PATCH] lib: direct: Remove use of sga

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 12:35:12PM +0100, Richard W.M. Jones wrote: > On Thu, Sep 09, 2021 at 01:11:09PM +0200, Laszlo Ersek wrote: > > How does libguestfs deal with different QEMU versions / QEMU feature > > deprecation? Is there some kind of feature detection? > > Kind of, but it's only

Re: [Libguestfs] [PATCH 4/4] Go bindings: fix "C array of strings" -- char** -- allocation

2021-09-20 Thread Daniel P . Berrangé
On Mon, Sep 20, 2021 at 07:23:35AM +0200, Laszlo Ersek wrote: > The current "arg_string_list" and "free_string_list" implementations go > back to commit b6f01f32606d ("Add Go (language) bindings.", 2013-07-03). > There are two problems with them: > > - "free_string_list" doesn't actually free

Re: [Libguestfs] [PATCH 4/4] Go bindings: fix "C array of strings" -- char** -- allocation

2021-09-20 Thread Daniel P . Berrangé
On Mon, Sep 20, 2021 at 05:23:30PM +0200, Laszlo Ersek wrote: > On 09/20/21 14:33, Daniel P. Berrangé wrote: > > On Mon, Sep 20, 2021 at 12:03:51PM +0100, Richard W.M. Jones wrote: > >> On Mon, Sep 20, 2021 at 11:37:02AM +0100, Daniel P. Berrangé wrote: > >>> What

Re: [Libguestfs] [PATCH 4/4] Go bindings: fix "C array of strings" -- char** -- allocation

2021-09-20 Thread Daniel P . Berrangé
On Mon, Sep 20, 2021 at 12:03:51PM +0100, Richard W.M. Jones wrote: > On Mon, Sep 20, 2021 at 11:37:02AM +0100, Daniel P. Berrangé wrote: > > What distro / go version do you see this on, as I can't reproduce > > this pointer problem with a standalone demo app ? > > For me t

Re: [Libguestfs] [PATCH 4/4] Go bindings: fix "C array of strings" -- char** -- allocation

2021-09-20 Thread Daniel P . Berrangé
On Mon, Sep 20, 2021 at 05:11:38PM +0200, Laszlo Ersek wrote: > On 09/20/21 12:37, Daniel P. Berrangé wrote: > > On Mon, Sep 20, 2021 at 07:23:35AM +0200, Laszlo Ersek wrote: > >> It turns out that a C-language array containing C-language pointers can > >> only be allo

Re: [Libguestfs] [libnbd PATCH] ci: Adopt libvirt-ci's manifest approach

2021-09-23 Thread Daniel P . Berrangé
che/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin:/usr/local/opt/rpcgen/bin > + PKG_CONFIG_PATH: > /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfi

  1   2   >