Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ppc64 support to architecture #155

Closed
ramereth opened this issue May 7, 2014 · 8 comments
Closed

Add ppc64 support to architecture #155

ramereth opened this issue May 7, 2014 · 8 comments

Comments

@ramereth
Copy link

ramereth commented May 7, 2014

I'm working on getting chef built on ppc64 but ran into an issue with building openssl. I discovered that ppc64 is not an architecture that omnibus knows about looking at libs/omnibus/software.rb:426. I would like to have it added so that it can be used in omnibus-software. I'll try submitting a PR soon.

Currently it only supports sparc and defaults to intel otherwise.

@sethvargo
Copy link
Contributor

@ramereth so is this an issue with omnibus-ruby? I don't quite understand why it's opened here...

@ramereth
Copy link
Author

ramereth commented May 7, 2014

The problem is I want to use if architecture == "ppc64" much like how omnibus-software/config/software/openssl.rb does it for sparc. However omnibus-ruby only supports sparc. Ideally it should just work for other archs. Perhaps a better solution is to use powerpc if machine type returns either ppc or ppc64.

@sethvargo
Copy link
Contributor

@ramereth, so that's really an Ohai issue then, no? /cc @mcquin

@ramereth
Copy link
Author

ramereth commented May 7, 2014

I'm not sure why it isn't just using what Ohai.kernel['machine'] returns but I assume in the case of sparc they have multiple machine types and also simplifying anything running on intel (instead of doing i686 and x86_64, etc). In the case of powerpc it would just be ppc and ppc64 and maybe ppc64le (i.e. /ppc/ should catch it).

@sethvargo
Copy link
Contributor

So - here's the code:

# Return the architecture of the machine, as determined by Ohai.
# @return [String] Either "sparc" or "intel", as appropriate
# @todo Is this used?  Doesn't appear to be...
def architecture
  Ohai.kernel['machine'] =~ /sun/ ? 'sparc' : 'intel'
end

@lamont-granquist what are you thoughts here? Should we just make architecture return Ohai.kernel['machine']?

@ramereth you have access to the OHAI data object too, so you can just check the kernel using OHAI.kernel['machine'] instead of architecture.

@sethvargo
Copy link
Contributor

@ramereth you can get the true value of machine using Ohai.kernel['machine'] in a definition.

@lamont-granquist
Copy link
Contributor

this method should clearly die and we should use the Ohai object directly per your mass-commit to convert to that...

@sethvargo
Copy link
Contributor

That method is deprecated on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants