# # 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 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # 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 Sun copyright, CDDL, and/or a third party license. If only Sun copyright and/or CDDL, then skip to step 4. 1. Scan the source code and extract all of the third party licenses into one or more separate files. 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 This approach is usually overkill. But if the third party license will remain unchanged while the corresponding copyright will change dates frequently, then this approach can work well, because you won't need to update the license files manually. 2. Give each of the license files a corresponding ".descrip" file with an extremely terse explanation of the contents. Something like "MJN DRIVER" or "PORTIONS OF ARCANE FUNCTIONALITY" is sufficient. EXAMPLE: usr/src/cmd/refer/THIRDPARTYLICENSE.descrip 3. Edit usr/src/tools/opensolaris/license-list and add the full path of your new license file(s). 4. 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 ${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).