Merge pull request #4948 from ldir-EDB0/remwireguard
[feed/packages.git] / CONTRIBUTING.md
1 # Contributing Guidelines
2 (See <http://wiki.openwrt.org/doc/devel/packages> for overall format and construction)
3
4
5 ### Basic guidelines
6
7 All packages you commit or submit by pull-request should follow these simple guidelines:
8 * Package a version which is still maintained by the upstream author.
9 * Will be updated regularly to maintained and supported versions.
10 * Have no dependencies outside the OpenWrt core packages or this repository feed.
11 * Have been tested to compile with the correct includes and dependencies. Please also test with "Compile with full language support" found under "General Build Settings" set if language support is relevant to your package.
12 * Do NOT use a rolling source file (e.g. foo-latest.tar.gz) or the head of a branch as source for the package since that would create unpredictable builds which change over time.
13 * Best of all -- it works as expected!
14
15 #### Makefile contents should contain:
16
17 * An up-to-date copyright notice. Use OpenWrt if no other present or supply your own.
18 * A (PKG_)MAINTAINER definition listing either yourself or another person in the field.
19 (E.g.: PKG_MAINTAINER:= Joe D. Hacker `<jdh@jdhs-email-provider.org`>)
20 * A PKG_LICENSE tag declaring the main license of the package.
21 (E.g.: PKG_LICENSE:=GPL-2.0+) Please use SPDX identifiers if possible (see list at the bottom).
22 * An optional PKG_LICENSE_FILES tag including the filenames of the license-files in the source-package.
23 (E.g.: PKG_LICENSE_FILES:=COPYING)
24 * PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE.
25 * Avoid reuse of PKG_NAME in call, define and eval lines to improve readability.
26
27 #### Commits in your pull-requests should:
28
29 * Have a useful description prefixed with the package name
30 (E.g.: "foopkg: Add libzot dependency")
31 * Include Signed-off-by in the comment
32 (See <https://dev.openwrt.org/wiki/SubmittingPatches#a10.Signyourwork>)
33
34 ### Advice on pull requests:
35
36 Pull requests are the easiest way to contribute changes to git repos at Github. They are the preferred contribution method, as they offer a nice way for commenting and amending the proposed changes.
37
38 * You need a local "fork" of the Github repo.
39 * Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request. Workflow using "feature_x" as the example:
40 - Update your local git fork to the tip (of the master, usually)
41 - Create the feature branch with `git checkout -b feature_x`
42 - Edit changes and commit them locally
43 - Push them to your Github fork by `git push -u origin feature_x`. That creates the "feature_x" branch at your Github fork and sets it as the remote of this branch
44 - When you now visit Github, you should see a proposal to create a pull request
45
46 * If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then use `git push` to automatically update the pull request.
47
48 * If you need to change something in the existing pull request (e.g. to add a missing signed-off-by line to the commit message), you can use `git push -f` to overwrite the original commits. That is easy and safe when using a feature branch. Example workflow:
49 - Checkout the feature branch by `git checkout feature_x`
50 - Edit changes and commit them locally. If you are just updating the commit message in the last commit, you can use `git commit --amend` to do that
51 - If you added several new commits or made other changes that require cleaning up, you can use `git rebase -i HEAD~X` (X = number of commits to edit) to possibly squash some commits
52 - Push the changed commits to Github with `git push -f` to overwrite the original commits in the "feature_x" branch with the new ones. The pull request gets automatically updated
53
54 ### If you have commit access:
55
56 * Do NOT use git push --force.
57 * Do NOT commit to other maintainer's packages without their consent.
58 * Use Pull Requests if you are unsure and to suggest changes to other maintainers.
59
60 #### Gaining commit access:
61
62 * We will gladly grant commit access to responsible contributors who have made
63 useful pull requests and / or feedback or patches to this repository or
64 OpenWrt in general. Please include your request for commit access in your
65 next pull request or ticket.
66
67 ### Release Branches:
68
69 * Branches named "for-XX.YY" (e.g. for-14.07) are release branches.
70 * These branches are built with the respective OpenWrt release and are created
71 during the release stabilisation phase.
72 * Please ONLY cherry-pick or commit security and bug-fixes to these branches.
73 * Do NOT add new packages and do NOT do major upgrades of packages here.
74 * If you are unsure if your change is suitable, please use a pull request.
75
76 ### Common LICENSE tags (short list)
77 (Complete list can be found at: <http://spdx.org/licenses>)
78
79 | Full Name | Identifier |
80 |---|:---|
81 |Apache License 1.0|Apache-1.0|
82 |Apache License 1.1|Apache-1.1|
83 |Apache License 2.0|Apache-2.0|
84 |Artistic License 1.0|Artistic-1.0|
85 |Artistic License 1.0 (Perl)|Artistic-1.0-Perl|
86 |Artistic License 1.0 w/clause 8|Artistic-1.0-cl8|
87 |Artistic License 2.0|Artistic-2.0|
88 |BSD 2-clause "Simplified" License|BSD-2-Clause|
89 |BSD 2-clause FreeBSD License|BSD-2-Clause-FreeBSD|
90 |BSD 2-clause NetBSD License|BSD-2-Clause-NetBSD|
91 |BSD 3-clause "New" or "Revised" License|BSD-3-Clause|
92 |BSD 3-clause Clear License|BSD-3-Clause-Clear|
93 |BSD 4-clause "Original" or "Old" License|BSD-4-Clause|
94 |BSD Protection License|BSD-Protection|
95 |BSD with attribution|BSD-3-Clause-Attribution|
96 |BSD-4-Clause (University of California-Specific)|BSD-4-Clause-UC|
97 |GNU General Public License v1.0 only|GPL-1.0|
98 |GNU General Public License v1.0 or later|GPL-1.0+|
99 |GNU General Public License v2.0 only|GPL-2.0|
100 |GNU General Public License v2.0 or later|GPL-2.0+|
101 |GNU General Public License v3.0 only|GPL-3.0|
102 |GNU General Public License v3.0 or later|GPL-3.0+|
103 |GNU Lesser General Public License v2.1 only|LGPL-2.1|
104 |GNU Lesser General Public License v2.1 or later|LGPL-2.1+|
105 |GNU Lesser General Public License v3.0 only|LGPL-3.0|
106 |GNU Lesser General Public License v3.0 or later|LGPL-3.0+|
107 |GNU Library General Public License v2 only|LGPL-2.0|
108 |GNU Library General Public License v2 or later|LGPL-2.0+|
109 |Fair License|Fair|
110 |ISC License|ISC|
111 |MIT License|MIT|
112 |No Limit Public License|NLPL|
113 |OpenSSL License|OpenSSL|
114 |X11 License|X11|
115 |zlib License|Zlib|