Connect with us

Security

How to Add An Open-Source License to Your Software Project

Last updated by

on

wordpress

Now that your open-source project has been coded, you may be wondering how to assign the applicable license.

It’s a challenge as it’s not as simple as placing the license text in the “README” file.

Using open-source options appear like a “free for all,” however, did you know they have copyright obligations? Plus, some licenses are narrower than others, so buckle up to learn more on how to add a license to your open-source software project.

Start off on the right path by ensuring developers obtain accurate authorship information to attach open-source licenses to a project. They must also follow implementation and placement best practices to avoid losing project ownership.

The general process of assigning a license involves creating license files in your program folder and adding a copyright notice and a license notice to each of your program’s source file.

Legal Copying Permissions Implementation Guide

In this article, we have tips on how to add an open-source license correctly and legally.

The copyright disclaimer

A copyright disclaimer involves placing your ownership claim of original content or disclosure of your “fair use” of copyrighted materials. Under Section 107 of the Copyright Act, you can use copyrighted materials while announcing your “fair use.”

However, to avoid infringement claims, your activities must indeed be fair usage. Therefore, the safest way to use the content owner’s intellectual property is to obtain their permission. Next, place the disclaimer in your user-facing UI.

Additionally, if you have worked on a project that you wish to open-source while being employed or studying in a school (unless you are a research assistant, teaching assistant, or other), you could ask your employer or school to sign a copyright disclaimer for your program, renouncing all copyright interest in your program.

While not mandatory, this will help ensure that the employer or school does not later claim sole ownership of the copyright.

The copyright notice

While a copyright notice is not mandatory, as the copyright automatically applies to your original work as soon as you create it, adding a notice could help deter copyright infringements.

The go-to method is to follow the “Copyright 2021 John Doe” format. This protocol delineates that your project’s copyright notice begins with the English word “Copyright,” even if it is released in a non-English-speaking country or is available in other languages.

In addition, the copyright symbol “©” or “CCC” can be included but is also not obligatory.
Note that a copyright notice must include the year you finished your software release, not the year it was published. You can also use a range of years: 2019-2021.

Place your copyright notice near the top of each file for software distributed with source code. If you distribute a program on physical media, print the copyright notice on an external label and embed it in files.

The license files

With regards to license files, your program’s distribution should display the license text.

As a rule, place it in a file named “LICENSE” or “COPYING (GNU GPL)” at your project’s root. You are free to use any appropriate format for this file, such as .md or .html, or have it in plain text without any extension. However, it is advisable to respect the convention of capitalizing the file name.

The license notices

The purpose of a license notice is to proclaim certain rights to all users of your program. This step clarifies the rights you grant users and states the licenses that accompany your code.

Your project’s license notices should immediately follow its copyright notices. Additionally,” it is good practice to place what is termed “copying permission statements” in each program file.

You may wish to adhere to the GNU project’s license notice for each source file. The GNU project is a mass collaborative initiative for the development of free software. The “freedom” in the software context refers to the ability of anyone who wishes to copy, distribute, run, study, improve, or change the software.

The GNU General Public License (GPL) also lists terms and conditions for modifying, circulating and copying free software. The license text differs slightly between one-file programs and multi-file programs. An example of a GNU multi-file program project license would begin with a line stating: “This file is part of NAME.”

The start-up notice

If your program is interactive, as are most mobile apps, it is preferable to display a short notice stating the copyright and applicable license on start-ups.

An example notice would be:

<program>Copyright<year><name of author>

This program comes with ABSOLUTELY NO WARRANTY; it is free software, and you are welcome to redistribute it under certain conditions; for details, see <Licensing page>.

Built-in licensing

If you manage your project on an open-source repository, like GitHub or GitLab, licensing is much easier. Likely, the platform already offered you the choice of a license when you first created a repository.

In this way, all the necessary files and notices have been generated for you automatically.

Similarly, if you create an App on Google Play services, the platform includes licensing tools that make it easier to express the open-source notices for components used in your app.

Gradle plugin, for example, aggregates “license terms from included libraries, as declared in their POM files, and creates an activity that you can use to display these terms.” Google elucidates it here.

Final Remarks

Remember that open-source licenses are free to use and copyright. Moreover, you are not required to register them.

However, if you are in the US, you can register the copyright with the US Registry of Copyrights. If you do, you are better equipped and protected should another party violate your product’s license.