Solaris Package Archive

Welcome to the Solaris Package Archive. These files are supplied as a service
to the internet community to allow them to quickly configure their machines
with useful free software.

A package, in this sense of the word, is a installable collection of files
with embedded configuration details which instruct the installing program
on file attributes, locations, pre and post installation procedures and also
system requirements. Solaris comes with the complete System V package tools
installed. You don't need to do anything special to utilize them.

For those whose experience with packages is limited to the installation of the
operating system or patches, well there is a lot of useful functionality
hidden in the pkg system. By far the most outstanding benefit is the ability
to add and remove software quickly and relatively thoughtlessly and being
confident that all of the old versions of software have been removed. Too many
times I've seen sites with left over files and directories from old versions
of compilers, development tools and communications programs. This is inherently
a problem both for disk usage and cluttering and also ending up in a situation
where you don't know what belongs on your system and what is garbage.

To avoid these problems on the systems I am responsible for, and because I
don't see the point in compiling the same program twenty times, I have created
package formats of the tools I install. Creation of the packages is remarkably
easy after the first few, somewhat droll one might say. However the work pays
off when I can confidentally add software quickly and easily to a new host.
As a guide it takes less than 30 minutes to configure an Ultra Server to a
state where users can do whatever users do, where before it would have taken
days or longer to configure and build the files.

Main Archive Site

The main site for these files is at UNC, North Carolina, USA. They are hosted
on Ibiblio.org. I'd like to thank the UNC for their support.
The packages can be located on the sites below. Don't email the admins about
the packages. Email me.

Points to note
Backwards Compatibility
Solaris is quite backwards compatible, you can generally take a binary from
an earlier release and run it successfully on a later version of Solaris.
This does NOT apply however to specific programs like GNUgcc in the long run.
When compiling the differences between the releases does start to become
noticed, the different header files, libraries, patches and also new binaries.

For some time I have been configuring the packages to check for the release
of Solaris on the machine you are attempting to install on, if it's different
from the version it was compiled for, the package will refuse to install. This
is a precaution to stop novice administrators shooting themselves in the proverbial
foot. Obviously the software will probably run, but it's much more desirable to
use the correct version for your O.S.

O.S. Packages Needed For Compiling
You will get errors running the compilers if you do not have the right
installation of Solaris on your machine. The minimal install choice
will not install the packages you need to compile software. You will
need to manually install them. Using admintool may not work.

The developer install choice may lack the packages as well. Check using
pkginfo | more.

If using a release other than 2.5, change the path accordingly.

