Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using Debian Ada packages on Ubuntu

10 views
Skip to first unread message

Rolf

unread,
Feb 27, 2010, 5:27:55 AM2/27/10
to
I recently purchased an Eee PC (nice little gadget!). It didn't take
long to install Eeebuntu on it, a special edition of Ubuntu 9 for the
Eee PC. As others have already reported, the Ada packages on Ubuntu
are not as nice as the original ones available for Debian.

Is there a way to install the Debian Ada packages on an Ubuntu system?
Any experience or hints?

Rolf

Ludovic Brenta

unread,
Feb 27, 2010, 7:06:21 AM2/27/10
to

I'd suggest creating a chroot and installing Debian in it, then do all
your programming work in the chroot. The procedure is a little
involved if you do it for the first time, but then it is very stable.
I have been using this for years; mu main system runs Debian a 64-bit
testing and my chroots run unstable in 32-bit and 64-bit mode
respectively.

First, install the package debootstrap then read the man page
debootstrap(8). The manual page has a complete example of how to
create a sid (unstable) chroot. You can adjust this to a testing or
stable chroot, at your option.

Second, bind-mount your home directory and mount the /proc, /sys and /
dev/pts pseudo-filesystems in the chroot. You do this by adding lines
to /etc/fstab in your main system and then saying "mount -a" in your
main system as root; here is an excerpt from my own top-level /etc/
fstab:

# unstable
proc /chroot/unstable/proc proc defaults 0 0
none /chroot/unstable/dev/pts devpts defaults 0 0
/var/tmp /chroot/unstable/tmp tmpfs bind 0 0
/home /chroot/unstable/home xfs bind 0 0

Third, copy /etc/passwd, /etc/shadow, /etc/group, /etc/passwd-, /etc/
shadow- and /etc/group- to /chroot/debian/etc to replicate the user
accounts from the main system to the chroot.

Fourth, install the package schroot in your top-level system.
Configure schroot to grant access to the chroot to select non-root
user. Here is an excerpt from my own /etc/shcroot/schroot.conf:

[unstable]
description=Debian sid (amd64)
directory=/chroot/unstable
priority=3
groups=src
aliases=sid,default

Note that my user account belongs to the group "src" in /etc/group;
all members of this group have access to the chroot.

Fifth and last, as your normal user account, do:

$ schroot

(to start a shell in the Debian chroot), or

$ schroot -- aptitude

to start a command (in this case, aptitude) in the chroot.

I routinely run emacs in my main system and launch compilations with M-
x compile and a command such as:

$ schroot -- dpkg-buildpackage -uc -us
or
$ schroot -- gnatmake -P<package>

If you want to run GUI programs (such as gnat-gps) from the chroot,
simply export DISPLAY=:0 so they can see the X server running in your
main system.

HTH

--
Ludovic Brenta.

Rolf

unread,
Feb 28, 2010, 12:37:51 PM2/28/10
to
Merci beaucoup, Ludovic.

Thanks to your detailed step-by-step description I got it working in
the first try.

Rolf

0 new messages