Skip to content

Commit d626f75

Browse files
Include all licenses in SPDX expression and LICENSE file (microsoft#540)
Change the SPDX license expression from `MIT` to `MIT AND Apache-2.0 AND BSD-3-Clause` to reflect all of the licenses that apply to the crate’s sources. Add license text for `Apache-2.0` and the `BSD-3-Clause` license from Go’s `time` module to `LICENSE`. Like `MIT`, both of these licenses require the license text to be distributed with source and/or binaries.
1 parent 5afbd96 commit d626f75

2 files changed

Lines changed: 236 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name = "regorus"
1010
description = "A fast, lightweight Rego (OPA policy language) interpreter"
1111
version = "0.5.0"
1212
edition = "2021"
13-
license = "MIT"
13+
license = "MIT AND Apache-2.0 AND BSD-3-Clause"
1414
repository = "https://github.com/microsoft/regorus"
1515
keywords = ["interpreter", "no_std", "opa", "policy-as-code", "rego"]
1616

LICENSE

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,238 @@
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE
22+
23+
The file src/builtins/time/diff.rs contains code derived from Go's `time`
24+
package, which carries the following license:
25+
26+
Copyright (c) 2009 The Go Authors. All rights reserved.
27+
28+
Redistribution and use in source and binary forms, with or without
29+
modification, are permitted provided that the following conditions are
30+
met:
31+
32+
* Redistributions of source code must retain the above copyright
33+
notice, this list of conditions and the following disclaimer.
34+
* Redistributions in binary form must reproduce the above
35+
copyright notice, this list of conditions and the following disclaimer
36+
in the documentation and/or other materials provided with the
37+
distribution.
38+
* Neither the name of Google Inc. nor the names of its
39+
contributors may be used to endorse or promote products derived from
40+
this software without specific prior written permission.
41+
42+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53+
54+
Some files are licensed Apache-2.0 (LICENSE-2.0.txt).
55+
56+
Apache License
57+
Version 2.0, January 2004
58+
http://www.apache.org/licenses/
59+
60+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
61+
62+
1. Definitions.
63+
64+
"License" shall mean the terms and conditions for use, reproduction,
65+
and distribution as defined by Sections 1 through 9 of this document.
66+
67+
"Licensor" shall mean the copyright owner or entity authorized by
68+
the copyright owner that is granting the License.
69+
70+
"Legal Entity" shall mean the union of the acting entity and all
71+
other entities that control, are controlled by, or are under common
72+
control with that entity. For the purposes of this definition,
73+
"control" means (i) the power, direct or indirect, to cause the
74+
direction or management of such entity, whether by contract or
75+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
76+
outstanding shares, or (iii) beneficial ownership of such entity.
77+
78+
"You" (or "Your") shall mean an individual or Legal Entity
79+
exercising permissions granted by this License.
80+
81+
"Source" form shall mean the preferred form for making modifications,
82+
including but not limited to software source code, documentation
83+
source, and configuration files.
84+
85+
"Object" form shall mean any form resulting from mechanical
86+
transformation or translation of a Source form, including but
87+
not limited to compiled object code, generated documentation,
88+
and conversions to other media types.
89+
90+
"Work" shall mean the work of authorship, whether in Source or
91+
Object form, made available under the License, as indicated by a
92+
copyright notice that is included in or attached to the work
93+
(an example is provided in the Appendix below).
94+
95+
"Derivative Works" shall mean any work, whether in Source or Object
96+
form, that is based on (or derived from) the Work and for which the
97+
editorial revisions, annotations, elaborations, or other modifications
98+
represent, as a whole, an original work of authorship. For the purposes
99+
of this License, Derivative Works shall not include works that remain
100+
separable from, or merely link (or bind by name) to the interfaces of,
101+
the Work and Derivative Works thereof.
102+
103+
"Contribution" shall mean any work of authorship, including
104+
the original version of the Work and any modifications or additions
105+
to that Work or Derivative Works thereof, that is intentionally
106+
submitted to Licensor for inclusion in the Work by the copyright owner
107+
or by an individual or Legal Entity authorized to submit on behalf of
108+
the copyright owner. For the purposes of this definition, "submitted"
109+
means any form of electronic, verbal, or written communication sent
110+
to the Licensor or its representatives, including but not limited to
111+
communication on electronic mailing lists, source code control systems,
112+
and issue tracking systems that are managed by, or on behalf of, the
113+
Licensor for the purpose of discussing and improving the Work, but
114+
excluding communication that is conspicuously marked or otherwise
115+
designated in writing by the copyright owner as "Not a Contribution."
116+
117+
"Contributor" shall mean Licensor and any individual or Legal Entity
118+
on behalf of whom a Contribution has been received by Licensor and
119+
subsequently incorporated within the Work.
120+
121+
2. Grant of Copyright License. Subject to the terms and conditions of
122+
this License, each Contributor hereby grants to You a perpetual,
123+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
124+
copyright license to reproduce, prepare Derivative Works of,
125+
publicly display, publicly perform, sublicense, and distribute the
126+
Work and such Derivative Works in Source or Object form.
127+
128+
3. Grant of Patent License. Subject to the terms and conditions of
129+
this License, each Contributor hereby grants to You a perpetual,
130+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
131+
(except as stated in this section) patent license to make, have made,
132+
use, offer to sell, sell, import, and otherwise transfer the Work,
133+
where such license applies only to those patent claims licensable
134+
by such Contributor that are necessarily infringed by their
135+
Contribution(s) alone or by combination of their Contribution(s)
136+
with the Work to which such Contribution(s) was submitted. If You
137+
institute patent litigation against any entity (including a
138+
cross-claim or counterclaim in a lawsuit) alleging that the Work
139+
or a Contribution incorporated within the Work constitutes direct
140+
or contributory patent infringement, then any patent licenses
141+
granted to You under this License for that Work shall terminate
142+
as of the date such litigation is filed.
143+
144+
4. Redistribution. You may reproduce and distribute copies of the
145+
Work or Derivative Works thereof in any medium, with or without
146+
modifications, and in Source or Object form, provided that You
147+
meet the following conditions:
148+
149+
(a) You must give any other recipients of the Work or
150+
Derivative Works a copy of this License; and
151+
152+
(b) You must cause any modified files to carry prominent notices
153+
stating that You changed the files; and
154+
155+
(c) You must retain, in the Source form of any Derivative Works
156+
that You distribute, all copyright, patent, trademark, and
157+
attribution notices from the Source form of the Work,
158+
excluding those notices that do not pertain to any part of
159+
the Derivative Works; and
160+
161+
(d) If the Work includes a "NOTICE" text file as part of its
162+
distribution, then any Derivative Works that You distribute must
163+
include a readable copy of the attribution notices contained
164+
within such NOTICE file, excluding those notices that do not
165+
pertain to any part of the Derivative Works, in at least one
166+
of the following places: within a NOTICE text file distributed
167+
as part of the Derivative Works; within the Source form or
168+
documentation, if provided along with the Derivative Works; or,
169+
within a display generated by the Derivative Works, if and
170+
wherever such third-party notices normally appear. The contents
171+
of the NOTICE file are for informational purposes only and
172+
do not modify the License. You may add Your own attribution
173+
notices within Derivative Works that You distribute, alongside
174+
or as an addendum to the NOTICE text from the Work, provided
175+
that such additional attribution notices cannot be construed
176+
as modifying the License.
177+
178+
You may add Your own copyright statement to Your modifications and
179+
may provide additional or different license terms and conditions
180+
for use, reproduction, or distribution of Your modifications, or
181+
for any such Derivative Works as a whole, provided Your use,
182+
reproduction, and distribution of the Work otherwise complies with
183+
the conditions stated in this License.
184+
185+
5. Submission of Contributions. Unless You explicitly state otherwise,
186+
any Contribution intentionally submitted for inclusion in the Work
187+
by You to the Licensor shall be under the terms and conditions of
188+
this License, without any additional terms or conditions.
189+
Notwithstanding the above, nothing herein shall supersede or modify
190+
the terms of any separate license agreement you may have executed
191+
with Licensor regarding such Contributions.
192+
193+
6. Trademarks. This License does not grant permission to use the trade
194+
names, trademarks, service marks, or product names of the Licensor,
195+
except as required for reasonable and customary use in describing the
196+
origin of the Work and reproducing the content of the NOTICE file.
197+
198+
7. Disclaimer of Warranty. Unless required by applicable law or
199+
agreed to in writing, Licensor provides the Work (and each
200+
Contributor provides its Contributions) on an "AS IS" BASIS,
201+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
202+
implied, including, without limitation, any warranties or conditions
203+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
204+
PARTICULAR PURPOSE. You are solely responsible for determining the
205+
appropriateness of using or redistributing the Work and assume any
206+
risks associated with Your exercise of permissions under this License.
207+
208+
8. Limitation of Liability. In no event and under no legal theory,
209+
whether in tort (including negligence), contract, or otherwise,
210+
unless required by applicable law (such as deliberate and grossly
211+
negligent acts) or agreed to in writing, shall any Contributor be
212+
liable to You for damages, including any direct, indirect, special,
213+
incidental, or consequential damages of any character arising as a
214+
result of this License or out of the use or inability to use the
215+
Work (including but not limited to damages for loss of goodwill,
216+
work stoppage, computer failure or malfunction, or any and all
217+
other commercial damages or losses), even if such Contributor
218+
has been advised of the possibility of such damages.
219+
220+
9. Accepting Warranty or Additional Liability. While redistributing
221+
the Work or Derivative Works thereof, You may choose to offer,
222+
and charge a fee for, acceptance of support, warranty, indemnity,
223+
or other liability obligations and/or rights consistent with this
224+
License. However, in accepting such obligations, You may act only
225+
on Your own behalf and on Your sole responsibility, not on behalf
226+
of any other Contributor, and only if You agree to indemnify,
227+
defend, and hold each Contributor harmless for any liability
228+
incurred by, or claims asserted against, such Contributor by reason
229+
of your accepting any such warranty or additional liability.
230+
231+
END OF TERMS AND CONDITIONS
232+
233+
APPENDIX: How to apply the Apache License to your work.
234+
235+
To apply the Apache License to your work, attach the following
236+
boilerplate notice, with the fields enclosed by brackets "[]"
237+
replaced with your own identifying information. (Don't include
238+
the brackets!) The text should be enclosed in the appropriate
239+
comment syntax for the file format. We also recommend that a
240+
file or class name and description of purpose be included on the
241+
same "printed page" as the copyright notice for easier
242+
identification within third-party archives.
243+
244+
Copyright [yyyy] [name of copyright owner]
245+
246+
Licensed under the Apache License, Version 2.0 (the "License");
247+
you may not use this file except in compliance with the License.
248+
You may obtain a copy of the License at
249+
250+
http://www.apache.org/licenses/LICENSE-2.0
251+
252+
Unless required by applicable law or agreed to in writing, software
253+
distributed under the License is distributed on an "AS IS" BASIS,
254+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
255+
See the License for the specific language governing permissions and
256+
limitations under the License.

0 commit comments

Comments
 (0)