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

Set Apache 2.0 OR BSD-3-Clause licenses in all crates #235

Merged
merged 6 commits into from
Oct 27, 2022
Merged

Set Apache 2.0 OR BSD-3-Clause licenses in all crates #235

merged 6 commits into from
Oct 27, 2022

Conversation

stefano-garzarella
Copy link
Member

@stefano-garzarella stefano-garzarella commented Oct 14, 2022

Summary of the PR

  • Fix SPDX headers of gpio, i2c, and rng crates
  • Update crates' readme with the licenses

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR are signed (with git commit -s), and the commit
    message has max 60 characters for the summary and max 75 characters for each
    description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • Any newly added unsafe code is properly documented.

vireshk
vireshk previously approved these changes Oct 14, 2022
@andreeaflorescu
Copy link
Member

This is the opposite of what we were working on doing with vmm-sys-util (rust-vmm/vmm-sys-util#161) because it makes the crates virtually impossible to use from code that is licensed under GPLv3 and similar licenses. What is the reason behind this change?

Are you sure that none of the code from these crates originated from BSD-3-Clause projects? One example here might be Crosvm as it was used as a starting point for multiple projects.

@stefano-garzarella
Copy link
Member Author

This is the opposite of what we were working on doing with vmm-sys-util (rust-vmm/vmm-sys-util#161) because it makes the crates virtually impossible to use from code that is licensed under GPLv3 and similar licenses. What is the reason behind this change?

@vireshk suggested to uniform them.
gpio, i2c, and rng code already had only Apache-2.0 in the SPDX headers.

Since they are executable, I'm not sure if we can have the same issues, but for example for vsock we would like to create a library, so maybe your point is valid and it's better to leave also BSD.

What we should do for gpio, i2c, and rng?

Are you sure that none of the code from these crates originated from BSD-3-Clause projects? One example here might be Crosvm as it was used as a starting point for multiple projects.

For vsock yes.

@stefano-garzarella
Copy link
Member Author

stefano-garzarella commented Oct 14, 2022

On second thought, I think @andreeaflorescu's point is a good point.

So, If everyone agrees, maybe we could do what we did in rust-vmm/vmm-sys-util#161 and just use BSD-3.

For vsock should be okay (@harshanavkis can you confirm?)

For other crates, @stsquad @vireshk @mathieupoirier what do you think?

@vireshk
Copy link
Collaborator

vireshk commented Oct 14, 2022

I am fine with that. I just feel they should all be consistent. That's all.

@stsquad
Copy link
Collaborator

stsquad commented Oct 17, 2022

I'm agnostic - whichever open source license makes most sense for the project. I didn't realise Apache 2.0 interacted badly with GPLv3. If the BSD 3 clause is the most liberal then lets do that.

@andreeaflorescu
Copy link
Member

I'm agnostic - whichever open source license makes most sense for the project. I didn't realise Apache 2.0 interacted badly with GPLv3. If the BSD 3 clause is the most liberal then lets do that.

The licensed we proposed for all crates in rust-vmm is Apache 2.0 OR BSD-3-Clause. If this can be used (i.e. if there are no problems with using Apache 2.0 as well), I think this should be the preferred one. This gives the most flexibility in terms of usage.

@vireshk
Copy link
Collaborator

vireshk commented Oct 18, 2022

The licensed we proposed for all crates in rust-vmm is Apache 2.0 OR BSD-3-Clause. If this can be used (i.e. if there are no problems with using Apache 2.0 as well), I think this should be the preferred one. This gives the most flexibility in terms of usage.

@stefano-garzarella I think you can update your patches with both these licenses now, so we can merge it.

@stefano-garzarella
Copy link
Member Author

The licensed we proposed for all crates in rust-vmm is Apache 2.0 OR BSD-3-Clause. If this can be used (i.e. if there are no problems with using Apache 2.0 as well), I think this should be the preferred one. This gives the most flexibility in terms of usage.

@stefano-garzarella I think you can update your patches with both these licenses now, so we can merge it.

Okay, but should we ask to all authors to agree on that?

This is the current situation (without this PR):

  • gpio / i2c / rng
    • Cargo.toml: license = "Apache-2.0 OR BSD-3-Clause"
    • Source files: SPDX-License-Identifier: Apache-2.0
  • vsock
    • Cargo.toml: license = "Apache-2.0 OR BSD-3-Clause"
    • Source files: SPDX-License-Identifier: Apache-2.0 or BSD-3-Clause

So vsock should be fine, but in the others we sould change the SPDX tag in the source files.
Since there was discrepancy, could it be a simple fix?

@andreeaflorescu
Copy link
Member

So vsock should be fine, but in the others we sould change the SPDX tag in the source files. Since there was discrepancy, could it be a simple fix?

For the vmm-sys-util update we asked for one approval from each company that contributed significant code there to simplify the required approvals.

@vireshk
Copy link
Collaborator

vireshk commented Oct 18, 2022

Okay, but should we ask to all authors to agree on that?

This is the current situation (without this PR):

  • gpio / i2c / rng

    • Cargo.toml: license = "Apache-2.0 OR BSD-3-Clause"
    • Source files: SPDX-License-Identifier: Apache-2.0

gpio/i2c are from me and rng is from @mathieupoirier. I think he will be fine with the changes, as we kept things similar to how it was done for the the first device merged, i.e. i2c.

  • vsock

    • Cargo.toml: license = "Apache-2.0 OR BSD-3-Clause"
    • Source files: SPDX-License-Identifier: Apache-2.0 or BSD-3-Clause

So vsock should be fine, but in the others we sould change the SPDX tag in the source files.

Right, so all of them are fine I think. At best, I can wait for both Mathieu and Alex to approve the changes before merging.

Since there was discrepancy, could it be a simple fix?

Yeah, I think you can just all this in the same commit.

@stefano-garzarella
Copy link
Member Author

Okay, so an ack from @vireshk and @mathieupoirier should be fine :-)

About BSD-3-clause, I'll add a LICENSE-BSD-3-Clause in the root.
Is it okay if I use "The rust-vmm authors" as copyright owner?

@vireshk
Copy link
Collaborator

vireshk commented Oct 18, 2022

Is it okay if I use "The rust-vmm authors" as copyright owner?

In rust file headers ? They shouldn't be updated I believe, just the licensing part should be enough.

@stefano-garzarella
Copy link
Member Author

Is it okay if I use "The rust-vmm authors" as copyright owner?

In rust file headers ? They shouldn't be updated I believe, just the licensing part should be enough.

Nope, I mean in the new LICENSE-BSD-3-Clause file in the root.
It can't be generic, and we should fill the Copyright <YEAR> <COPYRIGHT HOLDER>: https://opensource.org/licenses/BSD-3-Clause.

My idea is to add Copyright 2022 The rust-vmm authors in the new LICENSE-BSD-3-Clause file in the workspace root, and leave the copyright intact in the various files, that should be fine, right?

Then if a crate doesn't want that copyright, it can redefine a LICENSE-BSD-3-Clause file in the crate itself.

We forgot to update the License section in the readme
template. So, let's specify that vsock crate is licensed
under Apache 2.0 OR BSD-3-Clause.

Signed-off-by: Stefano Garzarella <[email protected]>
Cargo.toml defines `license = "Apache-2.0 OR BSD-3-Clause"`,
so let's update the SPDX in source files and add a section
in the readme about the license.

Signed-off-by: Stefano Garzarella <[email protected]>
Cargo.toml defines `license = "Apache-2.0 OR BSD-3-Clause"`,
so let's update the SPDX in source files and add a section
in the readme about the license.

Signed-off-by: Stefano Garzarella <[email protected]>
Cargo.toml defines `license = "Apache-2.0 OR BSD-3-Clause"`,
so let's update the SPDX in source files and add a section
in the readme about the license.

Signed-off-by: Stefano Garzarella <[email protected]>
@vireshk
Copy link
Collaborator

vireshk commented Oct 18, 2022

Nope, I mean in the new LICENSE-BSD-3-Clause file in the root. It can't be generic, and we should fill the Copyright <YEAR> <COPYRIGHT HOLDER>: https://opensource.org/licenses/BSD-3-Clause.

My idea is to add Copyright 2022 The rust-vmm authors in the new LICENSE-BSD-3-Clause file in the workspace root, and leave the copyright intact in the various files, that should be fine, right?

Then if a crate doesn't want that copyright, it can redefine a LICENSE-BSD-3-Clause file in the crate itself.

I am not the right guy to decide on that.

Whatever @andreeaflorescu says is fine :)

