New AWStats ebuild notes

Since there has been quite a bit of noise on the stable request bug for the newest AWStats version, and I’ve actually wanted to write this down before it went stable, but the security issues there forced my hand a little bit.

It is obvious when you look at the installed layout of the new awstats that this version installs quite differently from the previous one; for once it doesn’t use webapp-config any longer, but it also changes the paths used to install the tools and other scripts. There are a few reasons for this so let me revisit them a bit.

The webapp-config system was designed to help managing web application deployment in Gentoo by allowing install of multiple version on different vhosts. This was a generally good approach for software designed around the concepts of old-style web applications, written in Perl/CGI or PHP, which are self-contained in a single installation directory, but it fails badly when you deal with modern application designs such as Rails, TurboGears, and so on. For this reason you can see that it starts to “wither” as the modern applications are just not usable with such a system.

In the case of AWStats, while it is a web application written in Perl/CGI, it is far from being a self-contained one: it provides a number of system tools that are used system-level, and has a system-wide configuration file system in /etc/awstats. Also, it strictly doesn’t need to be used as a CGI, as you can easily produce daily and then provide static web pages for those. With all these restrictions, the requirement to use webapp-config is pretty much pointless; as an added bonus, none of the AWStats ebuilds ever allowed slotted, side-by-side installation of multiple version, which is the primary use of webapp-config.

Since you lose the previously-installed version when upgrading, webapp-config becomes now a burden, rather than an ease in management. I have been running it without using that system for quite a long while, but upgrades were still bothering me as the path to the CGI scripts changed version by version, as they are tied to the ebuild’s version and revision. Thus, the new system.

First of all, the tools are now installed in the path so you don’t need to use full path to them. Then the whole application is installed onto a single path: /usr/share/awstats/wwwroot (the path is in line with the upstream documentation); you can then use your webserver configuration to either alias those paths to the exposed one, or simply symlink them around in your webserver’s document root. As a reference, this is the kind of configurations I use on my statistics vhost (which is, as I have written before, secured and password-protected to avoid giving pagerank to spammers):

  Allow from all

  SetHandler cgi-script
  Options +ExecCGI

Yes, that’s it.

New year’s resolutions

So the new year is near, and this time I want to make some resolutions I’ll try to live up to.

The first is to start detaching from things, from objects. I have one big problem, I have difficulty detaching from objects because they remind me of something, even when the things are completely useless and just take up my space (and I don’t have much space). I attach myself too much even to shipment cardboard boxes for stuff I received or bought, and this becomes a problem on the long run. I also have to keep most boxes of the stuff I buy because of the warranty requiring me to keep the original boxes for at least two years (more if the warranty is extended).

I already tried putting an old soundcard on eBay, but the result was unsuccessful (not even a single offer), now I tried an old motherboard, who knows, maybe I can get rid of some stuff, and “stash away” some money. Unfortunately most of what I have here is probably crap for the average ebay user, so I doubt it would end up sold… I have a few old keyboards, some old video cards, and stuff like that. I’ll try to see if I can make something out of them, otherwise will probably either throw them away or put them up available for free for anybody (beside shipping costs).

The second resolution is the most important one, this year I have to take my driving license, and a car. I can’t be stuck in the nothingness where I live forever, I need a car, and I need to get a daily job, at least temporarily, to pay the car. I’m lucky with this, I have an electronic shop at ten minutes from my house (by car) and I know they change personell quite often, with some luck I should be able to push myself to do six months were just to pay for the car.

I’m finishing what I had left floating around me in Gentoo in the next few days so I can spend more time on working during the new year, as I really need to get some money saved, even if after my hospitalisation that is difficult. Trying to get away from 2007, I also spent basically all the money I have, buying stuff for me and gifts for my friends, this way I can start anew with the new year.

On a Gentooish note, today I created three new packages, one in the main tree and two in my overlay. The first is libasyncns by Lennart, I always put it back into my TODO list to add one day as it’s an optional dependency for PulseAudio; the arch teams now hate me because I’m asking them to re-keyword PulseAudio once again… Lennart you always use bleeding edge stuff, don’t you? :) First it was libatomic_ops (which I had to add to portage), then PolicyKit (which luckily enough steev added to portage about at the same time as I needed it), and now asyncns, which was there from the start, but I skipped up to now :P

The other two packages are Emacs modes; I updated nxhtml-mode (this time a different Lennart ;) ), now it actually works fine for me even on Gentoo, with indentation not throwing up annoying messages to me anymore. But it has a new dependency, app-emacs/cgi+ (new package), which in turn depends on app-emacs/cgi (also new) and app-emacs/httpd. Certainly nxhtml-mode is not one of the most self-contained packages in Gentoo (actually it’s completely self-contained if you download and install it manually, but as usual in Gentoo we prefer using separate packages if they are available).

And nxhtml-mode actually spawned its share of new packages as dependencies, which is not entirely bad as it allows Gentoo’s Emacs support to improve :D