public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Joost Roeleveld <joost@antarean.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Hoping someone can help explain distcc to me
Date: Sun, 21 Aug 2011 15:53:15 +0200	[thread overview]
Message-ID: <1522485.Prk91GPbbn@eve> (raw)
In-Reply-To: <201108211041.56704.peter@humphrey.ukfsn.org>

On Sunday, August 21, 2011 10:41:56 AM Peter Humphrey wrote:
> On Sunday 21 August 2011 04:04:05 Matthew Finkel wrote:
> > On Sat, Aug 20, 2011 at 10:46 PM, Dale <rdalek1967@gmail.com> wrote:
> > > How hard is it to set up a 64 bit machine to compile programs for a
> > > 32
> > > bit system?
> > > 
> > > Dale
> > > 
> > > :-)  :-)
> > 
> > It's actually quite easy. IIRC, when I did it last, the only difference
> > is that when you chroot into the subsystem you need prefix the command
> > with linux32, e.g. linux32 chroot /path/to/chroot /bin/bash
> 
> Yes, just follow this guide:
> http://www.gentoo.org/proj/en/base/amd64/howtos/chroot.xml
> 
> I did that and it was straightforward as far as I remember. I did spend some
> time thinking at a few stages, to get an understanding of what I was doing
> rather than just blindly following somebody else's prescription.
> 
> Then it's a matter of writing some simple scripts to mount the packages
> directory on the big host. Here's mine, most of which I scrounged from
> somewhere:
> 
> $ cat /etc/init.d/atom
> #!/sbin/runscript
> 
> depend() {
>    need localmount
>    need bootmisc
> }
> 
> start() {
>     ebegin "Mounting 32-bit chroot dirs"
>     mount -o bind /dev /mnt/atom/dev >/dev/null
>     mount -o bind /dev/pts /mnt/atom/dev/pts >/dev/null
>     mount -o bind /dev/shm /mnt/atom/dev/shm >/dev/null
>     mount -t proc /proc /mnt/atom/proc >/dev/null
>     mount -o bind /sys /mnt/atom/sys >/dev/null
>     mount -o bind /tmp /mnt/atom/tmp >/dev/null
>     mount -t nfs -o vers=3 192.168.2.2:/usr/portage/packages
> /mnt/atom/usr/portage/packages
>     eend $? "An error occurred while attempting to mount 32-bit chroot
> directories"
>     ebegin "Copying 32-bit chroot files"
>     cp -pf /etc/resolv.conf /mnt/atom/etc/ >/dev/null
>     cp -pf /etc/passwd /mnt/atom/etc/ >/dev/null
>     cp -pf /etc/shadow /mnt/atom/etc/ >/dev/null
>     cp -pf /etc/group /mnt/atom/etc/ >/dev/null
>     cp -pf /etc/hosts /mnt/atom/etc/ > /dev/null
>     cp -Ppf /etc/localtime /mnt/atom/etc/ >/dev/null
>     eend $? "An error occurred while attempting to copy 32-bit chroot
> files." }
> 
> stop() {
>     ebegin "Unmounting 32-bit chroot dirs"
>     umount -f /mnt/atom/dev/pts >/dev/null
>     umount -f /mnt/atom/dev/shm >/dev/null
>     umount -f /mnt/atom/dev >/dev/null
>     umount -f /mnt/atom/proc >/dev/null
>     umount -f /mnt/atom/sys >/dev/null
>     umount -f /mnt/atom/tmp >/dev/null
>     umount -f /mnt/atom/usr/portage/packages >/dev/null
>     eend $? "An error occurred while attempting to unmount 32-bit chroot
> directories"
> }
> 
> I could list the steps of my daily routine to upgrade both the client and
> the chroot if that would help.

That would help as I'm planning on setting this up myself as well for my 
netbook.

Is there a way to automate the steps inside the chroot without having to have 
a script inside the chroot?

--
Joost



  reply	other threads:[~2011-08-21 13:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20 22:56 [gentoo-user] Hoping someone can help explain distcc to me Paul Hartman
2011-08-21  0:35 ` Peter Humphrey
2011-08-21  1:08   ` Paul Hartman
2011-08-21  1:58     ` Peter Humphrey
2011-08-21  2:46       ` Dale
2011-08-21  3:04         ` Matthew Finkel
2011-08-21  9:41           ` Peter Humphrey
2011-08-21 13:53             ` Joost Roeleveld [this message]
2011-08-21 16:27               ` Peter Humphrey
2011-08-21 17:42               ` Neil Bothwick
2011-08-24 11:04             ` Dale
2011-08-21  1:34 ` victor romanchuk
2011-08-21 10:38   ` Alex Schuster
2011-08-21 14:39     ` victor romanchuk
2011-08-22 20:41       ` Alex Schuster
2011-08-22 22:36         ` Bill Longman
2011-08-22 22:41         ` Bill Longman
2011-08-22 19:47 ` [gentoo-user] " Paul Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1522485.Prk91GPbbn@eve \
    --to=joost@antarean.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox