| Monkey HTTP Daemon 0.11.0 Documentation: A Fast and Lightweight Web Server for Linux | ||
|---|---|---|
| Prev | Chapter 1. Getting Started | Next |
1.3. Details for developers
1.3.1. Where to start ? Hack Monkey !
Monkey is an open source project, anyone is invited to colaborate and try to hack it, we are always open for suggestions, we love creative people !, if you want to colaborate this section is for you.
1.3.2. Get development branch
The first thing that a new developer should do, is clone the code located at the development repository. Monkey is developed using GIT as main version control system, you will need the git tools installed on your system in order to continue.
In order to get the development branch, please run the following command:
$ git clone git://repo.or.cz/MonkeyD.git
When the above command finish to obtain the development branch, you will notice a new directory called MonkeyD. That's the path where you want to go, please run the configure script as was described previously and try to compile it
1.3.3. Configure with debugging symbols
The common installation of Monkey remove the debugging symbols in the target executable, so for development purposes configure with:
$ ./configure --debug
1.3.4. Enable trace messages
In addition to debugging symbols, sometimes is very useful to trace our program in order to check values, called functions, timings, etc. Monkey includes a cool feature called Trace, which allows to put trace messages in the code and print to the screen very well formatted messages which include timings, name of the file where is being called, caller function and an optional message. Trace is disabled by default, so in order to enable it please configure with:
$ ./configure --trace
Also, we have added an enviroment variable that restrict the messages coming from specific source files. If you export the variable MONKEY_TRACE in your shell before run Monkey with a source file name, the messages will be restricted.
$ export MONKEY_TRACE="http.c"
The example below will restrict trace messages with origin from http.c, you can add more restrictions if you want as:
$ export MONKEY_TRACE="server.c http.c epoll.c"
1.3.5. Committing changes and providing GIT patches
At this point you have a local copy of the Monkey GIT repository, if you are going to contribute with patches you must first configure your local copy to set your name and e-mail, we want to know who is behind the Monkey improves :) . Please configure your name and e-mail with:
$ git repo-config user.name "My Name" $ git repo-config user.email "myemail@someprovider.com"
Once you have checked that you code is working as expected, you should proceed to commit your changes to your local GIT repository, you can issue the commit with the following command:
$ git commit -a -m "My modification details"
Make sure your commit was done checking the log history running:
$ git log
The final step is to generate your GIT patch and send it to the Monkey mailing list, let's generate the patch using GIT tools:
$ git format-patch -1
The third command specifies the commit id from where the patch will be generated, you can use the commit hash generated by git commit previously which can be checked with git log or use negative integer numbers to let the command know how many latest commits to include in the patch, for our case just the last one, so we use -1.
Now you are ready to provide your GIT patch to monkey@lists.monkey-project.com.