Bug 1467953 - cryptobone excludearch ppc64/ppc64le
cryptobone excludearch ppc64/ppc64le
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: cryptobone (Show other bugs)
27
ppc64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Ralf Senderek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-05 11:23 EDT by Ngo Than
Modified: 2017-08-20 14:27 EDT (History)
1 user (show)

See Also:
Fixed In Version: cryptobone-1.1.2-1 cryptobone-1.1.2-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-20 14:27:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ngo Than 2017-07-05 11:23:10 EDT
cryptobone package only builds for x86_64 %{ix86} because it has ExclusiveArch: x86_64 %{ix86} in the specfile.

We should add ppc64 ppc64le. It needs an patch to make it build on pppc64/ppc64le. I also created it and attach in the bugzilla.


diff -up cryptobone-1.1.1/src/renamesymbols.than cryptobone-1.1.1/src/renamesymbols
--- cryptobone-1.1.1/src/renamesymbols.than     2017-07-05 10:33:21.317705035 -0400
+++ cryptobone-1.1.1/src/renamesymbols  2017-07-05 10:34:47.079179162 -0400
@@ -10,6 +10,7 @@

 for F in $(find . -type f)
 do
+    sed -i 's/MASK2h1/MASK2h/g' $F
     sed -i 's/BN_/cl_BN_/g' $F
     sed -i 's/bn_/cl_bn_/g' $F
     sed -i 's/CAST_/cl_CAST_/g' $F


diff -Nur cryptobone.spec /home/than/cryptobone.spec 
--- cryptobone.spec     2017-07-05 15:56:44.074203391 +0200
+++ /home/than/cryptobone.spec  2017-07-05 17:18:55.563059351 +0200
@@ -14,7 +14,9 @@
 Source2:    gpgkey-3274CB29956498038A9C874BFBF6E2C28E9C98DD.asc
 Source3:    COPYING
 
-ExclusiveArch: x86_64 %{ix86} 
+Patch0:     cryptobone-ppc64.patch 
+
+ExclusiveArch: x86_64 %{ix86} ppc64 ppc64le
 # no aarch64 yet, bignum code does not compile
 
 BuildRequires: libbsd-devel
@@ -66,6 +68,7 @@
 gpg2 --homedir .gnupg --no-default-keyring --quiet --yes --output $KEYRING --dearmor  %{SOURCE2}
 gpg2 --homedir .gnupg --no-default-keyring --keyring $KEYRING --verify %{SOURCE1} %{SOURCE0}
 %setup 
+#%patch0 -p1 -b .ppc64
 
 %build
 %configure


It would be great if you could review it and apply to the next build if it's ok.
Thanks
Comment 1 Ngo Than 2017-07-05 11:24:17 EDT
scratc build https://koji.fedoraproject.org/koji/taskinfo?taskID=20343503
Comment 2 Ralf Senderek 2017-07-13 11:05:45 EDT
Than, 

the two symbols MASK2h1 and MASK2h hold different content. Have a look at
the source code! Just renaming symbols may lead to serious security
problems as these symbols are used in low-level bignum functions.

So your rename script is not the solution to the problem.

As soon as I have a solution that can be applied to the ppc64 architecture
alone, not changing anything on the other supported platforms, I'll post a
comment here.

Be patient.
Comment 3 Fedora Update System 2017-08-12 09:14:29 EDT
cryptobone-1.1.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c65ff62a3f
Comment 4 Ralf Senderek 2017-08-12 09:19:56 EDT
So there is a solution to building cryptobone for powerpc64 now. It's making its way through testing:

https://bodhi.fedoraproject.org/updates/FEDORA-2017-c65ff62a3f

As a matter of fact, the code should never have hit the line where MASK2h1 is 
referenced. So I got a few files from Peter Gutmann that made sure the
powerpc64 architecture is taking the correct path through the bignum routines.

I also added a small cosmetic change to the cryptobone GUI.
Comment 5 Fedora Update System 2017-08-13 00:06:28 EDT
cryptobone-1.1.2-1.fc26 has been pushed to the Fedora 26 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-2017-c65ff62a3f
Comment 6 Jan Kurik 2017-08-15 02:51:48 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.
Comment 7 Fedora Update System 2017-08-20 14:27:57 EDT
cryptobone-1.1.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.