RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2097718 - Please build and ship php bindings to libguestfs
Summary: Please build and ship php bindings to libguestfs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libguestfs
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-16 11:42 UTC by Neal Gompa
Modified: 2022-11-15 10:12 UTC (History)
19 users (show)

Fixed In Version: libguestfs-1.48.4-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 09:52:35 UTC
Type: Enhancement
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-125460 0 None None None 2022-06-16 12:00:24 UTC
Red Hat Product Errata RHSA-2022:7958 0 None None None 2022-11-15 09:52:44 UTC

Description Neal Gompa 2022-06-16 11:42:43 UTC
Description of problem:
The php-libguestfs bindings package was not built in RHEL 9 because it was incompatible with PHP 8. Now that a fix for that has been contributed upstream[1], could you please consider updating libguestfs so that the php bindings package is built and shipped? Ideally, it would be shipped in time to be included in RHEL 9.1.

[1]: https://github.com/libguestfs/libguestfs/commit/ec27979398b0871c1a3e0e244849f8435c9c9a8d

Comment 1 Richard W.M. Jones 2022-06-16 11:47:08 UTC
This is a simple change now that we fixed the bindings upstream.

Comment 3 Richard W.M. Jones 2022-06-17 11:13:15 UTC
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.

Comment 4 Josh Boyer 2022-06-17 11:20:06 UTC
(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.

Comment 6 Neal Gompa 2022-06-17 11:44:30 UTC
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

Comment 7 Neal Gompa 2022-06-17 16:27:23 UTC
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.

Comment 8 Richard W.M. Jones 2022-06-18 06:43:37 UTC
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"]);

?>

Comment 9 Neal Gompa 2022-06-18 15:14:03 UTC
(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!

Comment 10 YongkuiGuo 2022-06-20 03:42:40 UTC
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.

Comment 14 Neal Gompa 2022-06-20 12:52:52 UTC
(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

Comment 15 Richard W.M. Jones 2022-06-20 13:17:43 UTC
(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

Comment 16 YongkuiGuo 2022-06-23 05:27:17 UTC
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/

Comment 17 YongkuiGuo 2022-07-01 01:00:14 UTC
Verified this bug per comment 16.

Comment 19 errata-xmlrpc 2022-11-15 09:52:35 UTC
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


Note You need to log in before you can comment on or make changes to this bug.