aboutsummaryrefslogtreecommitdiff
blob: 3d02fa6ad60d32c72d761d6ec29c50037c998a3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#Contributions to the Gentoo Science Overlay

----
##Prerequisite

###Requiered

* **Account at [github](https://github.com/join)**

Everybody who wants to contribute needs to own an account. Please register yourself there.

###Recommended
* **Define echangelog user**

Make sure the ECHANGELOG_USER variable is present in your environment.

    echo 'export ECHANGELOG_USER="John Smith <john@smith.com>"' >> ~/.bashrc

###Optional
* **Setup commit signing**

Create a [gpg key](http://www.gossamer-threads.com/lists/gentoo/dev/268496?do=post_view_threaded) if you don't have one already and make git use it.

    git config --global user.signingkey <gpg-key-id>


* **Install [hub](http://hub.github.com/)**, the "command-line wrapper for git that makes you better at GitHub".

This file will use *hub* because of it's convenience when working with github.

    emerge dev-vcs/hub


----
##For Contributors


First clone 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

Now you are ready to start your work.

It is always convenient for development as well as for the review and merging process, if the development is done in branches.

    git checkout -b my-feature master

Now you can work on you package of interest. Once you are finished you should _always_ use **[repoman](http://dev.gentoo.org/~zmedico/portage/doc/man/repoman.1.html)** to check, verify and commit your changes.

Static analysis can be done with

    repoman full

Once *all* reported problems are resolved, you can commit it

    echangelog "Here we write a comprehensible ChangeLog message"
    repoman -m "Here we write a comprehensible commit message" commit

Next we push back the changes to our fork and send a pull-request to the overlay maintainers.

    hub push YOUR_GITHUB_USER
    hub pull-request

Lastly you need to wait for review comments and the merge of your work. In case you need to include some improvements, just commit your work again using repoman and push it again to your fork. No need to send another pull-request as you new changes will be added the original one.

----
##For Maintainers

**The merging of pull request should only be done by gentoo developers!**

If you feel that they are slacking, don't bother to ping them again. If you like to become a dev yourself, prove some contribution and ping us via sci@gentoo.org or on irc in #gentoo-science @ freenode.

###Prerequisite

Make sure you have both repos (github & gentoo.org) as remotes defined.

    git remote -v

should give

>github	git@github.com:gentoo-science/sci.git (fetch)
>
>github	git@github.com:gentoo-science/sci.git (push)
>
>origin	git+ssh://git@git.overlays.gentoo.org/proj/sci.git (fetch)
>
>origin	git+ssh://git@git.overlays.gentoo.org/proj/sci.git (push)


In the beginning you should review the pull request on github directly and recommend as much improvements as possible. Once everything is fine or you like to fix the rest yourself, simply can use the follow command to get the pull-request in a new branch in you 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. 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.


---
####Contribution to the document
Justin Lecher <jlec@gentoo.org>

This document is available under [Creative Commons Attribution ShareAlike 4.0](http://creativecommons.org/licenses/by-sa/4.0)

![ccsa-4 icon](http://i.creativecommons.org/l/by-sa/4.0/88x31.png)