Contributing

Table of Contents

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

Submitting patches for package repositories

Submitting patches for documentation and the website

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. 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.

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.

However, GitHub does not allow you to configure the project name sent to CIA, so instead, you can create a new project in CIA.vc for your repository.

The steps to setting up a new CIA.vc project are pretty straightforward.

  1. Register an account at CIA.vc if you have not already done so.
  2. Add a new project through the Your Account panel using your repository’s name as the project short name.
  3. Fill out the relevant information in your project’s Metadata section.

After you have created your project, add your project to the list of projects to report in the #exherbo channel.

  1. In the Your Account panel, go to the Bots section and add a bot to the #exherbo channel in the Freenode network.
  2. Add your project at the end of the Filter by project box.
  3. Hit save, then test it out by pushing a commit to your repository.
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.

Style requirements

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.