Re: [Libguestfs] [PATCH libguestfs 2/2] lib: Return correct osinfo field for Windows 11

2022-12-01 Thread Richard W.M. Jones
On Thu, Dec 01, 2022 at 10:34:09AM +, Richard W.M. Jones wrote: > For Windows Client, we can only distinguish between Windows 10 and > Windows 11 using the build ID. The product name in both cases is > "Windows 10 ", apparently intentionally. > > References: > ht

[Libguestfs] [PATCH v2v] rhv: Use osinfo to distinguish Windows >= 10 variants

2022-12-01 Thread Richard W.M. Jones
Windows versions >= 10 no longer use the NT major.minor numbering scheme (it is fixed at 10.0). Libguestfs >= 1.49.8 can distinguish these versions and it sets correctly, so use that instead. After this change the OVF will contain: Windows 10 Pro windows_11 which is strange, but

[Libguestfs] [PATCH guestfs-tools] inspector: Display the new build ID field

2022-12-01 Thread Richard W.M. Jones
libguestfs 1.49.8 adds a new API to read the build ID from guests (especially for Windows). If the new API is available and if it returns a string other than "unknown", then print it in virt-inspector output. --- inspector/inspector.c| 8 inspector/virt-inspector.rng | 1 + 2

[Libguestfs] [PATCH libguestfs 2/2] lib: Return correct osinfo field for Windows 11

2022-12-01 Thread Richard W.M. Jones
For Windows Client, we can only distinguish between Windows 10 and Windows 11 using the build ID. The product name in both cases is "Windows 10 ", apparently intentionally. References: https://learn.microsoft.com/en-us/answers/questions/586619/windows-11-build-ver-is-still-10022000194.html

[Libguestfs] [PATCH libguestfs 1/2] New API: inspect_get_build_id

2022-12-01 Thread Richard W.M. Jones
Add an API to return the build ID of the guest. This to allow a future change to be able to distinguish between Windows 10 and Windows 11 which can only be done using the build ID. For Windows we can read the CurrentBuildNumber key from the registry. For Linux there happens to be a BUILD_ID

[Libguestfs] [PATCH libguestfs 0/2] lib: Return correct osinfo field for Windows 11

2022-12-01 Thread Richard W.M. Jones
https://bugzilla.redhat.com/show_bug.cgi?id=2012658 We don't currently detect the correct version for Windows 11 (client, server is OK). After some discussion it turns out the accepted way to do this is to look at the Windows build ID. So add some code in the daemon to grab the build ID from

Re: [Libguestfs] [PATCH v2v] New virt-v2v-inspector tool

2022-11-26 Thread Richard W.M. Jones
Thanks for the review. That's upstream now in commit 0805ea93796b8b57e7c9f0bc04f83ea76a9820a5. I fixed up the commit message and added a non-mandatory -O option to control output. We can keep it experimental status for now and decide before virt-v2v 2.2 (next stable) if we want to keep it or

Re: [Libguestfs] [PATCH v2v] New virt-v2v-inspector tool

2022-11-24 Thread Richard W.M. Jones
On Thu, Nov 24, 2022 at 10:54:42AM +0100, Laszlo Ersek wrote: > On 11/22/22 16:47, Richard W.M. Jones wrote: > > In Kubernetes and tools like Kubevirt, it's not possible to create > > some disks and then attach to them (in order to populate them with > > data) in one step.

Re: [Libguestfs] Failing guestfish command in

2022-11-23 Thread Richard W.M. Jones
On Tue, Nov 22, 2022 at 07:19:31AM +, Addison Gourluck wrote: > Hey, > > I'm trying to use guestfish to run a few lvm-related commands on an image, but > I'm getting errors. The error message suggested that I should send the error > output to this mailing list. > > The simplest version of

[Libguestfs] [PATCH v2v] New virt-v2v-inspector tool

2022-11-22 Thread Richard W.M. Jones
In Kubernetes and tools like Kubevirt, it's not possible to create some disks and then attach to them (in order to populate them with data) in one step. This makes virt-v2v conversions awkward because ideally we would like the output mode (-o kubevirt) to both create the target disks and populate

[Libguestfs] [PATCH v2v] New virt-v2v-inspector tool

2022-11-22 Thread Richard W.M. Jones
nt variables used are the same as for virt-v2v. See +L. + +=head1 SEE ALSO + +L, +L, +L, +L, +L, +L, +L, +L<http://libguestfs.org/>. + +=head1 AUTHORS + +Matthew Booth + +Cédric Bosdonnat + +Laszlo Ersek + +Tomáš Golembiovský + +Shahar Havivi + +Richard W.M. Jones + +Roman Kagan + +Mik

Re: [Libguestfs] [hivex PATCH] Add OCaml 5.0 support

2022-11-18 Thread Richard W.M. Jones
On Wed, Nov 16, 2022 at 07:00:57PM +, Kate Deplaix wrote: > Hi, > > Here is a patch to add support to the upcoming OCaml 5.0 to hivex: https:// > github.com/kit-ty-kate/hivex/commit/e89b4ab014fa764bf392275ba0dfa7631ea7689b > > This new release of the compiler will be released early next

[Libguestfs] OpenSUSE virt-builder error