The ` characters above are "back tics", not single quotes. If you can't
tell the difference, change your font to courier.

X11 Support Not Included
With the X11 games I am not really going to go out of my way to provide
detailed support for users. The reason for this is that they work for me
on a Solaris system with my X11R6.4 packages and if they don't work for you
then you will have to discover the reason for yourself. Most likely it will
be because of wrong versions of Solaris and X11. Caveat Emptor. See the
Trouble Shooting section below for library errors.

Upgrading Your X11 To A New Release
When installing a new package of X11, to do it properly you should first
uninstall all the other X11 packages you have installed. In reverse order
if possible. This means you should:

pkgrm fvwm2 tetris roxndiam xpacman xpm X11R6.1

The reason for this is you need to remove the packages from the old X11
directory and then add them into the new one. If you don't do this you
will have your other X11 programs "left behind" in the X11R6.1 directory.
Once this is done and you have added the new X11R6.x package, you can
pkgadd the X11 programs again:

pkgadd X11R64 xpm fvwm2 tetris roxndiam xpacman

You should then look in the old X11R6.x tree to find any left over files,
such as the xdm error logs, auth files etc. Unless you have added files
from somewhere else you should be able to delete the old X11R6.x tree.

Some Tools Have Strange Side Effects
Some of you may have wondered why I haven't blitzed the archive with more
GNU tools. Apart from a relentless pursuit of laziness, it isn't really a
good idea to replace most Solaris binaries with GNU ones. For instance,
the GNU binutils can really give you weird results which can shorten your
life. Very few sane admins install these. I try to supply packages which
you can use and won't go biting you in soft places. You're welcome.

Solaris tar Should Be Used
Some of you have reported errors in packages where file names have been
truncated whilst unpacking. The reason for this is you are not using
/usr/bin/tar to unpack the archive,
more likely it's /usr/local/bin/tar
which is usually GNUtar. Use the Solaris tar instead.

Groups Of Packages

Some packages need to be used in conjunction with others, or are compiled to
specifically use a certain version of another package. To install properly you
will need to install all parts of the group.

To identify which package requires other libraries etc to run, you will need to
use the ldd tool to identify missing
libraries. Usually it's reasonably simple to match a required library to the
package that ships with it but sometimes it gets tricky. Notably the
libintl library ships in the
gettext package and is widley used
by many other programs.

An example of one of the most demanding packages is PHP. Here's the list of required
extra software:

Once you've satisfied all of those dependancies then you'll still have to find
the library dependancies of the software you just added to support PHP. It's a
bit of work sometimes.

Package Assumptions

I have used /usr/local as the top
directory of my tree. All files are owned by
root and the group is
root as well. All files are world
readable and only root is able to
write to them unless explicitly needed. If your contributed software tree is not
/usr/local
then you will need to do further work to integrate the new software. This may
involve loopback mounts to avoid having a
/usr/local softlink overwritten.
(This will happen in a few of the packages, the more recent ones don't change
either the /usr or
/usr/local directory inodes.)

Package Installation

To install you will need to either FTP or HTTP fetch the relevant tgz or .pkg file to your local system. For .tgz files you then need to unpack it into a
file system tree. (A .tgz file is a tar file that is gzipped). For older Solaris releases you will need to
install the GNUzip package first, (it is not compressed), to uncompress the
other files.

If using FTP to get your files, fetch the pkg.tgz files in BINARY or IMAGE
mode. You must unpack the files in a directory the user
nobody can access. I recommend
/var/tmp.

Once you have the file cached locally, (we will use GNUzip as the demonstration pkg),
you can unpack it (if required) with these methods:

Installation of <GNUzip> was successful.
#
As you can see I already had a gzip binary installed on the system, but not all
the other parts of it. I answered 'y' to overwrite the installed gzip with the
new package copy.

After adding a package you will need to do housekeeping tasks (as root)
such as updating the manual page index:

# catman -w &

Also check your paths are up to date so you can "see" the new software.
Affected environment variables are PATH,
MANPATH and
LD_LIBRARY_PATH.
Those who wish to install a lot of packages at once will find the
bulk installation instructions useful.

Environment Variables

To setup your accounts properly for these packages you need to have your
environment variables pointing to the software. You must have at least the
following set up:

Recommended:
setenv PAGER less
setenv EDITOR vi
setenv CC cc
setenv CXX CC
I've personally stopped using the LD_LIBRARY_PATH variable, preferring to use the -R/usr/local/lib compile flag so that libraries and binaries will automatically look in that directory for run time libraries. It makes the packages more resilient as they won't accidentally link to libraries in another random location first.

Trouble Shooting

I get a number of emails from people that report problems which seem to
congregate around a small amount of common errors. Predominately the compilers
cause people problems.

Assuming the GNUgcc packages themselves installed correctly you might see the
following errors:

An include file in the "va_args*" group is missing when called from stdio.h

You don't have the necessary compiling packages installed on your machine.

When Solaris is installed on a machine it asks which setup to
install; "Minimal", "Developer", "Full Installation" or even
"Full Installation with OEM support". Only some of these choices
will give you the packages you need to compile your own programs.
If you read the Notes section earlier in this file it will tell
you how to manually (not with admintool)
add the files to your system. This is a very common problem I see a lot.

Your X11 libraries don't match or aren't found.

Often X11 libraries will have different revision numbers and a
program expecting a version of a library to enable it to run will
report an error if it can't find the library it is looking for.
The quickest solution is to link the missing library to one you
do have on your machine:

cd /usr/local/X11R6.1/lib; ln -s libX11.so.6.0 libX11.so.6.1

This provides a libX11.so.6.1
which allows any program looking for it to continue running.

Also make sure your LD_LIBRARY_PATH
includes all the X11 libraries:

LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/local/X11/lib:/usr/dt/lib:/usr/openwin/lib
See the Environment Variables section.

My xv is complaining about a
missing xpm library.

Install the xpm package found on this site.

Your package doesn't verify. Missing packet.h.

Use Solaris tar to unpack the packages. pkgrm
the installed package and then install it correctly. See the
Notes section above.

You can't compile any network programs without
__inet_addr() errors.

The bind.8.1.1 package installs it's own file in the
/usr/local/include/arpa directory.
GNUgcc will search this directory before
/usr/include and thereby break
your compiles if you don't link in the bind library as well.

Adding a package dies with "can't open" for the
checkinstall script

You need to make sure the user "nobody" can run the
checkinstall
script. The package file unpacks itself properly using the provided
instructions but you need to make sure the parent directories can be
passed through, (i.e. user "nobody"
can 'cd' through them).

To decode the problem you might see something like this:

This is telling me the directory
/export/home/mark/software is
not searchable for the "nobody" user.
I should probably unpack the .pkg.tgz
file in /var/tmp instead. Also
I should make sure I do a umask 0
command first so I don't pollute the permissions when unpacking.

Only a very small number of problems can be attributed to other causes. Once
I used the wrong tar on a package, another time someone used the wrong g++
compilation option. Out of 254,526 installations (to date) of GNUgcc I haven't
seen a single problem that wasn't mentioned here. If you do encounter one,
email me at mark@ibiblio.org.
Please include the output of uname -a.
Also, telling me the name and version of the package helps a lot. :)

If a packages file permissions don't let you retrieve it then it is likely
the package is not ready for release yet. Please wait until I have reset
the access rights to publish the file. Don't email me :)

Removing Packages

If you wish to install a new version of some packaged software that is already
installed, or to revert to a previous version you will have to remove the current
version from the system. You simply use:

# pkgrm GNUzip

and answer 'y' to delete the package from the system. I often juggle different
versions of packages when I am developing software and need to revert to older
versions.

Creating Packages

To create packages is simple once you know what you are doing. To make your
own packages for your own personal use you might find these
instructions
useful.

Once you have made your package you will probably want to show it off etc. Please
don't email me asking me to include it in the archive, I am quite paranoid about
what binaries I run on my machines and it would be negligent of me to accept any
files from anyone else.