Skip to content

Instantly share code, notes, and snippets.

@jaredmorrow
Last active December 14, 2015 00:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jaredmorrow/4999933 to your computer and use it in GitHub Desktop.
Save jaredmorrow/4999933 to your computer and use it in GitHub Desktop.
Which SmartOS package to use

SmartOS albeit powerful, makes some easy things like figuring out a "version" of SmartOS very difficult and confusing. To someone like Basho who makes packages for SmartOS, it is enough to drive us (me) insane trying to figure out how to label the packages.

The problem lies in trying to define the version at all. Is the version you care about listed in uname -a? How about a file in /etc/ that tells you? The answer to bolth of those questions is "no". uname -v gives you a string like joyent_20130125T031721Z The only file in /etc/ that comes close is pkgsrc_version, but that is only sometimes available on the system. The real answer is a combination of the Global Zone snapshot version and the pkgsrc version in the guest zones.


So how do I label my packages for SmartOS?

With the uname -v example above, joyent_20130125T031721Z describes the global zone, and has some influence on how apps run, but not enough to determine which package will work on which system. Plus I don't think anyone wants "riak-1.2.0-smartos20130125T031721Z.tar.gz", at least I don't.

The thing that really matters for something like Riak is what dataset was used to make the SmartOS VM. These datasets come from joyent and appear like this with the dsadm command:

fdea06b0-3f24-11e2-ac50-0b645575ce9d smartos 2012-12-05 sdc:sdc:base64:1.8.4
f4c23828-7981-11e1-912f-8b6d67c68076 smartos 2012-03-29 sdc:sdc:smartos64:1.6.1

This is where my 1.6 and 1.8 versions come from in the package naming. It isn't perfect, it isn't even good, but it is the best I could come up with. So, if you know what dataset you used to make your SmartOS VM, you will know what package to use.


What about Joyent Cloud users who don't know what dataset was used? Sigh.

The way to determine which Riak package to use follows.

In the guest zone do:

cat /opt/local/etc/pkgin/repositories.conf
  • If this returns http://pkgsrc.joyent.com/sdc6/2012Q2/x86_64/All or any other *2012Q2* you need to use the 1.8 labelled download.
  • If this returns http://pkgsrc.joyent.com/sdc6/2011Q4/x86_64/All or any other *2011* you need to use the 1.6 labelled download.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment