Tuesday, May 19, 2009

Opensolaris: Now with more color (ls)

An actual blog entry!

PSARC 2009/228 was just integrated.  This adds a number of GNU compatibility options to the Solaris ls (/bin/ls), the most popular option being colorized output.   Prior to this, the only option was to use GNU ls.  Unfortunately, there were a number of issues that preclude GNU ls being a replacement for Solaris ls:
  1. GNU ls does not support Solaris specific filesystem features such as NFS4 ACLs (used with ZFS) and extended attributes.
  2. GNU ls is not POSIX or SUS compliant.
  3. The output format of GNU ls has changed in releases, and while the output of ls is not an interface, it seems undesirable to change output format for no underlying technical reason.
  4. The upstream community is not interested in maintaing patches for either 1 or 2, citing a desire to only support 'standard' features.
This left the option of maintaining a fork, or adding the support to Solaris ls.  I opted for the latter.  The actual work was actually fairly quick.  A few hours scattered across a week or so.  A bit more work was required to work up all the documentation.  One of the nice things about Opensolaris is that the processes for working on the core OS require that attention is paid to detail.  As annoying as it might seem at times (and even then it's not bad), once you go through it, it makes it more obvious how it's key to maintaining high code quality.


No comments: