Pacman on OpenBSD (pt. 1)

It’s April fool’s time! You knew it: There is no ArchBSD/Open in the making (or at least I don’t know about it). But this year’s April fool actually has some real background – both on the technical and the social side.

Why?

Well, I had the basic idea for this fool since about the beginning of the year. I wanted to bring ArchBSD to the attention of my readers again since I really like the idea. But there was not too much news about the project. So I had to come up with something. And I thought that the humorous aspect of an April fool was just about the right thing.

There was another reason, however, and a rather strange one actually. A while ago I read somewhere that somebody was to leave Arch Linux (for various and IMO very valid reasons) and use OpenBSD instead. Right in the next post he was told in a condescending tone to enjoy the visit because he’d be back in no time anyways. I immediately hated that arrogance! Having been a visitor to *BSD land myself (and having liked quite some things there), the idea was born if there could be an Arch-OpenBSD blend like there was already ArchBSD for FreeBSD.

Just a joke logo

Behavior and sensivities

There’s a lot of bad behavior in the Linux world. On the forums of the now dead distribution CrunchBang I once read that there were also some Archers “creeping around” (there’s another distro, ArchBang, which follows the same design ideas but is based on Arch Linux). Obviously the poster didn’t have much respect for some of his fellow Linux users because another distribution fits their purpose best.

Another member’s signature made it quite clear why: UDOD (“Use Debian or die!”). I have no problem with such signatures or statements. In fact I think they are funny to some degree. The only problem here is: You never know if people are actually serious and do mean it.

Or have you ever witnessed what happens on the Arch forums if somebody admits to be using Manjaro or any other Arch-based distro? Quite often the reactions are… not exactly friendly. Use a different (even a closely related) distribution and you’ll probably make no friends.

Ironically, a somewhat similar thing can happen to you the other way around, too. Just go to the Gentoo forums and dare to ask a beginner’s question. Chances are that you are told how Gentoo is not for you and you should find another distro.

You really have to grow a thick skin in some cases! Fortunately there are also a lot of friendly and very helpful people around. And on the other side there’s this new trend to replace pronouns with “gender-neutral” ones… This takes every day’s imbecility to a whole new level where endless discussions arise not over technical matters but over real or imaginary sensitivities of some minority.

Pacman on OpenBSD?

But enough of that. The net is the net and people are… what people are. Anyways: I begun to wonder if pacman could be installed on OpenBSD, too. And since I actually I liked the idea, I decided to give it a try.

I don’t have too much experience with OpenBSD, yet, but I’ve been following the releases for about two years now and in fact I think it’s a great OS. So let’s install it first! Just like other free operating systems you can download in ISO image for the installation. There’s just one thing wrong with it: The name! No, it’s not a joke this time; the file is just named ‘cd56.iso’. Now I’m all for short names but it should at least be informative. And ‘cd56.iso’ clearly isn’t.

I’ve hated that with Gentoo: They offer images by the name of ‘install-x86-minimal-20150407.iso’ and the likes. Ok, by now I know that this is a Gentoo image but would it really hurt to state just that somewhere? And with OpenBSD it’s even worse: You cannot even tell whether this file is an ISO of a 32-bit or of a 64-bit system! That’s pretty bad. Now if you have both older and newer computers to deal with and download both, you’ll end up with something like ‘cd56 (1).iso’ which is just ugly. And to tell which file is which version, you have to take a look at the size as the 64-bit one is slightly bigger (or you have to remember which one you downloaded first).

Installing OpenBSD

OpenBSD comes with a simple text-mode installer. Simple in this case means that it’s simple to use. It let’s you choose how to install and does a lot of things for you then. Want to know what it can do? Just have a look at it! It’s a shell script.

Installing the base system actually means fetching and unpacking tarballs. This is a simple and efficient method. And while it means that the files for the base system are not managed by any package manager (the programs we’re going to install later of course are!), it seems that the OpenBSD people can live with that pretty well. Upgrading the system means extracting newer tarballs and removing some obsolete files by hand.

Installing OpenBSD 5.6 tarballs

Version 5.7 of OpenBSD is due next month so at the moment 5.6 is the newest version out and I’m going to use that. After the system was installed on the drive I’m prompted for the root password and a few other things.

Some more choices of the OpenBSD installer

Trying to build pacman

Now we need the pacman sources of course. Let’s install wget to download it. That program is available as a package for OpenBSD but to get that we need to tell the package system the path to a package mirror first.

Fetching pacman source with wget

Ok. After installing some dependencies for pacman (bash and libarchive) configure was happy. So we’re ready to make!

Trying to ‘make’ pacman

Oops. Pacman obviously needs GNU make and cannot be built with BSD make. So let’s install gmake and try again.

Compilation failed – installing a new gcc

Much better. The compilation begins. But then it fails. Looks like OpenBSD’s old gcc is not capable of compiling pacman… Fortunately there’s a newer version (two of them in fact) available as packages. Let’s install one, set CC to egcc (this is what the packaged newer gcc versions are called to distinguish them from the system compiler) and re-run configure before we try to build again.

End of the line: OpenBSD does not know ‘blkcnt_t’ type!

Now that’s not cool. The compilation failed again! And this time it’s not gcc’s fault. OpenBSD simply does not know the ‘blkcnt_t’ type. As there’s no way to fix that easily, we’re stuck. Aren’t we?

What’s next?

Actually we aren’t out of luck. The coming version 5.7 supports this type! In my next post I’m going to install a snapshot and use pacman on that system. Yes, I can already tell you that it works. I’ve already taken these screenshots (and the ones for the next post) mid-march. 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s