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?

2

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).

  • 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 '12 at 10:05

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.