xref: /freebsd/contrib/xz/COPYING (revision 3b35e7ee8de9b0260149a2b77e87a2b9c7a36244)
181ad8388SMartin Matuska
281ad8388SMartin MatuskaXZ Utils Licensing
381ad8388SMartin Matuska==================
481ad8388SMartin Matuska
581ad8388SMartin Matuska    Different licenses apply to different files in this package. Here
6*3b35e7eeSXin LI    is a summary of which licenses apply to which parts of this package:
781ad8388SMartin Matuska
8*3b35e7eeSXin LI      - liblzma is under the BSD Zero Clause License (0BSD).
981ad8388SMartin Matuska
10*3b35e7eeSXin LI      - The command line tools xz, xzdec, lzmadec, and lzmainfo are
11*3b35e7eeSXin LI        under 0BSD except that, on systems that don't have a usable
12*3b35e7eeSXin LI        getopt_long, GNU getopt_long is compiled and linked in from the
13*3b35e7eeSXin LI        'lib' directory. The getopt_long code is under GNU LGPLv2.1+.
1481ad8388SMartin Matuska
1581ad8388SMartin Matuska      - The scripts to grep, diff, and view compressed files have been
16*3b35e7eeSXin LI        adapted from GNU gzip. These scripts (xzgrep, xzdiff, xzless,
17*3b35e7eeSXin LI        and xzmore) are under GNU GPLv2+. The man pages of the scripts
18*3b35e7eeSXin LI        are under 0BSD; they aren't based on the man pages of GNU gzip.
1981ad8388SMartin Matuska
20*3b35e7eeSXin LI      - Most of the XZ Utils specific documentation that is in
21*3b35e7eeSXin LI        plain text files (like README, INSTALL, PACKAGERS, NEWS,
22*3b35e7eeSXin LI        and ChangeLog) are under 0BSD unless stated otherwise in
23*3b35e7eeSXin LI        the file itself. The files xz-file-format.txt and
24*3b35e7eeSXin LI        lzma-file-format.xt are in the public domain but may
25*3b35e7eeSXin LI        be distributed under the terms of 0BSD too.
2681ad8388SMartin Matuska
27*3b35e7eeSXin LI      - Translated messages and man pages are under 0BSD except that
28*3b35e7eeSXin LI        some old translations are in the public domain.
29c917796cSXin LI
30*3b35e7eeSXin LI      - Test files and test code in the 'tests' directory, and
31*3b35e7eeSXin LI        debugging utilities in the 'debug' directory are under
32*3b35e7eeSXin LI        the BSD Zero Clause License (0BSD).
33c917796cSXin LI
34*3b35e7eeSXin LI      - The GNU Autotools based build system contains files that are
35*3b35e7eeSXin LI        under GNU GPLv2+, GNU GPLv3+, and a few permissive licenses.
36*3b35e7eeSXin LI        These files don't affect the licensing of the binaries being
37*3b35e7eeSXin LI        built.
3881ad8388SMartin Matuska
39*3b35e7eeSXin LI      - The 'extra' directory contains files that are under various
40*3b35e7eeSXin LI        free software licenses. These aren't built or installed as
41*3b35e7eeSXin LI        part of XZ Utils.
4281ad8388SMartin Matuska
43*3b35e7eeSXin LI    For the files under the BSD Zero Clause License (0BSD), if
44*3b35e7eeSXin LI    a copyright notice is needed, the following is sufficient:
4581ad8388SMartin Matuska
46*3b35e7eeSXin LI        Copyright (C) The XZ Utils authors and contributors
4781ad8388SMartin Matuska
48*3b35e7eeSXin LI    If you copy significant amounts of 0BSD-licensed code from XZ Utils
4981ad8388SMartin Matuska    into your project, acknowledging this somewhere in your software is
5081ad8388SMartin Matuska    polite (especially if it is proprietary, non-free software), but
51*3b35e7eeSXin LI    it is not legally required by the license terms. Here is an example
52*3b35e7eeSXin LI    of a good notice to put into "about box" or into documentation:
5381ad8388SMartin Matuska
542f9cd13dSXin LI        This software includes code from XZ Utils <https://tukaani.org/xz/>.
5581ad8388SMartin Matuska
5681ad8388SMartin Matuska    The following license texts are included in the following files:
57*3b35e7eeSXin LI      - COPYING.0BSD: BSD Zero Clause License
5881ad8388SMartin Matuska      - COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1
5981ad8388SMartin Matuska      - COPYING.GPLv2: GNU General Public License version 2
6081ad8388SMartin Matuska      - COPYING.GPLv3: GNU General Public License version 3
6181ad8388SMartin Matuska
62*3b35e7eeSXin LI    A note about old XZ Utils releases:
6381ad8388SMartin Matuska
64*3b35e7eeSXin LI        XZ Utils releases 5.4.6 and older and 5.5.1alpha have a
65*3b35e7eeSXin LI        significant amount of code put into the public domain and
66*3b35e7eeSXin LI        that obviously remains so. The switch from public domain to
67*3b35e7eeSXin LI        0BSD for newer releases was made in Febrary 2024 because
68*3b35e7eeSXin LI        public domain has (real or perceived) legal ambiguities in
69*3b35e7eeSXin LI        some jurisdictions.
70*3b35e7eeSXin LI
71*3b35e7eeSXin LI        There is very little *practical* difference between public
72*3b35e7eeSXin LI        domain and 0BSD. The main difference likely is that one
73*3b35e7eeSXin LI        shouldn't claim that 0BSD-licensed code is in the public
74*3b35e7eeSXin LI        domain; 0BSD-licensed code is copyrighted but available under
75*3b35e7eeSXin LI        an extremely permissive license. Neither 0BSD nor public domain
76*3b35e7eeSXin LI        require retaining or reproducing author, copyright holder, or
77*3b35e7eeSXin LI        license notices when distributing the software. (Compare to,
78*3b35e7eeSXin LI        for example, BSD 2-Clause "Simplified" License which does have
79*3b35e7eeSXin LI        such requirements.)
80*3b35e7eeSXin LI
81*3b35e7eeSXin LI    If you have questions, don't hesitate to ask for more information.
82*3b35e7eeSXin LI    The contact information is in the README file.
8381ad8388SMartin Matuska
84