LaTeX build server with Git and Hudson on Ubuntu 10.04
I’m currently working on a bigger paper for university using LaTeX. As it’s necessary to compile source files multiple times (especially when using BibTeX or TOCs), build runs can take quite some time. As an example, my current build script:
#!/bin/bash BN=paper pdflatex -interaction=nonstopmode $BN.tex bibtex $BN pdflatex -interaction=nonstopmode $BN.tex bibtex $BN pdflatex -interaction=nonstopmode $BN.tex makeindex -s $BN.ist -t $BN.glg -o $BN.gls $BN.glo pdflatex -interaction=nonstopmode $BN.tex pdflatex -interaction=nonstopmode $BN.tex rm -rf $BN.aux rm -rf $BN.lof rm -rf $BN.lot rm -rf $BN.out rm -rf $BN.toc rm -rf $BN.bbl rm -rf $BN.blg rm -rf $BN.brf rm -rf $BN.idx rm -rf $BN.glo rm -rf $BN.ist rm -rf $BN.glg rm -rf $BN.gls rm -rf texput.log
This is OK on my workstation, but running a build on my notebook using a small 1.4 GHz single core processor can take up to a minute which is definitely too long. So I looked for solutions how to move the build process to a central server. As I was already using Git for source control on the project, I tried setting up a remote repository on the server which triggered a build using a post-receive script. This basically worked fine, but I wanted to go a step further. I had a look at CI servers and gave Hudson a try as it seems to have a lot of features while being quite easy to set up.
The result is the following: Hudson is polling the Git repository (can be remote or local, in my case it’s a self-hosted remote gitosis installation, but could be github too), starting a new build on changes and publishing the resulting PDF if successful. Hudson is accessible over https using an Apache2 server as frontend to a Tomcat installation.
Ready? Let’s go.
Thunderbird + Lightning on Ubuntu 9.10: unable to add new calendar
Just tried to setup Thunderbird + Lightning on Ubuntu Karmic, but somehow I couldn’t add a new calendar as the field was greyed out. Solution: install libstdc++5 (here from the Debian Lenny repository), un- and reinstall lightning and you’re good to go.
Set up symfony 1.2 on Debian/Ubuntu
Just wanted to give symfony a try and ran into some issues to set it up the way I wanted. Therefore I’d like to note the required steps.
First, install symfony via PEAR.
pear channel-discover pear.symfony-project.com pear install symfony/symfony-1.2.4
This sould install symfony and make the symfony executable available in your PATH.
~$ symfony -V symfony version 1.2.4 (/usr/share/php/symfony)
Create a directory for your vhost and create a new project.
mkdir /var/www/myproject cd /var/www/myproject symfony generate:project myproject
Create an example application in your project.
symfony generate:app frontend
Link the symfony resources to the project’s document root.
cd web ln -s /usr/share/php/data/symfony/web/sf/
This should get you up and running with symfony. You just need to configure your server for the vhost. For personal preference, I’d like to have my document root directory named public instead of web. The following steps are needed to achive this.
Rename the document root directory.
mv web public
Add this line to config/ProjectConfiguration.class.php:
<?php public function setup() { $this->setWebDir($this->getRootDir() . '/public'); // for compatibility / remove and enable only the plugins you want $this->enableAllPluginsExcept(array('sfDoctrinePlugin', 'sfCompat10Plugin')$ }
Debootstrap a Ubuntu Hardy DomU on a Debian Etch Xen Dom0
Lately, I wanted set up a Ubuntu Hardy DomU on an existing Debian Etch Dom0 box. Usually, setting up Debian-based DomUs is very simple with xen-create-image and debootstrap (there are tons of tutorials out there dealing with this topic), but unfortunately Etch’s version of debootstrap doesn’t support Ubuntu Hardy. I spent a surprisingly long time on searching the net until I found a solution for this problem on a french site: Installer et configurer Xen sur Debian 4.0 Etch (it’s a complete howto for Xen on Debian Etch, but it deals with the Hardy part too). The author created a backport of the debootstrap package, which enables you to debootstrap Hardy.
First, you have to create the hardy.d directory (symlink) for xen-tools.
$ cd /usr/lib/xen-tools $ ln -s ubuntu.d hardy.d
There’s a debian repository holding the backport package, however I got problems to use that repository on an amd64 box, so I downloaded and installed the package manually.
$ wget http://falcon.landure.fr/pool/etch/debootstrap/debootstrap_1.0.10_all.deb $ dpkg -i debootstrap_1.0.10_all.deb
Now you should be able to debootstrap a Hardy DomU.
$ xen-create-image --hostname=hardy --ip=xxx.xxx.xxx.xxx --size=5Gb --memory=256Mb --dist=hardy --mirror=http://archive.ubuntu.com/ubuntu/
Use VPN connections in network-manager-pptp without rebooting
When configuring VPN connections in Ubuntu through network-manager-pptp the connections don’t get displayed until a reboot due to a bug. In the bugtracker I found a solution which makes the connections available without a reboot.
First, restart dbus
sudo /etc/init.d/dbus restart
Then run the NetworkManager applet by opening a command window with ALT+F2 and typing in nm-applet.
Quick and dirty: set up a local PHP and Ruby development environment on Ubuntu Hardy Heron (8.04)
This is a quick and dirty tutorial how to set up a local development stack on a fresh Ubuntu Hardy Heron (8.04) install.
Here is what we will install:
- Apache 2.2
- PHP 5 as apache module
- Ruby 1.8 as apache module & Rails 2.0.2
- MySQL 5
- phpMyAdmin
My Perfect Desktop – Ubuntu 8.04 (aka pimp your desktop)
Da ich mit Erscheinen der Final von Ubuntu Hardy (8.04) mein System nochmal komplett neu eingerichtet habe, schreibe ich hier mal eine kleine Zusammenfassung. Was heraus kommt ist ein System für Office, Entwicklung, Multimedia und alles andere, was man so machen will ;-) . Wie der Titel schon vermuten lässt, habe ich als Basis die “Perfect Desktop” Serie von HowtoForge genommen, in diesem Fall konkret The Perfect Desktop – Ubuntu 8.04 LTS (Hardy Heron). In dem HowTo sind noch einige Sachen angeführt, die ich nicht verwendet habe, es lohnt sich also, da auch mal reinzuschauen.
Medibuntu in Ubuntu 8.04
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
Ruby On Rails auf Ubuntu 8.04
Ich wollte soeben auf meinem frisch installierten Ubuntu 8.04 folgendermaßen Ruby On Rails installieren, um mal wieder zu versuchen, mich darin einzuarbeiten ;-)
maff@mafftop:~$ sudo apt-get install ruby rubygems irb ri rdoc > ruby1.8-dev build-essential maff@mafftop:~$ sudo gem install rails --include-dependencies
Die Installation der Pakete über apt verlief gewohnt problemlos, aber gems erwartete mich mit einer netten Fehlermeldung:
maff@mafftop:~$ sudo gem install rails --include-dependencies
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository
Hmm, komisch. Gerade Rails wird nicht gefunden? Das kanns doch fast nicht sein. Also hab ich ein bisschen gesucht und einen Post gefunden, der das Problem beheben soll. Also hab ich mal schön Schritt für Schritt alles nachgemacht :-) Durch ein gem env wird das Installationsverzeichnis von gems ausgespuckt, in dem der cache-Pfad gelöscht werden soll:
maff@mafftop:~$ sudo gem env
RubyGems Environment:
- VERSION: 0.9.4 (0.9.4)
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- GEM PATH:
- /var/lib/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org
maff@mafftop:~$ sudo rm -f /var/lib/gems/1.8/source_cache
Ok, und nun? Ein erneuter Versuch, rails zu installieren scheiterte mit der selben Fehlermeldung. Also hab ichs mit einem Update von gems versucht:
maff@mafftop:~$ sudo gem update Updating installed gems... Bulk updating Gem source index for: http://gems.rubyforge.org Gems: [] updated
Et voilà:
maff@mafftop:~$ sudo gem install rails --include-dependencies INFO: `gem install -y` is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed rake-0.8.1 Successfully installed activesupport-2.0.2 Successfully installed activerecord-2.0.2 Successfully installed actionpack-2.0.2 Successfully installed actionmailer-2.0.2 Successfully installed activeresource-2.0.2 Successfully installed rails-2.0.2 7 gems installed Installing ri documentation for rake-0.8.1... Installing ri documentation for activesupport-2.0.2... Installing ri documentation for activerecord-2.0.2... Installing ri documentation for actionpack-2.0.2... Installing ri documentation for actionmailer-2.0.2... Installing ri documentation for activeresource-2.0.2... Installing RDoc documentation for rake-0.8.1... Installing RDoc documentation for activesupport-2.0.2... Installing RDoc documentation for activerecord-2.0.2... Installing RDoc documentation for actionpack-2.0.2... Installing RDoc documentation for actionmailer-2.0.2... Installing RDoc documentation for activeresource-2.0.2...
Jetzt gehts ans Doku und Tutorials lesen ;-)

I just discovered “Quickstart”, the swiss army knife for Ubuntu which is a handy little tool for different tasks. For more information see