ALFS again & again & ...
vassili.dzuba at wanadoo.fr
Fri Aug 23 01:33:42 PDT 2002
"Mark Ellis" <mark.uzumati at virgin.net> a écrit dans le message de news:
20020823074738.GA645 at ElCapitan.oval.net...
> 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
> or if mode=append
> cat >> myfile << EOF
> Unsubscribe: send email to listar at linuxfromscratch.org
> and put 'unsubscribe alfs-discuss' in the subject header of the message
Well, that's probably the only solution. I don't find it very elegant but it
seems that bash doesn't leave us
Concerning the <textdump>, my question was relative to the chrooted
environment, but if we create a command file,
the problem of course disappears. It will be necessary to generate unique
file name but also
unique end of file markers :
cat > /tmp/mycommand1 < EOF1
cat > /etc/foo < EOF
chmod 755 /tmp/mycommand1
/usr/sbin/chroot /mnt/lfs mycommand1
There will remain a small problem, probably anecdoctical.
When nALFS defines environment variables, they are defined using setenv()
and are therefore not local to the stage in which they are defined.
In the generated script, the environment variable will be defined in the
file given to chroot, and therefore will not be available outside of the
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