Sunday, March 6, 2016

One Week with Tribblix 0.16

Exit NetBSD...for now

In my last post I raved about how easy it was to address a certain package install issue by way of pkgin clean followed by pkgin update, which worked just fine for installing new packages, and which also allowed me to have a working Audacity installation. For a very brief moment, I believed my Operating System for Life had just revealed itself.

Before penning my distro-hopper's retirement speech, however, I went to boot Firefox only to be met by some error message (which I neglected to document at the time). No problem, I thought. All I need to do is run pkgin full-upgrade to upgrade all packages in the system. After doing so, apparently Firefox was nowhere to be found. By now I was tingling with the unease that presages some sort of descent into Dependency Hell, a sinking feeling known all-too-well to those of us who've been around the BSD block more than once. Thinking I'd do an end-run around the whole complicated affair, and seeing how this install was still somewhat fresh, I employed what I call the Shoot the Hostage school of problem-solving, named in honor of a certain negotiation tactic espoused in the movie Speed:

I reinstalled the whole system.

All-too-momentarily I was feeling pretty good about myself, thinking I had circumvented The Adjustment Bureau, or something. But it was not to be. The first thing I did after the reinstall was pkgin install firefox, only to find pkgin had no idea what the hell I was talking about. So then I did pkgin install firefox*, which downloaded and installed(?) Firefox 38, but no dependencies. And it wouldn't boot.

Perhaps I could have stuck it out and made do with Midori for browsing until I got to the bottom of my Firefox woes (and I'm sure there's a simple explanation and corresponding solution), but persistent (if not-so-fresh) memories of previous visits to Dependency Hell made it too much to bear, thus draining my will to see it through.

There has to be an easier solution, I thought, and resolved to find it

No trouble with Tribblix

