Skip to content

Guidance on Copyrights and Licenses

Curtis Ober edited this page Sep 18, 2024 · 1 revision

Obviously there is some grey region around this, so take these as guidelines.

General Guidance

  • Copyrights and licenses can be included in files and directories.

  • COPYRIGHT and LICENSE files are placed at base directory of packages or included software.

    • COPYRIGHT and LICENSE files in directories are the default for its sub-directories and files, unless overridden within a file or sub-directory.

    • The nesting of copyrights and licenses is possible.

  • Trilinos generally follows Linux Foundation's Copyright Notices in Open Source Software Projects.

  • Do not remove someone else's copyright, unless you have permission!

  • Updates to the copyright and license were not completed on Epetra Stack packages, because they are slated for deprecation.

  • Updates were not done on snap-shotted packages, as they have their own copyright headers and policies.  However, it is suggested that they at least update the Sandia copyright statement to NTESS and include their SPDX-License-Identifier in their source files.

COPYRIGHT File

  • The COPYRIGHT file can simply be a short copyright statement, "Copyright the <package name> contributors.".  Note a date is not required.

  • Traditionally in Trilinos, a package title line is included, which has the package name and simple description, e.g., Teuchos: Common Tools Package.

  • Because many of Trilinos packages originated within Sandia National Laboratories, an additional statement is required in the COPYRIGHT file.

    • "Copyright 20?? National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software."
  • Example COPYRIGHT (Teuchos)

                   Teuchos: Common Tools Package
                      Copyright (2004) NTESS
 
Copyright 2004 National Technology & Engineering Solutions of Sandia,
LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the
U.S. Government retains certain rights in this software.
 
Copyright the Teuchos contributors.

LICENSE File

  • The LICENSE file includes the specific license text for the Trilinos package.  The majority of Trilinos's packages are BSD 3-Clause.

  • BSD 3-Clause Example

SPDX-License-Identifier: BSD-3-Clause
 
Copyright (c) 2004 NTESS and the Teuchos contributors.
 
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
 
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
 
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
 
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
 
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
“AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

Copyright and License Headers

  • Generally, you do not need to add your copyright to the copyright header, as your contribution is captured in the git history, the Developer Certificate of Origin (“DCO”), and "Copyright the <package name> contributors." statement.

    • However if you have included copyrighted material from other software, you may need to include their copyright.
  • Files related to building the software (e.g., cmake files and build scripts) are not considered source code and therefore do not need Copyright and License headers.

    • Source code is primarily C, C++, Fortran, and some scripts (e.g., Python, csh, bash, and perl).

    • Also documentation and other files (e.g., input decks for testing) do not require the Copyright and License header.

  • A compact template is used to keep the header short.  It includes

    • the package-title line with package name and short description (Note that the package-title line should primarily be from the base package, and not from other packages.)

    • any short copyright statement(s)

    • the SPDX license identifier

  • The SPDX license identifier is the only required item, as the copyright is specified through the COPYRIGHT file, and the package title line is for general information.

  • "@HEADER" brackets the Copyright and License header, so scripting tools can easily find and replace the header.

  • C++ Example Copyright and License Header (similar for Fortran and scripts)

// @HEADER
// *****************************************************************************
//                    Teuchos: Common Tools Package
//
// Copyright 2004 NTESS and the Teuchos contributors.
// SPDX-License-Identifier: BSD-3-Clause
// *****************************************************************************
// @HEADER
  • There are four general situations when source code originates from different software.

    • The source code is part of the base package.

      • This is the most common situation, and is outlined above.
    • The source code is from another piece of software.

      • Leave the original copyright(s) statement in place, and no other changes are required.
    • The source code started from another piece of software, but has been modified by the package developers.

      • Leave the original copyright(s) statement in place.

      • Depending on the extent of the modifications, the base package's Copyright and License header can be added.

        • Recall, you do not need to add your copyright to the copyright header, as your contribution is captured in the git history, the Developer Certificate of Origin (“DCO”), and "Copyright the <package name> contributors." statement.

        • Otherwise, you can add the base package's Copyright and License header similar to the above example.

          • This may many lines of text, or it could a "short" copyright, e.g., "Copyright the <package name> contributors.", within the package's Copyright and License header.
    • The source code originated from the base package, and has been modified by a contributor.

      • Leave the original copyright(s) statement in place.

      • Depending on the extent of the modifications, the contributor's Copyright and License header can be added.

        • Recall, you do not need to add your copyright to the copyright header, as your contribution is captured in the git history, the Developer Certificate of Origin (“DCO”), and "Copyright the <package name> contributors." statement.

        • Otherwise, you can add the contributor's Copyright and License header similar to the above example.

          • This may many lines of text, or it could a "short" copyright, e.g., "Copyright the <package name> contributors.", within the package's Copyright and License header.
  • A common situation for Trilinos Developers is when writing code for one package using another package capabilities.

    • If the developers is copying over complete portions of code from another package, the copyright may need to be included.  (See example below.)

      • Note that one should question, "Can't you just use the another package directly, and not duplicate code?".  However copying tests may be useful.
    • However if the developers are just utilizing features from another package, this is likely a contribution to the base package and no Copyright and License header from the other package is required.

    • If multiple copyrights are needed, it can easily included, e.g., Teuchos and RTOp.

      • Example Copyright and License Header with Multiple Copyrights
// @HEADER
// *****************************************************************************
//                    Teuchos: Common Tools Package
//
// Copyright 2004 NTESS and the Teuchos contributors.
// Copyright 2006 NTESS and the RTOp contributors.
// SPDX-License-Identifier: BSD-3-Clause
// *****************************************************************************
// @HEADER
  • Note that other software copyrights can similarly add "short" copyright, e.g., "Copyright the <package name> contributors.", within the package's Copyright and License header.

README.md

  • Other information should be put into the README.md file, e.g.,

    • Description of the package and any other relevant information.

    • Section on where to look for copyright and license information

    • Section on where to ask questions

      • GitHub handle to package team

      • Probably should update the POC to the current package lead(s).

      • Example README.md (Teuchos)

# Teuchos: Common Tools Package
 
 
## Copyright and License
See teuchos/COPYRIGHT, teuchos/LICENSE, https://trilinos.github.io/license.html and individual file headers for additional information.
 
 
## Questions?
Contact lead developers:
 
* Teuchos team        (GitHub handle: @trilinos/teuchos)
* Roger Pawlowski     (GitHub handle: [rppawlo](https://github.com/rppawlo) or rppawlo@sandia.gov)
* Roscoe A. Bartlett  (GitHub handle: [bartlettroscoe](https://github.com/bartlettroscoe) or rabartl@sandia.gov)
Clone this wiki locally