Bug 1713107

Summary: compose-utils fails to build in Fedora 31/rawhide
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: koboAssignee: Daniel Mach <dmach>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmach, kdudka, lsedlar, rmcgover, rohan, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-07 10:47:07 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: 1700317, 1686977, 1693751, 1732841, 1779194    
Attachments:
Description Flags
build.log from Koji
none
root.log from Koji none

Description Miro Hrončok 2019-05-22 21:46:22 UTC
Created attachment 1572162 [details]
build.log from Koji

See https://koji.fedoraproject.org/koji/taskinfo?taskID=35001283

======================================================================
ERROR: test_changelog (tests.test_changelog.ChangelogTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/compose-utils-0.1.27/tests/test_changelog.py", line 92, in test_changelog
    data = changelog.get_changelog(old_compose, new_compose)
  File "/builddir/build/BUILD/compose-utils-0.1.27/compose_utils/changelog.py", line 294, in get_changelog
    srpm_headers_old = self.read_srpm_headers(srpms_old)
  File "/builddir/build/BUILD/compose-utils-0.1.27/compose_utils/changelog.py", line 194, in read_srpm_headers
    pool.stop()
  File "/usr/lib/python3.7/site-packages/kobo/threads.py", line 120, in stop
    six.reraise(exc_info[0], exc_info[1], exc_info[2])
  File "/usr/lib/python3.7/site-packages/six.py", line 693, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/kobo/threads.py", line 67, in run
    self.process(item, num)
  File "/builddir/build/BUILD/compose-utils-0.1.27/compose_utils/changelog.py", line 89, in process
    rpm_obj = self.pool.file_cache.add(file_path)
  File "/usr/lib/python3.7/site-packages/kobo/pkgset.py", line 257, in add
    value = file_wrapper_class(file_path, stat=st, **kwargs)
  File "/builddir/build/BUILD/compose-utils-0.1.27/compose_utils/changelog.py", line 60, in __init__
    super(SimpleRpmWrapperWithChangelog, self).__init__(file_path, **kwargs)
  File "/usr/lib/python3.7/site-packages/kobo/pkgset.py", line 179, in __init__
    self.name = kobo.rpmlib.get_header_field(header, "name").decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
======================================================================
ERROR: test_changelog_with_modular_suffix (tests.test_changelog.ChangelogTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/compose-utils-0.1.27/tests/test_changelog.py", line 179, in test_changelog_with_modular_suffix
    data = changelog.get_changelog(old_compose, new_compose)
  File "/builddir/build/BUILD/compose-utils-0.1.27/compose_utils/changelog.py", line 294, in get_changelog
    srpm_headers_old = self.read_srpm_headers(srpms_old)
  File "/builddir/build/BUILD/compose-utils-0.1.27/compose_utils/changelog.py", line 194, in read_srpm_headers
    pool.stop()
  File "/usr/lib/python3.7/site-packages/kobo/threads.py", line 120, in stop
    six.reraise(exc_info[0], exc_info[1], exc_info[2])
  File "/usr/lib/python3.7/site-packages/six.py", line 693, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/kobo/threads.py", line 67, in run
    self.process(item, num)
  File "/builddir/build/BUILD/compose-utils-0.1.27/compose_utils/changelog.py", line 89, in process
    rpm_obj = self.pool.file_cache.add(file_path)
  File "/usr/lib/python3.7/site-packages/kobo/pkgset.py", line 257, in add
    value = file_wrapper_class(file_path, stat=st, **kwargs)
  File "/builddir/build/BUILD/compose-utils-0.1.27/compose_utils/changelog.py", line 60, in __init__
    super(SimpleRpmWrapperWithChangelog, self).__init__(file_path, **kwargs)
  File "/usr/lib/python3.7/site-packages/kobo/pkgset.py", line 179, in __init__
    self.name = kobo.rpmlib.get_header_field(header, "name").decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
----------------------------------------------------------------------
Ran 99 tests in 2.736s
FAILED (errors=2)

Full logs attached.

The failure looks very much like bz1693751.

This blocks the Python 3.8 rebuild but also happens with Python 3.7.

Comment 1 Miro Hrončok 2019-05-22 21:47:01 UTC
Created attachment 1572163 [details]
root.log from Koji

Comment 2 Lubomír Sedlář 2019-06-04 12:57:44 UTC
This is a problem in Kobo, and there's not much that can be done about it directly in compose-utils (other than dropping use of kobo). I'll change components accordingly.

Comment 3 Lubomír Sedlář 2019-06-05 06:50:15 UTC
Proposed fix at kobo level: https://github.com/release-engineering/kobo/pull/115
Fixes to compose-utils to make it work with that patch: https://pagure.io/compose-utils/pull-request/97

Comment 4 Rohan McGovern 2019-06-07 00:03:09 UTC
That kobo fix is present now in kobo-0.10.0-1.fc31.

Comment 5 Lubomír Sedlář 2019-06-07 10:47:07 UTC
Compose-utils is now rebuilt in rawhide too.

Comment 6 Miro Hrončok 2019-06-07 10:55:55 UTC
Thanks. Rebuilding in copr, will reopen of it fails.