16

Let's say Alice has Project A, which is licenced under the AGPL, and Bob has Project B, which is also licenced under AGPL.

Bob sees a function in Project A that looks very useful, and wants to copy it to Project B, citing the original source in a comment.

Can Bob do this, or is it against the terms of the AGPL?

4
  • Yes but be aware that you no longer will be able to relicense the combined work with a different license - which makes agpl projects often pointless.
    – eckes
    Jun 13, 2022 at 18:23
  • 8
    @eckes You say it's pointless, but that's exactly the point of the (A)GPL being a viral license: to prevent downstreams from placing your code under a more restrictive license. For many, that's what they want.
    – Cole Tobin
    Jun 13, 2022 at 19:37
  • Sure, but companies using agpl do that mostly to sell ommercial licenses to make money
    – eckes
    Jun 13, 2022 at 19:38
  • 7
    @eckes and individuals using AGPL do that mostly so companies can't sell commercial licenses to make money Jun 14, 2022 at 9:53

2 Answers 2

26

Put simply: yes, this is allowed. The entire point of open source software is to allow it to be re-used.

Note that the requirements are slightly more than "citing the original source in a comment", or at least the comment must have a very specific form in that it must:

  • "conspicuously and appropriately publish on each copy an appropriate copyright notice" (AGPL section 4); "an appropriate copyright notice" here means reproducing the copyright notice from the original.
  • "keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code" (section 4 again)
  • "keep intact all notices of the absence of any warranty" (section 4 again)
  • "give all recipients a copy of this License along with the Program" (section 4 again), although Bob will have been doing that anyway.
  • "The work must carry prominent notices stating that you modified it, and giving a relevant date." (section 5)
19

As Philip wrote: Yes, that's possible (subject to certain conditions, which I won't repeat here).

Do note, though, that this will make it harder for Bob to re-license his code with a different license in the future: As long as it's only his own code, he can distribute it under as many licenses as he wishes. For example, many projects offer both a free GPL version and, for a fee, a version without a copy-left requirement for inclusion in closed-source projects.

As soon as Bob includes AGPL'ed code written by Alice, this is no longer possible without getting permission from Alice.

1
  • We assume here Alice won't be fine with getting a cut from her contribution...
    – MrMesees
    Jun 14, 2022 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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