Become a developer

Introduction
You want to become a Vyatta developer? Why? Not a wise decision. Why do you want to do it when you can find a girlfriend, go for a walk, hang out with friends or do other more appropriate things?

People who contribute to Vyatta claim it's fun, but would you really believe those weird guys?

Still not convinced? Ok, now read what terrible ordeals you have to undergo to start.

Development platform
Vyatta uses Debian toolchain. So to build packages and images you need to have latest stable Debian installation. Vyatta releases since 6.2 are based on Squeeze, earlier releases used Lenny.

If you use another operating system, install Debian on a virtual machine.

Languages and tools
Vyatta components are mostly written in Perl and C/C++. The compiler used to build C code is gcc.

For version control Vyatta uses git, so you will need to learn how to use it.

Obtaining the source
First create the build environment. Read Building from source/Mendocino to find out how to do it.

This also applies to other branches. Branch after menodocino (6.2) is called napa so you need to use git checkout --track -b napa origin/napa to build it. Branch after napa will be called oxnard.

Obtaining package sources
Above procedure is enough to build recent images, but not to modify packages.

To obtain source code of a package, go through the following steps: cd /path/to/build-iso git submodule update --init pkgs/$packageName cd pkgs/$packageName git branch $branch --track origin/$branch git checkout $branch

Don't forget to "git pull origin" at times to synchronize your code with the upstream.

To build a package cd to build-iso directory and issue "make $packageName" command. Packages appear in the root of pkgs/ directory.

It's often a good idea to make a new branch for your changes (like "git branch my-changes-description", "git checkout my-changes-description"). Git is good at merging branches so don't hesitate to create as many as you need.

Writing the code
There are three APIs used in Vyatta:
 * Shell API
 * Perl API
 * C API

To define commands Vyatta uses template system. We have a brief introduction to it: CLI internals.

Good feature to take a look to learn how it works is e.g. vyatta-webproxy.

Watching the development
Subscribe to development mailing list. It's intended only for source code changes notifications, no discussion there.

Development is discussed on the hackers forum.

Also you should create a bugtracker account to have possibility to report bugs and submit patches. Bugtracker is at bugzilla.vyatta.com.

If you want to talk to other Vyatta developers and users in real time, use IRC.

Submitting a patch
When you wrote and tested your changes, you will probably want to submit a patch.

Please avoid sending patches produced by diff utility, use git instead. Notify git you have changed some files with "git add path/to/modified/file" and then "git commit". Add a descriptive comment to your commit.

When you are done, issue "git format-patch -N" command where N is number of commits you want to make patches for. For one commit it will be "git format-patch -1".

Now go to bugzilla and create a new bug. Attach your patch with "Add an attachment", set "Severity: Enhancement" and wait for it to be integrated. It may take a long time.

Where to find ideas for development?

 * Take a look at the enhancement poll.
 * Search for bugs with severity set to enhancement.