..
    This file is part of Invenio.
    Copyright (C) 2018 CERN.

    Invenio is free software; you can redistribute it and/or modify it
    under the terms of the MIT License; see LICENSE file for more details.

Copyright and license policy
============================

License
-------
All released source code should by default be licensed under MIT License.
Exceptions may be made to this policy on a case-by-case basis. Reasons for
exceptions could be (but not limited to):

- Source code already released under another permissive license (e.g. Apache
  v2, BSD) or LGPL.

In all cases, source code should not be released under a copyleft license like
GPL or AGPL.

Tracking copyright
------------------
**Copyright statements**

Copyright statements must be included in:

- ``LICENSE`` file in the root of the repository.
- Headers of all source code files.

Each copyright holder must have their own copyright statement::

    Copyright (C) 2015-2018 CERN
    Copyright (C) 2017 TIND

**Copyright holders**

Each copyright holder **must** be a legal entity.

Copyright is tracked for non-trivial contributions (i.e. creative work). By
default we consider anything above 15 lines for a non-trivial contribution.
Examples for which we do not track copyright is e.g. fixing a typo or tiny
bug fixes.

**Maintainer responsibility**

Maintainers are responsible for asking each contributor who is the copyright
holder of a given contribution (often, it's the employer who holds the
copyright).

**Attribution**

Attribution is not tracked via copyright, but via the ``AUTHORS`` file.

.. note::

    **Legal entity:** A legal entity can be human (physical persons) or
    non-human (juridical persons, e.g. corporations). A legal entity has
    privileges and obligations such as being able to enter into contracts, to
    sue or be sued. Thus, e.g. CERN is a legal entity but e.g. ATLAS, CMS and
    Invenio Collaboration are not considered legal entities by the law.

Explicit agreement
------------------
**Contribtions only via GitHub**

All contributions must be opened via pull requests on GitHub.

This way contributors have agreed to the GitHub Terms of Use,
which `states <https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license>`_:

    "Whenever you make a contribution to a repository containing notice of a
    license, you license your contribution under the same terms, and you agree
    that you have the right to license your contribution under those terms."

This method avoid introducing either a Contributor License Agreement (CLAs) or
a Developer Certificate of Origin.
