sm-grimoire AT lists.ibiblio.org
Subject: Discussion of Spells and Grimoire items
List archive
- From: Mads Laursen <dossen+sgl AT daimi.au.dk>
- To: Discussion of Spells and Grimoire items <sm-grimoire AT lists.ibiblio.org>
- Subject: Re: [SM-Grimoire] kernel2.{4,6}
- Date: Sat, 29 Nov 2003 02:58:46 +0100
On 27/11/03 17.46, Sergey A. Lipnevich wrote:
> Arwed von Merkatz wrote:
>
> >>3. modify sorcery to check for the KERNEL2.4 tag ( as was done for
> >>USEGCC2) and and make
> >> /usr/src/inux -> /usr/src/linux-2.4
> >>for the duration of the cast, resetting it afterwards if necessary.
> >>
> >>
> Won't work for simultaneous casts. Unless there's a way to use chroot or
> something for this.
>
I theory one could do something like this (WARNIGN, UNTESTED CODE/2.30AM!):
mkdir -p /usr/src/chroot-$SPELL
mkdir -p /usr/src/src-$SPELL
mkdir -p /usr/src/src-$SPELL/linux-rigth-version
mount --bind / /usr/src/chroot-$SPELL
mount --bind /usr/src/src-$SPELL /usr/src/chroot-$SPELL/usr/src
mount --bind /usr/src/linux-$KERNEL_VERSION/
/usr/src/chroot-$SPELL/usr/src/linux-rigth-version
chroot /usr/src/chroot-$SPELL run_cast_in_chroot $ARGS
cleanup_mounts_and_dirs
OK, I did try just doing the mounts, just to see. The tree looks
alright. Might want to bind a few more key dirs into the make-believe
tree, to handle stuff like /tmp on other partition or
/var/spool/sorcery on nfs or whatever. Or look into mount --rbind.
And then we need to make the cast continue in the chroot, but that
should not be too hard (I guess ;-)).
The big trick is to get the whole of the tree in a subdir, put a clean
/usr/src into the subtree, and then populate it with just what is
needed (with mounts, since soft-links aren't nice with chroot).
It is doable, but should it be in sorcery? First step might be for
someone to flesh out the above code into a script, so one could
cast_in_chroot --kernel 2.4.22 strace
or something?
/dossen
Attachment:
pgp80USlJp6U_.pgp
Description: PGP signature
-
[SM-Grimoire] kernel2.{4,6},
Treeve Jelbert, 11/27/2003
-
Re: [SM-Grimoire] kernel2.{4,6},
Arwed von Merkatz, 11/27/2003
-
Re: [SM-Grimoire] kernel2.{4,6},
Sergey A. Lipnevich, 11/27/2003
- Re: [SM-Grimoire] kernel2.{4,6}, Mads Laursen, 11/28/2003
-
Re: [SM-Grimoire] kernel2.{4,6},
Sergey A. Lipnevich, 11/27/2003
-
Re: [SM-Grimoire] kernel2.{4,6},
Arwed von Merkatz, 11/27/2003
Archive powered by MHonArc 2.6.24.