I live a sad, sad world—I don’t get root. I’m responsible for the development and 24/7 operations of web applications, but I don’t have root. I don’t get to pick my distribution and the packages I can get installed, while vender certified, are usually not up-to-date with regard to the latest versions of development tools such as ruby, python, git etc. Plus, they still want to maintain a common set of installed packages that contain all the junk that is needed by all the applications inside of all the groups at CDL—not just the junk specific to the current application I’m working on. Any changes I need to make have to go through two layers of red tape through two different groups of system administrators reporting to different vice presidents.
As it was on solaris, so it is on the VMs. I had hope that moving from Solaris to SUSE 11 VMs would mean things would be more like AWS where I would start with a lean install and have a comprehensive list of up-to-date modern packages to choose from to customize for my application. Such, a sick, sad world—nope, no dice. Life on the VMs is just as shitty as life running everyones applications on big shared solaris boxes, only we don’t have VCS to help us keep applications up during OS upgrades. And now we don’t have as much peak memory and there are mysterious cronic i/o problems.
But I have found the good news for package management for the unprivileged user. No longer will I need to resort to the evils of monolithic bash build scripts to replay hand configuration of all my packages and tools. The NetBSD project has brought salvation in the form of pkgsrc.
On OS X, I’ve been using homebrew. It is nice, because you can just type, say,
brew install ruby and … wait … and all the dependencies are fetch and compiled and then ruby is fetched and compiles. You don’t have to manually download and configure all the dependencies. Usually things like this are specific to an OS distribution. Homebrew won’t work on SUSE or any other Linux, it is specific to OS X.
pkgsrc is what NetBSD uses to compile their packages for distribution with the OS, but I’m not going to be able to get a NetBSD box for my application development, so why do I care? pkgsrc has support for hella platforms, and it supports “Linux” generically across distributions.
I’ve only tested on SUSE 11 (with the “cdlcommon” packages installed) and Amazon Linux so far—but is works like magic. Now, I have a list of thousands of up-to-date packages available at my fingertips. A new stable version of all the packages comes out every quarter like clockwork.
One thing I missed compared to Homebrew on OS X was the ability to do a one command install of a package; so I wrote a little wrapper
./appstrap/pmake sysutils/tree is a trivial example that will install the system utility “tree”. Here are all the packages. Not all of these are available on Linux, but so far openoffice is the only one I’ve tried that didn’t work on Linux.
Because the install of shibboleth-sp is set up for the root user (sigh) I had to resort back to the sin of bash wrapper that will install it, but compare
git clone git://github.com/tingletech/appstrap.git && ./appstrap/shib_it to Building the Native SP from Source on Linux and I think you will see the light.
There is a mechanism to check your packages against a security database, I have not looked into that yet. Also, it can create binary packages, so I want to look into if it is worth it to set up a local repository of binary packages I can share across multiple apps / -dev,-stg and production.