rpm for newLISP 8.0

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

Here's a quick man page on newlisp-tk as the only commandline arg is [lisp-file] from what I can see. However, the man page has a 'see also' referencing a man page for newlisp-tk.config that would explain the settings (like the man page for smb.conf, do "man smb.conf" to see it).
Now that extra memory commandline switches would make sense as parameters to newlisp-tk could they be allowed for in a future release?
eg newlisp-tk -s 4000 -m 100
here is a proposed newlisp-tk man page (it says 'see also newlisp-tk.config' which has not yet had a man page done for it) - does the newlisp-tk script pass back any exit code? I presume it does?

.TH newlisp-tk 1 "April 1, 2004" "version 8.0.0" "USER COMMANDS"
.SH NAME
newlisp-tk \- Tcl/Tk front end for newlisp lisp dialect interpreter
.SH SYNOPSIS
.B newlisp-tk
[lisp-file]
.SH DESCRIPTION
newLISP-tk adds multiple LISP -aware editors / browsers and a source code debugger. It also adds the possibility to make newLISP programs that draw graphics or show graphical widgets of the underlying operating system like buttons, text entries, list boxes, menus etc..
.SH OPTIONS
.TP
lisp-file
specify this lisp file as a parameter to newlisp when starting newlisp.
.SH EXAMPLES
.TP
Start GUI session
.B newlisp-tk
.PP
.TP
Load file then start GUI session
.B newlisp-tk
myfile.lsp
.SH EXIT STATUS
newlisp-tk returns a zero exist status for normal exit unless exit command specifies a code to be returned. Non zero is returned in case of abnormal exit.
.SH AUTHOR
Lutz Mueller (contact (at) nuevatec.com)
.SH SEE ALSO
newlisp-tk.config(1)
Last edited by nigelbrown on Wed Apr 07, 2004 1:08 am, edited 1 time in total.

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

When doing the man page above I realised the newlisp man doesn't list [lisp-filess...] in the option section - so I've fixed that and added an example:

.TH newlisp 1 "April 1, 2004" "version 8.0.0" "USER COMMANDS"
.SH NAME
newlisp \- lisp dialect interpreter
.SH SYNOPSIS
.B newlisp
[\-h] [\-s stacksize] [\-m max\-mem\-megabyte] [[\-l | \-L] [\-p port\-number | \-d port\-number]] [lisp-files ...] [\-e programtext]
.SH DESCRIPTION
Invokes the newLisp lisp interpreter which first interprets init.lsp if present. Then one or more options and one or more newLISP source files can be specified. The options and source files are executed in the sequence they appear. For some options is makes sense to have source files loaded first like for the -p and -d options. For other options like -s and -m it is logical to specify these before the source files to be loaded. If a \-e switch is used the programtext is interpreted and then newlisp exits otherwise interpretation continues interactively (unless an exit occurs during lisp-file interpretation).
.SH OPTIONS
.TP
\-h
display a short help text
.TP
\-s stacksize
stack size to use when starting newLISP. When no stack size is specified the stack defaults to 1024.
.TP
\-m max\-mem\-megabyte
Limits memory to max\-mem\-megabyte megabytes for LISP cell memory.
.TP
lisp-files
load and interpret the specified lisp source files in sequence. If an (exit) is executed by one of the source files then newlisp exits and all processing ceases.
.TP
\-e programtext
programtext is an expression enclosed in quotation marks which is evaluated and the result printed to standard out device (STDOUT). In most UNIX system shells apostrophes can also be used to delimit the expression. Newlisp exits after interpretation of programtext is complete.
.TP
\-l \-L
Logs the port connection, use the \-l or \-L option together with the \-p or \-d option. This registers time and IP number of the connecting client in file newlisp\-log.txt. When using \-L all remote commands received are also logged. If the logfile newlisp\-log.txt already exists, new content is appended; otherwise newlisp\-log.txt is created.
.TP
\-p port\-number
Listen for commands on a TCP/IP socket connection. In this case standard I/O is redirected to the port specified in the \-p option. Any specified lisp-files will be interpreted the first time a connection is made, that is, before text is accepted from the port connection.

