4

The question refers to Tomcat as an example, but it applies to any software that is licensed under Apache 2.0 and requires configuration through configuration files.

I am creating a Docker image for Tomcat that in principle looks like the following:

FROM some-centos-base-image:1.0

ARG TOMCAT_VERSION

RUN yum install -y tomcat-${TOMCAT_VERSION}

RUN mkdir -p /code/templates

COPY entrypoint.sh /root/entrypoint.sh
COPY templates/*.xml.template /root/templates/

ENTRYPOINT [ "/root/entrypoint.sh" ]

Where templates/ is a folder with templates for Tomcat configuration files, and entrypoint.sh is a script that simply renders the templates based on environment variables into Tomcat's configuration directory and starts Tomcat via catalina.sh run.

The configuration file templates are derived from the example configuration files that come bundled with Tomcat, and thus have the Apache 2.0 License notice header in them.

I am about to license my project using GPLv3, and am wondering how to approach these configuration file templates. The Apache 2.0 License seems pretty clear that configuration files are covered by it, so I believe I have to respect the license in my work.

My questions:

  • Am I right in that I need to respect the Apache 2.0 license in my derived project when the only part I've modified is configuration files? (if not, yay!)
  • If the above is true, how do I properly include both GPLv3 and Apache 2.0 notice headers and LICENSE files in my project?
  • How do I handle the NOTICE file that is required by Apache 2.0? It comes with the Tomcat RPM I install and could be dependant on Tomcat version, so it seems very strange to copy-paste a version of it into my repository.
  • If my Docker image did not include configuration file templates, and instead required configuration by mounts (like the official Tomcat image) does, would I be free from having to handle both GPLv3 and Apache 2.0?
  • Is there an example Open Source project I could refer to that is GPLv3 but includes Apache 2.0 software? As in one that has to deal with both licenses in terms of header notices, LICENSE files and so on.

1 Answer 1

3

Am I right in that I need to respect the Apache 2.0 license in my derived project when the only part I've modified is configuration files? (if not, yay!)

Unless explicitly stated elsewhere, these configuration files are indeed covered under the Apache-2.0 license. However, these licenses are compatible so they can be included.

The Free Software Foundation considers the Apache License, Version 2.0 to be a free software license, compatible with version 3 of the GPL...Apache 2 software can therefore be included in GPLv3 projects, because the GPLv3 license accepts our software into GPLv3 works. --Apache License v2.0 and GPL Compatibility

If the above is true, how do I properly include both GPLv3 and Apache 2.0 notice headers and LICENSE files in my project?

First, I would simply leave the Apache-2.0 headers in the templates alone. If you are modifying them in anyway, then perhaps you can add a comment underneath stating any changes. Note that since the licenses are compatible, your changes to these files would be under the original Apache-2.0 license.

Then, I would then copy the NOTICE file from Tomcat, and place it in your templates directory.

Next, per How to use GNU licenses for your own software, you should include a copy of the GPLv3 in a file named COPYING in the top-level directory for your project. Also, be sure to specify whether you are licensing as either GPL-3.0-only, or GPL-3.0-or-later.

Finally, in your README, add a statement regarding the licensing of the project.

## Licensing

This project is licensed under a GPLv3 license or (at your option) any later version. See `COPYING` for any terms and conditions.

This project makes use of several templates provided by the Apache Tomcat project. These files are licensed under an Apache-2.0 license. See `templates/NOTICE` for any terms and conditions.

Note: this is just an example to show how this can be done. I wouldn't recommend using it word for word.

If my Docker image did not include configuration file templates, and instead required configuration by mounts (like the official Tomcat image) does, would I be free from having to handle both GPLv3 and Apache 2.0?

Yes.

Is there an example Open Source project I could refer to that is GPLv3 but includes Apache 2.0 software? As in one that has to deal with both licenses in terms of header notices, LICENSE files and so on.

I probably would've done it differently, but a quick search of Github turned up the following project:

1
  • 1
    Thank you for the thorough answer! Was not aware "inclusion" meant I could keep those files under Apache. How would you go about the actual LICENSE file of Apache? GPLv3 seems strict about the inclusion of it's COPYING file, is Apache strict about the LICENSE file? This section says you "should" include it apache.org/foundation/license-faq.html#Apply-My-Software. I also found this document that gives some concrete examples on how to go about mixing permissive licenses with GPL.
    – Tholok
    Jul 2, 2019 at 13:02

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.