Bug 1743902

Summary: swid-tools fails to build with Python 3.8
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: swid-toolsAssignee: Jan Pazdziora <jpazdziora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: jpazdziora, mihai, rpm-software-management, sct
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: swid-tools-0.8.6-1.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-06 12:31:09 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:
Bug Depends On:    
Bug Blocks: 1686977    

Description Miro Hrončok 2019-08-20 23:26:36 UTC
swid-tools-0.8.4-4.fc32 failed to rebuild with Python 3.8.

See https://koji.fedoraproject.org/koji/buildinfo?buildID=1360631

The error is:

BUILDSTDERR: Unable to detect release version (use '--releasever' to specify release version)
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/usr/bin/dnf", line 58, in <module>
BUILDSTDERR:     main.user_main(sys.argv[1:], exit_code=True)
BUILDSTDERR:   File "/usr/lib/python3.8/site-packages/dnf/cli/main.py", line 191, in user_main
BUILDSTDERR:     errcode = main(args)
BUILDSTDERR:   File "/usr/lib/python3.8/site-packages/dnf/cli/main.py", line 65, in main
BUILDSTDERR:     return _main(base, args, cli_class, option_parser_class)
BUILDSTDERR:   File "/usr/lib/python3.8/site-packages/dnf/cli/main.py", line 94, in _main
BUILDSTDERR:     cli.configure(list(map(ucd, args)), option_parser())
BUILDSTDERR:   File "/usr/lib/python3.8/site-packages/dnf/cli/cli.py", line 947, in configure
BUILDSTDERR:     opts = self.optparser.parse_command_args(self.command, args)
BUILDSTDERR:   File "/usr/lib/python3.8/site-packages/dnf/cli/option_parser.py", line 393, in parse_command_args
BUILDSTDERR:     self._add_command_options(command)
BUILDSTDERR:   File "/usr/lib/python3.8/site-packages/dnf/cli/option_parser.py", line 380, in _add_command_options
BUILDSTDERR:     command.set_argparser(self.command_group)
BUILDSTDERR:   File "lib/dnf-plugins/swidtags.py", line 48, in set_argparser
BUILDSTDERR:     subparser = parser.add_subparsers(parser_class=argparse.ArgumentParser, dest="swidtagscmd")
BUILDSTDERR: AttributeError: '_ArgumentGroup' object has no attribute 'add_subparsers'
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.CGob0R (%check)
BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.CGob0R (%check)

This issue is blocking the Python 3.8 rebuilds. If this package won't build with 3.8, it won't be installable, along with all its dependent packages, after the side tag is merged.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well. 


The coordinated rebuild of Python 3.8 has started in the `f32-python` side tag.

If you figure out how to rebuild this package, please don't rebuild it in regular rawhide, but use the side tag instead:

    on branch master:
    $ fedpkg build --target=f32-python

To wait for a build to show up in the side tag, do:

    $ koji wait-repo f32-python --build=<nvr>

Where <nvr> is name-version-release of the source package, e.g. python-foo-1.1-2.fc32.

An updated mock config is posted at: http://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Thanks. Let us know if you need up to date info, or if you have any questions.

Comment 1 Jan Pazdziora 2019-08-21 09:02:58 UTC
It seems it is failing to build on Fedora rawhide even with the current Python 3.7.

Comment 2 Miro Hrončok 2019-08-21 09:22:11 UTC
(Whether the error in fact is or is not related to Python 3.8 bares very little significance. The package needs to be rebuilt with Python 3.8 in order to be installable. When it fails for Python 3.8 related reasons, it will not be installable. When it fails for Python 3.8 unrelated reasons, it will not be installable either.)

Comment 3 Jan Pazdziora 2019-08-21 09:44:47 UTC
It seems https://bodhi.fedoraproject.org/updates/FEDORA-2019-40235845dc (dnf-4.2.8 + dnf-plugins-core-4.0.9) breaks things even on Fedora 30.

Comment 4 Jan Pazdziora 2019-08-21 09:48:53 UTC
Specifically, it's the upgrade from python3-dnf-4.2.7-2.fc30.noarch to python3-dnf-4.2.8-1.fc30.noarch (and dnf, dnf-data, and dnf-yum, that get pulled with it) which causes the regression, even if dnf-plugins-core stays at version dnf-plugins-core-4.0.7-1.fc30.noarch.

Comment 5 Jan Pazdziora 2019-08-21 10:16:02 UTC
The regression got introduced by https://github.com/rpm-software-management/dnf/commit/de9643afbdf5bb97f40e7f965d7eae2d28d91118.

Comment 6 Jan Pazdziora 2019-08-21 16:22:24 UTC
While I can likely replace

    @staticmethod
    def set_argparser(parser):
        subparser = parser.add_subparsers(parser_class=argparse.ArgumentParser, dest="swidtagscmd")
        subparser.add_parser("sync", help="for installed rpms, fetch SWID tags from repository metadata or generate them locally")
        subparser.add_parser("regen", help="synonym to sync")
        subparser.add_parser("purge", help="remove all SWID tags that were locally-generated by the plugin")

with

    @staticmethod
    def set_argparser(parser):
        parser.add_argument("swidtagscmd", nargs=1, choices=["sync", "regen", "purge"])

I haven't found a way to specify help strings for that argument and the individual values.

Comment 7 Miro Hrončok 2019-08-21 16:35:11 UTC
The f32-python side tag has been merged. In order to rebuild the package, do it in regular rawhide, but please wait until python3-3.8 is tagged:

  $ koji wait-repo f32-build --build python3-3.8.0~b3-3.fc32


If your built already started in f32-python, after it is finished, please tag it to rawhide with:

  $ koji tag-build f32-pending <nvr>

For example:

  $ koji tag-build f32-pending libreoffice-6.3.0.4-3.fc32

Thanks!

(This comment is mass posted to all bugzillas blocking the PYTHON38 tracking bug.)

Comment 8 Miro Hrončok 2019-08-21 17:29:15 UTC
(Python 3.8 has landed in the rawhide buildroot.)

Comment 10 Jan Pazdziora 2019-08-26 12:56:22 UTC
The swid-tools-0.8.6-1.fc32 was built for rawhide: https://bodhi.fedoraproject.org/updates/FEDORA-2019-840397fe93.

Comment 11 Fedora Update System 2019-08-26 13:30:18 UTC
FEDORA-2019-40235845dc has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-40235845dc

Comment 12 Fedora Update System 2019-08-27 18:21:32 UTC
dnf-4.2.8-1.fc30, dnf-plugins-core-4.0.9-1.fc30, dnf-plugins-extras-4.0.5-1.fc30, libdnf-0.35.2-1.fc30, swid-tools-0.8.6-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-40235845dc

Comment 13 Fedora Update System 2019-08-29 05:05:31 UTC
FEDORA-2019-40235845dc has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-40235845dc

Comment 14 Fedora Update System 2019-08-30 00:03:43 UTC
dnf-4.2.8-1.fc30, dnf-plugins-core-4.0.9-1.fc30, libdnf-0.35.2-1.fc30, swid-tools-0.8.6-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-40235845dc

Comment 15 Fedora Update System 2019-09-06 12:31:09 UTC
dnf-4.2.8-1.fc30, dnf-plugins-core-4.0.9-1.fc30, libdnf-0.35.2-1.fc30, swid-tools-0.8.6-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.