Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Hoping someone can help explain distcc to me
Date: Sun, 21 Aug 2011 09:43:59
Message-Id: 201108211041.56704.peter@humphrey.ukfsn.org
In Reply to: Re: [gentoo-user] Hoping someone can help explain distcc to me by Matthew Finkel
1 On Sunday 21 August 2011 04:04:05 Matthew Finkel wrote:
2
3 > On Sat, Aug 20, 2011 at 10:46 PM, Dale <rdalek1967@×××××.com> wrote:
4 > > How hard is it to set up a 64 bit machine to compile programs for a 32
5 > > bit system?
6 > >
7 > > Dale
8 > >
9 > > :-) :-)
10 >
11 > It's actually quite easy. IIRC, when I did it last, the only difference
12 > is that when you chroot into the subsystem you need prefix the command
13 > with linux32, e.g. linux32 chroot /path/to/chroot /bin/bash
14
15 Yes, just follow this guide:
16 http://www.gentoo.org/proj/en/base/amd64/howtos/chroot.xml
17
18 I did that and it was straightforward as far as I remember. I did spend some
19 time thinking at a few stages, to get an understanding of what I was doing
20 rather than just blindly following somebody else's prescription.
21
22 Then it's a matter of writing some simple scripts to mount the packages
23 directory on the big host. Here's mine, most of which I scrounged from
24 somewhere:
25
26 $ cat /etc/init.d/atom
27 #!/sbin/runscript
28
29 depend() {
30 need localmount
31 need bootmisc
32 }
33
34 start() {
35 ebegin "Mounting 32-bit chroot dirs"
36 mount -o bind /dev /mnt/atom/dev >/dev/null
37 mount -o bind /dev/pts /mnt/atom/dev/pts >/dev/null
38 mount -o bind /dev/shm /mnt/atom/dev/shm >/dev/null
39 mount -t proc /proc /mnt/atom/proc >/dev/null
40 mount -o bind /sys /mnt/atom/sys >/dev/null
41 mount -o bind /tmp /mnt/atom/tmp >/dev/null
42 mount -t nfs -o vers=3 192.168.2.2:/usr/portage/packages
43 /mnt/atom/usr/portage/packages
44 eend $? "An error occurred while attempting to mount 32-bit chroot
45 directories"
46 ebegin "Copying 32-bit chroot files"
47 cp -pf /etc/resolv.conf /mnt/atom/etc/ >/dev/null
48 cp -pf /etc/passwd /mnt/atom/etc/ >/dev/null
49 cp -pf /etc/shadow /mnt/atom/etc/ >/dev/null
50 cp -pf /etc/group /mnt/atom/etc/ >/dev/null
51 cp -pf /etc/hosts /mnt/atom/etc/ > /dev/null
52 cp -Ppf /etc/localtime /mnt/atom/etc/ >/dev/null
53 eend $? "An error occurred while attempting to copy 32-bit chroot files."
54 }
55
56 stop() {
57 ebegin "Unmounting 32-bit chroot dirs"
58 umount -f /mnt/atom/dev/pts >/dev/null
59 umount -f /mnt/atom/dev/shm >/dev/null
60 umount -f /mnt/atom/dev >/dev/null
61 umount -f /mnt/atom/proc >/dev/null
62 umount -f /mnt/atom/sys >/dev/null
63 umount -f /mnt/atom/tmp >/dev/null
64 umount -f /mnt/atom/usr/portage/packages >/dev/null
65 eend $? "An error occurred while attempting to unmount 32-bit chroot
66 directories"
67 }
68
69 I could list the steps of my daily routine to upgrade both the client and
70 the chroot if that would help.
71
72 --
73 Rgds
74 Peter Linux Counter 5290, 1994-04-23

Replies

Subject Author
Re: [gentoo-user] Hoping someone can help explain distcc to me Joost Roeleveld <joost@××××××××.org>
Re: [gentoo-user] Hoping someone can help explain distcc to me Dale <rdalek1967@×××××.com>