For a server in an offline environment, how would I download a package from http://pkg.openindiana.org/dev? (or the better known http://pkg.oracle.com)

There is an install link which downloads a p5i file, with machine readable download information, but there is no http URL to the downloadable package file(s) or the listing of files.


The manifest is directly available http://pkg.openindiana.org/dev/manifest/0/developer%2Fbuild%2Fmake%400.5.11%2C5.11-0.151.1%3A20110912T022544Z.

The only thing that remains is to figure out how to get those individual files, listed in this fashion

file b8dac4eaeabc7d41b4bff842a2f6b54cb36449d7 chash=f3998eb4b0aa99b3c54682f1a765e19215e15622 group=bin mode=0755 owner=root path=usr/bin/sccsdiff pkg.csize=1620 pkg.size=3798
file 9b1eb9d425c9de60eba5759368160e709fb51143 chash=0de4a47b23c1ac5121c9216ec854b197c18bfe24 group=bin mode=0644 owner=root path=usr/lib/help/locale/C/ad pkg.csize=2201 pkg.size=5762
file 0f594094532464eab978e00d4d3e18519538fe7b chash=e6685b5da6534ef06ad4aa51c4655fe72f98a2f1 group=bin mode=0644 owner=root path=usr/lib/help/locale/C/bd pkg.csize=1082 pkg.size=2089
file a0d207452b8fa6dd62661cd8349fe92ae415de10 chash=67fd628d7578b7fd907eb75b973c91aeb7b06fee group=bin mode=0644 owner=root path=usr/lib/help/locale/C/cb pkg.csize=805 pkg.size=1498
file 6267fe29483aaffdd5ca7dadab0866e3c23024f5 chash=d769eee8c86a2aefb0af1abb6d55dd559b26864e group=bin mode=0644 owner=root path=usr/lib/help/locale/C/cm pkg.csize=1581 pkg.size=3341
file 18691bfa26474c1133b6ac55897f15bba8cf669a chash=55a97bca8ce191bae3621ace062f3192bf0def18 group=bin mode=0644 owner=root path=usr/lib/help/locale/C/cmds pkg.csize=2279 pkg.size=6573
file 614eef6da7707fa4c77e5a0c958ec42eb1f7c68c chash=36df818d773e392d585fd58cf65d3dab93466528 group=bin mode=0644 owner=root path=usr/lib/help/locale/C/co pkg.csize=2284 pkg.size=5010
file 50e3e4dd1731dd07e7633afab6da1825527a312d chash=8e98dd2c2a45cc35993e3c373ecace197b65e900 group=bin mode=0644 owner=root path=usr/lib/help/locale/C/de pkg.csize=2108 pkg.size=4651

Edit: Individual files can be downloaded with a URL like this example: http://pkg.openindiana.org/dev/file/0/b8dac4eaeabc7d41b4bff842a2f6b54cb36449d7

