diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..42bf229 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,79 @@ +[target.'cfg(all())'] +rustflags = [ + # BEGIN - Embark standard lints v6 for Rust 1.55+ + # do not change or add/remove here, but one can add exceptions after this section + # for more info see: + "-Dunsafe_code", + "-Wunexpected_cfgs", + "-Wclippy::all", + "-Wclippy::await_holding_lock", + "-Wclippy::char_lit_as_u8", + "-Wclippy::checked_conversions", + "-Wclippy::dbg_macro", + "-Wclippy::debug_assert_with_mut_call", + "-Wclippy::doc_markdown", + "-Wclippy::empty_enum", + "-Wclippy::enum_glob_use", + "-Wclippy::exit", + "-Wclippy::expl_impl_clone_on_copy", + "-Wclippy::explicit_deref_methods", + "-Wclippy::explicit_into_iter_loop", + "-Wclippy::fallible_impl_from", + "-Wclippy::filter_map_next", + "-Wclippy::flat_map_option", + "-Wclippy::float_cmp_const", + "-Wclippy::fn_params_excessive_bools", + "-Wclippy::from_iter_instead_of_collect", + "-Wclippy::if_let_mutex", + "-Wclippy::implicit_clone", + "-Wclippy::imprecise_flops", + "-Wclippy::inefficient_to_string", + "-Wclippy::invalid_upcast_comparisons", + "-Wclippy::large_digit_groups", + "-Wclippy::large_stack_arrays", + "-Wclippy::large_types_passed_by_value", + "-Wclippy::let_unit_value", + "-Wclippy::linkedlist", + "-Wclippy::lossy_float_literal", + "-Wclippy::macro_use_imports", + "-Wclippy::manual_ok_or", + "-Wclippy::map_err_ignore", + "-Wclippy::map_flatten", + "-Wclippy::map_unwrap_or", + "-Wclippy::match_on_vec_items", + "-Wclippy::match_same_arms", + "-Wclippy::match_wild_err_arm", + "-Wclippy::match_wildcard_for_single_variants", + "-Wclippy::mem_forget", + "-Wclippy::missing_enforced_import_renames", + "-Wclippy::mut_mut", + "-Wclippy::mutex_integer", + "-Wclippy::needless_borrow", + "-Wclippy::needless_continue", + "-Wclippy::needless_for_each", + "-Wclippy::option_option", + "-Wclippy::path_buf_push_overwrite", + "-Wclippy::ptr_as_ptr", + "-Wclippy::rc_mutex", + "-Wclippy::ref_option_ref", + "-Wclippy::rest_pat_in_fully_bound_structs", + "-Wclippy::same_functions_in_if_condition", + "-Wclippy::semicolon_if_nothing_returned", + "-Wclippy::single_match_else", + "-Wclippy::string_add_assign", + "-Wclippy::string_add", + "-Wclippy::string_lit_as_bytes", + "-Wclippy::string_to_string", + "-Wclippy::todo", + "-Wclippy::trait_duplication_in_bounds", + "-Wclippy::unimplemented", + "-Wclippy::unnested_or_patterns", + "-Wclippy::unused_self", + "-Wclippy::useless_transmute", + "-Wclippy::verbose_file_reads", + "-Wclippy::zero_sized_map_values", + "-Wfuture_incompatible", + "-Wnonstandard_style", + "-Wrust_2018_idioms", + # END - Embark standard lints v6 for Rust 1.55+ +] \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b1bf608..0b772da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - ReleaseDate +### Changed +- [PR#72](https://github.com/EmbarkStudios/spdx/pull/72) update SPDX license list to 3.25.0. + ## [0.10.6] - 2024-05-31 ### Changed - [PR#70](https://github.com/EmbarkStudios/spdx/pull/70) update SPDX license list to 3.24.0. diff --git a/Cargo.lock b/Cargo.lock index cd9e19d..7430cfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,13 +4,13 @@ version = 3 [[package]] name = "bstr" -version = "0.2.17" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ - "lazy_static", "memchr", "regex-automata", + "serde", ] [[package]] @@ -33,33 +33,71 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "memchr" -version = "2.7.1" +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 = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] [[package]] name = "regex-automata" -version = "0.1.10" +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 = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "similar" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" dependencies = [ "bstr", "unicode-segmentation", @@ -67,9 +105,9 @@ dependencies = [ [[package]] name = "similar-asserts" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e041bb827d1bfca18f213411d51b665309f1afb37a04a5d1464530e13779fc0f" +checksum = "cfe85670573cd6f0fa97940f26e7e6601213c3b0555246c24234131f88c5709e" dependencies = [ "console", "similar", @@ -77,9 +115,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "spdx" @@ -89,11 +127,28 @@ dependencies = [ "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.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "windows-sys" @@ -106,13 +161,14 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +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", @@ -121,42 +177,48 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.3" +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 = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/src/expression/parser.rs b/src/expression/parser.rs index 746f97a..488bfb4 100644 --- a/src/expression/parser.rs +++ b/src/expression/parser.rs @@ -13,10 +13,10 @@ impl Expression { /// 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 + /// [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 + /// a valid AND, OR, or WITH operator separating them /// * An AND, OR, or WITH doesn't have a license or `)` preceding it /// /// ``` @@ -35,7 +35,7 @@ impl Expression { /// 1. Lower-cased operators ('or', 'and', 'with') are upper-cased /// 1. '+' is tranformed to `-or-later` for GNU licenses /// 1. Invalid/imprecise license identifiers (eg. `apache2`) are replaced - /// with their valid identifiers + /// with their valid identifiers /// /// If the provided expression is not modified then `None` is returned /// diff --git a/src/identifiers.rs b/src/identifiers.rs index 0859887..9681250 100644 --- a/src/identifiers.rs +++ b/src/identifiers.rs @@ -1,5 +1,5 @@ /* - * list fetched from https://github.com/spdx/license-list-data @ v3.24.0 + * list fetched from https://github.com/spdx/license-list-data @ v3.25.0 * * AUTO-GENERATED BY ./update * DO NOT MODIFY @@ -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.24.0"; +pub const VERSION: &str = "3.25.0"; pub const LICENSES: &[(&str, &str, u8)] = &[ ("0BSD", r#"BSD Zero Clause License"#, IS_OSI_APPROVED), @@ -766,6 +766,8 @@ pub const LICENSES: &[(&str, &str, u8)] = &[ ("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-Schema", r#"DocBook Schema License"#, 0x0), + ("DocBook-XML", r#"DocBook XML License"#, 0x0), ("Dotseqn", r#"Dotseqn License"#, 0x0), ( "ECL-1.0", @@ -1087,6 +1089,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[ ("Glulxe", r#"Glulxe License"#, 0x0), ("Graphics-Gems", r#"Graphics Gems License"#, 0x0), ("Gutmann", r#"Gutmann License"#, 0x0), + ("HIDAPI", r#"HIDAPI License"#, 0x0), ("HP-1986", r#"Hewlett-Packard 1986 License"#, 0x0), ("HP-1989", r#"Hewlett-Packard 1989 License"#, 0x0), ( @@ -1129,6 +1132,11 @@ pub const LICENSES: &[(&str, &str, u8)] = &[ 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"#, @@ -1549,7 +1557,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[ ("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"#, 0x0), + ("Net-SNMP", r#"Net-SNMP License"#, IS_DEPRECATED), ("NetCDF", r#"NetCDF license"#, 0x0), ("Newsletr", r#"Newsletr License"#, 0x0), ( @@ -1768,6 +1776,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[ ), ("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), @@ -1885,6 +1894,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[ 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", @@ -1923,7 +1933,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[ ( "W3C-20150513", r#"W3C Software Notice and Document License (2015-05-13)"#, - 0x0, + IS_OSI_APPROVED, ), ( "WTFPL", @@ -1943,6 +1953,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[ 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), @@ -2158,6 +2169,7 @@ pub const EXCEPTIONS: &[(&str, u8)] = &[ ("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), @@ -2165,6 +2177,7 @@ pub const EXCEPTIONS: &[(&str, u8)] = &[ ("libpri-OpenH323-exception", 0), ("mif-exception", 0), ("openvpn-openssl-exception", 0), + ("romic-exception", 0), ("stunnel-exception", 0), ("u-boot-exception-2.0", 0), ("vsftpd-openssl-exception", 0), diff --git a/src/lexer.rs b/src/lexer.rs index 41ff1af..c738853 100644 --- a/src/lexer.rs +++ b/src/lexer.rs @@ -35,8 +35,8 @@ 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. + /// Document/LicenseRef, are allowed. The license identifiers are also + /// case-sensitive. /// 1. `WITH`, `AND`, and `OR` are the only valid operators pub const STRICT: Self = Self { allow_lower_case_operators: false, @@ -48,12 +48,12 @@ impl ParseMode { /// 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. + /// 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 + /// separated by whitespace from the terms it combines pub const LAX: Self = Self { allow_lower_case_operators: true, allow_slash_as_or_operator: true, diff --git a/src/lib.rs b/src/lib.rs index dd99596..b0ab1d1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,83 +1,3 @@ -// BEGIN - Embark standard lints v6 for Rust 1.55+ -// do not change or add/remove here, but one can add exceptions after this section -// for more info see: -#![deny(unsafe_code)] -#![warn( - clippy::all, - clippy::await_holding_lock, - clippy::char_lit_as_u8, - clippy::checked_conversions, - clippy::dbg_macro, - clippy::debug_assert_with_mut_call, - clippy::doc_markdown, - clippy::empty_enum, - clippy::enum_glob_use, - clippy::exit, - clippy::expl_impl_clone_on_copy, - clippy::explicit_deref_methods, - clippy::explicit_into_iter_loop, - clippy::fallible_impl_from, - clippy::filter_map_next, - clippy::flat_map_option, - clippy::float_cmp_const, - clippy::fn_params_excessive_bools, - clippy::from_iter_instead_of_collect, - clippy::if_let_mutex, - clippy::implicit_clone, - clippy::imprecise_flops, - clippy::inefficient_to_string, - clippy::invalid_upcast_comparisons, - clippy::large_digit_groups, - clippy::large_stack_arrays, - clippy::large_types_passed_by_value, - clippy::let_unit_value, - clippy::linkedlist, - clippy::lossy_float_literal, - clippy::macro_use_imports, - clippy::manual_ok_or, - clippy::map_err_ignore, - clippy::map_flatten, - clippy::map_unwrap_or, - clippy::match_on_vec_items, - clippy::match_same_arms, - clippy::match_wild_err_arm, - clippy::match_wildcard_for_single_variants, - clippy::mem_forget, - clippy::mismatched_target_os, - clippy::missing_enforced_import_renames, - clippy::mut_mut, - clippy::mutex_integer, - clippy::needless_borrow, - clippy::needless_continue, - clippy::needless_for_each, - clippy::option_option, - clippy::path_buf_push_overwrite, - clippy::ptr_as_ptr, - clippy::rc_mutex, - clippy::ref_option_ref, - clippy::rest_pat_in_fully_bound_structs, - clippy::same_functions_in_if_condition, - clippy::semicolon_if_nothing_returned, - clippy::single_match_else, - clippy::string_add_assign, - clippy::string_add, - clippy::string_lit_as_bytes, - clippy::string_to_string, - clippy::todo, - clippy::trait_duplication_in_bounds, - clippy::unimplemented, - clippy::unnested_or_patterns, - clippy::unused_self, - clippy::useless_transmute, - clippy::verbose_file_reads, - clippy::zero_sized_map_values, - future_incompatible, - nonstandard_style, - rust_2018_idioms -)] -// END - Embark standard lints v6 for Rust 1.55+ -// crate-specific exceptions: - /// Error types pub mod error; pub mod expression; @@ -539,7 +459,7 @@ pub fn exception_id(name: &str) -> Option { /// the license and exception identifiers are sourced from /// /// ``` -/// assert_eq!(spdx::license_version(), "3.24.0"); +/// assert_eq!(spdx::license_version(), "3.25.0"); /// ``` #[inline] #[must_use] diff --git a/src/text.rs b/src/text.rs index addb90d..342e304 100644 --- a/src/text.rs +++ b/src/text.rs @@ -354,6 +354,8 @@ pub const LICENSE_TEXTS: &[(&str, &str)] = &[ ("DRL-1.0", include!("text/licenses/DRL-1.0")), ("DRL-1.1", include!("text/licenses/DRL-1.1")), ("DSDP", include!("text/licenses/DSDP")), + ("DocBook-Schema", include!("text/licenses/DocBook-Schema")), + ("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")), @@ -538,6 +540,7 @@ pub const LICENSE_TEXTS: &[(&str, &str)] = &[ ("Glulxe", include!("text/licenses/Glulxe")), ("Graphics-Gems", include!("text/licenses/Graphics-Gems")), ("Gutmann", include!("text/licenses/Gutmann")), + ("HIDAPI", include!("text/licenses/HIDAPI")), ("HP-1986", include!("text/licenses/HP-1986")), ("HP-1989", include!("text/licenses/HP-1989")), ("HPND", include!("text/licenses/HPND")), @@ -560,6 +563,7 @@ pub const LICENSE_TEXTS: &[(&str, &str)] = &[ "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")), ( @@ -876,6 +880,7 @@ pub const LICENSE_TEXTS: &[(&str, &str)] = &[ ("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")), @@ -936,6 +941,7 @@ pub const LICENSE_TEXTS: &[(&str, &str)] = &[ ("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", @@ -963,6 +969,7 @@ pub const LICENSE_TEXTS: &[(&str, &str)] = &[ "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")), @@ -1252,6 +1259,10 @@ pub const EXCEPTION_TEXTS: &[(&str, &str)] = &[ "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", @@ -1274,6 +1285,10 @@ pub const EXCEPTION_TEXTS: &[(&str, &str)] = &[ "openvpn-openssl-exception", include!("text/exceptions/openvpn-openssl-exception"), ), + ( + "romic-exception", + include!("text/exceptions/romic-exception"), + ), ( "stunnel-exception", include!("text/exceptions/stunnel-exception"), diff --git a/src/text/exceptions/erlang-otp-linking-exception b/src/text/exceptions/erlang-otp-linking-exception new file mode 100644 index 0000000..b7f99db --- /dev/null +++ b/src/text/exceptions/erlang-otp-linking-exception @@ -0,0 +1,12 @@ +r#"If you modify this Program, or any covered work, by linking or +combining it with runtime libraries of Erlang/OTP as released by +Ericsson on https://www.erlang.org (or a modified version of these +libraries), containing parts covered by the terms of the Erlang Public +License (https://www.erlang.org/EPLICENSE), the licensors of this +Program grant you additional permission to convey the resulting work +without the need to license the runtime libraries of Erlang/OTP under +the GNU Affero General Public License. Corresponding Source for a +non-source form of such a combination shall include the source code +for the parts of the runtime libraries of Erlang/OTP used as well as +that of the covered work. +"# \ No newline at end of file diff --git a/src/text/exceptions/romic-exception b/src/text/exceptions/romic-exception new file mode 100644 index 0000000..cadf747 --- /dev/null +++ b/src/text/exceptions/romic-exception @@ -0,0 +1,7 @@ +r#"Additional permission under the GNU Affero GPL version 3 section 7: + +If you modify this Program, or any covered work, by linking or +combining it with other code, such other code is not for that reason +alone subject to any of the requirements of the GNU Affero GPL +version 3. +"# \ No newline at end of file diff --git a/src/text/licenses/DocBook-Schema b/src/text/licenses/DocBook-Schema new file mode 100644 index 0000000..cf067bf --- /dev/null +++ b/src/text/licenses/DocBook-Schema @@ -0,0 +1,23 @@ +r#"Copyright 1992-2011 HaL Computer Systems, Inc., +O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software +Corporation, Norman Walsh, Sun Microsystems, Inc., and the +Organization for the Advancement of Structured Information +Standards (OASIS). + +Permission to use, copy, modify and distribute the DocBook schema +and its accompanying documentation for any purpose and without fee +is hereby granted in perpetuity, provided that the above copyright +notice and this paragraph appear in all copies. The copyright +holders make no representation about the suitability of the schema +for any purpose. It is provided "as is" without expressed or implied +warranty. + +If you modify the DocBook schema in any way, label your schema as a +variant of DocBook. See the reference documentation +(http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook) +for more information. + +Please direct all questions, bug reports, or suggestions for changes +to the docbook@lists.oasis-open.org mailing list. For more +information, see http://www.oasis-open.org/docbook/. +"# \ No newline at end of file diff --git a/src/text/licenses/DocBook-XML b/src/text/licenses/DocBook-XML new file mode 100644 index 0000000..1c66196 --- /dev/null +++ b/src/text/licenses/DocBook-XML @@ -0,0 +1,49 @@ +r#"Copyright +--------- +Copyright (C) 1999-2007 Norman Walsh +Copyright (C) 2003 Jiří Kosek +Copyright (C) 2004-2007 Steve Ball +Copyright (C) 2005-2014 The DocBook Project +Copyright (C) 2011-2012 O'Reilly Media + +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. + +Except as contained in this notice, the names of individuals +credited with contribution to this software shall not be used in +advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization +from the individuals in question. + +Any stylesheet derived from this Software that is publically +distributed will be identified with a different name and the +version strings in any derived Software will be changed so that +no possibility of confusion between the derived package and this +Software will exist. + +Warranty +-------- +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 NORMAN WALSH OR ANY OTHER +CONTRIBUTOR 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. + +Contacting the Author +--------------------- +The DocBook XSL stylesheets are maintained by Norman Walsh, +, and members of the DocBook Project, + +"# \ No newline at end of file diff --git a/src/text/licenses/HIDAPI b/src/text/licenses/HIDAPI new file mode 100644 index 0000000..adb6872 --- /dev/null +++ b/src/text/licenses/HIDAPI @@ -0,0 +1,3 @@ +r#"This software may be used by anyone for any reason so long +as the copyright notice in the source files remains intact. +"# \ No newline at end of file diff --git a/src/text/licenses/HPND-Netrek b/src/text/licenses/HPND-Netrek new file mode 100644 index 0000000..b2af1ef --- /dev/null +++ b/src/text/licenses/HPND-Netrek @@ -0,0 +1,11 @@ +r#"Copyright (C) 1995 S. M. Patel (smpatel@wam.umd.edu) + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation. No representations are made about the +suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. +"# \ No newline at end of file diff --git a/src/text/licenses/Ruby-pty b/src/text/licenses/Ruby-pty new file mode 100644 index 0000000..1c9b5bd --- /dev/null +++ b/src/text/licenses/Ruby-pty @@ -0,0 +1,11 @@ +r#"(c) Copyright 1998 by Akinori Ito. + +This software may be redistributed freely for this purpose, in full +or in part, provided that this entire copyright notice is included +on any copies of this software and applications and derivations thereof. + +This software is provided on an "as is" basis, without warranty of any +kind, either expressed or implied, as to any matter including, but not +limited to warranty of fitness of purpose, or merchantability, or +results obtained from use of this software. +"# \ No newline at end of file diff --git a/src/text/licenses/Ubuntu-font-1.0 b/src/text/licenses/Ubuntu-font-1.0 new file mode 100644 index 0000000..732d9cc --- /dev/null +++ b/src/text/licenses/Ubuntu-font-1.0 @@ -0,0 +1,97 @@ +r#"------------------------------- +UBUNTU FONT LICENCE Version 1.0 +------------------------------- + +PREAMBLE +This licence allows the licensed fonts to be used, studied, modified and +redistributed freely. The fonts, including any derivative works, can be +bundled, embedded, and redistributed provided the terms of this licence +are met. The fonts and derivatives, however, cannot be released under +any other licence. The requirement for fonts to remain under this +licence does not require any document created using the fonts or their +derivatives to be published under this licence, as long as the primary +purpose of the document is not to be a vehicle for the distribution of +the fonts. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this licence and clearly marked as such. This may +include source files, build scripts and documentation. + +"Original Version" refers to the collection of Font Software components +as received under this licence. + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to +a new environment. + +"Copyright Holder(s)" refers to all individuals and companies who have a +copyright ownership of the Font Software. + +"Substantially Changed" refers to Modified Versions which can be easily +identified as dissimilar to the Font Software by users of the Font +Software comparing the Original Version with the Modified Version. + +To "Propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification and with or without charging +a redistribution fee), making available to the public, and in some +countries other activities as well. + +PERMISSION & CONDITIONS +This licence does not grant any rights under trademark law and all such +rights are reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of the Font Software, to propagate the Font Software, subject to +the below conditions: + +1) Each copy of the Font Software must contain the above copyright +notice and this licence. These can be included either as stand-alone +text files, human-readable headers or in the appropriate machine- +readable metadata fields within text or binary files as long as those +fields can be easily viewed by the user. + +2) The font name complies with the following: +(a) The Original Version must retain its name, unmodified. +(b) Modified Versions which are Substantially Changed must be renamed to +avoid use of the name of the Original Version or similar names entirely. +(c) Modified Versions which are not Substantially Changed must be +renamed to both (i) retain the name of the Original Version and (ii) add +additional naming elements to distinguish the Modified Version from the +Original Version. The name of such Modified Versions must be the name of +the Original Version, with "derivative X" where X represents the name of +the new work, appended to that name. + +3) The name(s) of the Copyright Holder(s) and any contributor to the +Font Software shall not be used to promote, endorse or advertise any +Modified Version, except (i) as required by this licence, (ii) to +acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with +their explicit written permission. + +4) The Font Software, modified or unmodified, in part or in whole, must +be distributed entirely under this licence, and must not be distributed +under any other licence. The requirement for fonts to remain under this +licence does not affect any document created using the Font Software, +except any version of the Font Software extracted from a document +created using the Font Software may only be distributed under this +licence. + +TERMINATION +This licence becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER +DEALINGS IN THE FONT SOFTWARE. +"# \ No newline at end of file diff --git a/src/text/licenses/X11-swapped b/src/text/licenses/X11-swapped new file mode 100644 index 0000000..92a779c --- /dev/null +++ b/src/text/licenses/X11-swapped @@ -0,0 +1,24 @@ +r#"Copyright (c) 2008-2010 Derick Eddington. All rights reserved. + +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. + +Except as contained in this notice, the name(s) of the above copyright +holders shall not be used in advertising or otherwise to promote the sale, +use or other dealings in this Software without prior written authorization. + +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. +"# \ No newline at end of file