.TP
\-d port\-number
Run in demon mode. As for the -p option, but newLISP does not exit after a closed connection and stays in memory listening for a new connection.
.SH EXAMPLES
.TP
Start interactive session
.B newlisp
.PP
.TP
interpret lisp sources then enter interactive session.
.B newlisp
myfile1.lsp myfile2.lsp
.PP
.TP
Add 3 and 4, 7 prints on standard output
.B newlisp
\-e "(+ 3 4)"
.PP
.TP
newLISP is started as a server (the & indicates to LINUX to run the process in the background) and can be connected to with telnet by issuing telnet localhost 1234
.B newlisp
\-p 1234 &
.PP
.SH EXIT STATUS
newlisp returns a zero exist status for normal exit unless exit command specifies a code to be returned. Non zero is returned in case of abnormal exit.
.SH AUTHOR
Lutz Mueller (contact (at) nuevatec.com)
.SH SEE ALSO
newlisp-tk(1)

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

thanks, I still could merge newlisp.1 into 8.0 but will do newlisp-tk.1 in 8.0.1

Lutz

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

I'll work on newlisp-tl.config man page to go with it. Probably along the lines of a re-markedup cut and paste from sections of the newlisp-tk .html document.

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

Lutz,
could you post for me the install section of the proposed 8.0.0 release makefile so I can use the man bit for the rpm?
Thanks
Nigel

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

the makefile install will need something like

ifndef mandir
mandir=/usr/share/man
endif

and...

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

ALSO NOTE MY TYPO in the install stuff I posted

ifndef bindir
datadir=/usr/bin
endif

should of course be

ifndef bindir
bindir=/usr/bin
endif

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

Lutz,
regarding LSB directories looking at /usr/share/doc in Mandrake (9.1) I note that the subdirectories have their doc files in a subdir whose name includes the version number eg
[nigel@p800 nigel]$ ls /usr/share/doc
aspell-0.50.3/ libguile10-1.4.1/
aspell-en-0.50.2/ libguile12-1.6.0/
at-3.1.8/ libhermes1-1.3.2/
aumix-2.7/ libibtk0-0.0.14_pre2/
automake-1.4/ libIDL2_0-0.8.0/
bash-2.05b/ libieee1284_3-0.2.6/
bind-9.2.2/ libimlib1-1.9.14/
bind-utils-9.2.2/ libintl2-0.11.5/
binutils-2.13.90.0.18/ libjpeg62-6b/
bonobo-1.0.22/ liblcms1-1.09/
...

except for newlisp that puts it in /newlisp .
The rpm builder defaults to put the docs in /usr/share/doc/newlisp-8.0.0

This may be the standard LSB way to ensure that the doc dir is in sync.
Would you consider changing future installs to that? For now I will let the rpm builder do both, that is /usr/share/doc/newlisp and /usr/share/doc/newlisp-8.0.0 will both exist but I can dump the second later


Nigel

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

For the time beeing I don't want to version the installation dirs for docs, if that is too non-standard, perhaps the docs should move to /usr/share/newlisp, some other projects do this, it also keeps everything together in one directory. Versioning the *.html files also means chaning the newlisp-tk.config and newlip-tk.tcl each time to pint to a different version.

Another possibility would be to have the version number in .../doc/newlisp_x.x.x but have a link to it from /usr/share/newlisp/doc, I also have seen that.

