From b75de51122b6a0185acf73395c2e480b7691894e Mon Sep 17 00:00:00 2001 From: Anton Lutteman Date: Tue, 4 Jun 2024 11:03:22 +0200 Subject: [PATCH] Adding dependency scan Change-Id: I768004272e3f700af6ab6e42e95a5418dc977989 --- NOTICE | 556 ++++++++++++++++-- playbooks/powertrain-build-blackduck-pre.yaml | 27 + playbooks/powertrain-build-blackduck.yaml | 5 + requirements.txt | 1 + roles/blackduck-run/README.me | 30 + roles/blackduck-run/defaults/main.yaml | 9 + roles/blackduck-run/files/report_script.py | 126 ++++ roles/blackduck-run/tasks/main.yaml | 131 +++++ zuul.d/jobs.yaml | 16 + zuul.d/projects.yaml | 1 + zuul.d/release-jobs.yaml | 1 + zuul.d/tox.yaml | 1 + 12 files changed, 846 insertions(+), 58 deletions(-) create mode 100644 playbooks/powertrain-build-blackduck-pre.yaml create mode 100644 playbooks/powertrain-build-blackduck.yaml create mode 100644 roles/blackduck-run/README.me create mode 100644 roles/blackduck-run/defaults/main.yaml create mode 100644 roles/blackduck-run/files/report_script.py create mode 100644 roles/blackduck-run/tasks/main.yaml create mode 100644 zuul.d/jobs.yaml diff --git a/NOTICE b/NOTICE index 902a289..98b620e 100644 --- a/NOTICE +++ b/NOTICE @@ -1,38 +1,45 @@ Copyright 2024 -[pybuild : ci] +[powertrain-build : ci] Phase: DEVELOPMENT Distribution: EXTERNAL -Components: +Components: -exceptiongroup 1.2.1 : MIT License -flake8 7.0.0 : MIT License +exceptiongroup 1.2.2 : MIT License +flake8 7.1.1 : MIT License gitdb 4.0.11 : BSD 3-clause "New" or "Revised" License GitPython 3.1.43 : BSD 3-clause "New" or "Revised" License -importlib-resources 5.4.0 : Apache License 2.0 +idna 3.8 : BSD 3-clause "New" or "Revised" License mccabe 0.7.0 : Expat License NumPy 1.24.4 : BSD 3-clause "New" or "Revised" License -Packaging 24.0 : Apache License 2.0 +Packaging 24.1 : (Apache License 2.0 AND BSD 3-clause "New" or "Revised" License) pbr 6.0.0 : Apache License 2.0 -pycodestyle 2.11.1 : MIT License +psf-requests 2.32.3 : Apache License 2.0 +pycodestyle 2.12.1 : MIT License Pyflakes 3.2.0 : MIT License +pytest 8.3.2 : MIT License +python3-charset-normalizer 3.3.2 : MIT License +python-certifi 2024.7.4 : Mozilla Public License 2.0 python-pluggy 1.5.0 : Expat License RonnyPfannschmidt/iniconfig 2.0.0 : MIT License ruamel-yaml 0.18.6 : MIT License ruamel.yaml.clib 0.2.8 : MIT License -SciPy: Scientific Library for Python 1.9.1 : BSD 3-clause "New" or "Revised" License +SciPy 1.9.1 : BSD 3-clause "New" or "Revised" License smmap 5.0.1 : BSD 3-clause "New" or "Revised" License tomli 2.0.1 : MIT License -voluptuous 0.14.2 : BSD 3-clause "New" or "Revised" License -zipp 3.18.2 : MIT License +urllib3 2.2.2 : MIT License +voluptuous 0.15.2 : BSD 3-clause "New" or "Revised" License -Copyright Text: +Copyright Text: -exceptiongroup 1.2.1 pypi:exceptiongroup/1.2.1 +exceptiongroup 1.2.2 pypi:exceptiongroup/1.2.2 Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, Copyright (c) 2022 Alex Gr +flake8 7.1.1 pypi:flake8/7.1.1 + Copyright (C) 2011-2013 Tarek Ziade + Copyright (C) 2012-2016 Ian Cordasco gitdb 4.0.11 pypi:gitdb/4.0.11 Copyright (C) 2010, 2011 Sebastian Thiel and contributorsAll rights reserved Copyright (C) 2010, 2011 Sebastian Thiel (byronimo@gmail.com) and contributors @@ -99,16 +106,16 @@ NumPy 1.24.4 pypi:numpy/1.24.4 Copyright (C) 2016 - 2019 Kim Walisch, Copyright (C) 2016 - 2019 Kim Walisch, Copyright (C) 2016 - 2019 Kim Walisch, - Copyright (C) 2016 - 2019 Kim Walisch, This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any + Copyright (C) 2016 - 2019 Kim Walisch, This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any Copyright (c) Donald Stufft and individual contributors.# All rights reserved Copyright (c) Donald Stufft and individual contributors.# All rights reserved - (C) or column-major (Fortran) order. The function * array_from_pyobj is very flexible about its Python object argument * that can be any number, list, tuple, or array. * * array_from_pyobj is + (C) or column-major (Fortran) order. The function * array_from_pyobj is very flexible about its Python object argument * that can be any number, list, tuple, or array. * * array_from_pyobj is (C) or column-major (Fortran) order. The function * array_from_pyobj is very flexible about its Python object argument * that can be any number, list, tuple, or array. * * array_from_pyobj is used (C) The data is in a single, C-style contiguous segment. F_CONTIGUOUS (F) The data is in a single, Fortran-style contiguous segment. OWNDATA (O) The array owns the (C) The data is in a single, C-style contiguous segment. F_CONTIGUOUS (F) The data is in a single, Fortran-style contiguous segment. OWNDATA (O) The array owns the memo (C) want = np.array( assert_equal(have, want) (C) want = np.array( assert_equal(have, want) def test_for_equal_names(self): -Packaging 24.0 pypi:packaging/24.0 +Packaging 24.1 pypi:packaging/24.1 copyright = ABOUT Copyright (c) Donald Stufft and individual contributors.All rights reserved pbr 6.0.0 pypi:pbr/6.0.0 @@ -129,19 +136,36 @@ pbr 6.0.0 pypi:pbr/6.0.0 Copyright (c) 2013 Testrepository Contributors Copyright (c) 2015 Hewlett-Packard Development Company, L.P. (HP) Copyright (C) 2020 Red Hat, Inc. -pycodestyle 2.11.1 pypi:pycodestyle/2.11.1 +psf-requests 2.32.3 pypi:requests/2.32.3 + Copyright 2019 Kenneth Reitz + copyright: (c) 2012 by Kenneth Reitz. + copyright: (c) 2017 by Kenneth Reitz. + Copyright Kenneth Reitz" +pycodestyle 2.12.1 pypi:pycodestyle/2.12.1 Copyright © 2006-2009 Johann C. Rocholl Copyright © 2009-2014 Florent Xicluna Copyright © 2014-2020 Ian Lee Copyright (C) 2006-2009 Johann C. Rocholl Copyright (C) 2009-2014 Florent Xicluna Copyright (C) 2014-2016 Ian Lee +pytest 8.3.2 pypi:pytest/8.3.2 + Copyright (c) 2004 Holger Krekel and others + Copyright (c) 2014, Gregory Boissinot + Copyright Holger Krekel and others, 2004. +python3-charset-normalizer 3.3.2 pypi:charset-normalizer/3.3.2 + copyright = '2023, Ahmed TAHRIauthor = 'Ahmed TAHRI' + Copyright (c) 2019 TAHRI Ahmed R. + Copyright (c) 2019 TAHRI Ahmed R. + copyright: (c) 2021 by Ahmed TAHRI + copyright: (c) 2021 by Ahmed TAHRI +python-pluggy 1.5.0 pypi:pluggy/1.5.0 + Copyright (c) 2015 holger krekel (rather uses bitbucket/hpk42) RonnyPfannschmidt/iniconfig 2.0.0 pypi:iniconfig/2.0.0 (C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed"""from __future__ import annotationsfrom typing import ( Callable, Iterator, Mapping, Optional, Tuple, TypeVar, Uni ruamel.yaml.clib 0.2.8 pypi:ruamel.yaml.clib/0.2.8 Copyright (c) 2006 Kirill Simonov Copyright (c) 2019-2023 Anthon van der Neut, Ruamel bvba -SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 +SciPy 1.9.1 pypi:scipy/1.9.1 (C) 2003, C. Bond. All rights reserved (C) 2015-2020 Niall Douglas (7 commits)File Created: August 2015 (C) 2017-2020 Niall Douglas (10 commits)File Created: June 2017 @@ -204,14 +228,14 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 (C) assert len(row_ind) == 0 assert len(col_ind) == 0 (C)*B; * if A->Stype = SLU_NR: (C)*B; * if A->Stype = SLU_NR: - (C)*B (if options->Trans * = TRANS or CONJ). * * 1.2. Permute columns of A, forming A*Pc, where Pc is a permutation * matrix that usually preserves sparsity. * - (C)*B (if options->Trans * = TRANS or CONJ). * * 1.2. Permute columns of A, forming A*Pc, where Pc is a permutation * matrix that usually preserves sparsity. * For more details of + (C)*B (if options->Trans * = TRANS or CONJ). * * 1.2. Permute columns of A, forming A*Pc, where Pc is a permutation * matrix that usually preserves sparsity. * + (C)*B (if options->Trans * = TRANS or CONJ). * * 1.2. Permute columns of A, forming A*Pc, where Pc is a permutation * matrix that usually preserves sparsity. * For more details of (C)*B; * if options->Trans = TRANS or CONJ and equed = 'R' of 'B', * B is overwritten by diag(R)*B. * * X (output) SuperMatrix* * X has types: Stype = - (C)*B; * if options->Trans = TRANS or CONJ and equed = 'R' of 'B', * B is overwritten by diag(R)*B. * * X (output) SuperMatrix* * X has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = - (C)*B; * if options->Trans = TRANS or CONJ and equed = 'R' of 'B', * B is overwritten by diag(R)*B. * * X (output) SuperMatrix* * X has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = - (C)*B; * if options->Trans = TRANS or CONJ and equed = 'R' of 'B', * B is overwritten by diag(R)*B. * * X (output) SuperMatrix* * X has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = - (C)*B; * if options->Trans = TRANS or CONJ and equed = 'R' of 'B', * B is overwritten by diag(R)*B. * * X (output) SuperMatrix* * X has types: Stype = SLU_DN, Dtype = SLU_Z, Mtype = - (C)*B (if trans = * * 2.2. Permute columns of transpose(A) (rows of A), * forming transpose(A)*Pc, where Pc is a permutation matrix that * usually preserves sparsity. * + (C)*B; * if options->Trans = TRANS or CONJ and equed = 'R' of 'B', * B is overwritten by diag(R)*B. * * X (output) SuperMatrix* * X has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = + (C)*B; * if options->Trans = TRANS or CONJ and equed = 'R' of 'B', * B is overwritten by diag(R)*B. * * X (output) SuperMatrix* * X has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = + (C)*B; * if options->Trans = TRANS or CONJ and equed = 'R' of 'B', * B is overwritten by diag(R)*B. * * X (output) SuperMatrix* * X has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = + (C)*B; * if options->Trans = TRANS or CONJ and equed = 'R' of 'B', * B is overwritten by diag(R)*B. * * X (output) SuperMatrix* * X has types: Stype = SLU_DN, Dtype = SLU_Z, Mtype = + (C)*B (if trans = * * 2.2. Permute columns of transpose(A) (rows of A), * forming transpose(A)*Pc, where Pc is a permutation matrix that * usually preserves sparsity. * (C)*B (if trans = * * 2.2. Permute columns of transpose(A) (rows of A), * forming transpose(A)*Pc, where Pc is a permutation matrix that * usually preserves sparsity. * For more de (C)* BOOST_CONTRACT_DETAIL_NAME1(obj) \ BOOST_CONTRACT_DETAIL_TVARIADIC_COMMA(arity) \ BOOST_CONTRACT_DETAIL_TVARIADIC_FPARAMS_Z(z, arity, \ BOOST_CONTRACT_DETA (C) BOOST_MPL_AUX_VALUE_WKND(C)#else @@ -366,8 +390,8 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard - (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,// Howard Hinnant and John Maddock 2000. - (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,// Howard Hinnant and John Maddock 2000, 2010. + (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,// Howard Hinnant and John Maddock 2000. + (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,// Howard Hinnant and John Maddock 2000, 2010. (C) Copyright David Abrahams 2000. (C) Copyright David Abrahams 2001. (C) Copyright David Abrahams 2001 - 2002. @@ -650,7 +674,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 (C) Dsp = self.spmatrix(D) assert_almost_equal(Csp.multiply(Dsp).toarray(), C*D) # sparse/sparse assert_almost_equal(Csp.multiply(D).toarray(), C*D) # sparse/dense (C) elements.push_back(el); // MAY THROW (C) } (C)#else #define BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER_WCHAR(C) \ BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER(wchar_t, C) \ /**/#endif - (C)*EPS) GO TO 1510 CONTINUE15 S=XA*T/3.0D0 R=S DO 20 K=1,50 R=-.5D0*R*(4.0D0*K-1.0D0)/K/(2.0D0*K+1.0D0) & /(4.0D0*K+3.0D0)*T2 + (C)*EPS) GO TO 1510 CONTINUE15 S=XA*T/3.0D0 R=S DO 20 K=1,50 R=-.5D0*R*(4.0D0*K-1.0D0)/K/(2.0D0*K+1.0D0) & /(4.0D0*K+3.0D0)*T2 (C) * equed = * If A->Stype = SLU_NR: (C) * equed = * If A->Stype = SLU_NR: (C) * equed = * * If options->RowPerm = LargeDiag_MC64, MC64 is used to scale and permute * the matrix to an I-matrix, that is A is modified as follows: @@ -662,7 +686,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 (C) @f //! //! @param g //! A monadic function with signature @f$ A \to M(B) @f$. (C) @f //! we could simply set //! @code //! monadic_compose(g, f)(x) = joker(transform(f(x), g)) //! @endcode //! //! and we would be happy. It turns out that `flatten` is (C) IF (DABS((WA-WA0)/WA).LT.EPS.AND.K.GT.10) GO TO 3010 WA0=WA ELSE IF (W0.GT.2.5.AND.W0.LT.4.5) THEN M=85 C=Z0 CF1=Z0 CF - (C) (if options->Trans = NOTRANS) or diag(R) * (if options->Trans = TRANS or CONJ) so that it solves the * original system before equilibration. * * 1.9. options for ILU only * 1) + (C) (if options->Trans = NOTRANS) or diag(R) * (if options->Trans = TRANS or CONJ) so that it solves the * original system before equilibration. * * 1.9. options for ILU only * 1) (C) (if options->Trans = NOTRANS) or diag(R) * (if options->Trans = TRANS or CONJ) so that it solves the * original system before equilibration. * * 2. If A is stored row-wis (C) (if options->Trans = NOTRANS) or diag(R) * (if options->Trans = TRANS or CONJ) so that it solves the * original system before equilibration. * * See supermatrix.h for the (C) (if options->Trans = NOTRANS) or diag(R) * (if options->Trans = TRANS or CONJ) so that it solves the * original system before equilibration. * * See supermatrix.h for the definitio @@ -698,7 +722,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright 1984, 1987, 2000 by Stephen L. Moshier */ Copyright 1984, 1987 by Stephen L. Moshier * Direct inquiries to 30 Frost Street, Cambridge, MA 02140 */ Copyright 1984, 1991 by Stephen L. Moshier * Direct inquiries to 30 Frost Street, Cambridge, MA 02140 */ - Copyright 1984 - 1994 by Stephen L. Moshier * * * Alternatively, we also can use the functions from the Rmath library + Copyright 1984 - 1994 by Stephen L. Moshier * * * Alternatively, we also can use the functions from the Rmath library Copyright 1984, 1995, 2000 by Stephen L. Moshier Copyright 1984, 1995, 2000 by Stephen L. Moshier*/ Copyright 1984, 1995 by Stephen L. Moshier */ @@ -857,7 +881,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright: 2007-2008 CodeRage, LLC * Author: Jonathan Turkanis * Contact: turkanis at coderage dot com Copyright: 2007-2008 CodeRage, LLC * Author: Jonathan Turkanis * Contact: turkanis at coderage dot com */ Copyright: 2007-2008 CodeRage, LLC * Author: Jonathan Turkanis * Contact: turkanis at coderage dot com * * Defines the function boost::iostreams::detail::absolute_path, used for * deb - Copyright: 2007-2008 CodeRage, LLC * Author: Jonathan Turkanis * Contact: turkanis at coderage dot com * * Defines the function boost::iostreams::detail::current_directory, used by * + Copyright: 2007-2008 CodeRage, LLC * Author: Jonathan Turkanis * Contact: turkanis at coderage dot com * * Defines the function boost::iostreams::detail::current_directory, used by * Copyright: 2007-2008 CodeRage, LLC * Author: Jonathan Turkanis * Contact: turkanis at coderage dot com * * Defines the preprocessor symbol BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS for * pla Copyright: 2007-2008 CodeRage, LLC * Author: Jonathan Turkanis * Contact: turkanis at coderage dot com * * If included with the macro BOOST_IOSTREAMS_RESTRICT undefined, defines the * Copyright 2007-2012 Christian Henning, Andreas Pokorny @@ -1274,7 +1298,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright Bryce Lelbach 2010 copyright by Renee Touzin)under the BSD licence. The following files have been removed from the original library: Copyright (c) 1992-2013 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. - Copyright (c) 1993-2019 C.B. Barber Arlington, MA + Copyright (c) 1993-2019 C.B. Barber Arlington, MA Copyright (c) 1993-2019 C.B. Barber. $Id: //main/2019/qhull/src/libqhull_r/merge_r.c#12 $$Change: 2712 $ $DateTime: 2019/06/28 12:57:00 $$Author: bbarber $*/ Copyright (c) 1993-2019 C.B. Barber. $Id: //main/2019/qhull/src/libqhull_r/merge_r.h#1 $$Change: 2661 $ $DateTime: 2019/05/24 20:09:58 $$Author: bbarber $*/ Copyright (c) 1993-2019 The Geometry Center. $Id: //main/2019/qhull/src/libqhull_r/geom2_r.c#15 $$Change: 2712 $ $DateTime: 2019/06/28 12:57:00 $$Author: bbarber $ @@ -1314,7 +1338,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 1996// Silicon Graphics Computer Systems, Inc. Copyright (c) 1996 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted withou Copyright (c) 1998-2000 - Copyright (c) 1998-2000 Theodore C. Belding /* University of Michigan Center for the Study of Complex Systems */ /* Ted.Belding@umich.edu) + Copyright (c) 1998-2000 Theodore C. Belding /* University of Michigan Center for the Study of Complex Systems */ /* Ted.Belding@umich.edu) Copyright (c) 1998-2002 Copyright (c) 1998-2002 Joel de Guzman Copyright (c) 1998-2003 by the University of Florida. All Rights Reserved @@ -1335,14 +1359,14 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2000-2002 Copyright (c) 2000-2003 Brian McNamara and Yannis Smaragdakis Copyright (c) 2000-2004 - Copyright (c) 2000-2006, 2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * - Copyright (c) 2000-2006 Wolfgang Hoermann and Josef Leydold * Dept. for Statistics, University of Economics, Vienna, Austria * * + Copyright (c) 2000-2006, 2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * + Copyright (c) 2000-2006 Wolfgang Hoermann and Josef Leydold * Dept. for Statistics, University of Economics, Vienna, Austria * * Copyright (c) 2000-2007 Copyright (c) 2000-2009 Copyright (c) 2000-2010 Copyright (c) 2000-2010// Joerg Walter, Mathias Koch, David Bellot Copyright (c) 2000-2010// Joerg Walter, Mathias Koch, Gunter Winkler, David Bellot - Copyright (c) 2000-2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * + Copyright (c) 2000-2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * Copyright (c) 2000-2011 Joerg Walter, Mathias Koch, David Bellot Copyright (c) 2000-2013 Copyright (c) 2000-2013 The University of California Berkeley. All rights reserved. @@ -1487,7 +1511,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2003-2005 CrystalClear Software, Inc. Copyright (c) 2003-2005 Peter Dimov Copyright (C) 2003-2005 Peter J. Verveer - Copyright (C) 2003-2005 Peter J. Verveer * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * + Copyright (C) 2003-2005 Peter J. Verveer * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * Copyright (c) 2003-2006, 2008 Gennaro Prota Copyright (c) 2003, 2006 Gerald I. Evenden Copyright (C) 2003, 2007-14 Massachusetts Institute of Technology @@ -1522,7 +1546,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2003 Paul Mensonides Copyright (c) 2003 Peter Dimov Copyright (c) 2003 Peter Dimov Distributed under the Boost - Copyright (c) 2003, The Regents of the University of California, throughLawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy) + Copyright (c) 2003, The Regents of the University of California, throughLawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy) Copyright (c) 2003, The Regents of the University of California, throughLawrence Berkeley National Laboratory (subject to receipt of any requiredapprovals from U.S. Dept. of Energy) Copyright (c) 2003 Thomas Witt Copyright (c) 2003 Vaclav Vesely @@ -1599,7 +1623,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2006-2007 Matias Capeletto Copyright (c) 2006-2007, Robert Hetland Copyright (c) 2006-2007 Tobias Schwinger - Copyright (c) 2006-2008 Alexander Chemeris// // Redistribution and use in source and binary forms, with or without// modification, are permitted provided that the following conditions are met:// + Copyright (c) 2006-2008 Alexander Chemeris// // Redistribution and use in source and binary forms, with or without// modification, are permitted provided that the following conditions are met:// Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. Copyright (c) 2006-2008 Johan Rade Copyright (C) 2006-2009, 2012 Alexander Nasonov @@ -1609,7 +1633,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. Copyright (C) 2006-2010 The Trustees of Indiana University. Copyright (c) 2006-2013 Emil Dotchevski and Reverge Studios, Inc. - Copyright (c) 2006-2013 The University of Colorado Denver. All rights reserved. + Copyright (c) 2006-2013 The University of Colorado Denver. All rights reserved. Copyright (c) 2006-7 John Maddock Copyright (C) 2006 Arkadiy Vertleyb Copyright (c) 2006 CrystalClear Software, Inc. @@ -1704,7 +1728,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2008-2009: Joachim Faulhaber+------------------------------------------------------------------------------+ Copyright (c) 2008, 2009 Peter Dimov Copyright (c) 2008-2010: Joachim Faulhaber - Copyright (c) 2008-2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * + Copyright (c) 2008-2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * Copyright (c) 2008-2011 Bruno Lalande, Paris, France. Copyright (C) 2008-2011 Daniel James. Copyright (c) 2008-2011 Hartmut Kaiser @@ -1752,20 +1776,20 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2009-2010 Hartmut Kaiser Copyright (c) 2009-2010: Joachim Faulhaber Copyright (c) 2009-2010, Marco Guazzone - Copyright (c) 2009-2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * + Copyright (c) 2009-2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) Copyright (c) 2009-2011 Christopher Schmidt Copyright (c) 2009, 2011 Helge Bahmann Copyright (c) 2009-2011: Joachim Faulhaber Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - Copyright (c) 2009-2011 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * + Copyright (c) 2009-2011 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. Copyright (C) 2009-2012 Lorenzo Caminiti Copyright (c) 2009-2012, Marco Guazzone Copyright (c) 2009-2012 Mateusz Loskot, London, UK. Copyright (c) 2009-2012 Mateusz Loskot, London, UK. - Copyright (c) 2009-2012 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * + Copyright (c) 2009-2012 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * Copyright (c) 2009-2013 Mateusz Loskot, London, UK. Copyright (c) 2009-2013 Mateusz Loskot, London, UK. Copyright (C) 2009-2013 Tim Blechmann @@ -1803,7 +1827,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2009, Spirent Communications, Inc. Copyright (C) 2009 Steven Watanabe Copyright (C) 2009 Trustees of Indiana University - Copyright (c) 2009 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * + Copyright (c) 2009 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * Copyright (c) 2010-2010: Joachim Faulhaber Copyright (c) 2010-2011 Bryce Lelbach Copyright (c) 2010-2011 Christopher Schmidt @@ -1841,7 +1865,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2010 Thomas Heller Copyright (c) 2010 Thomas P. Robitaille Copyright (C) 2010 Tim Blechmann - Copyright (c) 2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * + Copyright (c) 2010 Wolfgang Hoermann and Josef Leydold * Department of Statistics and Mathematics, WU Wien, Austria * * Copyright (c) 2011 Copyright (c) 2011-2011: Joachim Faulhaber Copyright (c) 2011-2012 @@ -1853,7 +1877,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (c) 2011-2012 Mateusz Loskot, London, UK. Copyright (c) 2011-2012 Thomas Bernard Copyright (C) 2011-2012 Vicente J. Botet Escriba - Copyright (c) 2011-2012 Wolfgang Hoermann and Josef Leydold * Institute for Statistics and Mathematics, WU Wien, Austria * * + Copyright (c) 2011-2012 Wolfgang Hoermann and Josef Leydold * Institute for Statistics and Mathematics, WU Wien, Austria * * Copyright (C) 2011-2013, 2016 Tim Blechmann Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland. Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland. @@ -1995,7 +2019,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 Copyright (C) 2013 Jakob Lykke Andersen, University of Southern Denmark// (jlandersen@imada.sdu.dk) Copyright (c) 2013 Jamboree Copyright (c) 2013 Joaquim Duran - Copyright (c) 2013 John Maddock, Antony Polukhin// + Copyright (c) 2013 John Maddock, Antony Polukhin// Copyright (C) 2013 Kenneth L. Ho Copyright (C) 2013 Kenneth L. Ho# Redistribution and use in source and binary forms, with or without# modification, are permitted provided that the following conditions are met: Copyright (c) 2013 Kyle Lutz @@ -2158,9 +2182,9 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 copyright (c) 2015, Oracle and/or its affiliates. Copyright (c) 2015 Oracle and/or its affiliates. Copyright (c) 2015, Oracle and/or its affiliates. - Copyright (c) 2015, Oracle and/or its affiliates.// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle// + Copyright (c) 2015, Oracle and/or its affiliates.// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle// Copyright (c) 2015 Orson Peters This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any dam - Copyright (c) 2015 Orson Peters// This software is provided 'as-is', without any express or implied warranty. In no event will the// authors be held liable for any damages arising from the use of + Copyright (c) 2015 Orson Peters// This software is provided 'as-is', without any express or implied warranty. In no event will the// authors be held liable for any damages arising from the use of Copyright (c) 2015 Paul Fultz II Copyright (C) 2015, Pauli Virtanen Copyright (c) 2015 Robert Ramey @@ -2523,7 +2547,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 copyright follows: copyright for code they wrote and submit for Copyright for the original TNBC Fortran routines: - Copyright for the original TNBC fortran routines: * * TRUNCATED-NEWTON METHOD: SUBROUTINES * WRITTEN BY: STEPHEN G. NASH * SCHOOL OF INFORMATION TECHNOLOGY & ENGINEERING * + Copyright for the original TNBC fortran routines: * * TRUNCATED-NEWTON METHOD: SUBROUTINES * WRITTEN BY: STEPHEN G. NASH * SCHOOL OF INFORMATION TECHNOLOGY & ENGINEERING * Copyright for the original version: Copyright Frank Mori Hess 2007. Copyright Frank Mori Hess 2007-2008. @@ -2789,7 +2813,7 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 (C) or diag(R)). if ( notran && colequ ) for (i = 0; i < A->ncol; ++i) work[i] *= C[i]; else if ( !notran && rowequ ) for (i = 0; i < A->nrow; ++i) work[i] *= R[i]; dgstrs (transt (C) or diag(R)). if ( notran && colequ ) for (i = 0; i < A->ncol; ++i) work[i] *= C[i]; else if ( !notran && rowequ ) for (i = 0; i < A->nrow; ++i) work[i] *= R[i]; sgstrs (transt (C) or diag(R)). if ( notran && colequ ) for (i = 0; i < A->ncol; ++i) { zd_mult(&work[i], &work[i], C[i]); } else if ( !notran && rowequ ) for (i = 0; i < A->nr - (C) PI=3.141592653589793D0 A0=A A1=A X0=X HG=0.0D0C DLMF 13.2.39 IF (X.LT.0.0D0) THEN A=B-A A0=A X=DABS(X) + (C) PI=3.141592653589793D0 A0=A A1=A X0=X HG=0.0D0C DLMF 13.2.39 IF (X.LT.0.0D0) THEN A=B-A A0=A X=DABS(X) (C) Rasmus Munk Larsen, Stanford, 1999, 2004c (C) Rasmus Munk Larsen, Stanford University, 1999, 2004c (C) Rasmus Munk Larsen, Stanford University, 2000,2004c @@ -2801,23 +2825,25 @@ SciPy: Scientific Library for Python 1.9.1 pypi:scipy/1.9.1 (C) Rasmus Munk Larsen, Stanford University, 2000c (C) Rasmus Munk Larsen, Stanford University, 2000c subroutine clearstat implicit none include 'stat.h' nopx = 0 nreorth = 0 ndot = 0 nitref = 0 nbsvd = (C) Rasmus Munk Larsen, Stanford University, 2004c - (C) Rasmus Munk Larsen, Stanford University, 2004c + (C) Rasmus Munk Larsen, Stanford University, 2004c (C) Rasmus Munk Larsen, Stanford University, March 2004. (C) REG=1.0D0 IF (M+NM.GT.80) REG=1.0D-200 NM2=2*NM+M CX=C*X CALL SPHY(NM2,CX,NM2,SY,DY) R0=REG DO 10 J=1,2*M+IP10 R0=R0*J R=R0 - (C) REG=1.0D0 IF (M+NM.GT.80) REG=1.0D-200 R0=REG DO 10 J=1,2*M+IP10 R0=R0*J R=R0 SUC=R*DF(1) SW=0.0D0 DO 15 K=2,NM + (C) REG=1.0D0 IF (M+NM.GT.80) REG=1.0D-200 R0=REG DO 10 J=1,2*M+IP10 R0=R0*J R=R0 SUC=R*DF(1) SW=0.0D0 DO 15 K=2,NM (C) self.outputs = self.C.shape (C)` to respect the signature of - (C) * (y = 1. / sin(D)); y *= D * sin(lp_lat); } else x = y = 0.; if (this->m_proj_parm.mode == + (C) * (y = 1. / sin(D)); y *= D * sin(lp_lat); } else x = y = 0.; if (this->m_proj_parm.mode == smmap 5.0.1 pypi:smmap/5.0.1 Copyright (C) 2010, 2011 Sebastian Thiel and contributorsAll rights reserved tomli 2.0.1 pypi:tomli/2.0.1 Copyright (c) 2021 Taneli Hukkinen +voluptuous 0.15.2 pypi:voluptuous/0.15.2 + Copyright (c) 2010, Alec ThomasAll rights reserved -Licenses: +Licenses: Apache License 2.0 -(importlib-resources 5.4.0, Packaging 24.0, pbr 6.0.0) +(Packaging 24.1, pbr 6.0.0, psf-requests 2.32.3) Apache License Version 2.0, January 2004 @@ -3004,7 +3030,7 @@ third-party archives. --- BSD 3-clause "New" or "Revised" License -(gitdb 4.0.11, GitPython 3.1.43, NumPy 1.24.4, SciPy: Scientific Library for Python 1.9.1, smmap 5.0.1, voluptuous 0.14.2) +(gitdb 4.0.11, GitPython 3.1.43, idna 3.8, NumPy 1.24.4, Packaging 24.1, SciPy 1.9.1, smmap 5.0.1, voluptuous 0.15.2) Copyright (c) , All rights reserved. @@ -3094,7 +3120,7 @@ SOFTWARE --- MIT License -(exceptiongroup 1.2.1, flake8 7.0.0, pycodestyle 2.11.1, Pyflakes 3.2.0, RonnyPfannschmidt/iniconfig 2.0.0, ruamel-yaml 0.18.6, ruamel.yaml.clib 0.2.8, zipp 3.18.2) +(exceptiongroup 1.2.2, flake8 7.1.1, pycodestyle 2.12.1, Pyflakes 3.2.0, pytest 8.3.2, python3-charset-normalizer 3.3.2, RonnyPfannschmidt/iniconfig 2.0.0, ruamel-yaml 0.18.6, ruamel.yaml.clib 0.2.8, urllib3 2.2.2) The MIT License =============== @@ -3120,3 +3146,417 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- +Mozilla Public License 2.0 +(python-certifi 2024.7.4) + +Mozilla Public License +Version 2.0 +====================== + + +1. Definitions +-------------- + + 1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the creation + of, or owns Covered Software. + + 1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + + 1.3. "Contribution" + + means Covered Software of a particular Contributor. + + 1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the notice + in Exhibit A, the Executable Form of such Source Code Form, and Modifications + of such Source Code Form, in each case including portions thereof. + + 1.5. "Incompatible With Secondary Licenses" + + means + + a. + + that the initial Contributor has attached the notice described in Exhibit B + to the Covered Software; or + + b. + + that the Covered Software was made available under the terms of version 1.1 + or earlier of the License, but not also under the terms of a Secondary + License. + + 1.6. "Executable Form" + + means any form of the work other than Source Code Form. + + 1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + + 1.8. "License" + + means this document. + + 1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed + by this License. + + 1.10. "Modifications" + + means any of the following: + + a. + + any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. + + any new file in Source Code Form that contains any Covered Software. + + 1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, process, and + apparatus claims, in any patent Licensable by such Contributor that would be + infringed, but for the grant of the License, by the making, using, selling, + offering for sale, having made, import, or transfer of either its Contributions + or its Contributor Version. + + 1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public License, + Version 3.0, or any later versions of those licenses. + + 1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + + 1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this License. For + legal entities, "You" includes any entity that controls, is controlled by, or + is under common control with You. For purposes of this definition, "control" + means (a) the power, direct or indirect, to cause the direction or management + of such entity, whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial ownership of such + entity. + + +2. License Grants and Conditions +-------------------------------- + + + 2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive + license: + + a. + + under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, modify, + display, perform, distribute, and otherwise exploit its Contributions, + either on an unmodified basis, with Modifications, or as part of a Larger + Work; and + + b. + + under Patent Claims of such Contributor to make, use, sell, offer for sale, + have made, import, and otherwise transfer either its Contributions or its + Contributor Version. + + + 2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + + + 2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding + Section 2.1(b) above, no patent license is granted by a Contributor: + + a. + + for any code that a Contributor has removed from Covered Software; or + + b. + + for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. + + under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the notice + requirements in Section 3.4). + + + 2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to distribute + the Covered Software under a subsequent version of this License (see + Section 10.2) or under the terms of a Secondary License (if permitted under the + terms of Section 3.3). + + + 2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions are + its original creation(s) or it has sufficient rights to grant the rights to its + Contributions conveyed by this License. + + + 2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + + + 2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities +------------------- + + + 3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form of + the Covered Software is governed by the terms of this License, and how they can + obtain a copy of this License. You may not attempt to alter or restrict the + recipients' rights in the Source Code Form. + + + 3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. + + such Covered Software must also be made available in Source Code Form, as + described in Section 3.1, and You must inform recipients of the Executable + Form how they can obtain a copy of such Source Code Form by reasonable + means in a timely manner, at a charge no more than the cost of distribution + to the recipient; and + + b. + + You may distribute such Executable Form under the terms of this License, or + sublicense it under different terms, provided that the license for the + Executable Form does not attempt to limit or alter the recipients' rights + in the Source Code Form under this License. + + + 3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software with + a work governed by one or more Secondary Licenses, and the Covered Software is + not Incompatible With Secondary Licenses, this License permits You to + additionally distribute such Covered Software under the terms of such Secondary + License(s), so that the recipient of the Larger Work may, at their option, + further distribute the Covered Software under the terms of either this License + or such Secondary License(s). + + + 3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations of + liability) contained within the Source Code Form of the Covered Software, + except that You may alter any license notices to the extent required to remedy + known factual inaccuracies. + + + 3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, indemnity + or liability obligations to one or more recipients of Covered Software. + However, You may do so only on Your own behalf, and not on behalf of any + Contributor. You must make it absolutely clear that any such warranty, support, + indemnity, or liability obligation is offered by You alone, and You hereby + agree to indemnify every Contributor for any liability incurred by such + Contributor as a result of warranty, support, indemnity or liability terms You + offer. You may include additional disclaimers of warranty and limitations of + liability specific to any jurisdiction. + + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this License with +respect to some or all of the Covered Software due to statute, judicial order, or +regulation then You must: (a) comply with the terms of this License to the +maximum extent possible; and (b) describe the limitations and the code they +affect. Such description must be placed in a text file included with all +distributions of the Covered Software under this License. Except to the extent +prohibited by statute or regulation, such description must be sufficiently +detailed for a recipient of ordinary skill to be able to understand it. + + +5. Termination +-------------- + + 5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, then + the rights granted under this License from a particular Contributor are + reinstated (a) provisionally, unless and until such Contributor explicitly and + finally terminates Your grants, and (b) on an ongoing basis, if such + Contributor fails to notify You of the non-compliance by some reasonable means + prior to 60 days after You have come back into compliance. Moreover, Your + grants from a particular Contributor are reinstated on an ongoing basis if such + Contributor notifies You of the non-compliance by some reasonable means, this + is the first time You have received notice of non-compliance with this License + from such Contributor, and You become compliant prior to 30 days after Your + receipt of the notice. + + 5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, and + cross-claims) alleging that a Contributor Version directly or indirectly + infringes any patent, then the rights granted to You by any and all + Contributors for the Covered Software under Section 2.1 of this License shall + terminate. + + 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + + +6. Disclaimer of Warranty +------------------------- + +Covered Software is provided under this License on an "as is" basis, without +warranty of any kind, either expressed, implied, or statutory, including, without +limitation, warranties that the Covered Software is free of defects, +merchantable, fit for a particular purpose or non-infringing. The entire risk as +to the quality and performance of the Covered Software is with You. Should any +Covered Software prove defective in any respect, You (not any Contributor) assume +the cost of any necessary servicing, repair, or correction. This disclaimer of +warranty constitutes an essential part of this License. No use of any Covered +Software is authorized under this License except under this disclaimer. + + +7. Limitation of Liability +-------------------------- + +Under no circumstances and under no legal theory, whether tort (including +negligence), contract, or otherwise, shall any Contributor, or anyone who +distributes Covered Software as permitted above, be liable to You for any direct, +indirect, special, incidental, or consequential damages of any character +including, without limitation, damages for lost profits, loss of goodwill, work +stoppage, computer failure or malfunction, or any and all other commercial +damages or losses, even if such party shall have been informed of the possibility +of such damages. This limitation of liability shall not apply to liability for +death or personal injury resulting from such party's negligence to the extent +applicable law prohibits such limitation. Some jurisdictions do not allow the +exclusion or limitation of incidental or consequential damages, so this exclusion +and limitation may not apply to You. + + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the courts of a +jurisdiction where the defendant maintains its principal place of business and +such litigation shall be governed by laws of that jurisdiction, without reference +to its conflict-of-law provisions. Nothing in this Section shall prevent a +party's ability to bring cross-claims or counter-claims. + + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject matter +hereof. If any provision of this License is held to be unenforceable, such +provision shall be reformed only to the extent necessary to make it enforceable. +Any law or regulation which provides that the language of a contract shall be +construed against the drafter shall not be used to construe this License against +a Contributor. + + +10. Versions of the License +--------------------------- + + + 10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section 10.3, + no one other than the license steward has the right to modify or publish new + versions of this License. Each version will be given a distinguishing version + number. + + + 10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of the + License under which You originally received the Covered Software, or under the + terms of any subsequent version published by the license steward. + + + 10.3. Modified Versions + + If you create software not governed by this License, and you want to create a + new license for such software, you may create and use a modified version of + this License if you rename the license and remove any references to the name of + the license steward (except to note that such modified license differs from + this License). + + + 10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses + + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the notice + described in Exhibit B of this License must be attached. + + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public License, + v. 2.0. If a copy of the MPL was not distributed with this file, You can + obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as defined + by the Mozilla Public License, v. 2.0. + +--- + diff --git a/playbooks/powertrain-build-blackduck-pre.yaml b/playbooks/powertrain-build-blackduck-pre.yaml new file mode 100644 index 0000000..cb8cd87 --- /dev/null +++ b/playbooks/powertrain-build-blackduck-pre.yaml @@ -0,0 +1,27 @@ +--- +- name: Blackduck pre + hosts: all + roles: + - role: ensure-java + - role: ensure-pip + tasks: + - name: Fetch detect + ansible.builtin.get_url: + url: https://detect.synopsys.com/detect8.sh + dest: "{{ zuul.project.src_dir }}/detect8.sh" + mode: "0755" + + - name: Install requirements from requirements files + ansible.builtin.pip: + requirements: "{{ item }}" + args: + chdir: "{{ zuul.project.src_dir }}" + loop: + - requirements.txt + - test-requirements.txt + + - name: Install unzip + ansible.builtin.package: + name: unzip + state: present + become: true diff --git a/playbooks/powertrain-build-blackduck.yaml b/playbooks/powertrain-build-blackduck.yaml new file mode 100644 index 0000000..88a4060 --- /dev/null +++ b/playbooks/powertrain-build-blackduck.yaml @@ -0,0 +1,5 @@ +--- +- name: Blackduck run + hosts: all + roles: + - blackduck-run diff --git a/requirements.txt b/requirements.txt index 0dcec7f..5a096fa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ gitpython >= 3.1.8 pbr >= 6.0.0 +requests == 2.32.3 ruamel.yaml.clib == 0.2.7; python_version == "3.6" ruamel.yaml == 0.17.21; python_version == "3.6" ruamel.yaml == 0.18.6; python_version > "3.6" diff --git a/roles/blackduck-run/README.me b/roles/blackduck-run/README.me new file mode 100644 index 0000000..b0247d8 --- /dev/null +++ b/roles/blackduck-run/README.me @@ -0,0 +1,30 @@ +This Ansible role `blackduck-run` is designed to interact with the Black Duck to generate and manage license reports. + +**Role Variables** + +.. zuul:rolevar:: blackduck_workspace + :default: "{{ workspace | default(zuul.project.src_dir) }}" + +.. zuul:rolevar:: blackduck_url + :default: https://apus-blackduck.volvocars.biz + +.. zuul:rolevar:: blackduck_package_version + :default: ci + +.. zuul:rolevar:: blackduck_project_name + :default: "{{ zuul.project.short_name }}" + +.. zuul:rolevar:: blackduck_additional_arguments + :default: "" + +.. zuul:rolevar:: blackduck_scan_mode + :default: INTELLIGENT + +.. zuul:rolevar:: blackduck_fail_on_policy_violation + :default: ALL + +.. zuul:rolevar:: blackduck_signature_scanner + :default: SNIPPET_MATCHING + +.. zuul:rolevar:: blackduck_run_risk_report + :default: true \ No newline at end of file diff --git a/roles/blackduck-run/defaults/main.yaml b/roles/blackduck-run/defaults/main.yaml new file mode 100644 index 0000000..6b2a116 --- /dev/null +++ b/roles/blackduck-run/defaults/main.yaml @@ -0,0 +1,9 @@ +blackduck_workspace: "{{ workspace | default(zuul.project.src_dir) }}" +blackduck_url: https://apus-blackduck.volvocars.biz +blackduck_package_version: ci +blackduck_project_name: "{{ zuul.project.short_name }}" +blackduck_additional_arguments: "" +blackduck_scan_mode: INTELLIGENT +blackduck_fail_on_policy_violation: ALL +blackduck_signature_scanner: SNIPPET_MATCHING +blackduck_run_risk_report: true diff --git a/roles/blackduck-run/files/report_script.py b/roles/blackduck-run/files/report_script.py new file mode 100644 index 0000000..476beca --- /dev/null +++ b/roles/blackduck-run/files/report_script.py @@ -0,0 +1,126 @@ +"""Script generating and fetching notice report.""" + +import os +import re +import time +import requests +from ruamel.yaml import YAML +from requests.adapters import HTTPAdapter, Retry + +def get_bearer_token(blackduck_url, api_token): + """Get bearer token for Black Duck API. + + Args: + blackduck_url (str): Black Duck URL. + api_token (str): API token. + + Returns: + str: Bearer token. + + """ + + + + response = requests.post( + f"{blackduck_url}/api/tokens/authenticate", + headers={ + 'Authorization': f'token {api_token}', + 'Accept': 'application/vnd.blackducksoftware.user-4+json' + } + ) + return response.json().get('bearerToken') + +def create_notice_file(blackduck_url, bearer_token, version): + """Create notice file for the given version. + + Args: + blackduck_url (str): Black Duck URL. + bearer_token (str): Bearer token. + version (str): Version ID. + + Returns: + str: Link header. + + """ + + data = { + "reportFormat": "TEXT", + "versionId": version, + "categories": ["COPYRIGHT_TEXT"], + } + response = requests.post( + f"{blackduck_url}/api/versions/{version}/license-reports/", + headers={ + 'Authorization': f'Bearer {bearer_token}', + "Accept": "application/vnd.blackducksoftware.report-4+json", + "Content-Type": "application/vnd.blackducksoftware.report-4+json" + }, + json=data + ) + return response.headers.get('Link') + +def extract_download_url(link_header): + """Extract download URL from the link header. + + Args: + link_header (str): Link header. + + Returns: + str: Download URL. + + """ + + + urls = re.findall('<(.*?)>', link_header) + rels = re.findall('rel="(.*?)"', link_header) + link_dict = dict(zip(rels, urls)) + return link_dict.get('download') + +def download_report(download_url, bearer_token, output_file): + """Download the notice report. + + Args: + download_url (str): Download URL. + bearer_token (str): Bearer token. + output_file (str): Output file. + + """ + + session = requests.Session() + retry = Retry( + total=10, + backoff_factor=10, + status_forcelist=[500, 502, 503, 504] + ) + adapter = HTTPAdapter(max_retries=retry) + session.mount('https://', adapter) + response = session.get( + download_url, + headers={ + 'Authorization': f'Bearer {bearer_token}', + "Accept": "application/vnd.blackducksoftware.report-4+json" + } + ) + with open(output_file, 'wb') as file: + file.write(response.content) + +def main(): + """Main function.""" + + yaml = YAML(typ='safe', pure=True) + report_version = os.getenv("REPORT_VERSION", "") + version = yaml.load(report_version) + blackduck_token = os.getenv("BLACKDUCK_TOKEN", "") + api_token = yaml.load(blackduck_token) + url = os.getenv("BLACKDUCK_URL", "") + blackduck_url = yaml.load(url) + + bearer_token = get_bearer_token(blackduck_url, api_token) + link_header = create_notice_file(blackduck_url, bearer_token, version) + download_url = extract_download_url(link_header) + + time.sleep(60) # Wait for the report to be generated + download_report(download_url, bearer_token, 'license-report.zip') + +if __name__ == "__main__": + main() diff --git a/roles/blackduck-run/tasks/main.yaml b/roles/blackduck-run/tasks/main.yaml new file mode 100644 index 0000000..fd66d4f --- /dev/null +++ b/roles/blackduck-run/tasks/main.yaml @@ -0,0 +1,131 @@ +--- +- name: Run Blackduck + ansible.builtin.shell: > + bash detect8.sh + --detect.project.name={{ blackduck_project_name }} + --detect.project.version.name={{ blackduck_package_version }} + --blackduck.url={{ blackduck_url }} + --blackduck.api.token=$BLACKDUCK_TOKEN + --detect.blackduck.scan.mode={{ blackduck_scan_mode }} + --detect.policy.check.fail.on.severities={{ blackduck_fail_on_policy_violation }} + --detect.blackduck.signature.scanner.snippet.matching={{ blackduck_signature_scanner }} + --detect.risk.report.pdf={{ blackduck_run_risk_report }} + {{ blackduck_additional_arguments }} > blackduck_output.txt + args: + chdir: "{{ blackduck_workspace }}" + environment: + BLACKDUCK_TOKEN: "{{ blackduck_secret.token }}" + register: blackduck_result + no_log: true + failed_when: false + +- name: Print Blackduck log + ansible.builtin.command: cat blackduck_output.txt + args: + chdir: "{{ blackduck_workspace }}" + register: blackduck_log + +- name: Extract version using regex + set_fact: + blackduck_report_version: "{{ (blackduck_log | regex_search('versions/([^/]+)/components', '\\1'))[0] }}" + +- name: Generate and fetch License Report + ansible.builtin.command: python3 roles/blackduck-run/files/report_script.py + args: + chdir: "{{ blackduck_workspace }}" + environment: + BLACKDUCK_TOKEN: "{{ blackduck_secret.token }}" + REPORT_VERSION: "{{ blackduck_report_version }}" + BLACKDUCK_URL: "{{ blackduck_url }}" + no_log: true + +- name: Unpack license-report.zip + ansible.builtin.unarchive: + src: "{{ blackduck_workspace }}/license-report.zip" + dest: "{{ blackduck_workspace }}" + remote_src: true + +- name: Find the notice file + ansible.builtin.find: + paths: "{{ blackduck_workspace }}" + patterns: "version-license_*.txt" + recurse: true + register: found_files + +- name: Get notice file path + ansible.builtin.set_fact: + notice_file_path: "{{ found_files.files[0].path }}" + +- name: Set notice file name + ansible.builtin.set_fact: + notice_file_name: "{{ notice_file_path.split('/')[-1] }}" + +- name: Copy the notice file to blackduck workspace + ansible.builtin.copy: + src: "{{ notice_file_path }}" + dest: "{{ blackduck_workspace }}" + remote_src: true + +- name: Replace NOTICE with new notice file + ansible.builtin.copy: + src: "{{ notice_file_path }}" + dest: "{{ blackduck_workspace }}/NOTICE" + remote_src: true + force: true + +- name: Git diff NOTICE + ansible.builtin.command: git diff --ignore-space-at-eol NOTICE + args: + chdir: "{{ blackduck_workspace }}" + register: notice_diff + +- name: Set diff diff_exists + ansible.builtin.set_fact: + diff_exists: "{{ notice_diff.stdout_lines | length > 0 }}" + +- name: Save git diff + when: diff_exists + ansible.builtin.copy: + content: "{{ notice_diff.stdout }}" + dest: "{{ blackduck_workspace }}/notice_diff.txt" + +- name: Copy Reports to zuul-output/logs + ansible.builtin.copy: + dest: "{{ ansible_user_dir }}/zuul-output/logs/" + src: "{{ zuul.project.src_dir }}/{{ item }}" + remote_src: true + loop: + - "powertrain_build_ci_BlackDuck_RiskReport.pdf" + - "{{ notice_file_name }}" + - "{{ 'notice_diff.txt' if diff_exists else '' }}" + when: item != '' + +- name: Return artifact to Zuul + zuul_return: + data: + zuul: + artifacts: + - name: "{{ item }}" + url: "{{ item }}" + loop: + - "powertrain_build_ci_BlackDuck_RiskReport.pdf" + - "{{ notice_file_name }}" + - "{{ 'notice_diff.txt' if diff_exists else '' }}" + when: item != '' + +- name: Fail blackduck + when: blackduck_result.rc != 0 or diff_exists + block: + - name: Inform user that Black Duck failed + ansible.builtin.debug: + msg: "Black Duck returned non 0 rc" + when: blackduck_result.rc != 0 + + - name: Inform user that NOTICE file has changed + ansible.builtin.debug: + msg: "NOTICE file has changed" + when: diff_exists + always: + - name: Fail the job + ansible.builtin.fail: + msg: "Failing the job because Black Duck failed or NOTICE file has changed" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml new file mode 100644 index 0000000..6ac265e --- /dev/null +++ b/zuul.d/jobs.yaml @@ -0,0 +1,16 @@ +- job: + name: powertrain-build-blackduck + parent: base + pre-run: playbooks/powertrain-build-blackduck-pre.yaml + run: playbooks/powertrain-build-blackduck.yaml + timeout: 10800 + attempts: 1 + vars: + blackduck_additional_arguments: + --detect.pip.path=/usr/bin/pip + --detect.python.path=/usr/bin/python3 + --detect.pip.requirements.path="requirements.txt, test-requirements.txt" + secrets: + - name: blackduck_secret + secret: blackduck + nodeset: ubuntu-jammy diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index e3bf505..4a145b9 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -7,6 +7,7 @@ jobs: - noop - powertrain-build-tox + - powertrain-build-blackduck release: jobs: - release-powertrain-build diff --git a/zuul.d/release-jobs.yaml b/zuul.d/release-jobs.yaml index 26f9ff4..9f3b58a 100644 --- a/zuul.d/release-jobs.yaml +++ b/zuul.d/release-jobs.yaml @@ -10,3 +10,4 @@ - name: pypi_info secret: powertrain-build-pypi pass-to-parent: true + nodeset: ubuntu-jammy diff --git a/zuul.d/tox.yaml b/zuul.d/tox.yaml index ca00e74..65c81f0 100644 --- a/zuul.d/tox.yaml +++ b/zuul.d/tox.yaml @@ -3,3 +3,4 @@ parent: tox vars: tox_envlist: flake8,pytest + nodeset: ubuntu-jammy