Bug 2097718
Summary: | Please build and ship php bindings to libguestfs | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Neal Gompa <ngompa13> |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED ERRATA | QA Contact: | YongkuiGuo <yoguo> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 9.1 | CC: | brandon.johnson, bstinson, carl, daltonminer, davdunc, davide, davidmccheyne, fedora, jwboyer, lersek, matt, michel, mroche, qzhang, rjones, tzheng, virt-maint, ymao, yoguo |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libguestfs-1.48.4-2.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-11-15 09:52:35 UTC | Type: | Enhancement |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Neal Gompa
2022-06-16 11:42:43 UTC
This is a simple change now that we fixed the bindings upstream. As this is a new package, we'd like to ship it in CRB (unsupported). I don't know if I need to adjust comps to make that happen. (In reply to Richard W.M. Jones from comment #3) > As this is a new package, we'd like to ship it in CRB (unsupported). > I don't know if I need to adjust comps to make that happen. Yes. It's fairly straightforward to adjust comps, here's an example of how it's done: https://gitlab.com/redhat/centos-stream/release-engineering/comps/-/merge_requests/234 The build available (https://kojihub.stream.centos.org/koji/buildinfo?buildID=23220) works based on internal testing, but there was something odd: the extension reports its version as 1.0 rather than the actual libguestfs version. The PHP extension version is hard-coded as 1.0, see: https://github.com/libguestfs/libguestfs/blob/60e8ea0312d94860403c956f0f12d491743d3fdd/generator/php.ml#L47 https://github.com/libguestfs/libguestfs/blob/60e8ea0312d94860403c956f0f12d491743d3fdd/generator/php.ml#L261 Since the libguestfs version can only be found at runtime, I don't know if it would be possible to change this. FWIW this is how you can print the guestfs library (runtime) version: <?php $g = guestfs_create (); if ($g == false) { echo ("Failed to create guestfs_php handle.\n"); exit; } $version = guestfs_version ($g); printf ("version == %s.%s.%s%s\n", $version["major"], $version["minor"], $version["release"], $version["extra"]); ?> (In reply to Richard W.M. Jones from comment #8) > The PHP extension version is hard-coded as 1.0, see: > > https://github.com/libguestfs/libguestfs/blob/ > 60e8ea0312d94860403c956f0f12d491743d3fdd/generator/php.ml#L47 > https://github.com/libguestfs/libguestfs/blob/ > 60e8ea0312d94860403c956f0f12d491743d3fdd/generator/php.ml#L261 > > Since the libguestfs version can only be found at runtime, I don't know > if it would be possible to change this. > Well, we know the version at build-time, don't we? So we could at least inject that into there, so we know what version of php-guestfs was built. That's particularly useful for things like composer, which can evaluate php extension dependencies by querying for the extension version. > FWIW this is how you can print the guestfs library (runtime) version: > > <?php > > $g = guestfs_create (); > if ($g == false) { > echo ("Failed to create guestfs_php handle.\n"); > exit; > } > $version = guestfs_version ($g); > printf ("version == %s.%s.%s%s\n", $version["major"], > $version["minor"], $version["release"], > $version["extra"]); > > ?> Good to know, thanks! The php-libguestfs-1.48.3-3.el9 package has been built: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=2054404. Will check whether the php-libguestfs package is included in CRB once libguestfs-1.48.3.3 is involved in the rhel9.1 nightly compose repo. (In reply to YongkuiGuo from comment #10) > The php-libguestfs-1.48.3-3.el9 package has been built: > https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=2054404. Will > check whether the php-libguestfs package is included in CRB once > libguestfs-1.48.3.3 is involved in the rhel9.1 nightly compose repo. It won't be, since comps hasn't been adjusted yet: https://gitlab.com/redhat/centos-stream/release-engineering/comps/-/commits/main (In reply to Neal Gompa from comment #9) > (In reply to Richard W.M. Jones from comment #8) > > The PHP extension version is hard-coded as 1.0, see: > > > > https://github.com/libguestfs/libguestfs/blob/ > > 60e8ea0312d94860403c956f0f12d491743d3fdd/generator/php.ml#L47 > > https://github.com/libguestfs/libguestfs/blob/ > > 60e8ea0312d94860403c956f0f12d491743d3fdd/generator/php.ml#L261 > > > > Since the libguestfs version can only be found at runtime, I don't know > > if it would be possible to change this. > > Well, we know the version at build-time, don't we? So we could at least > inject that into there, so we know what version of php-guestfs was built. > That's particularly useful for things like composer, which can evaluate php > extension dependencies by querying for the extension version. Oddly no, we don't have the version at build time. The generator is deliberately written not to insert version strings (or anything that changes often) into the generated bindings. CRB request is here: https://gitlab.com/redhat/centos-stream/release-engineering/comps/-/merge_requests/254 php-libguestfs-1.48.3-3.el9.x86_64.rpm package has been included in the latest rhel9.1 nightly compose: https://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.1.0/compose/CRB/x86_64/os/Packages/ Verified this bug per comment 16. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Low: libguestfs security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:7958 |