licensee 9.15.2 → 9.15.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/licensee/license.rb +1 -1
  3. data/lib/licensee/matchers/copyright.rb +3 -1
  4. data/lib/licensee/matchers/dist_zilla.rb +1 -0
  5. data/lib/licensee/projects/github_project.rb +1 -1
  6. data/lib/licensee/version.rb +1 -1
  7. data/licensee.gemspec +2 -2
  8. data/spec/fixtures/detect.json +2 -2
  9. data/spec/fixtures/license-hashes.json +4 -0
  10. data/spec/licensee/commands/detect_spec.rb +2 -2
  11. data/spec/licensee/license_meta_spec.rb +3 -3
  12. data/spec/licensee/license_spec.rb +7 -2
  13. data/spec/licensee/matchers/copyright_matcher_spec.rb +12 -3
  14. data/spec/licensee/matchers/dice_matcher_spec.rb +2 -2
  15. data/spec/licensee_spec.rb +1 -1
  16. data/vendor/choosealicense.com/_licenses/agpl-3.0.txt +3 -0
  17. data/vendor/choosealicense.com/_licenses/apache-2.0.txt +1 -1
  18. data/vendor/choosealicense.com/_licenses/bsd-2-clause.txt +0 -1
  19. data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +0 -1
  20. data/vendor/choosealicense.com/_licenses/bsl-1.0.txt +1 -1
  21. data/vendor/choosealicense.com/_licenses/cecill-2.1.txt +1 -0
  22. data/vendor/choosealicense.com/_licenses/cern-ohl-p-2.0.txt +216 -0
  23. data/vendor/choosealicense.com/_licenses/cern-ohl-s-2.0.txt +299 -0
  24. data/vendor/choosealicense.com/_licenses/cern-ohl-w-2.0.txt +321 -0
  25. data/vendor/choosealicense.com/_licenses/eupl-1.1.txt +1 -1
  26. data/vendor/choosealicense.com/_licenses/gfdl-1.3.txt +483 -0
  27. data/vendor/choosealicense.com/_licenses/mit.txt +1 -1
  28. data/vendor/choosealicense.com/_licenses/mulanpsl-2.0.txt +55 -56
  29. data/vendor/choosealicense.com/_licenses/unlicense.txt +1 -1
  30. data/vendor/license-list-XML/src/BSD-3-Clause.xml +3 -1
  31. data/vendor/license-list-XML/src/BSD-4-Clause.xml +3 -3
  32. data/vendor/license-list-XML/src/CERN-OHL-P-2.0.xml +90 -0
  33. data/vendor/license-list-XML/src/CERN-OHL-S-2.0.xml +109 -0
  34. data/vendor/license-list-XML/src/CERN-OHL-W-2.0.xml +116 -0
  35. data/vendor/license-list-XML/src/GFDL-1.3.xml +594 -0
  36. data/vendor/license-list-XML/src/LGPL-3.0.xml +828 -1
  37. data/vendor/license-list-XML/src/MPL-2.0.xml +66 -29
  38. metadata +29 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 334874469d14f16839113e4311ba232c18a8bc8d0ee0c618034ec30e16497f47
4
- data.tar.gz: aaca8fc841545017ee7dc58e02a8ce41845d3253a281153b599f187218c6fc6a
3
+ metadata.gz: e6b54db113cb4f1c4933826886afe3ed5e4b66d757a97df74dc43dbb2f8d6bc7
4
+ data.tar.gz: 72fa1baf7073bfb9132823d1953977ab49618d03320694647d6947b66aee311f
5
5
  SHA512:
6
- metadata.gz: 7cd4ba6ef792da1ca97536e14b78d92c2fddf01dd14405fb859ad74db0f30018af62ea67af39a754f4a568f83f14a932d501772d83f1b5d19d22833fd8937e20
7
- data.tar.gz: 9fa7c61dde8ce35d2003c1119206047c3a35179e17484d0d5528e145f99bab29882c3da004a22214c777f758ade7607289a0d73a696135cc3a9c49467ed24238
6
+ metadata.gz: 461a7ed0479855f6e2c08353ee902b2b8f53661d24161ef22f6c7dbb0f9db1ee375f6fc4e196d1c266cd5830221525af471c9158b64891fa4b0b0b7b373e6eac
7
+ data.tar.gz: '09bfdd2cb1d12bd2b4a32bad1de90c65058d9ab1f3ed98ccb94ed9657b8965e236d4be84ce32e7801edf071de3ca7154d34455bfa749d29b1d89d9030c9a0ca4'
@@ -216,7 +216,7 @@ module Licensee
216
216
  end
