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# 21*5084e753SMark J. Nelson 2299dda208Smjnelson# 23*5084e753SMark J. Nelson# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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*5084e753SMark J. Nelson0. Determine whether your code should be covered by Oracle copyright, 30*5084e753SMark J. Nelson CDDL, and/or a third party license. If only Oracle copyright and/or 31*5084e753SMark J. Nelson CDDL, then skip to step 3. 3299dda208Smjnelson 3399dda208Smjnelson1. Scan the source code and extract all of the third party licenses 3499dda208Smjnelson into one or more separate files. 3599dda208Smjnelson 36*5084e753SMark J. Nelson This information may be present in comments in source code, or may 37*5084e753SMark J. Nelson already be provided as separate files. For example, GPL license 38*5084e753SMark J. Nelson terms are often found in files named "COPYING." 39*5084e753SMark J. Nelson 4099dda208Smjnelson A. In general, you'll name these files "THIRDPARTYLICENSE," and 4199dda208Smjnelson you'll put one in each source directory (i.e. one per library, 4299dda208Smjnelson or one per command, or one per kernel module.) 4399dda208Smjnelson 4499dda208Smjnelson EXAMPLE: usr/src/uts/common/io/pcan/THIRDPARTYLICENSE 4599dda208Smjnelson 4699dda208Smjnelson If this file proves unmanageable, or you're adding licenses 4799dda208Smjnelson that really are independent of each other, you may instead 4899dda208Smjnelson create multiple "THIRDPARTYLICENSE.foo" files, where "foo" 4999dda208Smjnelson obviously corresponds to the license in question. 5099dda208Smjnelson 5199dda208Smjnelson EXAMPLE: usr/src/lib/libsmbfs/smb/THIRDPARTYLICENSE.* 5299dda208Smjnelson 5399dda208Smjnelson B. If you planned ahead and included graceful delimiters in your 5499dda208Smjnelson source code, the THIRDPARTYLICENSE files may actually be build 5599dda208Smjnelson targets in your Makefiles. 5699dda208Smjnelson 5799dda208Smjnelson EXAMPLE: usr/src/cmd/perl/Makefile 5899dda208Smjnelson 59*5084e753SMark J. Nelson If the corresponding copyright will change dates frequently, 60*5084e753SMark J. Nelson then this approach can work well, because you won't need to 61*5084e753SMark J. Nelson update the license files manually. 62*5084e753SMark J. Nelson 63*5084e753SMark J. Nelson If you do this, then your license file should be a dependency of 64*5084e753SMark J. Nelson both the all and install targets, and should be removed via 65*5084e753SMark J. Nelson clobber, usually by way of CLOBBERFILES. 6699dda208Smjnelson 6799dda208Smjnelson2. Give each of the license files a corresponding ".descrip" file with 68*5084e753SMark J. Nelson a terse explanation of the contents. Something like "MJN DRIVER" 69*5084e753SMark J. Nelson or "PORTIONS OF ARCANE FUNCTIONALITY" is sufficient. 7099dda208Smjnelson 7199dda208Smjnelson EXAMPLE: usr/src/cmd/refer/THIRDPARTYLICENSE.descrip 7299dda208Smjnelson 73*5084e753SMark J. Nelson3. Figure out which packages deliver objects that are built using the 74ead1f93eSLiane Praza new source, and add license actions to the package manifest(s). 7599dda208Smjnelson 7699dda208Smjnelson A. It's extremely rare for a package NOT to include a Sun copyright 77ead1f93eSLiane Praza and CDDL. If your package is one of the 99 percent that should 78ead1f93eSLiane Praza have a Sun copyright and CDDL, then your package should have license 79ead1f93eSLiane Praza actions like this: 8099dda208Smjnelson 81ead1f93eSLiane Praza license lic_CDDL license=lic_CDDL 82ead1f93eSLiane Praza license cr_Sun license=cr_Sun 8399dda208Smjnelson 84ead1f93eSLiane Praza B. If your package delivers ONLY header files, and has multiple different 8599dda208Smjnelson copyrights or licenses, you can use 8699dda208Smjnelson 87ead1f93eSLiane Praza license license_in_headers license=license_in_headers 88*5084e753SMark J. Nelson license path/to/most/common/copyright/file \ 89*5084e753SMark J. Nelson license=path/to/most/common/copyright/file 90*5084e753SMark J. Nelson license path/to/most/common/license/file \ 91*5084e753SMark J. Nelson license=path/to/most/common/license/file 9299dda208Smjnelson 93ead1f93eSLiane Praza C. For your new license files, the path you use in your license 94*5084e753SMark J. Nelson actions should be relative to ${CODEMGR_WS}. 9599dda208Smjnelson 96ead1f93eSLiane Praza D. Empty packages: if your package delivers nothing (or, more strictly 97ead1f93eSLiane Praza speaking, nothing besides directories) you should include the Sun 98ead1f93eSLiane Praza copyright but not the CDDL. 9999dda208Smjnelson 100ead1f93eSLiane Praza E. As with any other action that is architecture dependent, license 101ead1f93eSLiane Praza actions may be preceded by $(blah_ONLY), where "blah" corresponds 102ead1f93eSLiane Praza to $(uname -p). 103*5084e753SMark J. Nelson 104*5084e753SMark J. Nelson If you don't add the appropriate license actions to package 105*5084e753SMark J. Nelson manifests, then your license and description files will show up as 106*5084e753SMark J. Nelson unreferenced in the build. 107