Moving projects to GitHub

For a couple of years or so, I have been hosting my open source projects in Google Code. The time to jump ship has come.

The major reason for this move is that Google Code stopped supporting file downloads three weeks ago. This is unfortunate given that “binary” releases are a must for proper software distribution. Sure, I could use a third-party service like Bintray to offer the downloads, but I’d rather consolidate all project data in a single location.

February 6, 2014 · Tags: github, oss, sysbuild, sysupgrade
Continue reading (about 2 minutes)

'Hello GitHub!' say shtk, sysbuild and sysupgrade

Over a year ago, I developed two command line utilities for NetBSD (sysbuild and sysupgrade) and a supporting library for the two tools (shtk). These were all introduced in their corresponding blog posts —Introducing sysbuild for NetBSD, Introducing sysupgrade for NetBSD and Introducing shtk— and since then I have heard good comments about them.

About a couple of weeks ago, I started working on the much-needed rewrite of pkg_comp and a supporting standalone tool. I was using the same development methodology as with the other three projects: putting all the code in pkgsrc and implementing the build system from the package’s Makefile. Along the way, this became increasingly annoying to the point where I could not stand it any more. pkgsrc is a packaging system, not a development platform. Developing a project within it is difficult due to the indirections between the outer Makefile and the work directory, and the expected workflow of working with packages.

July 28, 2013 · Tags: github, release, shtk, sysbuild, sysupgrade
Continue reading (about 3 minutes)

Introducing shtk

Have you ever wanted to have a collection of ready-to-use modules for shell scripts? I have, particularly because I keep reimplementing the same functions over and over and over and over again whenever I write non-trivial shell scripts, and I’m tired of doing so.

That’s why I have just abstracted all the common code in the aforementioned tools and put it into a new package called the “Shell Toolkit”, or shtk for short. Yeah, this name sounds very pretentious but, really, I don’t intend this to be anything big. The only thing I want to do is simplify my life when implementing shell scripts, and hope that other people might find the modules useful. So far, I have taken the generic (and common!) code from sysbuild and sysupgrade, reconciled a few tiny divergences, and moved it into this new shtk package.

August 15, 2012 · Tags: announce, netbsd, shell, shtk, sysbuild, sysupgrade
Continue reading (about 3 minutes)

Introducing sysupgrade for NetBSD

Over the last two weeks, you might have had fun rolling your own NetBSD binary releases with sysbuild. But what fun is that if you have no trivial way of upgrading your existing NetBSD installation to a newer version?

Upgrading NetBSD to a newer version from distribution sets generally looks like the following;

  1. Fetch new distribution sets (or roll your own).
  2. Upgrade the kernel.
  3. Unpack the distribution sets over the root directory, without fat-fingering the command and unpacking etc.tgz along the way.
  4. Use etcupdate to merge new changes to configuration files.
  5. Use postinstall to validate the upgraded system.

Simple? Yes. Easy? No. The above procedure is obscure to anyone new to NetBSD. (Actually, if you tell anybody that the way to upgrade your machine is by unpacking tarballs over / will stare at you thinking you are kidding. It’s 2012.) “Jokes” aside, what is worse is that the procedure is quite monotonous and, therefore, it is very easy for the administrator to make a trivial mistake along the way and screw up a running system. (Been there, done that… multiple times.)

August 6, 2012 · Tags: announce, netbsd, sysbuild, sysupgrade
Continue reading (about 3 minutes)

Introducing sysbuild for NetBSD

NetBSD’s build system is close to awesome: after checking a source tree out from CVS on virtually any Unix-like operating sytem, building a full NetBSD release for any of the supported platforms is as simple as running the build.sh script with the right arguments.

There are, however, a few things that would deserve automation in this process, but that are not in build.sh’s domain to solve. These are:

  • Fetching and keeping the source tree up to date: interacting with CVS is still the responsibility of the user.
  • Simplifying the call to build.sh: this script takes a ton of arguments, and running it by hand quickly becomes “annoying”. It would be nice if all the desired values to its arguments where stored elsewhere and picked up automatically. (mk.conf may not always be the right choice.)
  • Plugging into your crontab(5) for easy periodic rebuilds of NetBSD, with proper reporting of failures. Upgrading a live system from source is a major supported mechanism (particularly for NetBSD-current), so having a way to keep fresh release files around is welcome.
  • Performing such daily rebuilds of NetBSD as a dedicated unprivileged user.

To anybody familiar with NetBSD, it is obvious that all the above items are “simple enough” to solve one by one; however, doing them by hand gets old very quickly — machines exist to make our life easier, don’t they? I know I am not the only one that has custom local wrapper scripts around build.sh, and I also know that my scripts were ad-hoc, ugly and non-reusable. (Also, of course, anybody new to NetBSD will certainly not find any of the above trivial, but that’s secondary.)

July 25, 2012 · Tags: announce, netbsd, sysbuild
Continue reading (about 5 minutes)