rsocket / rsocket-cpp

C++ implementation of RSocket
http://rsocket.io
Apache License 2.0
253 stars 99 forks source link

Relicense RSocket to ASLv2 #870

Closed stevegury closed 6 years ago

stevegury commented 6 years ago

In order to move the project to CNCF, we need to update the license of the library from BSD to ASLv2.

This PR only modified the license headers of every file as well as the root LICENSE file. There was no code modification other than removing any trailing whitespace.

For the record, here is the script I used:

#!/usr/bin/env python3

import os
import fileinput

OLD_LICENSE = "// Copyright 2004-present Facebook. All Rights Reserved.\n"
NEW_LICENSE = """// Copyright (c) Facebook, Inc. and its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License."""

EXTENSIONS = ['.h', '.cpp', '.cc']

for (path, dirnames, filenames) in os.walk('.'):
    for filename in filenames:
        ext = os.path.splitext(filename)[1]
        if ext in EXTENSIONS:
            f = os.path.join(path, filename)
            for line in fileinput.input(f, inplace=True):
                if line == OLD_LICENSE:
                    print(NEW_LICENSE)
                else:
                    print(line.rstrip())
vinc3m1 commented 5 years ago

Was it intentional keep the PATENTS file during this change?

stevegury commented 5 years ago

@vinc3m1 it wasn't intentional. I'm not very familiar with the licensing world of open-source, but does the PATENTS file has anything to do with the license?

vinc3m1 commented 5 years ago

I'm also not familiar with the detailed implications, but it complicates things enough that having the file in source is limiting our ability to use it currently.

IANAL, but while the license itself doesn't reference the PATENTS file, the PATENTS file still exists when someone pulls the source code and the language in the PATENTS file doesn't indicate that it's conditionally applicable to only the BSD License. It does however contain language around patents that conflicts directly with ASLv2, so I have no idea how that would be interpreted.

Either way, seems like the easiest path here is to simply delete the PATENTS file to avoid any potential for legal ambiguity since that was the original intent anyway.

lexs commented 5 years ago

@vinc3m1 Let us verify that it's fine to delete on Monday, not expecting any problems here.

Also, curious what you're looking to use rsocket for?

vinc3m1 commented 5 years ago

Sounds good, Monday is fine, thanks! We're currently trying out some Flipper integration for debugging Litho layouts.

appleguy commented 5 years ago

Awesome, thanks for looking into this. If rsocket is Apache 2 without the PATENTS file (as a number of other FB projects have shifted to recently), this would open up a pretty cool new use case for Flipper :).

lexs commented 5 years ago

It sounds like we're good but waiting for final confirmation.

lexs commented 5 years ago

All good, landing https://github.com/rsocket/rsocket-cpp/pull/874 now, should sync in an hour or so.

vinc3m1 commented 5 years ago

awesome, thanks @lexs!

stevegury commented 5 years ago

Thank you @lexs for taking care of that!