Chroots 0.2 - First Public release

Posted on December 10th, 2008 in Code, Linux, Ubuntu

Chroots

Chroots is a collection of bash scripts to create, maintain, manage and use several chroot environments on debian based systems. It sports such features as privilege drop, multiple chroot maintenance and caching.

This is the first public release, under GPLv3. The software is now in a state where I can use it every day to maintain chroots. To download the source code, use the link below. There is also a git repository available for cloning. Chroots is developed under Ubuntu, and can build debian and Ubuntu chroots through deboostrap.

 

Source Code: chroots-0.2.tar.gz
Git Repositoryhttp://git.digitalself.org/?p=chroots.git

 

If anyone finds this useful, don’t hesitate to drop a comment with suggestions or feedback. I’m looking forward to it. Bug reports are nice, and will be handled. More information about chroots below, and inside the source package. In time, I might put up a page for the project. In the meantime, enjoy this release.

 

About Chroots

 

Chroots is a set of wrapper scripts aroundĀ  debootstrap. debootstrap is an effective way of create a general purpose build environment. While it is fairly simple to setup a working environment, it’s always necessary to perform several steps to actually login into a deboostrapped environment using chroot. It can be a cumbersome task, hence chroots.

For test building packages there is already pbuilder. What pbuilder does is build a debian package in a freshly created chroot environment. This allows detecting build and dependency errors quite effectively. Nevertheless, to use pbuilder, an environment is setup every time and out of the user’s reach, and it is quite a difficult tool to use for the occasional packaging experiment.

This is where chroots comes in. It allows to easily configure setup and deploy a chroot environment, enabling everything from package tests to dependency check, or manual tarball compilation, keeping your production environment ‘clean’. It allows to maintain several chroot environments at the same time, so that it can be easy to test multiple systems.

GLUA Tech Sessions

Posted on November 3rd, 2008 in Linux

I was a part of GLUA, my university’s Linux User Group, for many years. But, I must confess that I’ve never been this excited about an event organised by the group like I am for this one. Not even when I was organising them. GLUA Tech Sessions promises to be entertaining, enjoyable and educative, covering topics which are dear to me. So here is the plug, if you are around Aveiro, Portugal next weekend, drop by:

Glua Tech Sessions

ffmpeg with xvid, h264 and libfaac on Ubuntu Intrepid

Posted on October 31st, 2008 in Linux, Ubuntu

I haven’t blogged for a while now, guess I need a new redesigned template, which seems to boost my blogging ability. But here is a simple and short guide to build ffmpeg with the appropriate codecs to encode stuff for the PSP or iPod. These codecs aren’t enabled by default to legal (patent) issues.

You should have the medibuntu repository enabled for this to work.

Get some tools to build tje package along with the ffmpeg source in Ubuntu Intrepid. Then get the appropriate packages to build ffmpeg, and satisfy the evil codec dependencies:

apt-get install dpkg-dev devscripts
apt-get source ffmpeg
apt-get build-dep ffmpeg
apt-get install libmp3lame-dev libfaac-dev libxvidcore4-dev libx264-dev

To finished up, go into the sources directory, build the package with the external codecs and install everything after it finishes building the debian package. Note that the first command is optional, and is just to bump the package version so that is “newer” that the original repositories:

dch -i
DEB_BUILD_OPTIONS=externalcodecs dpkg-buildpackage -rfakeroot -us -uc
dpkg -i *.deb

And that is it. Look for scripts that use ffmpeg to encode stuff for the PSP or iPod. There are plenty around. I’ll post my favourite at a later time.

What does l10n, i18n or m4 mean ?

Posted on August 27th, 2008 in Code, Linux, Monkey Business

I have never understood what l10n stands for, nor i18n, nor m4 for that matter. But reading a good online book about autotools, there are a couple of words explaining that in fact m4 stands for Macro, which is m+4 chars. l10n is localization written asĀ  “l+strlen(ocalizatio)+n”. Fun. Since I was on vacations while I read this, I had time to write a bash script to do this automatically while enhancing my bash skills. Here is the script:

#!/bin/bash

STRING=$1
STRLEN=${#STRING}

A=${STRING:1:$STRLEN-2}
echo ${STRING:0:1}${#A}${STRING:$STRLEN-1:$STRLEN-1}

Try running internationalization on it.

Howto Tracks GTD on Ubuntu Hardy

Posted on August 4th, 2008 in Ubuntu

As I (re)evaluate my GTD workflow, I’ve been testing a couple of applications that may help me increase my productivity while becoming a distraction or burden to manage. The next one on my list is Tracks. I decided to put forward a quick howto because it might not be that trivial for some users to git this running with Ruby on Rails.

So tracks going on your Ubunty Hardy you just need to install a few packages, most importantly ruby, ruby gems and sqlite 3 support. Then you just need to enable the sqlite3 gem for Ruby on Rails. Copy paste commands below:

sudo apt-get install rake rubygems libsqlite3-ruby
sudo gem install sqlite3-ruby

Then just follow the instructions on the tracks website. But, if your are lazy as me you can just copy paste the information below, which is a nice quick cheat sheet:

Get tracks, unzip into a folder. Go into that folder and edit the configuration file, making it look like the example shown here for sqlite3:

gedit config/database.yml
development:
adapter: sqlite3
database: db/tracks-dev.db

test:
adapter: sqlite3
database: ":memory:"

production:
adapter: sqlite3
database: db/tracks-main.db

Change a variable in config/environment.rb by putting whatever in it:

gedit config/environment.rb
SALT = "MakeThisYourRandomPhraseToGenerateSalt"

Build it:

rake db:migrate RAILS_ENV=production

Run it:

./script/server -e production

And that’s it, you should just be able to point your browser at http://localhost:3000 and give it a try. I personally don’t think that Tracks is my cup of tee, but it’s worth a shot.

One a side note, this is probably my last post before my summer break, so I’ll be back in a couple of weeks, I hope.