Bug 1584480

Summary: cjdns-20.2 won't build on s390x
Product: [Fedora] Fedora Reporter: Stuart D Gathman <stuart>
Component: cjdnsAssignee: Stuart D Gathman <stuart>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 28CC: dan, stuart
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: cjdns-20.2-2.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-09 20:40:43 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    
Attachments:
Description Flags
WIP to replace Sign.c with test cases
none
add s390x support into cnacl none

Description Stuart D Gathman 2018-05-31 02:58:40 UTC
Description of problem:
cjdns-20.2 must use embedded cnacl which doesn't support s390x

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

How reproducible:
always

Steps to Reproduce:
1. build on s390x
2.
3.

Actual results:
no "plan" for s390x

Expected results:
build success

Additional info:
cjdns-20 started using internal apis in the embedded cnacl, making use of libsodium or libnacl impossible until that code is reimplemented for libsodium/libnacl.  The embedded cnacl needs a "plan" for each supported arch, and there is no plan for s390x.  

An s390x person could try to port the cnacl, but I think a better effort is for a crypto person to figure out how to do the same thing with libsodium.  The problem code is currently limited to crypto/Sign.c.  It uses ge.h and sc.h, which are, I believe low level field and scalar operations.  libnacl actually seems to export the functions under different names - but the headers would have to be patched in.  That would at least be better than using the embedded library.

Comment 1 Stuart D Gathman 2018-05-31 03:00:36 UTC
In the meantime, I have excluded s390x from builds:

%if 0%{use_embedded}
# The nodejs build system for embedded cnacl has no "plan" for s390x.
# It might work to copy another big endian plan like ppc64.
ExcludeArch: s390x
%endif

Comment 2 Stuart D Gathman 2018-05-31 03:24:42 UTC
Created attachment 1446057 [details]
WIP to replace Sign.c with test cases

The test cases in testsign.c are incomplete or incorrect, because incorporating the replacements in Sign.c fail the project test cases - which are the ultimate authority.

Comment 3 Dan HorĂ¡k 2018-05-31 10:21:35 UTC
Created attachment 1446213 [details]
add s390x support into cnacl

I went thru the cnacl code and this is the result, it allows to build it independently with node_build/dependencies/cnacl/do or as a part of cjdns.

Comment 4 Fedora Update System 2018-05-31 17:17:44 UTC
cjdns-20.2-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ed28eecbd9

Comment 5 Fedora Update System 2018-05-31 17:17:55 UTC
cjdns-20.2-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ed28eecbd9

Comment 6 Fedora Update System 2018-06-01 13:15:48 UTC
cjdns-20.2-2.fc28 has been pushed to the Fedora 28 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-2018-ed28eecbd9

Comment 7 Fedora Update System 2018-06-09 20:40:43 UTC
cjdns-20.2-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.