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 - local_build of a git branch which starts with "rpm" fails: utils.py ERROR RPM was created successfully, but can't be found
Summary: local_build of a git branch which starts with "rpm" fails: utils.py ERROR RP...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: packit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Frantisek Lachman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-21 15:14 UTC by Petr Pisar
Modified: 2021-05-25 08:16 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


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