From 3a4033e67b6b9d1c1e9514bcb5c20ae05bf8391d Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Wed, 8 Dec 2021 11:48:54 +0200 Subject: [PATCH] Update docs and metadata for the WHATWG license change. --- COPYRIGHT | 5 +++++ Cargo.toml | 2 +- LICENSE-WHATWG | 26 ++++++++++++++++++++++++++ README.md | 24 ++++++++++++++++++++++-- 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 LICENSE-WHATWG diff --git a/COPYRIGHT b/COPYRIGHT index 2bcd8721..83d3ece1 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -8,5 +8,10 @@ at your option. All files in the project carrying such notice may not be copied, modified, or distributed except according to those terms. +This crate includes data derived from the data files supplied +with the WHATWG Encoding Standard, which, when incorporated into +source code, are licensed under the BSD 3-Clause License +. + Test code within encoding_rs is dedicated to the Public Domain when so designated (see the individual files for PD/CC0-dedicated sections). diff --git a/Cargo.toml b/Cargo.toml index 091bdd40..48df711b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "A Gecko-oriented implementation of the Encoding Standard" version = "0.8.29" edition = '2018' authors = ["Henri Sivonen "] -license = "Apache-2.0 OR MIT" +license-file = "COPYRIGHT" readme = "README.md" documentation = "https://docs.rs/encoding_rs/" homepage = "https://docs.rs/encoding_rs/" diff --git a/LICENSE-WHATWG b/LICENSE-WHATWG new file mode 100644 index 00000000..f690e719 --- /dev/null +++ b/LICENSE-WHATWG @@ -0,0 +1,26 @@ +Copyright © WHATWG (Apple, Google, Mozilla, Microsoft). + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 927a448e..fbf8fffe 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![Build Status](https://travis-ci.org/hsivonen/encoding_rs.svg?branch=master)](https://travis-ci.org/hsivonen/encoding_rs) [![crates.io](https://img.shields.io/crates/v/encoding_rs.svg)](https://crates.io/crates/encoding_rs) [![docs.rs](https://docs.rs/encoding_rs/badge.svg)](https://docs.rs/encoding_rs/) -[![Apache 2 / MIT dual-licensed](https://img.shields.io/badge/license-Apache%202%20%2F%20MIT-blue.svg)](https://github.com/hsivonen/encoding_rs/blob/master/COPYRIGHT) encoding_rs an implementation of the (non-JavaScript parts of) the [Encoding Standard](https://encoding.spec.whatwg.org/) written in Rust and @@ -112,9 +111,23 @@ characters. Vietnamese tone marks can be decomposed using the ## Licensing +TL;DR: ((Apache-2.0 OR MIT) AND BSD-3-Clause) for the code and data combination, +but [crates.io doesn't support +parentheses](https://github.com/rust-lang/crates.io/issues/2595), so the crate +metadata points to a custom file. + Please see the file named [COPYRIGHT](https://github.com/hsivonen/encoding_rs/blob/master/COPYRIGHT). +The non-test code that isn't generated from the WHATWG data in this crate is +under Apache-2.0 OR MIT. Test code is under CC0. + +This crate contains code/data generated from WHATWG-supplied data. The WHATWG +upstream changed its license for portions of specs incorporated into source code +from CC0 to BSD-3-Clause between the initial release of this crate and the present +version of this crate. The in-source licensing legends have been updated for the +parts of the generated code that have changed since the upstream license change. + ## Documentation Generated [API documentation](https://docs.rs/encoding_rs/) is available @@ -388,7 +401,10 @@ To regenerate the generated code: next to the `encoding_rs` directory. * Clone [`https://github.com/whatwg/encoding`](https://github.com/whatwg/encoding) next to the `encoding_rs` directory. - * Checkout revision `f381389` of the `encoding` repo. + * Checkout revision `be3337450e7df1c49dca7872153c4c4670dd8256` of the `encoding` repo. + (Note: `f381389` was the revision of `encoding` used from before the `encoding` repo + license change. So far, only output changed since then has been updated to + the new license legend.) * With the `encoding_rs` directory as the working directory, run `python generate-encoding-data.py`. @@ -431,6 +447,10 @@ To regenerate the generated code: ## Release Notes +### 0.8.30 + +* Update the licensing information to take into account the WHATWG data license change. + ### 0.8.29 * Make the parts that use an allocator optional.