Licensing: Label netlib LAPACK files as BSD-3-Clause-Open-MPI

libeigen/eigen!3408

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
diff --git a/COPYING.README b/COPYING.README
index 93ec692..691eb93 100644
--- a/COPYING.README
+++ b/COPYING.README
@@ -5,8 +5,10 @@
 
 Some files contain third-party code under permissive or otherwise
 MPL2-compatible licenses, hence the other COPYING.* files here. These
-include Apache-2.0, BSD-style notices, the MINPACK license, and the MORSE
-CMake module BSD-style notice in cmake/MORSE-Copyright.txt.
+include Apache-2.0, BSD-style notices, the MINPACK license, the MORSE
+CMake module BSD-style notice in cmake/MORSE-Copyright.txt, and the LAPACK
+license (BSD-3-Clause-Open-MPI) of the netlib BLAS test programs in
+blas/testing/ and the LAPACK timer stubs and test script in lapack/.
 
 Note that some optional external dependencies (e.g. FFTW, MPFR C++)
 are distributed under different licenses, including the GPL. Refer to
diff --git a/LICENSES/BSD-3-Clause-Open-MPI.txt b/LICENSES/BSD-3-Clause-Open-MPI.txt
new file mode 100644
index 0000000..166a95b
--- /dev/null
+++ b/LICENSES/BSD-3-Clause-Open-MPI.txt
@@ -0,0 +1,34 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+- Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer listed
+  in this license in the documentation and/or other materials
+  provided with the distribution.
+
+- Neither the name of the copyright holders nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+The copyright holders provide no reassurances that the source code
+provided does not infringe any patent, copyright, or any other
+intellectual property rights of third parties.  The copyright holders
+disclaim any liability to any recipient for claims brought against
+recipient by any third party for infringement of that parties
+intellectual property rights.
+
+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
+OWNER 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.
diff --git a/REUSE.toml b/REUSE.toml
index d8a1a69..3adc938 100644
--- a/REUSE.toml
+++ b/REUSE.toml
@@ -137,16 +137,18 @@
 SPDX-FileCopyrightText = "The Eigen Authors"
 SPDX-License-Identifier = "MPL-2.0"
 
-# Reference BLAS test data files (netlib reference distribution: Univ. of
-# Tennessee / Berkeley / Colorado Denver — modified BSD-3-Clause).
+# Reference BLAS test inputs: LAPACK's BLAS/*.in, identical to 3.6.0's apart
+# from output file names and, in [cz]blat3.dat, disabled error-exit tests.
+# LAPACK's license is BSD-3-Clause plus an IP disclaimer, i.e.
+# BSD-3-Clause-Open-MPI.
 [[annotations]]
 path = "blas/testing/*.dat"
 SPDX-FileCopyrightText = [
-    "1992-2013 The University of Tennessee and The University of Tennessee Research Foundation",
-    "2000-2013 The University of California Berkeley",
-    "2006-2013 The University of Colorado Denver",
+    "1992-2015 The University of Tennessee and The University of Tennessee Research Foundation",
+    "2000-2015 The University of California Berkeley",
+    "2006-2015 The University of Colorado Denver",
 ]
-SPDX-License-Identifier = "BSD-3-Clause"
+SPDX-License-Identifier = "BSD-3-Clause-Open-MPI"
 
 # MSVC autoexp data — mechanical pretty-print description, MPL-2.0.
 [[annotations]]
