MPL v2 and AGPL v3 license question

Some one wants to copy a couple of cool features from bahmni components to the reference application modules and modify the copied code a bit. Since the reference application modules are distributed under the MPL v2 license, does the AGPL v3 license allow such? Are there any issues that this person should take note of, while doing so?

2 Likes

AGPL is more copyleft than MPL. As a general rule, if you copy-and-modify AGPLv3 code, the result must still have an AGPLv3 license. So, no, in general it is not okay to take Bahmni code and add it to the reference application (without changing the license of the refapp module in question).

From Mozilla Public License - Wikipedia

… when code under version [MPL[ 2.0 or later is combined with separate code files under … GNU Affero GPL (AGPL)… In this case, the program as a whole will be under the [AGPL] license, but the MPL-covered files will be dual-licensed, so that recipients can choose to distribute them under that GNU License or the MPL.

One possible workaround is that it should be possible to have an AGPLv3-licensed module running in OpenMRS without needing to affect the rest of the OpenMRS licensing. E.g. if someone wanted to copy some bahmni components into a “somebahmnicomponents” module. :slight_smile:

Another possible workaround is that the Bahmni coalition could agree to dual-license some Bahmni code under MPL for inclusion in OpenMRS.

Could you give a bit more detail? What sorts of components are we talking about? An entire large feature? Just a few widgets? Something that could be used as a library, i.e. without actually needing to copy-paste the code?

Thanks @darius for the detailed explanation! :slight_smile:

They wanted to start with the bahmni appointments module.

1 Like

So, maybe what they can do is copy-paste-edit the relevant UI components into a new OWA, and this OWA would have its code licensed as AGPLv3. We probably wouldn’t distribute this as part of the reference application, but it could be an “approved addon” or something like that.

And of course anyone would be able to use it without any license complications.

1 Like