Making ServWise
50% off all hosting at servwise

Sabayon

March 19th, 2007

Sabayon linux is an interesting distro. It is based on Gentoo, which is a favorite of many, but seeks to eliminate some of the compilation hassle of Gentoo by providing a live CD and an installer that installs precompiled packages.

A desktop Gentoo install would be up and running in a day or so, whereas you can get Sabayon installed and running as quickly as any other distro – the install time is a function of the number of packages you install.

So how does it work in real life? Well, installation is indeed a breeze – using the mini-CD option you are up and running in no time.

The mini-CD has a subset of the full Sabayon install DVD, which comes in at 3.3 gigs. The Sabayon team say that they have eliminated all the “useless” things to make the mini version. These useless things are presumably included on the DVD.

So once you have installed, you will want to add a few of your own packages. And this is where things get interesting. Firstly Sabayon has a release schedule, and an existing Sabayon installation can be upgraded to the new release, though only those packages that are part of the distro. I would imagine this would often cause non-Sabayon packages to break.

However, if you are a happy to manage this, then install some extras. But this is where things get tangled. For example, it is recommended that an

emerge –sync
layman -S
emerge –newuse –update –deep world

is performed to get everything up to date. This is pretty important as anything you want to install over and above standard Sabayon, is likely have library version dependencies that are not met by the install disk libraries.

So what happens here in effect is that everything in standard install is almost immediately replaced by updated and recompiled versions. And something is bound to want to look at the kernel in /usr/src/linux, so you had better put one there. And build it. And then install it (thankfully Sabayon does provide the .config file for the default kernel in /proc/config.gz). But the whole point of Sabayon is to not have to do this… I had around 6 gigs of downloads once I had updated everything.

But then there is something else Sabayonic that comes into play. Sabayon states that it is cutting edge – and it is – it comes with late release nvidia and ati drivers, and aiglx, xgl and beryl are there out of the box. But in order to be cutting edge, masked packages need to be accepted.

Masked packages are flagged with ~amd64 or ~x86 depending on your architecture. These are packages that have not been fully tested and so it is up to you if you want to risk installing them.

A sabayon default installation has “ACCEPT_KEYWORDS=~amd64″ in make.conf, which means that it will emerge anything in testing. This is how it achieves cutting edge-ness. But obviously not everything in testing will work – thats the whole point of testing it. So the emerge will fail on various packages, which will cause you to try and find a path through the dependencies that will allow everything to work – by managing what goes into /etc/portage/package.mask. This is pretty difficult.

And it seems to me that it is impossible to go back to not bring in untested packages. Well, not impossible, but hard. The keyword can be switched off, but then everything needs recompilation. But some of the libraries cannot be downgraded – you are warned that downgrading will break the system – like glibc.

So anything that relies on a library that is currently in testing cannot be downgraded must by definition be an “in-testing” package. So trying to unravel the dependency web is intractable.

Having gentoo on the desktop is pretty cool, and Sabayon does a good job of getting you there – but the nature of gentoo is that you are compiled to your architecture, so having precompiled binaries doesn’t give you any of the benefits that gentoo is about – except emerge’s excellent dependency management. But that demands that you recompile everything, which then makes Sabayon redundant.

Perhaps the better approach would be to install vanilla gentoo, then use layman to bring in the sabayon overlay, and use the Sabayon part of the portage tree to bring beryl and all the extra goodies that make Sabayon worthwhile.

Media PC: Tuners

February 22nd, 2007

You are probably thinking of buying or building a media PC. With the advent of Vista, I foresee a rapid increase in the use of media PCs in the living room. That’s if anyone buys Vista of course.

If you have digital TV broadcasts in your area, then get a DVB-T tuner. Forget about analog – the price difference make it a no brainer, and analog will be switched off pretty soon. Hopefully. So all that frequency space can be freed up and used for something better.

How many tuners? Well there are 7 free-to-air channels where I am, with content on about five of them that I would watch. Still, for that many channels, I’d say two is the minimum, and three would be good.

Now you may be thinking – well hold on, I managed perfectly well with a single VCR, why would I suddenly need to be recording 3 shows concurrently? How often would that happen?

The thing about switching to digital recording is that your whole approach to TV will change. If you have regular shows that you would watch, you’ll find that you will watch almost all of them “time-shifted”. The first thing you do when you get your MPC set up is to go through the programme guide and tell it to record all your favorite shows. You are likely to get a overlap here. And you may be thinking, well I can just watch one show live, and record the other…

The thing is that once you get used to having all your shows recorded whenever they are on, you will become more flexible about when and how you watch them. You’ll no longer be timetabling your life around what is on (you do this right?) – everything gets recorded, and you watch when you can, or when you want. So the show that you used to watch while the other show was being VCRd on the other channel becomes a hassle, and you’ll want both of them to be recorded. Not least of all so you can pause the show and come back with that cup of coffee. Besides, recorded shows means no more adbreaks – that you need to pay attention to – you can break whenever you want, not when the network wants to sell you something.

Overrun is also an important thing. In this country, they take great pride in considering a TV schedule a ‘guide’ – a kind of “nice to have”, but not really that important. So even channels with no live content still do not trouble themselves with shows starting when they are advertised. So you need to plan for overrun. And if you have a show back to back with another on a different channel, you need two tuners to cater for one show overrunning the start time of another.

Dvico do a fusion card that has two DVB-T tuners built in. This is a good starting point. Don’t get one. Or you’ll want to get another. And when this whole media PC thing works for you, you’ll want to put the kit into a nice low profile case. These support microATX size motherboards, which often only have one PCI slot, and one PCI-X. Most tuner cards are still PCI, so a dual tuner card is a good idea.

Final Conflict

February 6th, 2007

Remember Earth: Final Conflict? Maybe not, because I was the only one who watched it.

But they had these communicators with roll out screens… so lookee here:

http://www.polymervision.com/News-Center/Press-Releases/TelecomItaliaandPolymerVisionannouncetheCE.html

Ruby Scraping

February 6th, 2007

You’ve always got to pick the right tool for the right job, and many would say that Ruby is the right tool for most jobs. It is pretty good, thats for sure.

But with hpricot, it is a no brainer when it comes to web scraping. hpricot is a library for extracting contents from web pages to do with what you will. Chief amongst the features you’ll want for such a library are simple and fast ways to parse the tree of the site you are scraping, and hpricot has them in abundance. I haven’t found anything simpler.

And then just now I find out about the firebug extension for firefox. One of the tricky things with scraping is manually figuring out the path through the tree you need to traverse to get to the bit of the page you are looking for. This blog shows how much simpler it is with firebug

Ruby Screen-Scraper in 60 Seconds