Skip to content

Commit 9a7693a

Browse files
Fix license db generation removing attributes
* Removes is_builtin attribute from details * Removes the text attribute as there already was a license_text displayed so this wasn't necessary Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 0aa964e commit 9a7693a

37 files changed

+13
-1507
lines changed

src/licensedcode/license_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def generate_details(output_path, environment, licenses, test=False):
132132
base_context_mapping = base_context
133133
license_details_template = environment.get_template("license_details.html")
134134
for lic in licenses.values():
135-
license_data = lic.to_dict(include_text=True)
135+
license_data = lic.to_dict(include_text=False, include_builtin=False)
136136
html = license_details_template.render(
137137
**base_context_mapping,
138138
license=lic,

tests/licensedcode/data/license_db/license_dump/bash-exception-gpl.html

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,6 @@
106106

107107
</dd>
108108

109-
<dt style="">is_builtin</dt>
110-
<dd>
111-
112-
True
113-
114-
</dd>
115-
116109
<dt style="">is_exception</dt>
117110
<dd>
118111

@@ -136,19 +129,6 @@
136129

137130
</dd>
138131

139-
<dt style="">text</dt>
140-
<dd>
141-
142-
The Free Software Foundation has exempted Bash from the requirement of
143-
Paragraph 2c of the General Public License. This is to say, there is
144-
no requirement for Bash to print a notice when it is started
145-
interactively in the usual way. We made this exception because users
146-
and standards expect shells not to print such messages. This
147-
exception applies to any program that serves as a shell and that is
148-
based primarily on Bash as opposed to other GNU software.
149-
150-
</dd>
151-
152132
</dl>
153133
<div class="text-bold">license_text</div>
154134
<pre id="license-text" class="code mt-1" style="white-space: pre-wrap;"><code>The Free Software Foundation has exempted Bash from the requirement of

tests/licensedcode/data/license_db/license_dump/bash-exception-gpl.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
"category": "Copyleft",
66
"owner": "Free Software Foundation (FSF)",
77
"notes": "this used with GPL 1.0 and 2.0. It was removed from the V3 text https://git.savannah.gnu.org/cgit/bash.git/commit/COPYING?id=3185942a5234e26ab13fa02f9c51d340cec514f8",
8-
"is_builtin": true,
98
"is_exception": true,
109
"spdx_license_key": "LicenseRef-scancode-bash-exception-gpl-2.0",
1110
"text_urls": [
1211
"https://git.savannah.gnu.org/cgit/bash.git/plain/COPYING?h=bash-3.0-rc1&id=dd9e6dfa23d0dae4888f11fb8c6a27bc36d1b283"
13-
],
14-
"text": "The Free Software Foundation has exempted Bash from the requirement of\nParagraph 2c of the General Public License. This is to say, there is\nno requirement for Bash to print a notice when it is started\ninteractively in the usual way. We made this exception because users\nand standards expect shells not to print such messages. This\nexception applies to any program that serves as a shell and that is\nbased primarily on Bash as opposed to other GNU software."
12+
]
1513
}

tests/licensedcode/data/license_db/license_dump/bash-exception-gpl.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,7 @@ name: Bash exception to GPL
44
category: Copyleft
55
owner: Free Software Foundation (FSF)
66
notes: this used with GPL 1.0 and 2.0. It was removed from the V3 text https://git.savannah.gnu.org/cgit/bash.git/commit/COPYING?id=3185942a5234e26ab13fa02f9c51d340cec514f8
7-
is_builtin: yes
87
is_exception: yes
98
spdx_license_key: LicenseRef-scancode-bash-exception-gpl-2.0
109
text_urls:
1110
- https://git.savannah.gnu.org/cgit/bash.git/plain/COPYING?h=bash-3.0-rc1&id=dd9e6dfa23d0dae4888f11fb8c6a27bc36d1b283
12-
text: |
13-
The Free Software Foundation has exempted Bash from the requirement of
14-
Paragraph 2c of the General Public License. This is to say, there is
15-
no requirement for Bash to print a notice when it is started
16-
interactively in the usual way. We made this exception because users
17-
and standards expect shells not to print such messages. This
18-
exception applies to any program that serves as a shell and that is
19-
based primarily on Bash as opposed to other GNU software.

tests/licensedcode/data/license_db/license_dump/binary-linux-firmware.html

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -106,52 +106,13 @@
106106

107107
</dd>
108108

109-
<dt style="">is_builtin</dt>
110-
<dd>
111-
112-
True
113-
114-
</dd>
115-
116109
<dt style="">spdx_license_key</dt>
117110
<dd>
118111

119112
LicenseRef-scancode-binary-linux-firmware
120113

121114
</dd>
122115

123-
<dt style="">text</dt>
124-
<dd>
125-
126-
Redistribution. Redistribution and use in binary form, without
127-
modification, are permitted provided that the following conditions are
128-
met:
129-
130-
* Redistributions must reproduce the above copyright notice and the
131-
following disclaimer in the documentation and/or other materials
132-
provided with the distribution.
133-
134-
* Neither the name of the Copyright Holder nor the names of its
135-
suppliers may be used to endorse or promote products derived from this
136-
software without specific prior written permission.
137-
138-
* No reverse engineering, decompilation, or disassembly of this software
139-
is permitted.
140-
141-
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
142-
CONTRIBUTORS &#34;AS IS&#34; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
143-
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
144-
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
145-
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
146-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
147-
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
148-
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
149-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
150-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
151-
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
152-
153-
</dd>
154-
155116
</dl>
156117
<div class="text-bold">license_text</div>
157118
<pre id="license-text" class="code mt-1" style="white-space: pre-wrap;"><code>Redistribution. Redistribution and use in binary form, without

