Steady as a rock

…or so they say

 

Chocolate!

Fact one: Women who have their monthly problems need chocolate and preferably lots of it
Fact two: My girlfriend like to bake pies
Fact three: She has her monthly problems now (why else would I be blogging instead of spending time with her)

Result:

Now this is bad for you but tastes soooooo good!

Filed under : Personal
By Dennis Kaarsemaker
On February 3, 2008
At 15:23
Comments : 4
 
 

End of an era, beginning of another

Back in 2005, when Ubuntu was still young and #ubuntu small (less than 300 users), I became Ubuntu member and IRC operator. At the latest Ubuntu release the channel peaked at over 1600 and usually has more than 1200 users. It’s been fantastic to see this growth in #ubuntu and related channels.

In the past 3 years it’s been a fun ride from Ubuntu user/channel visitor in 2004, through IRC op, and then representative of Ubuntu on freenode. Earlier this year we have worked on a more formal IRC governance, resulting in an IRC council of which I have been a proud member.

But today that has all come to an end, I have resigned from the council and have placed the responsibility for Ubuntu’s presence on freenode in the caring hands of the other council members. The IRC community is a vital part of the community and is in good shape, it is time for me to do the same for my other big love inside the Ubuntu community: the dutch locoteam.

Founded in 2004, the dutch locoteam it is one of the oldest locoteams around and has seen a steady growth over the past years. We have many forum contributors and a good crew of active people, it is time to turn this enthousiastic group of people into a professional team of Ubuntu supporters.

We’re halfway there already, the active members all have great ideas on how to move forward and lots of progress has been made already. The best part so far of this is the AWESOME release party we had last saturday, we estimate the number of visitors at over 400!

On to 2008, the year of Ubuntu-NL!

Filed under : Ubuntu, Personal
By Dennis Kaarsemaker
On October 31, 2007
At 18:26
Comments : 5
 
 

The ultimate password manager

I hate passwords. Thoroughly. I always forget them, so I tried several password managers but I don’t really like any of them. Revelation is the nicest so far, but it misses some flexibility. Ideally, a password manager would be just an editor that saves files encrypted, so I tried mped which seems to be able to do that. Not liking it, I hate using yet another editor. Wait… yet another editor…?

At that point I slapped myself in the head for overlooking the obvious solution for the ultimate password manager: vim. It is my editor of choice and can be scripted. 2 lines in ~/.vimrc and it’s the ultimate password editor, allowing you to encrypt everything with gpg easily. Only two passwords left to remember: user account and gpg key. Profit.

map <F12> <Esc>:%!gpg --encrypt --armor --recipient dennis@kaarsemaker.net<CR><CR><C-l>
map <S-F12> <Esc>:%!gpg --decrypt 2>/dev/null<CR><CR><C-l>

F12 now encrypts and Shifs+F12 decrypts. Yay!

Update: it can be done even nicer

Filed under : Personal
By Dennis Kaarsemaker
On October 24, 2007
At 10:04
Comments : 9
 
 

Need For Speed, oh how I missed thii

A few years ago, I was addicted to Need For Speed Porsche 2000. Then Windows XP (and later: freedom, aka Ubuntu) came along and the game was no longer playable. Thank you Microsoft , bah! But yesterday I was riiunited with mii addiction. Yes, I bought a wii and Niid for Spiid Carbon. It rocks. IT ROCKS!The wii stiiring whiil accessory makes it even better and I already mastered a few of the tracks in easy mode.

Oh how I missed thee, need for speed!

My wii number is 6216 1161 1323 7939, in case anyone wants to add mii Smile

Filed under : Personal
By Dennis Kaarsemaker
On September 21, 2007
At 20:46
Comments : 4
 
 

Hold on to your pants, here’s a shocker

Shocking news from Dennisland, shocking in a positive way though. At least I think it’s positive since I’m very excited about it and everybody who knows it is excited. It’s still a shock though Smile

362 days from now (aka sept. 5 2008) will mark the 5-year existence of my relationship with my girlfriend. What could be the best present to give her for that anniversary? Think about it for a second…

No matter what you thought of, it is not as good as this: we’re getting married! Unbelievable eh!

Filed under : Personal
By Dennis Kaarsemaker
On September 9, 2007
At 17:36
Comments : 18
 
 

Package build coordination

A very important feature in the beta 3 release of falcon (which will happen when I finish the documentation) is automated package building. Yes, falcon is now becoming a full fledged repository manager where you can dput your package to and it will build your package and install it in its database.

Here’s what it looks like when run manually, only one package in the queue:

