Upgrade to Pro — share decks privately, control downloads, hide ads and more …

UCSC Astro computing hour open source licenses

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

UCSC Astro computing hour open source licenses

Avatar for Nathan Goldbaum

Nathan Goldbaum

February 10, 2015

Other Decks in Programming

Transcript

  1. Some Caveats • I am not a lawyer • One

    guy’s opinion • My personal experiences gained from contributing to various open source projects
  2. Why do you need to license your code? If you

    stumble across some code with no attached licensing information, [US] copyright laws would have you treat it as "all privileges retained", even if its author in fact was just trying to make it available with no strings attached. http://ar.to/2010/12/licensing-and-unlicensing Always license your publicly available code! Never use unlicensed software!
  3. How do I apply a license to released code? •

    Easy! Create a LICENSE or COPYING file that includes a copy of the license you choose and stick it in the root of your code repository or source tarball • https://github.com/ipython/ipython • https://github.com/astropy/astropy • https://bitbucket.org/yt_analysis/yt • http://www.tapir.caltech.edu/~phopkins/Site/ GIZMO.html
  4. Free as in Freedom Freedom 0: The freedom to run

    the program as you wish, for any purpose Freedom 1: The freedom to study how the program works, and change it so it does your computing as you wish Freedom 2: The freedom to redistribute copies so you can help your neighbor Freedom 3: The freedom to distribute copies of your modified versions to others https://www.gnu.org/philosophy/free-sw.html
  5. The holy war • Most people in the open source

    software community agree that free software and the four freedoms are good. • What people don’t agree on is whether you should force your users to enforce the four freedoms as well.
  6. Copyleft Richard Stallman https://www.gnu.org/copyleft/ • Copyright is a government- granted

    privilege given to creators thats restricts the actions of consumers of a work • Copyleft is a “hack” of copyright law • Allows anyone to use the work in any way they see fit, so long as all modifications are distributed with accompanying source code • Derived works of copylefted works must themselves be copylefted
  7. The GNU General Public License http://www.gnu.org/copyleft/gpl.html It’s really long, I’m

    not going to reproduce it here, and you really need to be a lawyer to understand all of the ins and outs
  8. The GNU General Public License • Software released under the

    GPL: • Must include the full source code and build instructions with the released software • Cannot prevent users from modifying the source code via technical means (GPLv3 or newer)
  9. The GNU General Public License • Users of GPL software

    can: • Redistribute or sell the software under the GPL (and no other license) • Modify the software in any way they see fit • Release the modifications under the GPL (and no other license) • If I release supplementary software that makes use of the original (GPL) package, my supplementary software must be released under the GPL
  10. The linking clause • This last requirement is why some

    people say the GPL is “viral” • “makes use of” means linking against the software at a binary level or including or importing it at a source code level. • Communicating with GPL software (i.e. over a network) does not trigger the GPL • The LGPL is an alternate license that includes copyleft but does not enforce the linking clause
  11. Limits of the GPL The GPL does not prevent: •

    Users developing and privately using closed- source modifications • Selling software for a profit
  12. Why do some people not like the GPL? • Adds

    additional burdens on the developer to ensure freedoms for user • Sometimes (often, in science) developers and users are the same people, so this can be tough to handle • Bits and pieces of software released under the GPL cannot be used in a package that is not licensed under the GPL • On the other hand, permissively licensed code *can* be used in GPL software, creating an unhealthy one-way sharing dynamic • While many companies contribute to projects licensed under the GPL, generally corporate interests prefer closed or permissive open source licenses
  13. Permissive Licenses • Derived software is free to have any

    license: code can be incorporated into closed projects • Generally, you’ll want to use a license that is GPL-compatible, that is, a license that allows users to redistribute the code under the GPL. • This is important for including software in linux distributions
  14. The BSD License Copyright (c) <YEAR>, <OWNER> All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  15. The MIT License 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 NON INFRINGEMENT. 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 INTHE SOFTWARE.
  16. GPL or BSD: a philosophical choice GPL: • Free software

    should stay free • Software provenance and attribution must be maintained • Private entities should not profit off of community effort by selling open software along with closed-source enhancements BSD: • Freedom for developers to do as they wish with software they create • Attribution for academic software should be guaranteed by community norms, not a legal requirement. • Eases contributions to the BSD-dominated scientific python ecosystem • Encourages well-funded corporate contributions to free software
  17. Which should you choose for your code? • For small,

    isolated projects that will likely not get re- used, it doesn’t really matter which license you use, so long as you use a license. • If there’s any chance that you might contribute your code to a project with a BSD-style license, you will need to (re)-release your code under a BSD-like license • For large projects with many contributors or projects with possible commercial applications, need to think carefully
  18. Things you shouldn’t do • Make up a new license

    • Use a license that hasn’t been certified as a free software license • Make up new license terms with the goal of enforcing academic norms about citations or publishing
  19. Help choosing a license • http://opensource.org/licenses • https://www.gnu.org/philosophy/license-list.html • http://choosealicense.com/

    (provided by github) • http://www.gnu.org/licenses/license- recommendations.html (pro-copyleft) • http://www.astrobetter.com/the-whys-and-hows- of-licensing-scientific-code/ (pro-permissive)