hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
 
[20081030] Getting pkgsrc going on Solaris 10/x86
The other day I've setup Solaris 10/x86 (not OpenSolaris) to play with ZFS. That aside, I wanted to get pkgsrc going. Here's a bit of how I got things going:

There is no precompiled bootstrap kit available for Solaris 10/x86, only one for some beta version of Solaris 11/x86. Trying that lead to problems finding the right symbols at runtime and whatnot, and did not score success. Likewise, installing the precompiled binary packages that are available for 11/x86 are expected not to work. (I'll get back to that in a second ;)

As using precompiled binaries wasn't an option, compiling myself was the only way. Compiling with pkgsrc requires a C compiler, and pkgsrc. The C compiler was installed with Solaris 10/x86, I only had to find it in /usr/sfw.

For getting pkgsrc, I'd have preferred to use (anon)cvs, but Solaris doesn't ship a binary for that. So, grabbing a recent pkgsrc tarball, extracting it (all as non-root - I do not want to mess up the system by accident!), things went mostly smooth. To make sure I really have the latest pkgsrc, I grabbed the cvs binary package for Solaris 11/x86, untarred it, and used the binary in there to do a "cvs update". Successfully, I should add.

Next step: boot strap pkgsrc. For future upgrades, I may want to add other versions of pkgsrc-compiled software, so I'll add simple versioning and put things into $HOME/pkg1 for now. Bootstrapping this with the latest pkgsrc was easy:

% set pkgbase=$HOME/pkg1
% sh bootstrap/bootstrap \
?        --prefix=${pkgbase} \
?        --pkgdbdir=${pkgbase}/var/db/pkg \
?        --varbase ${pkgbase}/var \
?        --ignore-user-check 
This went fine, and I put the following into my .cshrc to have pkgsrc easily available at any time:
	set pkgbase=$HOME/pkg1
	set path=($pkgbase/bin $pkgbase/sbin $path)
	rehash

	alias make      bmake
	alias pi        pkg_info
Now, I was able to see that everything's installed properly:
% pkg_info
bootstrap-mk-files-20080808 *.mk files for the bootstrap bmake utility
pdksh-5.2.14nb3     Free clone of the AT&T Korn shell
bmake-20080215nb1   Portable (autoconf) version of NetBSD 'make' utility
nawk-20050424nb3    Brian Kernighan's pattern-directed scanning and processing language
nbsed-20040821nb1   NetBSD-current's sed(1)
tnftp-20070806      The enhanced FTP client in NetBSD
pax-20080110        POSIX standard archiver with many extensions
pkg_install-20081013 Package management and administration tools for pkgsrc
digest-20080510     Message digest wrapper utility 
Also, installing my favourite test package worked fine (note that 'make' is aliased to 'bmake', the Solaris /usr/ccs/bin/make command won't work here, of course):
% cd .../pkgsrc/misc/figlet
% make package
% pkg_info -e figlet
figlet-2.2.2
% figlet pkgsrc rocks
       _                                       _        
 _ __ | | ____ _ ___ _ __ ___   _ __ ___   ___| | _____ 
| '_ \| |/ / _` / __| '__/ __| | '__/ _ \ / __| |/ / __|
| |_) |   < (_| \__ \ | | (__  | | | (_) | (__|   <\__ \
| .__/|_|\_\__, |___/_|  \___| |_|  \___/ \___|_|\_\___/
|_|        |___/                                        
The next test package included the X window system. Building pkgsrc/x11/xteddy went fine, and starting it actually game a sweet cuddly teddy bear.

Those two test packages indicate that integral parts of pkgsrc and its integration into the system work, and I consider it worth as a base for further platform tests. (Last time I used pkgsrc on Solaris, it gave me a sweet Firefox binary :)

[Tags: , ]


Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 36182749
Copyright (c) Hubert Feyrer