xref: /illumos-gate/usr/src/README.license-files (revision ead1f93ee620d7580f7e53350fe5a884fc4f158a)
199dda208Smjnelson#
299dda208Smjnelson# CDDL HEADER START
399dda208Smjnelson#
499dda208Smjnelson# The contents of this file are subject to the terms of the
599dda208Smjnelson# Common Development and Distribution License (the "License").
699dda208Smjnelson# You may not use this file except in compliance with the License.
799dda208Smjnelson#
899dda208Smjnelson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
999dda208Smjnelson# or http://www.opensolaris.org/os/licensing.
1099dda208Smjnelson# See the License for the specific language governing permissions
1199dda208Smjnelson# and limitations under the License.
1299dda208Smjnelson#
1399dda208Smjnelson# When distributing Covered Code, include this CDDL HEADER in each
1499dda208Smjnelson# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1599dda208Smjnelson# If applicable, add the following below this CDDL HEADER, with the
1699dda208Smjnelson# fields enclosed by brackets "[]" replaced with your own identifying
1799dda208Smjnelson# information: Portions Copyright [yyyy] [name of copyright owner]
1899dda208Smjnelson#
1999dda208Smjnelson# CDDL HEADER END
2099dda208Smjnelson#
2199dda208Smjnelson#
22*ead1f93eSLiane Praza# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2399dda208Smjnelson# Use is subject to license terms.
2499dda208Smjnelson#
2599dda208Smjnelson
2699dda208SmjnelsonOK, so you've got approval to integrate code, and you want to know how to
2799dda208Smjnelsonproperly communicate the license terms.  What do you do next?
2899dda208Smjnelson
29*ead1f93eSLiane Praza0. Determine whether your code should be covered by Sun copyright,
30*ead1f93eSLiane Praza   CDDL, and/or a third party license.  If only Sun copyright and/or
31*ead1f93eSLiane Praza   CDDL, then skip to step 4.
3299dda208Smjnelson
3399dda208Smjnelson1. Scan the source code and extract all of the third party licenses
3499dda208Smjnelson   into one or more separate files.
3599dda208Smjnelson
3699dda208Smjnelson   A. In general, you'll name these files "THIRDPARTYLICENSE," and
3799dda208Smjnelson      you'll put one in each source directory (i.e. one per library,
3899dda208Smjnelson      or one per command, or one per kernel module.)
3999dda208Smjnelson
4099dda208Smjnelson      EXAMPLE: usr/src/uts/common/io/pcan/THIRDPARTYLICENSE
4199dda208Smjnelson
4299dda208Smjnelson      If this file proves unmanageable, or you're adding licenses
4399dda208Smjnelson      that really are independent of each other, you may instead
4499dda208Smjnelson      create multiple "THIRDPARTYLICENSE.foo" files, where "foo"
4599dda208Smjnelson      obviously corresponds to the license in question.
4699dda208Smjnelson
4799dda208Smjnelson      EXAMPLE: usr/src/lib/libsmbfs/smb/THIRDPARTYLICENSE.*
4899dda208Smjnelson
4999dda208Smjnelson   B. If you planned ahead and included graceful delimiters in your
5099dda208Smjnelson      source code, the THIRDPARTYLICENSE files may actually be build
5199dda208Smjnelson      targets in your Makefiles.
5299dda208Smjnelson
5399dda208Smjnelson      EXAMPLE: usr/src/cmd/perl/Makefile
5499dda208Smjnelson
5599dda208Smjnelson      This approach is usually overkill.  But if the third party license
5699dda208Smjnelson      will remain unchanged while the corresponding copyright will change
5799dda208Smjnelson      dates frequently, then this approach can work well, because you won't
5899dda208Smjnelson      need to update the license files manually.
5999dda208Smjnelson
6099dda208Smjnelson2. Give each of the license files a corresponding ".descrip" file with
6199dda208Smjnelson   an extremely terse explanation of the contents.  Something like
6299dda208Smjnelson   "MJN DRIVER" or "PORTIONS OF ARCANE FUNCTIONALITY" is sufficient.
6399dda208Smjnelson
6499dda208Smjnelson   EXAMPLE: usr/src/cmd/refer/THIRDPARTYLICENSE.descrip
6599dda208Smjnelson
6699dda208Smjnelson3. Edit usr/src/tools/opensolaris/license-list and add the full path
6799dda208Smjnelson   of your new license file(s).
6899dda208Smjnelson
6999dda208Smjnelson4. Figure out which packages deliver objects that are built using the
70*ead1f93eSLiane Praza   new source, and add license actions to the package manifest(s).
7199dda208Smjnelson
7299dda208Smjnelson   A. It's extremely rare for a package NOT to include a Sun copyright
73*ead1f93eSLiane Praza      and CDDL.  If your package is one of the 99 percent that should
74*ead1f93eSLiane Praza      have a Sun copyright and CDDL, then your package should have license
75*ead1f93eSLiane Praza      actions like this:
7699dda208Smjnelson
77*ead1f93eSLiane Praza	  license lic_CDDL license=lic_CDDL
78*ead1f93eSLiane Praza	  license cr_Sun license=cr_Sun
7999dda208Smjnelson
80*ead1f93eSLiane Praza   B. If your package delivers ONLY header files, and has multiple different
8199dda208Smjnelson      copyrights or licenses, you can use
8299dda208Smjnelson
83*ead1f93eSLiane Praza          license license_in_headers license=license_in_headers
84*ead1f93eSLiane Praza	  license path/to/most/common/copyright/file license=path/to/most/common/copyright/file
85*ead1f93eSLiane Praza	  license path/to/most/common/license/file license=path/to/most/common/license/file
8699dda208Smjnelson
87*ead1f93eSLiane Praza   C. For your new license files, the path you use in your license
88*ead1f93eSLiane Praza      actions should be relative to ${SRC}.
8999dda208Smjnelson
90*ead1f93eSLiane Praza   D. Empty packages: if your package delivers nothing (or, more strictly
91*ead1f93eSLiane Praza      speaking, nothing besides directories) you should include the Sun
92*ead1f93eSLiane Praza      copyright but not the CDDL.
9399dda208Smjnelson
94*ead1f93eSLiane Praza   E. As with any other action that is architecture dependent, license
95*ead1f93eSLiane Praza      actions may be preceded by $(blah_ONLY), where "blah" corresponds
96*ead1f93eSLiane Praza      to $(uname -p).
97