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

SmartOS can't install SVR4-style Solaris packages #321

Closed
juliandunn opened this issue Aug 21, 2014 · 22 comments
Closed

SmartOS can't install SVR4-style Solaris packages #321

juliandunn opened this issue Aug 21, 2014 · 22 comments
Assignees
Labels
Type: Enhancement Adds new functionality.

Comments

@juliandunn
Copy link
Contributor

Let me try this again in the right repo...

SmartOS does not have the old Solaris pkgadd commands as it uses BSD pkgsrc under the covers. Thus, our attempt to coerce it into installing a SVR4-type .pkg file is actually incorrect.

If we actually do intend to support SmartOS in the context of the platform support RFC, then we would need to build native pkgsrc packages for it. (You could pkgtrans the Solaris ones to it as part of CI or something, as a cheap trick.)

@bixu
Copy link

bixu commented Sep 26, 2014

FYI, I've done the pkgtrans excercise on SmartOS and the omnibus build still fails due to some missing libs, or libs at the wrong path (I forget which).

@schisamo
Copy link
Contributor

@bixu Yeah I think we might need to do special builds for SmartOS. Please add your comments/support to chef-boneyard/chef-rfc#21 which is our aspirational platform support policy.

@bixu
Copy link

bixu commented Sep 26, 2014

I totally get that. I'm still a bit confused about how the RFC process works. Do I just add comments to the discussion?

@juliandunn
Copy link
Contributor Author

@bixu Yup.

@bixu
Copy link

bixu commented Sep 26, 2014

Done. Thanks!

@helperton
Copy link

We're having the exact issue with Solaris 11.1

x.x.1.203 downloading https://www.opscode.com/chef/metadata?v=11.12.4&prerelease=false&nightlies=false&p=solaris2&pv=5.11&m=i386
x.x.1.203 to file /tmp/install.sh.1237/metadata.txt
x.x.1.203 trying wget...
x.x.1.203 url https://opscode-omnibus-packages.s3.amazonaws.com/solaris2/5.10/i386/chef-11.12.4-1.solaris2.5.10.solaris
x.x.1.203 md5 45d4b863fc7a869e7939f2b7e302c7b5
x.x.1.203 sha256 1461ece12a984c7501c1e003633e6f7158dbb405d70177738c0b362617db4c77
x.x.1.203 downloaded metadata file looks valid...
x.x.1.203 downloading https://opscode-omnibus-packages.s3.amazonaws.com/solaris2/5.10/i386/chef-11.12.4-1.solaris2.5.10.solaris
x.x.1.203 to file /tmp/install.sh.1237/chef-11.12.4-1.solaris2.5.10.solaris
x.x.1.203 trying wget...
x.x.1.203 Comparing checksum with sha256sum...
x.x.1.203 Installing Chef 11.12.4
x.x.1.203 installing with pkgadd...
x.x.1.203 /dev/fd/63: line 410: pkgadd: command not found
x.x.1.203 Installation failed
x.x.1.203 Please file a bug report at https://github.com/opscode/opscode-omnitruck/issues/new
x.x.1.203 Version: 11.12.4
x.x.1.203
x.x.1.203 Please detail your operating system type, version and any other relevant details
x.x.1.203 Starting first Chef Client run...
x.x.1.203 bash: line 86: chef-client: command not found

uname -a
SunOS somehost 5.11 11.1 i86pc i386 i86pc

@helperton
Copy link

Temporarily linking pkadd to /usr/bin:

cd /usr/bin
ln -s /usr/sbin/pkgadd

So that pkgadd is in the path of a normal user seems to temporarily fix it

@bixu
Copy link

bixu commented Dec 5, 2014

IIRC, Chef engineering is using Vagrant as part of the Omnibus Chef build process. If this is true, then this work may help: https://github.com/vagrant-smartos/vagrant-smartos-zones

@bahamas10
Copy link

Same issue here...

$ uname -a
SunOS sjc1-dave-01.voxer.com 5.11 joyent_20140530T010428Z i86pc i386 i86pc Solaris

@bixu
Copy link

bixu commented Feb 13, 2015

What needs to happen for us to have an auto generated chef omnibus install for SmartOS? I would like to keep Chef as a first-class SmartOS citizen (developer momentum at $job is moving towards Ansible lately). I'd like Chef to remain an equally valid choice :)

@bahamas10
Copy link

I would love to get chef working with omnibus on SmartOS... if there is anything I can do to help, or testing needed, etc. let me know i'm happy to help resolve this issue.

@juliandunn
Copy link
Contributor Author

What we are in need of is some patches here. To start, you probably need to make a packager definition for SmartOS, if the toolchain is different than solaris, whose definition is here: https://github.com/chef/omnibus/blob/master/lib/omnibus/packagers/solaris.rb

After that, you can wire it into the platform packager map and try to omnibus-build a Chef client using the omnibus-chef project. Chances are, a native SmartOS build won't quite work because of Solaris conditionals, but it shouldn't be too much work to add that into the omnibus-chef project definition.

It's unlikely that Chef Software, Inc. will have paid developer resources to put into this effort, as SmartOS is not a platform used by very many customers, but we would definitely take community patches. Hopefully the foregoing is enough for those who are interested to go on!

@bahamas10
Copy link

Great, thank you for the information @juliandunn

I'm currently attempting to run bundle exec omnbus build chef in omnibus-chef to completion without failing. I believe this patch chef/dep-selector-libgecode#41 will fix some (if not all) of the errors I'm currently seeing.

I do have a question regarding the package building process however. From what I understand about packaging on SmartOS, the prefix defaults to /opt/local... i don't know if it is possible to install to a path outside of that directory. However, I would imagine that this is an issue that isn't unique to SmartOS, so how does omnibus get around this?

@bixu
Copy link

bixu commented Feb 23, 2015

@bahamas10 I've got a real need for omnibus chef on SmartOS, so if you ever want to remote pair on this stuff, let me know. I'm in the Berlin timezone.

@juliandunn
Copy link
Contributor Author

@bahamas10 I've never seen a packaging system enforce that packages can only be installed to a particular hierarchy. Omnibus assumes that the package will live in /opt/chef

@bixu
Copy link

bixu commented Feb 24, 2015

/opt on SmartOS should be a fine location for the Omnibus install, as /opt is read/write on SmartOS.

@bahamas10
Copy link

@bixu me too.. i'm in New York timezone but would be happy to sit down and try to nail this down.

@juliandunn I believe pkg on freebsd has very strict rules about packages being stuck in /usr/local for instance. Any package installed via that method will be under that directory for security purposes... i don't know if SmartOS is the same way.

Either way, like @bixu mentioned it's a moot point, because worst case scenario there could be a post install script to mv /path/where/chef/was/installed /opt/chef

@bahamas10
Copy link

Just to get an updated todo

  1. get bundle exec omnibus build chef to work on smartos
  2. add a SmartOS packager definition to this project

To expand on section 1, we need to fix the bugs that are currently stopping this from working

If someone knows how to use those branches when running bundle exec omnibus build chef we can test them out and move forward.

@juliandunn
Copy link
Contributor Author

Couple options for you to proceed:

  • Modify the Gemfile temporarily in your omnibus-chef project to point to your own checkout of omnibus-software (https://github.com/chef/omnibus-chef/blob/master/Gemfile#L4) so you can hack around
  • Modify software definitions for libffi (in config/software) and dep-selector-libgecode to patch them, change source, or whatnot

@bixu
Copy link

bixu commented Feb 25, 2015

@juliandunn, thanks for the tips.

@bahamas10, when do you want to remote-pair on this? thinking screenhero here - drop me an email via my GitHub profile?

@michaelcarruthers
Copy link

@bixu I am needing to have a SmartOS omnibus package, let me know if you need an extra pair of hands.

@bahamas10
Copy link

FWIW these steps can get ruby and chef compiled and installed to /opt/chef on SmartOS. it's not the same as omnibus, but it does result in a self-contained chef installation https://gist.github.com/bahamas10/6a052faa8644d3d462d5

@thommay thommay self-assigned this Nov 25, 2016
@tas50 tas50 added the Type: Enhancement Adds new functionality. label Aug 10, 2018
@tas50 tas50 removed the Enhancement label Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

No branches or pull requests

9 participants