I'm working on a Windows-centric project involving programmatic analysis of lots of email text. If you're me, this calls for Unix tools, at least during the investigative stages. I've used Cygwin before, and didn't hate it, but this time I installed Microsoft Services for Unix (a.k.a. Interix) with a mind to use pkgsrc for whatever I might need.

SFU is a fairly baroque environment. The pkgsrc bootstrap process accounts for most of its vagaries, but a few tweaks were still needed. Once bootstrapped, since my version of pkgsrc had been downloaded via FTP, I wanted to cvs update. Of course, Interix includes neither cvs nor ssh, not to mention their dependencies: OpenSSL, tcp_wrappers, zlib, and pkg_install-info. Also of course, pkgsrc automatically took care of building and installing each of these.

Getting as far as the packages listed below required a few hacks. Notably, since Interix lacks nroff, I needed groff for packages that render manpages, but textproc/groff has dependencies on netpbm and ghostscript (for HTML and PDF output, respectively), which in turn pull in many more graphics packages. I turned the dependencies into PKG_OPTIONS, off by default. Another one: since Interix lacks setgroups(), I needed to provide a dummy implementation to get several packages (mostly djbware) to compile. User/group creation fails in several ways: Interix seems to need local group names prefixed with a +, which isn't currently done by pkgsrc, and the Unix idiom for disabled accounts (as used by daemons) doesn't meet my NT domain's password complexity requirements! There is also the issue that Interix user names must be different from group names, which requires some reengineering of pkgsrc user/group handling that would also benefit people using pkgsrc without root access.

But it basically works, and for now, I mostly have what I need.


$ uname -a; pkg_info | awk '{print $1}'
Interix Aschlair 3.5 SP-8.0.1969.36 ×86 Intel_x86_Family6_Model14_Stepping8
apr-0.9.12.2.0.58
awstats-6.6nb2
bash-3.1pl1nb2
bzip2-1.0.3
checkpassword-0.90
cvs-1.11.21
cygwin_esound-0.2.35.1nb1
cygwin_lib-1.5.13.1
daemontools-0.76nb1
db3-3.11.2nb3
digest-20060302
djbdns-1.05nb7
esound-0.2.36
expat-2.0.0nb1
gawk-3.1.5nb1
gettext-lib-0.14.5
gettext-tools-0.14.5
gmake-3.81
groff-1.19.2nb4
gtexinfo-4.8nb5
ircII-20040820
libaudiofile-0.2.6nb1
libiconv-1.10nb3
libnbcompat-20041024
libtool-base-1.5.22nb3
mess822-0.58nb1
mktemp-1.5
openssh-4.3.1
openssl-0.9.7inb1
patch-2.5.4nb2
pdksh-5.2.14nb2
perl-5.8.8nb2
pkg-config-0.20
pkg_chk-1.75
pkg_install-info-4.5nb3
publicfile-0.52
rc.subr-20041011nb1
rcorder-20031013
ripmime-1.4.0.2
shlock-20020114
syncdir-1.0nb1
tcp_wrappers-7.6.1nb4
tnef-1.3.4
tnef2txt-1.4
ucspi-tcp-0.88nb1
unzip-5.52nb3
user-20040426
zlib-1.2.3