Re: [Libguestfs] libguestfs language bindings for CentOS/RHEL 9
On Wed, Nov 10, 2021 at 08:46:06AM -0500, Neal Gompa wrote:
Hey Richard,
I'm looking to use the libguestfs Python, PHP, and Go bindings on CentOS Stream 9, but it seems that these are not available right now. Could they be made available in CentOS/RHEL 9, if not, what was the reason for not shipping them? I believe these are shipped in Fedora today.
Hi Neal, answer depends on the particular bindings. For python3-libguestfs, we have a BZ to move these back to AppStream, so they should be usable. This should be done pretty soon: https://bugzilla.redhat.com/show_bug.cgi?id=2019914 For PHP, the bindings are currently broken upstream. Patches welcome etc ... For Golang I think most people are anticipating that you'll "vendor" (ie. bundle) the bindings in your code. While this is stupid, the language effectively forces you to do that. A longer term plan may look more like what we recently did with the libnbd bindings, but we're not there yet. Search "golang" here: https://listman.redhat.com/archives/libguestfs/2021-November/thread.html Rich.
Thanks in advance and best regards,
-- Neal Gompa Senior DevOps Engineer Datto, Inc. www.datto.com
-- 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
On Wed, Nov 10, 2021 at 9:00 AM Richard W.M. Jones <rjones@redhat.com> wrote:
On Wed, Nov 10, 2021 at 08:46:06AM -0500, Neal Gompa wrote:
Hey Richard,
I'm looking to use the libguestfs Python, PHP, and Go bindings on CentOS Stream 9, but it seems that these are not available right now. Could they be made available in CentOS/RHEL 9, if not, what was the reason for not shipping them? I believe these are shipped in Fedora today.
Hi Neal, answer depends on the particular bindings.
For python3-libguestfs, we have a BZ to move these back to AppStream, so they should be usable. This should be done pretty soon:
https://bugzilla.redhat.com/show_bug.cgi?id=2019914
For PHP, the bindings are currently broken upstream. Patches welcome etc ...
Is there a particular report indicating what's broken upstream that I can look at? I see that the bindings are built in Fedora against PHP 8.0 (which RHEL 9 ships with), so I somewhat expect them to work.
For Golang I think most people are anticipating that you'll "vendor" (ie. bundle) the bindings in your code. While this is stupid, the language effectively forces you to do that. A longer term plan may look more like what we recently did with the libnbd bindings, but we're not there yet.
Search "golang" here: https://listman.redhat.com/archives/libguestfs/2021-November/thread.html
But since libguestfs dynamically generates the bindings for various languages, is it even workable to separate it like that? You could build it as a pile of Go binding sources and ship it that way (similar to how other Go bindings are shipped in Fedora). -- *Neal Gompa* Senior DevOps Engineer Datto, Inc. www.datto.com
On Wed, Nov 10, 2021 at 11:08:09AM -0500, Neal Gompa wrote:
On Wed, Nov 10, 2021 at 9:00 AM Richard W.M. Jones <rjones@redhat.com> wrote: For PHP, the bindings are currently broken upstream. Patches welcome etc ...
Is there a particular report indicating what's broken upstream that I can look at? I see that the bindings are built in Fedora against PHP 8.0 (which RHEL 9 ships with), so I somewhat expect them to work.
AIUI they don't actually work properly with PHP 8 and/or needs significant porting effort. The references are: https://bugzilla.redhat.com/show_bug.cgi?id=1935753 https://www.seidengroup.com/2020/12/07/porting-extensions-to-php-8/
For Golang I think most people are anticipating that you'll "vendor" (ie. bundle) the bindings in your code. While this is stupid, the language effectively forces you to do that. A longer term plan may look more like what we recently did with the libnbd bindings, but we're not there yet.
Search "golang" here: https://listman.redhat.com/archives/libguestfs/2021-November/thread.html
But since libguestfs dynamically generates the bindings for various languages, is it even workable to separate it like that? You could build it as a pile of Go binding sources and ship it that way (similar to how other Go bindings are shipped in Fedora).
In fact so does libnbd, so the problems were the same. Nir (CC'd) can talk a bit more about this. My interest in golang is >< small. Rich.
-- Neal Gompa Senior DevOps Engineer Datto, Inc. www.datto.com
-- 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 installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
On Wed, Nov 10, 2021 at 7:02 PM Richard W.M. Jones <rjones@redhat.com> wrote:
On Wed, Nov 10, 2021 at 11:08:09AM -0500, Neal Gompa wrote:
On Wed, Nov 10, 2021 at 9:00 AM Richard W.M. Jones <rjones@redhat.com> wrote: For PHP, the bindings are currently broken upstream. Patches welcome etc ...
Is there a particular report indicating what's broken upstream that I can look at? I see that the bindings are built in Fedora against PHP 8.0 (which RHEL 9 ships with), so I somewhat expect them to work.
AIUI they don't actually work properly with PHP 8 and/or needs significant porting effort. The references are:
https://bugzilla.redhat.com/show_bug.cgi?id=1935753
https://www.seidengroup.com/2020/12/07/porting-extensions-to-php-8/
For Golang I think most people are anticipating that you'll "vendor" (ie. bundle) the bindings in your code. While this is stupid, the language effectively forces you to do that. A longer term plan may look more like what we recently did with the libnbd bindings, but we're not there yet.
Search "golang" here: https://listman.redhat.com/archives/libguestfs/2021-November/thread.html
But since libguestfs dynamically generates the bindings for various languages, is it even workable to separate it like that? You could build it as a pile of Go binding sources and ship it that way (similar to how other Go bindings are shipped in Fedora).
Hi Neal, Can you add more info on this? which module are distributed and how they are consumed?
In fact so does libnbd, so the problems were the same. Nir (CC'd) can talk a bit more about this. My interest in golang is >< small.
LIbnbd Go bindings are published now in the standard way using Go proxy server. Developers can use: Import "libguestfs.org/libnbd" Like any other dependency (e.g. from github.com, etc). The go tools will find the package proxy server looking at https://libguestfs.org/libnbd pointing the tools to the proxy server at https://download.libguestfs.org/libnbd/golang We use this script to prepare the files for the web server for every release: https://gitlab.com/nbdkit/libnbd/-/blob/master/golang/make-dist.sh The same file structure on the web server can be used with a "file:///" URL, if the files are packaged for a distribution in a known location, users can use something like: GOPROXY=file:///path/to/go/modules See https://golang.org/ref/mod#environment-variables But I think this is best discussed here: https://groups.google.com/g/golang-nuts I'm working on another module that will likely be published in the same way, and I also want to package it for Fedora, please CC me on related discussions. Nir
participants (3)
-
Neal Gompa -
Nir Soffer -
Richard W.M. Jones