dennis@blackbird:/data1/src/falcon$ bin/falcon-build-queue
Falcon repository manager 2.0.0~beta3 (C)2005-2007 Dennis Kaarsemaker
*  Building casper_1.87.dsc on Blackbird, Starfreighter
*  Trying to build on Blackbird
*  Executing the build command, logging to buildlog_Seveas-feisty-i386.casper_1.87_BUILDING.txt
*  Downloading ubiquity-casper_1.87_all.deb
*  Downloading casper_1.87_i386.deb
*  Succeeded building casper 1.87 on i386 buildd Blackbird
*  Uploaded casper 1.87 for building on amd64 buildd Starfreighter
*  Build result for casper 1.87
*  ============================
*    amd64 Starfreighter        PENDING
*     i386 Blackbird            OK
*  Run falcon-build-queue to check for finished builds
dennis@blackbird:/data1/src/falcon$ ssh starfreighter ./falcon-build-local-queue
* Building casper_1.87.dsc, log will be written to /pbuilder/result/buildlog_Seveas-feisty-amd64.casper_1.87_BUILDING.txt
dennis@blackbird:/data1/src/falcon$ bin/falcon-build-queue
Falcon repository manager 2.0.0~beta3 (C)2005-2007 Dennis Kaarsemaker
*  Downloading casper_1.87_amd64.deb
*  Succeeded building casper 1.87 on amd64 buildd Starfreighter
*  Build result for casper 1.87
*  ============================
*     i386 Blackbird            OK
*    amd64 Starfreighter        OK

When this is run via cron, it will be fully automatic.

Filed under : Ubuntu, Personal, python
By Dennis Kaarsemaker
On August 3, 2007
At 22:37
Comments :1
 
 

Dying disks don’t survive release upgrades

It’s 3:50 am now. I’ve rushed to install a new laptop after the disk in another one gave loads of errors during a dist-upgrade to gutsy. Not nice! Fortunately no significant data was lost and I can continue working on this one.

Filed under : Personal
By Dennis Kaarsemaker
On July 20, 2007
At 02:52
Comments : 3
 
 

Oh noes! It is here! Falcon 2

Almost a year after I released the last version (1.5.3) of the falcon repository manager, beta 1 of version 2 is finally here! In the past months I’ve completely rewritten it, so if you need to manage a repository of .deb files, here’s a good application for you

New features in this release:

  • Scanning code no longer uses apt-ftparchive
  • All internal data is modeled using django, making it very flexible
  • The templates for html indices are als django-based
  • It is translatable!
  • Configuration is now even easier, using an interactive config editor
  • Numerous fixes and improvements
  • The beginning of a plugin system is created (completion in beta 2)
  • Same for an automatic building system (completion in beta 2)
  • You can now easily install single source packages and binaries into the archive
  • Having all data internally cached makes the code much less fragile
  • Support for sha1/sha256 checksums in Packages and Sources files
  • Compis with the new python policy, so compatible with edgy/feisty

Of course all the original features are still there:

  • Support for multiple releases & components
  • GPG signed repository
  • Themable HTML indices
  • No hassle with incoming if you don’t want to use it (but now you can easily use it!)
  • Quick and easy creation of .iso images

Grab a deb at my repo or download the source with bzr from http://blackbird.kaarsemaker.net/code/falcon

Filed under : Ubuntu, Personal, python
By Dennis Kaarsemaker
On July 5, 2007
At 06:11
Comments : 6
 
 

Fun with OpenSSH

OpenSSH is an awesome implementation of the ssh protocol and I use it a lot. However, to connect to hosts at work I sometimes need to traverse many firewalls, using insane ssh configurations such as:

Host foo
ProxyCommand ssh -A host1 ssh -A host2 ssh -A host3 nc %h %p

Which means that connecting to host foo takes a lot of time. Using ControlMaster connections around helps, but then you have to remember to close the shell which is the ControlMaster last (~& helps though, but that’s cheating).

After perusing the ssh(1) and ssh_config(5) manpages (and parts of the OpenSSH source), I whipped up this simple python script that takes away this limitation and also leaves the ControlMaster connection around for future re-use. It also runs ssh-add for you if your agent has no key yet.

It saves me quite a bit of hassle on a daily basis so it could be useful for you as well if you depend on ssh a lot.

You’ll want this in your ~/.ssh/config to enjoy it most:

ForwardAgent yes

ControlMaster auto
ControlPath ~/.ssh/ssh_control_%h_%p_%r
Filed under : Personal, python
By Dennis Kaarsemaker
On June 9, 2007
At 20:21
Comments :1
 
 

(Ab)using django in fun and interesting ways

Django is of course an excellent framework for building web applications. But since it’s quit modular, it is also possible to use only parts of it in non-web products. Being fed up with the cheetah templating engine (which basically reimplements python, and is no fun to use) and sqlobject (where’s the documentation?), I decided that for falcon I would use django’s excellent object-relational mapper and templating engine.

Since I made that switch, hacking on falcon finally became fun again and the next release (albeit beta) is imminent!

But no matter how nice django is, there are some caveats when you want to use and extend django the way I did.

  • You need to call django.conf.settings.configure manually, so I ran into an interesting bootstrapping problem.
  • Changing configuration later needs setattr()
  • Using your own templatetags without actually having what django calls an application is actually simple, but you do need to know how it works: you need a folder foo/templatetags, where foo is in sys.path and in django’s INSTALLED_APPS, then put your tags in foo/templatetags/bar.py
  • Automatically initializing database tables is not a feature. But since getting the creation statements is a feature and access to the database connection is another one, that problem can be solved by looking at the django code, this is how I did it:
