[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Filed under: General — Thomas @ 13:35

2003-12-31
13:35

Dave/Dina

Massive three day hacking spree on Dave/Dina. It was still running on Red Hat 7.3. I took the platform to RH9, rebuilding almost all of the packages, throwing some out, tweaking things all over, and so on.

It is amazing to actually use all of the side projects you were involved with and start using them for what you intended them to. Building all these packages was made a hell of a lot easier using mach. That was a great experience.

I also learnt some more about the delicacies of controlled kernel building. In my older packages for the D/D kernel, I started from the patched RH kernel sources, and didn't have to do make mrproper. When I synced with the RH9 kernel sources, the build failed mysteriously halfway through, and commenting out modules one by one that failed (megaraid, dac, ...) didn't really tell me what was going on.

Someone suggested running make mrproper, which worked. So I suppose the kernel-source rpm isn't really a pristine kernel source tree with RH patches, but in some way preconfigured or whatever.

This just shows me I have yet a lot to learn about the kernel compilation process.

On the plus side, after a day of fiddling, I had a completely decent kernel package, buildable as non-root (mach forces me to deal with these issues, which is good for my package-fu), which installed and worked just fine. It even has the custom boot logo for Dave/Dina, sweet.

Checked the Sourceforge statistics page for D/D by accident - it seems that this weekend the project was two years old. Crikey.

That made me all tear-eyed. It is amazing both how far it has gotten and how usable it is in day-to-day life, but also makes me wonder about all of the other things we could have been doing with it today.

In any case, the four of us that are now living together are going to part ways soon, and two of the three others have already decided to buy a machine and install Dave/Dina. A sure sign we're doing something right.

DAD

Worked with Kristof on the new DAD version. We put in lots of nice tweaks and options to get playlists based on the ratings you've given to songs.

One of the things that bugs me to no end in other PHP-based projects (well, apart from the obvious/usual bad coding style/stupid variable names/hackish install ways) is that they are so damn hard to upgrade properly; especially when the database backend tables change.

So I discussed with him some way of setting up an upgrade path that would be pretty much transparent. We experimented a bit and came up with a dead easy solution:

  • Create a table with the "database" version to keep track of what version of the source the current database corresponds to
  • in the header.inc file, check this version against the source version
  • run through all of the upgrade_to_(version) functions one by one
  • each of these functions tests the database version against it's own version, and makes mysql adjustments as needed

This might sound a bit complicated, but in the end works very well. A new RPM version of dad gets installed. A user browses to the interface. The interface checks the database version and notices there's a mismatch between db and src version. It takes a backup dump (also very handy for our night rest), and starts going through the upgrade functions.

The net result is that, when we just keep adding upgrade functions whenever necessary, each version is upgradeable to each following version without problems.

Sometimes the fun is in the small details like these. (Just like, how adding flush (); at the end of the header.inc file gives us a nice always-there header when browsing through the interface).

Kernel hacking

Today I presented myself with a hard problem to solve. The basics are simple.

  • a Creative Live Audigy card (unsupported by the kernel emu10k1 driver)
  • emu10k1.sf.net (a module to replace emu10k1 and ac97_codec)
  • the desire to make a Fedora package for this kernel module so that the people who will have to look after the machine with the Audigy will have some hope of being able to update the OS/kernel/...
  • the problem that you can't cleanly override already installed kernel modules
  • the desire to make modules.conf autoprobe the "new" module, and not the original one

At first I wanted to find some way of installing them in a different subtree, and then figuring out how to make depmod and friends ignore the "old" module.

I couldn't really find anything to help me in that direction, so in the end I decided to do it by mangling the name of the new kernel modules. I prefixed both with ext-, and changed the Makefiles, and that worked. I tried the modules, modprobed ext-emu10k1, but sadly it loaded ac97_codec (the old driver).

Trying to back-guess how depmod and friends worked, I figured that emu10k1 must be trying to call symbols from ac97_codec, and I dug around and found some define-like thingy that exports symbols. So I prefixed all of these with ext_, rebuilt the RPMS, and retried, and this time it correctly loaded the two modules. Success ! A new set of lessons well learnt, one of which is to not be afraid of the kernel. Well, of modules, anyways.

Anyways, if you have an Audigy and are running RH9 then please go to this Fedora bugzilla entry, get the packages, test them and report your progress in that bug number.
Music
Was eagerly awaiting the new Elbow record, "Cast of Thousands". It's one of those bands I didn't get into when they got their album out, or which I had written off as just another hype. But after picking up their first one on the cheap, I fell in love with the graceful beauty of songs like Newborn or Scattered black and whites. It's always hard to comment on songs when they haven't had a chance to grow, but there are some very nice touches on the record.
Lyrically, it's top notch. Poetic in a good way. Just when you think every way to tell someone you love them has been said, someone invents some new way of saying it.

You, the only sense
this world has ever made

Filed under: General — Thomas @ 13:34

13:34

Patch management

I need some help/input and this is the right place to ask for these kinds of things.

For some of my projects, I need to modify original sources and maintain some sort of fork of the original project. I want to set up some simple Makefile-based system to keep track of patch sets.

I'll braindump a little what I want to do and how I currently intend to do it, and feel free to comment or mail me directly with suggestions.

Suppose I want to modify anaconda, the Red Hat installer. There are a whole set of modifications to make; changing instances of Red Hat to something different, adding new pages for installation, and so on. Some of these patches are worth sending upstream for inclusion in anaconda mainline, some aren't, and so on.

So the goal is to actively work in a modified copy of the anaconda source tree that I keep around on my hard disk. I'd be working on one sort of change at a time, and when I'm happy with the change I would generate a patch that would only contain those changes, give it a name, and store it in a directory with specific patch files. So basically, what I need is:

  • a way to check if the pristine source, with the given set of patches applied, adds up to form my local modified copy; I'd think this would be easy by just creating a temporary directory as a copy of the source, apply the patches in order, and diff.
  • a way to customize an already created patch; my hope is that by applying all patches to the source tree, then reverse-applying the specific patch, this ought to work as well.

For now I'm going to try and tackle this by having a set of directories:

  • src: the original source directory
  • work: the working directory, in which I build and modify stuff
  • custom: the customized source directory, which would be "work" minus alld of the build files (because I need to sometimes add new source files, and doing diffs with new files is painful if you do it in build directories)
  • patched: the temporary directory created by starting from src and applying patches from "patches" in order
  • patches: the set of patches I have generated

I'm probably going to do the management of these through some Makefile-based system that allows me to generate a patch for the current work dir (by diffing custom against work and listing differences, syncing custom with work, then making a diff against custom and patched). Then I also need to figure out an easy way of doing N-1 patches, when I want to work on a patch.

As you can see, I'm not yet sure how to proceed, and all advice is welcome. I'm sure someone else must have been in the same situation before me. I've asked around a bit, tried to see how tools like arch/cvs/svn could do this for me, and tried to google (but "patch set management" turns up a lot of stuff that has nothing to do with what I want), to no avail.

Dave/Dina

Taking out the whole extended weekend to work on Dave/Dina. Kristof has been adding so much recently that I feel I have to catch up and get some things moving.

First thing to do is to update the whole system to Red Hat 9 and work on anaconda again to take it up there too. Will be quite some work, there has been a lot of changes in the install procedure between RH73 and RH9. This probably also explains why I want a patch set tool :)

