logo

drewdevault.com

[mirror] blog and personal website of Drew DeVault git clone https://hacktivis.me/git/mirror/drewdevault.com.git

Free-software-licenses-MIT.md (5175B)


  1. ---
  2. title: "Free software licenses explained: MIT"
  3. date: 2022-02-07
  4. ---
  5. This is the first in a series of posts I intend to write explaining how various
  6. free and open source software licenses work, and what that means for you as a
  7. user or developer of that software. Today we'll look at the MIT license, also
  8. sometimes referred to as the X11 or Expat license.
  9. The MIT license is:
  10. * Both [free software] and [open source]
  11. * Permissive (and thus non-copyleft and non-viral)
  12. [Free Software]: https://www.gnu.org/philosophy/free-sw.en.html
  13. [Open Source]: https://opensource.org/osd
  14. This means that the license upholds the four essential freedoms of free software
  15. (the right to run, copy, distribute, study, change and improve the software) and
  16. all of the terms of the open source definition (largely the same). Further more,
  17. it is classified on the permissive/copyleft spectrum as a permissive license,
  18. meaning that it imposes relatively few obligations on the recipient of the
  19. license.
  20. The full text of the license is quite short, so let's read it together:
  21. > The MIT License (MIT)
  22. >
  23. > Copyright (c) \<year\> \<copyright holders\>
  24. >
  25. > 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:
  26. >
  27. > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  28. >
  29. > 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.
  30. The first paragraph of the license enumerates the rights which you, as a
  31. recipient of the software, are entitled to. It's this section which qualifies
  32. the license as free and open source software (assuming the later sections don't
  33. disqualify it). The key grants are the right to "use" the software (freedom 0),
  34. to "modify" and "merge" it (freedom 1), and to "distribute" and "sell" copies
  35. (freedoms 2 and 3), "without restriction". We also get some bonus grants, like
  36. the right to sublicense the software, so you could, for instance, incorporate it
  37. into a work which uses a less permissive license like the GPL.
  38. All of this is subject to the conditions of paragraph two, of which there is
  39. only one: you must include the copyright notice and license text in any
  40. substantial copies or derivatives of the software. Thus, the MIT license
  41. requires *attribution*. This can be achieved by simply including the full
  42. license text (copyright notice included) somewhere in your project. For a
  43. proprietary product, this is commonly hidden away in a menu somewhere. For a
  44. free software project, where the source code is distributed alongside the
  45. product, I often include it as a comment in the relevant files. You can also add
  46. your name or the name of your organization to the list of copyright holders when
  47. contributing to MIT-licensed projects, at least in the absence of a CLA.[^1]
  48. [^1]: You should not sign a CLA which transfers your copyright to the publisher.
  49. The last paragraph sets the expectations for the recipient, and it is very
  50. important. This *disclaimer of warranty* is ubiquitous in nearly all free and
  51. open source software licenses. The software is provided "as is", which is to
  52. say, in whatever condition you found it in, for better or worse. There is no
  53. expectation of warranty (that is to say, any support you receive is from the
  54. goodwill of the authors and not from a contractual obligation), and there is no
  55. guarantee of "merchantability" (that you can successfully sell it), fitness for
  56. a particular purpose (that you can successfully use it to solve your problem),
  57. or noninfringement (such as with respect to relevant patents). That last detail
  58. may be of particular importance: the MIT license disclaims all liability for
  59. patents that you might infringe upon by using the software. Other licenses often
  60. address this case differently, such as Apache 2.0.
  61. MIT is a good fit for projects which want to impose very few limitations on the
  62. use or reuse of the software by others. However, the permissibility of the
  63. license permits behaviors you might not like, such as creating a proprietary
  64. commercial fork of the software and selling it to others without supporting
  65. upstream. Note that the right to sell the software is an inalienable requirement
  66. of the free software and open source definitions, but other licenses can level
  67. the playing field a bit with strategies like copyleft and virality, on the other
  68. end of the permissibility spectrum. I'll cover some relevant licenses in the
  69. future.