Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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