217
217
 
218
218
  def ==(other)
219
- !other.nil? && key == other.key
219
+ other.is_a?(self.class) && key == other.key
220
220
  end
221
221
 
222
222
  def pseudo_license?
@@ -6,7 +6,9 @@ module Licensee
6
6
  attr_reader :file
7
7
 
8
8
  COPYRIGHT_SYMBOLS = Regexp.union([/copyright/i, /\(c\)/i, "\u00A9", "\xC2\xA9"])
9
- REGEX = /#{ContentHelper::START_REGEX}([_*\-\s]*#{COPYRIGHT_SYMBOLS}.*$)+$/i.freeze
9
+ MAIN_LINE_REGEX = /[_*\-\s]*#{COPYRIGHT_SYMBOLS}.*$/i.freeze
10
+ OPTIONAL_LINE_REGEX = /[_*\-\s]*with Reserved Font Name.*$/i.freeze
11
+ REGEX = /#{ContentHelper::START_REGEX}(#{MAIN_LINE_REGEX}#{OPTIONAL_LINE_REGEX}*)+$/i.freeze
10
12
  def match
11
13
  # NOTE: must use content, and not content_normalized here
12
14
  Licensee::License.find('no-license') if /#{REGEX}+\z/io.match?(file.content.strip)
@@ -19,6 +19,7 @@ module Licensee
19
19
  .sub('_', '.')
20
20
  .sub('Mozilla', 'MPL')
21
21
  .sub(/^GPL-(\d)$/, 'GPL-\1.0')
22
+ .sub(/^AGPL-(\d)$/, 'AGPL-\1.0')
22
23
  end
23
24
  end
24
25
  end
@@ -60,7 +60,7 @@ module Licensee
60
60
  end
61
61
 
62
62
  def access_token
63
- ENV['OCTOKIT_ACCESS_TOKEN']
63
+ ENV.fetch('OCTOKIT_ACCESS_TOKEN', nil)
64
64
  end
65
65
  end
66
66
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Licensee
4
- VERSION = '9.15.2'
4
+ VERSION = '9.15.3'
5
5
  end
data/licensee.gemspec CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |gem|
22
22
  gem.executables << 'licensee'
23
23
 
24
24
  gem.add_dependency('dotenv', '~> 2.0')
25
- gem.add_dependency('octokit', '~> 4.20')
26
- gem.add_dependency('reverse_markdown', '~> 1.0')
25
+ gem.add_dependency('octokit', '>= 4.20', '< 7.0')
26
+ gem.add_dependency('reverse_markdown', '>= 1', '< 3')
27
27
  gem.add_dependency('rugged', '>= 0.24', '<2.0')
28
28
  gem.add_dependency('thor', '>= 0.19', '< 2.0')
29
29
 
@@ -10,7 +10,7 @@
10
10
  "how": "Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.",
11
11
  "using": {
12
12
  "Babel": "https://github.com/babel/babel/blob/master/LICENSE",
13
- ".NET Core": "https://github.com/dotnet/runtime/blob/master/LICENSE.TXT",
13
+ ".NET": "https://github.com/dotnet/runtime/blob/main/LICENSE.TXT",
14
14
  "Rails": "https://github.com/rails/rails/blob/master/MIT-LICENSE"
15
15
  },
16
16
  "featured": true,
@@ -93,7 +93,7 @@
93
93
  },
