Developer's Corner
Welcome
So you're interested in getting your hands dirty, perhaps helping out with Kusu development. Below is some useful information to help get you started.
- Welcome
- Accessing Project Kusu Source Code
- Build Prerequisites
- Resources & Information
- Want to help out?
- Setting Up Your Development Environment
- Building the Base Kit ISO
- Submitting Patches
- Obtaining Commit Access
- Relocating Your Working Copy
- Generating an SSH Key
- Coding Conventions
- What Configuration Should be Used for Subversion?
- Understanding Kusu and its Tools
- License
Accessing Project Kusu Source Code
If you're looking for anonymous subversion access, you can run the following command to grab the latest code:
$ svn co http://svn.osgdc.org/kusu-repo/kusu/trunk
If you need to checkout sandbox, you can run the following:
$ svn co http://svn.osgdc.org/kusu-repo/sandbox
Once you've done the initial checkout, you can stay up to date by:
$ svn up
Build Prerequisites
Project Kusu depends on the following (and devel) packages to be present on your system:
- rpm 4+
- rpm-build 4+
- python 2.3.4+
- gcc 4.1.1+
- sqlite 3.3+
- pysqlite 2.3.3
- cmake 2.4.6 (get it from EPEL: i386 | x86_64)
- newt 0.52.2 (needed for snack.py)
- parted 1.8.2
- pyparted 1.8.5
- cpio 2.6 (or patched 2.7)
- util-linux 2.13 (for losetup)
- pam 0.99+
- readline 5+
- tcl-devel 8+
- libxml2-devel 2.6.26+
- ncurses-devel 5+
- e2fsprogs 1.39+
If you are building Kusu on Fedora Core 6, RHEL 5 or CentOS 5, you can install Development Tools and Development Libraries which carry the above prerequisite packages except cmake. You can use yum to do this:
$ yum groupinstall 'Development Tools' $ yum groupinstall 'Development Libraries'
To run the tests you need nose. We recommend first installing EasyInstall. Then, to install nose:
$ easy_install nose
We also recommend installing iPython:
$ easy_install ipython
Resources & Information
Bug Tracking
We use JIRA for tracking issues and bugs in Project Kusu. Our JIRA instance is at http://bugs.osgdc.org. Please read the JIRA Guidelines before posting comments or filing new issues.
Roadmap
We are currently working towards version 0.8_devel. It is scheduled to be released by Q1 2008. You can find the most up-to-date road map status at our bug tracker.
Browsing the Source
We have a comprehensive view of the source code at http://svn.osgdc.org/browse/kusu.
Continuous Build
Project Kusu is continuously built at 2 am, 1 pm and 7 pm daily, Singapore time (SGT). We use Buildbot to automatically rebuild from our source tree. Problems are immediately reported to developers for appropriate action. Status of each build can be viewed here.
Each successfully completed build ISO and source tarball is made available for download.
Scrum
The Kusu development team practices scrum. Our sprints are documented here.
Tips
A few handy tips/shortcuts you can employ to improve your developing experience: Developer Tips
Want to help out?
You are encouraged to sign up to kusu-devel and kusu-commits mailing lists.
Setting Up Your Development Environment
The build process needs to be run using a privileged account such as root. A prerequisite for the ISO creation step is to have mke2fs in the PATH.
First, check out the sources as mentioned above. To build Kusu, first make a directory which will contain the executables so as not to pollute your checkout with build artifacts:
$ mkdir workspace $ cd workspace
Run cmake, pointing it to the checked-out Kusu trunk, then make:
$ cmake /path/to/kusu/trunk $ make
Finally, source kusudevenv.sh to set some environment variables:
$ source kusuroot/bin/kusudevenv.sh
Now all Kusu Python modules are available and Kusu executables should be accessible by your $PATH.
Building the Base Kit ISO
To build the base kit iso, set up your environment as above and cd to the workspace directory.
$ cd workspace
Run the makebasekit.sh
$ ./bin/makebasekit.sh
Now you'll have kit-base-0.1-0.noarch.iso in your workspace directory. NOTE: The makebasekit.sh script will remove a bunch of file from your $KUSU_ROOT directory. You may need to run cmake and make again.
To build a bootable kusu installer iso, run the following commands.
$ mount -o loop distro-disk-1.iso /path-to/distro-src-mnt-pt $ export KUSU_DISTRO_SRC=/path-to/distro-src-mnt-pt/ $ ./bin/makeiso.sh
Submitting Patches
Have you improved Kusu? See Submitting Code for details on submitting your changes for inclusion.
Obtaining Commit Access
Once you provide a steady stream of improvements to the Kusu codebase and we tire of applying patches on your behalf, we will grant you commit access to the source code. Send an email to svn-request@osgdc.org with your SSH public key, including your first and last name. Do let us know what is your preferred commit name.
Relocating Your Working Copy
When you are granted commit access you will need to relocate your working copy of the source code, since code checked out via http is read-only. You can use the switch --relocate Subversion command to achieve this:
$ cd /path/to/checked/out/source $ svn switch --relocate http://svn.osgdc.org/kusu-repo/kusu/trunk \ svn+ssh://kusudev@svn.osgdc.org/kusu/trunk $ svn info | grep Root Repository Root: svn+ssh://kusudev@svn.osgdc.org
Now svn info should report the new Repository Root and you can commit changes.
Generating an SSH Key
You need to use SSH version 2, then generate your key using:
$ ssh-keygen -t rsa
Once your commit access has been configured, access to the code is slightly different:
$ svn co svn+ssh://kusudev@svn.osgdc.org/kusu/trunk
You might want to use ssh-agent if SSH keep asking you for a password:
$ ssh-agent $SHELL $ ssh-add /path/to/my/privkey
To make sure that your key is loaded, you can list the keys currently in your SSH environment:
$ ssh-add -l
For more on SSH keys and ssh-agent, look at this guide or check out Keychain.
Coding Conventions
See our Coding Guide for details on the coding conventions.
What Configuration Should be Used for Subversion?
Make sure the following settings are in your Subversion config file (~/.subverson/config):
[miscellany]
enable-auto-props = yes
[auto-props]
* = svn:eol-style=native
*.c = svn:keywords=Id
*.h = svn:keywords=Id
*.sh = svn:keywords=Id
*.tmpl = svn:keywords=Id
*.spec = svn:keywords=Id
*.py = svn:keywords=Id
*.php = svn:keywords=Id
*.txt = svn:keywords=Author Date Id Revision
Makefile = svn:keywords=Author Date Id Revision
README = svn:keywords=Author Date Id Revision
INSTALL = svn:keywords=Author Date Id Revision
INSTALL.* = svn:keywords=Author Date Id Revision
UPGRADE = svn:keywords=Author Date Id Revision
Alternatively, you can get the config file from us.
Understanding Kusu and its Tools
We have some high level documentations on Kusu Architecture and its various tools.
License
Project Kusu is licensed under GNU General Public License(GPL), Version 2.
Kits are licensed under GNU Lesser General Public License(LGPL), Version 2.1.