Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1963155

Summary: local_build of a git branch which starts with "rpm" fails: utils.py ERROR RPM was created successfully, but can't be found
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: packitAssignee: Matej Focko <mfocko>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: flachman, hcsomort, jpopelka, jscotka, lbarczio, mfocko, mmuzila, ttomecek, user-cont-team+packit-fas, user-cont-team
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: packit-0.39.0-1.fc34 packit-0.39.0-1.fc33 packit-0.39.0-1.el8 packit-0.39.0-1.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 16:53:10 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 Petr Pisar 2021-05-21 15:14:29 UTC
I have packit-0.30.1-1.fc35.noarch and rpm-4.16.90-0.git15395.8.fc35.x86_64.

When performing a "packit local_build" on sources with a git branch named rpm_obsoletes" the build fails. I suspect the culprit is the branch name because if I build from "main" branch, packit succeeds. Maybe the branch name is too long for a RPM release? Maybe the string has a special meaning for packit?

Reproducer:

$ git clone https://github.com/ppisar/libmodulemd.git
$ cd libmodulemd
$ git checkout rpm_obsoletes
$ cd /tmp
$ packit --debug local-build ~/libmodulemd
[...]
Wrote: /tmp/x86_64/libmodulemd-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm
Wrote: /tmp/x86_64/python3-libmodulemd-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm
Wrote: /tmp/x86_64/libmodulemd-debugsource-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm
Wrote: /tmp/x86_64/libmodulemd-debuginfo-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm
Wrote: /tmp/x86_64/libmodulemd-devel-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.6g6aYU
2021-05-21 17:11:02.854 upstream.py       DEBUG  ['libmodulemd-2.13.0-0.20210521170931675372.rpm', 'libmodulemd = 2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35 libmodulemd(x86-64) = 2.13.0-0.20210521170931675372.rpm', 'python3-libmodulemd-2.13.0-0.20210521170931675372.rpm', 'python-libmodulemd = 2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35 python3-libmodulemd = 2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35 python3-libmodulemd(x86-64) = 2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35 python3.9-libmodulemd = 2.13.0-0.20210521170931675372.rpm', 'libmodulemd-devel-2.13.0-0.20210521170931675372.rpm', 'libmodulemd-devel = 2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35 libmodulemd-devel(x86-64) = 2.13.0-0.20210521170931675372.rpm', 'libmodulemd-debugsource-2.13.0-0.20210521170931675372.rpm', 'libmodulemd-debugsource = 2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35 libmodulemd-debugsource(x86-64) = 2.13.0-0.20210521170931675372.rpm', 'libmodulemd-debuginfo-2.13.0-0.20210521170931675372.rpm', 'debuginfo(build-id) = 3b8cde3fe48e743e54d2cc32e3dca6e40afedbb5 debuginfo(build-id) = f0a3b405de17a4b50fb2a7c111bed8f824be2bf2 libmodulemd-debuginfo = 2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35 libmodulemd-debuginfo(x86-64) = 2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35 libmodulemd.so.2.13.0-2.13.0-0.20210521170931675372.rpm', 'libmodulemd-debugsource(x86-64) = 2.13.0-0.20210521170931675372.rpm', '/usr/lib/rpm/check-files /home/test/libmodulemd/fedora/libmodulemd-2.13.0-0.20210521170931675372.rpm', '/tmp/x86_64/libmodulemd-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm', '/tmp/x86_64/python3-libmodulemd-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm', '/tmp/x86_64/libmodulemd-debugsource-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm', '/tmp/x86_64/libmodulemd-debuginfo-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm', '/tmp/x86_64/libmodulemd-devel-2.13.0-0.20210521170931675372.rpm_obsoletes.15.gb202d9d.fc35.x86_64.rpm']
2021-05-21 17:11:02.855 utils.py          ERROR  RPM was created successfully, but can't be found at libmodulemd-2.13.0-0.20210521170931675372.rpm
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/packit/cli/utils.py", line 64, in covered_func
    func(config=config, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/packit/cli/local_build.py", line 58, in local_build
    rpm_paths = api.create_rpms(upstream_ref=upstream_ref)
  File "/usr/lib/python3.9/site-packages/packit/api.py", line 609, in create_rpms
    raise PackitRPMNotFoundException(
packit.exceptions.PackitRPMNotFoundException: RPM was created successfully, but can't be found at libmodulemd-2.13.0-0.20210521170931675372.rpm


It obviously searching RPM packages under a different name.

Then rename the branch:

$ cd ~/libmodulemd
$ git reset --hard
$ git checkout -b foo
$ cd /tmp
$ packit --debug local-build ~/libmodulemd
[...]
Wrote: /tmp/x86_64/libmodulemd-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm
Wrote: /tmp/x86_64/python3-libmodulemd-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm
Wrote: /tmp/x86_64/libmodulemd-debugsource-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm
Wrote: /tmp/x86_64/libmodulemd-debuginfo-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm
Wrote: /tmp/x86_64/libmodulemd-devel-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.wWhrlF
2021-05-21 17:13:22.127 upstream.py       DEBUG  ['/tmp/x86_64/libmodulemd-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm', '/tmp/x86_64/python3-libmodulemd-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm', '/tmp/x86_64/libmodulemd-debugsource-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm', '/tmp/x86_64/libmodulemd-debuginfo-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm', '/tmp/x86_64/libmodulemd-devel-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm']
2021-05-21 17:13:22.128 local_build.py    INFO   RPMs:
2021-05-21 17:13:22.128 local_build.py    INFO    * /tmp/x86_64/libmodulemd-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm
2021-05-21 17:13:22.128 local_build.py    INFO    * /tmp/x86_64/python3-libmodulemd-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm
2021-05-21 17:13:22.128 local_build.py    INFO    * /tmp/x86_64/libmodulemd-debugsource-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm
2021-05-21 17:13:22.128 local_build.py    INFO    * /tmp/x86_64/libmodulemd-debuginfo-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm
2021-05-21 17:13:22.128 local_build.py    INFO    * /tmp/x86_64/libmodulemd-devel-2.13.0-0.20210521171152855149.foo.15.gb202d9d.fc35.x86_64.rpm

and packit does not fail.

Comment 1 Petr Pisar 2021-05-24 13:38:32 UTC
A trigger for this bug is the branch name. If the branch starts with "rpm" string, packit fails. Examples of bad branches:

rpm
rpma
rpm_

Examples of good branches:

xrpm
xxx
_

Comment 2 Tomas Tomecek 2021-05-24 15:44:59 UTC
Thanks for such a detailed report!

This should be easy to fix, I presume we just need to fix a globbing pattern.

I mirrored the BZ upstream: https://github.com/packit/packit/issues/1255 since that's where we track issues

Comment 3 Ben Cotton 2021-08-10 13:03:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 4 Matej Focko 2021-10-04 14:33:53 UTC
will be fixed in 0.39.0

Comment 5 Fedora Update System 2021-10-15 09:14:00 UTC
FEDORA-2021-f41565c0c1 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-f41565c0c1

Comment 6 Fedora Update System 2021-10-15 09:14:37 UTC
FEDORA-2021-ca5ae353c1 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-ca5ae353c1

Comment 7 Fedora Update System 2021-10-15 09:15:19 UTC
FEDORA-2021-4dfbcb6541 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-4dfbcb6541

Comment 8 Fedora Update System 2021-10-15 09:15:47 UTC
FEDORA-EPEL-2021-b6752e788f has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-b6752e788f

Comment 9 Fedora Update System 2021-10-15 19:09:58 UTC
FEDORA-2021-ca5ae353c1 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-ca5ae353c1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-ca5ae353c1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2021-10-15 19:50:22 UTC
FEDORA-2021-f41565c0c1 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-f41565c0c1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-f41565c0c1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2021-10-15 19:59:46 UTC
FEDORA-EPEL-2021-b6752e788f has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-b6752e788f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2021-10-15 20:51:29 UTC
FEDORA-2021-4dfbcb6541 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-4dfbcb6541`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-4dfbcb6541

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2021-10-21 16:53:10 UTC
FEDORA-2021-ca5ae353c1 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2021-10-23 03:25:12 UTC
FEDORA-2021-f41565c0c1 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2021-10-23 03:55:03 UTC
FEDORA-EPEL-2021-b6752e788f has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2021-10-29 23:06:30 UTC
FEDORA-2021-4dfbcb6541 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.