Re: Automatics LFS builds using jhalfs.

2005-10-04 Thread Joshua Murphy
well, i just started it (after grabbing the newest script as of 0100
EDT), it's grabbing the packages now, i'll let you guys know how it
goes tomorrow (between classes probably) ...

On 10/4/05, Jeremy Huntwork <[EMAIL PROTECTED]> wrote:
> Dan Nicholson wrote:
>
> > Right.  I guess I just wanted to point out the opportunity that by
> > invoking exec su -c, you can switch to root and replace the existing
> > process.  However, I didn't mean to imply that you must run a script
> > as the argument for the env statement.  I was thinking that part of an
> > existing make target would be the chroot env command as shown in this
> > statement:
> >
> > exec su -c "chroot /mnt/lfs /tools/bin/env -i \
> >  ${VARIABLES} make -C /tools/src chroot"
>
> I prefer this method, and this is what we already use in the LiveCD
> Makefiles (minus the su -c). We have specifc targets that are made after
> chroot, so chroot is done once, all the packages needed built in that
> process, and chroot exited.
>
> Unfortunately, it's a little more work to set that up in the Makefile
> jhalfs is creating via a for loop. Perhaps after some time...
>
> --
> JH
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-dev
> FAQ: http://www.linuxfromscratch.org/faq/
> Unsubscribe: See the above information page
>


--
Poison [BLX]
Joshua M. Murphy
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-04 Thread Jeremy Huntwork

Dan Nicholson wrote:


Right.  I guess I just wanted to point out the opportunity that by
invoking exec su -c, you can switch to root and replace the existing
process.  However, I didn't mean to imply that you must run a script
as the argument for the env statement.  I was thinking that part of an
existing make target would be the chroot env command as shown in this
statement:

exec su -c "chroot /mnt/lfs /tools/bin/env -i \
 ${VARIABLES} make -C /tools/src chroot"


I prefer this method, and this is what we already use in the LiveCD 
Makefiles (minus the su -c). We have specifc targets that are made after 
chroot, so chroot is done once, all the packages needed built in that 
process, and chroot exited.


Unfortunately, it's a little more work to set that up in the Makefile 
jhalfs is creating via a for loop. Perhaps after some time...


--
JH
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-04 Thread Dan Nicholson
On 10/3/05, M.Canales.es <[EMAIL PROTECTED]> wrote:
> El Lunes, 3 de Octubre de 2005 23:44, Dan Nicholson escribió:
>
> > Don't know if this works with make, but I saw a nice solution to this
> > problem in Greg Shafer's build system that uses Bash scripts.  In
> > order to continue to run as root user in the chroot, he uses:
> > exec su -c "${CHROOT_CMD}"
> > where CHROOT_CMD is something like
> > chroot ${DIR} ${ENV_VARS} ${the_same_script} --chroot
>
> That is very similar to what Jeremy has added, except for the "exec su -c" and
> that instead of invoking "make" we execute the relevant shell script for each
> package build.

Right.  I guess I just wanted to point out the opportunity that by
invoking exec su -c, you can switch to root and replace the existing
process.  However, I didn't mean to imply that you must run a script
as the argument for the env statement.  I was thinking that part of an
existing make target would be the chroot env command as shown in this
statement:

exec su -c "chroot /mnt/lfs /tools/bin/env -i \
 ${VARIABLES} make -C /tools/src chroot"

Here, you would be invoking the same Makefile in directory /tools/src
(if that's where it existed), but with the target chroot.  That would
allow the tools part of the build to be done as the unprivelaged user,
then supply the root password once and continue in the chroot.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-03 Thread Shane Shields

Jeremy Huntwork wrote:


Shane Shields wrote:



I do have a script for automated builds that can work for just about any
self build linux's. I have addressed and I believe solved the above
points. If you are interested I can mail them to you for perusal. It is
however slanted toward rpm package management but you should get some 
ideas.



Ideas are always welcome... :)

Feel free to send whatever you've got to alfs-disucss.

--
JH


You can download them from
http://www.diy-linux.org/downloads/contrib/shane_shields/
I only have a modem now but soon I will have adsl 

--
Shane Shields

Registered LFS Compiler: 7582
To drink the WINE of success you must first seek the sayings of source

Anyone sending unwanted advertising e-mail to this address will be charged $25 
for network traffic and computing time. By extracting my address from this 
message or its header, you agree to these terms.




--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-03 Thread Jeremy Huntwork

Shane Shields wrote:


I do have a script for automated builds that can work for just about any
self build linux's. I have addressed and I believe solved the above
points. If you are interested I can mail them to you for perusal. It is
however slanted toward rpm package management but you should get some 
ideas.