@andreeaflorescu
Copy link
Member

I think generic rust-vmm authors works best because then we don't need to add a lot of copyrights. This was suggested by someone else in the past, I forgot though who. I like the proposal <3

@stefano-garzarella
Copy link
Member Author

I think generic rust-vmm authors works best because then we don't need to add a lot of copyrights. This was suggested by someone else in the past, I forgot though who. I like the proposal <3

Maybe we can add this also in https://github.com/rust-vmm/crate-template where we have only the Apache-2.0 license file.
I'll send a PR.

@stefano-garzarella stefano-garzarella changed the title Set Apache-2.0 license in all crates Set Apache 2.0 OR BSD-3-Clause licenses in all crates Oct 18, 2022
@stefano-garzarella
Copy link
Member Author

v2:

  • rebased
  • added LICENSE-BSD-3-Clause
  • fixed SPDX (Apache 2.0 OR BSD-3-Clause) in gpio / i2c / rng
  • added License section in crates' readme

auto-merge was automatically disabled October 19, 2022 09:16

Merge commits are not allowed on this repository

@vireshk
Copy link
Collaborator

vireshk commented Oct 19, 2022

@mathieupoirier can review and merge this now.

@vireshk
Copy link
Collaborator

vireshk commented Oct 27, 2022

@mathieupoirier can review and merge this now.

@mathieupoirier can you have a look at this ? We are waiting for you to merge it :)

@mathieupoirier mathieupoirier merged commit 8e1fb7e into rust-vmm:main Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants