Bug 2156942

Summary: Tests fail on big-endian platform (s390x)
Product: [Fedora] Fedora Reporter: Ben Beasley <code>
Component: python-pykeepassAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: ego.cordatus, extras-orphan, gwync
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-pykeepass-4.0.4-1.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-12 12:20:22 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: 485231    

Description Ben Beasley 2022-12-29 18:28:18 UTC
Description of problem:

Tests fail (and library fails to import) due to an assertion error on s390x.

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


How reproducible:


Steps to Reproduce:
1. fedpkg scratch-build --arches s390x

Actual results:

+ /usr/bin/python3 -m unittest discover -s tests -v
tests (unittest.loader._FailedTest.tests) ... ERROR
======================================================================
ERROR: tests (unittest.loader._FailedTest.tests)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/builddir/build/BUILD/pykeepass-4.0.3/tests/tests.py", line 18, in <module>
    from pykeepass import PyKeePass, icons
  File "/builddir/build/BUILD/pykeepass-4.0.3/pykeepass/__init__.py", line 2, in <module>
    from .pykeepass import PyKeePass, create_database
  File "/builddir/build/BUILD/pykeepass-4.0.3/pykeepass/pykeepass.py", line 28, in <module>
    from pykeepass.kdbx_parsing.kdbx import KDBX
  File "/builddir/build/BUILD/pykeepass-4.0.3/pykeepass/kdbx_parsing/__init__.py", line 1, in <module>
    from .kdbx import KDBX
  File "/builddir/build/BUILD/pykeepass-4.0.3/pykeepass/kdbx_parsing/kdbx.py", line 2, in <module>
    from .kdbx3 import DynamicHeader as DynamicHeader3
  File "/builddir/build/BUILD/pykeepass-4.0.3/pykeepass/kdbx_parsing/kdbx3.py", line 10, in <module>
    from .common import (
  File "/builddir/build/BUILD/pykeepass-4.0.3/pykeepass/kdbx_parsing/common.py", line 2, in <module>
    from .twofish import Twofish
  File "/builddir/build/BUILD/pykeepass-4.0.3/pykeepass/kdbx_parsing/twofish.py", line 27, in <module>
    from . import pytwofish
  File "/builddir/build/BUILD/pykeepass-4.0.3/pykeepass/kdbx_parsing/pytwofish.py", line 395, in <module>
    assert b'l\xb4V\x1c@\xbf\n\x97\x05\x93\x1c\xb6\xd4\x08\xe7\xfa' == Twofish(__testkey).encrypt(__testdat)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)


Expected results:

Tests pass.

Additional info:

ExcludeArch will be added. The sole dependent package already excludes s390x: https://src.fedoraproject.org/rpms/secrets/blob/e31477918101de297a36372281fe12de4a9fe259/f/secrets.spec#_15

Comment 1 Fedora Admin user for bugzilla script actions 2022-12-30 00:29:27 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 2 Ben Cotton 2023-02-07 15:11:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 3 Ben Beasley 2023-03-05 14:37:06 UTC
Fix proposed upstream. Allowing some time for upstream to (maybe) review it.

https://github.com/libkeepass/pykeepass/pull/336

Comment 4 Fedora Update System 2023-05-12 12:17:47 UTC
FEDORA-2023-e00430d7bb has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-e00430d7bb

Comment 5 Fedora Update System 2023-05-12 12:20:22 UTC
FEDORA-2023-e00430d7bb has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.