Open source software licences: BSD-style

Part of the article Open source software licences explained.


What is a “BSD-style” licence?

The term “BSD-style” describes permissive licences that require you to retain the copyright note, licence text and disclaimer in each source code file and sometimes in any accompanying documentation, but that impose essentially no other restrictions. Probably the most widely used (and simplest) example is the MIT licence.

BSD licences have been used for a great many different pieces of software, including components that have found their way into both OS/X and Windows operating systems. The BSD name comes from the original Berkeley Software Distribution of the Unix operating system in the 1970s, referring to the terms under which the University of California, Berkeley published its code.


Why would I want to release my code under a BSD-style licence?

A BSD licence essentially says to other developers, “do what you like, so long as you retain my copyright note and disclaimer”. Since these bits of text are not usually shown to end-users of an application anyway, this effectively means your software can be recycled without imposing any serious restrictions at all.

This is the ideal situation if your only care is to provide something that other people can build on. It also makes the legal situation as simple and clear as possible for anybody who wants to cite or quote your code.

Using a BSD licence also has a more selfish advantage—it allows you to build proprietary applications using the same code later, even if your institution or employer owns the copyright for it. Since you are the developer most likely to reuse your code, this can be quite significant.


What are the disadvantages of using a BSD-style licence?

You have no control over what other people might do with your code: if it's useful, it may end up in commercial applications, you won't be notified, and you certainly won't be paid for it. Nonetheless if you are intending to publish open source software, there may be something to be said for becoming comfortable with that situation rather than perhaps going a bit mad trying to control what people can make out of your code.


How do I apply a BSD-style licence to my code?

I suggest using the MIT licence variant.

Copy the following text into a header comment at the top of each of your source files:

  Copyright (c) <year> <copyright holders>

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation
  files (the "Software"), to deal in the Software without
  restriction, including without limitation the rights to use, copy,
  modify, merge, publish, distribute, sublicense, and/or sell copies
  of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  OTHER DEALINGS IN THE SOFTWARE.

Make sure the copyright note has the right year and identifies the correct copyright holders.

You don't need to include a licence statement separately from the source files themselves, but you can paste the same text into your README file if you wish.

See the Vamp plugin SDK for an example of a project with BSD licensing. In this case there is a standard boilerplate in each source file (see this one for example) that is also repeated in a file called COPYING in the main folder, and the README file contains a note about it.


Can I incorporate someone else's BSD-licensed code into my own software?

Almost certainly yes. But you should read over the licence terms as they appear in the software anyway, just to be sure.

If you modify some of the code, make a note in the header comment and add yourself or your institution as a copyright holder if relevant—but never, ever delete the existing licence text.

Make a note of the code you have used, with its copyright note, in your software's accompanying documentation.


Return to the article Open source software licences explained, or go on to read about the GPL.