how to build Lire from CVS, and how to create patches for current CVS

Joost van Baal joostvb at logreport.org
Thu Apr 10 14:27:42 CEST 2003


Hi,

On Mon, Mar 31, 2003 at 12:47:44AM +0200, Torsten Fellhauer wrote:
> 
> By the way - I'm not that familiar with all that developer tools like 
> cvs, cause I'm "just" an Unix-Sysadmin who tries to simplifies his life 
> ;-) I would greatly appreciate any tips about things I'm doing wrong and 
> howto make it right ;-)))

First of all: we're happy with any patch and code contribution.  If
integrating the code in Lire is too much hassle for you, we'll do it
(assuming the quality of the code is OK, and the license allows us to
distribute it with Lire.)

If you wanna do it the truely official way, then basically, it boils
down to:

 mkdir -p cvs/sf/logreport
 cd cvs/sf/logreport

 cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/logreport login

(press enter when prompted for password)

 cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/logreport \
  co service

(a directory service/ gets created under your current working directory,
lines like

 U service/all/lib/Lire/Config/Legacy.pm
 U service/all/lib/Lire/Config/Makefile.am

get printed.)

Now, suppose you'd like to contribute a new firewall convertor:

 cd service/firewall/script

 joostvb at nagy:~/tm.../service/firewall/script% cp cisco_ios2dlf.in \
   myfirewall2dlf.in
 joostvb at nagy:~/tm.../service/firewall/script% vim myfirewall2dlf.in

(write a nice new dlf convertor, add a suitable copyright notice)

 joostvb at nagy:~/.../service/firewall/script% vim Makefile.am
 joostvb at nagy:~/.../cvs/sf/logreport/service% vim configure.in

(add myfirewall2dlf to both files)

 joostvb at nagy:~/.../cvs/sf/logreport/service% echo \
  1.2.1.99-`date+%Y%m%d`-cvs > VERSION

(set the Lire tarball version)

 joostvb at nagy:~/tmp/cvs/service% ./bootstrap && ./configure && \
  make distcheck

(builds and tests a tarball.  Be sure you've got all needed tools
installed on your box.  See Part IV. Lire Developers' Conventions of the
Lire's Developers Manual.  This building likely takes quite a while.
Have a cup of coffee.  If the build fails, ask on the development list
or on IRC if anybody can help you.  (The build _will_ fail now, see the
post I've just done.))

Then copy the created tarball lire-1.2.1.99-20030410-cvs.tar.gz to e.g.
~/tmp/test/.

 joostvb at nagy:~/tmp/test% tar zxf lire-1.2.1.99-20030410-cvs.tar.gz && \
  cd lire-1.2.1.99-20030410-cvs && \
  ./configure --prefix=$HOME/tmp/test/install && make && make install

(unpack, configure, build and install the homegrown tarball in
~/tmp/test/install .)

 joostvb at nagy:~/tm...~/tmp/test/install/bin% ./lr_run lr_log2report \
  myfirewall < /some/log/file

(test the new script.  Run other tests too, of course.)

Now, go create a patch:

 mkdir -p cvs/sf/logreport.orig
 cd cvs/sf/logreport.orig
 cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/logreport login
 cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/logreport \
  co service

 cd ~/cvs/sf/logreport
 cvs update

(make sure your patch still works with current CVS)

 diff -dur logreport.org logreport > ~/tmp/logreport.patch

(Create the patch, in unified diff format, and mail the patch to
development at logreport.org.)

Alternatives:

1) don't run ``make distcheck'' , but just ``make dist''.
This might give you a sane lire tarball, under some circumstance.  (It
_will_ give a somewhat sane tarball from today's CVS.)

2) Don't create a tarball, but test directly from CVS: in your cvs tree,
run ./configure --prefix=$HOME/tmp/test/install ; then, in your cvs
tree, run ``make && make install''.  You can even run ``make && make
install'' from a subdirectory, somewhere deep in the tree.

3) Don't install your script, but call it from within CVS.

4) Don't use CVS at all, but start from an installed Lire package, and
work from within the installed tree.  Drawback: you might be using
obsolete interfaces, which are removed from current Lire CVS.  You might
get hit by bugs which are solved in current Lire CVS.

A lot of documentation is in
http://download.logreport.org/pub/current/doc/dev-manual/pt04.html
(Part IV. Lire Developers' Conventions of the Lire's Developers Manual.)

Bye,

Joost

-- 
.    .                                        http://logreport.com/
| '.|                        /^LogReport$/
| Lire                                        http://logreport.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.logreport.org/pipermail/development/attachments/20030410/cb2f3932/attachment.bin 


More information about the Development mailing list