Bug 2000556 - grub2 project cannot be extracted with latest python3-rpkg-1.63-1
Summary: grub2 project cannot be extracted with latest python3-rpkg-1.63-1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpkg
Version: 34
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ondřej Nosek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-02 11:58 UTC by Renaud Métrich
Modified: 2022-02-17 03:05 UTC (History)
6 users (show)

Fixed In Version: rpkg-1.64-1.fc36 rpkg-1.64-2.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-14 11:45:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Renaud Métrich 2021-09-02 11:58:13 UTC
Description of problem:

Got an update of python3-rpkg a few days ago, now I cannot extract the Grub workspace:

$ fedpkg prep --builddir foo
Could not execute prep: Error running rpmspec on "/home/rmetrich/FEDPKG/grub2/grub2.spec", return code 1

This happens whatever the branch is.

Downgrading to 1.62-1 works again.


Version-Release number of selected component (if applicable):

python3-rpkg-1.63-1

How reproducible:

Always

Comment 1 Ondřej Nosek 2021-09-02 13:15:26 UTC
I am sorry, this is already known bug in f34
It is caused with the new release of rpkg-1.63-1. The issue was revealed after f34 release was moved to the stable. But now it is fixed in rpkg-1.63-2

If you want to know more ...
https://bodhi.fedoraproject.org/updates/FEDORA-2021-30e0273efd


rpkg-1.62 should be safe for grub2

or there is fixed 1.63-2 for f34 prepared in the testing repo:
https://bodhi.fedoraproject.org/updates/FEDORA-2021-24f5d10bf7

Comment 2 Renaud Métrich 2021-09-02 13:35:16 UTC
Thanks Ondrej,

The test fix for for "fedpkg" for me, but not "rhpkg":


$ rpm -qa python3-rpkg
python3-rpkg-1.63-2.fc34.noarch

$ rhpkg prep --builddir foo
Could not execute prep: Error running rpmspec on "/home/rmetrich/RHPKG/grub2/grub2.spec", return code 1

Comment 3 Otto Liljalaakso 2021-09-02 20:31:56 UTC
(In reply to Renaud Métrich from comment #2)
> Thanks Ondrej,
> 
> The test fix for for "fedpkg" for me, but not "rhpkg":
> 
> 
> $ rpm -qa python3-rpkg
> python3-rpkg-1.63-2.fc34.noarch
> 
> $ rhpkg prep --builddir foo
> Could not execute prep: Error running rpmspec on
> "/home/rmetrich/RHPKG/grub2/grub2.spec", return code 1

Author of the feature that originally caused this regression here.
I am sorry for the trouble this has caused.
Unfortunately, I have never done anything with rhpkg or rhel before.
How can I install rhpkg on Fedora so I could try to reproduce this?
And was this still on grub2 repo from src.fedoraproject.org,
even if you are manipulating it with rhpkg?

Comment 4 Ondřej Nosek 2021-09-02 20:57:50 UTC
@oturpe:
Thanks for your interest. rhpkg is Red Hat's internal tool based on rpkg. I am afraid it is only available in the internal network (both code and packages).

@rmetrich:
I tried to recreate it on F33. Packages with the same version should be the same across distributions. But I didn't see the error so far. Will you, please, provide more information about your recreation? Including the repository's branch.

$ dnf install rhpkg
# get new rpkg 1.63-2
$ dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-20e5f8a6b8
$ rpm -qa | grep rpkg
rpkg-common-1.63-2.fc33.noarch
python3-rpkg-1.63-2.fc33.noarch
$ rpm -qa | grep rhpkg
rhpkg-1.42-3.fc33eng.noarch
$ rhpkg clone grub2
$ cd grub2
$ git checkout rhel-9.0.0
$ rhpkg prep --builddir foo
# works
+exit 0

Comment 5 Otto Liljalaakso 2021-09-02 21:08:12 UTC
(In reply to Ondřej Nosek from comment #4)
> @oturpe:
> Thanks for your interest. rhpkg is Red Hat's internal tool based on rpkg. I
> am afraid it is only available in the internal network (both code and
> packages).

Thank you for explaining this.
I suspected something like that,
because I could not find it with a search engine.
That being the case,
I am afraid there is not much I can do.

Perhaps the error message given when rpmspec fails
should include stderr in addition to return code
so that it would be more obvious what happened.

Comment 6 Renaud Métrich 2021-09-03 06:54:23 UTC
OK sorry for the confusion here, apparently only rhel-7.9 branch is affected.
And adding stderr in the exception, I can see it's due to a "known issue":

pyrpkg.errors.rpkgError: Error running rpmspec on "/home/rmetrich/RHPKG/grub2/grub2.spec", return code 1, stderr do_primary_efi_build: invalid option -- 'f'
error: /home/rmetrich/RHPKG/grub2/grub2.spec: line 157: Unknown option f in do_primary_efi_build()


This always happens with rhpkg from fedora (to extract rhel-7.9 grub2 branch, I need to use a rhpkg on RHEL7 ...).

So, please ignore ...

Still I think having the stderr printed could help troubleshooting.

Comment 7 Ondřej Nosek 2021-09-06 16:24:48 UTC
I added the output for these debug messages, that rpmspec provides:

https://pagure.io/rpkg/pull-request/575

Comment 8 Fedora Update System 2022-02-07 23:39:45 UTC
FEDORA-2022-fdc9661b8e has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-fdc9661b8e

Comment 9 Fedora Update System 2022-02-07 23:42:13 UTC
FEDORA-2022-fdc9661b8e has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2022-02-09 01:40:18 UTC
FEDORA-2022-c17a63bb83 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-c17a63bb83

Comment 11 Fedora Update System 2022-02-17 03:05:58 UTC
FEDORA-2022-c17a63bb83 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


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