Bug 2239481

Summary: %check does not pass on s390x
Product: [Fedora] Fedora Reporter: Mamoru TASAKA <mtasaka>
Component: rubygem-niftiAssignee: Ilia Gradina <ilya.gradina>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: ilya.gradina, neuro-sig
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-nifti-0.0.2-23.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-27 01:33:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Trial patch to fix endianness none

Description Mamoru TASAKA 2023-09-18 15:06:50 UTC
Rebuilding of rubygem-nifti-0.0.2-22.fc40 on s390x fails on %check
https://copr.fedorainfracloud.org/coprs/mtasaka/gem-deps-trial/build/6414692/

Most probably this is big endian issue.

From my quick check %check failing test tries to read fixtures/3plLoc.nii ,
as this is already existing file, I think this file must always be read as
little endian binary file, but I guess on s390x rubygem-nifti tries to
interpret this as big endian.

However reading https://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h ,
this does not mention for endianness, so for now I am not sure what is
the correct behavior on s390x.

Reproducible: Always

Comment 1 Mamoru TASAKA 2023-09-18 15:25:04 UTC
Created attachment 1989403 [details]
Trial patch to fix endianness

So simply changing template literals for unpack like attached will meet the demand?? (at least test seems to pass on s390x)

Comment 2 Fedora Update System 2023-09-18 16:33:05 UTC
FEDORA-2023-7ad16120d0 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-7ad16120d0

Comment 3 Ilia Gradina 2023-09-18 16:36:34 UTC
(In reply to Mamoru TASAKA from comment #1)
> Created attachment 1989403 [details]
> Trial patch to fix endianness
> 
> So simply changing template literals for unpack like attached will meet the
> demand?? (at least test seems to pass on s390x)

Hi Mamoru, thank you for the patch. I made builds with it, but we need to check the package's correct functioning. Can you help with this?

Comment 4 Mamoru TASAKA 2023-09-19 00:24:01 UTC
Looks good, %check passes on x86_64, ppc64le, s390x, and at least x86_64 behavior is the same as before. Thank you.

Comment 5 Fedora Update System 2023-09-19 01:11:35 UTC
FEDORA-2023-7ad16120d0 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-7ad16120d0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-7ad16120d0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Ilia Gradina 2023-09-19 13:19:19 UTC
(In reply to Mamoru TASAKA from comment #4)
> Looks good, %check passes on x86_64, ppc64le, s390x, and at least x86_64
> behavior is the same as before. Thank you.

Thank you for the patch)

Comment 7 Fedora Update System 2023-09-27 01:33:03 UTC
FEDORA-2023-7ad16120d0 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.