comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Using Debian Ada packages on Ubuntu
Date: Sat, 27 Feb 2010 04:06:21 -0800 (PST)
Date: 2010-02-27T04:06:21-08:00	[thread overview]
Message-ID: <82c35cad-d16c-48e0-a1a4-520b504778c2@c16g2000yqd.googlegroups.com> (raw)
In-Reply-To: 4c59d9cd-fc2d-49ca-ab23-422c329104cb@m37g2000yqf.googlegroups.com

Rolf wrote:
> 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?

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.



  reply	other threads:[~2010-02-27 12:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-27 10:27 Using Debian Ada packages on Ubuntu Rolf
2010-02-27 12:06 ` Ludovic Brenta [this message]
2010-02-28 17:37   ` Rolf
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox