Bug 1053263

Summary: Trivial change to ruby's config.h to enable ppc64le
Product: [Fedora] Fedora Reporter: Brent Baude <bbaude>
Component: rubyAssignee: Vít Ondruch <vondruch>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: bbaude, bkabrda, jstribny, mmorsi, mtasaka, skottler, tagoh, vanmeeuwen+fedora, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: ruby-2.0.0.353-17.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-06 12:45:05 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: 1051573    

Description Brent Baude 2014-01-14 21:54:17 UTC
Please consider the following change to the config.h for ruby.  This sets the config-ppc64le properly for the ppc64le arch.


index ce501db..b34e398 100644
--- a/config.h
+++ b/config.h
@@ -20,7 +20,12 @@
 #elif defined(__ia64__)
 #include "ruby/config-ia64.h"
 #elif defined(__powerpc64__)
+#include <endian.h>
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 #include "ruby/config-ppc64.h"
+#else
+#include "ruby/config-ppc64le.h"
+#endif
 #elif defined(__powerpc__)
 #include "ruby/config-ppc.h"
 #elif defined(__s390x__)

Comment 1 Sam Kottler 2014-01-14 22:04:44 UTC
I'd rather have the patch get pushed upstream instead of having us carry it. Is there any reason it can't be included in ruby-core? If it can't be included in core, please tell us the source of the patch or whether you're the author.

Comment 2 Brent Baude 2014-01-14 22:09:22 UTC
Hi Sam, thanks for the speed response.  I thought initially that the config.h was part of the fedora package (there are other packages that do similar) but as you point out, it is part of the upstream package.

I'm happy to take this upstream but I suspect they won't drop a release as quick as I like.  When I make the upstream submission, can I point you at it and ask that you temporarily bring it in?

Comment 3 Sam Kottler 2014-01-14 22:13:40 UTC
Yep, we can absolutely do that. If the patch gets accepted then we can patch Fedora's ruby temporarily until we upgrade to the last release of core. If the patch doesn't get accepted by we deem it acceptable to carry with Fedora then that's another option, too. We always try to work upstream first, though.

Just so I know - where did the patch come from? Are you the author? Is this picked out of someone else's repo?

Comment 4 Sam Kottler 2014-01-14 22:16:18 UTC
I'm assigning this to myself so I can track it.

Comment 5 Vít Ondruch 2014-01-15 09:21:04 UTC
(In reply to Sam Kottler from comment #1)
Sam, config.h is ours. And you can read through argument with upstream about this header file in bug 975660 though.

(In reply to baude from comment #0)
Thanks for the patch. It is committed in dist-git [1] for now. Do you need fresh build? Do you need this patch also for older releases? I'd prefer to keep it just in Rawhide.


[1] http://pkgs.fedoraproject.org/cgit/ruby.git/commit/?id=c4c64c841ce1b36e531038f235af66162c14b5a0

Comment 6 Brent Baude 2014-01-15 13:57:56 UTC
If you just nvr bump rawhide, I'm happy.  Thanks!

Comment 7 Vít Ondruch 2014-01-15 14:09:11 UTC
Yes, I did.