from django.core import management
management.disable_termcolors()
all_models = (pocket.Component, pocket.MetaComponent, package.SourcePackage, package.BinaryPackage)
all_sql = []
for model in all_models:
    sql, ref = management._get_sql_model_create(model, all_models)
    all_sql += sql
cursor = connection.cursor()
for s in all_sql:
    cursor.execute(s.replace('CREATE TABLE', 'CREATE TABLE IF NOT EXISTS'))
  • Adding a new field type is surprisingly hard. Sqlobject has a PickleColumn, for which data is automatically pickled. I wanted to add this to django, without modifying django itself. After creating the field type (a subclass of django.db.models.Field), I only got errors. Adding a type mapping to what django calls the creation module, those errors were gone. Automatic pickling is also possible, if you override the get_db_prep_save function. But then it broke, since automatic unpickling is not possible, there is no ‘data thawing’ functionality in django. So I ended up letting the constructors of the models that use the PickleField do this.

After those things were solved, the excellent django documentation helped me write the rest of the surrounding code and falcon now is faster and better than ever. Now to fix the remaining bugs and then release it, it’s been too long since I made a release.

Filed under : Ubuntu, Personal, python
By Dennis Kaarsemaker
On May 28, 2007
At 21:58
Comments : 5
 
 

Jono does love ducks!

Lord Jono Duck Bacon is a liar, I am not the bastard child of James and Scott, and he does fancy ducks.
Jono

I pity the fowl…

Filed under : Ubuntu, Personal
By Dennis Kaarsemaker
On May 10, 2007
At 08:40
Comments :1
 
 

And that makes 7

I’m fixing my moms pc, she’s been infected by a nasty msn worm virus thingie.Fixing it of course means replacing windows with Ubuntu, making the total number of machines running Ubuntu in my apartment (60 m2) seven. Lots of Ubuntu for a small apartment! This is what my work area currently looks like:

Work area

Filed under : Ubuntu, Personal
By Dennis Kaarsemaker
On April 29, 2007
At 18:02
Comments : 3
 
 

Killer app!

My fiancee used to not run Ubuntu on her PC. That of course was suboptimal, so after a lot of convincing she switched to Ubuntu a few weeks ago and so far she felt ok with it. “felt ok”… hmm… I should be able to do better…

Enter the new pc: I installed MPD on it and hooked it up to the stereo. Me playing with sonata on my laptops and glurp on the nokia770 made her curious, so I installed sonata on her PC as well and she’s really liking it. Phase 2 completed, preparing for world domination big_smile.png

Sonata really is the killer app for today!

In other news: next week I’ll be in paris for the first time in over 6 years. Let’s hope my french is still not too rusty.

Filed under : Ubuntu, Personal
By Dennis Kaarsemaker
On April 6, 2007
At 21:52
Comments : 10
 
 

Samba vs MySQL

Q. How to make Samba use a centralized MySQL autentication database without using the built-in samba/mysql things?

A. Since the frontend to the db is a mod_perl app, Use Crypt::SmbPasswd to generate NTLM hashes when passwords are set/changed and patch smbpasswd (well, source/passdb/pdb_get_set.c) so it parses those hashes properly. Evil. EVIL. But hey, it works, and via cron it’s easy to create/delete accounts now Smile

--- pdb_get_set.c.old   2007-02-04 19:59:21.000000000 +0100
+++ pdb_get_set.c       2007-03-29 22:38:07.000000000 +0200
@@ -975,6 +975,18 @@
        if (!plaintext)
                return False;

+    if(strchr(plaintext,':') && (strlen(plaintext) > 50)) {
+        if(!pdb_gethexpwd(plaintext,new_lanman_p16))
+            return False;
+        if(!pdb_gethexpwd(plaintext+33, new_nt_p16))
+            return False;
+        if (!pdb_set_nt_passwd (sampass, new_nt_p16, PDB_CHANGED))
+            return False;
+        if (!pdb_set_lanman_passwd (sampass, new_lanman_p16, PDB_CHANGED))
+            return False;
+    }
+    else {
+
        /* Calculate the MD4 hash (NT compatible) of the password */
        E_md4hash(plaintext, new_nt_p16);

@@ -996,6 +1008,7 @@

        if (!pdb_set_plaintext_pw_only (sampass, plaintext, PDB_CHANGED))
                return False;
+    } /* if (detect NTLM hash) */

        if (!pdb_set_pass_changed_now (sampass))
                return False;
Filed under : Personal
By Dennis Kaarsemaker
On March 29, 2007
At 21:41
Comments :1
 
 

s/old & noisy/newer & quiet/

At work there was a spare desktop-size-but-server-hardware machine which no one was using. *was* using indeed, since it’s now in my kitchen, replacing an old an noisy macine that was my home server until now. It’s damn quiet,even the fridge makes more noise! And the specs are good as wel: p4 2.8 GHz HT, 1 GB ram, 2×80GB SATA.

It’s already running ssh, bind, apache, openvpn, postfix, mpd, apt-cacher and some fresh pbuilder and falcon instances. Now to build a load of feisty packages Smile

Filed under : Ubuntu, Personal
By Dennis Kaarsemaker
On
At 21:30
Comments : 3