Contributing Documentation

Contributing Code

Overview

Exherbo uses git for source code management (SCM). Some of the guidelines outlined in this document are based upon Documentation/SubmittingPatches, as part of git.git

Style requirements

Submitting patches for package repositories

Submitting your repository for inclusion in unavailable-unofficial

If you have your own repository and its quality is fairly high, you should submit it for review so it will be included in unavailable-unofficial. To do it, just queue the url of your repository to unavailable-unofficial using the patchbot,e.g.: !pq git://foo.bar/foo.git ::unavailable-unofficial. This way, others will not duplicate any work you may have done, and you will get helpful tips on how to improve your packaging skills. Also, this will allow others to more easily contribute to your packages or point out bugs. See kloeri’s blog post if you are not yet convinced.

We expect a decent level of responsiveness from you and we reserve the right to remove repositories with broken packages if you do not respond to patches and inquiries within a reasonable amount of time. Remember that it is trivial to have your repository re-added once it is fixed up again

Setting up your repository to report commits with CIA.vc

It is recommended to use CIA.vc to report commits from your own repository to #exherbo so that others can easily see any activity. This makes it easier for others to catch errors or make suggestions as soon as a change is committed rather than when it becomes a problem.

Setting up a post-receive hook in your remote repository

Depending on what service you use to host your repository, there are several methods of doing this.

GitHub

With GitHub, enabling CIA.vc reporting is simply a matter of checking the Active box for CIA in the Service Hooks in the Admin panel for your repository. Write Exherbo in the Project box and your repository name in the Module box.

Gitorious

Gitorious currently does not allow you to add hooks to your repositories, so for now you can set up a CIA repository locally which you can configure the same as below. This way, when you push to this repository, your commits will be reported as usual.

A remote repository in which you can manually set up git hooks

Add a post-receive hook to your remote repository to send commit notifications to CIA.vc. To do this, you should save ciabot.bash to the hooks directory in your repository and configure it as needed.

Next, add a post receive hook similar to the one below to the hooks directory in your git repository.

#!/bin/bash

while read oldrev newrev refname ; do
    refname=${refname#refs/heads/}
    for merged in $(git rev-list --reverse ${newrev} ^${oldrev}) ; do
        bash hooks/ciabot.bash ${refname} ${merged}
    done
done

Now, when you push to this repository, commits should be reported to #exherbo.

Caveats


Copyright 2009 Ingmar Vanhassel

This work is licensed under the Creative Commons Attribution Share Alike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/; or, (b) send a letter to Creative Commons, 171 2nd Street, Suite 300, San Francisco, California, 94105, USA.