10 May 2015

Fedora 21 + djbdns

I've been using djbdns for a long time on many different platforms. It's secure, fast, and cryptic. You could even call it peculiar or eccentric if you like. It was a perfect match for OpenBSD, but that's a story for another day. It's too easy on Ubuntu, since it's available through apt-get, so that doesn't need a discussion at all. Today, we're here to talk about Fedora.

I have a shiny, new installation of Fedora Server 21. I picked some package groups that sounded interesting for my purposes but intentionally did not select DNS because I didn't want BIND on my server. (Remember, secure is the goal.)

As often as I've installed it, I still check the directions, since it's always best to follow along very specifically when DJB says to do something. Step 1 is for local documentation, so I skip that. Step 2 is download, but I already have it. Step 3, extract. Step 4, compile (using the fix for the Linux bug as described). Step 5, install. Easy! But first, make sure you installed daemontools and ucspi-tcp. Whoops. No harm, no foul, just go install those.

Unfortunately, neither of those compiles. Luckily I've seen that before. It's a quick replacement in one file for each package.

daemontools
/package/admin/daemontools-0.76/src/error.h
  • - extern int errno;
    + #include
ucspi-tcp
ucspi-tcp-0.88/error.h
  • - extern int errno;
    + #include

I then return to the first page to pick which specific application I want to configure. In my case, it's often external cache. I note at the top "These instructions assume that you have already installed daemontools and djbdns, and that svscan is already running." It seems logical to check first: `ps auxw | grep svcscan` What's that? It's not running?!

I check the install script in the package which leads me to /package/admin/daemontools/package/run which has:

if test -r /etc/inittab
then
  /command/setlock /etc/inittab package/run.inittab
else
  /command/setlock /etc/rc.local package/run.rclocal
fi
Sure enough, /etc/inittab exists:
# inittab is no longer used.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.

Well that's not good. Fedora 21 uses systemd. <sigh> DJB checks for the file; Fedora includes the unused file; svcscan thus fails to start.

I could probably modify /package/admin/daemontools-0.76/package/run.inittab to check for some text in /etc/inittab, but that hardly seems good either. Who know what text will be in there in the future or in another language, or ...

Putting it into /etc/rc.local isn't the systemd way anyway. It also didn't work. Probably because I don't have csh which is what was added to rc.local using that method. I would wager that DJB would say Fedora is doing things wrong; it used to work fine; they broke it; not his fault.

I can't really argue with that, but I still want it to work. My guess is installing csh with sudo yum install csh is probably the quickest fix. I'll call that "the end" as I delve into systemd for the first time to see if I can get that working.


Update: This! I now have svscan running from systemd.

No comments:

Post a Comment