Ideas are always welcome... :)

Feel free to send whatever you've got to alfs-disucss.

--
JH
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-03 Thread M.Canales.es
El Lunes, 3 de Octubre de 2005 23:44, Dan Nicholson escribió:

> Don't know if this works with make, but I saw a nice solution to this
> problem in Greg Shafer's build system that uses Bash scripts.  In
> order to continue to run as root user in the chroot, he uses:
> exec su -c "${CHROOT_CMD}"
> where CHROOT_CMD is something like
> chroot ${DIR} ${ENV_VARS} ${the_same_script} --chroot

That is very similar to what Jeremy has added, except for the "exec su -c" and 
that instead of invoking "make" we execute the relevant shell script for each 
package build.


-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:   http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:   http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-03 Thread Dan Nicholson
> > The problem at this moment is that I can't figure yet how to manage the 
> > chroot
> > phase.
> chroot and then for each target run "chroot $(DIR) $(ENV) bash -c
> 'command1 && command2'" where $(DIR) is your mount point, ie, /mnt/lfs
> and $(ENV) is the specific environment variables you want to include.

Don't know if this works with make, but I saw a nice solution to this
problem in Greg Shafer's build system that uses Bash scripts.  In
order to continue to run as root user in the chroot, he uses:
exec su -c "${CHROOT_CMD}"
where CHROOT_CMD is something like
chroot ${DIR} ${ENV_VARS} ${the_same_script} --chroot

So, he has replaced the running script with a new one executed as
root.  In this case, you could make a target called chroot and it
would go something like
exec su -c "chroot /mnt/lfs /tools/bin/env -i \
  ${VARIABLES} make -C /tools/src chroot"

Anyway, I don't know if it would work here, but I thought that was a
cool solution.

Dan

P.S.  Sorry, Greg, if you didn't want that posted here.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-03 Thread M.Canales.es
El Lunes, 3 de Octubre de 2005 00:52, Jeremy Huntwork escribió:

> This should be very easy, especially considering you've already
> accomplished a similar feat when su-ing as 'lfs'. All you would need to
> do is make sure that the proper kernfs and dev structure is in place in
> chroot and then for each target run "chroot $(DIR) $(ENV) bash -c
> 'command1 && command2'" where $(DIR) is your mount point, ie, /mnt/lfs
> and $(ENV) is the specific environment variables you want to include.

I see that you go ahead and made some improvements and bugs fixes. Not 
revised/tested yet, but in the commits look very nice. I'm very happy to see 
you doing some work and keeping your "child" in a sane state ;-)

Testing the new code now (i.e, rebuilding the system up to chapter05 and then 
run the chapter06 targets one-by one) to see what issues remain.

> You have a point there. Guess I was thinking of items like 'all chapter4
> chapter5 chapter6 clean-all clean' etc. Targets that you want to
> *always* run. The others that you 'touch $@' on are 'real' targets.

Point taken. That is easy to do.

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:   http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:   http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-03 Thread Vincent Fretin
Hi,
Sorry in advance for the reply, I use the lfs-digest. And sorry for my
poor english too. :)

jhalfs is interresting.
I made a similar project which use a modified garnome/lnx-bbc scripts.
One Makefile per package, it works with cookies to know which steps
are made and create a tar.7z package for the distribution Hedinux
(http://hedinux.org), it's a young project.
There is the possiblitity to not create a package and to install directly.
See http://wiki.hedinux.org/wakka.php?wiki=HedgarBook (in french)
and specialy http://wiki.hedinux.org/wakka.php?wiki=HedGarEN in
english with some sentences in french, sorry, but IMO you sould
understand the concept. :)
http://wiki.hedinux.org/wakka.php?wiki=HedGarExamples (in french, but
you can understand, it's in majority codes and commands)
I have recently modified my Makefiles to compile with gcc 4.0.1, in
fact we can choose to compile with gcc3 or gcc4, I have not tested
gcc4 yet, but it should work. This project is a simple LFS for the
base system, I synchronise the Makefiles with LFS SVN book every week.
It should be easy to modify the Makefiles to compile for other
architecture like ppc, but I have not ppc at home.
The interesting directories are hedgar/tmpsys/, hedgar/chroot/ and hedgar/base/
You should look how I've made the chroot step.

I'm happy if it can help you.
Vincent Fretin
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread Shane Shields

Jeremy Huntwork wrote:


M.Canales.es wrote:


El Domingo, 2 de Octubre de 2005 17:35, Jeremy Huntwork escribió:


Wow, you've really taken my idea and run with it. ;) It looks nice, 
just
where I would have (probably) gone myself. I'll have to get some 
time to