Some websurfing off a live DVD brought me to a YouTube video review of Tribblix, a minimalist illumos distro created and managed by one man, Peter Tribble. (And he's a Star Trek fan, so yes the distro name is a nod to that famous episode featuring those furry little titular menaces as well as his surname.)

As I watched the video I suddenly realized that I had been unfairly dismissive of Tribblix up until that point, thinking it was just OpenIndiana with far fewer features, or a rehash of that Damn Small OpenSolaris iso that I tried back in 2007 or 2008. By half way through the video, though, I was excitedly downloading the Tribblix 0.16 iso (assuming an activity like downloading can ever be done in an excited manner), and getting more and more enthused as I watched and listened with rapt attention.

Once I booted the iso, I entered ./ -B c1t0d0 kitchen-sink (which includes the base system plus most of what you'd want or need), and the install took less than ten minutes, perhaps even a little over five minutes. Contrast that with Oracle Solaris 11.3, where an install (on this machine) is more like half an hour or more. Put another way, the Tribblix live iso can boot and install the system in less time than it takes for the Oracle Solaris live DVD to get you to the wristwatch mouse pointer that indicates Gnome 2 is now only three years from coming up.

The newly-installed system boots in less than 30 seconds on this ThinkPad. (I've averaged 28 steamboats from the time I select Tribblix 0.16 in the GRUB menu to the text console login coming up.) This is quite impressive for a SunOS 11 system, but it doesn't end there.

Once you're in the system, you can install pre-built SVR4 packages quickly and easily with zap, a simple package management tool created by Peter Tribble. Installing a single package can be accomplished with zap install package name. Installing something more complicated, and which would ordinarily involve installing additional dependencies, can be done with zap install-overlay overlay name. (In Tribblix parlance, an overlay is a binary package bundled with all of its dependent packages.)

Using zap results in package installations that are, bar none, the fastest I've ever witnessed. LibreOffice, for example, installs in about the time it takes to brush your teeth and then notice the patch of facial hair you missed while shaving earlier that morning.

On the whole I am very impressed and intrigued with the singular vision and dedication to simplicity of this distro and its creator. In its own way, it embodies the Shoot the Hostage philosophy referenced above. It cuts to the chase and lets you get on with life. At the same time, it doesn't keep you from being as UNIX as you want to be. (After all, UNIX shouldn't be exemplified by the degree to which it makes you wade up to your hips in dependency resolution, or lack thereof.)

In short, I am smitten with Tribblix and all that it represents. I'm already on Day Three of what will be at least a week with this OS, maybe more. Give it a month and perhaps Tribblix and I will be planning a wedding together and picking out names for our future children.

And the bad news?

As of yet, the only drawback to Tribblix I can think of is that some of the packages are works in progress. CDE is a very good example of this. It'll give you the usual dtlogin screen, but after that you get what appears to be X without a window manager. I emailed Peter Tribble to see if I had been doing anything wrong, and he replied that CDE is very much unfinished at this point, and that he hopes that over time it will be in working state. (A good way to think of Tribblix CDE at this point is that it is a "placeholder" package for something complete further down the road, and perhaps an enticement for open source developers to pitch in and help.)

One other issue is that I tried to use it to connect to the internet via a free wifi hotspot, and while I was able to connect using the dladm suite of commands (as confirmed by dladm show-wifi), for some reason Firefox wouldn't load any web pages. I'm not sure if this is a Tribblix issue per se, or merely a case of my own inexperience with using dladm. (I've been spoiled by Oracle Solaris and OpenIndiana, both of which provide a graphical wifi login app within Gnome 2.)

In conclusion, Tribblix is a very exciting prospect for those of us who favor simplicity over complexity. (As OpenBSD founder Theo de Raadt once opined, with increased complexity comes increased instability and reduced security. And in fairness, I don't recall ever getting tangled up in dependencies with that OS.)

It may not be for everyone, but Tribblix is very important to the illumos world in that it is proof of concept that another way is possible, and that users needn't be made to grow a beard while waiting for something (be it a package or the system itself) to boot or install. (As a bonus, Tribblix also comes with gcc preinstalled. To my way of thinking, any UNIX or Unix-like distro without a compiler in the base install is like a car that doesn't come with a gas pedal.) Furthermore, it attests to the value of Free and Open Source Software (FOSS), and shows what can happen when one person takes publicly-available code in new directions according to their own preferences and instincts.

Sure, it has some rough edges, but they are easily forgived and forgotten once you've fallen under the spell of its speed and simplicity. And while I still worship at the altar of all that is BSD, perhaps those systems can learn a thing or two from Tribblix and look for some hostages of their own to eliminate. (As per the annecdotal observation above, and for a variety of other reasons, I exempt OpenBSD from this admonition.)

Wednesday, March 2, 2016

NetBSD 7.0: Clean and update pkgin database to solve "download mismatch"

Here's a problem I encountered with pkgin in my current NetBSD install, as well as the solution I was able to find. While it may be "NetBSD/pkgsrc 101" for experienced users, I'll pass this along anyway, as I always assume that whenever I'm encountering a certain issue, then odds are someone else is, as well. (Even those of us who have no damn business running an operating system for grown ups deserve guidance every now and then, too.)

The problem in question is that I've been I've been tripping over my own feet while trying to install packages via pkgin install, as shown by the following console porn, which I managed to capture using the script command:

darkstar# pkgin install lynx
reading local summary...
processing local summary...

calculating dependencies... -
calculating dependencies... done.

nothing to upgrade.
1 packages to be installed (2284K to download, 5489K to install):


proceed ? [Y/n] y
downloading packages...
downloading lynx- 0%
lynx- 0% 0 0.0KB/s 0.0KB/s --:-- ETA
lynx- 12% 292KB 292.0KB/s 292.0KB/s 00:06 ETA
lynx- 43% 1000KB 333.6KB/s 708.0KB/s 00:03 ETA
lynx- 74% 1692KB 369.4KB/s 692.0KB/s 00:01 ETA
lynx- 100% 2284KB 571.0KB/s 592.1KB/s 00:04
pkgin: download mismatch: /var/db/pkgin/cache/lynx-

I chose lynx here merely for ease of illustration, rather than, say, kde4. In any case, I got the same results regardless of which package I was trying to install. And so I did much searching on the web along the lines of "NetBSD 7.0 download mismatch" and didn't really get anywhere.

And then, lo and behold, I found what I suspected may have been what I was looking for on the main page of Fearing I may be on the verge of fouling up yet another BSD install (hello FreeBSD 8.2), I took a deep breath and did the following:

darkstar# pkgin clean
darkstar# pkgin update
processing remote summary (
downloading pkg_summary.bz2: 0%
pkg_summary.bz2 0% 0 0.0KB/s 0.0KB/s --:-- ETA
pkg_summary.bz2 5% 128KB 128.0KB/s 128.0KB/s 00:17 ETA
pkg_summary.bz2 5% 128KB 115.2KB/s 0.0KB/s 00:19 ETA
pkg_summary.bz2 5% 128KB 103.7KB/s 0.0KB/s 00:22 ETA
pkg_summary.bz2 5% 128KB 93.3KB/s 0.0KB/s 00:24 ETA
pkg_summary.bz2 10% 256KB 96.8KB/s 128.0KB/s 00:22 ETA
pkg_summary.bz2 15% 384KB 99.9KB/s 128.0KB/s 00:20 ETA
pkg_summary.bz2 21% 512KB 102.7KB/s 128.0KB/s 00:18 ETA
pkg_summary.bz2 23% 576KB 98.8KB/s 64.0KB/s 00:18 ETA
pkg_summary.bz2 28% 704KB 101.8KB/s 128.0KB/s 00:16 ETA
pkg_summary.bz2 31% 768KB 98.0KB/s 64.0KB/s 00:16 ETA
pkg_summary.bz2 36% 896KB 101.0KB/s 128.0KB/s 00:15 ETA
pkg_summary.bz2 42% 1024KB 103.7KB/s 128.0KB/s 00:13 ETA
pkg_summary.bz2 50% 1216KB 112.5KB/s 192.0KB/s 00:10 ETA
pkg_summary.bz2 57% 1408KB 120.5KB/s 192.0KB/s 00:08 ETA
pkg_summary.bz2 63% 1536KB 121.2KB/s 128.0KB/s 00:07 ETA
pkg_summary.bz2 73% 1792KB 134.7KB/s 256.0KB/s 00:04 ETA
pkg_summary.bz2 76% 1856KB 124.4KB/s 64.0KB/s 00:04 ETA
pkg_summary.bz2 84% 2048KB 131.2KB/s 192.0KB/s 00:02 ETA
pkg_summary.bz2 89% 2176KB 130.9KB/s 128.0KB/s 00:01 ETA
pkg_summary.bz2 94% 2304KB 130.6KB/s 128.0KB/s 00:00 ETA
pkg_summary.bz2 100% 2432KB 110.5KB/s 127.8KB/s 00:22
With trembling fingers, a dry mouth, and a trickle of sweat upon my furrowed brow, I took another run at installing lynx:

darkstar# pkgin install lynx

calculating dependencies... -
calculating dependencies... done.

nothing to upgrade.
1 packages to be installed (2284K to download, 5489K to install):


proceed ? [Y/n] y
downloading packages...
downloading lynx- 0%
lynx- 0% 0 0.0KB/s 0.0KB/s --:-- ETA
lynx- 12% 288KB 288.0KB/s 288.0KB/s 00:06 ETA
lynx- 38% 888KB 319.2KB/s 600.0KB/s 00:04 ETA
lynx- 69% 1596KB 358.1KB/s 708.0KB/s 00:01 ETA
lynx- 97% 2236KB 386.3KB/s 640.0KB/s 00:00 ETA
lynx- 100% 2284KB 571.0KB/s 48.1KB/s 00:04
installing packages...
installing lynx-
lynx- copying /usr/pkg/share/examples/lynx/lynx.cfg to /usr/pkg/etc/lynx.cfg
lynx- copying /usr/pkg/share/examples/lynx/lynx.lss to /usr/pkg/etc/lynx.lss
pkg_install warnings: 0, errors: 0
reading local summary...
processing local summary...
marking lynx- as non auto-removable

And then I typed "lynx" at the prompt and,  voila, I was browsing the web like it was 1994. (I'd wax nostalgic about the good ol' days on National Capital FreeNet, but the last thing I need to do is provide even more evidence of how unhip and out-of-touch I've become.)