view usr/src/README.license-files @ 13735:1c48a05ba37d

2602 mdb ::sockparams SEGV Reviewed by: Gordon Ross <gordon.w.ross@gmail.com> Reviewed by: Milan Jurik <milan.jurik@xylab.cz> Approved by: Richard Lowe <richlowe@richlowe.net>
author Andrey Sokolov <keremet@solaris.kirov.ru>
date Wed, 20 Jun 2012 15:11:05 -0400
parents c0270875939a
children
line wrap: on
line source

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#

OK, so you've got approval to integrate code, and you want to know how to
properly communicate the license terms.  What do you do next?

0. Determine whether your code should be covered by Oracle copyright,
   CDDL, and/or a third party license.  If only Oracle copyright and/or
   CDDL, then skip to step 3.

1. Scan the source code and extract all of the third party licenses
   into one or more separate files.

   This information may be present in comments in source code, or may
   already be provided as separate files.  For example, GPL license
   terms are often found in files named "COPYING."

   A. In general, you'll name these files "THIRDPARTYLICENSE," and
      you'll put one in each source directory (i.e. one per library,
      or one per command, or one per kernel module.)

      EXAMPLE: usr/src/uts/common/io/pcan/THIRDPARTYLICENSE

      If this file proves unmanageable, or you're adding licenses
      that really are independent of each other, you may instead
      create multiple "THIRDPARTYLICENSE.foo" files, where "foo"
      obviously corresponds to the license in question.

      EXAMPLE: usr/src/lib/libsmbfs/smb/THIRDPARTYLICENSE.*

   B. If you planned ahead and included graceful delimiters in your
      source code, the THIRDPARTYLICENSE files may actually be build
      targets in your Makefiles.

      EXAMPLE: usr/src/cmd/perl/Makefile

      If the corresponding copyright will change dates frequently,
      then this approach can work well, because you won't need to
      update the license files manually.                                        

      If you do this, then your license file should be a dependency of
      both the all and install targets, and should be removed via
      clobber, usually by way of CLOBBERFILES.

2. Give each of the license files a corresponding ".descrip" file with
   a terse explanation of the contents.  Something like "MJN DRIVER"
   or "PORTIONS OF ARCANE FUNCTIONALITY" is sufficient.

   EXAMPLE: usr/src/cmd/refer/THIRDPARTYLICENSE.descrip

3. Figure out which packages deliver objects that are built using the
   new source, and add license actions to the package manifest(s).

   A. It's extremely rare for a package NOT to include a Sun copyright
      and CDDL.  If your package is one of the 99 percent that should
      have a Sun copyright and CDDL, then your package should have license
      actions like this:

	  license lic_CDDL license=lic_CDDL
	  license cr_Sun license=cr_Sun

   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 ${CODEMGR_WS}.

   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).

   If you don't add the appropriate license actions to package
   manifests, then your license and description files will show up as
   unreferenced in the build.