Uraeus

Happy birthday big guy. Was this why you were pushing for a release ? :)

Filed under: General — Thomas @ 13:33

13:33

And at the desktop there's cryin' sounds
For all the projects due and no one else is around

mach

Did some more cleaning up over the weekend - mach now no longer needs to bootstrap itself in hugely clever hackish ways by downloading some basic rpms. Apt-get from outside the chroot works wonderfully well and sets up these roots a lot better than I used to do.

Going to test drive it on a few machines now, and try again at rebuilding RHAS 2.1 with it. That's just as a mental exercise - I'm wondering how far I can get and will be hugely pleased when I can just do

 mach rebuild *.src.rpm 

and get a whole set of RPM's after a few days of compiling :)

gnome-audio-profiles

Stole heaps of code from gnome-terminal, and it's just about done. Now I need to set up some good defaults and write patches for sound-juicer, nautilus and gnome-sound-recorder to show it off.

Tango

Enrolled in a twelve day advanced course. I get to practice my Spanish as well, the teachers are from Argentina. The drawback is that it's very hot these days, so after fifteen minutes we're all drenched in sweat. And they also mixed up beginners and advanced dancers, which causes problems at times.

Dancing it sometimes gives me the same feeling as hacking; you steal moves with your eyes from other people, practice them by doing them, until you get at the point where you can do it with your eyes closed and use the basic steps and building blocks to express yourself in a certain way.

Work

I have become more relaxed at work knowing that my time is almost up. I get to spend some time on the more important issues (though someone did manage to work up the courage to come and ask me how to start Word on a computer).

I look so incredibly much forward to my unemployed time starting soon. I have tons of things I want to work on.

Weekend

Had an incredibly productive one. I got lots of touching up and finishing bits done. For one thing, I started to feel uneasy about the 900+ CD's I have stored on our hard disk at home, so I started to back them up to CD. I did 50 data CD's this weekend, how times have improved.

