Developer Resourses

Needed Packages

You will need gcc, make, autoconf and automake

Helper Script

As of changeset 76, where it all finaly started to work correctly, a new way to do our work was introduced. The helper script was added. Its purpose is to substitute the variables parsable by autoconf to the correct paths on your workstation, and when run again it changes back to the old values, and as of changeset 79 it also allows you to change the shebang line to debug mode, ie, "#!/bin/bash -x". This way we don't need to run autoreconf -r -i && configure or just configure everytime we make a change to our script. Just run ./helper without passing any arguments to see all available options.

Now, what happens if you forget to change the vars back to the parsable values by autoconf?
With the Subversion's pre-commit hook we check if you have done this. If you haven't, subversion will stop before adding the commit to repository and will show you a nice error message:

--------------------------------------------------------------
Checking ipkungfu.in for:

        IPTABLES... Failed!!!
        MD5SUM... Failed!!!
        MODPROBE... Failed!!!
        SU... Failed!!!
        KILLALL... Failed!!!
        NETSTAT... Failed!!!
        CHOWN... Failed!!!
        LSMOD... Failed!!!
        DEPMOD... Failed!!!
        RMMOD... Failed!!!

 IPTABLES MD5SUM MODPROBE SU KILLALL NETSTAT CHOWN LSMOD DEPMOD RMMOD have a bad assignment!
 Form is 'VAR_NAME="@VAR_NAME@"', Exiting!!!

Did you run './helper -c'?
You need to run it prior to commit anything to the repository!
--------------------------------------------------------------

And what if you forget to change the shebang line to the apropriate for repository commit, ie, "#!/bin/bash"?

--------------------------------------------------------------
Checking ipkungfu.in for correct variable assignment:

        IPTABLES... OK!!!
        MD5SUM... OK!!!
        MODPROBE... OK!!!
        SU... OK!!!
        KILLALL... OK!!!
        NETSTAT... OK!!!
        CHOWN... OK!!!
        LSMOD... OK!!!
        DEPMOD... OK!!!
        RMMOD... OK!!!

--------------------------------------------------------------

You're commiting 'ipkungfu.in' with '#!/bin/bash -x' as the shebang line!
Please run './helper -s' prior to commit to the repository

--------------------------------------------------------------

Also when commiting to the repository, you can include trac "commands" in commit messages. This is done with the help of Subversion's trac-post-commit-hook.
It searches commit messages for text in the form of:

command #1
command #1, #2
command #1 & #2
command #1 and #2

Available commands are:

  • close, closed, closes, fix, fixes, fixed - The specified issue numbers are closed with the contents of this commit message being added to it.
  • references, refs, addresses, re, see - The specified issue numbers are left in their current status, but the contents of this commit message are added to their notes.

A fairly complicated example of what you can do is with a commit message of:

Changed blah and foo to do this or that. Fixes #10 and #12, and refs #13.

This will close #10 and #12, and add a note to #13.

Well, that's all for now.

Happy developing!!!

Release a new version

The procedure of releasing a new version is made by creating a copy of current trunk to the tags under the to be released name.

Source code Tagging

For example to release version 0.6.1, first update trunk to newer version. Edit file configure.ac and update the line:

AC_INIT([IPKungFu], [0.6.0], [http://ipkungfu.ufsoft.org], [ipkungfu])

to become:

AC_INIT([IPKungFu], [0.6.1], [http://ipkungfu.ufsoft.org], [ipkungfu])

Commit changes and tag it:

svn ci && svn cp http://ipkungfu.ufsoft.org/svn/trunk/ http://ipkungfu.ufsoft.org/svn/tags/ipkungfu-0.6.1

Now the source repository has a new version "tag", ipkungfu-0.6.1, the new version to release.

Source Files Release

Now we need to build our source files packages. First we checkout our new tag:

svn co http://ipkungfu.ufsoft.org/svn/tags/ipkungfu-0.6.1 ipkungfu-0.6.1

Now we enter ipkungfu-0.6.1, rebuild configure scripts and make our distribution source packaged files:

cd ipkungfu-0.6.1
autoreconf -f -i && ./configure && make dist-all

And that's it, now we have 2 aditional files:

ipkungfu-0.6.1.tar.bz2
ipkungfu-0.6.1.tar.gz