elastic / ebpf

Elastic's eBPF
Other
67 stars 11 forks source link

Disambiguate licensing to GPL 2.0 only #58

Closed rhysre closed 2 years ago

rhysre commented 2 years ago

There were two problems with the license headers as things stood:

This commit changes all the SPDX "GPL-2.0" headers to "GPL-2.0-only" and removes the longer GPL header comments entirely. It seems the FSF doesn't have a version that states GPL 2/3 only and the license is stated in the SPDX identifier (and LICENSE file ) anyways, so it's redundant.

CC: @stanek-michal you last changed licensing in a major way (dbca96c1173d09bee9ffca915f8f7bcdc0bad40b) so want your sign-off on this before I merge.

This PR also updates the LicenseRef-Elastic-License-2.0 SPDX identifiers to simply Elastic-2.0, since it's now officially part of the SPDX spec.

stanek-michal commented 2 years ago

As for the switch from GPL-2.0 to GPL-2.0-only, I think it's fine. But I think we probably still want a copyright notice in each file, which is a separate thing from the license. Perhaps we can make it a single line below the SPDX identifier? Something like:

// SPDX-License-Identifier: GPL-2.0-only
// Copyright 2021 Elasticsearch BV

or

// SPDX-License-Identifier: GPL-2.0-only

// Copyright 2021 Elasticsearch BV
rhysre commented 2 years ago

As for the switch from GPL-2.0 to GPL-2.0-only, I think it's fine. But I think we probably still want a copyright notice in each file, which is a separate thing from the license. Perhaps we can make it a single line below the SPDX identifier? Something like:

// SPDX-License-Identifier: GPL-2.0-only
// Copyright 2021 Elasticsearch BV

or

// SPDX-License-Identifier: GPL-2.0-only

// Copyright 2021 Elasticsearch BV

Sounds good, thanks for the pointer Michal.

Added short copyright notices back to all the files I stripped the GPLified copyright notice from.

stanek-michal commented 2 years ago

Why is the bulk of the GPL text removed from each file?

Rhys mentioned that the GNU website didn't have a GPL-2-only variant of the license disclaimer text. I was wondering if a single SPDX line was enough and I found this article on LWN:

https://lwn.net/Articles/739183/

An additional goal is to eventually get rid of the other license texts; the consensus seems to be that the SPDX identifier is a sufficient declaration of the license on its own.

The article mentions that there are a lot of variations of that license disclaimer and that a unified SPDX identifier solves the confusion.

This article on gnu.org mentions the license notice but it doesn't say anything about SPDX so it was probably written before that.

No strong opinions here though, not sure if Legal had any specific requirements about the GPL notices.

ferullo commented 2 years ago

@gtback do you have any insight into how the GPL headers should be marked?

gtback commented 2 years ago

@gtback do you have any insight into how the GPL headers should be marked?

@ferullo @rhysre I'll double-check in our Open Source Working Group meeting, but I am hopeful that just the SPDX tag will be sufficient.

If with go with the SPDX format, we can consider using SPDX-FileCopyrightText: for the copyright statement (SPDX standard) to make this data more machine-parseable going forward.

I likewise was unable to find a "GPL-2.0-only" file header, but will look around more to see what other projects are doing.

gtback commented 2 years ago

I likewise was unable to find a "GPL-2.0-only" file header, but will look around more to see what other projects are doing.

Of course, as soon as I said this I looked at the SPDX site and found this (under "Standard License Header" at the bottom):

Copyright (C) yyyy name of author

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

rhysre commented 2 years ago

I likewise was unable to find a "GPL-2.0-only" file header, but will look around more to see what other projects are doing.

Of course, as soon as I said this I looked at the SPDX site and found this (under "Standard License Header" at the bottom):

Copyright (C) yyyy name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Oh fantastic, didn't see that on the SPDX website because it was hiding at the bottom. I added back the long-form GPL headers that say GPLv2 only so we can keep the existing style and just correct the v2/v3 error. Thanks for pointing that out Greg.

rhysre commented 2 years ago

LGTM but needs a rebase. Thanks for looking into this @rhysre

Done. I also pushed another commit changing all LicenseRef-Elastic-License-2.0 SPDX headers to simply Elastic-2.0 since it's now officially a part of the SPDX spec as @gtback stated above.

@ferullo Can I get a +1 for you to unblock merge?