Bug 1980717

Summary: Missing git dependency in BuildRequires in source rpm
Product: Red Hat Enterprise Linux 8 Reporter: Jesus Checa <jchecahi>
Component: librsvg2Assignee: Tomas Popela <tpopela>
Status: CLOSED MIGRATED QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: tpopela
Target Milestone: betaKeywords: MigratedToJIRA, Reopened
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-20 10:46:51 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:

Description Jesus Checa 2021-07-09 11:24:11 UTC
Description of problem:
Trying to build the source rpm (librsvg2-2.42.7-4.el8.src.rpm) fails in %prep stage due to a missing dependency with git:
[root@ibm-z-118 ~]# rpmbuild -bb rpmbuild/SPECS/librsvg2.spec 
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Vxa6WO
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf librsvg-2.42.7
+ /usr/bin/xz -dc /root/rpmbuild/SOURCES/librsvg-2.42.7.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd librsvg-2.42.7
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/git init -q
/var/tmp/rpm-tmp.Vxa6WO: line 45: /usr/bin/git: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.Vxa6WO (%prep)


Version-Release number of selected component (if applicable):
librsvg2-2.42.7-4.el8.src.rpm

How reproducible:
100%

Steps to Reproduce:
1. Get the source rpm librsvg2-2.42.7-4.el8.src.rpm
2. rpm -ivh librsvg2-2.42.7-4.el8.src.rpm
3. yum-builddep librsvg2-2.42.7-4.el8.src.rpm
4. rpmbuild -bb ~/rpmbuild/SPECS/librsvg2.spec

Actual results:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Vxa6WO
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf librsvg-2.42.7
+ /usr/bin/xz -dc /root/rpmbuild/SOURCES/librsvg-2.42.7.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd librsvg-2.42.7
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/git init -q
/var/tmp/rpm-tmp.Vxa6WO: line 45: /usr/bin/git: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.Vxa6WO (%prep)

Expected results:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.FUnimu
+ umask 022             
+ cd /root/rpmbuild/BUILD                                                                                              
+ cd /root/rpmbuild/BUILD                         
+ rm -rf librsvg-2.42.7
+ /usr/bin/xz -dc /root/rpmbuild/SOURCES/librsvg-2.42.7.tar.xz              
+ /usr/bin/tar -xof -    
+ STATUS=0                          
+ '[' 0 -ne 0 ']'                                                                                                                                                                                                                              
+ cd librsvg-2.42.7                                                                                                                                                                                                                            + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .                                                                                                                                                                                                        + /usr/bin/git init -q
+ /usr/bin/git config user.name rpm-build                                                                              
+ /usr/bin/git config user.email '<rpm-build>'   
+ /usr/bin/git add .                                    
+ /usr/bin/git commit -q --allow-empty -a --author 'rpm-build <rpm-build>' -m 'librsvg2-2.42.7 base'
+ /usr/bin/cat /root/rpmbuild/SOURCES/CVE-2019-20446.patch
+ /usr/bin/git apply --index -p1 -                    
+ /usr/bin/git commit -q -m CVE-2019-20446.patch --author 'rpm-build <rpm-build>'
+ /usr/bin/cat /root/rpmbuild/SOURCES/fix-cssparser-build.patch
+ /usr/bin/git apply --index -p1 -                  
+ /usr/bin/git commit -q -m fix-cssparser-build.patch --author 'rpm-build <rpm-build>'
+ sed -i -e '/profile.release/a debug = true' Cargo.toml                                                               
+ exit 0   
(Continues to the next stage).

Additional info:
Tested only on RHEL 8.5 on s390x. I assume it will reproduce in all supported archs as well.

I noticed that the version tested introduced a difference in the %prep stage in the .spec file.
librsvg2-2.42.7-4.el8.src.rpm:
%prep
%autosetup -n librsvg-%{version} -p1 -S git
librsvg2-2.42.7-3.el8.src.rpm:
%prep
%autosetup -n librsvg-%{version} -p1

Comment 2 RHEL Program Management 2023-01-09 07:27:37 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.