sit down and really look it over.




Thanks, and very happy to read to you :-)

The problem at this moment is that I can't figure yet how to manage 
the chroot phase.



This should be very easy, especially considering you've already 
accomplished a similar feat when su-ing as 'lfs'. All you would need 
to do is make sure that the proper kernfs and dev structure is in 
place in chroot and then for each target run "chroot $(DIR) $(ENV) 
bash -c 'command1 && command2'" where $(DIR) is your mount point, ie, 
/mnt/lfs and $(ENV) is the specific environment variables you want to 
include.


Due that this is a linear build where each step depend on the proper 
execution of the previous one, I can't think in this momment on any 
cadidate target for .PHONY.



You have a point there. Guess I was thinking of items like 'all 
chapter4 chapter5 chapter6 clean-all clean' etc. Targets that you want 
to *always* run. The others that you 'touch $@' on are 'real' targets.


The rebuild from/up-to one child target can be achieved also removing 
the relevant $JHSLFSDIR/???-* files and touching the remaining ones. 



Good to know.

--
JH


I do have a script for automated builds that can work for just about any
self build linux's. I have addressed and I believe solved the above
points. If you are interested I can mail them to you for perusal. It is
however slanted toward rpm package management but you should get some ideas.

--
Shane Shields

Registered LFS Compiler: 7582
To drink the WINE of success you must first seek the sayings of source

Anyone sending unwanted advertising e-mail to this address will be 
charged $25 for network traffic and computing time. By extracting my 
address from this message or its header, you agree to these terms.






--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread Jeremy Huntwork

M.Canales.es wrote:

El Domingo, 2 de Octubre de 2005 17:35, Jeremy Huntwork escribió:



Wow, you've really taken my idea and run with it. ;) It looks nice, just
where I would have (probably) gone myself. I'll have to get some time to
sit down and really look it over.



Thanks, and very happy to read to you :-)

The problem at this moment is that I can't figure yet how to manage the chroot 
phase.


This should be very easy, especially considering you've already 
accomplished a similar feat when su-ing as 'lfs'. All you would need to 
do is make sure that the proper kernfs and dev structure is in place in 
chroot and then for each target run "chroot $(DIR) $(ENV) bash -c 
'command1 && command2'" where $(DIR) is your mount point, ie, /mnt/lfs 
and $(ENV) is the specific environment variables you want to include.


Due that this is a linear build where each step depend on the proper execution 
of the previous one, I can't think in this momment on any cadidate target 
for .PHONY.


You have a point there. Guess I was thinking of items like 'all chapter4 
chapter5 chapter6 clean-all clean' etc. Targets that you want to 
*always* run. The others that you 'touch $@' on are 'real' targets.


The rebuild from/up-to one child target can be achieved also removing the 
relevant $JHSLFSDIR/???-* files and touching the remaining ones. 


Good to know.

--
JH
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread M.Canales.es
El Domingo, 2 de Octubre de 2005 18:45, Joshua Murphy escribió:

> hmm ... would it work to make a "Stage 2" script that's simply called
> as the command to execute through chroot? ... i'm not much of a
> developer, but i've looked at building my own scripts before, and i've
> considered a lot of little things like this one, just never tested
> them ... i'm planning on starting a build tuesday morning with this
> script ...

Yes, maybe some type of wrapper could be needed.

> also, it would be interesting to see a tool that could do the same
> parsing, but instead of a build, put together the nALFS profile for
> the given copy of the book ... seems like it may save the nALFS team
> some work in the long run, as long as the books format doesn't change
> much anyways ... but now i'm just rambling ... :)

Well, that could be very nice but can't be done (or will be very very 
difficult) with the current book's sources. 

The problem is that there is no easy way to map a plain flow of characters 
(the ones inside the [screen][userinput] ... [/userinput][/screen] tags in 
the book sources) to the combo on xml tags, attributes and strings needed by 
nALFS profiles. 


-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:   http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:   http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread Joshua Murphy
On 10/2/05, M.Canales.es <[EMAIL PROTECTED]> wrote:
> The problem at this moment is that I can't figure yet how to manage the chroot
> phase.

hmm ... would it work to make a "Stage 2" script that's simply called
as the command to execute through chroot? ... i'm not much of a
developer, but i've looked at building my own scripts before, and i've
considered a lot of little things like this one, just never tested
them ... i'm planning on starting a build tuesday morning with this
script ...

also, it would be interesting to see a tool that could do the same
parsing, but instead of a build, put together the nALFS profile for
the given copy of the book ... seems like it may save the nALFS team
some work in the long run, as long as the books format doesn't change
much anyways ... but now i'm just rambling ... :)

