For the most convenient way to work with the overlay you should fulfill all prerequisites.
The Science overlay is controlled by git. You can install it with
Familiarize yourself with git and visit http://git-scm.com/documentation for documentation.
Make sure the ECHANGELOG_USER variable is present in your environment.
echo 'export ECHANGELOG_USER="John Smith <firstname.lastname@example.org>"' >> ~/.bashrc
Create a gpg key if you don't have one already and make git use it.
git config --global user.signingkey <gpg-key-id>
Now git will sign your commits to the overlay by using the gpg key.
hub can be used equivalent to to git and upstream even recommends "alias git='hub'.
repo-commit sanitizes your commit in a convenient way.
Create a local checkout of the overlay
hub clone gentoo-science/sci
In order to send pull request and ask for inclusion of your changes you need to have your own fork of the overlay on github. You can do this by issuing
cd sci hub fork
It is always convenient for development as well as for the review and merging process, if the development is done in branches. Let's branch the overlay into a local branch named PACKAGE_NAME.
git checkout -b PACKAGE_NAME master
For the fastest process during merging it is best to have a single branch per package.
Now you are ready to work on your package of interest. Once you are finished you should always use repoman to do a static analysis of your work.
This can be done with
Once all reported problems are resolved, you can commit it
repo-commit "Here we write a comprehensible commit message"
In order to facilitate potential reverts of mistakes, we prefer to keep the git history as linear as possible. For this, always rebase your changes on the latest remote changes.
hub pull --rebase=preserve github master
Next we push back the changes in the PACKAGE_NAME branch to our fork and send a pull-request to the overlay maintainers.
hub push YOUR_GITHUB_USER PACKAGE_NAME hub pull-request
Lastly you need to wait for review comments and the merge of your work. If you feel that they are slacking, don't bother to ping them again. In case you need to include some improvements, just commit your work again using repo-commit and push it again to your fork. No need to send another pull-request as your new changes will be added to the original one.
If you would like to get direct access to the overlay, prove some contribution and ping us via email@example.com or on irc in #gentoo-science @ freenode. If you would like to become a dev yourself, prove some more contributions and again, contact us. We are always looking for new candidates.
As the Gentoo Science overlay is a constant work-in-progress, we have some recommendations for prospective contributors:
It is important, that if you merge a pull request, you should feel as responsible as if you have written the commits yourself!
Make sure you have both repos (github & gentoo.org) as remotes defined.
git remote -v
github firstname.lastname@example.org:gentoo-science/sci.git (fetch)
github email@example.com:gentoo-science/sci.git (push)
origin git+ssh://firstname.lastname@example.org/proj/sci.git (fetch)
origin git+ssh://email@example.com/proj/sci.git (push)
In the beginning you should review the pull request on github directly and recommend as much improvements as possible. By this you train the new contributor towards becoming a new dev, which should be our final goal.
Once everything is fine or you like to fix the rest yourself, simply use the following command to get the pull-request in a new branch in your repo.
hub checkout https://github.com/gentoo-science/sci/pull/PULLREQUEST-NUMBER
Now check the package by building and installing it, and run repoman in the package dir. Remember, when merging a pull request you take the responsibility for the quality of the commit.
If this is also fine, merge the branch into the master
git checkout master git merge USER-BRANCH
Finally use the script merge-dualHEAD from the scripts directory to merge the github and gentoo.org remote repo.
Sebastien Fabbro firstname.lastname@example.org
Justin Lecher email@example.com
This document is available under Creative Commons Attribution ShareAlike 4.0