I also did about five episodes of West Wing worth of ironing, so I tend to walk around naked less than I used to.

Kristof commited some more changes and fixes to DAD too, so we need to do a release for that soon to. But for that to work well I need to take Dave/Dina to RH9...

Filed under: General — Thomas @ 13:32

13:32

GNOME

Been hacking on a piece of desktop integration - sound profiles for GNOME. The idea is very simple. A lot of applications need to convert audio (sound-juicer, nautilus in the future, gnome-sound-recorder, ...) Right now, they have to ask media-specific details like sample rate, format, and so on. And they all do it in their own way.

The thing I'm doing is pretty similar to something I remember seeing in Windows in a more basic form; some way of specifying audio profiles. For example, the human name would be "FM Radio Quality", and behind it would be a profile that would convert to Ogg/Vorbis, at 32000 KHz, with a certain quality setting.

The point would be that these profiles could be stored in GConf and managed centrally. Applications could also use a default setting for operations if they want to. This way, Sound-Juicer would just present you with a drop-down box of human-readable encoding profiles. When dragging cd tracks out of Nautilus, or right-clicking on tracks in Nautilus, they could be converted using those profiles.

Taking a leaf out of hadess's book, I started to look around for bits I could steal. The GNOME panel has some notion of profiles, but there is something very complicated going on there. So I decided to steal from gnome-terminal, which has the added bonus of having lots of code by Havoc, which gives me the feeling I can trust the implementation :)

Work is progressing nicely, and I'm learning a few new tricks. Right now, however, I've come to a dead end. I need opinions. I have a .c/.h combination for the profile edit dialog. There's one function that will instantiate a new dialog to edit a profile. The GtkDialog is in a glade XML file. the GapProfileEdit GObject is a subclass of GtkDialog and is just the dialog with a few private bits for internal management. So far, everything is great.

However, combining GObjects that are extensions of GtkWidgets with Glade presents me with a problem. Here are my options:

  • don't get the actual GtkDialog from glade, but get the contents of that dialog and add them to the custom GapProfileEdit dialog. The drawback is that things that are specified in glade (response buttons and so on) will be missing, because creating a GtkDialog instantiates those too apparently.
  • I empty the created GtkDialog somehow and add the glade stuff in it

Neither really feel right - there should be some way to instantiate a custom widget from an xml file. I suppose I could try and see if there is some way I can override the parent's instantiator and have it instantiate from glade instead.

Sounds

I had someone read in pieces of sound for GNOME, GStreamer and Dave/Dina. Here are some samples:

The first two pointed out to me that esound isn't very good at this on my laptop. The sound breaks up too much because the machine is doing too much stuff at those times.

Interested in hearing opinions - I wouldn't mind having a voice theme for the desktop.

Filed under: General — Thomas @ 13:31

13:31

mach

Progressing steadily. Getting patches and comments from various people at this point, which are again holding me back from doing a release. Axel Thimm pointed me at the fact that since I now use rpm and apt on the host instead of inside the root, I no longer need to bootstrap everything up to apt anymore. Duh. He's right, and it should simplify the configuration file a lot.

Other people are starting to ask me questions about it, so that's a good sign. I need to get it out.

computer

To celebrate my redundancy, I bought two Compaq LCD flatscreens (they were on sale) and a Matrox 550 (I haggled). I have xinerama at (ex-)work, but I might make more use of it at home. I hope to somehow run X on one and DirectFB on the other, for example. Or GNOME CVS on the other. Will take some twiddling.

The motherboard I'm using is an SiS variant and apparently a lot of them trap Ctrl-Alt-Backspace and make it instantly stop the PC. I'm not sure I'll manage to unlearn muscle memory for "kill X" anytime soon.

Severn

Installed it on the new machine with the dualhead. It seemed to lock up at boot time, and it seems to lock up every other time too. When doing Xinerama, for some reason it has the heads the wrong way around, so that my second output always has XVideo and the other doesn't. I also have to switch around the Server Layout to fix the xinerama. Not sure what happens here.

DirectFB

Something must be wrong with the build system because none of the packages out there had working binaries; all of the packaged binaries were the libtool shell scripts. I hacked around it by manually copying libtool in my spec file, and showed it to Matthias when I was there, who didn't like the solution :) But I'm assuming he did the same as well anyway.

I have a largish patch for the directfb guys, but I'm not sure my mail got through. to them.

Unemployedness

I look forward so incredibly much to my self-imposed timeout from the working world. I have a ton of things I want to work on: mach, Dave/Dina, GStreamer, GNOME multimedia bits, a car GStreamer player, a python-based GStreamer-based Dave/Dina integrated player, ...

There's too much interesting stuff to do.

« Previous PageNext Page »
picture