Bug 2293671

Summary: `fedpkg srpm` creates *-build directory with RPM 4.20
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: fedpkgAssignee: Ondřej Nosek <onosek>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: lsedlar, onosek, philip.wyett, qcxhome
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-10-16 10:06:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vít Ondruch 2024-06-21 15:55:19 UTC
Every time I use `fedpkg srpm`, it creates some spurious build directory:

~~~
$ pwd
/home/vondruch/fedora-scm/own/rubygem-ruby-libvirt

$ ll
total 728
-rw-rw-r--. 1 vondruch vondruch     54 Jun 21 17:49 clog
-rw-rw-r--. 1 vondruch vondruch 109056 Oct 31  2020 ruby-libvirt-0.5.2.gem
-rw-rw-r--. 1 vondruch vondruch 115712 Oct 31  2020 ruby-libvirt-0.7.1.gem
-rw-r--r--. 1 vondruch vondruch 102912 Jun 21 16:34 ruby-libvirt-0.8.3.gem
-rw-r--r--. 1 vondruch vondruch 132308 Dec  4  2023 rubygem-ruby-libvirt-0.7.1-19.fc40.src.rpm
-rw-rw-r--. 1 vondruch vondruch 122141 Oct 31  2020 rubygem-ruby-libvirt-0.7.1-3.fc29.src.rpm
-rw-r--r--. 1 vondruch vondruch 119540 Jun 21 17:43 rubygem-ruby-libvirt-0.8.3-1.fc41.src.rpm
-rw-r--r--. 1 vondruch vondruch   1476 Jun 21 17:47 rubygem-ruby-libvirt-0.8.3-Cleanup-extconf-rb.patch
-rw-r--r--. 1 vondruch vondruch   8404 Jun 21 17:44 rubygem-ruby-libvirt.spec
-rw-r--r--. 1 vondruch vondruch   1868 Jun 21 16:34 rubygem-ruby-libvirt.spec.new
-rw-rw-r--. 1 vondruch vondruch    163 Oct 31  2020 sources

$ fedpkg srpm
Not downloading unused ruby-libvirt-0.7.1.gem

setting SOURCE_DATE_EPOCH=1718928000
Wrote: /home/vondruch/fedora-scm/own/rubygem-ruby-libvirt/rubygem-ruby-libvirt-0.8.3-1.fc41.src.rpm

$ ll
total 728
-rw-rw-r--. 1 vondruch vondruch     54 Jun 21 17:49 clog
-rw-rw-r--. 1 vondruch vondruch 109056 Oct 31  2020 ruby-libvirt-0.5.2.gem
-rw-rw-r--. 1 vondruch vondruch 115712 Oct 31  2020 ruby-libvirt-0.7.1.gem
-rw-r--r--. 1 vondruch vondruch 102912 Jun 21 16:34 ruby-libvirt-0.8.3.gem
-rw-r--r--. 1 vondruch vondruch 132308 Dec  4  2023 rubygem-ruby-libvirt-0.7.1-19.fc40.src.rpm
-rw-rw-r--. 1 vondruch vondruch 122141 Oct 31  2020 rubygem-ruby-libvirt-0.7.1-3.fc29.src.rpm
-rw-r--r--. 1 vondruch vondruch 119686 Jun 21 17:52 rubygem-ruby-libvirt-0.8.3-1.fc41.src.rpm
-rw-r--r--. 1 vondruch vondruch   1476 Jun 21 17:47 rubygem-ruby-libvirt-0.8.3-Cleanup-extconf-rb.patch
drwxr-xr-x. 1 vondruch vondruch      0 Jun 21 17:52 rubygem-ruby-libvirt-0.8.3-build
-rw-r--r--. 1 vondruch vondruch   8404 Jun 21 17:44 rubygem-ruby-libvirt.spec
-rw-r--r--. 1 vondruch vondruch   1868 Jun 21 16:34 rubygem-ruby-libvirt.spec.new
-rw-rw-r--. 1 vondruch vondruch    163 Oct 31  2020 sources
~~~

Please note the `rubygem-ruby-libvirt-0.8.3-build` dir. I think this due to changes in RPM 4.20

~~~
$ rpm -q rpm
rpm-4.19.91-4.fc41.x86_64

$ rpm -q fedpkg
fedpkg-1.44-8.fc40.noarch
~~~

Reproducible: Always

Actual Results:  
Directory such as `rubygem-ruby-libvirt-0.8.3-build` is created when `fedpkg srpm` is called.

Expected Results:  
`fedpkg srpm` does create just the SRPM

Comment 1 Vít Ondruch 2024-10-16 10:06:44 UTC
Closing in favor of this RPM ticket, which should address the issue:

https://github.com/rpm-software-management/rpm/issues/3382