OpenSolaris

Emacs for OpenSolaris

I've been fiddling with OpenSolaris lately, and one obviously require package is dearly missed: Emacs. I tried to compile it myself, but couldn't get "configure" to pass, so I decided to look around for alternatives. It turns out SunFreeware has a prebuilt Emacs package, somewhat suitable for OpenSolaris. So, not knowing anything about the IPS system, I fumbled around a bit, until I figured out that the following commands added this repository (or authority I think it's called):

% pfexec pkg image-create -F -a sunfreeware.com=http://pkg.sunfreeware.com:9000 /var/sunfreeware
% pfexec pkg set-authority -O http://pkg.sunfreeware.com:9000 sunfreeware.com
% pfexec pkg refresh --full
# Now I can run
% pfexec pkg search -r emacs
% pfexec pkg install pkg://IPSFWemacs   # Copied from above search results

This version of emacs is a bit old (21.x), and it doesn't seem to work when started with an X11 window. But at least I don't have to suffer with vi any more.

Update: I made an OpenSolaris package with Emacs v22.2 for x86, which has both X11 support (emacs) and a non-X11 version (emacs-nox). The tar ball with the package is available on my FTP site. This might be a usable alternative of Emacs until the official OpenSolaris IPS adds an emacs package.

Mounting NFS partitions on Solaris 10 from RHEL

I've been playing around with Solaris today, and it's just as good as I remember (except still missing all the tools I need, like Emacs). However, I was unable to NFS mount my home directory from my RHEL4 box. I would get an error like

bash-3.00# mount -o ro machine.ogre.com:/export/disk /foo/bar
nfs mount: mount: /foo/bar: Not owner

and my /var/adm/messages would have

Apr  3 22:22:36 solaris10 nfs: [ID 435675 kern.warning] WARNING: NFS server initial call to
                                               machine failed: Not owner

RHEL4 does NFS v4 (or so it thinks at least), and Solaris is not happy with something there. Obviously there must be a way to get it to work, but right now, I just needed to get it working. So, until I figure out what in NFS v4 is causing this, I decided to make Solaris just use NFS v3. There's a couple of ways to do this, easiest is to just use the vers=3 option to mount, e.g. in /etc/auto_home do something like

leif    -rw,vers=3      machine:/export/home/leif

Or, you can change the defaults in Solaris 10, by editing /etc/default/nfs, and modify

NFS_CLIENT_VERSMAX=3

After changing this default, you have to run

# svcadm refresh svc:/network/nfs/client:default

Alternatively, you could probably also disable NFS v4 on the RHEL4 box.