Dariusz on Software Quality & Performance


Setting up trac on Debian

Filed under: en — Tags: , — dariusz.cieslak @

Trac is an issue tracking system with integrated Wiki that is highly customisable and offers big flexibility. One can use it to handle software projects (but it's not the only application for such type of system).

Having correctly pre-packaged version for your operating system is an advantage – you can setup it more quickly by reusing predefined environment and matching software versions.

OS packages installation

First of all, let's install some basic OS packages on Debian wheezy.

# apt-get install apache2
# apt-get install trac
# apt-get install libapache2-mod-python
# apt-get install trac-wysiwyg
# apt-get install trac-subtickets

We have installed the HTTP server software,  the trac itself (will all dependencies handled by OS packaing system), Apache2 module to run Python scripts server-side, wysiwyg plugin (sometimes it's just easier to edit tables in WYSIWYG mode) and subtickets capability (allows to make hierarchical tickets).



Chrooted Debian / Ubuntu mini HOWTO

Filed under: en — Tags: , — dariusz.cieslak @

First question: why do you need local Debian-based install inside your Debian distro? Sometimes you want to check some experimental packages and don't want to break your base system or start some service in isolated environment without virtualisation effort. Then chroot comes as an effective solution for you!

First of all you have the debootstrap program that is used to do all the job you need:

sudo apt-get install debootstrap

Then you select your favourite distro version and download URL:

sudo debootstrap –arch i386 squeeze /home/debian-chroot http://ftp.debian.org/debian

And you jump to your newly-installed system:

sudo chroot /home/debian-chroot

And: voila! Done!


Downgrade Ubuntu/Debian using apt preferences

Filed under: en — Tags: — dariusz.cieslak @

There are people who prefer bleeding-edge software versions, other prefer stability over new features. I'm an advanced Linux user, however I fall into the latter category of users. Recently I discovered my current mixed-version Ubuntu is not as stable as I would like and I decided to revert to older version of Ubuntu (lucid).

Debian apt system allows to set preferences for packages and this method can be used to downgrade packages. First of all you have to declare sources of software of desired distro (lucid) in my case:

$ grep ^deb /etc/apt/sources.list
deb http://pl.archive.ubuntu.com/ubuntu/ lucid main restricted
deb http://pl.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb http://pl.archive.ubuntu.com/ubuntu/ lucid universe
deb http://pl.archive.ubuntu.com/ubuntu/ lucid-updates universe
deb http://pl.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://pl.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb http://security.ubuntu.com/ubuntu lucid-security universe
deb http://security.ubuntu.com/ubuntu lucid-security multiverse

Then we can declare we prefer lucid even if current package in the system if newer:

$ cat /etc/apt/preferences.d/downgrade-to-lucid
Package: *
Pin: release a=lucid
Pin-Priority: 1010

Package: *
Pin: release a=lucid-updates
Pin-Priority: 1011

Package: *
Pin: release a=lucid-security
Pin-Priority: 1012

As you can see I added updates and security source pacages into account to have such updates already in my system.


Configure locales under Ubuntu

Filed under: en — Tags: , , — dariusz.cieslak @

If you used to Debian you probably know that "dpkg-reconfigure locales" brings you locale selection tool. It's not the case for Ubuntu. How to replace Debian's behavior? Read below:

# grep pl_PL.UTF-8 /usr/share/i18n/SUPPORTED > /var/lib/locales/supported.d/local
# dpkg-reconfigure locales
   Generating locales...
     pl_PL.UTF-8... done
   Generation complete.

Above example show how to add pl_PL.UTF-8 locale.


Building packages from sources using Debian/Ubuntu

Filed under: en — Tags: , — dariusz.cieslak @

Sometimes you want to install latest version of selected software package while keeping base system stable. Then installing from source is a safe option to proceed.

First, you have to include sources from fresh system version, below is example taken from Ubuntu, I selected natty (/etc/apt/sources.list):

deb-src http://pl.archive.ubuntu.com/ubuntu/ natty main restricted

Then you should refresh package list:

sudo apt-get update

and install dependencies:

sudo apt-get build-dep ccache

and finally build the new version of a package (note that no root account is needed for that step):

apt-get -b source ccache

As a result there's a *.deb package, install it:

sudo dpkg -i ccache*.deb

That's all!

Older Posts »

Powered by WordPress