How to get feisty running in a chroot for PiTiVi development on ubuntu 6.10

Sponsored Link
PiTiVi is an open source video editor, written in Python and based on GStreamer and GTK+.

After trying to compile gstreamer by hand proved to be too complicated. A chroot is a good way to use programs from an unstable release, because it allows you to install just the programs you want, and it lets you stick with stable versions of critical software. Ubuntu's feisty fawn unstable branch has the lastest release of gstreamer.This guide assumes you're running ubuntu or debian.

When you see $ it means the following should be entered at the shell prompt. # indicates the commands need to be run as root. (chroot) indicates that you are working in the chroot.

First we need to create our chroot environment. Debootstrap is a program that installs a minimal debian system from a network repository. Do the following in a terminal emulator:

$ sudo -s
# apt-get install debootstrap dchroot
# mkdir /chroot
# echo "feisty /chroot" > /etc/dchroot.conf # file did not exist
# debootstrap -arch i386 feisty /chroot/ http://archive.ubuntu.com/ubuntu

Now we need to add some sources to configure apt, so that we can install the rest of the sytstem

edit /chroot/apt/sources.list, and add the following lines

deb http://archive.ubuntu.com/ubuntu feisty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu feisty main restricted universe multiverse

# chroot /chroot
(chroot) # apt-get update
(chroot) # apt-get upgrade #note: this step did nothing
(chroot) # exit

Now we need to copy some important files into the chroot

# cp /etc/passwd /chroot/etc/
# cp /etc/shadow /chroot/etc/
# cp /etc/group /chroot/etc/
# cp /etc/sudoers /chroot/etc/
# cp /etc/hosts /chroot/etc/

Now add the following lines to /etc/fstab (this is so that these mount points will be added inside the chroot as well)

home /chroot/home none bind 0 0
/tmp /chroot/tmp none bind 0 0
/dev /chroot/dev none bind 0 0
/proc /chroot/proc proc defaults 0 0

I skipped adding these two lines, since i wasn't sure if they were the right thing to do.

/media/cdrom0 /chroot/media/cdrom0 none bind 0 0

/usr/share/fonts /chroot/usr/share/fonts none bind 0 0

Now do the following to activate those new mount points. (This will happen automatically the next time you reboot).

# mount -a

Turns out locales are not created automatically in ubuntu . The next group of commands sets up locales in your chroot (required for using pitivi)

# dchroot -d
(chroot)# echo "en_US.UTF-8 UTF-8" > /var/lib/locales/supported.d/local
(chroot)# locale-gen
(chroot)# dpkg-reconfigure locales

Now we want to install the pitivi's dependencies. The easiest way to do that is install pitivi itself (you can remove it later if you don't want it).

(chroot)# apt-get install pitivi
(chroot)# apt-get build-dep pitivi
(chroot)# exit
# exit

Now you should have a working chroot with the feisty version of pivitivi and everything required to build it. To run pivitivi in the chroot, you can do

$ dchroot -d
$ pivitivi

Source from here

Sponsored Link

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *