Bug 1960191

Summary: [Regression]The virt-win-reg command doesn't work as there is no perl-hivex and perl-Sys-Guestfs packages
Product: Red Hat Enterprise Linux 9 Reporter: YongkuiGuo <yoguo>
Component: guestfs-toolsAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: YongkuiGuo <yoguo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.0CC: rjones, virt-maint
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: guestfs-tools-1.46.1-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-07 21:57:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1961116, 1961117    
Bug Blocks:    

Description YongkuiGuo 2021-05-13 09:40:49 UTC
Description of problem:
There is no perl-hivex and perl-Sys-Guestfs packages in latest RHEL9 compose. The virt-win-reg command doesn't work in RHEL9.


Version-Release number of selected component (if applicable):
guestfs-tools-1.46.1-1.el9.x86_64
libguestfs-1.45.5-1.el9.x86_64


How reproducible:
100%


Steps:

1. On rhel9.0 host with RHEL-9.0.0-20210511.3 compose
# virt-win-reg --version
Can't locate Sys/Guestfs.pm in @INC (you may need to install the Sys::Guestfs module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/virt-win-reg line 22.
BEGIN failed--compilation aborted at /usr/bin/virt-win-reg line 22.

# virt-win-reg --version
Can't locate Win/Hivex.pm in @INC (you may need to install the Win::Hivex module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/virt-win-reg line 23.
BEGIN failed--compilation aborted at /usr/bin/virt-win-reg line 23.


Actual results:
As above

Expected results:
The virt-win-reg works well in RHEL9

Additional info:

Comment 1 Richard W.M. Jones 2021-05-13 09:58:14 UTC
This was caused by missing Requires: perl-generators in the spec file, an
easy fix.

Comment 2 Richard W.M. Jones 2021-05-13 10:00:07 UTC
I mean BuildRequires, not Requires.  Fedora fix:
https://src.fedoraproject.org/rpms/guestfs-tools/c/f7d222458f35841e26f7bd8fe70b25ccc842db9f?branch=rawhide

Comment 6 Richard W.M. Jones 2021-05-13 10:17:58 UTC
It's stuck in gating at the moment, but FYI the dependencies
now seem to be correct:
https://kojihub.stream.rdu2.redhat.com/koji/rpminfo?rpmID=172654

Comment 7 Richard W.M. Jones 2021-05-13 21:34:23 UTC
Some dependencies are incorrectly in buildroot, see:
https://mailman-int.corp.redhat.com/archives/rhel-devel/2021-May/msg00279.html

Comment 8 YongkuiGuo 2021-05-14 02:59:50 UTC
(In reply to Richard W.M. Jones from comment #7)
> Some dependencies are incorrectly in buildroot, see:
> https://mailman-int.corp.redhat.com/archives/rhel-devel/2021-May/msg00279.
> html

I saw the email, thanks.

Comment 9 Richard W.M. Jones 2021-05-17 10:55:42 UTC
Can we confirm that this bug is now fixed in compose 20210516.2?

http://download-ipv4.eng.brq.redhat.com/rhel-9/composes/RHEL-9/RHEL-9.0.0-20210516.2/compose/AppStream/x86_64/os/Packages/

Comment 10 YongkuiGuo 2021-05-17 11:06:23 UTC
Verified with package:
guestfs-tools-1.46.1-2.el9.x86_64
virt-win-reg-1.46.1-2.el9.noarch

Steps:

1. On rhel9 host with RHEL-9.0.0-20210516.2 compose
# yum install virt-win-reg
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 1:12:49 ago on Mon 17 May 2021 05:29:38 AM EDT.
Dependencies resolved.
============================================================================================================================================================
 Package                                       Architecture                  Version                                 Repository                        Size
============================================================================================================================================================
Installing:
 virt-win-reg                                  noarch                        1.46.1-2.el9                            rhel9-app                         31 k
Installing dependencies:
 perl-Class-Inspector                          noarch                        1.36-6.el9                              rhel9-app                         32 k
 perl-Exporter-Tiny                            noarch                        1.002002-5.el9                          rhel9-app                         53 k
 perl-List-MoreUtils-XS                        x86_64                        0.430-4.el9                             rhel9-app                         63 k
 perl-Sys-Guestfs                              x86_64                        1:1.45.5-1.el9                          rhel9-app                        326 k
 perl-hivex                                    x86_64                        1.3.20-1.el9                            rhel9-app                         51 k
 perl-libintl-perl                             x86_64                        1.32-3.el9                              rhel9-app                        801 k
Installing weak dependencies:
 perl-File-ShareDir                            noarch                        1.118-3.el9                             rhel9-app                         31 k
 perl-List-MoreUtils                           noarch                        0.430-3.el9                             rhel9-app                         65 k
 perl-Params-Util                              x86_64                        1.102-4.el9                             rhel9-app                         35 k

Transaction Summary
============================================================================================================================================================
Install  10 Packages


The perl-hivex and perl-Sys-Guestfs are also installed as dependencies.

2.
# virt-win-reg --version
virt-win-reg 1.45.5rhel=9,release=1.el9,libvirt

The bug has been verified, but the version info above is not correct.