--
Poison [BLX]
Joshua M. Murphy
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread M.Canales.es
El Domingo, 2 de Octubre de 2005 17:35, Jeremy Huntwork escribió:

> Wow, you've really taken my idea and run with it. ;) It looks nice, just
> where I would have (probably) gone myself. I'll have to get some time to
> sit down and really look it over.

Thanks, and very happy to read to you :-)

The problem at this moment is that I can't figure yet how to manage the chroot 
phase.

> One thing I noticed, though it's not a huge thing... You may want to add
> a .PHONY list of targets that don't need to be checked to see if they've
> already been run. Will slightly speed up processing time. But if it's a
> lot of trouble to automate, it's not that important.

Due that this is a linear build where each step depend on the proper execution 
of the previous one, I can't think in this momment on any cadidate target 
for .PHONY.

The rebuild from/up-to one child target can be achieved also removing the 
relevant $JHSLFSDIR/???-* files and touching the remaining ones. 


-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:   http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:   http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread Jeremy Huntwork

Jeremy Huntwork wrote:


One thing I noticed, though it's not a huge thing... You may want to add 
a .PHONY list of targets that don't need to be checked to see if they've 
already been run. Will slightly speed up processing time. But if it's a 
lot of trouble to automate, it's not that important.


Just tested out the script, now, too. There's one more thing I noticed, 
which, if I can, I'll try to put a little time into later to 
incorporate. I'd like to see a nicer way to control the output. 
Certainly, we'd want to log as much as we can, but it's much nicer to 
have easily readable output.


For an example of what I mean, download and start the livecd build. (You 
don't need to let it run for long...)


mkdir /mnt/lfs
cd /mnt/lfs
svn co svn://linuxfromscratch.org/livecd/x86/trunk lfs-livecd
cd lfs-livecd
make

--
JH
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread Jeremy Huntwork

M.Canales.es wrote:



Any feedback will be apreciated, included a plain "It sucks."


Wow, you've really taken my idea and run with it. ;) It looks nice, just 
where I would have (probably) gone myself. I'll have to get some time to 
sit down and really look it over.


Thanks for the work, Manuel.

And greetings to everyone else here. ;)

One thing I noticed, though it's not a huge thing... You may want to add 
a .PHONY list of targets that don't need to be checked to see if they've 
already been run. Will slightly speed up processing time. But if it's a 
lot of trouble to automate, it's not that important.


--
JH
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread M.Canales.es
El Domingo, 2 de Octubre de 2005 13:15, M.Canales.es escribió:

> Do by hand all steps up to the end of chapter03, create the $LFS/jhalfs
> directory and place into it a fresh svn working-copy of your sources naming
> the directory lfs-development.

Actually i'm planning to add a switch to can use any local working copy. That 
will allow to test commands changes and packages updates before commit the 
changes to the repository

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:   http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:   http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread M.Canales.es
El Domingo, 2 de Octubre de 2005 12:51, Alexander E. Patrakov escribió:

> What should I do with my UTF-8 book to make sure that it's compatible
> with the script?

First, to add the role="nodump" attributes found in the current LFS SVN book, 
to skip undesired commands, and to add the -v switchs in the book's commands, 
if your want full logs.

Do by hand all steps up to the end of chapter03, create the $LFS/jhalfs 
directory and place into it a fresh svn working-copy of your sources naming 
the directory lfs-development.


-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:   http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.com
TLDP-ES:   http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Re: Automatics LFS builds using jhalfs.

2005-10-02 Thread Alexander E. Patrakov

M.Canales.es wrote:

Hi!

jhalfs is a tool to build an LFS system using the real commands found in the 
LFS SVN book. It's intended as a standar framework for developers and 
testers.


http://svn.linuxfromscratch.org/viewcvs.cgi/jhalfs/trunk/?root=ALFS

It can dowload the needed packages and patches (from ftp.lfs-matrix.net) 
adding the -P switch, and can run the optional testsites adding the -T 
switch. 

At this momment it can build the system up to the end of chapter5. I will 
start the work to support the other chapters soon.


I will be very happy if some of you could review the code and test it, I'm not 
a shell scripts or Makefile guru ;-)


Any feedback will be apreciated, included a plain "It sucks."


What should I do with my UTF-8 book to make sure that it's compatible 
with the script?


The rendered book is at:

http://www.linuxfromscratch.org/~alexander/lfs-book/

The patch against the official LFS book is at:

http://www.linuxfromscratch.org/~alexander/patches/lfs_book-r6890-utf8-1.patch

--
Alexander E. Patrakov
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page