forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report dependencies in CSV format (elastic#19506)
* Add dependencies-report script * Minor adjustments to template and updated notice file Co-authored-by: urso <[email protected]>
- Loading branch information
Showing
6 changed files
with
148 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13443,15 +13443,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : github.com/stretchr/testify | ||
Version: v1.5.1 | ||
Version: v1.6.1 | ||
Licence type (autodetected): MIT | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/github.com/stretchr/testify@v1.5.1/LICENSE: | ||
Contents of probable licence file $GOMODCACHE/github.com/stretchr/testify@v1.6.1/LICENSE: | ||
|
||
MIT License | ||
|
||
Copyright (c) 2012-2018 Mat Ryer and Tyler Bunnell | ||
Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -15001,11 +15001,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/[email protected] | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : go.elastic.co/go-licence-detector | ||
Version: v0.2.0 | ||
Version: v0.4.0 | ||
Licence type (autodetected): Apache-2.0 | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/go.elastic.co/go-licence-detector@v0.2.0/LICENSE: | ||
Contents of probable licence file $GOMODCACHE/go.elastic.co/go-licence-detector@v0.4.0/LICENSE: | ||
|
||
|
||
Apache License | ||
|
@@ -15478,11 +15478,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : golang.org/x/sync | ||
Version: v0.0.0-20190911185100-cd5d95a43a6e | ||
Version: v0.0.0-20200317015054-43a5402ce75a | ||
Licence type (autodetected): BSD-3-Clause | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]20190911185100-cd5d95a43a6e/LICENSE: | ||
Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]20200317015054-43a5402ce75a/LICENSE: | ||
|
||
Copyright (c) 2009 The Go Authors. All rights reserved. | ||
|
||
|
@@ -27945,11 +27945,11 @@ Contents of probable licence file $GOMODCACHE/github.com/google/[email protected]/LI | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : github.com/google/licenseclassifier | ||
Version: v0.0.0-20200108231022-9dfa8d8474eb | ||
Version: v0.0.0-20200402202327-879cb1424de0 | ||
Licence type (autodetected): Apache-2.0 | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/github.com/google/[email protected]20200108231022-9dfa8d8474eb/LICENSE: | ||
Contents of probable licence file $GOMODCACHE/github.com/google/[email protected]20200402202327-879cb1424de0/LICENSE: | ||
|
||
|
||
Apache License | ||
|
@@ -32073,11 +32073,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : github.com/karrick/godirwalk | ||
Version: v1.10.12 | ||
Version: v1.15.6 | ||
Licence type (autodetected): BSD-2-Clause | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/github.com/karrick/godirwalk@v1.10.12/LICENSE: | ||
Contents of probable licence file $GOMODCACHE/github.com/karrick/godirwalk@v1.15.6/LICENSE: | ||
|
||
BSD 2-Clause License | ||
|
||
|
@@ -32640,11 +32640,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : github.com/markbates/pkger | ||
Version: v0.15.1 | ||
Version: v0.17.0 | ||
Licence type (autodetected): MIT | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/github.com/markbates/pkger@v0.15.1/LICENSE: | ||
Contents of probable licence file $GOMODCACHE/github.com/markbates/pkger@v0.17.0/LICENSE: | ||
|
||
The MIT License (MIT) | ||
|
||
|
@@ -39496,11 +39496,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : golang.org/x/mod | ||
Version: v0.1.0 | ||
Version: v0.3.0 | ||
Licence type (autodetected): BSD-3-Clause | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/golang.org/x/mod@v0.1.0/LICENSE: | ||
Contents of probable licence file $GOMODCACHE/golang.org/x/mod@v0.3.0/LICENSE: | ||
|
||
Copyright (c) 2009 The Go Authors. All rights reserved. | ||
|
||
|
@@ -41573,6 +41573,66 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
|
||
-------------------------------------------------------------------------------- | ||
Dependency : gopkg.in/yaml.v3 | ||
Version: v3.0.0-20200313102051-9f266ea9e77c | ||
Licence type (autodetected): MIT | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/gopkg.in/[email protected]/LICENSE: | ||
|
||
|
||
This project is covered by two different licenses: MIT and Apache. | ||
|
||
#### MIT License #### | ||
|
||
The following files were ported to Go from C files of libyaml, and thus | ||
are still covered by their original MIT license, with the additional | ||
copyright staring in 2011 when the project was ported over: | ||
|
||
apic.go emitterc.go parserc.go readerc.go scannerc.go | ||
writerc.go yamlh.go yamlprivateh.go | ||
|
||
Copyright (c) 2006-2010 Kirill Simonov | ||
Copyright (c) 2006-2011 Kirill Simonov | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
### Apache License ### | ||
|
||
All the remaining project files are covered by the Apache license: | ||
|
||
Copyright (c) 2011-2019 Canonical Ltd | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
|
||
-------------------------------------------------------------------------------- | ||
Dependency : gotest.tools | ||
Version: v2.2.0+incompatible | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
set -x | ||
|
||
SRCPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
outfile=dependencies.csv | ||
|
||
while :; do | ||
case $1 in | ||
--csv) | ||
if [ "$2" ]; then | ||
outfile=$2 | ||
else | ||
echo "ERROR: --csv needs a non-empty argument" | ||
exit 1 | ||
fi | ||
shift | ||
;; | ||
--csv=?*) | ||
outfile=${1#*=} | ||
;; | ||
--csv=) | ||
echo "ERROR: --csv needs a non-empty argument" | ||
exit 1 | ||
;; | ||
*) | ||
break | ||
;; | ||
esac | ||
|
||
shift | ||
done | ||
|
||
go mod tidy | ||
go mod download | ||
go list -m -json all $@ | go run go.elastic.co/go-licence-detector \ | ||
-includeIndirect \ | ||
-rules "$SRCPATH/notice/rules.json" \ | ||
-overrides "$SRCPATH/notice/overrides.json" \ | ||
-noticeTemplate "$SRCPATH/notice/dependencies.csv.tmpl" \ | ||
-noticeOut "$outfile" \ | ||
-depsOut "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{- define "depInfo" -}} | ||
{{- range $i, $dep := . }} | ||
{{ $dep.Name }},{{ $dep.URL }},{{ $dep.Version | canonicalVersion }},{{ $dep.Version | revision }},{{ $dep.LicenceType }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
name,url,version,revision,license{{ template "depInfo" .Direct }}{{ template "depInfo" .Indirect }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters