Install & live cd

Started by nigelbrown, August 08, 2004, 05:18:44 AM

Previous topic - Next topic

nigelbrown

I'm trying out newlisp and ClusterKnoppix - a live CD distribution that

has OpenMosix clustering 'off the shelf'. I've booted two of my home network

with V3.4 and found openmosix works fine and downloading newlisp source

compiling and running newlisp from the compilation directory works fine as expected.

Run multiple compute intensive newlisp programs and openmosix moves them between the nodes fine!

However, I wanted to use newlsip-tk and found the make install fails because on the 'live cd'

/usr/share is read-only. I tried running newlisp-tk from the ource directory but it

looks for images in the usr/share tree (the default place). I then wanted to change the .config

file for newlisp-tk (as suggested in the docs for running in a different directory)

 but you have to be able to start newlisp-tk to generate the first .config

file but I can't start newlisp-tk without a modified .config file?



To get to my point could a default .config file be in the source tree?  - it could be in

a few versions for different systems eg .config.linux that could be renamed.



Any other suggestions for running newlisp-tk without images etc  being in /usr/share



Nigel

Lutz

#1
Great news, I started a ClusterKnoppix download 30 secs ago. Have to try this.



About the tk config files: yes, no problem I can include newlisp-tk.config.linux and newlisp-tl.config.win32 as examples.



Lutz

nigelbrown

#2
With openmosix it would be nice to have an example .lsp that was a master program

that spawned other newlisp instances and collected up the results through a pipe or

tcp/ip.

Nigel



PS to compile on clusterKnoppix you need to edit the makefile_linux to activate the

parts that don't use readline.

Lutz

#3
I will include a 'node.lsp' for running newLISP clusters in the upcomming release. It will work somehow like this:



(process "newlisp -p 1001")



(net-connect "localhost" 1001) => sock



(net-send sock "(foo)n") ;; don't forget the finishing "n"



