README.license-files revision ead1f93ee620d7580f7e53350fe5a884fc4f158a
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# CDDL HEADER START
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# The contents of this file are subject to the terms of the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Common Development and Distribution License (the "License").
199767f8919635c4928607450d9e0abb932109ceToomas Soome# You may not use this file except in compliance with the License.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
199767f8919635c4928607450d9e0abb932109ceToomas Soome# or http://www.opensolaris.org/os/licensing.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# See the License for the specific language governing permissions
199767f8919635c4928607450d9e0abb932109ceToomas Soome# and limitations under the License.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# When distributing Covered Code, include this CDDL HEADER in each
199767f8919635c4928607450d9e0abb932109ceToomas Soome# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# If applicable, add the following below this CDDL HEADER, with the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# fields enclosed by brackets "[]" replaced with your own identifying
199767f8919635c4928607450d9e0abb932109ceToomas Soome# information: Portions Copyright [yyyy] [name of copyright owner]
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# CDDL HEADER END
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Use is subject to license terms.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeOK, so you've got approval to integrate code, and you want to know how to
199767f8919635c4928607450d9e0abb932109ceToomas Soomeproperly communicate the license terms. What do you do next?
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome0. Determine whether your code should be covered by Sun copyright,
199767f8919635c4928607450d9e0abb932109ceToomas Soome CDDL, and/or a third party license. If only Sun copyright and/or
199767f8919635c4928607450d9e0abb932109ceToomas Soome CDDL, then skip to step 4.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome1. Scan the source code and extract all of the third party licenses
199767f8919635c4928607450d9e0abb932109ceToomas Soome into one or more separate files.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome A. In general, you'll name these files "THIRDPARTYLICENSE," and
199767f8919635c4928607450d9e0abb932109ceToomas Soome you'll put one in each source directory (i.e. one per library,
199767f8919635c4928607450d9e0abb932109ceToomas Soome or one per command, or one per kernel module.)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome EXAMPLE: usr/src/uts/common/io/pcan/THIRDPARTYLICENSE
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome If this file proves unmanageable, or you're adding licenses
199767f8919635c4928607450d9e0abb932109ceToomas Soome that really are independent of each other, you may instead
199767f8919635c4928607450d9e0abb932109ceToomas Soome create multiple "THIRDPARTYLICENSE.foo" files, where "foo"
199767f8919635c4928607450d9e0abb932109ceToomas Soome obviously corresponds to the license in question.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome EXAMPLE: usr/src/lib/libsmbfs/smb/THIRDPARTYLICENSE.*
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome B. If you planned ahead and included graceful delimiters in your
199767f8919635c4928607450d9e0abb932109ceToomas Soome source code, the THIRDPARTYLICENSE files may actually be build
199767f8919635c4928607450d9e0abb932109ceToomas Soome targets in your Makefiles.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome EXAMPLE: usr/src/cmd/perl/Makefile
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome This approach is usually overkill. But if the third party license
199767f8919635c4928607450d9e0abb932109ceToomas Soome will remain unchanged while the corresponding copyright will change
199767f8919635c4928607450d9e0abb932109ceToomas Soome dates frequently, then this approach can work well, because you won't
199767f8919635c4928607450d9e0abb932109ceToomas Soome need to update the license files manually.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome2. Give each of the license files a corresponding ".descrip" file with
199767f8919635c4928607450d9e0abb932109ceToomas Soome an extremely terse explanation of the contents. Something like
199767f8919635c4928607450d9e0abb932109ceToomas Soome "MJN DRIVER" or "PORTIONS OF ARCANE FUNCTIONALITY" is sufficient.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome EXAMPLE: usr/src/cmd/refer/THIRDPARTYLICENSE.descrip
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome3. Edit usr/src/tools/opensolaris/license-list and add the full path
199767f8919635c4928607450d9e0abb932109ceToomas Soome of your new license file(s).
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome4. Figure out which packages deliver objects that are built using the
199767f8919635c4928607450d9e0abb932109ceToomas Soome new source, and add license actions to the package manifest(s).
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome A. It's extremely rare for a package NOT to include a Sun copyright
199767f8919635c4928607450d9e0abb932109ceToomas Soome and CDDL. If your package is one of the 99 percent that should
199767f8919635c4928607450d9e0abb932109ceToomas Soome have a Sun copyright and CDDL, then your package should have license
199767f8919635c4928607450d9e0abb932109ceToomas Soome actions like this:
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome license lic_CDDL license=lic_CDDL
199767f8919635c4928607450d9e0abb932109ceToomas Soome license cr_Sun license=cr_Sun
199767f8919635c4928607450d9e0abb932109ceToomas Soome
B. If your package delivers ONLY header files, and has multiple different
copyrights or licenses, you can use
license license_in_headers license=license_in_headers
license path/to/most/common/copyright/file license=path/to/most/common/copyright/file
license path/to/most/common/license/file license=path/to/most/common/license/file
C. For your new license files, the path you use in your license
actions should be relative to ${SRC}.
D. Empty packages: if your package delivers nothing (or, more strictly
speaking, nothing besides directories) you should include the Sun
copyright but not the CDDL.
E. As with any other action that is architecture dependent, license
actions may be preceded by $(blah_ONLY), where "blah" corresponds
to $(uname -p).