Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update license list to 3.18 #55

Merged
merged 3 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- next-header -->
## [Unreleased] - ReleaseDate
### Changed
- [PR#55](https://github.com/EmbarkStudios/spdx/pull/55) updated the SPDX license list from `3.14` => `3.18`.

## [0.8.1] - 2022-02-04
### Changed
- [PR#51](https://github.com/EmbarkStudios/spdx/pull/51) updates the crates.io metadata for the crate.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![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.56.1-blue?color=fc8d62&logo=rust)](https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html)
[![SPDX Version](https://img.shields.io/badge/SPDX%20Version-3.14-blue.svg)](https://spdx.org/licenses/)
[![SPDX Version](https://img.shields.io/badge/SPDX%20Version-3.18-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)

Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{error::Error, fmt};

/// An error related to parsing of an SPDX license expression
/// or identifier
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct ParseError {
/// The string that was attempting to be parsed
pub original: String,
Expand All @@ -14,7 +14,7 @@ pub struct ParseError {
}

/// The particular reason for a `ParseError`
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum Reason {
/// The specified license short-identifier was not
/// found the SPDX list
Expand Down
2 changes: 1 addition & 1 deletion src/expression/minimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{LicenseReq, Licensee};
use std::fmt;

/// Errors that can occur when trying to minimize the requirements for an [`Expression`]
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum MinimizeError {
/// More than `64` unique licensees satisfied a requirement in the [`Expression`]
TooManyRequirements(usize),
Expand Down
99 changes: 84 additions & 15 deletions src/identifiers.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* list fetched from https://github.com/spdx/license-list-data @ v3.14
* list fetched from https://github.com/spdx/license-list-data @ v3.18
*
* AUTO-GENERATED BY ./update
* DO NOT MODIFY
Expand All @@ -13,7 +13,7 @@ pub const IS_DEPRECATED: u8 = 0x4;
pub const IS_COPYLEFT: u8 = 0x8;
pub const IS_GNU: u8 = 0x10;

pub const VERSION: &str = "3.14";
pub const VERSION: &str = "3.18";

pub const LICENSES: &[(&str, &str, u8)] = &[
("0BSD", r#"BSD Zero Clause License"#, IS_OSI_APPROVED),
Expand Down Expand Up @@ -129,6 +129,8 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
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",
Expand All @@ -149,7 +151,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
(
"BSD-2-Clause",
r#"BSD 2-Clause "Simplified" License"#,
IS_OSI_APPROVED,
IS_OSI_APPROVED | IS_FSF_LIBRE,
),
(
"BSD-2-Clause-FreeBSD",
Expand All @@ -159,7 +161,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
(
"BSD-2-Clause-NetBSD",
r#"BSD 2-Clause NetBSD License"#,
IS_DEPRECATED,
IS_DEPRECATED | IS_FSF_LIBRE,
),
(
"BSD-2-Clause-Patent",
Expand Down Expand Up @@ -236,6 +238,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
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),
Expand All @@ -249,6 +252,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
r#"BitTorrent Open Source License v1.1"#,
IS_FSF_LIBRE,
),
("Bitstream-Vera", r#"Bitstream Vera Font License"#, 0x0),
("BlueOak-1.0.0", r#"Blue Oak Model License 1.0.0"#, 0x0),
("Borceux", r#"Borceux license"#, 0x0),
(
Expand Down Expand Up @@ -306,6 +310,11 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
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"#,
Expand Down Expand Up @@ -596,6 +605,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
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"#,
Expand All @@ -614,11 +624,21 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
),
("Caldera", r#"Caldera License"#, 0x0),
("ClArtistic", r#"Clarified Artistic License"#, IS_FSF_LIBRE),
(
"Community-Spec-1.0",
r#"Community Specification License 1.0"#,
0x0,
),
("Condor-1.1", r#"Condor Public License v1.1"#, IS_FSF_LIBRE),
("Crossword", r#"Crossword License"#, 0x0),
("CrystalStacker", r#"CrystalStacker License"#, 0x0),
("Cube", r#"Cube License"#, 0x0),
("D-FSL-1.0", r#"Deutsche Freie Software Lizenz"#, 0x0),
(
"DL-DE-BY-2.0",
r#"Data licence Germany – attribution – version 2.0"#,
0x0,
),
("DOC", r#"DOC License"#, 0x0),
("DRL-1.0", r#"Detection Rule License 1.0"#, 0x0),
("DSDP", r#"DSDP License"#, 0x0),
Expand Down Expand Up @@ -668,11 +688,13 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
(
"EUPL-1.2",
r#"European Union Public License 1.2"#,
IS_OSI_APPROVED | IS_COPYLEFT,
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),
("FDK-AAC", r#"Fraunhofer FDK AAC Codec Library"#, 0x0),
("FSFAP", r#"FSF All Permissive License"#, IS_FSF_LIBRE),
("FSFUL", r#"FSF Unlimited License"#, 0x0),
(
Expand Down Expand Up @@ -855,7 +877,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
(
"GPL-2.0+",
r#"GNU General Public License v2.0 or later"#,
IS_DEPRECATED | IS_OSI_APPROVED | IS_COPYLEFT | IS_GNU,
IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU,
),
(
"GPL-2.0-only",
Expand Down Expand Up @@ -900,7 +922,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
(
"GPL-3.0+",
r#"GNU General Public License v3.0 or later"#,
IS_DEPRECATED | IS_OSI_APPROVED | IS_COPYLEFT | IS_GNU,
IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU,
),
(
"GPL-3.0-only",
Expand Down Expand Up @@ -968,6 +990,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
("Interbase-1.0", r#"Interbase Public License v1.0"#, 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),
("LAL-1.2", r#"Licence Art Libre 1.2"#, 0x0),
("LAL-1.3", r#"Licence Art Libre 1.3"#, 0x0),
Expand Down Expand Up @@ -999,7 +1022,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
(
"LGPL-2.1+",
r#"GNU Library General Public License v2.1 or later"#,
IS_DEPRECATED | IS_OSI_APPROVED | IS_COPYLEFT | IS_GNU,
IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU,
),
(
"LGPL-2.1-only",
Expand All @@ -1019,7 +1042,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
(
"LGPL-3.0+",
r#"GNU Lesser General Public License v3.0 or later"#,
IS_DEPRECATED | IS_OSI_APPROVED | IS_COPYLEFT | IS_GNU,
IS_DEPRECATED | IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT | IS_GNU,
),
(
"LGPL-3.0-only",
Expand Down Expand Up @@ -1063,6 +1086,16 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
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),
("Leptonica", r#"Leptonica License"#, 0x0),
(
Expand All @@ -1086,6 +1119,11 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
r#"Linux Kernel Variant of OpenIB.org license"#,
0x0,
),
(
"Linux-man-pages-copyleft",
r#"Linux man-pages Copyleft"#,
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),
Expand Down Expand Up @@ -1119,6 +1157,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
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"#,
Expand All @@ -1131,6 +1170,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
),
("MTLL", r#"Matrix Template Library License"#, 0x0),
("MakeIndex", r#"MakeIndex License"#, 0x0),
("Minpack", r#"Minpack License"#, 0x0),
("MirOS", r#"The MirOS Licence"#, IS_OSI_APPROVED),
("Motosoto", r#"Motosoto License"#, IS_OSI_APPROVED),
(
Expand Down Expand Up @@ -1163,6 +1203,11 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
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",
Expand Down Expand Up @@ -1210,7 +1255,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
IS_OSI_APPROVED | IS_FSF_LIBRE,
),
("Noweb", r#"Noweb License"#, 0x0),
("Nunit", r#"Nunit License"#, IS_DEPRECATED),
("Nunit", r#"Nunit License"#, IS_DEPRECATED | IS_FSF_LIBRE),
("O-UDA-1.0", r#"Open Use of Data Agreement v1.0"#, 0x0),
("OCCT-PL", r#"Open CASCADE Technology Public License"#, 0x0),
(
Expand All @@ -1228,7 +1273,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
r#"Open Data Commons Open Database License v1.0"#,
IS_FSF_LIBRE,
),
("OFL-1.0", r#"SIL Open Font License 1.0"#, 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"#,
Expand Down Expand Up @@ -1366,6 +1411,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
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"#,
Expand Down Expand Up @@ -1442,6 +1488,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
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),
("SimPL-2.0", r#"Simple Public License 2.0"#, IS_OSI_APPROVED),
Expand All @@ -1456,7 +1503,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
(
"StandardML-NJ",
r#"Standard ML of New Jersey License"#,
IS_DEPRECATED,
IS_DEPRECATED | IS_FSF_LIBRE,
),
("SugarCRM-1.1.3", r#"SugarCRM Public License v1.1.3"#, 0x0),
("TAPR-OHL-1.0", r#"TAPR Open Hardware License v1.0"#, 0x0),
Expand Down Expand Up @@ -1535,6 +1582,11 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
),
("Wsuipa", r#"Wsuipa License"#, 0x0),
("X11", r#"X11 License"#, IS_FSF_LIBRE),
(
"X11-distribute-modifications-variant",
r#"X11 License Distribution Modification Variant"#,
0x0,
),
("XFree86-1.1", r#"XFree86 License 1.1"#, IS_FSF_LIBRE),
("XSkat", r#"XSkat License"#, 0x0),
("Xerox", r#"Xerox License"#, 0x0),
Expand Down Expand Up @@ -1562,14 +1614,22 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
("Zimbra-1.4", r#"Zimbra Public License v1.4"#, 0x0),
("Zlib", r#"zlib License"#, IS_OSI_APPROVED | IS_FSF_LIBRE),
("blessing", r#"SQLite Blessing"#, 0x0),
("bzip2-1.0.5", r#"bzip2 and libbzip2 License v1.0.5"#, 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),
("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),
("diffmark", r#"diffmark license"#, 0x0),
("dvipdfm", r#"dvipdfm License"#, 0x0),
("eCos-2.0", r#"eCos license version 2.0"#, IS_DEPRECATED),
(
"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),
("gSOAP-1.3b", r#"gSOAP Public License v1.3b"#, 0x0),
Expand All @@ -1582,10 +1642,16 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
("libpng-2.0", r#"PNG Reference Library version 2"#, 0x0),
("libselinux-1.0", r#"libselinux public domain notice"#, 0x0),
("libtiff", r#"libtiff License"#, 0x0),
("mpi-permissive", r#"mpi Permissive License"#, 0x0),
("mpich2", r#"mpich2 License"#, 0x0),
("mplus", r#"mplus Font License"#, 0x0),
("psfrag", r#"psfrag License"#, 0x0),
("psutils", r#"psutils License"#, 0x0),
("wxWindows", r#"wxWindows Library License"#, IS_DEPRECATED),
(
"wxWindows",
r#"wxWindows Library License"#,
IS_DEPRECATED | IS_OSI_APPROVED,
),
("xinetd", r#"xinetd License"#, IS_FSF_LIBRE | IS_COPYLEFT),
("xpp", r#"XPP License"#, 0x0),
(
Expand Down Expand Up @@ -1646,6 +1712,9 @@ pub const EXCEPTIONS: &[(&str, u8)] = &[
("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),
("KiCad-libraries-exception", 0),
("LGPL-3.0-linking-exception", 0),
("LLVM-exception", 0),
("LZMA-exception", 0),
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ impl PartialEq for LicenseItem {
}
}

#[must_use]
impl fmt::Display for LicenseItem {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
match self {
Expand Down Expand Up @@ -542,7 +541,7 @@ pub fn exception_id(name: &str) -> Option<ExceptionId> {
/// the license and exception identifiers are sourced from
///
/// ```
/// assert_eq!(spdx::license_version(), "3.14");
/// assert_eq!(spdx::license_version(), "3.18");
/// ```
#[inline]
#[must_use]
Expand Down
Loading