Merge "Migrate old wiki Copyright best practices"
[docs.git] / docs / contributor-guides / copyright.rst
1 ###########################
2 About Copyright and License
3 ###########################
4
5 *Note: This document is a work in progress.*
6
7 Contributors must comply with `the terms of the OpenDaylight Technical charter
8 <https://www.opendaylight.org/wp-content/uploads/sites/14/2018/01/ODL-Technical-Charter-LF-Projects-LLC-FINAL.pdf>`__.
9
10 Following are the requirements with regards to Copyright and License statements
11 in all source code in the OpenDaylight projects.
12
13 New Files
14 =========
15
16 Every file should contain a copyright statement, which at a minimum states that
17 the source code is available under the Eclipse Public License (EPL)
18 or a compatible license.
19 By placing the copyright in all source files, downstream consumers of
20 OpenDaylight can refer to their redistribution clauses.
21
22 *The OpenDaylight Project does not request or require copyright assignment to
23 the OpenDaylight non-profit organization, so adding the original contributor's
24 name or company is allowed.*
25
26 *A missing copyright statement is treated as a bug so the EPL license can
27 at least be added for downstream consumers.*
28
29 Possible structure of the EPL copyright header:
30
31 .. code:: text
32
33    /**
34     * Copyright (c) <Date> <Company or Individual> and others.  All rights reserved.
35     *
36     * This program and the accompanying materials are made available under the
37     * terms of the Eclipse Public License v1.0 which accompanies this distribution,
38     * and is available at http://www.eclipse.org/legal/epl-v10.html
39     **/
40
41 .. note::
42
43    If you are contributing to OpenDaylight on behalf of a company or
44    organization, please check with your company's legal department
45    if you need to use your company name's or if you can use your personal
46    name as the copyright holder.
47    Be sure to place the current date and company name in the copyright.
48    If copying a copyright please make sure that you place the correct
49    company's name into the copyright (i.e. if you copy an existing
50    copyright statement, make sure you change the name to give credit to
51    the correct people or organizations!).
52
53
54 Edited Files
55 ============
56
57 If you, the editor, feel like you have made a *significant* contribution
58 for which you want to issue a copyright, then modify the copyright,
59 adding your company's name or individual name into the original header.
60
61 .. code:: text
62
63    /**
64     * Copyright (c) <Date> Existing Company One, and others.  All rights reserved.
65     * Copyright (c) <Date> New Company Two
66     *
67     * This program and the accompanying materials are made available under the
68     * terms of the Eclipse Public License v1.0 which accompanies this distribution,
69     * and is available at http://www.eclipse.org/legal/epl-v10.html
70     **/
71
72 In the example above, "New Company Two" was added into the copy right.
73 "Existing Company One" already existed and remained in the copyright header.
74 Whether or not you edit the existing copyright is up to you.
75
76 .. note::
77
78    Never remove or replace the copyright on a file.
79    The original author still retains the copyright on the original work.
80    You retain the copyright on the new edits only.
81    *Significant* is purposely left vague to be left to your best judgement.
82    At the end of the day if the issue of who owns what changes ever arises
83    it will be left to the lawyers and judges to determine the copyright
84    ownership. Remember, all changes are logged in the git repository.