mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 1 | # |
| 2 | # CDDL HEADER START |
| 3 | # |
| 4 | # The contents of this file are subject to the terms of the |
| 5 | # Common Development and Distribution License (the "License"). |
| 6 | # You may not use this file except in compliance with the License. |
| 7 | # |
| 8 | # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 9 | # or http://www.opensolaris.org/os/licensing. |
| 10 | # See the License for the specific language governing permissions |
| 11 | # and limitations under the License. |
| 12 | # |
| 13 | # When distributing Covered Code, include this CDDL HEADER in each |
| 14 | # file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 15 | # If applicable, add the following below this CDDL HEADER, with the |
| 16 | # fields enclosed by brackets "[]" replaced with your own identifying |
| 17 | # information: Portions Copyright [yyyy] [name of copyright owner] |
| 18 | # |
| 19 | # CDDL HEADER END |
| 20 | # |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 21 | |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 22 | # |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 23 | # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 24 | # |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 25 | |
| 26 | OK, so you've got approval to integrate code, and you want to know how to |
| 27 | properly communicate the license terms. What do you do next? |
| 28 | |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 29 | 0. Determine whether your code should be covered by Oracle copyright, |
| 30 | CDDL, and/or a third party license. If only Oracle copyright and/or |
| 31 | CDDL, then skip to step 3. |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 32 | |
| 33 | 1. Scan the source code and extract all of the third party licenses |
| 34 | into one or more separate files. |
| 35 | |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 36 | This information may be present in comments in source code, or may |
| 37 | already be provided as separate files. For example, GPL license |
| 38 | terms are often found in files named "COPYING." |
| 39 | |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 40 | A. In general, you'll name these files "THIRDPARTYLICENSE," and |
| 41 | you'll put one in each source directory (i.e. one per library, |
| 42 | or one per command, or one per kernel module.) |
| 43 | |
| 44 | EXAMPLE: usr/src/uts/common/io/pcan/THIRDPARTYLICENSE |
| 45 | |
| 46 | If this file proves unmanageable, or you're adding licenses |
| 47 | that really are independent of each other, you may instead |
| 48 | create multiple "THIRDPARTYLICENSE.foo" files, where "foo" |
| 49 | obviously corresponds to the license in question. |
| 50 | |
| 51 | EXAMPLE: usr/src/lib/libsmbfs/smb/THIRDPARTYLICENSE.* |
| 52 | |
| 53 | B. If you planned ahead and included graceful delimiters in your |
| 54 | source code, the THIRDPARTYLICENSE files may actually be build |
| 55 | targets in your Makefiles. |
| 56 | |
| 57 | EXAMPLE: usr/src/cmd/perl/Makefile |
| 58 | |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 59 | If the corresponding copyright will change dates frequently, |
| 60 | then this approach can work well, because you won't need to |
| 61 | update the license files manually. |
| 62 | |
| 63 | If you do this, then your license file should be a dependency of |
| 64 | both the all and install targets, and should be removed via |
| 65 | clobber, usually by way of CLOBBERFILES. |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 66 | |
| 67 | 2. Give each of the license files a corresponding ".descrip" file with |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 68 | a terse explanation of the contents. Something like "MJN DRIVER" |
| 69 | or "PORTIONS OF ARCANE FUNCTIONALITY" is sufficient. |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 70 | |
| 71 | EXAMPLE: usr/src/cmd/refer/THIRDPARTYLICENSE.descrip |
| 72 | |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 73 | 3. Figure out which packages deliver objects that are built using the |
Liane Praza | ead1f93 | 2010-03-02 19:29:26 -0700 | [diff] [blame] | 74 | new source, and add license actions to the package manifest(s). |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 75 | |
| 76 | A. It's extremely rare for a package NOT to include a Sun copyright |
Liane Praza | ead1f93 | 2010-03-02 19:29:26 -0700 | [diff] [blame] | 77 | and CDDL. If your package is one of the 99 percent that should |
| 78 | have a Sun copyright and CDDL, then your package should have license |
| 79 | actions like this: |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 80 | |
Liane Praza | ead1f93 | 2010-03-02 19:29:26 -0700 | [diff] [blame] | 81 | license lic_CDDL license=lic_CDDL |
| 82 | license cr_Sun license=cr_Sun |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 83 | |
Liane Praza | ead1f93 | 2010-03-02 19:29:26 -0700 | [diff] [blame] | 84 | B. If your package delivers ONLY header files, and has multiple different |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 85 | copyrights or licenses, you can use |
| 86 | |
Liane Praza | ead1f93 | 2010-03-02 19:29:26 -0700 | [diff] [blame] | 87 | license license_in_headers license=license_in_headers |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 88 | license path/to/most/common/copyright/file \ |
| 89 | license=path/to/most/common/copyright/file |
| 90 | license path/to/most/common/license/file \ |
| 91 | license=path/to/most/common/license/file |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 92 | |
Liane Praza | ead1f93 | 2010-03-02 19:29:26 -0700 | [diff] [blame] | 93 | C. For your new license files, the path you use in your license |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 94 | actions should be relative to ${CODEMGR_WS}. |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 95 | |
Liane Praza | ead1f93 | 2010-03-02 19:29:26 -0700 | [diff] [blame] | 96 | D. Empty packages: if your package delivers nothing (or, more strictly |
| 97 | speaking, nothing besides directories) you should include the Sun |
| 98 | copyright but not the CDDL. |
mjnelson | 99dda20 | 2008-04-11 10:47:16 -0700 | [diff] [blame] | 99 | |
Liane Praza | ead1f93 | 2010-03-02 19:29:26 -0700 | [diff] [blame] | 100 | E. As with any other action that is architecture dependent, license |
| 101 | actions may be preceded by $(blah_ONLY), where "blah" corresponds |
| 102 | to $(uname -p). |
Mark J. Nelson | 5084e75 | 2010-08-02 16:37:22 -0600 | [diff] [blame] | 103 | |
| 104 | If you don't add the appropriate license actions to package |
| 105 | manifests, then your license and description files will show up as |
| 106 | unreferenced in the build. |