This is the install part for 8.0 going online today:
>>>>>>>>>>>>
install:
-install -d /usr/share/doc/newlisp
-install -d /usr/share/newlisp/newlisp-tk/images
-install -m 755 newlisp /usr/bin/newlisp
-install -m 755 newlisp-tk/newlisp-tk.tcl /usr/bin/newlisp-tk
-install -m 644 init.lsp /usr/share/newlisp/init.lsp
-install -m 644 examples/link.lsp /usr/share/newlisp/link.lsp
-install -m 644 modules/mysql.lsp /usr/share/newlisp/mysql.lsp
-install -m 644 modules/pop3.lsp /usr/share/newlisp/pop3.lsp
-install -m 644 modules/ftp.lsp /usr/share/newlisp/ftp.lsp
-install -m 644 modules/infix.lsp /usr/share/newlisp/infix.lsp
-install -m 644 modules/smtp.lsp /usr/share/newlisp/smtp.lsp
-install -m 644 modules/odbc.lsp /usr/share/newlisp/odbc.lsp
-install -m 644 modules/sqlite.lsp /usr/share/newlisp/sqlite.lsp
-install -m 644 modules/cgi.lsp /usr/share/newlisp/cgi.lsp
-install -m 644 modules/stat.lsp /usr/share/newlisp/stat.lsp
-install -m 644 modules/hash.lsp /usr/share/newlisp/hash.lsp
-install -m 644 modules/txt2pdf.lsp /usr/share/newlisp/txt2pdf.lsp
-install -m 644 doc/COPYING /usr/share/newlisp/COPYING
-install -m 644 doc/newlisp_manual.html /usr/share/doc/newlisp/newlisp_manual.html
-install -m 644 doc/newlisp_index.html /usr/share/doc/newlisp/newlisp_index.html
-install -m 644 doc/manual_frame.html /usr/share/doc/newlisp/manual_frame.html
-install -m 644 doc/newlisp.1 /usr/share/man/man1/newlisp.1
-install -m 644 newlisp-tk/newlisp-tk.html /usr/share/doc/newlisp/newlisp-tk.html
-install -m 644 newlisp-tk/*.lsp /usr/share/newlisp/newlisp-tk/
-install -m 644 newlisp-tk/images/* /usr/share/newlisp/newlisp-tk/images/
>>>>>>>>>>>>>

The whole issue with datadir and bindir, if varability will be allowed here, has many implications for making newlisp and for the user too, I need some time to think about this. At the moment (because RPM requires it) we will only allow /usr/bin and /usr/share as a prefix.

Lutz

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

I have a newlisp-8.0.0-0.rc4.i586.rpm that installs on my Mandrake 9.1 and 10 systems.

The differences from the .tgz install is that 1) /usr/share/doc/newlisp-8.0.0 is also created and populated 2) a preliminary version of newlisp-tk.1 is installed - as a placeholder.

The rpm is not gpg signed.

I could e-mail it to you for a look - and also send the rpm .spec and other files - the only changed source tree file was the makefile along the lines above. One approach would be to have a patch file that would patch the Makefile of the tgz version for use in the rpm build.
It was built while running XFree on an Nvidia card - I don't think this has created any unexpected dependencies but apparently one recommendation is to do any production rpm builds while not running XFree, only a pure text console. I don't know how necessary this is for the newlisp rpm.

Nigel

PS A bit off topic, "Versioning the *.html files also means changing the newlisp-tk.config and newlip-tk.tcl each time to point to a different version." - could be a 'good thing'

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Thanks Nigel, yes I would like to have a look and see if I can do a RPM myself.

Lutz

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

I've sent the e-mail with rpm, modified Makefile rc4 sources, and directory tree and associated file needed to build rc4 rpm, plus instructions.

I'll finalise building an rpm by using a patch file to make the Makefile modifications to the 8.0 source tree. I'll then post the text files and instructions here as a final record for those interested.

I've enjoyed the learning process.

Lutz, I'll leave building any formal release rpm to you so you can gpg sign it etc.

Nigel

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

Hi Lutz,
Thanks for putting up the .rpm
Ignoring complaints about valid signatures it installs as expected.
I installed it but now newlisp-tk is looking for its manuals at /usr/share/doc/newlisp/
rather than either /usr/share/newlisp/doc/ or /usr/share/doc/newlisp-8.0.1/

also very minor point that newlisp man page says for 8.0.0 while the newlisp-tk man page is better as it says just 8.0

Thanks again for going with the rpm

Nigel

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

I just finished a signed rpm, so the next one will be signed. The 8.0.0 is also already corrected to 8.0 and the doc directory where newlisp-tk looks for is /usr/share/newlisp/doc/ but /usr/share/doc/newlisp-8.0.2/ also exists for LSB reasons.

Lutz

Locked