Is it possible to backport interface change

Asked by Judy Gu

Hello,

My team is working on a new libvirt feature based on v10 source code, that includes a new api. We submitted pr to libvirt community and waiting for review now.

My question is:

Is it possible to backport the libvirt new feature from a high version(v10) to a low version (v8)?
If that is possible, how does the libvirt-go-module work with the lower version's new backport feature. When we add the new api support to libvirt-go-module project, we found that has some generated files that check server versions.

To make it easier to understand what I'm saying, let me give you an example:

As you know, the libvirt v9 add a new api

    .domainFDAssociate = qemuDomainFDAssociate, /* 9.0.0 */

After backport the domainFDAssociate feature related code to version 8.0.0, the libvirtd should work well, and virsh client should be good also to call the new api

But how to use the new api with libvirt-go-module ? Is it possible

I find there are some checks in libvirt-go-module:

-------------
#if !LIBVIR_CHECK_VERSION(9, 0, 0)
    setVirError(err, "Function virDomainFDAssociate not available prior to libvirt version 9.0.0");
#else
    ret = virDomainFDAssociate(domain,
                               name,
                               nfds,
                               fds,
                               flags);
    if (ret < 0) {
        virCopyLastError(err);
    }
#endif
---------

And when we run a go client (built with latest libvirt-go-module code) on libvirt 8.0.0, we see error:

/root/libvirt-go-client: /lib/x86_64-linux-gnu/libvirt.so.0: version `LIBVIRT_9.0.0' not found (required by /root/libvirt-go-client)
/root/libvirt-go-client: /lib/x86_64-linux-gnu/libvirt.so.0: version `LIBVIRT_10.2.0' not found (required by /root/libvirt-go-client)
/root/libvirt-go-client: /lib/x86_64-linux-gnu/libvirt.so.0: version `LIBVIRT_10.1.0' not found (required by /root/libvirt-go-client)
/root/libvirt-go-client: /lib/x86_64-linux-gnu/libvirt.so.0: version `LIBVIRT_9.7.0' not found (required by /root/libvirt-go-client)
/root/libvirt-go-client: /lib/x86_64-linux-gnu/libvirt.so.0: version `LIBVIRT_8.5.0' not found (required by /root/libvirt-go-client)
/root/libvirt-go-client: /lib/x86_64-linux-gnu/libvirt.so.0: version `LIBVIRT_8.4.0' not found (required by /root/libvirt-go-client)
/root/libvirt-go-client: /lib/x86_64-linux-gnu/libvirt.so.0: version `LIBVIRT_10.3.0' not found (required by /root/libvirt-go-client)

Does it mean the ubuntu libvirt backport version must >= community libvirt version for new api change?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu libvirt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bernard Stafford (bernard010) said :
#1

Can you help with this problem?

Provide an answer of your own, or ask Judy Gu for more information if necessary.

To post a message you must log in.