I am new to use open source project code and as well as the license. I have do some searching about the source code use cases along with the source code license, but mostly i found is about the definition of the license or here. I want to ask if my below use cases is correct without problem?

Let say I download and use a GitHub source which use Apache License as a component on my software for commercial, and my software will be distributed to my users.

  1. without modify the source and add my new License:
./myProject/wholeGitHubDownloadedSource/(notMycode1.js, notMycode2.js, License.txt)
./myProject/(myCode1.js, myCode2.js, myNewCreatedLicense.txt)

In the License.txt

"Copyright [yyyy] [name of copyright owner] SPDX-License-Identifier: Apache-2.0".

And since I do not modify the downloaded source, in myNewCreatedLicense.txt

"Copyright [yyyy] [my name]. All rights reserved."

Is this case is good to go and I can distribute the whole /myProject software for commercial and sell?

  1. delete some of the source and add my new License:
./myProject/wholeGitHubDownloadedSource/(notMycode1.js, License.txt)
./myProject/(myCode1.js, myCode2.js, myNewCreatedLicense.txt)

GitHub source always contains many files, I am not sure if delete some of the files count as modified. In this case, I deleted (notMycode2.js) in the downloaded source folder.

In myNewCreatedLicense.txt:

"Copyright [yyyy] [my name]. All rights reserved."

Is this case is good to go and distribute? If not, and I need to add modified notice in the License.txt or myNewCreatedLicense.txt?

Then what should I type about this modified?

  1. modify the source and add my new License.
./myProject/wholeGitHubDownloadedSource/(modifiedNotMycode1.js, License.txt)
./myProject/(myCode1.js, myCode2.js, myNewCreatedLicense.txt)

In this case, should I put the modified notice in License.txt or myNewCreatedLicense.txt? And what should I type about this modified?


Modification, deletion or addition of any file to a source code counts as modification of the source code as a whole. Thus in that case you are bound by what is allowed by the original license when it comes to distributing modified versions of the software and the source code.

When making modifications and distributing them, the Apache license in particular requires, that you

  1. You must give any other recipients of the Work or Derivative Works a copy of this License; and

  2. You must cause any modified files to carry prominent notices stating that You changed the files; and

  3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
  4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.

ALL conditions apply simultaneously. In particular you may not remove the copyright notices and the license notice for the original code.

You are allowed to add your own copyright and own license for your own modifications - but you need to display the original ones, too. You need to make sure in your own license that all further derivatives also comply with the original license.

As to your question in detail:

Ad 1) of your question: you may not simply replace the copyright ownership as you gained no copyright. Just copying does not transfer ownership to you. That is a violation.

Ad 2) and 3) You may do so on the conditions stated above (and in the license).

Generally it's a good idea to actually read the licenses. They are not that hard to understand and not that long as the typical EULA of typical enterprises.

Not the answer you're looking for? Browse other questions tagged or ask your own question.