spdx-0.12.0/.cargo_vcs_info.json0000644000000001360000000000100120720ustar { "git": { "sha1": "6d0341dc67cfb6066ebf2d78af4e0c64035eef44" }, "path_in_vcs": "" }spdx-0.12.0/Cargo.lock0000644000000141440000000000100100510ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "bstr" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", "regex-automata", "serde", ] [[package]] name = "console" version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", "lazy_static", "libc", "windows-sys", ] [[package]] name = "encode_unicode" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "proc-macro2" version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] [[package]] name = "regex-automata" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" [[package]] name = "serde" version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "similar" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" dependencies = [ "bstr", "unicode-segmentation", ] [[package]] name = "similar-asserts" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b441962c817e33508847a22bd82f03a30cff43642dc2fae8b050566121eb9a" dependencies = [ "console", "similar", ] [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "spdx" version = "0.12.0" dependencies = [ "similar-asserts", "smallvec", ] [[package]] name = "syn" version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-segmentation" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" spdx-0.12.0/Cargo.toml0000644000000025760000000000100101020ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2024" rust-version = "1.85.0" name = "spdx" version = "0.12.0" authors = [ "Embark ", "Jake Shadle ", ] build = false include = [ "Cargo.toml", "LICENSE-APACHE", "LICENSE-MIT", "README.md", "src/**/*", ] autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Helper crate for SPDX expressions" homepage = "https://github.com/EmbarkStudios/spdx" documentation = "https://docs.rs/spdx" readme = "README.md" keywords = [ "spdx", "license", ] categories = ["parser-implementations"] license = "MIT OR Apache-2.0" repository = "https://github.com/EmbarkStudios/spdx" [package.metadata.docs.rs] all-features = true [features] text = [] [lib] name = "spdx" path = "src/lib.rs" [dependencies.smallvec] version = "1.15" [dev-dependencies.similar-asserts] version = "1.7" spdx-0.12.0/Cargo.toml.orig0000644000000016640000000000100110360ustar [package] name = "spdx" version = "0.12.0" authors = [ "Embark ", "Jake Shadle ", ] description = "Helper crate for SPDX expressions" edition = "2024" rust-version = "1.85.0" homepage = "https://github.com/EmbarkStudios/spdx" documentation = "https://docs.rs/spdx" readme = "README.md" keywords = ["spdx", "license"] categories = ["parser-implementations"] license = "MIT OR Apache-2.0" repository = "https://github.com/EmbarkStudios/spdx" include = [ "Cargo.toml", "LICENSE-APACHE", "LICENSE-MIT", "README.md", "src/**/*", ] [features] # Includes the full canonical text of each license text = [] [dependencies] # In most cases expressions are quite small so we can avoid heap allocations smallvec = "1.15" [dev-dependencies] # Used to print colored diffs in case of test failures similar-asserts = "1.7" [package.metadata.docs.rs] all-features = true spdx-0.12.0/Cargo.toml.orig000064400000000000000000000016641046102023000135600ustar 00000000000000[package] name = "spdx" version = "0.12.0" authors = [ "Embark ", "Jake Shadle ", ] description = "Helper crate for SPDX expressions" edition = "2024" rust-version = "1.85.0" homepage = "https://github.com/EmbarkStudios/spdx" documentation = "https://docs.rs/spdx" readme = "README.md" keywords = ["spdx", "license"] categories = ["parser-implementations"] license = "MIT OR Apache-2.0" repository = "https://github.com/EmbarkStudios/spdx" include = [ "Cargo.toml", "LICENSE-APACHE", "LICENSE-MIT", "README.md", "src/**/*", ] [features] # Includes the full canonical text of each license text = [] [dependencies] # In most cases expressions are quite small so we can avoid heap allocations smallvec = "1.15" [dev-dependencies] # Used to print colored diffs in case of test failures similar-asserts = "1.7" [package.metadata.docs.rs] all-features = true spdx-0.12.0/LICENSE-APACHE000064400000000000000000000251421046102023000126120ustar 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. spdx-0.12.0/LICENSE-MIT000064400000000000000000000020421046102023000123140ustar 00000000000000Copyright (c) 2019 Embark Studios Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. spdx-0.12.0/README.md000064400000000000000000000061511046102023000121440ustar 00000000000000
# `🆔 spdx` **Helper crate for [SPDX](https://spdx.org/about) [license expressions](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60)** [![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev) [![Embark](https://img.shields.io/badge/discord-ark-%237289da.svg?logo=discord)](https://discord.gg/dAuKfZS) [![Crates.io](https://img.shields.io/crates/v/spdx.svg)](https://crates.io/crates/spdx) [![Docs](https://docs.rs/spdx/badge.svg)](https://docs.rs/spdx) [![Minimum Stable Rust Version](https://img.shields.io/badge/Rust-1.65.0-blue?color=fc8d62&logo=rust)](https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html) [![SPDX Version](https://img.shields.io/badge/SPDX%20Version-3.27.0-blue.svg)](https://spdx.org/licenses/) [![dependency status](https://deps.rs/repo/github/EmbarkStudios/spdx/status.svg)](https://deps.rs/repo/github/EmbarkStudios/spdx) [![Build Status](https://github.com/EmbarkStudios/spdx/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/spdx/actions?workflow=CI)
## Usage ```rust use spdx::Expression; fn main() { let this_is_fine = Expression::parse("MIT OR Apache-2.0").unwrap(); assert!(this_is_fine.evaluate(|req| { if let spdx::LicenseItem::Spdx { id, .. } = req.license { // Both MIT and Apache-2.0 are OSI approved, so this expression // evaluates to true return id.is_osi_approved(); } false })); assert!(!this_is_fine.evaluate(|req| { if let spdx::LicenseItem::Spdx { id, .. } = req.license { // This is saying we don't accept any licenses that are OSI approved // so the expression will evaluate to false as both sides of the OR // are now rejected return !id.is_osi_approved(); } false })); // `NOPE` is not a valid SPDX license identifier, so this expression // will fail to parse let _this_is_not = Expression::parse("MIT OR NOPE").unwrap_err(); } ``` ## Updating SPDX list You can update the list of SPDX identifiers for licenses and exceptions by running the update program `cargo run --manifest-path=update/Cargo.toml -- v3.6` where `v3.6` is the tag in the [SPDX data repo](https://github.com/spdx/license-list-data). ## Contributing [![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v1.4-ff69b4.svg)](CODE_OF_CONDUCT.md) We welcome community contributions to this project. Please read our [Contributor Guide](CONTRIBUTING.md) for more information on how to get started. ## License Licensed under either of * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or ) * MIT license ([LICENSE-MIT](LICENSE-MIT) or ) at your option. ### Contribution Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. spdx-0.12.0/src/error.rs000064400000000000000000000105251046102023000131530ustar 00000000000000use std::{error::Error, fmt}; /// An error related to parsing of an SPDX license expression /// or identifier #[derive(Debug, PartialEq, Eq)] pub struct ParseError { /// The string that was attempting to be parsed pub original: String, /// The range of characters in the original string that result /// in this error pub span: std::ops::Range, /// The specific reason for the error pub reason: Reason, } /// The particular reason for a `ParseError` #[derive(Debug, PartialEq, Eq)] pub enum Reason { /// The specified license short-identifier was not /// found the SPDX list UnknownLicense, /// The specified exception short-identifier was not /// found the SPDX list UnknownException, /// The characters are not valid in an SPDX license expression InvalidCharacters, /// An opening parens was unmatched with a closing parens UnclosedParens, /// A closing parens was unmatched with an opening parens UnopenedParens, /// The expression does not contain any valid terms Empty, /// Found an unexpected term, which wasn't one of the /// expected terms that is listed Unexpected(&'static [&'static str]), /// A + was found after whitespace, which is not allowed /// by the SPDX spec SeparatedPlus, /// When lexing, a term was found that was /// 1. Not a license short-id /// 2. Not an exception short-id /// 3. Not a document/license ref /// 4. Not an AND, OR, or WITH UnknownTerm, /// GNU suffix licenses don't allow `+` because they already have /// the `-or-later` suffix to denote that GnuNoPlus, /// A `+` was added to a GNU license that was specified as `-only` or `-or-later` GnuPlusWithSuffix, /// A deprecated license id was used DeprecatedLicenseId, } impl Reason { #[inline] fn description(&self) -> &'static str { match self { Reason::UnknownLicense => "unknown license id", Reason::UnknownException => "unknown exception id", Reason::InvalidCharacters => "invalid character(s)", Reason::UnclosedParens => "unclosed parens", Reason::UnopenedParens => "unopened parens", Reason::Empty => "empty expression", Reason::Unexpected(_) => "unexpected term", Reason::SeparatedPlus => "`+` must not follow whitespace", Reason::UnknownTerm => "unknown term", Reason::GnuNoPlus => "a GNU license was followed by a `+`", Reason::GnuPlusWithSuffix => { "a GNU license was followed by a `+` even though it ended in `-only` or `-or-later`" } Reason::DeprecatedLicenseId => "a deprecated license identifier was used", } } } impl fmt::Display for ParseError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(&self.original)?; f.write_str("\n")?; for _ in 0..self.span.start { f.write_str(" ")?; } // Mismatched parens have a slightly different output // than the other errors match &self.reason { Reason::UnclosedParens => f.write_fmt(format_args!("- {}", Reason::UnclosedParens)), Reason::UnopenedParens => f.write_fmt(format_args!("^ {}", Reason::UnopenedParens)), other => { for _ in self.span.start..self.span.end { f.write_str("^")?; } f.write_fmt(format_args!(" {other}")) } } } } impl fmt::Display for Reason { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if let Self::Unexpected(expected) = self { if expected.len() > 1 { f.write_str("expected one of ")?; for (i, exp) in expected.iter().enumerate() { f.write_fmt(format_args!("{}`{}`", if i > 0 { ", " } else { "" }, exp))?; } f.write_str(" here") } else if expected.is_empty() { f.write_str("the term was not expected here") } else { f.write_fmt(format_args!("expected a `{}` here", expected[0])) } } else { f.write_str(self.description()) } } } impl Error for ParseError { #[inline] fn description(&self) -> &str { self.reason.description() } } spdx-0.12.0/src/expression/minimize.rs000064400000000000000000000105631046102023000160440ustar 00000000000000use super::Expression; use crate::{LicenseReq, Licensee}; use std::fmt; /// Errors that can occur when trying to minimize the requirements for an [`Expression`] #[derive(Debug, PartialEq, Eq)] pub enum MinimizeError { /// More than `64` unique licensees satisfied a requirement in the [`Expression`] TooManyRequirements(usize), /// The list of licensees did not fully satisfy the requirements in the [`Expression`] RequirementsUnmet, } impl fmt::Display for MinimizeError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::TooManyRequirements(n) => write!( f, "the license expression required {n} licensees which exceeds the limit of 64", ), Self::RequirementsUnmet => { f.write_str("the expression was not satisfied by the provided list of licensees") } } } } impl std::error::Error for MinimizeError { fn description(&self) -> &str { match self { Self::TooManyRequirements(_) => "too many requirements in license expression", Self::RequirementsUnmet => { "the expression was not satisfied by the provided list of licensees" } } } } impl Expression { /// Given a set of [`Licensee`]s, attempts to find the minimum number that /// satisfy this [`Expression`]. /// /// The list of licensees should be given in priority order, eg, if you wish /// to accept the `Apache-2.0` license if it is available, and the `MIT` if /// not, putting `Apache-2.0` before `MIT` will cause the ubiquitous /// `Apache-2.0 OR MIT` expression to minimize to just `Apache-2.0` as only /// 1 of the licenses is required, and `Apache-2.0` has priority. /// /// # Errors /// /// This method will fail if more than 64 unique licensees are satisfied by /// this expression, but such a case is unlikely in a real world scenario. /// The list of licensees must also actually satisfy this expression, /// otherwise it can't be minimized. /// /// # Example /// /// ``` /// let expr = spdx::Expression::parse("Apache-2.0 OR MIT").unwrap(); /// /// let apache_licensee = spdx::Licensee::parse("Apache-2.0").unwrap(); /// assert_eq!( /// expr.minimized_requirements([&apache_licensee, &spdx::Licensee::parse("MIT").unwrap()]).unwrap(), /// vec![apache_licensee.into_req()], /// ); /// ``` pub fn minimized_requirements<'lic>( &self, accepted: impl IntoIterator, ) -> Result, MinimizeError> { let found_set = { let mut found_set = smallvec::SmallVec::<[Licensee; 5]>::new(); for lic in accepted { if !found_set.contains(lic) && self.requirements().any(|ereq| lic.satisfies(&ereq.req)) { found_set.push(lic.clone()); } } if found_set.len() > 64 { return Err(MinimizeError::TooManyRequirements(found_set.len())); } // Ensure that the licensees provided actually _can_ be accepted by // this expression if !self.evaluate(|ereq| found_set.iter().any(|lic| lic.satisfies(ereq))) { return Err(MinimizeError::RequirementsUnmet); } found_set }; let set_size = (1 << found_set.len()) as u64; for mask in 1..=set_size { let eval_res = self.evaluate(|req| { for (ind, lic) in found_set.iter().enumerate() { if mask & (1 << ind) != 0 && lic.satisfies(req) { return true; } } false }); if eval_res { return Ok(found_set .into_iter() .enumerate() .filter_map(|(ind, lic)| { if mask & (1 << ind) == 0 { None } else { Some(lic.into_req()) } }) .collect()); } } // This should be impossible, but would rather not panic Ok(found_set.into_iter().map(Licensee::into_req).collect()) } } spdx-0.12.0/src/expression/parser.rs000064400000000000000000000433331046102023000155200ustar 00000000000000use crate::{ AdditionItem, LicenseItem, LicenseReq, ParseMode, error::{ParseError, Reason}, expression::{ExprNode, Expression, ExpressionReq, Operator}, lexer::{Lexer, Token}, }; use smallvec::SmallVec; impl Expression { /// Given a license expression, attempts to parse and validate it as a valid /// SPDX expression. Uses `ParseMode::Strict`. /// /// The validation can fail for many reasons: /// * The expression contains invalid characters /// * An unknown/invalid license or exception identifier was found. Only /// [SPDX short identifiers](https://spdx.org/ids) are allowed /// * The expression contained unbalanced parentheses /// * A license or exception immediately follows another license or exception, without /// a valid AND, OR, or WITH operator separating them /// * An AND, OR, or WITH doesn't have a license or `)` preceding it /// /// ``` /// spdx::Expression::parse("MIT OR Apache-2.0 WITH LLVM-exception").unwrap(); /// ``` pub fn parse(original: &str) -> Result { Self::parse_mode(original, ParseMode::STRICT) } /// Canonicalizes the input expression into a form that can be parsed with /// [`ParseMode::STRICT`] /// /// ## Transforms /// /// 1. '/' is replaced with ' OR ' /// 1. Lower-cased operators ('or', 'and', 'with') are upper-cased /// 1. '+' is transformed to `-or-later` for GNU licenses, or `-only` with no '+' /// 1. Invalid/imprecise license identifiers (eg. `apache2`) are replaced /// with their valid identifiers /// /// If the provided expression is not modified then `None` is returned /// /// Note that this only does fixup of otherwise valid expressions, passing /// the resulting string to [`Expression::parse`] can still result in /// additional parse errors, eg. unbalanced parentheses /// /// ``` /// let expr = "apache with LLVM-exception/gpl-3.0+ and gplv2"; /// assert_eq!( /// spdx::Expression::canonicalize(expr).unwrap().unwrap(), /// "Apache-2.0 WITH LLVM-exception OR GPL-3.0-or-later AND GPL-2.0-only" /// ); /// ``` pub fn canonicalize(original: &str) -> Result, ParseError> { let mut can = String::with_capacity(original.len()); let lexer = Lexer::new_mode(original, ParseMode::LAX); let push_id = |s: &mut String, id: crate::LicenseId| { s.push_str(id.name); if id.is_gnu() && !id.name.ends_with("-only") && !id.name.ends_with("-or-later") { s.push_str("-only"); } }; // Keep track if the last license id is a GNU license that uses the -or-later // convention rather than the + like all other licenses let mut last = Option::::None; for tok in lexer { let tok = tok?; if !matches!(tok.token, Token::Plus) { if let Some(id) = last.take() { push_id(&mut can, id); } } match tok.token { Token::Spdx(id) => { last = Some(id); } Token::And => can.push_str(" AND "), Token::Or => can.push_str(" OR "), Token::With => can.push_str(" WITH "), Token::Plus => { let Some(id) = last.take() else { return Err(ParseError { original: original.into(), span: tok.span, reason: Reason::Unexpected(&[""]), }); }; push_id(&mut can, id); if id.is_gnu() { if can.ends_with("-only") { can.truncate(can.len() - 5); } can.push_str("-or-later"); } else { can.push('+'); } } Token::OpenParen => can.push('('), Token::CloseParen => can.push(')'), Token::Exception(exc) => can.push_str(exc.name), Token::LicenseRef { doc_ref, lic_ref } => { if let Some(dr) = doc_ref { can.push_str("DocumentRef-"); can.push_str(dr); can.push(':'); } can.push_str("LicenseRef-"); can.push_str(lic_ref); } Token::AdditionRef { doc_ref, add_ref } => { if let Some(dr) = doc_ref { can.push_str("DocumentRef-"); can.push_str(dr); can.push(':'); } can.push_str("AdditionRef-"); can.push_str(add_ref); } } } if let Some(id) = last { push_id(&mut can, id); } Ok((can != original).then_some(can)) } /// Parses an expression with the specified `ParseMode`. /// /// With `ParseMode::Lax` it permits some non-SPDX syntax, such as imprecise /// license names and "/" used instead of "OR" in expressions. /// /// ``` /// spdx::Expression::parse_mode( /// "mit/Apache-2.0 WITH LLVM-exception", /// spdx::ParseMode::LAX /// ).unwrap(); /// ``` pub fn parse_mode(original: &str, mode: ParseMode) -> Result { // Operator precedence in SPDX 2.1 // + // WITH // AND // OR #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)] enum Op { //Plus, //With, And, Or, Open, } struct OpAndSpan { op: Op, span: std::ops::Range, } let lexer = Lexer::new_mode(original, mode); let mut op_stack = SmallVec::<[OpAndSpan; 3]>::new(); let mut expr_queue = SmallVec::<[ExprNode; 5]>::new(); // Keep track of the last token to simplify validation of the token stream let mut last_token: Option> = None; let apply_op = |op: OpAndSpan, q: &mut SmallVec<[ExprNode; 5]>| { let op = match op.op { Op::And => Operator::And, Op::Or => Operator::Or, Op::Open => unreachable!(), }; q.push(ExprNode::Op(op)); Ok(()) }; let make_err_for_token = |last_token: Option>, span: std::ops::Range| { let expected: &[&str] = match last_token { None | Some(Token::And | Token::Or | Token::OpenParen) => &["", "("], Some(Token::CloseParen) => &["AND", "OR"], Some(Token::Exception(_) | Token::AdditionRef { .. }) => &["AND", "OR", ")"], Some(Token::Spdx(_)) => &["AND", "OR", "WITH", ")", "+"], Some(Token::LicenseRef { .. } | Token::Plus) => &["AND", "OR", "WITH", ")"], Some(Token::With) => &[""], }; Err(ParseError { original: original.to_owned(), span, reason: Reason::Unexpected(expected), }) }; // Basic implementation of the https://en.wikipedia.org/wiki/Shunting-yard_algorithm 'outer: for tok in lexer { let lt = tok?; match <.token { Token::Spdx(id) => match last_token { None | Some(Token::And | Token::Or | Token::OpenParen) => { if !mode.allow_deprecated && id.is_deprecated() { return Err(ParseError { original: original.to_owned(), span: lt.span, reason: Reason::DeprecatedLicenseId, }); } expr_queue.push(ExprNode::Req(ExpressionReq { req: LicenseReq::from(*id), span: lt.span.start as u32..lt.span.end as u32, })); } _ => return make_err_for_token(last_token, lt.span), }, Token::LicenseRef { doc_ref, lic_ref } => match last_token { None | Some(Token::And | Token::Or | Token::OpenParen) => { expr_queue.push(ExprNode::Req(ExpressionReq { req: LicenseReq { license: LicenseItem::Other { doc_ref: doc_ref.map(String::from), lic_ref: String::from(*lic_ref), }, addition: None, }, span: lt.span.start as u32..lt.span.end as u32, })); } _ => return make_err_for_token(last_token, lt.span), }, Token::Plus => match last_token { Some(Token::Spdx(_)) => match expr_queue.last_mut().unwrap() { ExprNode::Req(ExpressionReq { req: LicenseReq { license: LicenseItem::Spdx { or_later, id }, .. }, .. }) => { // Handle GNU licenses differently, as they should *NOT* be used with the `+` if id.is_gnu() { if !mode.allow_postfix_plus_on_gpl { return Err(ParseError { original: original.to_owned(), span: lt.span, reason: Reason::GnuNoPlus, }); } if id.name.ends_with("-or-later") { return Err(ParseError { original: original.to_owned(), span: lt.span, reason: Reason::GnuPlusWithSuffix, }); } *id = crate::gnu_license_id( id.name.strip_suffix("-only").unwrap_or(id.name), true, ) .ok_or_else(|| ParseError { original: original.to_owned(), span: lt.span, reason: Reason::UnknownLicense, })?; } else { *or_later = true; } } _ => unreachable!(), }, _ => return make_err_for_token(last_token, lt.span), }, Token::With => match last_token { Some(Token::Spdx(_) | Token::LicenseRef { .. } | Token::Plus) => {} _ => return make_err_for_token(last_token, lt.span), }, Token::Or | Token::And => match last_token { Some( Token::Spdx(_) | Token::LicenseRef { .. } | Token::CloseParen | Token::Exception(_) | Token::AdditionRef { .. } | Token::Plus, ) => { let new_op = match lt.token { Token::Or => Op::Or, Token::And => Op::And, _ => unreachable!(), }; while let Some(op) = op_stack.last() { match &op.op { Op::Open => break, top => { if *top < new_op { let top = op_stack.pop().unwrap(); match top.op { Op::And | Op::Or => apply_op(top, &mut expr_queue)?, Op::Open => unreachable!(), } } else { break; } } } } op_stack.push(OpAndSpan { op: new_op, span: lt.span, }); } _ => return make_err_for_token(last_token, lt.span), }, Token::OpenParen => match last_token { None | Some(Token::And | Token::Or | Token::OpenParen) => { op_stack.push(OpAndSpan { op: Op::Open, span: lt.span, }); } _ => return make_err_for_token(last_token, lt.span), }, Token::CloseParen => { match last_token { Some( Token::Spdx(_) | Token::LicenseRef { .. } | Token::Plus | Token::Exception(_) | Token::AdditionRef { .. } | Token::CloseParen, ) => { while let Some(top) = op_stack.pop() { match top.op { Op::And | Op::Or => apply_op(top, &mut expr_queue)?, Op::Open => { // This is the only place we go back to the top of the outer loop, // so make sure we correctly record this token last_token = Some(Token::CloseParen); continue 'outer; } } } // We didn't have an opening parentheses if we get here return Err(ParseError { original: original.to_owned(), span: lt.span, reason: Reason::UnopenedParens, }); } _ => return make_err_for_token(last_token, lt.span), } } Token::Exception(exc) => match last_token { Some(Token::With) => match expr_queue.last_mut() { Some(ExprNode::Req(lic)) => { lic.req.addition = Some(AdditionItem::Spdx(*exc)); } _ => unreachable!(), }, _ => return make_err_for_token(last_token, lt.span), }, Token::AdditionRef { doc_ref, add_ref } => match last_token { Some(Token::With) => match expr_queue.last_mut() { Some(ExprNode::Req(lic)) => { lic.req.addition = Some(AdditionItem::Other { doc_ref: doc_ref.map(String::from), add_ref: String::from(*add_ref), }); } _ => unreachable!(), }, _ => return make_err_for_token(last_token, lt.span), }, } last_token = Some(lt.token); } // Validate that the terminating token is valid match last_token { Some( Token::Spdx(_) | Token::LicenseRef { .. } | Token::Exception(_) | Token::AdditionRef { .. } | Token::CloseParen | Token::Plus, ) => {} // We have to have at least one valid license requirement None => { return Err(ParseError { original: original.to_owned(), span: 0..original.len(), reason: Reason::Empty, }); } Some(_) => return make_err_for_token(last_token, original.len()..original.len()), } while let Some(top) = op_stack.pop() { match top.op { Op::And | Op::Or => apply_op(top, &mut expr_queue)?, Op::Open => { return Err(ParseError { original: original.to_owned(), span: top.span, reason: Reason::UnclosedParens, }); } } } // TODO: Investigate using https://github.com/oli-obk/quine-mc_cluskey to simplify // expressions, but not really critical. Just cool. Ok(Expression { original: original.to_owned(), expr: expr_queue, }) } } spdx-0.12.0/src/expression.rs000064400000000000000000000204131046102023000142160ustar 00000000000000//! Types used in SPDX expressions, notably [`Expression`] mod minimize; mod parser; use crate::{LicenseReq, error::ParseError}; pub use minimize::MinimizeError; use smallvec::SmallVec; use std::fmt; /// A license requirement inside an SPDX license expression, including /// the span in the expression where it is located #[derive(Debug, Clone)] pub struct ExpressionReq { pub req: LicenseReq, pub span: std::ops::Range, } impl PartialEq for ExpressionReq { fn eq(&self, o: &Self) -> bool { self.req == o.req } } /// The joining operators supported by SPDX 2.1 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Copy, Clone)] pub enum Operator { And, Or, } #[derive(Debug, Clone, PartialEq)] pub enum ExprNode { Op(Operator), Req(ExpressionReq), } /// An SPDX license expression that is both syntactically and semantically valid, /// and can be evaluated /// /// ``` /// use spdx::Expression; /// /// let this_is_fine = Expression::parse("MIT OR Apache-2.0").unwrap(); /// assert!(this_is_fine.evaluate(|req| { /// if let spdx::LicenseItem::Spdx { id, .. } = req.license { /// // Both MIT and Apache-2.0 are OSI approved, so this expression /// // evaluates to true /// return id.is_osi_approved(); /// } /// /// false /// })); /// /// assert!(!this_is_fine.evaluate(|req| { /// if let spdx::LicenseItem::Spdx { id, .. } = req.license { /// // This is saying we don't accept any licenses that are OSI approved /// // so the expression will evaluate to false as both sides of the OR /// // are now rejected /// return !id.is_osi_approved(); /// } /// /// false /// })); /// /// // `NOPE` is not a valid SPDX license identifier, so this expression /// // will fail to parse /// let _this_is_not = Expression::parse("MIT OR NOPE").unwrap_err(); /// ``` #[derive(Clone)] pub struct Expression { pub(crate) expr: SmallVec<[ExprNode; 5]>, // We keep the original string around for display purposes only pub(crate) original: String, } impl Expression { /// Returns each of the license requirements in the license expression, /// but not the operators that join them together /// /// ``` /// let expr = spdx::Expression::parse("MIT AND BSD-2-Clause").unwrap(); /// /// assert_eq!( /// &expr.requirements().map(|er| er.req.license.id()).collect::>(), &[ /// spdx::license_id("MIT"), /// spdx::license_id("BSD-2-Clause") /// ] /// ); /// ``` pub fn requirements(&self) -> impl Iterator { self.expr.iter().filter_map(|item| match item { ExprNode::Req(req) => Some(req), ExprNode::Op(_op) => None, }) } /// Returns both the license requirements and the operators that join them /// together. Note that the expression is returned in post fix order. /// /// ``` /// use spdx::expression::{ExprNode, Operator}; /// let expr = spdx::Expression::parse("Apache-2.0 OR MIT").unwrap(); /// /// let mut ei = expr.iter(); /// /// assert!(ei.next().is_some()); // Apache /// assert!(ei.next().is_some()); // MIT /// assert_eq!(*ei.next().unwrap(), ExprNode::Op(Operator::Or)); /// ``` pub fn iter(&self) -> impl Iterator { self.expr.iter() } /// Evaluates the expression, using the provided function to determine if the /// licensee meets the requirements for each license term. If enough requirements are /// satisfied the evaluation will return true. /// /// ``` /// use spdx::Expression; /// /// let this_is_fine = Expression::parse("MIT OR Apache-2.0").unwrap(); /// assert!(this_is_fine.evaluate(|req| { /// // If we find MIT, then we're happy! /// req.license.id() == spdx::license_id("MIT") /// })); /// ``` pub fn evaluate bool>(&self, mut allow_func: AF) -> bool { let mut result_stack = SmallVec::<[bool; 8]>::new(); // We store the expression as postfix, so just evaluate each license // requirement in the order it comes, and then combining the previous // results according to each operator as it comes for node in self.expr.iter() { match node { ExprNode::Req(req) => { let allowed = allow_func(&req.req); result_stack.push(allowed); } ExprNode::Op(Operator::Or) => { let a = result_stack.pop().unwrap(); let b = result_stack.pop().unwrap(); result_stack.push(a || b); } ExprNode::Op(Operator::And) => { let a = result_stack.pop().unwrap(); let b = result_stack.pop().unwrap(); result_stack.push(a && b); } } } result_stack.pop().unwrap() } /// A version of [`Self::evaluate`] that returns the requirements that are not /// met if the evaluation returns `false`. pub fn evaluate_with_failures bool>( &self, mut allow_func: AF, ) -> Result<(), Vec<&ExpressionReq>> { let mut result_stack = SmallVec::<[bool; 8]>::new(); let mut failures = Vec::new(); // We store the expression as postfix, so just evaluate each license // requirement in the order it comes, and then combining the previous // results according to each operator as it comes for node in self.expr.iter() { match node { ExprNode::Req(req) => { let allowed = allow_func(&req.req); result_stack.push(allowed); if !allowed { failures.push(req); } } ExprNode::Op(Operator::Or) => { let a = result_stack.pop().unwrap(); let b = result_stack.pop().unwrap(); result_stack.push(a || b); } ExprNode::Op(Operator::And) => { let a = result_stack.pop().unwrap(); let b = result_stack.pop().unwrap(); result_stack.push(a && b); } } } if let Some(false) = result_stack.pop() { Err(failures) } else { Ok(()) } } } impl AsRef for Expression { fn as_ref(&self) -> &str { &self.original } } impl fmt::Debug for Expression { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { for (i, node) in self.expr.iter().enumerate() { if i > 0 { f.write_str(" ")?; } match node { ExprNode::Req(req) => write!(f, "{}", req.req)?, ExprNode::Op(Operator::And) => f.write_str("AND")?, ExprNode::Op(Operator::Or) => f.write_str("OR")?, } } Ok(()) } } impl fmt::Display for Expression { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(&self.original) } } impl std::str::FromStr for Expression { type Err = ParseError; fn from_str(s: &str) -> Result { Self::parse(s) } } impl PartialEq for Expression { fn eq(&self, o: &Self) -> bool { // The expressions can be semantically the same but not // syntactically the same, if the user wants to compare // the raw expressions they can just do a string compare if self.expr.len() != o.expr.len() { return false; } !self.expr.iter().zip(o.expr.iter()).any(|(a, b)| a != b) } } #[cfg(test)] mod test { use super::Expression; #[test] #[allow(clippy::eq_op)] fn eq() { let normal = Expression::parse("MIT OR Apache-2.0").unwrap(); let extra_parens = Expression::parse("(MIT OR (Apache-2.0))").unwrap(); let llvm_exc = Expression::parse("MIT OR Apache-2.0 WITH LLVM-exception").unwrap(); assert_eq!(normal, normal); assert_eq!(extra_parens, extra_parens); assert_eq!(llvm_exc, llvm_exc); assert_eq!(normal, extra_parens); assert_ne!(normal, llvm_exc); } } spdx-0.12.0/src/identifiers.rs000064400000000000000000002037441046102023000143360ustar 00000000000000/* * list fetched from https://github.com/spdx/license-list-data @ v3.27.0 * * AUTO-GENERATED BY ./update * DO NOT MODIFY * * cargo run --manifest-path update/Cargo.toml -- v > src/identifiers.rs */ pub const IS_FSF_LIBRE: u8 = 0x1; pub const IS_OSI_APPROVED: u8 = 0x2; pub const IS_DEPRECATED: u8 = 0x4; pub const IS_COPYLEFT: u8 = 0x8; pub const IS_GNU: u8 = 0x10; pub const VERSION: &str = "3.27.0"; pub const LICENSES: &[(&str, &str, u8)] = &[ ("0BSD", r#"BSD Zero Clause License"#, IS_OSI_APPROVED), ("3D-Slicer-1.0", r#"3D Slicer License v1.0"#, 0x0), ("AAL", r#"Attribution Assurance License"#, IS_OSI_APPROVED), ("ADSL", r#"Amazon Digital Services License"#, 0x0), ( "AFL-1.1", r#"Academic Free License v1.1"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "AFL-1.2", r#"Academic Free License v1.2"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "AFL-2.0", r#"Academic Free License v2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "AFL-2.1", r#"Academic Free License v2.1"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "AFL-3.0", r#"Academic Free License v3.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "AGPL-1.0", r#"Affero General Public License v1.0"#, IS_DEPRECATED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "AGPL-1.0-only", r#"Affero General Public License v1.0 only"#, IS_COPYLEFT | IS_GNU, ), ( "AGPL-1.0-or-later", r#"Affero General Public License v1.0 or later"#, IS_COPYLEFT | IS_GNU, ), ( "AGPL-3.0", r#"GNU Affero General Public License v3.0"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "AGPL-3.0-only", r#"GNU Affero General Public License v3.0 only"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "AGPL-3.0-or-later", r#"GNU Affero General Public License v3.0 or later"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ("AMD-newlib", r#"AMD newlib License"#, 0x0), ("AMDPLPA", r#"AMD's plpa_map.c License"#, 0x0), ("AML", r#"Apple MIT License"#, 0x0), ("AML-glslang", r#"AML glslang variant License"#, 0x0), ( "AMPAS", r#"Academy of Motion Picture Arts and Sciences BSD"#, 0x0, ), ("ANTLR-PD", r#"ANTLR Software Rights Notice"#, 0x0), ( "ANTLR-PD-fallback", r#"ANTLR Software Rights Notice with license fallback"#, 0x0, ), ("APAFML", r#"Adobe Postscript AFM License"#, 0x0), ("APL-1.0", r#"Adaptive Public License 1.0"#, IS_OSI_APPROVED), ( "APSL-1.0", r#"Apple Public Source License 1.0"#, IS_OSI_APPROVED, ), ( "APSL-1.1", r#"Apple Public Source License 1.1"#, IS_OSI_APPROVED, ), ( "APSL-1.2", r#"Apple Public Source License 1.2"#, IS_OSI_APPROVED, ), ( "APSL-2.0", r#"Apple Public Source License 2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "ASWF-Digital-Assets-1.0", r#"ASWF Digital Assets License version 1.0"#, 0x0, ), ( "ASWF-Digital-Assets-1.1", r#"ASWF Digital Assets License 1.1"#, 0x0, ), ("Abstyles", r#"Abstyles License"#, 0x0), ("AdaCore-doc", r#"AdaCore Doc License"#, 0x0), ( "Adobe-2006", r#"Adobe Systems Incorporated Source Code License Agreement"#, 0x0, ), ( "Adobe-Display-PostScript", r#"Adobe Display PostScript License"#, 0x0, ), ("Adobe-Glyph", r#"Adobe Glyph List License"#, 0x0), ("Adobe-Utopia", r#"Adobe Utopia Font License"#, 0x0), ("Afmparse", r#"Afmparse License"#, 0x0), ("Aladdin", r#"Aladdin Free Public License"#, 0x0), ("Apache-1.0", r#"Apache License 1.0"#, IS_FSF_LIBRE), ( "Apache-1.1", r#"Apache License 1.1"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "Apache-2.0", r#"Apache License 2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("App-s2p", r#"App::s2p License"#, 0x0), ("Arphic-1999", r#"Arphic Public License"#, 0x0), ("Artistic-1.0", r#"Artistic License 1.0"#, IS_OSI_APPROVED), ( "Artistic-1.0-Perl", r#"Artistic License 1.0 (Perl)"#, IS_OSI_APPROVED, ), ( "Artistic-1.0-cl8", r#"Artistic License 1.0 w/clause 8"#, IS_OSI_APPROVED, ), ( "Artistic-2.0", r#"Artistic License 2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("Artistic-dist", r#"Artistic License 1.0 (dist)"#, 0x0), ("Aspell-RU", r#"Aspell Russian License"#, 0x0), ("BSD-1-Clause", r#"BSD 1-Clause License"#, IS_OSI_APPROVED), ( "BSD-2-Clause", r#"BSD 2-Clause "Simplified" License"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "BSD-2-Clause-Darwin", r#"BSD 2-Clause - Ian Darwin variant"#, 0x0, ), ( "BSD-2-Clause-FreeBSD", r#"BSD 2-Clause FreeBSD License"#, IS_DEPRECATED | IS_FSF_LIBRE, ), ( "BSD-2-Clause-NetBSD", r#"BSD 2-Clause NetBSD License"#, IS_DEPRECATED | IS_FSF_LIBRE, ), ( "BSD-2-Clause-Patent", r#"BSD-2-Clause Plus Patent License"#, IS_OSI_APPROVED, ), ( "BSD-2-Clause-Views", r#"BSD 2-Clause with views sentence"#, 0x0, ), ( "BSD-2-Clause-first-lines", r#"BSD 2-Clause - first lines requirement"#, 0x0, ), ( "BSD-2-Clause-pkgconf-disclaimer", r#"BSD 2-Clause pkgconf disclaimer variant"#, 0x0, ), ( "BSD-3-Clause", r#"BSD 3-Clause "New" or "Revised" License"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("BSD-3-Clause-Attribution", r#"BSD with attribution"#, 0x0), ( "BSD-3-Clause-Clear", r#"BSD 3-Clause Clear License"#, IS_FSF_LIBRE, ), ( "BSD-3-Clause-HP", r#"Hewlett-Packard BSD variant license"#, 0x0, ), ( "BSD-3-Clause-LBNL", r#"Lawrence Berkeley National Labs BSD variant license"#, IS_OSI_APPROVED, ), ( "BSD-3-Clause-Modification", r#"BSD 3-Clause Modification"#, 0x0, ), ( "BSD-3-Clause-No-Military-License", r#"BSD 3-Clause No Military License"#, 0x0, ), ( "BSD-3-Clause-No-Nuclear-License", r#"BSD 3-Clause No Nuclear License"#, 0x0, ), ( "BSD-3-Clause-No-Nuclear-License-2014", r#"BSD 3-Clause No Nuclear License 2014"#, 0x0, ), ( "BSD-3-Clause-No-Nuclear-Warranty", r#"BSD 3-Clause No Nuclear Warranty"#, 0x0, ), ( "BSD-3-Clause-Open-MPI", r#"BSD 3-Clause Open MPI variant"#, 0x0, ), ("BSD-3-Clause-Sun", r#"BSD 3-Clause Sun Microsystems"#, 0x0), ("BSD-3-Clause-acpica", r#"BSD 3-Clause acpica variant"#, 0x0), ("BSD-3-Clause-flex", r#"BSD 3-Clause Flex variant"#, 0x0), ( "BSD-4-Clause", r#"BSD 4-Clause "Original" or "Old" License"#, IS_FSF_LIBRE, ), ("BSD-4-Clause-Shortened", r#"BSD 4 Clause Shortened"#, 0x0), ( "BSD-4-Clause-UC", r#"BSD-4-Clause (University of California-Specific)"#, 0x0, ), ("BSD-4.3RENO", r#"BSD 4.3 RENO License"#, 0x0), ("BSD-4.3TAHOE", r#"BSD 4.3 TAHOE License"#, 0x0), ( "BSD-Advertising-Acknowledgement", r#"BSD Advertising Acknowledgement License"#, 0x0, ), ( "BSD-Attribution-HPND-disclaimer", r#"BSD with Attribution and HPND disclaimer"#, 0x0, ), ("BSD-Inferno-Nettverk", r#"BSD-Inferno-Nettverk"#, 0x0), ("BSD-Protection", r#"BSD Protection License"#, IS_COPYLEFT), ("BSD-Source-Code", r#"BSD Source Code Attribution"#, 0x0), ( "BSD-Source-beginning-file", r#"BSD Source Code Attribution - beginning of file variant"#, 0x0, ), ("BSD-Systemics", r#"Systemics BSD variant license"#, 0x0), ( "BSD-Systemics-W3Works", r#"Systemics W3Works BSD variant license"#, 0x0, ), ( "BSL-1.0", r#"Boost Software License 1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("BUSL-1.1", r#"Business Source License 1.1"#, 0x0), ("Baekmuk", r#"Baekmuk License"#, 0x0), ("Bahyph", r#"Bahyph License"#, 0x0), ("Barr", r#"Barr License"#, 0x0), ("Beerware", r#"Beerware License"#, 0x0), ( "BitTorrent-1.0", r#"BitTorrent Open Source License v1.0"#, 0x0, ), ( "BitTorrent-1.1", r#"BitTorrent Open Source License v1.1"#, IS_FSF_LIBRE, ), ( "Bitstream-Charter", r#"Bitstream Charter Font License"#, 0x0, ), ("Bitstream-Vera", r#"Bitstream Vera Font License"#, 0x0), ( "BlueOak-1.0.0", r#"Blue Oak Model License 1.0.0"#, IS_OSI_APPROVED, ), ("Boehm-GC", r#"Boehm-Demers-Weiser GC License"#, 0x0), ( "Boehm-GC-without-fee", r#"Boehm-Demers-Weiser GC License (without fee)"#, 0x0, ), ("Borceux", r#"Borceux license"#, 0x0), ( "Brian-Gladman-2-Clause", r#"Brian Gladman 2-Clause License"#, 0x0, ), ( "Brian-Gladman-3-Clause", r#"Brian Gladman 3-Clause License"#, 0x0, ), ( "C-UDA-1.0", r#"Computational Use of Data Agreement v1.0"#, 0x0, ), ( "CAL-1.0", r#"Cryptographic Autonomy License 1.0"#, IS_OSI_APPROVED, ), ( "CAL-1.0-Combined-Work-Exception", r#"Cryptographic Autonomy License 1.0 (Combined Work Exception)"#, IS_OSI_APPROVED, ), ( "CATOSL-1.1", r#"Computer Associates Trusted Open Source License 1.1"#, IS_OSI_APPROVED, ), ( "CC-BY-1.0", r#"Creative Commons Attribution 1.0 Generic"#, 0x0, ), ( "CC-BY-2.0", r#"Creative Commons Attribution 2.0 Generic"#, 0x0, ), ( "CC-BY-2.5", r#"Creative Commons Attribution 2.5 Generic"#, 0x0, ), ( "CC-BY-2.5-AU", r#"Creative Commons Attribution 2.5 Australia"#, 0x0, ), ( "CC-BY-3.0", r#"Creative Commons Attribution 3.0 Unported"#, 0x0, ), ( "CC-BY-3.0-AT", r#"Creative Commons Attribution 3.0 Austria"#, 0x0, ), ( "CC-BY-3.0-AU", r#"Creative Commons Attribution 3.0 Australia"#, 0x0, ), ( "CC-BY-3.0-DE", r#"Creative Commons Attribution 3.0 Germany"#, 0x0, ), ( "CC-BY-3.0-IGO", r#"Creative Commons Attribution 3.0 IGO"#, 0x0, ), ( "CC-BY-3.0-NL", r#"Creative Commons Attribution 3.0 Netherlands"#, 0x0, ), ( "CC-BY-3.0-US", r#"Creative Commons Attribution 3.0 United States"#, 0x0, ), ( "CC-BY-4.0", r#"Creative Commons Attribution 4.0 International"#, IS_FSF_LIBRE, ), ( "CC-BY-NC-1.0", r#"Creative Commons Attribution Non Commercial 1.0 Generic"#, 0x0, ), ( "CC-BY-NC-2.0", r#"Creative Commons Attribution Non Commercial 2.0 Generic"#, 0x0, ), ( "CC-BY-NC-2.5", r#"Creative Commons Attribution Non Commercial 2.5 Generic"#, 0x0, ), ( "CC-BY-NC-3.0", r#"Creative Commons Attribution Non Commercial 3.0 Unported"#, 0x0, ), ( "CC-BY-NC-3.0-DE", r#"Creative Commons Attribution Non Commercial 3.0 Germany"#, 0x0, ), ( "CC-BY-NC-4.0", r#"Creative Commons Attribution Non Commercial 4.0 International"#, 0x0, ), ( "CC-BY-NC-ND-1.0", r#"Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic"#, 0x0, ), ( "CC-BY-NC-ND-2.0", r#"Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic"#, 0x0, ), ( "CC-BY-NC-ND-2.5", r#"Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic"#, 0x0, ), ( "CC-BY-NC-ND-3.0", r#"Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported"#, 0x0, ), ( "CC-BY-NC-ND-3.0-DE", r#"Creative Commons Attribution Non Commercial No Derivatives 3.0 Germany"#, 0x0, ), ( "CC-BY-NC-ND-3.0-IGO", r#"Creative Commons Attribution Non Commercial No Derivatives 3.0 IGO"#, 0x0, ), ( "CC-BY-NC-ND-4.0", r#"Creative Commons Attribution Non Commercial No Derivatives 4.0 International"#, 0x0, ), ( "CC-BY-NC-SA-1.0", r#"Creative Commons Attribution Non Commercial Share Alike 1.0 Generic"#, IS_COPYLEFT, ), ( "CC-BY-NC-SA-2.0", r#"Creative Commons Attribution Non Commercial Share Alike 2.0 Generic"#, IS_COPYLEFT, ), ( "CC-BY-NC-SA-2.0-DE", r#"Creative Commons Attribution Non Commercial Share Alike 2.0 Germany"#, IS_COPYLEFT, ), ( "CC-BY-NC-SA-2.0-FR", r#"Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France"#, IS_COPYLEFT, ), ( "CC-BY-NC-SA-2.0-UK", r#"Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales"#, IS_COPYLEFT, ), ( "CC-BY-NC-SA-2.5", r#"Creative Commons Attribution Non Commercial Share Alike 2.5 Generic"#, IS_COPYLEFT, ), ( "CC-BY-NC-SA-3.0", r#"Creative Commons Attribution Non Commercial Share Alike 3.0 Unported"#, IS_COPYLEFT, ), ( "CC-BY-NC-SA-3.0-DE", r#"Creative Commons Attribution Non Commercial Share Alike 3.0 Germany"#, IS_COPYLEFT, ), ( "CC-BY-NC-SA-3.0-IGO", r#"Creative Commons Attribution Non Commercial Share Alike 3.0 IGO"#, IS_COPYLEFT, ), ( "CC-BY-NC-SA-4.0", r#"Creative Commons Attribution Non Commercial Share Alike 4.0 International"#, IS_COPYLEFT, ), ( "CC-BY-ND-1.0", r#"Creative Commons Attribution No Derivatives 1.0 Generic"#, 0x0, ), ( "CC-BY-ND-2.0", r#"Creative Commons Attribution No Derivatives 2.0 Generic"#, 0x0, ), ( "CC-BY-ND-2.5", r#"Creative Commons Attribution No Derivatives 2.5 Generic"#, 0x0, ), ( "CC-BY-ND-3.0", r#"Creative Commons Attribution No Derivatives 3.0 Unported"#, 0x0, ), ( "CC-BY-ND-3.0-DE", r#"Creative Commons Attribution No Derivatives 3.0 Germany"#, 0x0, ), ( "CC-BY-ND-4.0", r#"Creative Commons Attribution No Derivatives 4.0 International"#, 0x0, ), ( "CC-BY-SA-1.0", r#"Creative Commons Attribution Share Alike 1.0 Generic"#, IS_COPYLEFT, ), ( "CC-BY-SA-2.0", r#"Creative Commons Attribution Share Alike 2.0 Generic"#, IS_COPYLEFT, ), ( "CC-BY-SA-2.0-UK", r#"Creative Commons Attribution Share Alike 2.0 England and Wales"#, IS_COPYLEFT, ), ( "CC-BY-SA-2.1-JP", r#"Creative Commons Attribution Share Alike 2.1 Japan"#, IS_COPYLEFT, ), ( "CC-BY-SA-2.5", r#"Creative Commons Attribution Share Alike 2.5 Generic"#, IS_COPYLEFT, ), ( "CC-BY-SA-3.0", r#"Creative Commons Attribution Share Alike 3.0 Unported"#, IS_COPYLEFT, ), ( "CC-BY-SA-3.0-AT", r#"Creative Commons Attribution Share Alike 3.0 Austria"#, IS_COPYLEFT, ), ( "CC-BY-SA-3.0-DE", r#"Creative Commons Attribution Share Alike 3.0 Germany"#, IS_COPYLEFT, ), ( "CC-BY-SA-3.0-IGO", r#"Creative Commons Attribution-ShareAlike 3.0 IGO"#, IS_COPYLEFT, ), ( "CC-BY-SA-4.0", r#"Creative Commons Attribution Share Alike 4.0 International"#, IS_FSF_LIBRE | IS_COPYLEFT, ), ( "CC-PDDC", r#"Creative Commons Public Domain Dedication and Certification"#, 0x0, ), ( "CC-PDM-1.0", r#"Creative Commons Public Domain Mark 1.0 Universal"#, 0x0, ), ( "CC-SA-1.0", r#"Creative Commons Share Alike 1.0 Generic"#, 0x0, ), ( "CC0-1.0", r#"Creative Commons Zero v1.0 Universal"#, IS_FSF_LIBRE, ), ( "CDDL-1.0", r#"Common Development and Distribution License 1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ( "CDDL-1.1", r#"Common Development and Distribution License 1.1"#, IS_COPYLEFT, ), ("CDL-1.0", r#"Common Documentation License 1.0"#, 0x0), ( "CDLA-Permissive-1.0", r#"Community Data License Agreement Permissive 1.0"#, 0x0, ), ( "CDLA-Permissive-2.0", r#"Community Data License Agreement Permissive 2.0"#, 0x0, ), ( "CDLA-Sharing-1.0", r#"Community Data License Agreement Sharing 1.0"#, 0x0, ), ( "CECILL-1.0", r#"CeCILL Free Software License Agreement v1.0"#, IS_COPYLEFT, ), ( "CECILL-1.1", r#"CeCILL Free Software License Agreement v1.1"#, IS_COPYLEFT, ), ( "CECILL-2.0", r#"CeCILL Free Software License Agreement v2.0"#, IS_FSF_LIBRE | IS_COPYLEFT, ), ( "CECILL-2.1", r#"CeCILL Free Software License Agreement v2.1"#, IS_OSI_APPROVED | IS_COPYLEFT, ), ( "CECILL-B", r#"CeCILL-B Free Software License Agreement"#, IS_FSF_LIBRE | IS_COPYLEFT, ), ( "CECILL-C", r#"CeCILL-C Free Software License Agreement"#, IS_FSF_LIBRE | IS_COPYLEFT, ), ("CERN-OHL-1.1", r#"CERN Open Hardware Licence v1.1"#, 0x0), ("CERN-OHL-1.2", r#"CERN Open Hardware Licence v1.2"#, 0x0), ( "CERN-OHL-P-2.0", r#"CERN Open Hardware Licence Version 2 - Permissive"#, IS_OSI_APPROVED, ), ( "CERN-OHL-S-2.0", r#"CERN Open Hardware Licence Version 2 - Strongly Reciprocal"#, IS_OSI_APPROVED, ), ( "CERN-OHL-W-2.0", r#"CERN Open Hardware Licence Version 2 - Weakly Reciprocal"#, IS_OSI_APPROVED, ), ("CFITSIO", r#"CFITSIO License"#, 0x0), ("CMU-Mach", r#"CMU Mach License"#, 0x0), ( "CMU-Mach-nodoc", r#"CMU Mach - no notices-in-documentation variant"#, 0x0, ), ("CNRI-Jython", r#"CNRI Jython License"#, 0x0), ("CNRI-Python", r#"CNRI Python License"#, IS_OSI_APPROVED), ( "CNRI-Python-GPL-Compatible", r#"CNRI Python Open Source GPL Compatible License Agreement"#, 0x0, ), ("COIL-1.0", r#"Copyfree Open Innovation License"#, 0x0), ( "CPAL-1.0", r#"Common Public Attribution License 1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "CPL-1.0", r#"Common Public License 1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ("CPOL-1.02", r#"Code Project Open License 1.02"#, 0x0), ( "CUA-OPL-1.0", r#"CUA Office Public License v1.0"#, IS_OSI_APPROVED, ), ("Caldera", r#"Caldera License"#, 0x0), ( "Caldera-no-preamble", r#"Caldera License (without preamble)"#, 0x0, ), ("Catharon", r#"Catharon License"#, 0x0), ("ClArtistic", r#"Clarified Artistic License"#, IS_FSF_LIBRE), ("Clips", r#"Clips License"#, 0x0), ( "Community-Spec-1.0", r#"Community Specification License 1.0"#, 0x0, ), ("Condor-1.1", r#"Condor Public License v1.1"#, IS_FSF_LIBRE), ( "Cornell-Lossless-JPEG", r#"Cornell Lossless JPEG License"#, 0x0, ), ("Cronyx", r#"Cronyx License"#, 0x0), ("Crossword", r#"Crossword License"#, 0x0), ("CryptoSwift", r#"CryptoSwift License"#, 0x0), ("CrystalStacker", r#"CrystalStacker License"#, 0x0), ("Cube", r#"Cube License"#, 0x0), ("D-FSL-1.0", r#"Deutsche Freie Software Lizenz"#, 0x0), ("DEC-3-Clause", r#"DEC 3-Clause License"#, 0x0), ( "DL-DE-BY-2.0", r#"Data licence Germany – attribution – version 2.0"#, 0x0, ), ( "DL-DE-ZERO-2.0", r#"Data licence Germany – zero – version 2.0"#, 0x0, ), ("DOC", r#"DOC License"#, 0x0), ("DRL-1.0", r#"Detection Rule License 1.0"#, 0x0), ("DRL-1.1", r#"Detection Rule License 1.1"#, 0x0), ("DSDP", r#"DSDP License"#, 0x0), ("DocBook-DTD", r#"DocBook DTD License"#, 0x0), ("DocBook-Schema", r#"DocBook Schema License"#, 0x0), ("DocBook-Stylesheet", r#"DocBook Stylesheet License"#, 0x0), ("DocBook-XML", r#"DocBook XML License"#, 0x0), ("Dotseqn", r#"Dotseqn License"#, 0x0), ( "ECL-1.0", r#"Educational Community License v1.0"#, IS_OSI_APPROVED, ), ( "ECL-2.0", r#"Educational Community License v2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("EFL-1.0", r#"Eiffel Forum License v1.0"#, IS_OSI_APPROVED), ( "EFL-2.0", r#"Eiffel Forum License v2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("EPICS", r#"EPICS Open License"#, 0x0), ( "EPL-1.0", r#"Eclipse Public License 1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "EPL-2.0", r#"Eclipse Public License 2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "EUDatagrid", r#"EU DataGrid Software License"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "EUPL-1.0", r#"European Union Public License 1.0"#, IS_COPYLEFT, ), ( "EUPL-1.1", r#"European Union Public License 1.1"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ( "EUPL-1.2", r#"European Union Public License 1.2"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ("Elastic-2.0", r#"Elastic License 2.0"#, 0x0), ("Entessa", r#"Entessa Public License v1.0"#, IS_OSI_APPROVED), ("ErlPL-1.1", r#"Erlang Public License v1.1"#, 0x0), ("Eurosym", r#"Eurosym License"#, 0x0), ("FBM", r#"Fuzzy Bitmap License"#, 0x0), ("FDK-AAC", r#"Fraunhofer FDK AAC Codec Library"#, 0x0), ("FSFAP", r#"FSF All Permissive License"#, IS_FSF_LIBRE), ( "FSFAP-no-warranty-disclaimer", r#"FSF All Permissive License (without Warranty)"#, 0x0, ), ("FSFUL", r#"FSF Unlimited License"#, 0x0), ( "FSFULLR", r#"FSF Unlimited License (with License Retention)"#, 0x0, ), ( "FSFULLRSD", r#"FSF Unlimited License (with License Retention and Short Disclaimer)"#, 0x0, ), ( "FSFULLRWD", r#"FSF Unlimited License (With License Retention and Warranty Disclaimer)"#, 0x0, ), ( "FSL-1.1-ALv2", r#"Functional Source License, Version 1.1, ALv2 Future License"#, 0x0, ), ( "FSL-1.1-MIT", r#"Functional Source License, Version 1.1, MIT Future License"#, 0x0, ), ("FTL", r#"Freetype Project License"#, IS_FSF_LIBRE), ("Fair", r#"Fair License"#, IS_OSI_APPROVED), ("Ferguson-Twofish", r#"Ferguson Twofish License"#, 0x0), ( "Frameworx-1.0", r#"Frameworx Open License 1.0"#, IS_OSI_APPROVED, ), ("FreeBSD-DOC", r#"FreeBSD Documentation License"#, 0x0), ("FreeImage", r#"FreeImage Public License v1.0"#, 0x0), ("Furuseth", r#"Furuseth License"#, 0x0), ("GCR-docs", r#"Gnome GCR Documentation License"#, 0x0), ("GD", r#"GD License"#, 0x0), ( "GFDL-1.1", r#"GNU Free Documentation License v1.1"#, IS_DEPRECATED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.1-invariants", r#"GNU Free Documentation License v1.1 only - invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.1-invariants-only", r#"GNU Free Documentation License v1.1 only - invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.1-invariants-or-later", r#"GNU Free Documentation License v1.1 or later - invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.1-no-invariants", r#"GNU Free Documentation License v1.1 only - no invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.1-no-invariants-only", r#"GNU Free Documentation License v1.1 only - no invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.1-no-invariants-or-later", r#"GNU Free Documentation License v1.1 or later - no invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.1-only", r#"GNU Free Documentation License v1.1 only"#, IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.1-or-later", r#"GNU Free Documentation License v1.1 or later"#, IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.2", r#"GNU Free Documentation License v1.2"#, IS_DEPRECATED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.2-invariants", r#"GNU Free Documentation License v1.2 only - invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.2-invariants-only", r#"GNU Free Documentation License v1.2 only - invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.2-invariants-or-later", r#"GNU Free Documentation License v1.2 or later - invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.2-no-invariants", r#"GNU Free Documentation License v1.2 only - no invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.2-no-invariants-only", r#"GNU Free Documentation License v1.2 only - no invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.2-no-invariants-or-later", r#"GNU Free Documentation License v1.2 or later - no invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.2-only", r#"GNU Free Documentation License v1.2 only"#, IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.2-or-later", r#"GNU Free Documentation License v1.2 or later"#, IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.3", r#"GNU Free Documentation License v1.3"#, IS_DEPRECATED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.3-invariants", r#"GNU Free Documentation License v1.3 only - invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.3-invariants-only", r#"GNU Free Documentation License v1.3 only - invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.3-invariants-or-later", r#"GNU Free Documentation License v1.3 or later - invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.3-no-invariants", r#"GNU Free Documentation License v1.3 only - no invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.3-no-invariants-only", r#"GNU Free Documentation License v1.3 only - no invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.3-no-invariants-or-later", r#"GNU Free Documentation License v1.3 or later - no invariants"#, IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.3-only", r#"GNU Free Documentation License v1.3 only"#, IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GFDL-1.3-or-later", r#"GNU Free Documentation License v1.3 or later"#, IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ("GL2PS", r#"GL2PS License"#, 0x0), ("GLWTPL", r#"Good Luck With That Public License"#, 0x0), ( "GPL-1.0", r#"GNU General Public License v1.0 only"#, IS_DEPRECATED | IS_COPYLEFT | IS_GNU, ), ( "GPL-1.0+", r#"GNU General Public License v1.0 or later"#, IS_DEPRECATED | IS_COPYLEFT | IS_GNU, ), ( "GPL-1.0-only", r#"GNU General Public License v1.0 only"#, IS_COPYLEFT | IS_GNU, ), ( "GPL-1.0-or-later", r#"GNU General Public License v1.0 or later"#, IS_COPYLEFT | IS_GNU, ), ( "GPL-2.0", r#"GNU General Public License v2.0 only"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GPL-2.0+", r#"GNU General Public License v2.0 or later"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GPL-2.0-only", r#"GNU General Public License v2.0 only"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GPL-2.0-or-later", r#"GNU General Public License v2.0 or later"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GPL-2.0-with-GCC-exception", r#"GNU General Public License v2.0 w/GCC Runtime Library exception"#, IS_DEPRECATED | IS_COPYLEFT | IS_GNU, ), ( "GPL-2.0-with-autoconf-exception", r#"GNU General Public License v2.0 w/Autoconf exception"#, IS_DEPRECATED | IS_COPYLEFT | IS_GNU, ), ( "GPL-2.0-with-bison-exception", r#"GNU General Public License v2.0 w/Bison exception"#, IS_DEPRECATED | IS_COPYLEFT | IS_GNU, ), ( "GPL-2.0-with-classpath-exception", r#"GNU General Public License v2.0 w/Classpath exception"#, IS_DEPRECATED | IS_COPYLEFT | IS_GNU, ), ( "GPL-2.0-with-font-exception", r#"GNU General Public License v2.0 w/Font exception"#, IS_DEPRECATED | IS_COPYLEFT | IS_GNU, ), ( "GPL-3.0", r#"GNU General Public License v3.0 only"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GPL-3.0+", r#"GNU General Public License v3.0 or later"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GPL-3.0-only", r#"GNU General Public License v3.0 only"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GPL-3.0-or-later", r#"GNU General Public License v3.0 or later"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "GPL-3.0-with-GCC-exception", r#"GNU General Public License v3.0 w/GCC Runtime Library exception"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_COPYLEFT | IS_GNU, ), ( "GPL-3.0-with-autoconf-exception", r#"GNU General Public License v3.0 w/Autoconf exception"#, IS_DEPRECATED | IS_COPYLEFT | IS_GNU, ), ( "Game-Programming-Gems", r#"Game Programming Gems License"#, 0x0, ), ("Giftware", r#"Giftware License"#, 0x0), ("Glide", r#"3dfx Glide License"#, 0x0), ("Glulxe", r#"Glulxe License"#, 0x0), ("Graphics-Gems", r#"Graphics Gems License"#, 0x0), ("Gutmann", r#"Gutmann License"#, 0x0), ("HDF5", r#"HDF5 License"#, 0x0), ("HIDAPI", r#"HIDAPI License"#, 0x0), ("HP-1986", r#"Hewlett-Packard 1986 License"#, 0x0), ("HP-1989", r#"Hewlett-Packard 1989 License"#, 0x0), ( "HPND", r#"Historical Permission Notice and Disclaimer"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "HPND-DEC", r#"Historical Permission Notice and Disclaimer - DEC variant"#, 0x0, ), ( "HPND-Fenneberg-Livingston", r#"Historical Permission Notice and Disclaimer - Fenneberg-Livingston variant"#, 0x0, ), ( "HPND-INRIA-IMAG", r#"Historical Permission Notice and Disclaimer - INRIA-IMAG variant"#, 0x0, ), ( "HPND-Intel", r#"Historical Permission Notice and Disclaimer - Intel variant"#, 0x0, ), ( "HPND-Kevlin-Henney", r#"Historical Permission Notice and Disclaimer - Kevlin Henney variant"#, 0x0, ), ( "HPND-MIT-disclaimer", r#"Historical Permission Notice and Disclaimer with MIT disclaimer"#, 0x0, ), ( "HPND-Markus-Kuhn", r#"Historical Permission Notice and Disclaimer - Markus Kuhn variant"#, 0x0, ), ( "HPND-Netrek", r#"Historical Permission Notice and Disclaimer - Netrek variant"#, 0x0, ), ( "HPND-Pbmplus", r#"Historical Permission Notice and Disclaimer - Pbmplus variant"#, 0x0, ), ( "HPND-UC", r#"Historical Permission Notice and Disclaimer - University of California variant"#, 0x0, ), ( "HPND-UC-export-US", r#"Historical Permission Notice and Disclaimer - University of California, US export warning"#, 0x0, ), ( "HPND-doc", r#"Historical Permission Notice and Disclaimer - documentation variant"#, 0x0, ), ( "HPND-doc-sell", r#"Historical Permission Notice and Disclaimer - documentation sell variant"#, 0x0, ), ( "HPND-export-US", r#"HPND with US Government export control warning"#, 0x0, ), ( "HPND-export-US-acknowledgement", r#"HPND with US Government export control warning and acknowledgment"#, 0x0, ), ( "HPND-export-US-modify", r#"HPND with US Government export control warning and modification rqmt"#, 0x0, ), ( "HPND-export2-US", r#"HPND with US Government export control and 2 disclaimers"#, 0x0, ), ( "HPND-merchantability-variant", r#"Historical Permission Notice and Disclaimer - merchantability variant"#, 0x0, ), ( "HPND-sell-MIT-disclaimer-xserver", r#"Historical Permission Notice and Disclaimer - sell xserver variant with MIT disclaimer"#, 0x0, ), ( "HPND-sell-regexpr", r#"Historical Permission Notice and Disclaimer - sell regexpr variant"#, 0x0, ), ( "HPND-sell-variant", r#"Historical Permission Notice and Disclaimer - sell variant"#, 0x0, ), ( "HPND-sell-variant-MIT-disclaimer", r#"HPND sell variant with MIT disclaimer"#, 0x0, ), ( "HPND-sell-variant-MIT-disclaimer-rev", r#"HPND sell variant with MIT disclaimer - reverse"#, 0x0, ), ("HTMLTIDY", r#"HTML Tidy License"#, 0x0), ("HaskellReport", r#"Haskell Language Report License"#, 0x0), ("Hippocratic-2.1", r#"Hippocratic License 2.1"#, 0x0), ( "IBM-pibs", r#"IBM PowerPC Initialization and Boot Software"#, 0x0, ), ("ICU", r#"ICU License"#, IS_OSI_APPROVED), ( "IEC-Code-Components-EULA", r#"IEC Code Components End-user licence agreement"#, 0x0, ), ("IJG", r#"Independent JPEG Group License"#, IS_FSF_LIBRE), ( "IJG-short", r#"Independent JPEG Group License - short"#, 0x0, ), ("IPA", r#"IPA Font License"#, IS_OSI_APPROVED | IS_FSF_LIBRE), ( "IPL-1.0", r#"IBM Public License v1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("ISC", r#"ISC License"#, IS_OSI_APPROVED | IS_FSF_LIBRE), ("ISC-Veillard", r#"ISC Veillard variant"#, 0x0), ("ImageMagick", r#"ImageMagick License"#, 0x0), ("Imlib2", r#"Imlib2 License"#, IS_FSF_LIBRE), ("Info-ZIP", r#"Info-ZIP License"#, 0x0), ("Inner-Net-2.0", r#"Inner Net License v2.0"#, 0x0), ("InnoSetup", r#"Inno Setup License"#, 0x0), ( "Intel", r#"Intel Open Source License"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "Intel-ACPI", r#"Intel ACPI Software License Agreement"#, 0x0, ), ("Interbase-1.0", r#"Interbase Public License v1.0"#, 0x0), ("JPL-image", r#"JPL Image Use Policy"#, 0x0), ("JPNIC", r#"Japan Network Information Center License"#, 0x0), ("JSON", r#"JSON License"#, 0x0), ("Jam", r#"Jam License"#, IS_OSI_APPROVED), ("JasPer-2.0", r#"JasPer License"#, 0x0), ("Kastrup", r#"Kastrup License"#, 0x0), ("Kazlib", r#"Kazlib License"#, 0x0), ("Knuth-CTAN", r#"Knuth CTAN License"#, 0x0), ("LAL-1.2", r#"Licence Art Libre 1.2"#, 0x0), ("LAL-1.3", r#"Licence Art Libre 1.3"#, 0x0), ( "LGPL-2.0", r#"GNU Library General Public License v2 only"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_COPYLEFT | IS_GNU, ), ( "LGPL-2.0+", r#"GNU Library General Public License v2 or later"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_COPYLEFT | IS_GNU, ), ( "LGPL-2.0-only", r#"GNU Library General Public License v2 only"#, IS_OSI_APPROVED | IS_COPYLEFT | IS_GNU, ), ( "LGPL-2.0-or-later", r#"GNU Library General Public License v2 or later"#, IS_OSI_APPROVED | IS_COPYLEFT | IS_GNU, ), ( "LGPL-2.1", r#"GNU Lesser General Public License v2.1 only"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "LGPL-2.1+", r#"GNU Lesser General Public License v2.1 or later"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "LGPL-2.1-only", r#"GNU Lesser General Public License v2.1 only"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "LGPL-2.1-or-later", r#"GNU Lesser General Public License v2.1 or later"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "LGPL-3.0", r#"GNU Lesser General Public License v3.0 only"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "LGPL-3.0+", r#"GNU Lesser General Public License v3.0 or later"#, IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "LGPL-3.0-only", r#"GNU Lesser General Public License v3.0 only"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "LGPL-3.0-or-later", r#"GNU Lesser General Public License v3.0 or later"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU, ), ( "LGPLLR", r#"Lesser General Public License For Linguistic Resources"#, 0x0, ), ("LOOP", r#"Common Lisp LOOP License"#, 0x0), ("LPD-document", r#"LPD Documentation License"#, 0x0), ( "LPL-1.0", r#"Lucent Public License Version 1.0"#, IS_OSI_APPROVED, ), ( "LPL-1.02", r#"Lucent Public License v1.02"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("LPPL-1.0", r#"LaTeX Project Public License v1.0"#, 0x0), ("LPPL-1.1", r#"LaTeX Project Public License v1.1"#, 0x0), ( "LPPL-1.2", r#"LaTeX Project Public License v1.2"#, IS_FSF_LIBRE, ), ( "LPPL-1.3a", r#"LaTeX Project Public License v1.3a"#, IS_FSF_LIBRE, ), ( "LPPL-1.3c", r#"LaTeX Project Public License v1.3c"#, IS_OSI_APPROVED, ), ( "LZMA-SDK-9.11-to-9.20", r#"LZMA SDK License (versions 9.11 to 9.20)"#, 0x0, ), ( "LZMA-SDK-9.22", r#"LZMA SDK License (versions 9.22 and beyond)"#, 0x0, ), ("Latex2e", r#"Latex2e License"#, 0x0), ( "Latex2e-translated-notice", r#"Latex2e with translated notice permission"#, 0x0, ), ("Leptonica", r#"Leptonica License"#, 0x0), ( "LiLiQ-P-1.1", r#"Licence Libre du Québec – Permissive version 1.1"#, IS_OSI_APPROVED, ), ( "LiLiQ-R-1.1", r#"Licence Libre du Québec – Réciprocité version 1.1"#, IS_OSI_APPROVED, ), ( "LiLiQ-Rplus-1.1", r#"Licence Libre du Québec – Réciprocité forte version 1.1"#, IS_OSI_APPROVED, ), ("Libpng", r#"libpng License"#, 0x0), ( "Linux-OpenIB", r#"Linux Kernel Variant of OpenIB.org license"#, 0x0, ), ( "Linux-man-pages-1-para", r#"Linux man-pages - 1 paragraph"#, 0x0, ), ( "Linux-man-pages-copyleft", r#"Linux man-pages Copyleft"#, 0x0, ), ( "Linux-man-pages-copyleft-2-para", r#"Linux man-pages Copyleft - 2 paragraphs"#, 0x0, ), ( "Linux-man-pages-copyleft-var", r#"Linux man-pages Copyleft Variant"#, 0x0, ), ("Lucida-Bitmap-Fonts", r#"Lucida Bitmap Fonts License"#, 0x0), ("MIPS", r#"MIPS License"#, 0x0), ("MIT", r#"MIT License"#, IS_OSI_APPROVED | IS_FSF_LIBRE), ("MIT-0", r#"MIT No Attribution"#, IS_OSI_APPROVED), ("MIT-CMU", r#"CMU License"#, 0x0), ("MIT-Click", r#"MIT Click License"#, 0x0), ("MIT-Festival", r#"MIT Festival Variant"#, 0x0), ("MIT-Khronos-old", r#"MIT Khronos - old variant"#, 0x0), ( "MIT-Modern-Variant", r#"MIT License Modern Variant"#, IS_OSI_APPROVED, ), ("MIT-Wu", r#"MIT Tom Wu Variant"#, 0x0), ("MIT-advertising", r#"Enlightenment License (e16)"#, 0x0), ("MIT-enna", r#"enna License"#, 0x0), ("MIT-feh", r#"feh License"#, 0x0), ("MIT-open-group", r#"MIT Open Group variant"#, 0x0), ("MIT-testregex", r#"MIT testregex Variant"#, 0x0), ("MITNFA", r#"MIT +no-false-attribs license"#, 0x0), ("MMIXware", r#"MMIXware License"#, 0x0), ("MPEG-SSG", r#"MPEG Software Simulation"#, 0x0), ( "MPL-1.0", r#"Mozilla Public License 1.0"#, IS_OSI_APPROVED | IS_COPYLEFT, ), ( "MPL-1.1", r#"Mozilla Public License 1.1"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ( "MPL-2.0", r#"Mozilla Public License 2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ( "MPL-2.0-no-copyleft-exception", r#"Mozilla Public License 2.0 (no copyleft exception)"#, IS_OSI_APPROVED | IS_COPYLEFT, ), ("MS-LPL", r#"Microsoft Limited Public License"#, 0x0), ( "MS-PL", r#"Microsoft Public License"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ( "MS-RL", r#"Microsoft Reciprocal License"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ("MTLL", r#"Matrix Template Library License"#, 0x0), ("Mackerras-3-Clause", r#"Mackerras 3-Clause License"#, 0x0), ( "Mackerras-3-Clause-acknowledgment", r#"Mackerras 3-Clause - acknowledgment variant"#, 0x0, ), ("MakeIndex", r#"MakeIndex License"#, 0x0), ("Martin-Birgmeier", r#"Martin Birgmeier License"#, 0x0), ("McPhee-slideshow", r#"McPhee Slideshow License"#, 0x0), ("Minpack", r#"Minpack License"#, 0x0), ("MirOS", r#"The MirOS Licence"#, IS_OSI_APPROVED), ("Motosoto", r#"Motosoto License"#, IS_OSI_APPROVED), ( "MulanPSL-1.0", r#"Mulan Permissive Software License, Version 1"#, 0x0, ), ( "MulanPSL-2.0", r#"Mulan Permissive Software License, Version 2"#, IS_OSI_APPROVED, ), ("Multics", r#"Multics License"#, IS_OSI_APPROVED), ("Mup", r#"Mup License"#, 0x0), ( "NAIST-2003", r#"Nara Institute of Science and Technology License (2003)"#, 0x0, ), ( "NASA-1.3", r#"NASA Open Source Agreement 1.3"#, IS_OSI_APPROVED, ), ("NBPL-1.0", r#"Net Boolean Public License v1"#, 0x0), ("NCBI-PD", r#"NCBI Public Domain Notice"#, 0x0), ("NCGL-UK-2.0", r#"Non-Commercial Government Licence"#, 0x0), ("NCL", r#"NCL Source Code License"#, 0x0), ( "NCSA", r#"University of Illinois/NCSA Open Source License"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("NGPL", r#"Nethack General Public License"#, IS_OSI_APPROVED), ( "NICTA-1.0", r#"NICTA Public Software License, Version 1.0"#, 0x0, ), ("NIST-PD", r#"NIST Public Domain Notice"#, 0x0), ( "NIST-PD-fallback", r#"NIST Public Domain Notice with license fallback"#, 0x0, ), ("NIST-Software", r#"NIST Software License"#, 0x0), ( "NLOD-1.0", r#"Norwegian Licence for Open Government Data (NLOD) 1.0"#, 0x0, ), ( "NLOD-2.0", r#"Norwegian Licence for Open Government Data (NLOD) 2.0"#, 0x0, ), ("NLPL", r#"No Limit Public License"#, 0x0), ("NOASSERTION", r#"NOASSERTION"#, 0x0), ("NOSL", r#"Netizen Open Source License"#, IS_FSF_LIBRE), ( "NPL-1.0", r#"Netscape Public License v1.0"#, IS_FSF_LIBRE | IS_COPYLEFT, ), ( "NPL-1.1", r#"Netscape Public License v1.1"#, IS_FSF_LIBRE | IS_COPYLEFT, ), ( "NPOSL-3.0", r#"Non-Profit Open Software License 3.0"#, IS_OSI_APPROVED, ), ("NRL", r#"NRL License"#, 0x0), ("NTIA-PD", r#"NTIA Public Domain Notice"#, 0x0), ("NTP", r#"NTP License"#, IS_OSI_APPROVED), ("NTP-0", r#"NTP No Attribution"#, 0x0), ("Naumen", r#"Naumen Public License"#, IS_OSI_APPROVED), ("Net-SNMP", r#"Net-SNMP License"#, IS_DEPRECATED), ("NetCDF", r#"NetCDF license"#, 0x0), ("Newsletr", r#"Newsletr License"#, 0x0), ( "Nokia", r#"Nokia Open Source License"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("Noweb", r#"Noweb License"#, 0x0), ("Nunit", r#"Nunit License"#, IS_DEPRECATED | IS_FSF_LIBRE), ("O-UDA-1.0", r#"Open Use of Data Agreement v1.0"#, 0x0), ("OAR", r#"OAR License"#, 0x0), ("OCCT-PL", r#"Open CASCADE Technology Public License"#, 0x0), ( "OCLC-2.0", r#"OCLC Research Public License 2.0"#, IS_OSI_APPROVED, ), ( "ODC-By-1.0", r#"Open Data Commons Attribution License v1.0"#, 0x0, ), ( "ODbL-1.0", r#"Open Data Commons Open Database License v1.0"#, IS_FSF_LIBRE, ), ("OFFIS", r#"OFFIS License"#, 0x0), ("OFL-1.0", r#"SIL Open Font License 1.0"#, IS_FSF_LIBRE), ( "OFL-1.0-RFN", r#"SIL Open Font License 1.0 with Reserved Font Name"#, 0x0, ), ( "OFL-1.0-no-RFN", r#"SIL Open Font License 1.0 with no Reserved Font Name"#, 0x0, ), ( "OFL-1.1", r#"SIL Open Font License 1.1"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "OFL-1.1-RFN", r#"SIL Open Font License 1.1 with Reserved Font Name"#, IS_OSI_APPROVED, ), ( "OFL-1.1-no-RFN", r#"SIL Open Font License 1.1 with no Reserved Font Name"#, IS_OSI_APPROVED, ), ("OGC-1.0", r#"OGC Software License, Version 1.0"#, 0x0), ( "OGDL-Taiwan-1.0", r#"Taiwan Open Government Data License, version 1.0"#, 0x0, ), ("OGL-Canada-2.0", r#"Open Government Licence - Canada"#, 0x0), ("OGL-UK-1.0", r#"Open Government Licence v1.0"#, 0x0), ("OGL-UK-2.0", r#"Open Government Licence v2.0"#, 0x0), ("OGL-UK-3.0", r#"Open Government Licence v3.0"#, 0x0), ("OGTSL", r#"Open Group Test Suite License"#, IS_OSI_APPROVED), ("OLDAP-1.1", r#"Open LDAP Public License v1.1"#, 0x0), ("OLDAP-1.2", r#"Open LDAP Public License v1.2"#, 0x0), ("OLDAP-1.3", r#"Open LDAP Public License v1.3"#, 0x0), ("OLDAP-1.4", r#"Open LDAP Public License v1.4"#, 0x0), ( "OLDAP-2.0", r#"Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B)"#, 0x0, ), ("OLDAP-2.0.1", r#"Open LDAP Public License v2.0.1"#, 0x0), ("OLDAP-2.1", r#"Open LDAP Public License v2.1"#, 0x0), ("OLDAP-2.2", r#"Open LDAP Public License v2.2"#, 0x0), ("OLDAP-2.2.1", r#"Open LDAP Public License v2.2.1"#, 0x0), ("OLDAP-2.2.2", r#"Open LDAP Public License 2.2.2"#, 0x0), ( "OLDAP-2.3", r#"Open LDAP Public License v2.3"#, IS_FSF_LIBRE, ), ("OLDAP-2.4", r#"Open LDAP Public License v2.4"#, 0x0), ("OLDAP-2.5", r#"Open LDAP Public License v2.5"#, 0x0), ("OLDAP-2.6", r#"Open LDAP Public License v2.6"#, 0x0), ( "OLDAP-2.7", r#"Open LDAP Public License v2.7"#, IS_FSF_LIBRE, ), ( "OLDAP-2.8", r#"Open LDAP Public License v2.8"#, IS_OSI_APPROVED, ), ( "OLFL-1.3", r#"Open Logistics Foundation License Version 1.3"#, IS_OSI_APPROVED, ), ("OML", r#"Open Market License"#, 0x0), ("OPL-1.0", r#"Open Public License v1.0"#, 0x0), ( "OPL-UK-3.0", r#"United Kingdom Open Parliament Licence v3.0"#, 0x0, ), ("OPUBL-1.0", r#"Open Publication License v1.0"#, 0x0), ( "OSET-PL-2.1", r#"OSET Public License version 2.1"#, IS_OSI_APPROVED, ), ( "OSL-1.0", r#"Open Software License 1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ( "OSL-1.1", r#"Open Software License 1.1"#, IS_FSF_LIBRE | IS_COPYLEFT, ), ( "OSL-2.0", r#"Open Software License 2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ( "OSL-2.1", r#"Open Software License 2.1"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ( "OSL-3.0", r#"Open Software License 3.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ("OpenPBS-2.3", r#"OpenPBS v2.3 Software License"#, 0x0), ("OpenSSL", r#"OpenSSL License"#, IS_FSF_LIBRE), ("OpenSSL-standalone", r#"OpenSSL License - standalone"#, 0x0), ("OpenVision", r#"OpenVision License"#, 0x0), ("PADL", r#"PADL License"#, 0x0), ( "PDDL-1.0", r#"Open Data Commons Public Domain Dedication & License 1.0"#, 0x0, ), ("PHP-3.0", r#"PHP License v3.0"#, IS_OSI_APPROVED), ( "PHP-3.01", r#"PHP License v3.01"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("PPL", r#"Peer Production License"#, 0x0), ("PSF-2.0", r#"Python Software Foundation License 2.0"#, 0x0), ( "Parity-6.0.0", r#"The Parity Public License 6.0.0"#, IS_COPYLEFT, ), ("Parity-7.0.0", r#"The Parity Public License 7.0.0"#, 0x0), ("Pixar", r#"Pixar License"#, 0x0), ("Plexus", r#"Plexus Classworlds License"#, 0x0), ( "PolyForm-Noncommercial-1.0.0", r#"PolyForm Noncommercial License 1.0.0"#, 0x0, ), ( "PolyForm-Small-Business-1.0.0", r#"PolyForm Small Business License 1.0.0"#, 0x0, ), ("PostgreSQL", r#"PostgreSQL License"#, IS_OSI_APPROVED), ( "Python-2.0", r#"Python License 2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("Python-2.0.1", r#"Python License 2.0.1"#, 0x0), ( "QPL-1.0", r#"Q Public License 1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "QPL-1.0-INRIA-2004", r#"Q Public License 1.0 - INRIA 2004 variant"#, 0x0, ), ("Qhull", r#"Qhull License"#, 0x0), ("RHeCos-1.1", r#"Red Hat eCos Public License v1.1"#, 0x0), ( "RPL-1.1", r#"Reciprocal Public License 1.1"#, IS_OSI_APPROVED, ), ( "RPL-1.5", r#"Reciprocal Public License 1.5"#, IS_OSI_APPROVED, ), ( "RPSL-1.0", r#"RealNetworks Public Source License v1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("RSA-MD", r#"RSA Message-Digest License"#, 0x0), ( "RSCPL", r#"Ricoh Source Code Public License"#, IS_OSI_APPROVED, ), ("Rdisc", r#"Rdisc License"#, 0x0), ("Ruby", r#"Ruby License"#, IS_FSF_LIBRE), ("Ruby-pty", r#"Ruby pty extension license"#, 0x0), ("SAX-PD", r#"Sax Public Domain Notice"#, 0x0), ("SAX-PD-2.0", r#"Sax Public Domain Notice 2.0"#, 0x0), ("SCEA", r#"SCEA Shared Source License"#, 0x0), ("SGI-B-1.0", r#"SGI Free Software License B v1.0"#, 0x0), ("SGI-B-1.1", r#"SGI Free Software License B v1.1"#, 0x0), ( "SGI-B-2.0", r#"SGI Free Software License B v2.0"#, IS_FSF_LIBRE, ), ("SGI-OpenGL", r#"SGI OpenGL License"#, 0x0), ("SGP4", r#"SGP4 Permission Notice"#, 0x0), ("SHL-0.5", r#"Solderpad Hardware License v0.5"#, 0x0), ( "SHL-0.51", r#"Solderpad Hardware License, Version 0.51"#, 0x0, ), ( "SISSL", r#"Sun Industry Standards Source License v1.1"#, IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT, ), ( "SISSL-1.2", r#"Sun Industry Standards Source License v1.2"#, 0x0, ), ("SL", r#"SL License"#, 0x0), ("SMAIL-GPL", r#"SMAIL General Public License"#, 0x0), ( "SMLNJ", r#"Standard ML of New Jersey License"#, IS_FSF_LIBRE, ), ("SMPPL", r#"Secure Messaging Protocol Public License"#, 0x0), ("SNIA", r#"SNIA Public License 1.1"#, 0x0), ("SOFA", r#"SOFA Software License"#, 0x0), ( "SPL-1.0", r#"Sun Public License v1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("SSH-OpenSSH", r#"SSH OpenSSH license"#, 0x0), ("SSH-short", r#"SSH short notice"#, 0x0), ("SSLeay-standalone", r#"SSLeay License - standalone"#, 0x0), ("SSPL-1.0", r#"Server Side Public License, v 1"#, 0x0), ("SUL-1.0", r#"Sustainable Use License v1.0"#, 0x0), ( "SWL", r#"Scheme Widget Library (SWL) Software License Agreement"#, 0x0, ), ("Saxpath", r#"Saxpath License"#, 0x0), ("SchemeReport", r#"Scheme Language Report License"#, 0x0), ("Sendmail", r#"Sendmail License"#, 0x0), ("Sendmail-8.23", r#"Sendmail License 8.23"#, 0x0), ( "Sendmail-Open-Source-1.1", r#"Sendmail Open Source License v1.1"#, 0x0, ), ("SimPL-2.0", r#"Simple Public License 2.0"#, IS_OSI_APPROVED), ( "Sleepycat", r#"Sleepycat License"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("Soundex", r#"Soundex License"#, 0x0), ("Spencer-86", r#"Spencer License 86"#, 0x0), ("Spencer-94", r#"Spencer License 94"#, 0x0), ("Spencer-99", r#"Spencer License 99"#, 0x0), ( "StandardML-NJ", r#"Standard ML of New Jersey License"#, IS_DEPRECATED | IS_FSF_LIBRE, ), ("SugarCRM-1.1.3", r#"SugarCRM Public License v1.1.3"#, 0x0), ("Sun-PPP", r#"Sun PPP License"#, 0x0), ("Sun-PPP-2000", r#"Sun PPP License (2000)"#, 0x0), ("SunPro", r#"SunPro License"#, 0x0), ("Symlinks", r#"Symlinks License"#, 0x0), ("TAPR-OHL-1.0", r#"TAPR Open Hardware License v1.0"#, 0x0), ("TCL", r#"TCL/TK License"#, 0x0), ("TCP-wrappers", r#"TCP Wrappers License"#, 0x0), ( "TGPPL-1.0", r#"Transitive Grace Period Public Licence 1.0"#, 0x0, ), ("TMate", r#"TMate Open Source License"#, 0x0), ("TORQUE-1.1", r#"TORQUE v2.5+ Software License v1.1"#, 0x0), ("TOSL", r#"Trusster Open Source License"#, 0x0), ("TPDL", r#"Time::ParseDate License"#, 0x0), ("TPL-1.0", r#"THOR Public License 1.0"#, 0x0), ("TTWL", r#"Text-Tabs+Wrap License"#, 0x0), ("TTYP0", r#"TTYP0 License"#, 0x0), ( "TU-Berlin-1.0", r#"Technische Universitaet Berlin License 1.0"#, 0x0, ), ( "TU-Berlin-2.0", r#"Technische Universitaet Berlin License 2.0"#, 0x0, ), ("TermReadKey", r#"TermReadKey License"#, 0x0), ("ThirdEye", r#"ThirdEye License"#, 0x0), ("TrustedQSL", r#"TrustedQSL License"#, 0x0), ("UCAR", r#"UCAR License"#, 0x0), ( "UCL-1.0", r#"Upstream Compatibility License v1.0"#, IS_OSI_APPROVED, ), ("UMich-Merit", r#"Michigan/Merit Networks License"#, 0x0), ( "UPL-1.0", r#"Universal Permissive License v1.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "URT-RLE", r#"Utah Raster Toolkit Run Length Encoded License"#, 0x0, ), ("Ubuntu-font-1.0", r#"Ubuntu Font Licence v1.0"#, 0x0), ("Unicode-3.0", r#"Unicode License v3"#, IS_OSI_APPROVED), ( "Unicode-DFS-2015", r#"Unicode License Agreement - Data Files and Software (2015)"#, 0x0, ), ( "Unicode-DFS-2016", r#"Unicode License Agreement - Data Files and Software (2016)"#, IS_OSI_APPROVED, ), ("Unicode-TOU", r#"Unicode Terms of Use"#, 0x0), ("UnixCrypt", r#"UnixCrypt License"#, 0x0), ( "Unlicense", r#"The Unlicense"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "Unlicense-libtelnet", r#"Unlicense - libtelnet variant"#, 0x0, ), ( "Unlicense-libwhirlpool", r#"Unlicense - libwhirlpool variant"#, 0x0, ), ("VOSTROM", r#"VOSTROM Public License for Open Source"#, 0x0), ( "VSL-1.0", r#"Vovida Software License v1.0"#, IS_OSI_APPROVED, ), ("Vim", r#"Vim License"#, IS_FSF_LIBRE), ( "W3C", r#"W3C Software Notice and License (2002-12-31)"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "W3C-19980720", r#"W3C Software Notice and License (1998-07-20)"#, 0x0, ), ( "W3C-20150513", r#"W3C Software Notice and Document License (2015-05-13)"#, IS_OSI_APPROVED, ), ( "WTFPL", r#"Do What The F*ck You Want To Public License"#, IS_FSF_LIBRE, ), ( "Watcom-1.0", r#"Sybase Open Watcom Public License 1.0"#, IS_OSI_APPROVED, ), ("Widget-Workshop", r#"Widget Workshop License"#, 0x0), ("Wsuipa", r#"Wsuipa License"#, 0x0), ("X11", r#"X11 License"#, IS_FSF_LIBRE), ( "X11-distribute-modifications-variant", r#"X11 License Distribution Modification Variant"#, 0x0, ), ("X11-swapped", r#"X11 swapped final paragraphs"#, 0x0), ("XFree86-1.1", r#"XFree86 License 1.1"#, IS_FSF_LIBRE), ("XSkat", r#"XSkat License"#, 0x0), ("Xdebug-1.03", r#"Xdebug License v 1.03"#, 0x0), ("Xerox", r#"Xerox License"#, 0x0), ("Xfig", r#"Xfig License"#, 0x0), ("Xnet", r#"X.Net License"#, IS_OSI_APPROVED), ("YPL-1.0", r#"Yahoo! Public License v1.0"#, 0x0), ( "YPL-1.1", r#"Yahoo! Public License v1.1"#, IS_FSF_LIBRE | IS_COPYLEFT, ), ("ZPL-1.1", r#"Zope Public License 1.1"#, 0x0), ( "ZPL-2.0", r#"Zope Public License 2.0"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ( "ZPL-2.1", r#"Zope Public License 2.1"#, IS_OSI_APPROVED | IS_FSF_LIBRE, ), ("Zed", r#"Zed License"#, 0x0), ("Zeeff", r#"Zeeff License"#, 0x0), ("Zend-2.0", r#"Zend License v2.0"#, IS_FSF_LIBRE), ("Zimbra-1.3", r#"Zimbra Public License v1.3"#, IS_FSF_LIBRE), ("Zimbra-1.4", r#"Zimbra Public License v1.4"#, 0x0), ("Zlib", r#"zlib License"#, IS_OSI_APPROVED | IS_FSF_LIBRE), ("any-OSI", r#"Any OSI License"#, 0x0), ( "any-OSI-perl-modules", r#"Any OSI License - Perl Modules"#, 0x0, ), ( "bcrypt-Solar-Designer", r#"bcrypt Solar Designer License"#, 0x0, ), ("blessing", r#"SQLite Blessing"#, 0x0), ( "bzip2-1.0.5", r#"bzip2 and libbzip2 License v1.0.5"#, IS_DEPRECATED, ), ("bzip2-1.0.6", r#"bzip2 and libbzip2 License v1.0.6"#, 0x0), ("check-cvs", r#"check-cvs License"#, 0x0), ("checkmk", r#"Checkmk License"#, 0x0), ("copyleft-next-0.3.0", r#"copyleft-next 0.3.0"#, 0x0), ("copyleft-next-0.3.1", r#"copyleft-next 0.3.1"#, 0x0), ("curl", r#"curl License"#, 0x0), ( "cve-tou", r#"Common Vulnerability Enumeration ToU License"#, 0x0, ), ("diffmark", r#"diffmark license"#, 0x0), ("dtoa", r#"David M. Gay dtoa License"#, 0x0), ("dvipdfm", r#"dvipdfm License"#, 0x0), ( "eCos-2.0", r#"eCos license version 2.0"#, IS_DEPRECATED | IS_FSF_LIBRE, ), ("eGenix", r#"eGenix.com Public License 1.1.0"#, 0x0), ("etalab-2.0", r#"Etalab Open License 2.0"#, 0x0), ("fwlw", r#"fwlw License"#, 0x0), ("gSOAP-1.3b", r#"gSOAP Public License v1.3b"#, 0x0), ("generic-xts", r#"Generic XTS License"#, 0x0), ("gnuplot", r#"gnuplot License"#, IS_FSF_LIBRE), ("gtkbook", r#"gtkbook License"#, 0x0), ("hdparm", r#"hdparm License"#, 0x0), ( "iMatix", r#"iMatix Standard Function Library Agreement"#, IS_FSF_LIBRE, ), ("jove", r#"Jove License"#, 0x0), ( "libpng-1.6.35", r#"PNG Reference Library License v1 (for libpng 0.5 through 1.6.35)"#, 0x0, ), ("libpng-2.0", r#"PNG Reference Library version 2"#, 0x0), ("libselinux-1.0", r#"libselinux public domain notice"#, 0x0), ("libtiff", r#"libtiff License"#, 0x0), ( "libutil-David-Nugent", r#"libutil David Nugent License"#, 0x0, ), ("lsof", r#"lsof License"#, 0x0), ("magaz", r#"magaz License"#, 0x0), ("mailprio", r#"mailprio License"#, 0x0), ("man2html", r#"man2html License"#, 0x0), ("metamail", r#"metamail License"#, 0x0), ("mpi-permissive", r#"mpi Permissive License"#, 0x0), ("mpich2", r#"mpich2 License"#, 0x0), ("mplus", r#"mplus Font License"#, 0x0), ("ngrep", r#"ngrep License"#, 0x0), ("pkgconf", r#"pkgconf License"#, 0x0), ("pnmstitch", r#"pnmstitch License"#, 0x0), ("psfrag", r#"psfrag License"#, 0x0), ("psutils", r#"psutils License"#, 0x0), ("python-ldap", r#"Python ldap License"#, 0x0), ("radvd", r#"radvd License"#, 0x0), ("snprintf", r#"snprintf License"#, 0x0), ("softSurfer", r#"softSurfer License"#, 0x0), ("ssh-keyscan", r#"ssh-keyscan License"#, 0x0), ("swrule", r#"swrule License"#, 0x0), ("threeparttable", r#"threeparttable License"#, 0x0), ("ulem", r#"ulem License"#, 0x0), ("w3m", r#"w3m License"#, 0x0), ("wwl", r#"WWL License"#, 0x0), ( "wxWindows", r#"wxWindows Library License"#, IS_DEPRECATED | IS_OSI_APPROVED, ), ("xinetd", r#"xinetd License"#, IS_FSF_LIBRE | IS_COPYLEFT), ( "xkeyboard-config-Zinoviev", r#"xkeyboard-config Zinoviev License"#, 0x0, ), ("xlock", r#"xlock License"#, 0x0), ("xpp", r#"XPP License"#, 0x0), ("xzoom", r#"xzoom License"#, 0x0), ( "zlib-acknowledgement", r#"zlib/libpng License with Acknowledgement"#, 0x0, ), ]; /// Pairs an invalid license identifier with its valid SPDX license identifier. /// These invalid identifiers are only allowed when using `Lax` parsing. pub const IMPRECISE_NAMES: &[(&str, &str)] = &[ ("agplv3", "AGPL-3.0"), ("agpl", "AGPL-3.0"), ("apache 2.0", "Apache-2.0"), ("apache-2", "Apache-2.0"), ("apache2", "Apache-2.0"), ("apache", "Apache-2.0"), ("asl2.0", "Apache-2.0"), ("bsd 2-clause", "BSD-2-Clause"), ("bsd-2clause", "BSD-2-Clause"), ("bsd3", "BSD-3-Clause"), ("bsd", "BSD-2-Clause"), ("cc0", "CC0-1.0"), ("gnu gpl v2", "GPL-3.0-only"), ("gnu gpl v3", "GPL-3.0-only"), ("gpl v2", "GPL-2.0-only"), ("gpl v3", "GPL-3.0-only"), ("gpl-1.0", "GPL-1.0-only"), ("gpl-2.0", "GPL-2.0-only"), ("gpl-3.0", "GPL-3.0-only"), ("gpl2", "GPL-2.0-only"), ("gpl3", "GPL-3.0-only"), ("gplv2", "GPL-2.0-only"), ("gplv3", "GPL-3.0-only"), ("gpl", "GPL-2.0-only"), ("lgpl", "LGPL-2.0-only"), ("GPL-1.0", "GPL-1.0-only"), ("GPL-2.0", "GPL-2.0-only"), ("GPL-3.0", "GPL-3.0-only"), ("mit", "MIT"), ("mpl2", "MPL-2.0"), ("mpl", "MPL-2.0"), ("simplified bsd license", "BSD-2-Clause"), ("zlib", "Zlib"), ]; pub const EXCEPTIONS: &[(&str, u8)] = &[ ("389-exception", 0), ("Asterisk-exception", 0), ("Asterisk-linking-protocols-exception", 0), ("Autoconf-exception-2.0", 0), ("Autoconf-exception-3.0", 0), ("Autoconf-exception-generic", 0), ("Autoconf-exception-generic-3.0", 0), ("Autoconf-exception-macro", 0), ("Bison-exception-1.24", 0), ("Bison-exception-2.2", 0), ("Bootloader-exception", 0), ("CGAL-linking-exception", 0), ("CLISP-exception-2.0", 0), ("Classpath-exception-2.0", 0), ("DigiRule-FOSS-exception", 0), ("Digia-Qt-LGPL-exception-1.1", 0), ("FLTK-exception", 0), ("Fawkes-Runtime-exception", 0), ("Font-exception-2.0", 0), ("GCC-exception-2.0", 0), ("GCC-exception-2.0-note", 0), ("GCC-exception-3.1", 0), ("GNAT-exception", 0), ("GNOME-examples-exception", 0), ("GNU-compiler-exception", 0), ("GPL-3.0-389-ds-base-exception", 0), ("GPL-3.0-interface-exception", 0), ("GPL-3.0-linking-exception", 0), ("GPL-3.0-linking-source-exception", 0), ("GPL-CC-1.0", 0), ("GStreamer-exception-2005", 0), ("GStreamer-exception-2008", 0), ("Gmsh-exception", 0), ("Independent-modules-exception", 0), ("KiCad-libraries-exception", 0), ("LGPL-3.0-linking-exception", 0), ("LLGPL", 0), ("LLVM-exception", 0), ("LZMA-exception", 0), ("Libtool-exception", 0), ("Linux-syscall-note", 0), ("Nokia-Qt-exception-1.1", IS_DEPRECATED), ("OCCT-exception-1.0", 0), ("OCaml-LGPL-linking-exception", 0), ("OpenJDK-assembly-exception-1.0", 0), ("PCRE2-exception", 0), ("PS-or-PDF-font-exception-20170817", 0), ("QPL-1.0-INRIA-2004-exception", 0), ("Qt-GPL-exception-1.0", 0), ("Qt-LGPL-exception-1.1", 0), ("Qwt-exception-1.0", 0), ("RRDtool-FLOSS-exception-2.0", 0), ("SANE-exception", 0), ("SHL-2.0", 0), ("SHL-2.1", 0), ("SWI-exception", 0), ("Swift-exception", 0), ("Texinfo-exception", 0), ("UBDL-exception", 0), ("Universal-FOSS-exception-1.0", 0), ("WxWindows-exception-3.1", 0), ("cryptsetup-OpenSSL-exception", 0), ("eCos-exception-2.0", 0), ("erlang-otp-linking-exception", 0), ("fmt-exception", 0), ("freertos-exception-2.0", 0), ("gnu-javamail-exception", 0), ("harbour-exception", 0), ("i2p-gpl-java-exception", 0), ("libpri-OpenH323-exception", 0), ("mif-exception", 0), ("mxml-exception", 0), ("openvpn-openssl-exception", 0), ("polyparse-exception", 0), ("romic-exception", 0), ("stunnel-exception", 0), ("u-boot-exception-2.0", 0), ("vsftpd-openssl-exception", 0), ("x11vnc-openssl-exception", 0), ]; spdx-0.12.0/src/lexer.rs000064400000000000000000000311531046102023000131410ustar 00000000000000use crate::{ ExceptionId, LicenseId, error::{ParseError, Reason}, }; /// Parsing configuration for SPDX expression #[derive(Default, Copy, Clone)] pub struct ParseMode { /// Allows the use of `/` as a synonym for the `OR` operator. /// /// This also allows for not having whitespace between the `/` and the terms /// on either side pub allow_slash_as_or_operator: bool, /// Allows some invalid/imprecise identifiers as synonyms for an actual /// license identifier. /// /// See [`IMPRECISE_NAMES`](crate::identifiers::IMPRECISE_NAMES) for a list /// of the current synonyms. Note that this list is not comprehensive but /// can be expanded upon when invalid identifiers are found in the wild. pub allow_imprecise_license_names: bool, /// The various GPL licenses diverge from every other license in the SPDX /// license list by having an `-or-later` variant that is used as a suffix /// on a base license (eg. `GPL-3.0-or-later`) rather than the canonical /// `GPL-3.0+`. /// /// This option just allows GPL licenses to be treated similarly to all of /// the other SPDX licenses. pub allow_postfix_plus_on_gpl: bool, /// How deprecated license identifiers are treated pub allow_deprecated: bool, } impl ParseMode { /// Strict, specification compliant SPDX parsing. /// /// 1. Only license identifiers in the SPDX license list, or /// Document/LicenseRef, are allowed. The license identifiers are also /// case-sensitive. /// 1. `WITH`, `AND`, and `OR`, case-insensitive, are the only valid operators /// 1. Deprecated licenses are not allowed pub const STRICT: Self = Self { allow_slash_as_or_operator: false, allow_imprecise_license_names: false, allow_postfix_plus_on_gpl: false, allow_deprecated: false, }; /// Allow non-conforming syntax for crates-io compatibility /// /// 1. Additional, invalid, identifiers are accepted and mapped to a correct /// SPDX license identifier. /// See [`IMPRECISE_NAMES`](crate::identifiers::IMPRECISE_NAMES) for the /// list of additionally accepted identifiers and the license they /// correspond to. /// 1. `/` can by used as a synonym for `OR`, and doesn't need to be /// separated by whitespace from the terms it combines /// 1. Deprecated license identifiers are allowed pub const LAX: Self = Self { allow_slash_as_or_operator: true, allow_imprecise_license_names: true, allow_postfix_plus_on_gpl: true, allow_deprecated: true, }; } /// A single token in an SPDX license expression #[derive(Clone, Debug, PartialEq, Eq)] pub enum Token<'a> { /// A recognized SPDX license id Spdx(LicenseId), /// A `LicenseRef-` prefixed id, with an optional `DocumentRef-` LicenseRef { doc_ref: Option<&'a str>, lic_ref: &'a str, }, /// A recognized SPDX exception id Exception(ExceptionId), /// A `AdditionRef-` prefixed id, with an optional `DocumentRef-` AdditionRef { doc_ref: Option<&'a str>, add_ref: &'a str, }, /// A postfix `+` indicating "or later" for a particular SPDX license id Plus, /// A `(` for starting a group OpenParen, /// A `)` for ending a group CloseParen, /// A `WITH` operator With, /// An `AND` operator And, /// An `OR` operator Or, } impl std::fmt::Display for Token<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { std::fmt::Debug::fmt(self, f) } } impl Token<'_> { fn len(&self) -> usize { match self { Token::Spdx(id) => id.name.len(), Token::Exception(e) => e.name.len(), Token::With => 4, Token::And => 3, Token::Or => 2, Token::Plus | Token::OpenParen | Token::CloseParen => 1, Token::LicenseRef { doc_ref, lic_ref } => { doc_ref.map_or(0, |d| { // +1 is for the `:` "DocumentRef-".len() + d.len() + 1 }) + "LicenseRef-".len() + lic_ref.len() } Token::AdditionRef { doc_ref, add_ref } => { doc_ref.map_or(0, |d| { // +1 is for the `:` "DocumentRef-".len() + d.len() + 1 }) + "AdditionRef-".len() + add_ref.len() } } } } /// Allows iteration through an SPDX license expression, yielding /// a token or a `ParseError`. /// /// Prefer to use `Expression::parse` or `Licensee::parse` rather /// than directly using the lexer pub struct Lexer<'a> { inner: &'a str, original: &'a str, offset: usize, mode: ParseMode, } impl<'a> Lexer<'a> { /// Creates a Lexer over a license expression #[must_use] pub fn new(text: &'a str) -> Self { Self { inner: text, original: text, offset: 0, mode: ParseMode::STRICT, } } /// Creates a Lexer over a license expression /// /// With `ParseMode::Lax` it allows non-conforming syntax /// used in crates-io crates. #[must_use] pub fn new_mode(text: &'a str, mode: ParseMode) -> Self { Self { inner: text, original: text, offset: 0, mode, } } #[inline] fn is_ref_char(c: &char) -> bool { c.is_ascii_alphanumeric() || *c == '-' || *c == '.' } /// Return a matching text token if found - equivalent to the regex `^[-a-zA-Z0-9.:]+` fn find_text_token(text: &'a str) -> Option<&'a str> { let is_token_char = |c: &char| Self::is_ref_char(c) || *c == ':'; match text.chars().take_while(is_token_char).count() { index if index > 0 => Some(&text[..index]), _ => None, } } /// Extract the text after `prefix` if made up of valid ref characters fn find_ref(prefix: &str, text: &'a str) -> Option<&'a str> { text.strip_prefix(prefix).map(|value| { let end = value.chars().take_while(Self::is_ref_char).count(); &text[prefix.len()..prefix.len() + end] }) } /// Return a document ref if found - equivalent to the regex `^DocumentRef-([-a-zA-Z0-9.]+)` #[inline] fn find_document_ref(text: &'a str) -> Option<&'a str> { Self::find_ref("DocumentRef-", text) } /// Return a license ref if found - equivalent to the regex `^LicenseRef-([-a-zA-Z0-9.]+)` #[inline] fn find_license_ref(text: &'a str) -> Option<&'a str> { Self::find_ref("LicenseRef-", text) } /// Return a document ref and license ref if found, /// equivalent to the regex `^DocumentRef-([-a-zA-Z0-9.]+):LicenseRef-([-a-zA-Z0-9.]+)` fn find_document_and_license_ref(text: &'a str) -> Option<(&'a str, &'a str)> { let split = text.split_once(':'); let doc_ref = split.and_then(|(doc, _)| Self::find_document_ref(doc)); let lic_ref = split.and_then(|(_, lic)| Self::find_license_ref(lic)); Option::zip(doc_ref, lic_ref) } /// Return an addition ref if found - equivalent to the regex `^AdditionRef-([-a-zA-Z0-9.]+)` #[inline] fn find_addition_ref(text: &'a str) -> Option<&'a str> { Self::find_ref("AdditionRef-", text) } /// Return a document ref and license ref if found, /// equivalent to the regex `^DocumentRef-([-a-zA-Z0-9.]+):AdditionRef-([-a-zA-Z0-9.]+)` fn find_document_and_addition_ref(text: &'a str) -> Option<(&'a str, &'a str)> { let split = text.split_once(':'); let doc_ref = split.and_then(|(doc, _)| Self::find_document_ref(doc)); let lic_ref = split.and_then(|(_, add)| Self::find_addition_ref(add)); Option::zip(doc_ref, lic_ref) } } /// A wrapper around a particular token that includes the span of the characters /// in the original string, for diagnostic purposes #[derive(Debug)] pub struct LexerToken<'a> { /// The token that was lexed pub token: Token<'a>, /// The range of the token characters in the original license expression pub span: std::ops::Range, } impl<'a> Iterator for Lexer<'a> { type Item = Result, ParseError>; fn next(&mut self) -> Option { #[allow(clippy::unnecessary_wraps)] fn ok_token(token: Token<'_>) -> Option, usize), ParseError>> { let len = token.len(); Some(Ok((token, len))) } // Jump over any whitespace, updating `self.inner` and `self.offset` appropriately let non_whitespace_index = match self.inner.find(|c: char| !c.is_whitespace()) { Some(idx) => idx, None => self.inner.len(), }; self.inner = &self.inner[non_whitespace_index..]; self.offset += non_whitespace_index; match self.inner.chars().next() { None => None, // From SPDX 2.1 spec // There MUST NOT be whitespace between a license-id and any following "+". Some('+') => { if non_whitespace_index == 0 { ok_token(Token::Plus) } else { Some(Err(ParseError { original: self.original.to_owned(), span: self.offset - non_whitespace_index..self.offset, reason: Reason::SeparatedPlus, })) } } Some('(') => ok_token(Token::OpenParen), Some(')') => ok_token(Token::CloseParen), Some('/') if self.mode.allow_slash_as_or_operator => Some(Ok((Token::Or, 1))), Some(_) => match Lexer::find_text_token(self.inner) { None => Some(Err(ParseError { original: self.original.to_owned(), span: self.offset..self.offset + self.inner.len(), reason: Reason::InvalidCharacters, })), Some(m) => { if m == "AND" || m == "and" { ok_token(Token::And) } else if m == "OR" || m == "or" { ok_token(Token::Or) } else if m == "WITH" || m == "with" { ok_token(Token::With) } else if let Some(lic_id) = crate::license_id(m) { ok_token(Token::Spdx(lic_id)) } else if let Some(exc_id) = crate::exception_id(m) { ok_token(Token::Exception(exc_id)) } else if let Some((doc_ref, lic_ref)) = Lexer::find_document_and_license_ref(m) { ok_token(Token::LicenseRef { doc_ref: Some(doc_ref), lic_ref, }) } else if let Some(lic_ref) = Lexer::find_license_ref(m) { ok_token(Token::LicenseRef { doc_ref: None, lic_ref, }) } else if let Some((doc_ref, add_ref)) = Lexer::find_document_and_addition_ref(m) { ok_token(Token::AdditionRef { doc_ref: Some(doc_ref), add_ref, }) } else if let Some(add_ref) = Lexer::find_addition_ref(m) { ok_token(Token::AdditionRef { doc_ref: None, add_ref, }) } else if let Some((lic_id, token_len)) = if self.mode.allow_imprecise_license_names { crate::imprecise_license_id(self.inner) } else { None } { Some(Ok((Token::Spdx(lic_id), token_len))) } else { Some(Err(ParseError { original: self.original.to_owned(), span: self.offset..self.offset + m.len(), reason: Reason::UnknownTerm, })) } } }, } .map(|res| { res.map(|(tok, len)| { let start = self.offset; self.inner = &self.inner[len..]; self.offset += len; LexerToken { token: tok, span: start..self.offset, } }) }) } } spdx-0.12.0/src/lib.rs000064400000000000000000000451061046102023000125730ustar 00000000000000/// Error types pub mod error; pub mod expression; /// Auto-generated lists of license identifiers and exception identifiers pub mod identifiers; /// Contains types for lexing an SPDX license expression pub mod lexer; mod licensee; /// Auto-generated full canonical text of each license #[cfg(feature = "text")] pub mod text; pub use error::ParseError; pub use expression::Expression; use identifiers::{IS_COPYLEFT, IS_DEPRECATED, IS_FSF_LIBRE, IS_GNU, IS_OSI_APPROVED}; pub use lexer::ParseMode; pub use licensee::Licensee; use std::{ cmp::{self, Ordering}, fmt, }; /// Unique identifier for a particular license /// /// ``` /// let bsd = spdx::license_id("BSD-3-Clause").unwrap(); /// /// assert!( /// bsd.is_fsf_free_libre() /// && bsd.is_osi_approved() /// && !bsd.is_deprecated() /// && !bsd.is_copyleft() /// ); /// ``` #[derive(Copy, Clone, Eq)] pub struct LicenseId { /// The short identifier for the license pub name: &'static str, /// The full name of the license pub full_name: &'static str, index: usize, flags: u8, } impl PartialEq for LicenseId { #[inline] fn eq(&self, o: &Self) -> bool { self.index == o.index } } impl Ord for LicenseId { #[inline] fn cmp(&self, o: &Self) -> Ordering { self.index.cmp(&o.index) } } impl PartialOrd for LicenseId { #[inline] fn partial_cmp(&self, o: &Self) -> Option { Some(self.cmp(o)) } } impl LicenseId { /// Returns true if the license is [considered free by the FSF](https://www.gnu.org/licenses/license-list.en.html) /// /// ``` /// assert!(spdx::license_id("GPL-2.0-only").unwrap().is_fsf_free_libre()); /// ``` #[inline] #[must_use] pub fn is_fsf_free_libre(self) -> bool { self.flags & IS_FSF_LIBRE != 0 } /// Returns true if the license is [OSI approved](https://opensource.org/licenses) /// /// ``` /// assert!(spdx::license_id("MIT").unwrap().is_osi_approved()); /// ``` #[inline] #[must_use] pub fn is_osi_approved(self) -> bool { self.flags & IS_OSI_APPROVED != 0 } /// Returns true if the license is deprecated /// /// ``` /// assert!(spdx::license_id("wxWindows").unwrap().is_deprecated()); /// ``` #[inline] #[must_use] pub fn is_deprecated(self) -> bool { self.flags & IS_DEPRECATED != 0 } /// Returns true if the license is [copyleft](https://en.wikipedia.org/wiki/Copyleft) /// /// ``` /// assert!(spdx::license_id("LGPL-3.0-or-later").unwrap().is_copyleft()); /// ``` #[inline] #[must_use] pub fn is_copyleft(self) -> bool { self.flags & IS_COPYLEFT != 0 } /// Returns true if the license is a [GNU license](https://www.gnu.org/licenses/identify-licenses-clearly.html), /// which operate differently than all other SPDX license identifiers /// /// ``` /// assert!(spdx::license_id("AGPL-3.0-only").unwrap().is_gnu()); /// ``` #[inline] #[must_use] pub fn is_gnu(self) -> bool { self.flags & IS_GNU != 0 } /// Retrieves the version of the license ID, if any /// /// ``` /// assert_eq!(spdx::license_id("GPL-2.0-only").unwrap().version().unwrap(), "2.0"); /// assert_eq!(spdx::license_id("BSD-3-Clause").unwrap().version().unwrap(), "3"); /// assert!(spdx::license_id("Aladdin").unwrap().version().is_none()); /// ``` #[inline] pub fn version(self) -> Option<&'static str> { self.name .split('-') .find(|comp| comp.chars().all(|c| c == '.' || c.is_ascii_digit())) } /// The base name of the license /// /// ``` /// assert_eq!(spdx::license_id("GPL-2.0-only").unwrap().base(), "GPL"); /// assert_eq!(spdx::license_id("MIT").unwrap().base(), "MIT"); /// ``` #[inline] pub fn base(self) -> &'static str { self.name.split_once('-').map_or(self.name, |(n, _)| n) } /// Attempts to retrieve the license text /// /// ``` /// assert!(spdx::license_id("GFDL-1.3-invariants").unwrap().text().contains("Invariant Sections")) /// ``` #[cfg(feature = "text")] #[inline] pub fn text(self) -> &'static str { text::LICENSE_TEXTS[self.index].1 } } impl fmt::Debug for LicenseId { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.name) } } /// Unique identifier for a particular exception /// /// ``` /// let exception_id = spdx::exception_id("LLVM-exception").unwrap(); /// assert!(!exception_id.is_deprecated()); /// ``` #[derive(Copy, Clone, Eq)] pub struct ExceptionId { /// The short identifier for the exception pub name: &'static str, index: usize, flags: u8, } impl PartialEq for ExceptionId { #[inline] fn eq(&self, o: &Self) -> bool { self.index == o.index } } impl Ord for ExceptionId { #[inline] fn cmp(&self, o: &Self) -> Ordering { self.index.cmp(&o.index) } } impl PartialOrd for ExceptionId { #[inline] fn partial_cmp(&self, o: &Self) -> Option { Some(self.cmp(o)) } } impl ExceptionId { /// Returns true if the exception is deprecated /// /// ``` /// assert!(spdx::exception_id("Nokia-Qt-exception-1.1").unwrap().is_deprecated()); /// ``` #[inline] #[must_use] pub fn is_deprecated(self) -> bool { self.flags & IS_DEPRECATED != 0 } /// Attempts to retrieve the license exception text /// /// ``` /// assert!(spdx::exception_id("LLVM-exception").unwrap().text().contains("LLVM Exceptions to the Apache 2.0 License")); /// ``` #[cfg(feature = "text")] #[inline] pub fn text(self) -> &'static str { text::EXCEPTION_TEXTS[self.index].1 } } impl fmt::Debug for ExceptionId { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.name) } } /// Represents a single license requirement. /// /// The requirement must include a valid [`LicenseItem`], and may allow current /// and future versions of the license, and may also allow for a specific exception /// /// While they can be constructed manually, most of the time these will /// be parsed and combined in an [Expression] #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] pub struct LicenseReq { /// The license pub license: LicenseItem, /// The additional text for this license, as specified following /// the `WITH` operator pub addition: Option, } impl From for LicenseReq { fn from(id: LicenseId) -> Self { Self { license: LicenseItem::Spdx { id, or_later: false, }, addition: None, } } } impl fmt::Display for LicenseReq { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { self.license.fmt(f)?; if let Some(ref exe) = self.addition { write!(f, " WITH {exe}")?; } Ok(()) } } /// A single license term in a license expression, according to the SPDX spec. /// /// This can be either an SPDX license, which is mapped to a [`LicenseId`] from /// a valid SPDX short identifier, or else a document and/or license ref #[derive(Debug, Clone, Eq)] pub enum LicenseItem { /// A regular SPDX license id Spdx { id: LicenseId, /// Indicates the license had a `+`, allowing the licensee to license /// the software under either the specific version, or any later versions or_later: bool, }, Other { /// Purpose: Identify any external SPDX documents referenced within this SPDX document. /// See the [spec](https://spdx.org/spdx-specification-21-web-version#h.h430e9ypa0j9) for /// more details. doc_ref: Option, /// Purpose: Provide a locally unique identifier to refer to licenses that are not found on the SPDX License List. /// See the [spec](https://spdx.org/spdx-specification-21-web-version#h.4f1mdlm) for /// more details. lic_ref: String, }, } impl LicenseItem { /// Returns the license identifier, if it is a recognized SPDX license and not /// a license referencer #[must_use] pub fn id(&self) -> Option { match self { Self::Spdx { id, .. } => Some(*id), Self::Other { .. } => None, } } } impl Ord for LicenseItem { fn cmp(&self, o: &Self) -> Ordering { match (self, o) { ( Self::Spdx { id: a, or_later: la, }, Self::Spdx { id: b, or_later: lb, }, ) => match a.cmp(b) { Ordering::Equal => la.cmp(lb), o => o, }, ( Self::Other { doc_ref: ad, lic_ref: al, }, Self::Other { doc_ref: bd, lic_ref: bl, }, ) => match ad.cmp(bd) { Ordering::Equal => al.cmp(bl), o => o, }, (Self::Spdx { .. }, Self::Other { .. }) => Ordering::Less, (Self::Other { .. }, Self::Spdx { .. }) => Ordering::Greater, } } } impl PartialOrd for LicenseItem { #[allow(clippy::non_canonical_partial_ord_impl)] fn partial_cmp(&self, o: &Self) -> Option { match (self, o) { (Self::Spdx { id: a, .. }, Self::Spdx { id: b, .. }) => a.partial_cmp(b), ( Self::Other { doc_ref: ad, lic_ref: al, }, Self::Other { doc_ref: bd, lic_ref: bl, }, ) => match ad.cmp(bd) { Ordering::Equal => al.partial_cmp(bl), o => Some(o), }, (Self::Spdx { .. }, Self::Other { .. }) => Some(cmp::Ordering::Less), (Self::Other { .. }, Self::Spdx { .. }) => Some(cmp::Ordering::Greater), } } } impl PartialEq for LicenseItem { fn eq(&self, o: &Self) -> bool { matches!(self.partial_cmp(o), Some(cmp::Ordering::Equal)) } } impl fmt::Display for LicenseItem { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { match self { LicenseItem::Spdx { id, or_later } => { id.name.fmt(f)?; if *or_later { if id.is_gnu() && id.is_deprecated() { f.write_str("-or-later")?; } else if !id.is_gnu() { f.write_str("+")?; } } Ok(()) } LicenseItem::Other { doc_ref: Some(d), lic_ref: l, } => write!(f, "DocumentRef-{d}:LicenseRef-{l}"), LicenseItem::Other { doc_ref: None, lic_ref: l, } => write!(f, "LicenseRef-{l}"), } } } /// A single addition term in a addition expression, according to the SPDX spec. /// /// This can be either an SPDX license exception, which is mapped to a [`ExceptionId`] /// from a valid SPDX short identifier, or else a document and/or addition ref #[derive(Debug, Clone, Eq)] pub enum AdditionItem { /// A regular SPDX license exception id Spdx(ExceptionId), Other { /// Purpose: Identify any external SPDX documents referenced within this SPDX document. /// See the [spec](https://spdx.org/spdx-specification-21-web-version#h.h430e9ypa0j9) for /// more details. doc_ref: Option, /// Purpose: Provide a locally unique identifier to refer to additional text that are not found on the SPDX License List. /// See the [spec](https://spdx.org/spdx-specification-21-web-version#h.4f1mdlm) for /// more details. add_ref: String, }, } impl AdditionItem { /// Returns the license exception identifier, if it is a recognized SPDX license exception /// and not a license exception referencer #[must_use] pub fn id(&self) -> Option { match self { Self::Spdx(id) => Some(*id), Self::Other { .. } => None, } } } impl Ord for AdditionItem { fn cmp(&self, o: &Self) -> Ordering { match (self, o) { (Self::Spdx(a), Self::Spdx(b)) => match a.cmp(b) { Ordering::Equal => a.cmp(b), o => o, }, ( Self::Other { doc_ref: ad, add_ref: aa, }, Self::Other { doc_ref: bd, add_ref: ba, }, ) => match ad.cmp(bd) { Ordering::Equal => aa.cmp(ba), o => o, }, (Self::Spdx(_), Self::Other { .. }) => Ordering::Less, (Self::Other { .. }, Self::Spdx(_)) => Ordering::Greater, } } } impl PartialOrd for AdditionItem { #[allow(clippy::non_canonical_partial_ord_impl)] fn partial_cmp(&self, o: &Self) -> Option { match (self, o) { (Self::Spdx(a), Self::Spdx(b)) => a.partial_cmp(b), ( Self::Other { doc_ref: ad, add_ref: aa, }, Self::Other { doc_ref: bd, add_ref: ba, }, ) => match ad.cmp(bd) { Ordering::Equal => aa.partial_cmp(ba), o => Some(o), }, (Self::Spdx(_), Self::Other { .. }) => Some(cmp::Ordering::Less), (Self::Other { .. }, Self::Spdx(_)) => Some(cmp::Ordering::Greater), } } } impl PartialEq for AdditionItem { fn eq(&self, o: &Self) -> bool { matches!(self.partial_cmp(o), Some(cmp::Ordering::Equal)) } } impl fmt::Display for AdditionItem { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { match self { AdditionItem::Spdx(id) => id.name.fmt(f), AdditionItem::Other { doc_ref: Some(d), add_ref: a, } => write!(f, "DocumentRef-{d}:AdditionRef-{a}"), AdditionItem::Other { doc_ref: None, add_ref: a, } => write!(f, "AdditionRef-{a}"), } } } /// Attempts to find a [`LicenseId`] for the string. /// /// Note that any `+` at the end is trimmed when searching for a match. /// /// ``` /// assert!(spdx::license_id("MIT").is_some()); /// assert!(spdx::license_id("BitTorrent-1.1+").is_some()); /// ``` #[inline] #[must_use] pub fn license_id(name: &str) -> Option { let name = name.trim_end_matches('+'); identifiers::LICENSES .binary_search_by(|lic| lic.0.cmp(name)) .map(|index| { let (name, full_name, flags) = identifiers::LICENSES[index]; LicenseId { name, full_name, index, flags, } }) .ok() } /// Attempts to find a GNU license from its base name. /// /// GNU licenses are "special", unlike every other license in the SPDX list, they /// have (in _most_ cases) a bare variant which is deprecated, eg. GPL-2.0, an /// `-only` variant which acts like every other license, and an `-or-later` /// variant which acts as if `+` was applied. #[inline] #[must_use] pub fn gnu_license_id(base: &str, or_later: bool) -> Option { if base.ends_with("-only") || base.ends_with("-or-later") { license_id(base) } else { let mut v = smallvec::SmallVec::<[u8; 32]>::new(); v.resize(base.len() + if or_later { 9 } else { 5 }, 0); v[..base.len()].copy_from_slice(base.as_bytes()); if or_later { v[base.len()..].copy_from_slice(b"-or-later"); } else { v[base.len()..].copy_from_slice(b"-only"); } let Ok(s) = std::str::from_utf8(v.as_slice()) else { // Unreachable, but whatever return None; }; license_id(s) } } /// Find license partially matching the name, e.g. "apache" => "Apache-2.0" /// /// Returns length (in bytes) of the string matched. Garbage at the end is /// ignored. See [`crate::identifiers::IMPRECISE_NAMES`] for the list of invalid /// names, and the valid license identifiers they are mapped to. /// /// ``` /// assert_eq!( /// spdx::imprecise_license_id("simplified bsd license").unwrap().0, /// spdx::license_id("BSD-2-Clause").unwrap() /// ); /// ``` #[inline] #[must_use] pub fn imprecise_license_id(name: &str) -> Option<(LicenseId, usize)> { for (prefix, correct_name) in identifiers::IMPRECISE_NAMES { if let Some(name_prefix) = name.as_bytes().get(0..prefix.len()) { if prefix.as_bytes().eq_ignore_ascii_case(name_prefix) { return license_id(correct_name).map(|lic| (lic, prefix.len())); } } } None } /// Attempts to find an [`ExceptionId`] for the string /// /// ``` /// assert!(spdx::exception_id("LLVM-exception").is_some()); /// ``` #[inline] #[must_use] pub fn exception_id(name: &str) -> Option { identifiers::EXCEPTIONS .binary_search_by(|exc| exc.0.cmp(name)) .map(|index| { let (name, flags) = identifiers::EXCEPTIONS[index]; ExceptionId { name, index, flags } }) .ok() } /// Returns the version number of the SPDX list from which /// the license and exception identifiers are sourced from #[inline] #[must_use] pub fn license_version() -> &'static str { identifiers::VERSION } #[cfg(test)] mod test { use super::LicenseItem; use crate::{Expression, license_id}; #[test] fn gnu_or_later_display() { let gpl_or_later = LicenseItem::Spdx { id: license_id("GPL-3.0").unwrap(), or_later: true, }; let gpl_or_later_in_id = LicenseItem::Spdx { id: license_id("GPL-3.0-or-later").unwrap(), or_later: true, }; let gpl_or_later_parsed = Expression::parse("GPL-3.0-or-later").unwrap(); let non_gnu_or_later = LicenseItem::Spdx { id: license_id("Apache-2.0").unwrap(), or_later: true, }; assert_eq!(gpl_or_later.to_string(), "GPL-3.0-or-later"); assert_eq!(gpl_or_later_parsed.to_string(), "GPL-3.0-or-later"); assert_eq!(gpl_or_later_in_id.to_string(), "GPL-3.0-or-later"); assert_eq!(non_gnu_or_later.to_string(), "Apache-2.0+"); } } spdx-0.12.0/src/licensee.rs000064400000000000000000000316701046102023000136150ustar 00000000000000use crate::{ AdditionItem, LicenseItem, LicenseReq, error::{ParseError, Reason}, lexer::{Lexer, Token}, }; use std::fmt; /// A convenience wrapper for a license and optional additional text that can be /// checked against a license requirement to see if it satisfies the requirement /// placed by a license holder /// /// ``` /// let licensee = spdx::Licensee::parse("GPL-2.0-or-later").unwrap(); /// let req = spdx::LicenseReq::from(spdx::license_id("GPL-2.0-or-later").unwrap()); /// /// assert!(licensee.satisfies(&req)); /// ``` #[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Clone)] pub struct Licensee { inner: LicenseReq, } impl fmt::Display for Licensee { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.inner.fmt(f) } } impl std::str::FromStr for Licensee { type Err = ParseError; fn from_str(s: &str) -> Result { Self::parse(s) } } impl Licensee { /// Creates a licensee from its component parts. /// /// Note that use of SPDX's `or_later` is completely ignored for licensees /// as it only applies to the license holder(s), not the licensee #[must_use] pub fn new(license: LicenseItem, addition: Option) -> Self { if let LicenseItem::Spdx { or_later, .. } = &license { debug_assert!(!or_later); } Self { inner: LicenseReq { license, addition }, } } /// See [`Self::parse_mode`], this is a short-handle for `Licensee::parse_mode(.., ParseMode::STRICT)`. #[inline] pub fn parse(original: &str) -> Result { Self::parse_mode(original, crate::ParseMode::STRICT) } /// Parses an simplified version of an SPDX license expression that can /// contain at most 1 valid SPDX license with an optional additional text /// joined by a `WITH`. /// /// ``` /// use spdx::Licensee; /// /// // Normal single license /// Licensee::parse("MIT").unwrap(); /// /// // SPDX allows license identifiers outside of the official license list /// // via the LicenseRef- prefix (with optional DocumentRef- prefix) /// Licensee::parse("LicenseRef-My-Super-Extra-Special-License").unwrap(); /// Licensee::parse("DocumentRef-mydoc:LicenseRef-My-License").unwrap(); /// /// // License and exception /// Licensee::parse("Apache-2.0 WITH LLVM-exception").unwrap(); /// /// // SPDX allows license with additional text outside of the official /// // license exception list via the AdditionRef- prefix (with optional /// // DocumentRef- prefix) /// Licensee::parse("MIT WITH AdditionRef-My-Exception").unwrap(); /// Licensee::parse("MIT WITH DocumentRef-mydoc:AdditionRef-My-Exception").unwrap(); /// /// // `+` is only allowed to be used by license requirements from the license holder /// Licensee::parse("Apache-2.0+").unwrap_err(); /// /// Licensee::parse_mode("GPL-2.0", spdx::ParseMode::LAX).unwrap(); /// ``` pub fn parse_mode(original: &str, mode: crate::ParseMode) -> Result { let mut lexer = Lexer::new_mode(original, mode); let license = { let lt = lexer.next().ok_or_else(|| ParseError { original: original.to_owned(), span: 0..original.len(), reason: Reason::Empty, })??; match lt.token { Token::Spdx(id) => { if !mode.allow_deprecated && id.is_deprecated() { return Err(ParseError { original: original.to_owned(), span: lt.span, reason: Reason::DeprecatedLicenseId, }); } LicenseItem::Spdx { id, or_later: false, } } Token::LicenseRef { doc_ref, lic_ref } => LicenseItem::Other { doc_ref: doc_ref.map(String::from), lic_ref: lic_ref.to_owned(), }, _ => { return Err(ParseError { original: original.to_owned(), span: lt.span, reason: Reason::Unexpected(&[""]), }); } } }; let addition = match lexer.next() { None => None, Some(lt) => { let lt = lt?; match lt.token { Token::With => { let lt = lexer.next().ok_or(ParseError { original: original.to_owned(), span: lt.span, reason: Reason::Empty, })??; match lt.token { Token::Exception(id) => Some(AdditionItem::Spdx(id)), Token::AdditionRef { doc_ref, add_ref } => Some(AdditionItem::Other { doc_ref: doc_ref.map(String::from), add_ref: add_ref.to_owned(), }), _ => { return Err(ParseError { original: original.to_owned(), span: lt.span, reason: Reason::Unexpected(&[""]), }); } } } _ => { return Err(ParseError { original: original.to_owned(), span: lt.span, reason: Reason::Unexpected(&["WITH"]), }); } } } }; Ok(Self { inner: LicenseReq { license, addition }, }) } /// Determines whether the specified license requirement is satisfied by /// this license (+addition) /// /// ``` /// let licensee = spdx::Licensee::parse("Apache-2.0 WITH LLVM-exception").unwrap(); /// /// assert!(licensee.satisfies(&spdx::LicenseReq { /// license: spdx::LicenseItem::Spdx { /// id: spdx::license_id("Apache-2.0").unwrap(), /// // Means the license holder is fine with Apache-2.0 or higher /// or_later: true, /// }, /// addition: spdx::exception_id("LLVM-exception") /// .map(spdx::AdditionItem::Spdx), /// })); /// ``` #[must_use] pub fn satisfies(&self, req: &LicenseReq) -> bool { match (&self.inner.license, &req.license) { (LicenseItem::Spdx { id: a, .. }, LicenseItem::Spdx { id: b, or_later }) => { if a.index != b.index { let version = |s: &'static str| s.chars().all(|c| c == '.' || c.is_ascii_digit()); if *or_later { let mut ai = a.name.split('-'); let mut bi = b.name.split('-'); loop { match (ai.next(), bi.next()) { (Some(a_comp), Some(b_comp)) => { if a_comp == b_comp { continue; } if version(a_comp) && version(b_comp) && a_comp > b_comp { continue; } return false; } (None, None) => { break; } _ => return false, } } } else { return false; } } } ( LicenseItem::Other { doc_ref: doc_a, lic_ref: lic_a, }, LicenseItem::Other { doc_ref: doc_b, lic_ref: lic_b, }, ) => { if doc_a != doc_b || lic_a != lic_b { return false; } } _ => return false, } req.addition == self.inner.addition } #[must_use] pub fn into_req(self) -> LicenseReq { self.inner } } impl PartialOrd for Licensee { #[inline] fn partial_cmp(&self, o: &LicenseReq) -> Option { self.inner.partial_cmp(o) } } impl PartialEq for Licensee { #[inline] fn eq(&self, o: &LicenseReq) -> bool { self.inner.eq(o) } } impl AsRef for Licensee { #[inline] fn as_ref(&self) -> &LicenseReq { &self.inner } } #[cfg(test)] mod test { use crate::{AdditionItem, LicenseItem, LicenseReq, Licensee, exception_id, license_id}; const LICENSEES: &[&str] = &[ "LicenseRef-Embark-Proprietary", "BSD-2-Clause", "Apache-2.0 WITH LLVM-exception", "BSD-2-Clause-FreeBSD", "BSL-1.0", "Zlib", "CC0-1.0", "FTL", "ISC", "MIT", "MPL-2.0", "BSD-3-Clause", "Unicode-DFS-2016", "Unlicense", "Apache-2.0", "Apache-2.0 WITH AdditionRef-Embark-Exception", ]; #[test] fn handles_or_later() { let mut licensees: Vec<_> = LICENSEES .iter() .map(|l| Licensee::parse_mode(l, crate::ParseMode::LAX).unwrap()) .collect(); licensees.sort(); let mpl_id = license_id("MPL-2.0").unwrap(); let req = LicenseReq { license: LicenseItem::Spdx { id: mpl_id, or_later: true, }, addition: None, }; // Licensees can't have the `or_later` assert!(licensees.binary_search_by(|l| l.inner.cmp(&req)).is_err()); match &licensees[licensees .binary_search_by(|l| l.partial_cmp(&req).unwrap()) .unwrap()] .inner .license { LicenseItem::Spdx { id, .. } => assert_eq!(*id, mpl_id), o @ LicenseItem::Other { .. } => panic!("unexpected {o:?}"), } } #[test] fn handles_exceptions() { let mut licensees: Vec<_> = LICENSEES .iter() .map(|l| Licensee::parse_mode(l, crate::ParseMode::LAX).unwrap()) .collect(); licensees.sort(); let apache_id = license_id("Apache-2.0").unwrap(); let llvm_exc = exception_id("LLVM-exception").unwrap(); let req = LicenseReq { license: LicenseItem::Spdx { id: apache_id, or_later: false, }, addition: Some(AdditionItem::Spdx(llvm_exc)), }; assert_eq!( &req, &licensees[licensees .binary_search_by(|l| l.partial_cmp(&req).unwrap()) .unwrap()] .inner ); } #[test] fn handles_license_ref() { let mut licensees: Vec<_> = LICENSEES .iter() .map(|l| Licensee::parse_mode(l, crate::ParseMode::LAX).unwrap()) .collect(); licensees.sort(); let req = LicenseReq { license: LicenseItem::Other { doc_ref: None, lic_ref: "Embark-Proprietary".to_owned(), }, addition: None, }; assert_eq!( &req, &licensees[licensees .binary_search_by(|l| l.partial_cmp(&req).unwrap()) .unwrap()] .inner ); } #[test] fn handles_close() { let mut licensees: Vec<_> = LICENSEES .iter() .map(|l| Licensee::parse_mode(l, crate::ParseMode::LAX).unwrap()) .collect(); licensees.sort(); for id in &["BSD-2-Clause", "BSD-2-Clause-FreeBSD"] { let lic_id = license_id(id).unwrap(); let req = LicenseReq { license: LicenseItem::Spdx { id: lic_id, or_later: true, }, addition: None, }; // Licensees can't have the `or_later` assert!(licensees.binary_search_by(|l| l.inner.cmp(&req)).is_err()); match &licensees[licensees .binary_search_by(|l| l.partial_cmp(&req).unwrap()) .unwrap()] .inner .license { LicenseItem::Spdx { id, .. } => assert_eq!(*id, lic_id), o @ LicenseItem::Other { .. } => panic!("unexpected {o:?}"), } } } } spdx-0.12.0/src/text.rs000064400000000000000000001512241046102023000130100ustar 00000000000000pub const LICENSE_TEXTS: &[(&str, &str)] = &[ ("0BSD", include!("text/licenses/0BSD")), ("3D-Slicer-1.0", include!("text/licenses/3D-Slicer-1.0")), ("AAL", include!("text/licenses/AAL")), ("ADSL", include!("text/licenses/ADSL")), ("AFL-1.1", include!("text/licenses/AFL-1.1")), ("AFL-1.2", include!("text/licenses/AFL-1.2")), ("AFL-2.0", include!("text/licenses/AFL-2.0")), ("AFL-2.1", include!("text/licenses/AFL-2.1")), ("AFL-3.0", include!("text/licenses/AFL-3.0")), ("AGPL-1.0", include!("text/licenses/AGPL-1.0")), ("AGPL-1.0-only", include!("text/licenses/AGPL-1.0-only")), ( "AGPL-1.0-or-later", include!("text/licenses/AGPL-1.0-or-later"), ), ("AGPL-3.0", include!("text/licenses/AGPL-3.0")), ("AGPL-3.0-only", include!("text/licenses/AGPL-3.0-only")), ( "AGPL-3.0-or-later", include!("text/licenses/AGPL-3.0-or-later"), ), ("AMD-newlib", include!("text/licenses/AMD-newlib")), ("AMDPLPA", include!("text/licenses/AMDPLPA")), ("AML", include!("text/licenses/AML")), ("AML-glslang", include!("text/licenses/AML-glslang")), ("AMPAS", include!("text/licenses/AMPAS")), ("ANTLR-PD", include!("text/licenses/ANTLR-PD")), ( "ANTLR-PD-fallback", include!("text/licenses/ANTLR-PD-fallback"), ), ("APAFML", include!("text/licenses/APAFML")), ("APL-1.0", include!("text/licenses/APL-1.0")), ("APSL-1.0", include!("text/licenses/APSL-1.0")), ("APSL-1.1", include!("text/licenses/APSL-1.1")), ("APSL-1.2", include!("text/licenses/APSL-1.2")), ("APSL-2.0", include!("text/licenses/APSL-2.0")), ( "ASWF-Digital-Assets-1.0", include!("text/licenses/ASWF-Digital-Assets-1.0"), ), ( "ASWF-Digital-Assets-1.1", include!("text/licenses/ASWF-Digital-Assets-1.1"), ), ("Abstyles", include!("text/licenses/Abstyles")), ("AdaCore-doc", include!("text/licenses/AdaCore-doc")), ("Adobe-2006", include!("text/licenses/Adobe-2006")), ( "Adobe-Display-PostScript", include!("text/licenses/Adobe-Display-PostScript"), ), ("Adobe-Glyph", include!("text/licenses/Adobe-Glyph")), ("Adobe-Utopia", include!("text/licenses/Adobe-Utopia")), ("Afmparse", include!("text/licenses/Afmparse")), ("Aladdin", include!("text/licenses/Aladdin")), ("Apache-1.0", include!("text/licenses/Apache-1.0")), ("Apache-1.1", include!("text/licenses/Apache-1.1")), ("Apache-2.0", include!("text/licenses/Apache-2.0")), ("App-s2p", include!("text/licenses/App-s2p")), ("Arphic-1999", include!("text/licenses/Arphic-1999")), ("Artistic-1.0", include!("text/licenses/Artistic-1.0")), ( "Artistic-1.0-Perl", include!("text/licenses/Artistic-1.0-Perl"), ), ( "Artistic-1.0-cl8", include!("text/licenses/Artistic-1.0-cl8"), ), ("Artistic-2.0", include!("text/licenses/Artistic-2.0")), ("Artistic-dist", include!("text/licenses/Artistic-dist")), ("Aspell-RU", include!("text/licenses/Aspell-RU")), ("BSD-1-Clause", include!("text/licenses/BSD-1-Clause")), ("BSD-2-Clause", include!("text/licenses/BSD-2-Clause")), ( "BSD-2-Clause-Darwin", include!("text/licenses/BSD-2-Clause-Darwin"), ), ( "BSD-2-Clause-FreeBSD", include!("text/licenses/BSD-2-Clause-FreeBSD"), ), ( "BSD-2-Clause-NetBSD", include!("text/licenses/BSD-2-Clause-NetBSD"), ), ( "BSD-2-Clause-Patent", include!("text/licenses/BSD-2-Clause-Patent"), ), ( "BSD-2-Clause-Views", include!("text/licenses/BSD-2-Clause-Views"), ), ( "BSD-2-Clause-first-lines", include!("text/licenses/BSD-2-Clause-first-lines"), ), ( "BSD-2-Clause-pkgconf-disclaimer", include!("text/licenses/BSD-2-Clause-pkgconf-disclaimer"), ), ("BSD-3-Clause", include!("text/licenses/BSD-3-Clause")), ( "BSD-3-Clause-Attribution", include!("text/licenses/BSD-3-Clause-Attribution"), ), ( "BSD-3-Clause-Clear", include!("text/licenses/BSD-3-Clause-Clear"), ), ("BSD-3-Clause-HP", include!("text/licenses/BSD-3-Clause-HP")), ( "BSD-3-Clause-LBNL", include!("text/licenses/BSD-3-Clause-LBNL"), ), ( "BSD-3-Clause-Modification", include!("text/licenses/BSD-3-Clause-Modification"), ), ( "BSD-3-Clause-No-Military-License", include!("text/licenses/BSD-3-Clause-No-Military-License"), ), ( "BSD-3-Clause-No-Nuclear-License", include!("text/licenses/BSD-3-Clause-No-Nuclear-License"), ), ( "BSD-3-Clause-No-Nuclear-License-2014", include!("text/licenses/BSD-3-Clause-No-Nuclear-License-2014"), ), ( "BSD-3-Clause-No-Nuclear-Warranty", include!("text/licenses/BSD-3-Clause-No-Nuclear-Warranty"), ), ( "BSD-3-Clause-Open-MPI", include!("text/licenses/BSD-3-Clause-Open-MPI"), ), ( "BSD-3-Clause-Sun", include!("text/licenses/BSD-3-Clause-Sun"), ), ( "BSD-3-Clause-acpica", include!("text/licenses/BSD-3-Clause-acpica"), ), ( "BSD-3-Clause-flex", include!("text/licenses/BSD-3-Clause-flex"), ), ("BSD-4-Clause", include!("text/licenses/BSD-4-Clause")), ( "BSD-4-Clause-Shortened", include!("text/licenses/BSD-4-Clause-Shortened"), ), ("BSD-4-Clause-UC", include!("text/licenses/BSD-4-Clause-UC")), ("BSD-4.3RENO", include!("text/licenses/BSD-4.3RENO")), ("BSD-4.3TAHOE", include!("text/licenses/BSD-4.3TAHOE")), ( "BSD-Advertising-Acknowledgement", include!("text/licenses/BSD-Advertising-Acknowledgement"), ), ( "BSD-Attribution-HPND-disclaimer", include!("text/licenses/BSD-Attribution-HPND-disclaimer"), ), ( "BSD-Inferno-Nettverk", include!("text/licenses/BSD-Inferno-Nettverk"), ), ("BSD-Protection", include!("text/licenses/BSD-Protection")), ("BSD-Source-Code", include!("text/licenses/BSD-Source-Code")), ( "BSD-Source-beginning-file", include!("text/licenses/BSD-Source-beginning-file"), ), ("BSD-Systemics", include!("text/licenses/BSD-Systemics")), ( "BSD-Systemics-W3Works", include!("text/licenses/BSD-Systemics-W3Works"), ), ("BSL-1.0", include!("text/licenses/BSL-1.0")), ("BUSL-1.1", include!("text/licenses/BUSL-1.1")), ("Baekmuk", include!("text/licenses/Baekmuk")), ("Bahyph", include!("text/licenses/Bahyph")), ("Barr", include!("text/licenses/Barr")), ("Beerware", include!("text/licenses/Beerware")), ("BitTorrent-1.0", include!("text/licenses/BitTorrent-1.0")), ("BitTorrent-1.1", include!("text/licenses/BitTorrent-1.1")), ( "Bitstream-Charter", include!("text/licenses/Bitstream-Charter"), ), ("Bitstream-Vera", include!("text/licenses/Bitstream-Vera")), ("BlueOak-1.0.0", include!("text/licenses/BlueOak-1.0.0")), ("Boehm-GC", include!("text/licenses/Boehm-GC")), ( "Boehm-GC-without-fee", include!("text/licenses/Boehm-GC-without-fee"), ), ("Borceux", include!("text/licenses/Borceux")), ( "Brian-Gladman-2-Clause", include!("text/licenses/Brian-Gladman-2-Clause"), ), ( "Brian-Gladman-3-Clause", include!("text/licenses/Brian-Gladman-3-Clause"), ), ("C-UDA-1.0", include!("text/licenses/C-UDA-1.0")), ("CAL-1.0", include!("text/licenses/CAL-1.0")), ( "CAL-1.0-Combined-Work-Exception", include!("text/licenses/CAL-1.0-Combined-Work-Exception"), ), ("CATOSL-1.1", include!("text/licenses/CATOSL-1.1")), ("CC-BY-1.0", include!("text/licenses/CC-BY-1.0")), ("CC-BY-2.0", include!("text/licenses/CC-BY-2.0")), ("CC-BY-2.5", include!("text/licenses/CC-BY-2.5")), ("CC-BY-2.5-AU", include!("text/licenses/CC-BY-2.5-AU")), ("CC-BY-3.0", include!("text/licenses/CC-BY-3.0")), ("CC-BY-3.0-AT", include!("text/licenses/CC-BY-3.0-AT")), ("CC-BY-3.0-AU", include!("text/licenses/CC-BY-3.0-AU")), ("CC-BY-3.0-DE", include!("text/licenses/CC-BY-3.0-DE")), ("CC-BY-3.0-IGO", include!("text/licenses/CC-BY-3.0-IGO")), ("CC-BY-3.0-NL", include!("text/licenses/CC-BY-3.0-NL")), ("CC-BY-3.0-US", include!("text/licenses/CC-BY-3.0-US")), ("CC-BY-4.0", include!("text/licenses/CC-BY-4.0")), ("CC-BY-NC-1.0", include!("text/licenses/CC-BY-NC-1.0")), ("CC-BY-NC-2.0", include!("text/licenses/CC-BY-NC-2.0")), ("CC-BY-NC-2.5", include!("text/licenses/CC-BY-NC-2.5")), ("CC-BY-NC-3.0", include!("text/licenses/CC-BY-NC-3.0")), ("CC-BY-NC-3.0-DE", include!("text/licenses/CC-BY-NC-3.0-DE")), ("CC-BY-NC-4.0", include!("text/licenses/CC-BY-NC-4.0")), ("CC-BY-NC-ND-1.0", include!("text/licenses/CC-BY-NC-ND-1.0")), ("CC-BY-NC-ND-2.0", include!("text/licenses/CC-BY-NC-ND-2.0")), ("CC-BY-NC-ND-2.5", include!("text/licenses/CC-BY-NC-ND-2.5")), ("CC-BY-NC-ND-3.0", include!("text/licenses/CC-BY-NC-ND-3.0")), ( "CC-BY-NC-ND-3.0-DE", include!("text/licenses/CC-BY-NC-ND-3.0-DE"), ), ( "CC-BY-NC-ND-3.0-IGO", include!("text/licenses/CC-BY-NC-ND-3.0-IGO"), ), ("CC-BY-NC-ND-4.0", include!("text/licenses/CC-BY-NC-ND-4.0")), ("CC-BY-NC-SA-1.0", include!("text/licenses/CC-BY-NC-SA-1.0")), ("CC-BY-NC-SA-2.0", include!("text/licenses/CC-BY-NC-SA-2.0")), ( "CC-BY-NC-SA-2.0-DE", include!("text/licenses/CC-BY-NC-SA-2.0-DE"), ), ( "CC-BY-NC-SA-2.0-FR", include!("text/licenses/CC-BY-NC-SA-2.0-FR"), ), ( "CC-BY-NC-SA-2.0-UK", include!("text/licenses/CC-BY-NC-SA-2.0-UK"), ), ("CC-BY-NC-SA-2.5", include!("text/licenses/CC-BY-NC-SA-2.5")), ("CC-BY-NC-SA-3.0", include!("text/licenses/CC-BY-NC-SA-3.0")), ( "CC-BY-NC-SA-3.0-DE", include!("text/licenses/CC-BY-NC-SA-3.0-DE"), ), ( "CC-BY-NC-SA-3.0-IGO", include!("text/licenses/CC-BY-NC-SA-3.0-IGO"), ), ("CC-BY-NC-SA-4.0", include!("text/licenses/CC-BY-NC-SA-4.0")), ("CC-BY-ND-1.0", include!("text/licenses/CC-BY-ND-1.0")), ("CC-BY-ND-2.0", include!("text/licenses/CC-BY-ND-2.0")), ("CC-BY-ND-2.5", include!("text/licenses/CC-BY-ND-2.5")), ("CC-BY-ND-3.0", include!("text/licenses/CC-BY-ND-3.0")), ("CC-BY-ND-3.0-DE", include!("text/licenses/CC-BY-ND-3.0-DE")), ("CC-BY-ND-4.0", include!("text/licenses/CC-BY-ND-4.0")), ("CC-BY-SA-1.0", include!("text/licenses/CC-BY-SA-1.0")), ("CC-BY-SA-2.0", include!("text/licenses/CC-BY-SA-2.0")), ("CC-BY-SA-2.0-UK", include!("text/licenses/CC-BY-SA-2.0-UK")), ("CC-BY-SA-2.1-JP", include!("text/licenses/CC-BY-SA-2.1-JP")), ("CC-BY-SA-2.5", include!("text/licenses/CC-BY-SA-2.5")), ("CC-BY-SA-3.0", include!("text/licenses/CC-BY-SA-3.0")), ("CC-BY-SA-3.0-AT", include!("text/licenses/CC-BY-SA-3.0-AT")), ("CC-BY-SA-3.0-DE", include!("text/licenses/CC-BY-SA-3.0-DE")), ( "CC-BY-SA-3.0-IGO", include!("text/licenses/CC-BY-SA-3.0-IGO"), ), ("CC-BY-SA-4.0", include!("text/licenses/CC-BY-SA-4.0")), ("CC-PDDC", include!("text/licenses/CC-PDDC")), ("CC-PDM-1.0", include!("text/licenses/CC-PDM-1.0")), ("CC-SA-1.0", include!("text/licenses/CC-SA-1.0")), ("CC0-1.0", include!("text/licenses/CC0-1.0")), ("CDDL-1.0", include!("text/licenses/CDDL-1.0")), ("CDDL-1.1", include!("text/licenses/CDDL-1.1")), ("CDL-1.0", include!("text/licenses/CDL-1.0")), ( "CDLA-Permissive-1.0", include!("text/licenses/CDLA-Permissive-1.0"), ), ( "CDLA-Permissive-2.0", include!("text/licenses/CDLA-Permissive-2.0"), ), ( "CDLA-Sharing-1.0", include!("text/licenses/CDLA-Sharing-1.0"), ), ("CECILL-1.0", include!("text/licenses/CECILL-1.0")), ("CECILL-1.1", include!("text/licenses/CECILL-1.1")), ("CECILL-2.0", include!("text/licenses/CECILL-2.0")), ("CECILL-2.1", include!("text/licenses/CECILL-2.1")), ("CECILL-B", include!("text/licenses/CECILL-B")), ("CECILL-C", include!("text/licenses/CECILL-C")), ("CERN-OHL-1.1", include!("text/licenses/CERN-OHL-1.1")), ("CERN-OHL-1.2", include!("text/licenses/CERN-OHL-1.2")), ("CERN-OHL-P-2.0", include!("text/licenses/CERN-OHL-P-2.0")), ("CERN-OHL-S-2.0", include!("text/licenses/CERN-OHL-S-2.0")), ("CERN-OHL-W-2.0", include!("text/licenses/CERN-OHL-W-2.0")), ("CFITSIO", include!("text/licenses/CFITSIO")), ("CMU-Mach", include!("text/licenses/CMU-Mach")), ("CMU-Mach-nodoc", include!("text/licenses/CMU-Mach-nodoc")), ("CNRI-Jython", include!("text/licenses/CNRI-Jython")), ("CNRI-Python", include!("text/licenses/CNRI-Python")), ( "CNRI-Python-GPL-Compatible", include!("text/licenses/CNRI-Python-GPL-Compatible"), ), ("COIL-1.0", include!("text/licenses/COIL-1.0")), ("CPAL-1.0", include!("text/licenses/CPAL-1.0")), ("CPL-1.0", include!("text/licenses/CPL-1.0")), ("CPOL-1.02", include!("text/licenses/CPOL-1.02")), ("CUA-OPL-1.0", include!("text/licenses/CUA-OPL-1.0")), ("Caldera", include!("text/licenses/Caldera")), ( "Caldera-no-preamble", include!("text/licenses/Caldera-no-preamble"), ), ("Catharon", include!("text/licenses/Catharon")), ("ClArtistic", include!("text/licenses/ClArtistic")), ("Clips", include!("text/licenses/Clips")), ( "Community-Spec-1.0", include!("text/licenses/Community-Spec-1.0"), ), ("Condor-1.1", include!("text/licenses/Condor-1.1")), ( "Cornell-Lossless-JPEG", include!("text/licenses/Cornell-Lossless-JPEG"), ), ("Cronyx", include!("text/licenses/Cronyx")), ("Crossword", include!("text/licenses/Crossword")), ("CryptoSwift", include!("text/licenses/CryptoSwift")), ("CrystalStacker", include!("text/licenses/CrystalStacker")), ("Cube", include!("text/licenses/Cube")), ("D-FSL-1.0", include!("text/licenses/D-FSL-1.0")), ("DEC-3-Clause", include!("text/licenses/DEC-3-Clause")), ("DL-DE-BY-2.0", include!("text/licenses/DL-DE-BY-2.0")), ("DL-DE-ZERO-2.0", include!("text/licenses/DL-DE-ZERO-2.0")), ("DOC", include!("text/licenses/DOC")), ("DRL-1.0", include!("text/licenses/DRL-1.0")), ("DRL-1.1", include!("text/licenses/DRL-1.1")), ("DSDP", include!("text/licenses/DSDP")), ("DocBook-DTD", include!("text/licenses/DocBook-DTD")), ("DocBook-Schema", include!("text/licenses/DocBook-Schema")), ( "DocBook-Stylesheet", include!("text/licenses/DocBook-Stylesheet"), ), ("DocBook-XML", include!("text/licenses/DocBook-XML")), ("Dotseqn", include!("text/licenses/Dotseqn")), ("ECL-1.0", include!("text/licenses/ECL-1.0")), ("ECL-2.0", include!("text/licenses/ECL-2.0")), ("EFL-1.0", include!("text/licenses/EFL-1.0")), ("EFL-2.0", include!("text/licenses/EFL-2.0")), ("EPICS", include!("text/licenses/EPICS")), ("EPL-1.0", include!("text/licenses/EPL-1.0")), ("EPL-2.0", include!("text/licenses/EPL-2.0")), ("EUDatagrid", include!("text/licenses/EUDatagrid")), ("EUPL-1.0", include!("text/licenses/EUPL-1.0")), ("EUPL-1.1", include!("text/licenses/EUPL-1.1")), ("EUPL-1.2", include!("text/licenses/EUPL-1.2")), ("Elastic-2.0", include!("text/licenses/Elastic-2.0")), ("Entessa", include!("text/licenses/Entessa")), ("ErlPL-1.1", include!("text/licenses/ErlPL-1.1")), ("Eurosym", include!("text/licenses/Eurosym")), ("FBM", include!("text/licenses/FBM")), ("FDK-AAC", include!("text/licenses/FDK-AAC")), ("FSFAP", include!("text/licenses/FSFAP")), ( "FSFAP-no-warranty-disclaimer", include!("text/licenses/FSFAP-no-warranty-disclaimer"), ), ("FSFUL", include!("text/licenses/FSFUL")), ("FSFULLR", include!("text/licenses/FSFULLR")), ("FSFULLRSD", include!("text/licenses/FSFULLRSD")), ("FSFULLRWD", include!("text/licenses/FSFULLRWD")), ("FSL-1.1-ALv2", include!("text/licenses/FSL-1.1-ALv2")), ("FSL-1.1-MIT", include!("text/licenses/FSL-1.1-MIT")), ("FTL", include!("text/licenses/FTL")), ("Fair", include!("text/licenses/Fair")), ( "Ferguson-Twofish", include!("text/licenses/Ferguson-Twofish"), ), ("Frameworx-1.0", include!("text/licenses/Frameworx-1.0")), ("FreeBSD-DOC", include!("text/licenses/FreeBSD-DOC")), ("FreeImage", include!("text/licenses/FreeImage")), ("Furuseth", include!("text/licenses/Furuseth")), ("GCR-docs", include!("text/licenses/GCR-docs")), ("GD", include!("text/licenses/GD")), ("GFDL-1.1", include!("text/licenses/GFDL-1.1")), ( "GFDL-1.1-invariants", include!("text/licenses/GFDL-1.1-invariants-only"), ), ( "GFDL-1.1-invariants-only", include!("text/licenses/GFDL-1.1-invariants-only"), ), ( "GFDL-1.1-invariants-or-later", include!("text/licenses/GFDL-1.1-invariants-or-later"), ), ( "GFDL-1.1-no-invariants", include!("text/licenses/GFDL-1.1-no-invariants-only"), ), ( "GFDL-1.1-no-invariants-only", include!("text/licenses/GFDL-1.1-no-invariants-only"), ), ( "GFDL-1.1-no-invariants-or-later", include!("text/licenses/GFDL-1.1-no-invariants-or-later"), ), ("GFDL-1.1-only", include!("text/licenses/GFDL-1.1-only")), ( "GFDL-1.1-or-later", include!("text/licenses/GFDL-1.1-or-later"), ), ("GFDL-1.2", include!("text/licenses/GFDL-1.2")), ( "GFDL-1.2-invariants", include!("text/licenses/GFDL-1.2-invariants-only"), ), ( "GFDL-1.2-invariants-only", include!("text/licenses/GFDL-1.2-invariants-only"), ), ( "GFDL-1.2-invariants-or-later", include!("text/licenses/GFDL-1.2-invariants-or-later"), ), ( "GFDL-1.2-no-invariants", include!("text/licenses/GFDL-1.2-no-invariants-only"), ), ( "GFDL-1.2-no-invariants-only", include!("text/licenses/GFDL-1.2-no-invariants-only"), ), ( "GFDL-1.2-no-invariants-or-later", include!("text/licenses/GFDL-1.2-no-invariants-or-later"), ), ("GFDL-1.2-only", include!("text/licenses/GFDL-1.2-only")), ( "GFDL-1.2-or-later", include!("text/licenses/GFDL-1.2-or-later"), ), ("GFDL-1.3", include!("text/licenses/GFDL-1.3")), ( "GFDL-1.3-invariants", include!("text/licenses/GFDL-1.3-invariants-only"), ), ( "GFDL-1.3-invariants-only", include!("text/licenses/GFDL-1.3-invariants-only"), ), ( "GFDL-1.3-invariants-or-later", include!("text/licenses/GFDL-1.3-invariants-or-later"), ), ( "GFDL-1.3-no-invariants", include!("text/licenses/GFDL-1.3-no-invariants-only"), ), ( "GFDL-1.3-no-invariants-only", include!("text/licenses/GFDL-1.3-no-invariants-only"), ), ( "GFDL-1.3-no-invariants-or-later", include!("text/licenses/GFDL-1.3-no-invariants-or-later"), ), ("GFDL-1.3-only", include!("text/licenses/GFDL-1.3-only")), ( "GFDL-1.3-or-later", include!("text/licenses/GFDL-1.3-or-later"), ), ("GL2PS", include!("text/licenses/GL2PS")), ("GLWTPL", include!("text/licenses/GLWTPL")), ("GPL-1.0", include!("text/licenses/GPL-1.0")), ("GPL-1.0+", include!("text/licenses/GPL-1.0+")), ("GPL-1.0-only", include!("text/licenses/GPL-1.0-only")), ( "GPL-1.0-or-later", include!("text/licenses/GPL-1.0-or-later"), ), ("GPL-2.0", include!("text/licenses/GPL-2.0")), ("GPL-2.0+", include!("text/licenses/GPL-2.0+")), ("GPL-2.0-only", include!("text/licenses/GPL-2.0-only")), ( "GPL-2.0-or-later", include!("text/licenses/GPL-2.0-or-later"), ), ( "GPL-2.0-with-GCC-exception", include!("text/licenses/GPL-2.0-with-GCC-exception"), ), ( "GPL-2.0-with-autoconf-exception", include!("text/licenses/GPL-2.0-with-autoconf-exception"), ), ( "GPL-2.0-with-bison-exception", include!("text/licenses/GPL-2.0-with-bison-exception"), ), ( "GPL-2.0-with-classpath-exception", include!("text/licenses/GPL-2.0-with-classpath-exception"), ), ( "GPL-2.0-with-font-exception", include!("text/licenses/GPL-2.0-with-font-exception"), ), ("GPL-3.0", include!("text/licenses/GPL-3.0")), ("GPL-3.0+", include!("text/licenses/GPL-3.0+")), ("GPL-3.0-only", include!("text/licenses/GPL-3.0-only")), ( "GPL-3.0-or-later", include!("text/licenses/GPL-3.0-or-later"), ), ( "GPL-3.0-with-GCC-exception", include!("text/licenses/GPL-3.0-with-GCC-exception"), ), ( "GPL-3.0-with-autoconf-exception", include!("text/licenses/GPL-3.0-with-autoconf-exception"), ), ( "Game-Programming-Gems", include!("text/licenses/Game-Programming-Gems"), ), ("Giftware", include!("text/licenses/Giftware")), ("Glide", include!("text/licenses/Glide")), ("Glulxe", include!("text/licenses/Glulxe")), ("Graphics-Gems", include!("text/licenses/Graphics-Gems")), ("Gutmann", include!("text/licenses/Gutmann")), ("HDF5", include!("text/licenses/HDF5")), ("HIDAPI", include!("text/licenses/HIDAPI")), ("HP-1986", include!("text/licenses/HP-1986")), ("HP-1989", include!("text/licenses/HP-1989")), ("HPND", include!("text/licenses/HPND")), ("HPND-DEC", include!("text/licenses/HPND-DEC")), ( "HPND-Fenneberg-Livingston", include!("text/licenses/HPND-Fenneberg-Livingston"), ), ("HPND-INRIA-IMAG", include!("text/licenses/HPND-INRIA-IMAG")), ("HPND-Intel", include!("text/licenses/HPND-Intel")), ( "HPND-Kevlin-Henney", include!("text/licenses/HPND-Kevlin-Henney"), ), ( "HPND-MIT-disclaimer", include!("text/licenses/HPND-MIT-disclaimer"), ), ( "HPND-Markus-Kuhn", include!("text/licenses/HPND-Markus-Kuhn"), ), ("HPND-Netrek", include!("text/licenses/HPND-Netrek")), ("HPND-Pbmplus", include!("text/licenses/HPND-Pbmplus")), ("HPND-UC", include!("text/licenses/HPND-UC")), ( "HPND-UC-export-US", include!("text/licenses/HPND-UC-export-US"), ), ("HPND-doc", include!("text/licenses/HPND-doc")), ("HPND-doc-sell", include!("text/licenses/HPND-doc-sell")), ("HPND-export-US", include!("text/licenses/HPND-export-US")), ( "HPND-export-US-acknowledgement", include!("text/licenses/HPND-export-US-acknowledgement"), ), ( "HPND-export-US-modify", include!("text/licenses/HPND-export-US-modify"), ), ("HPND-export2-US", include!("text/licenses/HPND-export2-US")), ( "HPND-merchantability-variant", include!("text/licenses/HPND-merchantability-variant"), ), ( "HPND-sell-MIT-disclaimer-xserver", include!("text/licenses/HPND-sell-MIT-disclaimer-xserver"), ), ( "HPND-sell-regexpr", include!("text/licenses/HPND-sell-regexpr"), ), ( "HPND-sell-variant", include!("text/licenses/HPND-sell-variant"), ), ( "HPND-sell-variant-MIT-disclaimer", include!("text/licenses/HPND-sell-variant-MIT-disclaimer"), ), ( "HPND-sell-variant-MIT-disclaimer-rev", include!("text/licenses/HPND-sell-variant-MIT-disclaimer-rev"), ), ("HTMLTIDY", include!("text/licenses/HTMLTIDY")), ("HaskellReport", include!("text/licenses/HaskellReport")), ("Hippocratic-2.1", include!("text/licenses/Hippocratic-2.1")), ("IBM-pibs", include!("text/licenses/IBM-pibs")), ("ICU", include!("text/licenses/ICU")), ( "IEC-Code-Components-EULA", include!("text/licenses/IEC-Code-Components-EULA"), ), ("IJG", include!("text/licenses/IJG")), ("IJG-short", include!("text/licenses/IJG-short")), ("IPA", include!("text/licenses/IPA")), ("IPL-1.0", include!("text/licenses/IPL-1.0")), ("ISC", include!("text/licenses/ISC")), ("ISC-Veillard", include!("text/licenses/ISC-Veillard")), ("ImageMagick", include!("text/licenses/ImageMagick")), ("Imlib2", include!("text/licenses/Imlib2")), ("Info-ZIP", include!("text/licenses/Info-ZIP")), ("Inner-Net-2.0", include!("text/licenses/Inner-Net-2.0")), ("InnoSetup", include!("text/licenses/InnoSetup")), ("Intel", include!("text/licenses/Intel")), ("Intel-ACPI", include!("text/licenses/Intel-ACPI")), ("Interbase-1.0", include!("text/licenses/Interbase-1.0")), ("JPL-image", include!("text/licenses/JPL-image")), ("JPNIC", include!("text/licenses/JPNIC")), ("JSON", include!("text/licenses/JSON")), ("Jam", include!("text/licenses/Jam")), ("JasPer-2.0", include!("text/licenses/JasPer-2.0")), ("Kastrup", include!("text/licenses/Kastrup")), ("Kazlib", include!("text/licenses/Kazlib")), ("Knuth-CTAN", include!("text/licenses/Knuth-CTAN")), ("LAL-1.2", include!("text/licenses/LAL-1.2")), ("LAL-1.3", include!("text/licenses/LAL-1.3")), ("LGPL-2.0", include!("text/licenses/LGPL-2.0")), ("LGPL-2.0+", include!("text/licenses/LGPL-2.0+")), ("LGPL-2.0-only", include!("text/licenses/LGPL-2.0-only")), ( "LGPL-2.0-or-later", include!("text/licenses/LGPL-2.0-or-later"), ), ("LGPL-2.1", include!("text/licenses/LGPL-2.1")), ("LGPL-2.1+", include!("text/licenses/LGPL-2.1+")), ("LGPL-2.1-only", include!("text/licenses/LGPL-2.1-only")), ( "LGPL-2.1-or-later", include!("text/licenses/LGPL-2.1-or-later"), ), ("LGPL-3.0", include!("text/licenses/LGPL-3.0")), ("LGPL-3.0+", include!("text/licenses/LGPL-3.0+")), ("LGPL-3.0-only", include!("text/licenses/LGPL-3.0-only")), ( "LGPL-3.0-or-later", include!("text/licenses/LGPL-3.0-or-later"), ), ("LGPLLR", include!("text/licenses/LGPLLR")), ("LOOP", include!("text/licenses/LOOP")), ("LPD-document", include!("text/licenses/LPD-document")), ("LPL-1.0", include!("text/licenses/LPL-1.0")), ("LPL-1.02", include!("text/licenses/LPL-1.02")), ("LPPL-1.0", include!("text/licenses/LPPL-1.0")), ("LPPL-1.1", include!("text/licenses/LPPL-1.1")), ("LPPL-1.2", include!("text/licenses/LPPL-1.2")), ("LPPL-1.3a", include!("text/licenses/LPPL-1.3a")), ("LPPL-1.3c", include!("text/licenses/LPPL-1.3c")), ( "LZMA-SDK-9.11-to-9.20", include!("text/licenses/LZMA-SDK-9.11-to-9.20"), ), ("LZMA-SDK-9.22", include!("text/licenses/LZMA-SDK-9.22")), ("Latex2e", include!("text/licenses/Latex2e")), ( "Latex2e-translated-notice", include!("text/licenses/Latex2e-translated-notice"), ), ("Leptonica", include!("text/licenses/Leptonica")), ("LiLiQ-P-1.1", include!("text/licenses/LiLiQ-P-1.1")), ("LiLiQ-R-1.1", include!("text/licenses/LiLiQ-R-1.1")), ("LiLiQ-Rplus-1.1", include!("text/licenses/LiLiQ-Rplus-1.1")), ("Libpng", include!("text/licenses/Libpng")), ("Linux-OpenIB", include!("text/licenses/Linux-OpenIB")), ( "Linux-man-pages-1-para", include!("text/licenses/Linux-man-pages-1-para"), ), ( "Linux-man-pages-copyleft", include!("text/licenses/Linux-man-pages-copyleft"), ), ( "Linux-man-pages-copyleft-2-para", include!("text/licenses/Linux-man-pages-copyleft-2-para"), ), ( "Linux-man-pages-copyleft-var", include!("text/licenses/Linux-man-pages-copyleft-var"), ), ( "Lucida-Bitmap-Fonts", include!("text/licenses/Lucida-Bitmap-Fonts"), ), ("MIPS", include!("text/licenses/MIPS")), ("MIT", include!("text/licenses/MIT")), ("MIT-0", include!("text/licenses/MIT-0")), ("MIT-CMU", include!("text/licenses/MIT-CMU")), ("MIT-Click", include!("text/licenses/MIT-Click")), ("MIT-Festival", include!("text/licenses/MIT-Festival")), ("MIT-Khronos-old", include!("text/licenses/MIT-Khronos-old")), ( "MIT-Modern-Variant", include!("text/licenses/MIT-Modern-Variant"), ), ("MIT-Wu", include!("text/licenses/MIT-Wu")), ("MIT-advertising", include!("text/licenses/MIT-advertising")), ("MIT-enna", include!("text/licenses/MIT-enna")), ("MIT-feh", include!("text/licenses/MIT-feh")), ("MIT-open-group", include!("text/licenses/MIT-open-group")), ("MIT-testregex", include!("text/licenses/MIT-testregex")), ("MITNFA", include!("text/licenses/MITNFA")), ("MMIXware", include!("text/licenses/MMIXware")), ("MPEG-SSG", include!("text/licenses/MPEG-SSG")), ("MPL-1.0", include!("text/licenses/MPL-1.0")), ("MPL-1.1", include!("text/licenses/MPL-1.1")), ("MPL-2.0", include!("text/licenses/MPL-2.0")), ( "MPL-2.0-no-copyleft-exception", include!("text/licenses/MPL-2.0-no-copyleft-exception"), ), ("MS-LPL", include!("text/licenses/MS-LPL")), ("MS-PL", include!("text/licenses/MS-PL")), ("MS-RL", include!("text/licenses/MS-RL")), ("MTLL", include!("text/licenses/MTLL")), ( "Mackerras-3-Clause", include!("text/licenses/Mackerras-3-Clause"), ), ( "Mackerras-3-Clause-acknowledgment", include!("text/licenses/Mackerras-3-Clause-acknowledgment"), ), ("MakeIndex", include!("text/licenses/MakeIndex")), ( "Martin-Birgmeier", include!("text/licenses/Martin-Birgmeier"), ), ( "McPhee-slideshow", include!("text/licenses/McPhee-slideshow"), ), ("Minpack", include!("text/licenses/Minpack")), ("MirOS", include!("text/licenses/MirOS")), ("Motosoto", include!("text/licenses/Motosoto")), ("MulanPSL-1.0", include!("text/licenses/MulanPSL-1.0")), ("MulanPSL-2.0", include!("text/licenses/MulanPSL-2.0")), ("Multics", include!("text/licenses/Multics")), ("Mup", include!("text/licenses/Mup")), ("NAIST-2003", include!("text/licenses/NAIST-2003")), ("NASA-1.3", include!("text/licenses/NASA-1.3")), ("NBPL-1.0", include!("text/licenses/NBPL-1.0")), ("NCBI-PD", include!("text/licenses/NCBI-PD")), ("NCGL-UK-2.0", include!("text/licenses/NCGL-UK-2.0")), ("NCL", include!("text/licenses/NCL")), ("NCSA", include!("text/licenses/NCSA")), ("NGPL", include!("text/licenses/NGPL")), ("NICTA-1.0", include!("text/licenses/NICTA-1.0")), ("NIST-PD", include!("text/licenses/NIST-PD")), ( "NIST-PD-fallback", include!("text/licenses/NIST-PD-fallback"), ), ("NIST-Software", include!("text/licenses/NIST-Software")), ("NLOD-1.0", include!("text/licenses/NLOD-1.0")), ("NLOD-2.0", include!("text/licenses/NLOD-2.0")), ("NLPL", include!("text/licenses/NLPL")), ("NOASSERTION", ""), ("NOSL", include!("text/licenses/NOSL")), ("NPL-1.0", include!("text/licenses/NPL-1.0")), ("NPL-1.1", include!("text/licenses/NPL-1.1")), ("NPOSL-3.0", include!("text/licenses/NPOSL-3.0")), ("NRL", include!("text/licenses/NRL")), ("NTIA-PD", include!("text/licenses/NTIA-PD")), ("NTP", include!("text/licenses/NTP")), ("NTP-0", include!("text/licenses/NTP-0")), ("Naumen", include!("text/licenses/Naumen")), ("Net-SNMP", include!("text/licenses/Net-SNMP")), ("NetCDF", include!("text/licenses/NetCDF")), ("Newsletr", include!("text/licenses/Newsletr")), ("Nokia", include!("text/licenses/Nokia")), ("Noweb", include!("text/licenses/Noweb")), ("Nunit", include!("text/licenses/Nunit")), ("O-UDA-1.0", include!("text/licenses/O-UDA-1.0")), ("OAR", include!("text/licenses/OAR")), ("OCCT-PL", include!("text/licenses/OCCT-PL")), ("OCLC-2.0", include!("text/licenses/OCLC-2.0")), ("ODC-By-1.0", include!("text/licenses/ODC-By-1.0")), ("ODbL-1.0", include!("text/licenses/ODbL-1.0")), ("OFFIS", include!("text/licenses/OFFIS")), ("OFL-1.0", include!("text/licenses/OFL-1.0")), ("OFL-1.0-RFN", include!("text/licenses/OFL-1.0-RFN")), ("OFL-1.0-no-RFN", include!("text/licenses/OFL-1.0-no-RFN")), ("OFL-1.1", include!("text/licenses/OFL-1.1")), ("OFL-1.1-RFN", include!("text/licenses/OFL-1.1-RFN")), ("OFL-1.1-no-RFN", include!("text/licenses/OFL-1.1-no-RFN")), ("OGC-1.0", include!("text/licenses/OGC-1.0")), ("OGDL-Taiwan-1.0", include!("text/licenses/OGDL-Taiwan-1.0")), ("OGL-Canada-2.0", include!("text/licenses/OGL-Canada-2.0")), ("OGL-UK-1.0", include!("text/licenses/OGL-UK-1.0")), ("OGL-UK-2.0", include!("text/licenses/OGL-UK-2.0")), ("OGL-UK-3.0", include!("text/licenses/OGL-UK-3.0")), ("OGTSL", include!("text/licenses/OGTSL")), ("OLDAP-1.1", include!("text/licenses/OLDAP-1.1")), ("OLDAP-1.2", include!("text/licenses/OLDAP-1.2")), ("OLDAP-1.3", include!("text/licenses/OLDAP-1.3")), ("OLDAP-1.4", include!("text/licenses/OLDAP-1.4")), ("OLDAP-2.0", include!("text/licenses/OLDAP-2.0")), ("OLDAP-2.0.1", include!("text/licenses/OLDAP-2.0.1")), ("OLDAP-2.1", include!("text/licenses/OLDAP-2.1")), ("OLDAP-2.2", include!("text/licenses/OLDAP-2.2")), ("OLDAP-2.2.1", include!("text/licenses/OLDAP-2.2.1")), ("OLDAP-2.2.2", include!("text/licenses/OLDAP-2.2.2")), ("OLDAP-2.3", include!("text/licenses/OLDAP-2.3")), ("OLDAP-2.4", include!("text/licenses/OLDAP-2.4")), ("OLDAP-2.5", include!("text/licenses/OLDAP-2.5")), ("OLDAP-2.6", include!("text/licenses/OLDAP-2.6")), ("OLDAP-2.7", include!("text/licenses/OLDAP-2.7")), ("OLDAP-2.8", include!("text/licenses/OLDAP-2.8")), ("OLFL-1.3", include!("text/licenses/OLFL-1.3")), ("OML", include!("text/licenses/OML")), ("OPL-1.0", include!("text/licenses/OPL-1.0")), ("OPL-UK-3.0", include!("text/licenses/OPL-UK-3.0")), ("OPUBL-1.0", include!("text/licenses/OPUBL-1.0")), ("OSET-PL-2.1", include!("text/licenses/OSET-PL-2.1")), ("OSL-1.0", include!("text/licenses/OSL-1.0")), ("OSL-1.1", include!("text/licenses/OSL-1.1")), ("OSL-2.0", include!("text/licenses/OSL-2.0")), ("OSL-2.1", include!("text/licenses/OSL-2.1")), ("OSL-3.0", include!("text/licenses/OSL-3.0")), ("OpenPBS-2.3", include!("text/licenses/OpenPBS-2.3")), ("OpenSSL", include!("text/licenses/OpenSSL")), ( "OpenSSL-standalone", include!("text/licenses/OpenSSL-standalone"), ), ("OpenVision", include!("text/licenses/OpenVision")), ("PADL", include!("text/licenses/PADL")), ("PDDL-1.0", include!("text/licenses/PDDL-1.0")), ("PHP-3.0", include!("text/licenses/PHP-3.0")), ("PHP-3.01", include!("text/licenses/PHP-3.01")), ("PPL", include!("text/licenses/PPL")), ("PSF-2.0", include!("text/licenses/PSF-2.0")), ("Parity-6.0.0", include!("text/licenses/Parity-6.0.0")), ("Parity-7.0.0", include!("text/licenses/Parity-7.0.0")), ("Pixar", include!("text/licenses/Pixar")), ("Plexus", include!("text/licenses/Plexus")), ( "PolyForm-Noncommercial-1.0.0", include!("text/licenses/PolyForm-Noncommercial-1.0.0"), ), ( "PolyForm-Small-Business-1.0.0", include!("text/licenses/PolyForm-Small-Business-1.0.0"), ), ("PostgreSQL", include!("text/licenses/PostgreSQL")), ("Python-2.0", include!("text/licenses/Python-2.0")), ("Python-2.0.1", include!("text/licenses/Python-2.0.1")), ("QPL-1.0", include!("text/licenses/QPL-1.0")), ( "QPL-1.0-INRIA-2004", include!("text/licenses/QPL-1.0-INRIA-2004"), ), ("Qhull", include!("text/licenses/Qhull")), ("RHeCos-1.1", include!("text/licenses/RHeCos-1.1")), ("RPL-1.1", include!("text/licenses/RPL-1.1")), ("RPL-1.5", include!("text/licenses/RPL-1.5")), ("RPSL-1.0", include!("text/licenses/RPSL-1.0")), ("RSA-MD", include!("text/licenses/RSA-MD")), ("RSCPL", include!("text/licenses/RSCPL")), ("Rdisc", include!("text/licenses/Rdisc")), ("Ruby", include!("text/licenses/Ruby")), ("Ruby-pty", include!("text/licenses/Ruby-pty")), ("SAX-PD", include!("text/licenses/SAX-PD")), ("SAX-PD-2.0", include!("text/licenses/SAX-PD-2.0")), ("SCEA", include!("text/licenses/SCEA")), ("SGI-B-1.0", include!("text/licenses/SGI-B-1.0")), ("SGI-B-1.1", include!("text/licenses/SGI-B-1.1")), ("SGI-B-2.0", include!("text/licenses/SGI-B-2.0")), ("SGI-OpenGL", include!("text/licenses/SGI-OpenGL")), ("SGP4", include!("text/licenses/SGP4")), ("SHL-0.5", include!("text/licenses/SHL-0.5")), ("SHL-0.51", include!("text/licenses/SHL-0.51")), ("SISSL", include!("text/licenses/SISSL")), ("SISSL-1.2", include!("text/licenses/SISSL-1.2")), ("SL", include!("text/licenses/SL")), ("SMAIL-GPL", include!("text/licenses/SMAIL-GPL")), ("SMLNJ", include!("text/licenses/SMLNJ")), ("SMPPL", include!("text/licenses/SMPPL")), ("SNIA", include!("text/licenses/SNIA")), ("SOFA", include!("text/licenses/SOFA")), ("SPL-1.0", include!("text/licenses/SPL-1.0")), ("SSH-OpenSSH", include!("text/licenses/SSH-OpenSSH")), ("SSH-short", include!("text/licenses/SSH-short")), ( "SSLeay-standalone", include!("text/licenses/SSLeay-standalone"), ), ("SSPL-1.0", include!("text/licenses/SSPL-1.0")), ("SUL-1.0", include!("text/licenses/SUL-1.0")), ("SWL", include!("text/licenses/SWL")), ("Saxpath", include!("text/licenses/Saxpath")), ("SchemeReport", include!("text/licenses/SchemeReport")), ("Sendmail", include!("text/licenses/Sendmail")), ("Sendmail-8.23", include!("text/licenses/Sendmail-8.23")), ( "Sendmail-Open-Source-1.1", include!("text/licenses/Sendmail-Open-Source-1.1"), ), ("SimPL-2.0", include!("text/licenses/SimPL-2.0")), ("Sleepycat", include!("text/licenses/Sleepycat")), ("Soundex", include!("text/licenses/Soundex")), ("Spencer-86", include!("text/licenses/Spencer-86")), ("Spencer-94", include!("text/licenses/Spencer-94")), ("Spencer-99", include!("text/licenses/Spencer-99")), ("StandardML-NJ", include!("text/licenses/StandardML-NJ")), ("SugarCRM-1.1.3", include!("text/licenses/SugarCRM-1.1.3")), ("Sun-PPP", include!("text/licenses/Sun-PPP")), ("Sun-PPP-2000", include!("text/licenses/Sun-PPP-2000")), ("SunPro", include!("text/licenses/SunPro")), ("Symlinks", include!("text/licenses/Symlinks")), ("TAPR-OHL-1.0", include!("text/licenses/TAPR-OHL-1.0")), ("TCL", include!("text/licenses/TCL")), ("TCP-wrappers", include!("text/licenses/TCP-wrappers")), ("TGPPL-1.0", include!("text/licenses/TGPPL-1.0")), ("TMate", include!("text/licenses/TMate")), ("TORQUE-1.1", include!("text/licenses/TORQUE-1.1")), ("TOSL", include!("text/licenses/TOSL")), ("TPDL", include!("text/licenses/TPDL")), ("TPL-1.0", include!("text/licenses/TPL-1.0")), ("TTWL", include!("text/licenses/TTWL")), ("TTYP0", include!("text/licenses/TTYP0")), ("TU-Berlin-1.0", include!("text/licenses/TU-Berlin-1.0")), ("TU-Berlin-2.0", include!("text/licenses/TU-Berlin-2.0")), ("TermReadKey", include!("text/licenses/TermReadKey")), ("ThirdEye", include!("text/licenses/ThirdEye")), ("TrustedQSL", include!("text/licenses/TrustedQSL")), ("UCAR", include!("text/licenses/UCAR")), ("UCL-1.0", include!("text/licenses/UCL-1.0")), ("UMich-Merit", include!("text/licenses/UMich-Merit")), ("UPL-1.0", include!("text/licenses/UPL-1.0")), ("URT-RLE", include!("text/licenses/URT-RLE")), ("Ubuntu-font-1.0", include!("text/licenses/Ubuntu-font-1.0")), ("Unicode-3.0", include!("text/licenses/Unicode-3.0")), ( "Unicode-DFS-2015", include!("text/licenses/Unicode-DFS-2015"), ), ( "Unicode-DFS-2016", include!("text/licenses/Unicode-DFS-2016"), ), ("Unicode-TOU", include!("text/licenses/Unicode-TOU")), ("UnixCrypt", include!("text/licenses/UnixCrypt")), ("Unlicense", include!("text/licenses/Unlicense")), ( "Unlicense-libtelnet", include!("text/licenses/Unlicense-libtelnet"), ), ( "Unlicense-libwhirlpool", include!("text/licenses/Unlicense-libwhirlpool"), ), ("VOSTROM", include!("text/licenses/VOSTROM")), ("VSL-1.0", include!("text/licenses/VSL-1.0")), ("Vim", include!("text/licenses/Vim")), ("W3C", include!("text/licenses/W3C")), ("W3C-19980720", include!("text/licenses/W3C-19980720")), ("W3C-20150513", include!("text/licenses/W3C-20150513")), ("WTFPL", include!("text/licenses/WTFPL")), ("Watcom-1.0", include!("text/licenses/Watcom-1.0")), ("Widget-Workshop", include!("text/licenses/Widget-Workshop")), ("Wsuipa", include!("text/licenses/Wsuipa")), ("X11", include!("text/licenses/X11")), ( "X11-distribute-modifications-variant", include!("text/licenses/X11-distribute-modifications-variant"), ), ("X11-swapped", include!("text/licenses/X11-swapped")), ("XFree86-1.1", include!("text/licenses/XFree86-1.1")), ("XSkat", include!("text/licenses/XSkat")), ("Xdebug-1.03", include!("text/licenses/Xdebug-1.03")), ("Xerox", include!("text/licenses/Xerox")), ("Xfig", include!("text/licenses/Xfig")), ("Xnet", include!("text/licenses/Xnet")), ("YPL-1.0", include!("text/licenses/YPL-1.0")), ("YPL-1.1", include!("text/licenses/YPL-1.1")), ("ZPL-1.1", include!("text/licenses/ZPL-1.1")), ("ZPL-2.0", include!("text/licenses/ZPL-2.0")), ("ZPL-2.1", include!("text/licenses/ZPL-2.1")), ("Zed", include!("text/licenses/Zed")), ("Zeeff", include!("text/licenses/Zeeff")), ("Zend-2.0", include!("text/licenses/Zend-2.0")), ("Zimbra-1.3", include!("text/licenses/Zimbra-1.3")), ("Zimbra-1.4", include!("text/licenses/Zimbra-1.4")), ("Zlib", include!("text/licenses/Zlib")), ("any-OSI", include!("text/licenses/any-OSI")), ( "any-OSI-perl-modules", include!("text/licenses/any-OSI-perl-modules"), ), ( "bcrypt-Solar-Designer", include!("text/licenses/bcrypt-Solar-Designer"), ), ("blessing", include!("text/licenses/blessing")), ("bzip2-1.0.5", include!("text/licenses/bzip2-1.0.5")), ("bzip2-1.0.6", include!("text/licenses/bzip2-1.0.6")), ("check-cvs", include!("text/licenses/check-cvs")), ("checkmk", include!("text/licenses/checkmk")), ( "copyleft-next-0.3.0", include!("text/licenses/copyleft-next-0.3.0"), ), ( "copyleft-next-0.3.1", include!("text/licenses/copyleft-next-0.3.1"), ), ("curl", include!("text/licenses/curl")), ("cve-tou", include!("text/licenses/cve-tou")), ("diffmark", include!("text/licenses/diffmark")), ("dtoa", include!("text/licenses/dtoa")), ("dvipdfm", include!("text/licenses/dvipdfm")), ("eCos-2.0", include!("text/licenses/eCos-2.0")), ("eGenix", include!("text/licenses/eGenix")), ("etalab-2.0", include!("text/licenses/etalab-2.0")), ("fwlw", include!("text/licenses/fwlw")), ("gSOAP-1.3b", include!("text/licenses/gSOAP-1.3b")), ("generic-xts", include!("text/licenses/generic-xts")), ("gnuplot", include!("text/licenses/gnuplot")), ("gtkbook", include!("text/licenses/gtkbook")), ("hdparm", include!("text/licenses/hdparm")), ("iMatix", include!("text/licenses/iMatix")), ("jove", include!("text/licenses/jove")), ("libpng-1.6.35", include!("text/licenses/libpng-1.6.35")), ("libpng-2.0", include!("text/licenses/libpng-2.0")), ("libselinux-1.0", include!("text/licenses/libselinux-1.0")), ("libtiff", include!("text/licenses/libtiff")), ( "libutil-David-Nugent", include!("text/licenses/libutil-David-Nugent"), ), ("lsof", include!("text/licenses/lsof")), ("magaz", include!("text/licenses/magaz")), ("mailprio", include!("text/licenses/mailprio")), ("man2html", include!("text/licenses/man2html")), ("metamail", include!("text/licenses/metamail")), ("mpi-permissive", include!("text/licenses/mpi-permissive")), ("mpich2", include!("text/licenses/mpich2")), ("mplus", include!("text/licenses/mplus")), ("ngrep", include!("text/licenses/ngrep")), ("pkgconf", include!("text/licenses/pkgconf")), ("pnmstitch", include!("text/licenses/pnmstitch")), ("psfrag", include!("text/licenses/psfrag")), ("psutils", include!("text/licenses/psutils")), ("python-ldap", include!("text/licenses/python-ldap")), ("radvd", include!("text/licenses/radvd")), ("snprintf", include!("text/licenses/snprintf")), ("softSurfer", include!("text/licenses/softSurfer")), ("ssh-keyscan", include!("text/licenses/ssh-keyscan")), ("swrule", include!("text/licenses/swrule")), ("threeparttable", include!("text/licenses/threeparttable")), ("ulem", include!("text/licenses/ulem")), ("w3m", include!("text/licenses/w3m")), ("wwl", include!("text/licenses/wwl")), ("wxWindows", include!("text/licenses/wxWindows")), ("xinetd", include!("text/licenses/xinetd")), ( "xkeyboard-config-Zinoviev", include!("text/licenses/xkeyboard-config-Zinoviev"), ), ("xlock", include!("text/licenses/xlock")), ("xpp", include!("text/licenses/xpp")), ("xzoom", include!("text/licenses/xzoom")), ( "zlib-acknowledgement", include!("text/licenses/zlib-acknowledgement"), ), ]; pub const EXCEPTION_TEXTS: &[(&str, &str)] = &[ ("389-exception", include!("text/exceptions/389-exception")), ( "Asterisk-exception", include!("text/exceptions/Asterisk-exception"), ), ( "Asterisk-linking-protocols-exception", include!("text/exceptions/Asterisk-linking-protocols-exception"), ), ( "Autoconf-exception-2.0", include!("text/exceptions/Autoconf-exception-2.0"), ), ( "Autoconf-exception-3.0", include!("text/exceptions/Autoconf-exception-3.0"), ), ( "Autoconf-exception-generic", include!("text/exceptions/Autoconf-exception-generic"), ), ( "Autoconf-exception-generic-3.0", include!("text/exceptions/Autoconf-exception-generic-3.0"), ), ( "Autoconf-exception-macro", include!("text/exceptions/Autoconf-exception-macro"), ), ( "Bison-exception-1.24", include!("text/exceptions/Bison-exception-1.24"), ), ( "Bison-exception-2.2", include!("text/exceptions/Bison-exception-2.2"), ), ( "Bootloader-exception", include!("text/exceptions/Bootloader-exception"), ), ( "CGAL-linking-exception", include!("text/exceptions/CGAL-linking-exception"), ), ( "CLISP-exception-2.0", include!("text/exceptions/CLISP-exception-2.0"), ), ( "Classpath-exception-2.0", include!("text/exceptions/Classpath-exception-2.0"), ), ( "DigiRule-FOSS-exception", include!("text/exceptions/DigiRule-FOSS-exception"), ), ( "Digia-Qt-LGPL-exception-1.1", include!("text/exceptions/Digia-Qt-LGPL-exception-1.1"), ), ("FLTK-exception", include!("text/exceptions/FLTK-exception")), ( "Fawkes-Runtime-exception", include!("text/exceptions/Fawkes-Runtime-exception"), ), ( "Font-exception-2.0", include!("text/exceptions/Font-exception-2.0"), ), ( "GCC-exception-2.0", include!("text/exceptions/GCC-exception-2.0"), ), ( "GCC-exception-2.0-note", include!("text/exceptions/GCC-exception-2.0-note"), ), ( "GCC-exception-3.1", include!("text/exceptions/GCC-exception-3.1"), ), ("GNAT-exception", include!("text/exceptions/GNAT-exception")), ( "GNOME-examples-exception", include!("text/exceptions/GNOME-examples-exception"), ), ( "GNU-compiler-exception", include!("text/exceptions/GNU-compiler-exception"), ), ( "GPL-3.0-389-ds-base-exception", include!("text/exceptions/GPL-3.0-389-ds-base-exception"), ), ( "GPL-3.0-interface-exception", include!("text/exceptions/GPL-3.0-interface-exception"), ), ( "GPL-3.0-linking-exception", include!("text/exceptions/GPL-3.0-linking-exception"), ), ( "GPL-3.0-linking-source-exception", include!("text/exceptions/GPL-3.0-linking-source-exception"), ), ("GPL-CC-1.0", include!("text/exceptions/GPL-CC-1.0")), ( "GStreamer-exception-2005", include!("text/exceptions/GStreamer-exception-2005"), ), ( "GStreamer-exception-2008", include!("text/exceptions/GStreamer-exception-2008"), ), ("Gmsh-exception", include!("text/exceptions/Gmsh-exception")), ( "Independent-modules-exception", include!("text/exceptions/Independent-modules-exception"), ), ( "KiCad-libraries-exception", include!("text/exceptions/KiCad-libraries-exception"), ), ( "LGPL-3.0-linking-exception", include!("text/exceptions/LGPL-3.0-linking-exception"), ), ("LLGPL", include!("text/exceptions/LLGPL")), ("LLVM-exception", include!("text/exceptions/LLVM-exception")), ("LZMA-exception", include!("text/exceptions/LZMA-exception")), ( "Libtool-exception", include!("text/exceptions/Libtool-exception"), ), ( "Linux-syscall-note", include!("text/exceptions/Linux-syscall-note"), ), ( "Nokia-Qt-exception-1.1", include!("text/exceptions/Nokia-Qt-exception-1.1"), ), ( "OCCT-exception-1.0", include!("text/exceptions/OCCT-exception-1.0"), ), ( "OCaml-LGPL-linking-exception", include!("text/exceptions/OCaml-LGPL-linking-exception"), ), ( "OpenJDK-assembly-exception-1.0", include!("text/exceptions/OpenJDK-assembly-exception-1.0"), ), ( "PCRE2-exception", include!("text/exceptions/PCRE2-exception"), ), ( "PS-or-PDF-font-exception-20170817", include!("text/exceptions/PS-or-PDF-font-exception-20170817"), ), ( "QPL-1.0-INRIA-2004-exception", include!("text/exceptions/QPL-1.0-INRIA-2004-exception"), ), ( "Qt-GPL-exception-1.0", include!("text/exceptions/Qt-GPL-exception-1.0"), ), ( "Qt-LGPL-exception-1.1", include!("text/exceptions/Qt-LGPL-exception-1.1"), ), ( "Qwt-exception-1.0", include!("text/exceptions/Qwt-exception-1.0"), ), ( "RRDtool-FLOSS-exception-2.0", include!("text/exceptions/RRDtool-FLOSS-exception-2.0"), ), ("SANE-exception", include!("text/exceptions/SANE-exception")), ("SHL-2.0", include!("text/exceptions/SHL-2.0")), ("SHL-2.1", include!("text/exceptions/SHL-2.1")), ("SWI-exception", include!("text/exceptions/SWI-exception")), ( "Swift-exception", include!("text/exceptions/Swift-exception"), ), ( "Texinfo-exception", include!("text/exceptions/Texinfo-exception"), ), ("UBDL-exception", include!("text/exceptions/UBDL-exception")), ( "Universal-FOSS-exception-1.0", include!("text/exceptions/Universal-FOSS-exception-1.0"), ), ( "WxWindows-exception-3.1", include!("text/exceptions/WxWindows-exception-3.1"), ), ( "cryptsetup-OpenSSL-exception", include!("text/exceptions/cryptsetup-OpenSSL-exception"), ), ( "eCos-exception-2.0", include!("text/exceptions/eCos-exception-2.0"), ), ( "erlang-otp-linking-exception", include!("text/exceptions/erlang-otp-linking-exception"), ), ("fmt-exception", include!("text/exceptions/fmt-exception")), ( "freertos-exception-2.0", include!("text/exceptions/freertos-exception-2.0"), ), ( "gnu-javamail-exception", include!("text/exceptions/gnu-javamail-exception"), ), ( "harbour-exception", include!("text/exceptions/harbour-exception"), ), ( "i2p-gpl-java-exception", include!("text/exceptions/i2p-gpl-java-exception"), ), ( "libpri-OpenH323-exception", include!("text/exceptions/libpri-OpenH323-exception"), ), ("mif-exception", include!("text/exceptions/mif-exception")), ("mxml-exception", include!("text/exceptions/mxml-exception")), ( "openvpn-openssl-exception", include!("text/exceptions/openvpn-openssl-exception"), ), ( "polyparse-exception", include!("text/exceptions/polyparse-exception"), ), ( "romic-exception", include!("text/exceptions/romic-exception"), ), ( "stunnel-exception", include!("text/exceptions/stunnel-exception"), ), ( "u-boot-exception-2.0", include!("text/exceptions/u-boot-exception-2.0"), ), ( "vsftpd-openssl-exception", include!("text/exceptions/vsftpd-openssl-exception"), ), ( "x11vnc-openssl-exception", include!("text/exceptions/x11vnc-openssl-exception"), ), ];