Monthly Archives: July 2010

Better Building

GearsAs I mentioned in my last post, I’m setting up the computer system in our sister school in Ain Zhalta, up in the mountains, and last summer I set up the computer system in our sister school down in Tyre.

This includes both servers and workstations, and, being the lazy sysadmin that I am, I prefer not to reinvent the wheel for each place. My method last summer was to build rpms for most of the school-specific configuration settings, which allows me to make small changes and have them pulled in automatically.

The one problem I’ve hit is that there are some packages that have to be different between the two (and now three) schools. For example, the package lesbg-gdm-gconf contains the gconf settings so our login says “Welcome to the LES Loueizeh computer system”. Somehow, I don’t think Tyre or Ain Zhalta will appreciate having that showing on their welcome screen. Each school also has a different logo, and, again, the other schools don’t want our logo on their backgrounds.

So, what I really need is a way of organizing my rpms so that the common ones get passed to all the schools while the per-school ones only get passed to their school. Hmm. Think, think, what software is available in Fedora that could do that…

Enter koji. I had already setup a koji buildsystem to help track down the disappearing deltarpms bug (yes, the bug is still there, but that’s for another day), and the hardest part was getting the SSL certs right.

I set up a koji instance on our dedicated server (now yum upgraded to Fedora 13, see this post for more details) by following these instructions, and now have a nice centralized build system for our schools at

The beauty of koji is that it handles inheritance. For Fedora 13, I’ve created one parent tag, dist-f13, and three child tags dist-f13-lesbg, dist-f13-lest, dist-f13-lesaz. All of the common packages are built to the dist-f13 tag, while the school-specific packages are built to their respective tags. Every night, I generate three repositories (lesbg, lest, and lesaz), and each repository has the correct rpms for that school. What could be easier than that?

There are a few caveats, though. First, our dedicated server is slow. It’s an old celeron with a whole 1GB of RAM (through HiVelocity), so I’ve had to compromise on a few little things. First off, we run both the x86_64 and i386 Fedora distributions, but our server is i386 only. This means that, at least for the moment, all of our packages have to be noarch.

Second, a normal part of the build process is to merge the upstream Fedora repositories with the local packages after each build (so it can be used to build the next package). On our server, this takes almost two hours. So I’ve modified it so the build repository doesn’t include the local packages, and that mess is now gone. The downside is that I can’t BuildRequires any local packages, but, seeing as they’re all supposed to be configuration anyway, that hasn’t been a problem yet (and I don’t expect that it ever will be).

Anyhow, aside from some small glitches that seem to reflect more on the slow hardware available, koji has done the trick and done it nicely. With our current setup, I can now add another organization with a minimal amount of fuss, and that’s just what I was looking for! Thanks koji devs!

Gears credit: Gears gears cogs bits n pieces by Elsie esq. Used under CC BY

Electricity, electricity

Electricity sparkingI am not an electrician. I do not wish to be an electrician. It is not one of my goals in life. Unfortunately, sometimes we have to do the things we don’t want to do.

On and off over the last couple of weeks, I’ve been working in our sister school up in the mountains, setting up a network. Their server was so old, it still had a ISA network card. I think they stopped using it sometime last century. Their desktops were a bit better, Celerons with 256MB of RAM.

Our sister school in Tyre offered to donate new equipment, so I’ve been spec’ing machines and setting up a real server. Unfortunately, getting the server set up took a bit more effort than I originally expected. You see, power up in the mountains is a bit…erratic. Four hours on, four hours off, six hours on, six hours off, etc. The school did have a nice, massive UPS (being used to keep the bell system up when the power was off), but the batteries were old car batteries that could only keep the server up for 90 minutes.

So I order four 100aH marine batteries (the UPS is 48V, otherwise I would have gone with two 200aH batteries), receive them, and drive them up the mountain. Once I’m in the office, I shut off the UPS and unplug the old batteries. After swapping in the new batteries, I start rewiring them all together.

One, two, three batteries and no problems. I reach up to attach the final wire from the UPS to the positive terminal on battery #4 and…


As I said, I’m not an electrician, but, as I understand it, a spark is a sign that there is a circuit. So I get down next to the UPS and make sure all of the various switches on it are actually off. Then, to be safe, I switch off all of the breakers in the UPS room. I reach up to attach the final wire again, and…


I call the principal of the school, and she comes down and verifies, that, yes, all of the breakers that power the UPS are off. There is a little red light on the UPS that is on, but rapidly fading. It finally dawns on us that the batteries are charged, and the circuit isn’t the UPS trying to charge the batteries, but rather the batteries trying to power the UPS. I now remove both of the fuses in the UPS and grab the wire again.


The stupid UPS always completes the battery circuit, even when all of the switches are off and fuses pulled out! How am I supposed to do this? I call the resident electrical expert who wired our school down in Beirut. “All the switches are off and fuses out?” he asks. “Yes,” I reply. “Then you’ll just have to attach the wire as quickly as possible. The quicker you attach it, the less spark there will be.”

Famous last words. I tell the principal, “If I don’t make it, tell my wife I love her.” I then say a prayer, psych myself up, and slam the wire onto the battery.


The UPS comes to life and I gingerly tighten the wire onto the battery (using a rubber-handled wrench), put the fuses back in, flip the breaker back up, and turn all of the switches on the UPS back on. As I’m putting in the fuses, I notice a big label, “Made in Lebanon”.

Everything back up and running again, I turn to the principal and say, “If you ever need help with your UPS again… don’t call me.” I am not an electrician. I do not wish to be an electrician.

Spark credit: Spark by Phyzome. Used under CC BY-SA