Only one thing remains. How to install these files.

  • You can't "install" them if you fetch them manually. You'd just have to copy them to the correct location. The only way to do it is the way I suggested as IPS requires a pkg.depotd server to install packages. (Trust me, I'm part of the OI team :-) – James O'Gorman Jan 12 '12 at 9:12
  • FWIW, the .p5i file you mentioned can only be used by the GUI package manager, as far as I'm aware. – James O'Gorman Jan 12 '12 at 9:14

IPS clients can only install packages from IPS repositories. So, if you're not interested in adding the remote repository as a publisher, fortunately there is another option, which is to create an IPS archive (p5p).

Keep in mind an IPS archive is not like a Linux RPM. You cannot for example install software directly from an IPS archive. But you can copy the file to other systems, such as a non-networked system. Think of an IPS archive as a portable repository because that's how you'll be using it. It's only after you create a local repository from the IPS archive file, can you then consume packages from it.

IPS archives allow you to:

  • Download one or more packages (along with all necessary dependencies) into a p5p archive file.
  • Create a local repository based on the contents of the p5p archive file.
  • Install packages from the locally created repository.

Say for example, you're interested in testing the latest version of a package. Then do something like this:

pkgrecv -s http://example.com:10000 -d ~/firefox_test.p5p -a -r pkg://userland/web/browser/firefox@45.3.0-2016.0.0.0:20160817T064143Z

Check the contents of the package with: pkgrepo -s ~/firefox_test.p5p list or you can use: pkg list -f -g ~/firefox_test.p5p

Add the IPS archive as a local repository with: pkg set-publisher -p ~/firefox_test.p5p

And finally to install a specific version of firefox, do use: pkg install firefox@45.3.0-2016.0.0.0:20160817T064143


The easiest way is to use pkgrecv to pull the package from a source repository to a local repository. IPS is a network package system so you can't currently install packages from a single file like you could with SVr4 datastreams. Last I heard (before the Oracle takeover) was that the pkg5 guys were working on an on-disk format but I don't think it got finalised. I can check with one of the developers if you like though. Anyway, that's by the by.

What you need to do

  1. Create a local package repo:

    pkgrepo create /path/to/localrepo
  2. Grab packages from remote repo:

    pkgrecv -s http://pkg.openindiana.org/dev -d /path/to/localrepo <FMRI_or_glob_of_packages>

It's been a while since I did this (last time was when OpenSolaris was on the verge of shutdown and we [OpenIndiana team] were grabbing packages from OpenSolaris /dev) but you might need to set the publisher of your local repo to be the openindiana.org publisher:

pkgrepo set -s publisher/prefix=openindiana.org /path/to/localrepo

Start a pkg.depotd instance so that pkg can use it:

pkg.depotd -d /path/to/localrepo -p 10000

(You probably want to set this up in SMF. Follow the howto on the OpenIndiana wiki.)

Then add your local repo as an origin of openindiana.org:

pkg set-publisher -g http://localhost:10000 openindiana.org

And finally...

No, there really isn't an easier way of doing this. This is one of the reasons I don't like the move to IPS.


Each individual file in IPS is compressed using gzip, so you can manually use curl and gzip -dc to pull down and uncompress the file.

For example: fetching sccsdiff (file sha1 hash b8dac4eaeabc7d41b4bff842a2f6b54cb36449d7) as mentioned by George Bailey...

curl http://pkg.openindiana.org/dev/file/0/b8dac4eaeabc7d41b4bff842a2f6b54cb36449d7 | gzip -dc > sccsdiff

You can also verify the sha1 hash of the uncompressed file...

$ sha1sum sccsdiff
b8dac4eaeabc7d41b4bff842a2f6b54cb36449d7  sccsdiff

More information available on the OmniOS wiki: Fetching IPS Package Files Without pkg(1)


I have created a portable utility to do such things:


  • Nice. I may give this a try some time. – Bryan Field Jun 19 '15 at 17:28

A package in an IPS repository only makes sense within the context of actually installing the package via the pkg(1) command over the network. A package is not represented as a single file within an IPS repo; instead, the manifest file for a package keeps track of the various bits. My understanding is that this allows for efficient upgrades since only changed files need to be transferred.

One option is to mirror the IPS repository to the local system or to another system that is accessible. There are instructions at the old OpenSolaris site and on OpenIndiana's wiki. It has been a while since I mirrored an IPS repo, however, so I cannot comment on the accuracy of the instructions at those links.

There are likely other options, but I don't know them off the top of my head.

  • I don't want to have to set up a mirror, I just want to grab the files down manually. Can't you just do it through the browser? Like when you open the description, and you could get http://pkg.openindiana.org/dev/info/0/pkg%3A%2F%2Fopenindiana.org%2F..., it seems like you could change the word info/0 to something else to perform the download? Or at least see a list of how many files were talking about? – Bryan Field Jan 9 '12 at 17:24
  • 2
    James O'Gorman's response is better than mine. I had forgotton about pkgrecv. – timclassic Jan 11 '12 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.