2022-11-17 Thread Richard W.M. Jones
Since a lot of people have asked me on IRC already this morning, let's try to make this searchable ... $ virt-builder --list virt-builder: error: failed to download http://download.opensuse.org/repositories/Virtualization:/virt-builder-images/images/index: HTTP status code 404 The

Re: [Libguestfs] [nbdkit PATCH v2 2/2] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-15 Thread Richard W.M. Jones
On Tue, Nov 15, 2022 at 06:40:33PM +0100, Laszlo Ersek wrote: > On 11/15/22 17:02, Richard W.M. Jones wrote: > > On Thu, Nov 10, 2022 at 04:08:57PM +0100, Laszlo Ersek wrote: > >> Per perlpod(1), the canonical Formatting Code for this would be Z<>, as > >> in

Re: [Libguestfs] [libnbd PATCH] api: Generate flag values as unsigned

2022-11-15 Thread Richard W.M. Jones
On Fri, Nov 11, 2022 at 11:27:51AM -0600, Eric Blake wrote: > C says that performing bitwise math on ints can lead to corner-case > undefined values. When we document something as being usable as a > flag with bitwise-OR and similar, we should ensure the values are > unsigned, to avoid those

Re: [Libguestfs] [libnbd PATCH 1/2] api: Add LIBNBD_STRICT_PAYLOAD to honor qemu 32M write limit

2022-11-15 Thread Richard W.M. Jones
On Wed, Nov 09, 2022 at 05:26:06PM -0600, Eric Blake wrote: > Modern qemu tends to advertise a strict 32M payload limit. Yet we > default to allowing the user to attempt up to 64M in pwrite. For > pread, qemu will reply with EINVAL but keep the connection up; but for > pwrite, an overlarge

Re: [Libguestfs] [nbdkit PATCH v2 2/2] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-15 Thread Richard W.M. Jones
tderr, although a missing error defaults to > +C instead of C). > + > +=item 9-15 > + > +These exit codes are reserved for future use. Note that versions of > +nbdkit E 1.34 documented that codes S<8> through S<15> behaved > +like code S<1>; although it is u

Re: [Libguestfs] [nbdkit PATCH v2 2/2] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-15 Thread Richard W.M. Jones
On Thu, Nov 10, 2022 at 04:08:57PM +0100, Laszlo Ersek wrote: > Per perlpod(1), the canonical Formatting Code for this would be Z<>, as > in (untested): > > =item Z<>6 > > However, I can't see a single instance of Z<> in the v2v projects, so it > could cause compatibility problems. I guess let's

Re: [Libguestfs] [nbdkit PATCH v2 1/2] sh: Advertise max known status in --dump-plugin

2022-11-15 Thread Richard W.M. Jones
gests this might be better with some enum sentinel to record the first reserved value. Anyway it's all good so: Reviewed-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpr

Re: [Libguestfs] [p2v PATCH] disks.c: skip SCSI floppy drives with no disk inserted

2022-11-15 Thread Richard W.M. Jones
On Fri, Nov 11, 2022 at 03:24:18PM +0100, Laszlo Ersek wrote: > Hi Rich, > > On 11/09/22 14:52, Laszlo Ersek wrote: > > A SCSI floppy drive with no disk inserted looks like a normal /dev/sd* > > node, but causes the nbdkit file plugin to fail with ENOMEDIUM. Filter out > > such devices altogether

Re: [Libguestfs] [PATCH v2] curl: Fix verification of CURLOPT_TLS13_CIPHERS

2022-11-10 Thread Richard W.M. Jones
On Thu, Nov 10, 2022 at 05:17:35PM +0100, Michal Orzel wrote: > The code checking for CURLOPT_TLS13_CIPHERS option did not work > properly, because of incorrect assumption that this symbol was a > preprocessor macro. It is in fact element of enum type, which > resulted with #ifdef directive

Re: [Libguestfs] [nbdkit PATCH] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-10 Thread Richard W.M. Jones
On Wed, Nov 09, 2022 at 01:47:15PM -0600, Eric Blake wrote: > On Wed, Nov 02, 2022 at 01:36:26PM +0000, Richard W.M. Jones wrote: > > > > -=item 4, 5, 6, 7 > > > > +=item S<4> > > > > > > The S<> notation seems new here (so it's going to

Re: [Libguestfs] [nbdkit PATCH] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-10 Thread Richard W.M. Jones
On Thu, Nov 10, 2022 at 02:23:39PM +0100, Laszlo Ersek wrote: > On 11/09/22 20:47, Eric Blake wrote: > > On Wed, Nov 02, 2022 at 01:36:26PM +, Richard W.M. Jones wrote: > >>>> -=item 4, 5, 6, 7 > >>>> +=item S<4> > >>> > >>&

Re: [Libguestfs] [PATCH] curl: Fix verification of CURLOPT_TLS13_CIPHERS

2022-11-08 Thread Richard W.M. Jones
On Tue, Nov 08, 2022 at 12:56:13PM +0100, Michal Orzel wrote: > The code checking for CURLOPT_TLS13_CIPHERS option did not work > properly, because of incorrect assumption that this symbol was a > preprocessor macro. It is in fact element of enum type, which > resulted with #ifdef directive

Re: [Libguestfs] [PATCH libnbd 0/2] ocaml: Simplify the sockaddr test

2022-11-07 Thread Richard W.M. Jones
On Mon, Nov 07, 2022 at 10:39:27AM +0100, Laszlo Ersek wrote: > On 11/04/22 13:45, Richard W.M. Jones wrote: > > Not as bad as I thought it would be! > > > > Rich. > > > > > > series > Reviewed-by: Laszlo Ersek Thanks - upstream in:

Re: [Libguestfs] [libnbd PATCH v2 3/3] nbdsh: Improve --help and initial banner contents.

2022-11-05 Thread Richard W.M. Jones
For the series: Acked-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows

Re: [Libguestfs] [libnbd PATCH v2 3/3] nbdsh: Improve --help and initial banner contents.

2022-11-05 Thread Richard W.M. Jones
On Sat, Nov 05, 2022 at 03:39:26AM +0200, Nir Soffer wrote: > On Fri, Nov 4, 2022 at 11:18 PM Eric Blake wrote: > [...] > > @@ -127,7 +129,10 @@ def __call__(self, parser, namespace, values, > option_string=None): >          os.environ["LIBNBD_DEBUG"] = "1" > >      # Create the

[Libguestfs] [PATCH libnbd 2/2] ocaml: Simplify the sockaddr test

2022-11-04 Thread Richard W.M. Jones
The sockaddr test added in commit 50500aade9 ("ocaml: Implement sockaddr type") was quite complicated because it had to run nbdkit as a subprocess, manage the socket, check for a PID file etc. The simpler way of doing this is to make it work like the Python test (python/test-aio-connect-unix.sh)

[Libguestfs] [PATCH libnbd 0/2] ocaml: Simplify the sockaddr test

2022-11-04 Thread Richard W.M. Jones
Not as bad as I thought it would be! Rich. ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

[Libguestfs] [PATCH libnbd 1/2] python: Rename the aio-connect test

2022-11-04 Thread Richard W.M. Jones
This is a test, but it had a confusing name, so rename it to test-*.sh. Updates: commit b8d0dd8e8d15219161dad9d029ece0b49fcbb565 --- python/Makefile.am| 4 ++-- .../{python-aio-connect-unix.sh => test-aio-connect-unix.sh} | 0 2 files changed, 2

Re: [Libguestfs] [PATCH libnbd] ocaml: Implement sockaddr type

2022-11-04 Thread Richard W.M. Jones
On Fri, Nov 04, 2022 at 08:22:59AM +0100, Laszlo Ersek wrote: > On 11/03/22 16:16, Richard W.M. Jones wrote: > > On Thu, Nov 03, 2022 at 04:03:42PM +0100, Laszlo Ersek wrote: > >> On 11/02/22 22:10, Richard W.M. Jones wrote: > >>> +open Unix > >>> +open P

Re: [Libguestfs] [PATCH libnbd] ocaml: Implement sockaddr type

2022-11-03 Thread Richard W.M. Jones
On Thu, Nov 03, 2022 at 04:03:42PM +0100, Laszlo Ersek wrote: > On 11/02/22 22:10, Richard W.M. Jones wrote: > > +open Unix > > +open Printf > > + > > +let () = > > + let nbd = NBD.create () in > > + > > + (* Unlike other tests, we're going to

Re: [Libguestfs] [PATCH libnbd] ocaml: Implement sockaddr type

2022-11-02 Thread Richard W.M. Jones
On Wed, Nov 02, 2022 at 09:10:02PM +, Richard W.M. Jones wrote: > Convert Unix.sockaddr to struct sockaddr. OCaml provides a function > to do this ('get_sockaddr' - not namespaced!) This function was > present at least as far back as RHEL 7 (OCaml 4.05). The namespacing has actu

[Libguestfs] [PATCH libnbd] ocaml: Implement sockaddr type

2022-11-02 Thread Richard W.M. Jones
Convert Unix.sockaddr to struct sockaddr. OCaml provides a function to do this ('get_sockaddr' - not namespaced!) This function was present at least as far back as RHEL 7 (OCaml 4.05). This also adds a simple test. --- generator/OCaml.ml | 8 ++-- ocaml/helpers.c

[Libguestfs] [PATCH libnbd] ocaml: Implement sockaddr type

2022-11-02 Thread Richard W.M. Jones
This is pushed already, commit 50500aade9. ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [nbdkit PATCH] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-02 Thread Richard W.M. Jones
On Tue, Nov 01, 2022 at 02:56:09PM -0500, Eric Blake wrote: ... > +=item S<6> > + > +Triggers a call to the C function C with C > +set to false, which requests a soft disconnect of the current client > +(future client requests are rejected with C without calling > +into the plugin, but current

Re: [Libguestfs] [nbdkit PATCH] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-02 Thread Richard W.M. Jones
On Wed, Nov 02, 2022 at 02:15:45PM +0100, Laszlo Ersek wrote: > On 11/01/22 20:56, Eric Blake wrote: > > Make it possible for the sh and eval plugins to disconnect a client or > > shut down the entire nbdkit server by use of special return values. > > Prior to this patch we had reserved 4-7 for

Re: [Libguestfs] [nbdkit PATCH 2/4] server: Give client EOF when we are done writing

2022-10-31 Thread Richard W.M. Jones
On Mon, Oct 31, 2022 at 08:56:48AM -0500, Eric Blake wrote: > On Thu, Oct 27, 2022 at 09:49:52AM +0100, Richard W.M. Jones wrote: > > On Wed, Oct 26, 2022 at 05:18:00PM -0500, Eric Blake wrote: > > > - if (conn->sockin >= 0) > > > -closesocket (conn->sock

Re: [Libguestfs] [nbdkit PATCH 4/4] blocksize-policy: Add blocksize-write-disconnect=N parameter

2022-10-27 Thread Richard W.M. Jones
es_sent\"): > +if expect_traffic: > + assert h.stats_bytes_sent() > start > +else: > + assert h.stats_bytes_sent() == start > + > +h.set_strict_mode(0) # Bypass client-side safety checks > +# Beyond 64M > +check(h, 64*1024*1024 + 1, errno.ERANGE, False

Re: [Libguestfs] [nbdkit PATCH 3/4] api: Add nbdkit_disconnect(int)

2022-10-27 Thread Richard W.M. Jones
the > + * documentation and/or other materials provided with the distribution. > + * > + * * Neither the name of Red Hat nor the names of its contributors may be > + * used to endorse or promote products derived from this software without > + * specific prior written permission. > + * >

Re: [Libguestfs] [nbdkit PATCH 2/4] server: Give client EOF when we are done writing

2022-10-27 Thread Richard W.M. Jones
On Wed, Oct 26, 2022 at 05:18:00PM -0500, Eric Blake wrote: > - if (conn->sockin >= 0) > -closesocket (conn->sockin); > - if (conn->sockout >= 0 && conn->sockin != conn->sockout) > -closesocket (conn->sockout); > + if (conn->sockout >= 0 && how == SHUT_WR) { > +if (conn->sockin ==

Re: [Libguestfs] [nbdkit PATCH 1/4] server: Switch connection status to enum

2022-10-27 Thread Richard W.M. Jones
, flags, > - count, offset, > - extents); > +send_structured_reply_block_status (request.handle, cmd, flags, > +count, offset, extents);

Re: [Libguestfs] [libnbd PATCH 3/3] nbdsh: Allow -u interleaved with -c

2022-10-27 Thread Richard W.M. Jones
It's confusing having patches 1 & 3 separate. I can't help thinking this whole series would be easier to understand if instead of building a list of Python commands as strings, we built a list of "instructions", where an instruction is a qualified union which (in OCaml) would be: type

Re: [Libguestfs] [libnbd PATCH 1/3] nbdsh: Refactor handling of -u and friends

2022-10-27 Thread Richard W.M. Jones
On Wed, Oct 26, 2022 at 04:15:59PM -0500, Eric Blake wrote: > Slightly rearrange the code so that we can reuse the -c framework for > executing the code snippets for -u, --opt-mode, and --base-allocation. > Slightly changes the error message when a URI is invalid (which > requires revamping

Re: [Libguestfs] distutils use in hivex libdnet libnbd (and more) [was: Re: Help needed triaging build failures without distutils]

2022-10-24 Thread Richard W.M. Jones
On Mon, Oct 24, 2022 at 06:00:31PM +0200, Miro Hrončok wrote: > On 24. 10. 22 15:14, Richard W.M. Jones wrote: > >Original code: > > > > $ python3 -c 'import distutils.sysconfig; > > print(distutils.sysconfig.get_python_lib(1,0));' > > /usr/lib64/python3.

Re: [Libguestfs] distutils use in hivex libdnet libnbd (and more) [was: Re: Help needed triaging build failures without distutils]

2022-10-24 Thread Richard W.M. Jones
[Sending 2nd email again since it didn't reach the Python-devel list first time] On Tue, Oct 18, 2022 at 11:13:47AM +0100, Richard W.M. Jones wrote: > On Tue, Oct 18, 2022 at 10:53:12AM +0100, Richard W.M. Jones wrote: > > https://github.com/libguestfs/libguestfs/blob/master/m

Re: [Libguestfs] distutils use in hivex libdnet libnbd (and more) [was: Re: Help needed triaging build failures without distutils]

2022-10-24 Thread Richard W.M. Jones
[Sending again since it didn't reach the Python-devel list first time] On Tue, Oct 18, 2022 at 10:53:12AM +0100, Richard W.M. Jones wrote: > On Tue, Oct 18, 2022 at 11:27:47AM +0200, Miro Hrončok wrote: > > Hey Pythonistas. > > > > The Python standard library distutils m

Re: [Libguestfs] [nbdkit PATCH 06/10] build: Only attempt to build vddk on Linux

2022-10-20 Thread Richard W.M. Jones
On Thu, Oct 20, 2022 at 11:09:29PM +0100, Richard W.M. Jones wrote: > On Thu, Oct 20, 2022 at 03:32:05PM -0500, Eric Blake wrote: > > When --enable/disable-vddk is not given to configure, our default was > > to base on the current architecture. But we know that we are > > ta

Re: [Libguestfs] [nbdkit PATCH 10/10] ci: Fix typo in last patch

2022-10-20 Thread Richard W.M. Jones
The series looks sensible, thanks for pushing! Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows

Re: [Libguestfs] [nbdkit PATCH 06/10] build: Only attempt to build vddk on Linux

2022-10-20 Thread Richard W.M. Jones
On Thu, Oct 20, 2022 at 03:32:05PM -0500, Eric Blake wrote: > When --enable/disable-vddk is not given to configure, our default was > to base on the current architecture. But we know that we are > targeting a .so library built for Linux, so we can also gate things > based on the host OS. And

Re: [Libguestfs] Why cant't use the pie link option when compiling libgustfs

2022-10-20 Thread Richard W.M. Jones
On Fri, Oct 21, 2022 at 12:10:43AM +0800, guiHua wrote: > Hello >When I compile libgustfs, it will throw exception: undefined reference to > 'caml_local_roots' when adding pie link option. > Why is that? The command is like this: > ./configure CFLAGS="-O2 -fPIC" LDFLAGS="-pie -Wl". Is

Re: [Libguestfs] distutils use in hivex libdnet libnbd (and more) [was: Re: Help needed triaging build failures without distutils]

2022-10-18 Thread Richard W.M. Jones
On Tue, Oct 18, 2022 at 10:53:12AM +0100, Richard W.M. Jones wrote: > https://github.com/libguestfs/libguestfs/blob/master/m4/guestfs-python.m4 Actually some help for how to replace it would be useful too as sysconfig is not an exact replacement for distutils.sysconfig. In particu

[Libguestfs] distutils use in hivex libdnet libnbd (and more) [was: Re: Help needed triaging build failures without distutils]

2022-10-18 Thread Richard W.M. Jones
On Tue, Oct 18, 2022 at 11:27:47AM +0200, Miro Hrončok wrote: > Hey Pythonistas. > > The Python standard library distutils module will be removed from Python 3.12+ > > https://peps.python.org/pep-0632/ Annoying, but OK ... > As preparatory work, we build all python packages in a Copr

Re: [Libguestfs] [nbdkit PATCH] rust: prevent dead_code warning

2022-10-15 Thread Richard W.M. Jones
Thanks - I'll push Thomas's patch shortly. We can always revert it later when the updated mockall package is released. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is

Re: [Libguestfs] [nbdkit PATCH] rust: prevent dead_code warning

2022-10-15 Thread Richard W.M. Jones
On Fri, Oct 14, 2022 at 10:59:30PM +0200, Thomas Weißschuh wrote: > On 2022-10-14 21:54+0100, Richard W.M. Jones wrote: > > On Fri, Oct 14, 2022 at 10:42:30PM +0200, Thomas Weißschuh wrote: > > > rustc 1.64.0 generates warnings for the mocked Server. > > > This le

Re: [Libguestfs] [nbdkit PATCH] rust: prevent dead_code warning

2022-10-14 Thread Richard W.M. Jones
On Fri, Oct 14, 2022 at 10:42:30PM +0200, Thomas Weißschuh wrote: > rustc 1.64.0 generates warnings for the mocked Server. > This leads to a failure of test.sh. > > ``` > warning: associated function `expect` is never used > --> tests/common/mod.rs:49:1 >| > 49 | / mock!{ > 50 | | pub

Re: [Libguestfs] bug in gnutls_init()

2022-10-14 Thread Richard W.M. Jones
On Thu, Oct 13, 2022 at 02:04:34PM -0500, Eric Blake wrote: > I just fixed a bug in nbdkit for incorrectly calling > free(gnutls_session_t) after gnutls_init(, ...) fails: > https://gitlab.com/nbdkit/nbdkit/-/commit/40faf3dfb20c06b9c5faa0a122607e3ae7c6202a > > But in the process, I was browsing

Re: [Libguestfs] libnbd | Failed pipeline for master | 018d55a8

2022-10-13 Thread Richard W.M. Jones
On Wed, Oct 12, 2022 at 02:00:21PM -0500, Eric Blake wrote: > > Job #3163966643 ( https://gitlab.com/nbdkit/libnbd/-/jobs/3163966643/raw ) > > > > Stage: builds > > Name: x86_64-opensuse-leap-153-prebuilt-env > > This one is still failing because of a bug in gnutls; the log is > reporting: > >

Re: [Libguestfs] [libnbd PATCH 2/2] info: Add --is tls, --can structured-reply

2022-10-12 Thread Richard W.M. Jones
Looks good, ACK series. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit

Re: [Libguestfs] redhat-based EL9 distros not supported?

2022-10-11 Thread Richard W.M. Jones
The fix is upstream in 8858fc63e6 and will be in CentOS Stream soon. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and

Re: [Libguestfs] redhat-based EL9 distros not supported?

2022-10-10 Thread Richard W.M. Jones
.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit >From 85f3e4d084b71c4fac84d729f14c798001df2076 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 10 Oct 2

Re: [Libguestfs] [libnbd PATCH] RFC: fuzzing: Break up handshake into more steps

2022-10-09 Thread Richard W.M. Jones
FYI I restarted the fuzzing at commit c5a4042640 which includes this patch. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines.

Re: [Libguestfs] redhat-based EL9 distros not supported?

2022-10-07 Thread Richard W.M. Jones
On Fri, Oct 07, 2022 at 04:33:01PM +, Harry Bryson wrote: > Prior to Enterprise Linux 9, it seems some Red Hat based distros returned > "redhat-based" for inspect-get-distro > This allowed things like "virt-customize --firstboot-command" to work as this > matched the supported distro list,

Re: [Libguestfs] [libnbd PATCH] RFC: fuzzing: Break up handshake into more steps

2022-10-07 Thread Richard W.M. Jones
On Fri, Oct 07, 2022 at 07:37:19AM -0500, Eric Blake wrote: > On Fri, Oct 07, 2022 at 10:22:57AM +0100, Richard W.M. Jones wrote: > > On Thu, Oct 06, 2022 at 04:34:52PM -0500, Eric Blake wrote: > > > Give the fuzzer a few more points to experiment with added branching > > &

Re: [Libguestfs] [libnbd PATCH] RFC: fuzzing: Break up handshake into more steps

2022-10-07 Thread Richard W.M. Jones
On Thu, Oct 06, 2022 at 04:34:52PM -0500, Eric Blake wrote: > Give the fuzzer a few more points to experiment with added branching > by explicitly using opt mode. > --- > > I'm not quite sure whether the fuzzer is able to synthesize specific > API calls from the client side; but if it can,

Re: [Libguestfs] Parameter 'encrypt.key-secret' is required for cipher for virt-ls

2022-10-06 Thread Richard W.M. Jones
On Thu, Oct 06, 2022 at 12:16:36PM +0200, Laszlo Ersek wrote: > On 10/05/22 16:06, Do Re wrote: > > Hello all, > > > > background: One of my VM stopped working - on startup, I get the message > > "No bootable device" in the virtual machine. > > > > I would like to inspect the corresponding image

Re: [Libguestfs] [libnbd PATCH] api: Add nbd_[aio_]opt_starttls

2022-10-06 Thread Richard W.M. Jones
On Tue, Oct 04, 2022 at 07:51:18AM -0500, Eric Blake wrote: > Very similar to the recent addition of nbd_opt_structured_reply, with > the new nbd_opt_starttls() finally giving us fine-grained control over > NBD_OPT_STARTTLS, and allowing productive handshaking with a server in > SELECTIVETLS mode.

Re: [Libguestfs] Image Mounting Issue

2022-10-01 Thread Richard W.M. Jones
On Sat, Oct 01, 2022 at 02:07:30AM +, Bryce Zimmer wrote: > See the attached output of libguestfs-test-tool. > > I’m trying to mount an image to eve-ng VM using their instructions and ran > into > an error. > > > > These are the instructions I was following. > >

Re: [Libguestfs] [libnbd PATCH] RFC: generator: Mark APIs with allocator/deallocator semantics

2022-09-30 Thread Richard W.M. Jones
On Fri, Sep 30, 2022 at 10:42:01AM -0500, Eric Blake wrote: > Modern GCC has two related attributes for functions returning a > pointer: > > __attribute__((__malloc__)) - this function returns a new pointer, not > aliased to any existing pointer > > __attribute__((__malloc__(fn,1))) - call

Re: [Libguestfs] [p2v PATCH 2/2] dependencies.m4: add librsvg2

2022-09-30 Thread Richard W.M. Jones
For the series: Reviewed-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html

Re: [Libguestfs] another GTK3 regression...

2022-09-30 Thread Richard W.M. Jones
On Fri, Sep 30, 2022 at 03:57:15PM +0200, Laszlo Ersek wrote: > This is the same terrible "push" (or "registration") model (rather than > the "pull") model that plagues systemd: if a kernel module is missing > from the initrd that's needed for driving a device or a filesystem, the > boot gets

Re: [Libguestfs] another GTK3 regression...

2022-09-30 Thread Richard W.M. Jones
On Fri, Sep 30, 2022 at 02:58:19PM +0200, Laszlo Ersek wrote: > On 09/30/22 13:52, Daniel P. Berrangé wrote: > > On Fri, Sep 30, 2022 at 12:56:40PM +0200, Laszlo Ersek wrote: > >> On 09/30/22 11:46, Daniel P. Berrangé wrote: > >>> On Fri, Sep 30, 2022 at 10:33:02AM +

Re: [Libguestfs] another GTK3 regression...

2022-09-30 Thread Richard W.M. Jones
On Fri, Sep 30, 2022 at 01:11:50PM +0100, Richard W.M. Jones wrote: > icewm is available in RHEL 9. Actually as Dan says, this isn't true. I checked and it comes from EPEL: # dnf install icewm Updating Subscription Management repositories. Unable to read consumer identity This sys

Re: [Libguestfs] [v2v PATCH] convert_linux: include the BOCHS DRM driver in the initial ram disk

2022-09-30 Thread Richard W.M. Jones
irtio_ring"; "virtio_blk"; > - "virtio_scsi"; "virtio_net"; "virtio_pci"; "xts" ] in > +"virtio_scsi"; "virtio_net"; "virtio_pci"; "xt

Re: [Libguestfs] another GTK3 regression...

2022-09-30 Thread Richard W.M. Jones
On Fri, Sep 30, 2022 at 01:01:09PM +0200, Laszlo Ersek wrote: > Also I reckon Rich does not use metacity -- originally a gtk2-based > window manager -- on his laptop, but the gnome shell. gnome shell could > similarly eliminate the issue. (Assuming we agree that the issue is *in* > metacity.)

Re: [Libguestfs] another GTK3 regression...

2022-09-30 Thread Richard W.M. Jones
On Fri, Sep 30, 2022 at 12:56:40PM +0200, Laszlo Ersek wrote: > On 09/30/22 11:46, Daniel P. Berrangé wrote: > > On Fri, Sep 30, 2022 at 10:33:02AM +0100, Richard W.M. Jones wrote: > >> > >> Hmm, here's an interesting stackoverflow posting ... > >> > >>

Re: [Libguestfs] another GTK3 regression...

2022-09-30 Thread Richard W.M. Jones
Hmm, here's an interesting stackoverflow posting ... https://stackoverflow.com/questions/3301023/gtk-spinner-not-appearing The first point is "Make sure librsvg is installed". librsvg is _not_ installed in the ISO. Laszlo, can you try building an ISO with this package explicitly added to the

Re: [Libguestfs] another GTK3 regression...

2022-09-30 Thread Richard W.M. Jones
On Fri, Sep 30, 2022 at 10:04:27AM +0100, Daniel P. Berrangé wrote: > As an idea to debug it more, try using the GTK inspector > >$ GTK_DEBUG=interactive > > this will popup a second window, which lets you browse the > widget hierarchy, view properties, etc. This might let you > see

Re: [Libguestfs] another GTK3 regression...

2022-09-30 Thread Richard W.M. Jones
On Fri, Sep 30, 2022 at 08:55:02AM +0100, Daniel P. Berrangé wrote: > On Thu, Sep 29, 2022 at 07:12:15PM +0100, Richard W.M. Jones wrote: > > On Thu, Sep 29, 2022 at 04:47:34PM +0200, Laszlo Ersek wrote: > > > http://lacos.interhost.hu/livecd-p2v-202209291608-g

Re: [Libguestfs] another GTK3 regression...

2022-09-29 Thread Richard W.M. Jones
On Thu, Sep 29, 2022 at 04:47:34PM +0200, Laszlo Ersek wrote: > http://lacos.interhost.hu/livecd-p2v-202209291608-gitc213ae00a337.iso > > (built at c213ae00a337) > > sha256: f3a149aeab0179213d74bb1eac30d5d6f807d4c9cf3a548667903d5434d5699a No spinner! While I remember, an annoying virt-p2v bug

Re: [Libguestfs] [PATCH nbdkit] rust: Drop box ptr

2022-09-29 Thread Richard W.M. Jones
Thu, Sep 29, 2022 at 8:21 AM Richard W.M. Jones wrote: > > > > Because of this recent change to rust, our close function warned that > > we calculate Box::from_raw but never use it. I added the suggested > > call to drop() around the function. > > > &

Re: [Libguestfs] [PATCH libnbd v3 2/6] generator: Add attribute((nonnull)) annotations to non-NULL parameters

2022-09-29 Thread Richard W.M. Jones
On Thu, Sep 29, 2022 at 09:08:26AM -0500, Eric Blake wrote: > On Thu, Sep 29, 2022 at 02:42:05PM +0100, Richard W.M. Jones wrote: > > > > + (* Output __attribute__((nonnull)) for the function parameters: > > > > + * eg. struct nbd_handle *, int, char * > > >

[Libguestfs] [PATCH nbdkit] rust: Drop box ptr

2022-09-29 Thread Richard W.M. Jones
Because of this recent change to rust, our close function warned that we calculate Box::from_raw but never use it. I added the suggested call to drop() around the function. https://github.com/rust-lang/rust/pull/99270 --- plugins/rust/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1

[Libguestfs] [PATCH nbdkit] rust: Drop box ptr

2022-09-29 Thread Richard W.M. Jones
This isn't a complete fix. There's still this error when running the tests. I don't understand which expect function it's complaining about. One generated by the MockServer? -- warning: the cargo feature `resolver` has been

Re: [Libguestfs] [PATCH libnbd v3 0/6] Additional non-NULL warnings, checks and docs

2022-09-29 Thread Richard W.M. Jones
This series was pushed as 21b279a78e..e62a558f74 I guess there will still be some problems, and we may want to rewrite the LIBNBD_ATTRIBUTE_NONNULL macro slightly, but we can fix that lot up afterwards. Thanks for everyone's help! Rich. -- Richard Jones, Virtualization Group, Red Hat

Re: [Libguestfs] [PATCH libnbd v3 2/6] generator: Add attribute((nonnull)) annotations to non-NULL parameters

2022-09-29 Thread Richard W.M. Jones
On Thu, Sep 29, 2022 at 08:25:29AM -0500, Eric Blake wrote: > On Wed, Sep 28, 2022 at 06:25:35PM +0100, Richard W.M. Jones wrote: > > For API parameters that are pointers and must not be NULL, add the > > appropriate GCC annotations. > > > > Reviewed-by: Laszlo Ersek

Re: [Libguestfs] [PATCH libnbd v2 2/4] generator: Check that more parameters are not NULL

2022-09-29 Thread Richard W.M. Jones
On Thu, Sep 29, 2022 at 10:58:36AM +0100, Richard W.M. Jones wrote: > It seems to be possible with phantom types & GADTs which are a very > dark corner of OCaml and one which we shouldn't use, but here's how: > >

Re: [Libguestfs] [PATCH libnbd v2 2/4] generator: Check that more parameters are not NULL

2022-09-29 Thread Richard W.M. Jones
It seems to be possible with phantom types & GADTs which are a very dark corner of OCaml and one which we shouldn't use, but here's how: -- type nullable type not_nullable type _ arg = | Char : not_nullable arg | Int:

Re: [Libguestfs] [PATCH libnbd v3 3/6] lib/internal.h: Mark various internal functions with attribute((nonnull))

2022-09-29 Thread Richard W.M. Jones
On Wed, Sep 28, 2022 at 05:08:40PM -0500, Eric Blake wrote: > On Wed, Sep 28, 2022 at 06:25:36PM +0100, Richard W.M. Jones wrote: > > --- > > lib/internal.h | 75 +- > > 1 file changed, 50 insertions(+), 25 deletions(-) >

Re: [Libguestfs] [PATCH libnbd v3 1/6] lib/opt: Don't use NULL for an empty StringList

2022-09-29 Thread Richard W.M. Jones
://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit >From bc0de6d378dd78da13210a315fd134f9d063b1ba Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date

Re: [Libguestfs] [PATCH libnbd v3 1/6] lib/opt: Don't use NULL for an empty StringList

2022-09-29 Thread Richard W.M. Jones
OK now I remember what the problem was. > @@ -255,7 +257,9 @@ int > nbd_unlocked_opt_set_meta_context (struct nbd_handle *h, > nbd_context_callback *context) > { > - return nbd_unlocked_opt_set_meta_context_queries (h, NULL, context); In this original code

Re: [Libguestfs] [PATCH libnbd v3 1/6] lib/opt: Don't use NULL for an empty StringList

2022-09-29 Thread Richard W.M. Jones
Let me try an alternate version of this. The problem is that I was getting GCC warnings even before adding the annotation to nbd_internal_set_querylist. Somehow the annotation on the public function "leaked" through to the internal function. Rich. -- Richard Jones, Virtualization Group, Red

[Libguestfs] [PATCH libnbd v3 6/6] lib/utils.c: Assert that argv != NULL and add comments

2022-09-28 Thread Richard W.M. Jones
Change check into an assertion, and add detailed comments explaining our assumptions. Updates: commit d0fbb769286a97728b0d1358e7accc2eb708d795 Reviewed-by: Laszlo Ersek --- lib/utils.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/utils.c b/lib/utils.c

[Libguestfs] [PATCH libnbd v3 0/6] Additional non-NULL warnings, checks and docs

2022-09-28 Thread Richard W.M. Jones
v2: https://listman.redhat.com/archives/libguestfs/2022-September/030014.html I didn't think this would need a v3, but here we are. The first patch (also a new patch) appears to fix a bug in Eric's earlier series to do with meta queries. It's not possible to call the new APIs with queries ==

[Libguestfs] [PATCH libnbd v3 5/6] generator: Document non-NULL behaviour of some parameters

2022-09-28 Thread Richard W.M. Jones
In the C API documentation mention the potential problems of calling non-nullable parameters with NULL. Usually an error is returned, but warnings and worse might happen too. Thanks: Eric Blake Acked-by: Laszlo Ersek --- docs/libnbd.pod | 18 ++ generator/C.ml | 21

[Libguestfs] [PATCH libnbd v3 2/6] generator: Add attribute((nonnull)) annotations to non-NULL parameters

2022-09-28 Thread Richard W.M. Jones
For API parameters that are pointers and must not be NULL, add the appropriate GCC annotations. Reviewed-by: Laszlo Ersek --- generator/C.ml | 59 +++-- tests/errors-connect-null.c | 4 +++ 2 files changed, 61 insertions(+), 2 deletions(-) diff

[Libguestfs] [PATCH libnbd v3 4/6] generator: Check that more parameters are not NULL

2022-09-28 Thread Richard W.M. Jones
We previously checked only that String parameters are not NULL, returning an error + EFAULT if so. However we did not check Bytes*, SockAddrAndLen, Path or StringList parameters, also never NULL. Be consistent about checks. Thanks: Eric Blake for help and an earlier version of the patch ---

[Libguestfs] [PATCH libnbd v3 3/6] lib/internal.h: Mark various internal functions with attribute((nonnull))

2022-09-28 Thread Richard W.M. Jones
--- lib/internal.h | 75 +- 1 file changed, 50 insertions(+), 25 deletions(-) diff --git a/lib/internal.h b/lib/internal.h index 7896b1d5ca..fb15ada1c3 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -384,20 +384,27 @@ struct command { }

Re: [Libguestfs] [p2v PATCH 2/2] remove old GLIB2 / GTK3 compat code

2022-09-28 Thread Richard W.M. Jones
For the series: Reviewed-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from

[Libguestfs] [PATCH libnbd v3 1/6] lib/opt: Don't use NULL for an empty StringList

2022-09-28 Thread Richard W.M. Jones
StringList parameters (char ** in C) will be marked with __attribute__((nonnull)). To pass an empty list you have to use a list containing a single NULL element, not a NULL pointer. nbd_internal_set_querylist has also been adjusted. Fixes: commit e33762a86cd5f064e5ef841520baa5fe7361d2c2 ---

<    3   4   5   6   7   8   9   10   11   12   >