ALFS again & again & ...

Mark Ellis mark.uzumati at virgin.net
Fri Aug 23 00:47:38 PDT 2002


On 2002.08.22 23:20 Vassili Dzuba wrote:
> On Thu, 22 Aug 2002 12:26:59 +0000 (UTC)
> mark.uzumati at virgin.net (Mark Ellis) wrote:
> 
> >
> > Got a 5% completed xslt stylesheet to convert ALFS profiles to bash
> > scripts. Expand time for me and one day i may actually finish it :)
> >
> > Mark
> > --
> > Unsubscribe: send email to listar at linuxfromscratch.org
> > and put 'unsubscribe alfs-discuss' in the subject header of the
> message
> >
> 
> 
> Hi,
> 
> For the fun, I tried another approach, that is patching nALFS to make
> it put the commands
> in a file instead of executing them. That has the advantage that we
> can use the UI of nALFS
> to select some packages to be compiled, for instance.
> 

Good plan.

> It is almost working, except that I didn't find a good solution for
> the chroot command.
> Putting the command "chroot /mnt/lfs" in the script file does not work
> as chroot expects
> its commands from the terminal, if is not specified in the command
> line.
> 
> The only solution I found is to write something like :
> 
> chroot /mnt/lfs /bin/bash -c "cd /usr/src/mypackage; make"
> 
> Of course, it's more difficult to do this in nALFS -- I haven't done
> it yet -- as the current code
> simply calls chroot() and is done, without needing to keep track of
> the current chrooted directory
> when processing the other commands.

Once you enter chroot, output the commands to another file, you'll need
to generate unique filenames in case you have nested chroot's or stages.
Then in the main script use:

chroot /mnt/lfs /my/chroot/scriptx

> Moreover, I don't have any solution for the XML element <textdump> (to
> create a text file).
> 

Just do a
cat > myfile << EOF
...content...
EOF

or if mode=append

cat >> myfile << EOF

Mark
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list