3

I have an program source (Remmina) and want to install it to chroot environment. Remmina uses cmake system.

I can install it to chroot using:

sudo make install DESTDIR=mychroot

but this is not nice method because I need to make sure the chrooted system meets all requirements (dependencies). I think the best idea is to create deb package and then install it under chroot. But how?

Oh I forgot to tell that I am using bazaar (with git plugin) and saw there is buildpackage plugin to build debs. Maybe this way would be better?

Any idea?

1 Answer 1

3

If you're not short of a bit of space, you could use debootstrap to install a minimal complete OS in your chroot. This then makes apt available in your chroot.

To start with:

sudo apt-get install debootstrap

To setup a new chroot:

sudo debootstrap oneiric /path/to/chroot
sudo chroot /path/to/chroot /bin/bash

Voila, you're in a new minimal Ubuntu installation. apt-get will work from here. So now you could even install gcc/make et al, and do your entire make install in the chroot, which should pretty much guarantee the end result will work properly (all the libs will be present and so forth).

There's a few other steps you should do like setting up /proc in the fstab in the chroot, see the debootstrap manpage (under EXAMPLES).

1
  • I have my own debootstrap installation but I don't want to install all the needed sources there. I wan't update program source and install into the chroot. I have apt under chroot but I don't have package (only source files).
    – marcinpz
    Feb 20, 2012 at 10:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .