Skip to content

RPM is still in the dark ages.

13-Nov-07

It's either a blessing or a curse that I've never had cause to build an RPM down to the spec file until this evening. Well, really, I theoretically should have done this back during the summer, but it's the side job, and there was a faster way to get the new servers running (build a few things like PHP by hand and install, rather than package, them) than either dealing with the absence of PHP 5 packages for CentOS 4.5 (I didn't pick the production environment in either case, so shut the fuck up) or satisfying some other distributions' RPM requirements.

(This is the point where several of you will suggest Debian. Trust me: get fucked. Debian's concept of stable and my clients' concept of what's required to support their application diverge by roughly 24 months. Certain other members of the peanut gallery will make noise about FreeBSD 5 + ports. I will disagree with that contingent less, but This Is Not My Baby. Nor is it reasonable for any party involved for me to support it full time.)

So, but, the goal here is having all required applications, at the revision level necessary for the application to function (securely) packaged, and reproducible in a clearly documented command line when it's time to turn up a new clustered web/db/index/etc server. Ideally by PXE booting or similar. That is absolutely an acheivable goal, but it does require that things like PHP be internally-maintained packages, and so we come to building RPMs, and so I come to reading this steaming pile of zebra dung:

6.8. Files
This is the section where you must list the files for the binary package. RPM has no way to know what binaries get installed as a result of make install. There is NO way to do this. Some have suggested doing a find before and after the package install. With a multiuser system, this is unacceptable as other files may be created during a package building process that have nothing to do with the package itself.

Italics, emphasizing their colossal ignorance, theirs, not mine.

These clowns have never heard of the –prefix flag for GNU configure? I find that improbable. They've never heard of mtree(8)? They go so far as to assert that find(1) can't, under any circumstances, actually solve this problem. No, rather, I should install things, dig through the output from that manually, and concoct, by hand, a list of files (and the permissions on those files) as installed. They have got to be fucking kidding me.

Yeah, sure, I run around with the title of Unix Systems Adminstrator. I don't have a business card (nor do I care for one), but if someone in HR were to choose what it said, it'd say that. BUT. Fucking BUT. This is one of those situations where the computer gets to do the goddamn math. That's why my employer (whoever they happen to be that hour) paid for it… that is, The Computer. What's it do? It computes. It does math. What's keeping track of piddling things like file paths and permissions? Yeah: math.

It so happens that I have no problems doing this relatively quickly on my own, but the fact remains that I absolutely should not have to. rpmbuild? It doesn't build jack shit. It reads a configuration file and fails without exact instruction. It should read a config file to locate the source and the configure options, test build, create a file list for install, regenerate a configuration file for end state configuration and installation, then build a package including target installation locations. But, apparently, it's too dumb for that. NetBSD's pkgsrc (which also works on all BSDs, Solaris, and Linux) isn't too dumb for that. FreeBSD's ports tree isn't too dumb for that. The community-provided macports for Mac OS X (drawing from each of the former two) isn't too dumb for that. Debian's .deb packaging infrastructure isn't too dumb for that. RPM? Apparently: still too dumb for that. What the fuck?

Mac OS X backups

12-Nov-07

While Time Machine has been much-ballyhooed, it is not exactly a backup product (it provides continuous data protection—provided you keep the extra hard drive that you MUST use for Time Machine to work at all connected at all times), nor is it a host imaging product. It's good for “damn, I didn't mean to change that file that way”, but it's not clear that it's all that hot for “restore this system to a default image” (like you'd want in a lab environment) nor for “the system is completely fragged” (say, from an OS upgrade gone wrong).

In those cases, one wants something more like what described a couple of months ago, except that he's missing a few steps necessary to make the resulting disk bootable that Brad Bergeron includes in his description of how to make a bootable USB key with Mac OS X (possibly a handy tool).

First, when you format a new HFS+ drive, it's easy to not enable the “owners enabled” setting. I'm hazy on exactly what that setting really means (thanks for acting like MS, Apple), but I have the impression it means that any user on the host can read all files on the attached disk, rather like mapping anonymous users to root for NFS. I'm taking Brad's word for it that this needs to be changed for Mac OS X to boot from the volume, but it stands to reason. You fix that with the /usr/sbin/vsdbutil command (which, apparently, doesn't have a man page). You probably only need to do this once per volume, but it doesn't take any time or hurt to explicitly activate each time, so whatever.

Second, after copying data to the volume, one must bless(8) the CoreServices directory in the System Library, which enables the BootX application in that directory on that volume and puts the EFI appropriate for booting the OS based in the CoreServices directory on the disk in question.

So, now my backup script for my two Mac laptops (one already upgraded to 10.5, since if the upgrade fragged it I'd just reinstall—its primary use is to run the stereo, one on which I'm making sure I've got a bootable fallback before I do the same) looks like this (modulo actually having most of this in shell variables):

target=/Volumes/whatever
vsdbutil -a $target
rsync -avxE –delete –ignore-errors / $target
bless –folder “${target}/System/Library/CoreServices” –bootinfo –verbose

recommends rsyncing to a hard drive that you can physically swap into your system. That's perfectly sensible advice, but it's not totally necessary. With Intel Macs, you should be able to choose an exernal disk (FireWire or USB) in the “Startup Disk” System Preference or by holding down option as the system boots (these are the same ways you switch into BootCamp, of course). With a PowerPC Mac, Brad believes you need to do the normal OpenFirmware thing that should be old hat if you've run a BSD or Linux distribution on a PowerPC Mac before. Essentially, boot into OF (apple-option-O-F), locate the device from which you want to boot in the devalias output (it may be easier to find this path if you've previously looked at the device list in System Profiler), and ether setenv boot-device to it or just boot the path directly. Brad points to this article, which does an adequate job explaining (though it does get the OpenFirmware key combo wrong, in a rather obvious way: you can't hold the F key down twice). I didn't actually check before the 10.5 upgrade on my Powerbook, but it sure seems like the “Startup Disk” System Preference exists and lets me choose my properly formatted (FireWire 400-connected) external drive with a 10.4 backup of the MacBook Pro's installation on it…

Yes, there is a “recover from Time Machine” choice somewhere (in the 10.5 install media, I think?), and maybe it works, but I'm certain this works and I actually know what it's doing under the covers. It's simple. Simple is good for backups of last resort.

And yes, , I just tested this and it's what you needed to do when you couldn't get your just-rsync backup disk to work.

Update: At some point, tacked on the bit about needing to not ignore owners at the bottom of his post; I'd only gone back to it and skimmed down to compare notes on rsync(1) flags since my initial reading, so I missed that. Also, bless(8) is apparently not necessary for him or most of the people doing what he suggests, but I still think it's a Good Idea, after reading the documentation. It can't hurt and it might help.

Okay, so. Firefox basically doesn't work on Mac OS X 10.5

07-Nov-07

The Flash font? Completely fucked. Unreadable.

Want to download files? Tough. You can't.

Maybe I just need to reinstall? (This is the same binary I was using pre-OS-upgrade.)

I'm running Firefox 2.0.0.9, after a pre-Mac OS X upgrade update, and this is a PowerPC machine (which I updated before the MacBook Pro I use most of the time precisely to suss this kind of crap out).

I noticed I couldn't download files when I went to update the Flash plugin, in case that fixed the font issue.

But even if you control-click an image, and choose “Save As…”, nothing. No dialog, no file retrieved, und so weite.

Whiskey tango foxtrot? Am I alone? Maybe I moved the target download directory as part of the upgrade (in order to get it as a Stack) and that broke things?

Google Streetview cars back in Philly?

04-Nov-07

On Hallowe'en or the day before (I don't quite recall, and I'm not positive I sync'ed the photos–only one is necessary to show everything here, really–off the iPhone the same day), I saw this parked outside my employer's office building:

That's the corner of 9th and Market streets (and yes, it's a legal parking space, though it's kind of in the way during rush hours; yes, the meter had plenty of time left). There are some gaps in the Philly streetview (my street for example, which only fits one car and is often blocked, but also some streets it's difficult to turn into if you're just driving around, and then huge swaths of the greater Philadelphia area, while others are pretty well covered–here look), including some area right nearby that parking space. Here's the parking spot in question, but note all the streets without blue lines nearby.

There is, of course, no camera actually mounted on the roof rack on the car pictured here, but the car was also unattended, so it only makes sense that they took it down. (It wasn't in the front or back seat, I'd presume in the trunk or taken along.) But it fits the descriptions I've read of Google cars in the past and it's got Mass plates (not something one sees all that frequently in Center City Philadelphia, though they're more common in University City where there are more students).

So what's the deal? Is Google back filling in the holes? They've certainly been adding more cities with Streetview pretty regularly lately.

There, was that so hard?

04-Nov-07

Yes, the right one finally arrived. (It's pretty good: as obviously dated as most '80s movies usually are, and not as flashy as the more recent movies based on the same book, but closer, or so a review I read claimed–I haven't read the book, to the original story.)

Incidentally, when I spoke with a human being about this (and she marked it damaged to get me a reissue promptly), I did also mention the fact that this had hapened three times in as many months (four counting sending the same movie I had marked mislabeled back out), and she said that she was going to “send an email” about that, and was appreciative that I could tell her exactly which dates and movies it had happened with (which I got, um, from here). So if you've had similar shipping problems with the Philadelphia NetFlix distribution unit, it may be worth reporting them a bit more assertively.

Apparently it's a ten round fight.

31-Oct-07

Does this picture look familiar? That's right, I marked it mislabeled, sent it back, they received it, I went in and re-added it, bumped it to the top of my queue (the same day they received it, before anything shipped)… and I got exactly (I expect, but maybe they're just duplicating the wrong grey disk for the 1988 version) the same wrong DVD.

This time I called. We'll see.

Update: I'd already re-reported the “wrong disc, right sleeve” thing in the way I have in the past before I called. The operator took down the dates of the previous problems and said she'd ship out a replacement right away. How do you suppose that replacement shows up in my queue? Yep, you guessed it: damaged. So, clearly, if you don't want the hassle of having to wait and then re-add a movie when this happens, you should just claim it was damaged. Great example.

Round three!

27-Oct-07

And again! This one I can sort of understand, given that it's the same name and all, but the movie in the envelope there is the Matt Damon movie (which I like, but wasn't looking to see again right now). The envelope describes a 1988 made-for-tv adaption of the same novel. I guess someone just had both out at the same time and the obvious thing happened. But seriously, this is getting to be too much. Three times in three months, twice in a single month?

Give me a break.

Previously: Round 1, Round 2.

"This DVD is intended for sale only."

25-Oct-07

Today, I received Quentin Tarantino's Grindhouse: Death Proof from Netflix. Unlike Robert Rodriguez's Grindhouse: Planet Terror (which I received yesterday), this DVD floats the above-quoted phrase on the screen after the usual copyright warning.

I do not think that that holds any legal oomph: Dimension (/ Weinstein) wouldn't have let Netflix buy and distribute the DVD if they weren't actually okay with the DVD's being lent / rented (and it's not like Netflix is fly-by-night here; also, they've listed the DVDs as save-but-not-queueable roughly since the theatrical release), and I doubt they'll refuse sale to Blockbuster either, but it indicates an interesting new plausible trend in the MPAA's assault on their consumers. It's possible that an overly broad interpretation of trademark/copyright law could determine, in court, that Netflix's use runs counter to the mark-holder's intentions and, thus, is illegal.

I wonder if this is the reason that the DVDs have been distributed separately, rather than together, as the films were presented theatrically. I think that technical constraints (getting both of these and all the fake previews, and all the extra doo-dads that consumers have come to expect of DVDs onto even a double-layer DVD or two would be rough) and financial avarice (far more money can be made selling two two-DVD sets than can be made selling a single four- or five-DVD set) are probably the more compelling reasons, but the notice's presence on Tarantino's film and absence (Unless I missed it? Please do correct me if so!) on Rodriguez's is, at least, Intriguing.

Lucene (perhaps, Solr-specific) backups

23-Oct-07

A couple of days ago I asked, in a rather aggressive fashion, whether any of you had done backups for Lucene, especially Solr.

None of you had, but at least a couple of you were concerned, for your own reasons, that I was concerned about the safe way to do that.

For the time being, I'm putting a thumb in each ear, one hand over my eyes, and the other hand over my mouth (mostly), and following the Party Line: make a hard link to the index files, back up the hard link, and that's Enough. Lucene will create a new file when it goes to write out a new copy of the database.

I'm less than fully convinced by this, and I certainly haven't performed the degree of recovery validation that I would in my Day Job, but I'm making myself believe that the vendor knows what they're talking about in the context of being paid hourly by a friend's startup that needs things to work but is comfortable with working by the seat of their pants.

A few relevant links (possibly subsequently updated) can be found here.

Oh hey look.

19-Oct-07

Apparently two people way at the bottom actually got it. Good for them.