(if (net-select sock "r")  (net-receive sock 'buff (peek sock)))



etc.



node.lsp will hide socket numbers so the user is only concerned with ports:



(Node:start 1001)

(Node:start 1002)



(Node:eval-str 1001 "(+ 3 4)")



(Node:ready 1001 (Node:read 1001)) => "7"



etc.



Lutz

nigelbrown

#4
Looks good Lutz!

As an extra consider being able to copy a context when a node is created. Ie once a socket

is set up commands are sent that recreate a context.

eg

(Node:start 1001 'CHESS)

(Node:start 1002 'CHESS)



(Node:eval-str 1001 "(CHESS:try-move 'KB4)")

(Node:eval-str 1002 "(CHESS:try-move 'KK4)")

(Node:ready 1001 (Node:read 1001)) => "Bad Move"

(Node:ready 1002 (Node:read 1002)) => "Good Move"



etc.

Or maybe sends a file name and loads it on node start

or maybe just show example code for doing this.



Or parhaps is able to start an arbitarily named newlisp that is the exe

linked with some code eg (Node:start 1001 "newlisp-chess.exe")



Nigel

nigelbrown

#5
To expand on the last suggestion maybe allow specification of "exe" and some args

when starting node

eg

(Node:start 1001 "newlisp-chess.exe" "initboard.lsp position1.lsp")

(Node:start 1002 "newlisp-chess.exe" "initboard.lsp position2.lsp")



maybe this would be preferable to

"Or maybe sends a file name and loads it on node start

or maybe just show example code for doing this. "



as with the args being specified memory switches could be specified



Nigel

nigelbrown

#6
Further on the install perhaps an option

make install_home

could install to a tree under $HOME so an install can be done to

a place that is user writable in cases where a 'live' cd is read-only.



Nigel

Lutz

#7
The situations how to install outside of the usual /usr/bin and  /usr/share could e very different in a specific case. At this moment I will not go into this. The 'Makefile' containing the 'make install' and the file doc/INSTALL are documenting what is needed and wher it has to go.



Lutz

nigelbrown

#8
Hi Lutz,

Looking back at earlier makefiles from the initial rpm building stuff

I see there was an option for specifying the directories on the

command line but this was not used. I'll try out using that code for installing to home.

My interest in doing it that way is that with Knoppix there is a facility

to create a permanent home directory (either on usb stick or hard drive)

that can be activated when the cd is booted - thus if you have favourite

personal programs installed there they will persist from reboot to reboot.

It would also suit me to be able to take a cd and usb stick around with

me and always have newLisp ready to go on boot.

I'll see how it pans out.

Nigel

Lutz

#9
I suggest you make an install_knoppix, which I can include in the distribution. I took out the ifdefs for the rpm directories because some make utilities on some OS would choke on it.



What also has to be taken care of is the IDE(imageDir) spec in newlisp-tk.conf and I could include newlisp-tk.conf.knoppix , which would have to be copied by install_knoppix into the users HOME directory.



The TK frontend will look for $HOME/newlisp-tk.conf and load it if present.



Thanks for doing this work



Lutz

nigelbrown

#10
Thanks for the tips, Lutz.



Another issue is getting newlisp-tk to start newlisp from $HOME/bin  (say).

Thinking about this brought up the general issue of:

Is it possible to have newlisp-tk start-up a specific newlisp (say a different version

than is installed by sysadmin in /usr/bin)? I couldn't see from newlisp-tk the docs and

quick look at newlisp-tk itself how to do it without the manual startup of newlisp.

Would it be reasonable to have it as an optional config line in newlisp.config? say-

set Ide(newLispProgram) "/home/nigel/bin/newlisp"



I'm unsure how this would fit in with how newlisp-tk operates now.



Nigel



PS I'll try to do a generic install_livecd that could do Mandrake Move and the like as well.

Lutz

#11
'install_livecd' sounds like a good idea. I will put:



Ide(newLispProgram) "/usr/bin/newlisp"



and the initialization of it in a new release of newlisp-tk.tcl and newlisp-tk.conf.livecd. The INSTALL doc should also mention it. A user can then change the spec to a different directory.



Lutz

nigelbrown

#12
the following seems to work (I'll test other distros):

#for install to systems where usual install dirs are read-only eg knoppix live cd etc

#

#

# directopry definitions for livecd



datadir=$(HOME)/share

bindir=$(HOME)/bin

mandir=$(HOME)/share/man



install_livecd:

   

   -install -d $(bindir)

   -install -d $(mandir)/man1

   -install -d $(datadir)/newlisp/doc

   -install -d $(datadir)/newlisp/newlisp-tk/images

   -install -m 755 newlisp $(bindir)/newlisp

   -install -m 755 newlisp-tk/newlisp-tk.tcl $(bindir)/newlisp-tk

   -install -m 644 init.lsp $(datadir)/newlisp/init.lsp

   -install -m 644 examples/link.lsp $(datadir)/newlisp/link.lsp

   -install -m 644 modules/mysql.lsp $(datadir)/newlisp/mysql.lsp

   -install -m 644 modules/pop3.lsp $(datadir)/newlisp/pop3.lsp

   -install -m 644 modules/ftp.lsp $(datadir)/newlisp/ftp.lsp

   -install -m 644 modules/infix.lsp $(datadir)/newlisp/infix.lsp

   -install -m 644 modules/smtp.lsp $(datadir)/newlisp/smtp.lsp

   -install -m 644 modules/odbc.lsp $(datadir)/newlisp/odbc.lsp

   -install -m 644 modules/sqlite.lsp $(datadir)/newlisp/sqlite.lsp

   -install -m 644 modules/cgi.lsp $(datadir)/newlisp/cgi.lsp

   -install -m 644 modules/stat.lsp $(datadir)/newlisp/stat.lsp

   -install -m 644 modules/hash.lsp $(datadir)/newlisp/hash.lsp

   -install -m 644 modules/txt2pdf.lsp $(datadir)/newlisp/txt2pdf.lsp

   -install -m 644 doc/COPYING $(datadir)/newlisp/COPYING

   -install -m 644 doc/CREDITS $(datadir)/newlisp/CREDITS

   -install -m 644 doc/newlisp_manual.html $(datadir)/newlisp/doc/newlisp_manual.html

   -install -m 644 doc/newlisp_index.html $(datadir)/newlisp/doc/newlisp_index.html

   -install -m 644 doc/manual_frame.html $(datadir)/newlisp/doc/manual_frame.html

   -install -m 644 newlisp-tk/newlisp-tk.html $(datadir)/newlisp/doc/newlisp-tk.html

   -install -m 644 newlisp-tk/*.lsp $(datadir)/newlisp/newlisp-tk/

   -install -m 644 newlisp-tk/images/* $(datadir)/newlisp/newlisp-tk/images/

   -install -m 644 doc/newlisp.1 $(mandir)/man1/newlisp.1

   -install -m 644 doc/newlisp-tk.1 $(mandir)/man1/newlisp-tk.1



uninstall_livecd:

# undo above install



   -rm  $(HOME)/bin/newlisp

   -rm  $(HOME)/bin/newlisp-tk

   -rm  -rf $(HOME)/share/newlisp

   -rm  $(HOME)/share/man/man1/newlisp.1

   -rm  $(HOME)/share/man/man1/newlisp-tk.1



Where will the newlisp-tk.config.livecd file be in the tree so I can rename/install it?



Nigel



PS Lutz would



Ide(newLispProgram) "$HOME/bin/newlisp"



work in .config or does expansion have to be used?

Lutz

#13
Thanks Nigel, regarding $HOME: what probably will work is:



set Ide(newLispProgram) "$env(HOME)/bin/newlisp"



or



set Ide(newLispProgram) "$Ide(HOME)/bin/newlisp"



Because both are used and defined in newlisp-tk.tcl. The newlisp-tk.conf file is just a TCL program file which gets run/sourced by newlisp-tk.tcl on startup.



newlisp-tk.conf.livecd will live in newlisp-x.x.x/newlisp-tk/



Lutz

nigelbrown

#14
Re newlisp-tk manual:

"On startup newLISP-tk tries to read a file called newlisp-tk.config"

Is there a heirachy of places newlisp-tk tries for the .config . I thought this

had been mentioned in the forum but couldn't find it. I'm wonderling where to

put it for knoppix - in $HOME directory or under $HOME/share?



Nigel