You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HowToApplyALicense.md 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # How to apply a license
  2. Originally Nextcloud was licensed under the GNU AGPLv3 only. From
  3. June, 16 2016 on we switched to "GNU AGPLv3 or any later version" for
  4. better long-term maintainability and to make it more secure from a
  5. legal point of view.
  6. Additionally Nextcloud doesn't require a CLA (Contributor License
  7. Agreement). The copyright belongs to all the individual
  8. contributors.
  9. ## Apply a license to a new file
  10. If you create a new file please use a license header
  11. #### Frontend source (`.js`, `.ts`, `.css` and etc)
  12. ```js
  13. /**
  14. * @copyright Copyright (c) <year>, <your name> (<your email address>)
  15. *
  16. * @license AGPL-3.0-or-later
  17. *
  18. * This program is free software: you can redistribute it and/or modify
  19. * it under the terms of the GNU Affero General Public License as
  20. * published by the Free Software Foundation, either version 3 of the
  21. * License, or (at your option) any later version.
  22. *
  23. * This program is distributed in the hope that it will be useful,
  24. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. * GNU Affero General Public License for more details.
  27. *
  28. * You should have received a copy of the GNU Affero General Public License
  29. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  30. *
  31. */
  32. ````
  33. or `.vue` files
  34. ```html
  35. <!--
  36. - @copyright Copyright (c) <year>, <your name> (<your email address>)
  37. -
  38. - @license AGPL-3.0-or-later
  39. -
  40. - This program is free software: you can redistribute it and/or modify
  41. - it under the terms of the GNU Affero General Public License as
  42. - published by the Free Software Foundation, either version 3 of the
  43. - License, or (at your option) any later version.
  44. -
  45. - This program is distributed in the hope that it will be useful,
  46. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  47. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  48. - GNU Affero General Public License for more details.
  49. -
  50. - You should have received a copy of the GNU Affero General Public License
  51. - along with this program. If not, see <http://www.gnu.org/licenses/>.
  52. -->
  53. ```
  54. #### Backend source (`.php`)
  55. ```php
  56. /**
  57. * @copyright Copyright (c) <year>, <your name> (<your email address>)
  58. *
  59. * @license GNU AGPL version 3 or any later version
  60. *
  61. * This program is free software: you can redistribute it and/or modify
  62. * it under the terms of the GNU Affero General Public License as
  63. * published by the Free Software Foundation, either version 3 of the
  64. * License, or (at your option) any later version.
  65. *
  66. * This program is distributed in the hope that it will be useful,
  67. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  68. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  69. * GNU Affero General Public License for more details.
  70. *
  71. * You should have received a copy of the GNU Affero General Public License
  72. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  73. *
  74. */
  75. ```
  76. ## Apply a licence to an existing file
  77. If you modify an existing file, please keep the existing license header as
  78. it is and just add your copyright notice, for example:
  79. ````diff
  80. /**
  81. * @copyright Copyright (c) 2022, Alice (alice@nextcloud.local)
  82. * @copyright Copyright (c) 2023, Bob (bob@nextcloud.local)
  83. +* @copyright Copyright (c) <year>, <your name> (<your email address>)
  84. *
  85. * @license GNU AGPL version 3 or any later version
  86. *
  87. * This program is free software: you can redistribute it and/or modify
  88. * it under the terms of the GNU Affero General Public License as
  89. * published by the Free Software Foundation, either version 3 of the
  90. * License, or (at your option) any later version.
  91. *
  92. * This program is distributed in the hope that it will be useful,
  93. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  94. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  95. * GNU Affero General Public License for more details.
  96. *
  97. * You should have received a copy of the GNU Affero General Public License
  98. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  99. *
  100. */
  101. ````
  102. ## DCO
  103. Additionally we require a Developer Certificate of Origin (DCO), look
  104. at [CONTRIBUTING.md][contributing] to learn more how to sign your commits.
  105. [contributing]: ../.github/CONTRIBUTING.md#sign-your-work