tests/licensedcode/data/license_db/license_dump/binary-linux-firmware.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@
55
"category": "Proprietary Free",
66
"owner": "Unspecified",
77
"homepage_url": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/",
8-
"is_builtin": true,
9-
"spdx_license_key": "LicenseRef-scancode-binary-linux-firmware",
10-
"text": "Redistribution. Redistribution and use in binary form, without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions must reproduce the above copyright notice and the\nfollowing disclaimer in the documentation and/or other materials\nprovided with the distribution.\n\n* Neither the name of the Copyright Holder nor the names of its\nsuppliers may be used to endorse or promote products derived from this\nsoftware without specific prior written permission.\n\n* No reverse engineering, decompilation, or disassembly of this software\nis permitted.\n\nDISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND\nCONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\nCOPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\nNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\nUSE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE"
8+
"spdx_license_key": "LicenseRef-scancode-binary-linux-firmware"
119
}

tests/licensedcode/data/license_db/license_dump/binary-linux-firmware.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,4 @@ name: Binary-Only Linux Firmware License
44
category: Proprietary Free
55
owner: Unspecified
66
homepage_url: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/
7-
is_builtin: yes
87
spdx_license_key: LicenseRef-scancode-binary-linux-firmware
9-
text: |
10-
Redistribution. Redistribution and use in binary form, without
11-
modification, are permitted provided that the following conditions are
12-
met:
13-
14-
* Redistributions must reproduce the above copyright notice and the
15-
following disclaimer in the documentation and/or other materials
16-
provided with the distribution.
17-
18-
* Neither the name of the Copyright Holder nor the names of its
19-
suppliers may be used to endorse or promote products derived from this
20-
software without specific prior written permission.
21-
22-
* No reverse engineering, decompilation, or disassembly of this software
23-
is permitted.
24-
25-
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
26-
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
27-
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
28-
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29-
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31-
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
32-
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
33-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35-
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE

tests/licensedcode/data/license_db/license_dump/bison-exception-2.0.html

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,6 @@
9999

100100
</dd>
101101

102-
<dt style="">is_builtin</dt>
103-
<dd>
104-
105-
True
106-
107-
</dd>
108-
109102
<dt style="">is_exception</dt>
110103
<dd>
111104

@@ -149,13 +142,6 @@
149142

150143
</dd>
151144

152-
<dt style="">text</dt>
153-
<dd>
154-
155-
As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison.
156-
157-
</dd>
158-
159145
</dl>
160146
<div class="text-bold">license_text</div>
161147
<pre id="license-text" class="code mt-1" style="white-space: pre-wrap;"><code>As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison.</code></pre>

tests/licensedcode/data/license_db/license_dump/bison-exception-2.0.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
"name": "Bison exception to GPL 2.0 or later",
55
"category": "Copyleft Limited",
66
"owner": "Free Software Foundation (FSF)",
7-
"is_builtin": true,
87
"is_exception": true,
98
"spdx_license_key": "LicenseRef-scancode-bison-exception-2.0",
109
"faq_url": "http://www.gnu.org/software/bison/manual/bison.html#Conditions",
11-
"standard_notice": "This library is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2, or (at your option) any later\nversion.\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\nYou should have received a copy of the GNU General Public License along\nwith this library; see the file COPYING. If not, write to the Free Software\nFoundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\nAs a special exception, when this file is copied by Bison into a Bison\noutput file, you may use that output file without restriction. This special\nexception was added by the Free Software Foundation in version 1.24 of\nBison.\n",
12-
"text": "As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison."
10+
"standard_notice": "This library is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2, or (at your option) any later\nversion.\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\nYou should have received a copy of the GNU General Public License along\nwith this library; see the file COPYING. If not, write to the Free Software\nFoundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\nAs a special exception, when this file is copied by Bison into a Bison\noutput file, you may use that output file without restriction. This special\nexception was added by the Free Software Foundation in version 1.24 of\nBison.\n"
1311
}

tests/licensedcode/data/license_db/license_dump/bison-exception-2.0.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ short_name: Bison exception to GPL 2.0 or later
33
name: Bison exception to GPL 2.0 or later
44
category: Copyleft Limited
55
owner: Free Software Foundation (FSF)
6-
is_builtin: yes
76
is_exception: yes
87
spdx_license_key: LicenseRef-scancode-bison-exception-2.0
98
faq_url: http://www.gnu.org/software/bison/manual/bison.html#Conditions
@@ -23,6 +22,3 @@ standard_notice: |
2322
output file, you may use that output file without restriction. This special
2423
exception was added by the Free Software Foundation in version 1.24 of
2524
Bison.
26-
text: As a special exception, when this file is copied by Bison into a Bison output file, you
27-
may use that output file without restriction. This special exception was added by the Free
28-
Software Foundation in version 1.24 of Bison.

0 commit comments

Comments
 (0)