Fix and clarify license in crate metadata and add missing license files #1308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am responsible for packaging some crates from this project for Fedora Linux, and have noticed that there are some issues with the license metadata / missing license files in published crates. I see that there are also reported issues for this (#912, #972, #1249), and attempted to fix the issues reported there, and some issues I noticed myself:
It appears that the project was intentionally relicensed from BSD-3-Clause to Apache-2.0 in commit d81a895, but this was, at least in part, not updated in crate metadata. This results in crates.io and tools like cargo-license to show the wrong license for some crates in this project. To address this, I adapted the
package.license
field in Cargo.toml files for thenalgebra
, andnalgebra-glm
accordingly.The
nalgebra-lapack
crate is MIT licensed (there is a license file for the MIT license included, and the documentation agrees), but the crate metadata claims the crate isBSD-3-Clause
licensed. Maybe this is a copy-paste error from when the crate was originally imported? To address this discrepancy, I changed thepackage.license
field in Cargo.toml fromBSD-3-Clause
toMIT
.One of the terms of the Apache-2.0 license is that any (re)distributed sources contain a copy of the license text. This is currently not the case for the
nalgebra-glm
,nalgebra-macros
, andnalgebra-sparse
crates. This is problematic for Linux distributions that package these crates, and potentially also for publishing them on crates.io. Adding a symbolic link to the LICENSE file from the project's root directory should causecargo package
/cargo publish
to properly include this file when publishing.