Here's how:
# Install pkg_* tools and the 'pkgin' package manager $ pkgadd -d http://www.netbsd.org/~sketch/TNFpkgsrc-x86.pkg all # Add tools to PATH $ PATH=/opt/pkg/sbin:/opt/pkg/bin:$PATH # Update package repository (akin to 'apt-get update') $ pkgin up # Search for a particular package (you can use regexp) $ pkgin search ^ap.*python # Install it $ pkgin install ap22-py25-python # Update all packages (akin to 'apt-get dist-upgrade') $ pkgin full-upgrade # How many packages are available? $ pkgin avail | wc -l 4970
Ok, so the headline might be slightly mis-leading, this isn't really apt-get but a tool which is very similar. This is work which builds upon my previous post using pkgsrc to build binary packages on Solaris. See http://imil.net/pkgin/ for more information on pkgin.
Hopefully this will prove really useful to people still using Solaris 10 and unable to use the new pkg(5) stuff in OpenSolaris. Please try it out and provide any feedback to pkgsrc-users@netbsd.org. I'm hoping to keep the packages updated for the 2009Q3 branch.
I admit to being slightly biased, but this is incredibly neat. A nice way for Solaris users to see what pkgsrc provides, and a nice way for pkgsrc to look into the Solaris/x86 marketplace.
Posted by Alistair Crooks on October 19, 2009 at 03:25 PM BST #
Very nice.
Quick feature request: is there an easy way to check for downlevel packages on a running system, as compared to the repository (ala CSW's `pkg-get -c', or Sun's own `smpatch analyze')?
Posted by Jim Wise on October 19, 2009 at 09:58 PM BST #
Hi Jim,
There is, but it's kinda obscure right now. "pkgin search" prints comparison information for installed packages, so you could do something like:
$ pkgin search . | awk '$2 ~ /^[:<>]$/ { print }'
but obviously it'd be better if this was implemented natively. I'll ask imil if he has something in the pipeline for this.
Posted by Jonathan Perkin on October 20, 2009 at 12:09 PM BST #
Hi,
I have added a -l (limit) modifier to the list command, i.e. :
$ ./pkgin -l\< ls
ap22-subversion-1.6.5 < WebDAV server (Apache module) for Subversion
apache-2.2.13nb3 < Apache HTTP (Web) server, version 2.2
apr-1.3.9 < Apache Portable Runtime
bash-4.0.28 < The GNU Bourne Again Shell
...
It's only available from pkgin's CVS at the moment, 0.3.x version needs a little bit of testing.
Posted by iMil on December 06, 2009 at 11:42 AM GMT #
hello,
what about sparc packages? is there any plan to provide them?
thanks in advance
Posted by gerard on January 12, 2010 at 08:49 AM GMT #
Hi!
Yes, I'm hoping to provide SPARC packages too for the upcoming 2009Q4 branch, if I get enough round tuits.
Posted by Jonathan Perkin on January 12, 2010 at 09:20 AM GMT #