diff --git a/blas/testing/cblat1.f b/blas/testing/cblat1.f
index 0637f9e..4e151cf 100644
--- a/blas/testing/cblat1.f
+++ b/blas/testing/cblat1.f
@@ -35,8 +35,10 @@
 *> \ingroup complex_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM CBLAT1
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/cblat2.f b/blas/testing/cblat2.f
index 5b483d2..bd19a7f 100644
--- a/blas/testing/cblat2.f
+++ b/blas/testing/cblat2.f
@@ -101,8 +101,10 @@
 *> \ingroup complex_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM CBLAT2
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/cblat3.f b/blas/testing/cblat3.f
index 2ea3880..9ce4ea4 100644
--- a/blas/testing/cblat3.f
+++ b/blas/testing/cblat3.f
@@ -83,8 +83,10 @@
 *> \ingroup complex_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM CBLAT3
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/dblat1.f b/blas/testing/dblat1.f
index 693c817..db14191 100644
--- a/blas/testing/dblat1.f
+++ b/blas/testing/dblat1.f
@@ -35,8 +35,10 @@
 *> \ingroup double_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM DBLAT1
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/dblat2.f b/blas/testing/dblat2.f
index 7783ae2..1e71eab 100644
--- a/blas/testing/dblat2.f
+++ b/blas/testing/dblat2.f
@@ -100,8 +100,10 @@
 *> \ingroup double_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM DBLAT2
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/dblat3.f b/blas/testing/dblat3.f
index 62fc7fa..edada59 100644
--- a/blas/testing/dblat3.f
+++ b/blas/testing/dblat3.f
@@ -80,8 +80,10 @@
 *> \ingroup double_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM DBLAT3
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/sblat1.f b/blas/testing/sblat1.f
index 5cc2cda..97097a7 100644
--- a/blas/testing/sblat1.f
+++ b/blas/testing/sblat1.f
@@ -35,8 +35,10 @@
 *> \ingroup single_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM SBLAT1
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/sblat2.f b/blas/testing/sblat2.f
index 6b800d5..48c354d 100644
--- a/blas/testing/sblat2.f
+++ b/blas/testing/sblat2.f
@@ -100,8 +100,10 @@
 *> \ingroup single_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM SBLAT2
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/sblat3.f b/blas/testing/sblat3.f
index 4033e39..f1d2d06 100644
--- a/blas/testing/sblat3.f
+++ b/blas/testing/sblat3.f
@@ -80,8 +80,10 @@
 *> \ingroup single_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM SBLAT3
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/zblat1.f b/blas/testing/zblat1.f
index ed01519..20f9c0b 100644
--- a/blas/testing/zblat1.f
+++ b/blas/testing/zblat1.f
@@ -35,8 +35,10 @@
 *> \ingroup complex16_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM ZBLAT1
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/zblat2.f b/blas/testing/zblat2.f
index 8dbdbee..6880e76 100644
--- a/blas/testing/zblat2.f
+++ b/blas/testing/zblat2.f
@@ -101,8 +101,10 @@
 *> \ingroup complex16_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM ZBLAT2
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/blas/testing/zblat3.f b/blas/testing/zblat3.f
index 7ca0de1..a0923c8 100644
--- a/blas/testing/zblat3.f
+++ b/blas/testing/zblat3.f
@@ -84,8 +84,10 @@
 *> \ingroup complex16_blas_testing
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       PROGRAM ZBLAT3
 *
 *  -- Reference BLAS test routine (version 3.4.1) --
diff --git a/lapack/dsecnd_NONE.f b/lapack/dsecnd_NONE.f
index 518d4aa..a283e5d 100644
--- a/lapack/dsecnd_NONE.f
+++ b/lapack/dsecnd_NONE.f
@@ -35,8 +35,10 @@
 *> \ingroup auxOTHERauxiliary
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       DOUBLE PRECISION FUNCTION DSECND( )
 *
 *  -- LAPACK auxiliary routine (version 3.4.0) --
diff --git a/lapack/lapack_testing.py b/lapack/lapack_testing.py
index 1e43e3a..43926fc 100644
--- a/lapack/lapack_testing.py
+++ b/lapack/lapack_testing.py
@@ -5,7 +5,7 @@
 # SPDX-FileCopyrightText: 2000-2013 The University of California Berkeley
 # SPDX-FileCopyrightText: 2006-2013 The University of Colorado Denver
 # SPDX-FileCopyrightText: The Eigen Authors
-# SPDX-License-Identifier: BSD-3-Clause
+# SPDX-License-Identifier: BSD-3-Clause-Open-MPI
 #
 
 ###############################################################################