94
94
  {
95
95
  "filename": "licensee.gemspec",
96
- "content": "# frozen_string_literal: true\n\nrequire File.expand_path('lib/licensee/version', __dir__)\n\nGem::Specification.new do |gem|\n gem.name = 'licensee'\n gem.version = Licensee::VERSION\n\n gem.summary = 'A Ruby Gem to detect open source project licenses'\n gem.description = <<-DESC\n Licensee automates the process of reading LICENSE files and\n compares their contents to known licenses using a fancy maths.\n DESC\n\n gem.authors = ['Ben Balter']\n gem.email = 'ben.balter@github.com'\n gem.homepage = 'https://github.com/benbalter/licensee'\n gem.license = 'MIT'\n gem.metadata['rubygems_mfa_required'] = 'true'\n\n gem.bindir = 'bin'\n gem.executables << 'licensee'\n\n gem.add_dependency('dotenv', '~> 2.0')\n gem.add_dependency('octokit', '~> 4.20')\n gem.add_dependency('reverse_markdown', '~> 1.0')\n gem.add_dependency('rugged', '>= 0.24', '<2.0')\n gem.add_dependency('thor', '>= 0.19', '< 2.0')\n\n gem.add_development_dependency('gem-release', '~> 2.0')\n gem.add_development_dependency('mustache', '>= 0.9', '< 2.0')\n gem.add_development_dependency('pry', '~> 0.9')\n gem.add_development_dependency('rspec', '~> 3.5')\n gem.add_development_dependency('rubocop', '~> 1.0')\n gem.add_development_dependency('rubocop-performance', '~> 1.5')\n gem.add_development_dependency('rubocop-rspec', '~> 2.0')\n gem.add_development_dependency('simplecov', '~> 0.16')\n gem.add_development_dependency('webmock', '~> 3.1')\n\n gem.required_ruby_version = '>= 2.5'\n\n # ensure the gem is built out of versioned files\n gem.files = Dir[\n '{bin,lib,man,test,vendor,spec}/**/*',\n 'README*', 'LICENSE*'\n ] & `git ls-files -z`.split(\"\\0\")\nend\n",
96
+ "content": "# frozen_string_literal: true\n\nrequire File.expand_path('lib/licensee/version', __dir__)\n\nGem::Specification.new do |gem|\n gem.name = 'licensee'\n gem.version = Licensee::VERSION\n\n gem.summary = 'A Ruby Gem to detect open source project licenses'\n gem.description = <<-DESC\n Licensee automates the process of reading LICENSE files and\n compares their contents to known licenses using a fancy maths.\n DESC\n\n gem.authors = ['Ben Balter']\n gem.email = 'ben.balter@github.com'\n gem.homepage = 'https://github.com/benbalter/licensee'\n gem.license = 'MIT'\n gem.metadata['rubygems_mfa_required'] = 'true'\n\n gem.bindir = 'bin'\n gem.executables << 'licensee'\n\n gem.add_dependency('dotenv', '~> 2.0')\n gem.add_dependency('octokit', '>= 4.20', '< 6.0')\n gem.add_dependency('reverse_markdown', '>= 1', '< 3')\n gem.add_dependency('rugged', '>= 0.24', '<2.0')\n gem.add_dependency('thor', '>= 0.19', '< 2.0')\n\n gem.add_development_dependency('gem-release', '~> 2.0')\n gem.add_development_dependency('mustache', '>= 0.9', '< 2.0')\n gem.add_development_dependency('pry', '~> 0.9')\n gem.add_development_dependency('rspec', '~> 3.5')\n gem.add_development_dependency('rubocop', '~> 1.0')\n gem.add_development_dependency('rubocop-performance', '~> 1.5')\n gem.add_development_dependency('rubocop-rspec', '~> 2.0')\n gem.add_development_dependency('simplecov', '~> 0.16')\n gem.add_development_dependency('webmock', '~> 3.1')\n\n gem.required_ruby_version = '>= 2.5'\n\n # ensure the gem is built out of versioned files\n gem.files = Dir[\n '{bin,lib,man,test,vendor,spec}/**/*',\n 'README*', 'LICENSE*'\n ] & `git ls-files -z`.split(\"\\0\")\nend\n",
97
97
  "content_hash": null,
98
98
  "content_normalized": null,
99
99
  "matcher": {
@@ -13,11 +13,15 @@
13
13
  "cc-by-sa-4.0": "0684e2df6671166351097b387abc0d1170d26f2f",
14
14
  "cc0-1.0": "94c8187ec82b2b4a69fb990f80833fbe6e3c95e7",
15
15
  "cecill-2.1": "edb804827a40bcdcf3e82b6bab3bd1f5b923ac74",
16
+ "cern-ohl-p-2.0": "f10b4b8d75502ab65a7bdbe1d616e5eb8d157aed",
17
+ "cern-ohl-s-2.0": "c9a4188fec2c6a98ea9392cf9a26633fe7fd0e42",
18
+ "cern-ohl-w-2.0": "099c18c653223d137a5ce8331d8a4ebbacaf1623",
16
19
  "ecl-2.0": "296976ce9e84ba380866e4519b68a779c2059b3a",
17
20
  "epl-1.0": "5e3cb10996b4ba2821d04d5c99a912c924b3bdcb",
18
21
  "epl-2.0": "e2f3e266432478d9248422228a75a404cce1c43c",
19
22
  "eupl-1.1": "b35810b4113910f5f85af75f24e2538ba64c8876",
20
23
  "eupl-1.2": "2098182069695981c6dc71093888f6204c7bbdae",
24
+ "gfdl-1.3": "164a858691ea0a6fb0dd06c5ca00e5dd7620eef8",
21
25
  "gpl-2.0": "32108116603c30687d8d0d2f77f140fb6ecea082",
22
26
  "gpl-3.0": "7d4cdf499d39e2e1ce27b2878e22872f0f5a74dd",
23
27
  "isc": "7fcb74e2084b361556b8285d6f800495d0d5e36a",
@@ -59,7 +59,7 @@ RSpec.describe 'detect command' do
59
59
 
60
60
  context 'json' do
61
61
  let(:arguments) { ['--json'] }
62
- let(:expected) { JSON.parse fixture_contents('detect.json') }
62
+ let(:expected) { JSON.parse(fixture_contents('detect.json')).tap { |h| h['matched_files'][1].delete('content') } }
63
63
 
64
64
  it 'Returns a zero exit code' do
65
65
  expect(status.exitstatus).to be(0)
@@ -72,7 +72,7 @@ RSpec.describe 'detect command' do
72
72
  it 'returns the expected output' do
73
73
  msg = +'`licensee detect --json` output did not match expectations. '
74
74
  msg << 'Run `script/dump-detect-json-fixture` and verify the output.'
75
- expect(JSON.parse(stdout)).to eql(expected), msg
75
+ expect(JSON.parse(stdout).tap { |h| h['matched_files'][1].delete('content') }).to eql(expected), msg
76
76
  end
77
77
  end
78
78
 
@@ -116,9 +116,9 @@ RSpec.describe Licensee::LicenseMeta do
116
116
  let(:hash) { subject.to_h }
117
117
  let(:using) do
118
118
  {
119
- 'Babel' => 'https://github.com/babel/babel/blob/master/LICENSE',
120
- '.NET Core' => 'https://github.com/dotnet/runtime/blob/master/LICENSE.TXT',
121
- 'Rails' => 'https://github.com/rails/rails/blob/master/MIT-LICENSE'
119
+ 'Babel' => 'https://github.com/babel/babel/blob/master/LICENSE',
120
+ '.NET' => 'https://github.com/dotnet/runtime/blob/main/LICENSE.TXT',
121
+ 'Rails' => 'https://github.com/rails/rails/blob/master/MIT-LICENSE'
122
122
  }
123
123
  end
124
124
  let(:expected) do
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Licensee::License do
4
- let(:license_count) { 43 }
5
- let(:hidden_license_count) { 30 }
4
+ let(:license_count) { 47 }
5
+ let(:hidden_license_count) { 34 }
6
6
  let(:featured_license_count) { 3 }
7
7
  let(:pseudo_license_count) { 2 }
8
8
  let(:non_featured_license_count) do
@@ -301,9 +301,14 @@ RSpec.describe Licensee::License do
301
301
 
302
302
  it 'knows equality' do
303
303
  expect(described_class.find('mit')).to eql(mit)
304
+ expect(described_class.find('mit')).to eq(mit)
304
305
  expect(gpl).not_to eql(mit)
305
306
  end
306
307
 
308
+ it 'returns false when compared to a boolean' do
309
+ expect(described_class.find('mit')).not_to be(true)
310
+ end
311
+
307
312
  it 'knows if a license is a pseudo license' do
308
313
  expect(mit).not_to be_pseudo_license
309
314
  expect(other).to be_pseudo_license
@@ -27,10 +27,11 @@ RSpec.describe Licensee::Matchers::Copyright do
27
27
  'UTF-8 Encoded' => 'Copyright (c) 2010-2014 Simon Hürlimann',
28
28
  'Comma-separated date' => 'Copyright (c) 2003, 2004 Ben Balter',
29
29
  'Hyphen-separated date' => 'Copyright (c) 2003-2004 Ben Balter',
30
- 'ASCII-8BIT encoded' => "Copyright \xC2\xA92015 Ben Balter`",
30
+ 'ASCII-8BIT encoded' => "Copyright \xC2\xA92015 Ben Balter`"
31
+ .dup.force_encoding('ASCII-8BIT'),
31
32
  'No year' => 'Copyright Ben Balter',
32
- 'Multiline' => "Copyright Ben Balter\nCopyright Another Entity"
33
- .dup.force_encoding('ASCII-8BIT')
33
+ 'Multiline' => "Copyright Ben Balter\nCopyright Another Entity",
34
+ 'OFL font name' => "Copyright (c) 2016, Ben Balter,\nwith Reserved Font Name \"Ben's Font\"."
34
35
  }.each do |description, notice|
35
36
  context "with a #{description} notice" do
36
37
  let(:content) { notice }
@@ -41,6 +42,14 @@ RSpec.describe Licensee::Matchers::Copyright do
41
42
  end
42
43
  end
43
44
 
45
+ context 'with arbitrary additional notice line' do
46
+ let(:content) { "(c) Ben Balter\nwith foo bar baz" }
47
+
48
+ it "doesn't match" do
49
+ expect(subject.match).to be_nil
50
+ end
51
+ end
52
+
44
53
  context 'with a license with a copyright notice' do
45
54
  let(:content) { sub_copyright_info(mit) }
46
55
 
@@ -34,7 +34,7 @@ RSpec.describe Licensee::Matchers::Dice do
34
34
  let(:content) { 'Not really a license' }
35
35
 
36
36
  it "doesn't match" do
37
- expect(subject.match).to be(nil)
37
+ expect(subject.match).to be_nil
38
38
  expect(subject.matches).to be_empty
39
39
  expect(subject.confidence).to be(0)
40
40
  end
@@ -47,7 +47,7 @@ RSpec.describe Licensee::Matchers::Dice do
47
47
 
48
48
  it "doesn't match" do
49
49
  expect(content).not_to be_detected_as(gpl)
50
- expect(subject.match).to be(nil)
50
+ expect(subject.match).to be_nil
51
51
  expect(subject.matches).to be_empty
52
52
  expect(subject.confidence).to be(0)
53
53
  end
@@ -4,7 +4,7 @@ RSpec.describe Licensee do
4
4
  let(:project_path) { fixture_path('mit') }
5
5
  let(:license_path) { fixture_path('mit/LICENSE.txt') }
6
6
  let(:mit_license) { Licensee::License.find('mit') }
7
- let(:hidden_license_count) { 43 }
7
+ let(:hidden_license_count) { 47 }
8
8
 
9
9
  it 'exposes licenses' do
10
10
  expect(described_class.licenses).to be_an(Array)
@@ -12,6 +12,9 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
12
12
  note: The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the license.
13
13
 
14
14
  using:
15
+ Grafana: https://github.com/grafana/grafana/blob/main/LICENSE
16
+ Mastodon: https://github.com/mastodon/mastodon/blob/main/LICENSE
17
+ Nextcloud Server: https://github.com/nextcloud/server/blob/master/COPYING
15
18
 
16
19
  permissions:
17
20
  - commercial-use
@@ -9,7 +9,7 @@ description: A permissive license whose main conditions require preservation of
9
9
 
10
10
  how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.
11
11
 
12
- note: The Apache Foundation recommends taking the additional step of adding a boilerplate notice to the header of each source file. You can find the notice in the appendix at the very end of the license text.
12
+ note: The Apache Software Foundation <a href="https://apache.org/foundation/license-faq.html#Apply-My-Software">recommends</a> taking the additional step of adding a boilerplate notice to the header of each source file. You can find the notice in the appendix at the very end of the license text.
13
13
 
14
14
  using:
15
15
  Kubernetes: https://github.com/kubernetes/kubernetes/blob/master/LICENSE
@@ -31,7 +31,6 @@ limitations:
31
31
  BSD 2-Clause License
32
32
 
33
33
  Copyright (c) [year], [fullname]
34
- All rights reserved.
35
34
 
36
35
  Redistribution and use in source and binary forms, with or without
37
36
  modification, are permitted provided that the following conditions are met:
@@ -30,7 +30,6 @@ limitations:
30
30
  BSD 3-Clause License
31
31
 
32
32
  Copyright (c) [year], [fullname]
33
- All rights reserved.
34
33
 
35
34
  Redistribution and use in source and binary forms, with or without
36
35
  modification, are permitted provided that the following conditions are met:
@@ -7,7 +7,7 @@ description: A simple permissive license only requiring preservation of copyrigh
7
7
 
8
8
  how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.
9
9
 
10
- note: Boost recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the [Boost Software License FAQ](https://www.boost.org/users/license.html#FAQ).
10
+ note: Boost recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the <a href="https://www.boost.org/users/license.html#FAQ">Boost Software License FAQ</a>.
11
11
 
12
12
  using:
13
13
  Boost: https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt
@@ -20,6 +20,7 @@ permissions:
20
20
 
21
21
  conditions:
22
22
  - include-copyright
23
+ - network-use-disclose
23
24
  - disclose-source
24
25
  - same-license
25
26
 
@@ -0,0 +1,216 @@
1
+ ---
2
+ title: CERN Open Hardware Licence Version 2 - Permissive
3
+ spdx-id: CERN-OHL-P-2.0
4
+ nickname: CERN OHL v2 Permissive
5
+
6
+ description: A permissive license for hardware designs, with conditions only requiring preservation of notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed under different terms and without sources.
7
+
8
+ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.
9
+
10
+ note: 'CERN <a href="https://ohwr.org/project/cernohl/wikis/uploads/8a6b5d01f71c207c49493e4d114d61e6/cern_ohl_p_v2_howto.pdf">recommends</a> adding the following information in the source files: copyright and license notice, a disclaimer of warranties and a source location. You can also include the source location in a part of the design which will be visible in the end product.'
11
+
12
+ using:
13
+ tedium: https://github.com/jboone/tedium/blob/master/LICENSE-CERN-OHL-P-v2
14
+ LEDEAF: https://github.com/adamgreig/ledeaf/blob/master/LICENSE_CERN_OHL_P_v2.txt
15
+ Open source controller board for ventilators: https://github.com/CV19CO/open_controller_for_ventilator/blob/master/LICENSE
16
+
17
+ permissions:
18
+ - commercial-use
19
+ - modifications
20
+ - distribution
21
+ - private-use
22
+ - patent-use
23
+
24
+ conditions:
25
+ - include-copyright
26
+ - document-changes
27
+
28
+ limitations:
29
+ - liability
30
+ - warranty
31
+
32
+ ---
33
+ CERN Open Hardware Licence Version 2 - Permissive
34
+
35
+
36
+ Preamble
37
+
38
+ CERN has developed this licence to promote collaboration among hardware
39
+ designers and to provide a legal tool which supports the freedom to use,
40
+ study, modify, share and distribute hardware designs and products based on
41
+ those designs. Version 2 of the CERN Open Hardware Licence comes in three
42
+ variants: this licence, CERN-OHL-P (permissive); and two reciprocal licences:
43
+ CERN-OHL-W (weakly reciprocal) and CERN-OHL-S (strongly reciprocal).
44
+
45
+ The CERN-OHL-P is copyright CERN 2020. Anyone is welcome to use it, in
46
+ unmodified form only.
47
+
48
+ Use of this Licence does not imply any endorsement by CERN of any Licensor or
49
+ their designs nor does it imply any involvement by CERN in their development.
50
+
51
+
52
+ 1 Definitions
53
+
54
+ 1.1 'Licence' means this CERN-OHL-P.
55
+
56
+ 1.2 'Source' means information such as design materials or digital code
57
+ which can be applied to Make or test a Product or to prepare a Product
58
+ for use, Conveyance or sale, regardless of its medium or how it is
59
+ expressed. It may include Notices.
60
+
61
+ 1.3 'Covered Source' means Source that is explicitly made available under
62
+ this Licence.
63
+
64
+ 1.4 'Product' means any device, component, work or physical object, whether
65
+ in finished or intermediate form, arising from the use, application or
66
+ processing of Covered Source.
67
+
68
+ 1.5 'Make' means to create or configure something, whether by manufacture,
69
+ assembly, compiling, loading or applying Covered Source or another
70
+ Product or otherwise.
71
+
72
+ 1.6 'Notice' means copyright, acknowledgement and trademark notices,
73
+ references to the location of any Notices, modification notices
74
+ (subsection 3.3(b)) and all notices that refer to this Licence and to
75
+ the disclaimer of warranties that are included in the Covered Source.
76
+
77
+ 1.7 'Licensee' or 'You' means any person exercising rights under this
78
+ Licence.
79
+
80
+ 1.8 'Licensor' means a person who creates Source or modifies Covered Source
81
+ and subsequently Conveys the resulting Covered Source under the terms
82
+ and conditions of this Licence. A person may be a Licensee and a
83
+ Licensor at the same time.
84
+
85
+ 1.9 'Convey' means to communicate to the public or distribute.
86
+
87
+
88
+ 2 Applicability
89
+
90
+ 2.1 This Licence governs the use, copying, modification, Conveying of
91
+ Covered Source and Products, and the Making of Products. By exercising
92
+ any right granted under this Licence, You irrevocably accept these terms
93
+ and conditions.
94
+
95
+ 2.2 This Licence is granted by the Licensor directly to You, and shall apply
96
+ worldwide and without limitation in time.
97
+
98
+ 2.3 You shall not attempt to restrict by contract or otherwise the rights
99
+ granted under this Licence to other Licensees.
100
+
101
+ 2.4 This Licence is not intended to restrict fair use, fair dealing, or any
102
+ other similar right.
103
+
104
+
105
+ 3 Copying, Modifying and Conveying Covered Source
106
+
107
+ 3.1 You may copy and Convey verbatim copies of Covered Source, in any
108
+ medium, provided You retain all Notices.
109
+
110
+ 3.2 You may modify Covered Source, other than Notices.
111
+
112
+ You may only delete Notices if they are no longer applicable to the
113
+ corresponding Covered Source as modified by You and You may add
114
+ additional Notices applicable to Your modifications.
115
+
116
+ 3.3 You may Convey modified Covered Source (with the effect that You shall
117
+ also become a Licensor) provided that You:
118
+
119
+ a) retain Notices as required in subsection 3.2; and
120
+
121
+ b) add a Notice to the modified Covered Source stating that You have
122
+ modified it, with the date and brief description of how You have
123
+ modified it.
124
+
125
+ 3.4 You may Convey Covered Source or modified Covered Source under licence
126
+ terms which differ from the terms of this Licence provided that You:
127
+
128
+ a) comply at all times with subsection 3.3; and
129
+
130
+ b) provide a copy of this Licence to anyone to whom You Convey Covered
131
+ Source or modified Covered Source.
132
+
133
+
134
+ 4 Making and Conveying Products
135
+
136
+ You may Make Products, and/or Convey them, provided that You ensure that the
137
+ recipient of the Product has access to any Notices applicable to the Product.
138
+
139
+
140
+ 5 DISCLAIMER AND LIABILITY
141
+
142
+ 5.1 DISCLAIMER OF WARRANTY -- The Covered Source and any Products are
143
+ provided 'as is' and any express or implied warranties, including, but
144
+ not limited to, implied warranties of merchantability, of satisfactory
145
+ quality, non-infringement of third party rights, and fitness for a
146
+ particular purpose or use are disclaimed in respect of any Source or
147
+ Product to the maximum extent permitted by law. The Licensor makes no
148
+ representation that any Source or Product does not or will not infringe
149
+ any patent, copyright, trade secret or other proprietary right. The
150
+ entire risk as to the use, quality, and performance of any Source or
151
+ Product shall be with You and not the Licensor. This disclaimer of
152
+ warranty is an essential part of this Licence and a condition for the
153
+ grant of any rights granted under this Licence.
154
+
155
+ 5.2 EXCLUSION AND LIMITATION OF LIABILITY -- The Licensor shall, to the
156
+ maximum extent permitted by law, have no liability for direct, indirect,
157
+ special, incidental, consequential, exemplary, punitive or other damages
158
+ of any character including, without limitation, procurement of
159
+ substitute goods or services, loss of use, data or profits, or business
160
+ interruption, however caused and on any theory of contract, warranty,
161
+ tort (including negligence), product liability or otherwise, arising in
162
+ any way in relation to the Covered Source, modified Covered Source
163
+ and/or the Making or Conveyance of a Product, even if advised of the
164
+ possibility of such damages, and You shall hold the Licensor(s) free and
165
+ harmless from any liability, costs, damages, fees and expenses,
166
+ including claims by third parties, in relation to such use.
167
+
168
+
169
+ 6 Patents
170
+
171
+ 6.1 Subject to the terms and conditions of this Licence, each Licensor
172
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
173
+ royalty-free, irrevocable (except as stated in this section 6, or where
174
+ terminated by the Licensor for cause) patent licence to Make, have Made,
175
+ use, offer to sell, sell, import, and otherwise transfer the Covered
176
+ Source and Products, where such licence applies only to those patent
177
+ claims licensable by such Licensor that are necessarily infringed by
178
+ exercising rights under the Covered Source as Conveyed by that Licensor.
179
+
180
+ 6.2 If You institute patent litigation against any entity (including a
181
+ cross-claim or counterclaim in a lawsuit) alleging that the Covered
182
+ Source or a Product constitutes direct or contributory patent
183
+ infringement, or You seek any declaration that a patent licensed to You
184
+ under this Licence is invalid or unenforceable then any rights granted
185
+ to You under this Licence shall terminate as of the date such process is
186
+ initiated.
187
+
188
+
189
+ 7 General
190
+
191
+ 7.1 If any provisions of this Licence are or subsequently become invalid or
192
+ unenforceable for any reason, the remaining provisions shall remain
193
+ effective.
194
+
195
+ 7.2 You shall not use any of the name (including acronyms and
196
+ abbreviations), image, or logo by which the Licensor or CERN is known,
197
+ except where needed to comply with section 3, or where the use is
198
+ otherwise allowed by law. Any such permitted use shall be factual and
199
+ shall not be made so as to suggest any kind of endorsement or
200
+ implication of involvement by the Licensor or its personnel.
201
+
202
+ 7.3 CERN may publish updated versions and variants of this Licence which it
203
+ considers to be in the spirit of this version, but may differ in detail
204
+ to address new problems or concerns. New versions will be published with
205
+ a unique version number and a variant identifier specifying the variant.
206
+ If the Licensor has specified that a given variant applies to the
207
+ Covered Source without specifying a version, You may treat that Covered
208
+ Source as being released under any version of the CERN-OHL with that
209
+ variant. If no variant is specified, the Covered Source shall be treated
210
+ as being released under CERN-OHL-S. The Licensor may also specify that
211
+ the Covered Source is subject to a specific version of the CERN-OHL or
212
+ any later version in which case You may apply this or any later version
213
+ of CERN-OHL with the same variant identifier published by CERN.
214
+
215
+ 7.4 This Licence shall not be enforceable except by a Licensor acting as
216
+ such, and third party beneficiary rights are specifically excluded.