Package Source
Whatever you do with the packaging system (add/move binary packages, build your own), you'll need root's privileges. There are two ways:
- If you have a user with sudo privileges ('admin', and the default 'db915682' kind of user), use sudo:
sudo -s [enter current user's password]
to change your shell to a privileged one; or
- Change effective user to root:
su - [enter root password]
Using Joyent's binary repository
- To use the Joyent binary package repository then use
pkg_add http://pkgsrc.joyent.com/2007Q4/_name_of_package
Changing the name of the Quarter as time goes on.
Newly added packages
- emacs
- uemacs
- php5-pear
Example install PEAR
This will add the core PEAR tools, and you can have it self-upgrade to the latest (if you want), and/or pull in the packages you need from PEAR. This is also using our binary package repository
pkg_add http://pkgsrc.joyent.com/2007Q3/All/php5-pear-1.5.4nb1.tgz
Want to build a new package
Prefight
Setting up to be able to build
- Be sure to use sudo or change to too (see above)
- Run security audit first time:
/opt/local/sbin/download-vulnerability-list >/dev/null 2>&1
- Create a Cron job for it:
0 3 * * * /opt/local/sbin/download-vulnerability-list >/dev/null 2>&1
- Remove this line from /opt/local/etc/mk.conf:
DEPENDS_TARGET= package
cd /opt/pkgsrc && cvs -q up -dP
. This is not recommended for the average user. Stick with the stable quarterly updates, unless you know what you're doing, or are looking for a particular package version.
Next part, the gotchas
MySQLdb for python/django
The MySQLdb Python module is seriously outdated in PKGSRC, so we suggest you install the latest one by building it from the source tarball. This snippet is intended to be copied/pasted into your shell (make sure you 'sudo' first) and will download, patch (for Solaris) and install the latest module:
cd /tmp curl -O http://easynews.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.2.tar.gz tar xzf MySQL-python-1.2.2.tar.gz cd MySQL-python-1.2.2 curl -O http://wiki.joyent.com/_media/facebook:kb:mysqldb-rpath.tgz mv facebook\:kb\:mysqldb-rpath.tgz MySqldb-RPATH.tgz gtar xvzf MySqldb-RPATH.tgz patch -p0 < MySQLdb-RPATH.patch python setup.py build && python setup.py install cd rm -rf /tmp/MySQL-python-1.2.2.*