diff --git a/lapack/second_NONE.f b/lapack/second_NONE.f
index 7c0d793..9725bfe 100644
--- a/lapack/second_NONE.f
+++ b/lapack/second_NONE.f
@@ -35,8 +35,10 @@
 *> \ingroup auxOTHERauxiliary
 *
 *  =====================================================================
-*> SPDX-FileCopyrightText: The Eigen Authors
-*> SPDX-License-Identifier: BSD-3-Clause
+*> SPDX-FileCopyrightText: 1992-2015 The University of Tennessee and The University of Tennessee Research Foundation
+*> SPDX-FileCopyrightText: 2000-2015 The University of California Berkeley
+*> SPDX-FileCopyrightText: 2006-2015 The University of Colorado Denver
+*> SPDX-License-Identifier: BSD-3-Clause-Open-MPI
       REAL FUNCTION SECOND( )
 *
 *  -- LAPACK auxiliary routine (version 3.4.0) --
diff --git a/scripts/add_spdx_headers.py b/scripts/add_spdx_headers.py
index 47b3d33..0bbcc53 100755
--- a/scripts/add_spdx_headers.py
+++ b/scripts/add_spdx_headers.py
@@ -18,7 +18,7 @@
 The license id assigned to each file is determined by `classify(path)`:
 - LAPACKE/BLAS bridges with Intel copyright    -> BSD-3-Clause
 - MORSE-derived cmake/Find*.cmake modules      -> BSD-3-Clause
-- Reference-BLAS Fortran tests blas/testing/*.f -> BSD-3-Clause
+- netlib Reference-BLAS / LAPACK files         -> BSD-3-Clause-Open-MPI
 - LevenbergMarquardt MINPACK-derived headers   -> MPL-2.0 AND LicenseRef-MINPACK
 - Everything else under repo                    -> MPL-2.0
 
@@ -68,11 +68,18 @@
 # Header marker for the LevenbergMarquardt MINPACK-derived files.
 MINPACK_MARKER = b"Minpack license"
 
-# Reference-BLAS / LAPACK Fortran (Univ. of Tennessee/Berkeley/Colorado Denver).
+# netlib Reference-BLAS / LAPACK files. LAPACK's LICENSE is BSD-3-Clause plus an IP disclaimer,
+# i.e. BSD-3-Clause-Open-MPI. These files carry no Copyright line, so the holders named in that
+# LICENSE are tagged rather than The Eigen Authors.
 REFBLAS_MARKERS = (
     b"Reference BLAS is a software package",
     b"LAPACK is a software package provided by Univ. of Tennessee",
 )
+NETLIB_COPYRIGHT_HOLDERS = (
+    "The University of Tennessee and The University of Tennessee Research Foundation",
+    "The University of California Berkeley",
+    "The University of Colorado Denver",
+)
 
 # Apache-2.0 — TensorFlow-derived BFloat16, Codeplay FindComputeCpp.cmake.
 APACHE_MARKER = b"Licensed under the Apache License"
@@ -159,7 +166,7 @@
     if MINPACK_MARKER in content:
         return "MPL-2.0 AND LicenseRef-MINPACK"
     if any(m in content for m in REFBLAS_MARKERS):
-        return "BSD-3-Clause"
+        return "BSD-3-Clause-Open-MPI"
     if APACHE_MARKER in content:
         return "Apache-2.0"
     return "MPL-2.0"
@@ -241,7 +248,9 @@
     # REUSE-IgnoreStart
     spdx_lines = []
     if not has_copyright:
-        spdx_lines.append(f"{comment} SPDX-FileCopyrightText: The Eigen Authors{eol}")
+        is_netlib = spdx_id == "BSD-3-Clause-Open-MPI"
+        for holder in NETLIB_COPYRIGHT_HOLDERS if is_netlib else ("The Eigen Authors",):
+            spdx_lines.append(f"{comment} SPDX-FileCopyrightText: {holder}{eol}")
     spdx_lines.append(f"{comment} SPDX-License-Identifier: {spdx_id}{eol}")
     spdx_line = "".join(spdx_lines).encode()
     # REUSE-IgnoreEnd