license_finder 7.0.1 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +7 -0
- data/.pre-commit-hooks.yaml +10 -0
- data/.rubocop.yml +5 -1
- data/CHANGELOG.md +41 -0
- data/CONTRIBUTING.md +1 -0
- data/Dockerfile +129 -122
- data/README.md +53 -14
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/ci/pipelines/pull-request.yml.erb +29 -32
- data/ci/pipelines/release.yml.erb +17 -41
- data/ci/scripts/run-tests.sh +20 -4
- data/ci/tasks/rubocop.yml +3 -3
- data/ci/tasks/update-changelog.yml +2 -2
- data/dlf +6 -1
- data/lib/license_finder/cli/base.rb +2 -0
- data/lib/license_finder/cli/licenses.rb +8 -3
- data/lib/license_finder/cli/main.rb +3 -1
- data/lib/license_finder/configuration.rb +8 -0
- data/lib/license_finder/core.rb +4 -2
- data/lib/license_finder/decision_applier.rb +1 -1
- data/lib/license_finder/decisions.rb +24 -6
- data/lib/license_finder/license/definitions.rb +129 -19
- data/lib/license_finder/license/templates/AGPL3.txt +661 -0
- data/lib/license_finder/license/templates/Apache2.txt +0 -2
- data/lib/license_finder/license/templates/Artistic.txt +128 -0
- data/lib/license_finder/license/templates/CC01_alt.txt +31 -0
- data/lib/license_finder/license/templates/CDDL1_1.txt +123 -0
- data/lib/license_finder/license/templates/CPL1.txt +217 -0
- data/lib/license_finder/license/templates/EPL2.txt +80 -0
- data/lib/license_finder/license/templates/Unlicense.txt +24 -0
- data/lib/license_finder/license/text.rb +4 -0
- data/lib/license_finder/license.rb +1 -1
- data/lib/license_finder/manual_licenses.rb +79 -0
- data/lib/license_finder/package.rb +1 -0
- data/lib/license_finder/package_manager.rb +2 -1
- data/lib/license_finder/package_managers/cargo.rb +1 -1
- data/lib/license_finder/package_managers/conan.rb +50 -8
- data/lib/license_finder/package_managers/dep.rb +43 -41
- data/lib/license_finder/package_managers/dotnet.rb +5 -2
- data/lib/license_finder/package_managers/go_dep.rb +1 -1
- data/lib/license_finder/package_managers/go_workspace.rb +3 -2
- data/lib/license_finder/package_managers/maven.rb +18 -10
- data/lib/license_finder/package_managers/npm.rb +14 -1
- data/lib/license_finder/package_managers/nuget.rb +5 -0
- data/lib/license_finder/package_managers/pip.rb +1 -1
- data/lib/license_finder/package_managers/pnpm.rb +126 -0
- data/lib/license_finder/package_managers/yarn.rb +69 -20
- data/lib/license_finder/package_utils/conan_info_parser.rb +2 -2
- data/lib/license_finder/package_utils/conan_info_parser_v2.rb +82 -0
- data/lib/license_finder/package_utils/license_files.rb +12 -2
- data/lib/license_finder/package_utils/licensing.rb +2 -1
- data/lib/license_finder/package_utils/maven_dependency_finder.rb +43 -1
- data/lib/license_finder/package_utils/notice_files.rb +14 -3
- data/lib/license_finder/package_utils/possible_license_file.rb +8 -2
- data/lib/license_finder/package_utils/pypi.rb +3 -1
- data/lib/license_finder/packages/maven_package.rb +13 -1
- data/lib/license_finder/packages/npm_package.rb +56 -9
- data/lib/license_finder/packages/pnpm_package.rb +13 -0
- data/lib/license_finder/printer.rb +2 -2
- data/lib/license_finder/reports/csv_report.rb +10 -1
- data/lib/license_finder/scanner.rb +3 -3
- data/license_finder.gemspec +12 -11
- metadata +54 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea2f57657f8f3dba53174ad258ba5110faea56db4bc43053d0534758dae68cf6
|
4
|
+
data.tar.gz: b4f8e8a5a1f079f0a0d72cf204136c90146d5e769e39a892b7400ad5df1b5fbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c22e4175e51437d7be9b3a0fda548fe71df5f7620e78ffbfe855eb26c81b6f6add55a9358e845f3d312b51ba077804f951c830339c7364b33426b5aa7658b06d
|
7
|
+
data.tar.gz: 74189994406c098243463a2d2da803453f6ad8550eb0b77df294158add2cd1694051b2e26f224eceb2a6719f6e66d0e7c9b90cf8d5a502404c035fe8677279bf
|
data/.github/dependabot.yml
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
- id: license-finder
|
2
|
+
name: Audit licenses of dependencies
|
3
|
+
entry: license_finder
|
4
|
+
language: ruby
|
5
|
+
pass_filenames: false
|
6
|
+
description: >
|
7
|
+
LicenseFinder works with your package managers to find dependencies, detect
|
8
|
+
the licenses of the packages in them, compare those licenses against a
|
9
|
+
user-defined list of permitted licenses, and give you an actionable
|
10
|
+
exception report.
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.6.0
|
3
3
|
Exclude:
|
4
4
|
- 'lib/license_finder/reports/**/*'
|
5
5
|
- 'features/fixtures/**/*'
|
@@ -78,3 +78,7 @@ FileName:
|
|
78
78
|
ModuleFunction:
|
79
79
|
Enabled: false
|
80
80
|
EnforcedStyle: extend_self
|
81
|
+
# Custom ERB Template needs the to_s
|
82
|
+
Lint/RedundantStringCoercion:
|
83
|
+
Exclude:
|
84
|
+
- 'examples/custom_erb_template.rb'
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,43 @@
|
|
1
|
+
# [7.2.0] / 2024-05-07
|
2
|
+
|
3
|
+
### Added
|
4
|
+
* Add more license detection - [b3dde46e](https://github.com/pivotal/LicenseFinder/commit/b3dde46e2018aef9b6436a04777ec33d40a134e4) - Simon Warren
|
5
|
+
* Unlicense - [6fb571ca](https://github.com/pivotal/LicenseFinder/commit/6fb571cad9b5ee856c0984ca79aa7604afdd818b) - Jim Kane
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
* Ensure licenses are recognised by `spdx_id` - [b263f500](https://github.com/pivotal/LicenseFinder/commit/b263f500eaaf802e90ee023c4a6c4b6aa068dd7e) - Simon Warren
|
9
|
+
* Ensure yarn runs in "current" project dir - [37d52f2b](https://github.com/pivotal/LicenseFinder/commit/37d52f2b4503d799a4c551b573848e9bbbce4848) - Simon Warren
|
10
|
+
* Fix CPL1 pretty name - [3ae49861](https://github.com/pivotal/LicenseFinder/commit/3ae49861dbfaf0bbd023d68dabad067f32775f48) - Simon Warren
|
11
|
+
* Fix 'unknown' Yarn 2 licenses - [f57745be](https://github.com/pivotal/LicenseFinder/commit/f57745be34bb7774577ea577671ea7b5c3246576) - Simon Warren
|
12
|
+
* Print subproject paths when logging - [add2f969](https://github.com/pivotal/LicenseFinder/commit/add2f9698a0f3c02d3148655a4b538e2f557d2be) - Simon Warren
|
13
|
+
|
14
|
+
### Deprecated
|
15
|
+
* - Remove Dep package manager for jammy release - [42bed10d](https://github.com/pivotal/LicenseFinder/commit/42bed10d80e4b0e6fac1c62dd5eca2097ffc3517)
|
16
|
+
|
17
|
+
# [7.1.0] / 2022-11-28
|
18
|
+
|
19
|
+
### Added
|
20
|
+
* Missing New BSD alternative name - [64d425d9](https://github.com/pivotal/LicenseFinder/commit/64d425d9210794c6b45c60bf730931e459a1e959)
|
21
|
+
* pre-commit hook - [2fd5ac85](https://github.com/pivotal/LicenseFinder/commit/2fd5ac85fbd4ea03b6f274f2c977448a8a517c2c) - Kurt von Laven
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
* - Apache 2 license being too restrictive on matching - [c7fd0399](https://github.com/pivotal/LicenseFinder/commit/c7fd03994592ca97408f5134dd9eac6566e51c48)
|
25
|
+
* - Erlang not installing properly with mix - [74af3885](https://github.com/pivotal/LicenseFinder/commit/74af388579dd2f26b1814ece39c869d684218cd9)
|
26
|
+
* Scan transitive Yarn v2+ dependencies - [0115445e](https://github.com/pivotal/LicenseFinder/commit/0115445eb26de3185518adfb257b0e1911cf2fbd) - Kurt von Laven
|
27
|
+
|
28
|
+
* Issue with chaining commands with dlf - [a6af8c3e](https://github.com/pivotal/LicenseFinder/commit/a6af8c3e0abb932ed8d3c0215175f23cf75b5fb2)
|
29
|
+
* Nuget and dotnet not returning proper licenses - [e3452336](https://github.com/pivotal/LicenseFinder/commit/e3452336aa980f26de9a7d44d725bddb0ddd67a0)
|
30
|
+
* Save help documentation for the default file name - [09a93762](https://github.com/pivotal/LicenseFinder/commit/09a93762dc3bd714fdcdebb4aa84af4c7dbefa04)
|
31
|
+
* - Yarn2 output parsing - [395a7f02](https://github.com/pivotal/LicenseFinder/commit/395a7f02b7729243aaf730b6ede71cae8f21cfeb)
|
32
|
+
|
33
|
+
### Changed
|
34
|
+
* - Bump docker image golang version to 1.17.13 - [4f3df246](https://github.com/pivotal/LicenseFinder/commit/4f3df246d2f5245681a943a6fb6dee49e3ed3ed1)
|
35
|
+
|
1
36
|
# [7.0.1] / 2022-03-18
|
37
|
+
### Fixed
|
38
|
+
* Maven Wrapper command path must be relative to working directory - [298a733a](https://github.com/pivotal/LicenseFinder/commit/298a733a67f34341ffabc7dfbf2ee5c27574b979) - jbmgrtn
|
39
|
+
* Support yarn license command for yarn v2+ - [ed3b319b](https://github.com/pivotal/LicenseFinder/commit/ed3b319b64bf9c72c12fd5a365952137cf7f33b6)
|
40
|
+
|
2
41
|
|
3
42
|
# [7.0.0] / 2022-03-04
|
4
43
|
|
@@ -1010,3 +1049,5 @@ Bugfixes:
|
|
1010
1049
|
[6.15.0]: https://github.com/pivotal/LicenseFinder/compare/v6.14.2...v6.15.0
|
1011
1050
|
[7.0.0]: https://github.com/pivotal/LicenseFinder/compare/v6.15.0...v7.0.0
|
1012
1051
|
[7.0.1]: https://github.com/pivotal/LicenseFinder/compare/v7.0.0...v7.0.1
|
1052
|
+
[7.1.0]: https://github.com/pivotal/LicenseFinder/compare/v7.0.1...v7.1.0
|
1053
|
+
[7.2.0]: https://github.com/pivotal/LicenseFinder/compare/v7.1.0...v7.2.0
|
data/CONTRIBUTING.md
CHANGED
@@ -78,6 +78,7 @@ If you come up with something useful, consider posting it to the Google Group
|
|
78
78
|
To successfully run the test suite, you will need the following installed:
|
79
79
|
- NPM (requires Node)
|
80
80
|
- Yarn (requires Node)
|
81
|
+
- PNPM (requires Node)
|
81
82
|
- Bower (requires Node and NPM)
|
82
83
|
- Maven (requires Java)
|
83
84
|
- Gradle (requires Java)
|
data/Dockerfile
CHANGED
@@ -1,75 +1,74 @@
|
|
1
|
-
FROM ubuntu:
|
1
|
+
FROM ubuntu:jammy
|
2
2
|
|
3
3
|
WORKDIR /tmp
|
4
4
|
|
5
5
|
# Versioning
|
6
|
-
ENV PIP_INSTALL_VERSION 19.0.2
|
7
6
|
ENV PIP3_INSTALL_VERSION 20.0.2
|
8
|
-
ENV GO_LANG_VERSION 1.
|
9
|
-
ENV MAVEN_VERSION 3.6.0
|
7
|
+
ENV GO_LANG_VERSION 1.17.13
|
10
8
|
ENV SBT_VERSION 1.3.3
|
11
9
|
ENV GRADLE_VERSION 5.6.4
|
12
|
-
ENV RUBY_VERSION 3.
|
13
|
-
ENV MIX_VERSION 1.0
|
10
|
+
ENV RUBY_VERSION 3.2.3
|
14
11
|
ENV COMPOSER_ALLOW_SUPERUSER 1
|
15
12
|
|
16
13
|
# programs needed for building
|
17
|
-
RUN apt-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
RUN add-apt-repository ppa:git-core/ppa &&
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
14
|
+
RUN apt -q update && apt install -y \
|
15
|
+
build-essential \
|
16
|
+
curl \
|
17
|
+
unzip \
|
18
|
+
wget \
|
19
|
+
gnupg2 \
|
20
|
+
apt-utils \
|
21
|
+
software-properties-common \
|
22
|
+
bzr && \
|
23
|
+
rm -rf /var/lib/apt/lists/*
|
24
|
+
|
25
|
+
RUN add-apt-repository ppa:git-core/ppa && \
|
26
|
+
apt -q update && apt install -y git && rm -rf /var/lib/apt/lists/*
|
27
|
+
|
28
|
+
# install nodejs
|
29
|
+
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
|
30
|
+
apt -q update && apt install -y nodejs && rm -rf /var/lib/apt/lists/*
|
33
31
|
|
34
32
|
# install yarn
|
35
|
-
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |
|
36
|
-
|
37
|
-
|
38
|
-
apt-get install yarn
|
33
|
+
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
34
|
+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
35
|
+
apt -q update && apt install -y yarn && rm -rf /var/lib/apt/lists/*
|
39
36
|
|
40
37
|
# install bower
|
41
38
|
RUN npm install -g bower && \
|
42
39
|
echo '{ "allow_root": true }' > /root/.bowerrc
|
43
40
|
|
41
|
+
# install pnpm
|
42
|
+
RUN npm install -g pnpm && \
|
43
|
+
pnpm version
|
44
|
+
|
44
45
|
# install jdk 12
|
45
46
|
RUN curl -L -o openjdk12.tar.gz https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz && \
|
46
47
|
tar xvf openjdk12.tar.gz && \
|
47
48
|
rm openjdk12.tar.gz && \
|
48
|
-
|
49
|
-
|
49
|
+
mv jdk-12.0.2 /opt/ && \
|
50
|
+
rm /opt/jdk-12.0.2/lib/src.zip
|
50
51
|
ENV JAVA_HOME=/opt/jdk-12.0.2
|
51
52
|
ENV PATH=$PATH:$JAVA_HOME/bin
|
52
53
|
RUN java -version
|
53
54
|
|
54
55
|
# install rebar3
|
55
56
|
RUN curl -o rebar3 https://s3.amazonaws.com/rebar3/rebar3 && \
|
56
|
-
|
57
|
-
|
57
|
+
chmod +x rebar3 && \
|
58
|
+
mv rebar3 /usr/local/bin/rebar3
|
58
59
|
|
59
60
|
# install and update python and python-pip
|
60
|
-
RUN apt-
|
61
|
-
|
62
|
-
|
61
|
+
RUN apt -q update && apt install -y python3-pip && \
|
62
|
+
rm -rf /var/lib/apt/lists/* && \
|
63
|
+
python3 -m pip install pip==$PIP3_INSTALL_VERSION --upgrade
|
63
64
|
|
64
65
|
# install maven
|
65
|
-
RUN
|
66
|
-
|
67
|
-
mv apache-maven-$MAVEN_VERSION /usr/local/lib/maven && \
|
68
|
-
ln -s /usr/local/lib/maven/bin/mvn /usr/local/bin/mvn
|
66
|
+
RUN apt -q update && apt install -y maven && \
|
67
|
+
rm -rf /var/lib/apt/lists/*
|
69
68
|
|
70
69
|
# install sbt
|
71
70
|
RUN mkdir -p /usr/local/share/sbt-launcher-packaging && \
|
72
|
-
curl
|
71
|
+
curl \
|
73
72
|
--retry 3 \
|
74
73
|
--retry-delay 15 \
|
75
74
|
--location "https://github.com/sbt/sbt/releases/download/v${SBT_VERSION}/sbt-${SBT_VERSION}.tgz" \
|
@@ -95,18 +94,32 @@ ENV PATH=$PATH:/go/bin
|
|
95
94
|
ENV GOROOT=/go
|
96
95
|
ENV GOPATH=/gopath
|
97
96
|
ENV PATH=$PATH:$GOPATH/bin
|
97
|
+
|
98
98
|
RUN mkdir /gopath && \
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
99
|
+
go install github.com/tools/godep@latest && \
|
100
|
+
go install github.com/FiloSottile/gvt@latest && \
|
101
|
+
go install github.com/kardianos/govendor@latest && \
|
102
|
+
go clean -cache
|
103
|
+
|
104
|
+
#install rvm and glide
|
105
|
+
RUN apt-add-repository -y ppa:rael-gc/rvm && \
|
106
|
+
apt -q update && apt install -y rvm && \
|
107
|
+
/usr/share/rvm/bin/rvm install --default $RUBY_VERSION && \
|
108
|
+
apt install -y golang-glide && \
|
109
|
+
rm -rf /var/lib/apt/lists/*
|
110
|
+
|
111
|
+
# install trash
|
112
|
+
RUN curl -Lo trash.tar.gz https://github.com/rancher/trash/releases/download/v0.2.7/trash-linux_amd64.tar.gz && \
|
113
|
+
tar xvf trash.tar.gz && \
|
114
|
+
rm trash.tar.gz && \
|
115
|
+
mv trash /usr/local/bin/
|
116
|
+
|
117
|
+
# install bundler
|
118
|
+
RUN bash -lc "gem update --system && gem install bundler"
|
106
119
|
|
107
120
|
WORKDIR /tmp
|
108
121
|
# Fix the locale
|
109
|
-
RUN apt-
|
122
|
+
RUN apt -q update && apt install -y locales && rm -rf /var/lib/apt/lists/*
|
110
123
|
RUN locale-gen en_US.UTF-8
|
111
124
|
ENV LANG=en_US.UTF-8
|
112
125
|
ENV LANGUAGE=en_US:en
|
@@ -115,57 +128,49 @@ ENV LC_ALL=en_US.UTF-8
|
|
115
128
|
# install Cargo
|
116
129
|
RUN curl https://sh.rustup.rs -sSf | bash -ls -- -y --profile minimal
|
117
130
|
|
118
|
-
#install rvm
|
119
|
-
RUN apt-add-repository -y ppa:rael-gc/rvm && \
|
120
|
-
apt update && apt install -y rvm && \
|
121
|
-
/usr/share/rvm/bin/rvm install --default $RUBY_VERSION
|
122
|
-
|
123
|
-
# install bundler
|
124
|
-
RUN bash -lc "gem update --system && gem install bundler"
|
125
|
-
|
126
131
|
#install mix
|
127
|
-
RUN
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
132
|
+
RUN curl -1sLf 'https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/setup.deb.sh' | bash
|
133
|
+
RUN apt -q update && apt install -y erlang && rm -rf /var/lib/apt/lists/*
|
134
|
+
# Install Elixir
|
135
|
+
WORKDIR /tmp/elixir-build
|
136
|
+
RUN git clone https://github.com/elixir-lang/elixir.git
|
137
|
+
WORKDIR elixir
|
138
|
+
RUN make && make install
|
139
|
+
WORKDIR /
|
133
140
|
|
134
141
|
# install conan
|
135
|
-
RUN apt-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
142
|
+
RUN apt -q update && apt install -y python3-dev && rm -rf /var/lib/apt/lists/* && \
|
143
|
+
pip install --no-cache-dir --ignore-installed six --ignore-installed colorama \
|
144
|
+
--ignore-installed requests --ignore-installed chardet \
|
145
|
+
--ignore-installed urllib3 \
|
146
|
+
--upgrade setuptools && \
|
147
|
+
pip3 install --no-cache-dir -Iv conan==1.51.3 && \
|
141
148
|
conan config install https://github.com/conan-io/conanclientcert.git
|
142
149
|
|
143
|
-
|
144
150
|
# install NuGet (w. mono)
|
145
151
|
# https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#macoslinux
|
146
152
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF &&\
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
curl -o "/usr/local/bin/nugetv3.5.0.exe" "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe"
|
153
|
+
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official-stable.list &&\
|
154
|
+
apt -q update && apt install -y mono-complete && rm -rf /var/lib/apt/lists/* &&\
|
155
|
+
curl -o "/usr/local/bin/nuget.exe" "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" &&\
|
156
|
+
curl -o "/usr/local/bin/nugetv3.5.0.exe" "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe"
|
152
157
|
|
153
158
|
# install dotnet core
|
154
|
-
RUN wget -q https://packages.microsoft.com/config/ubuntu/
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
+
RUN wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb &&\
|
160
|
+
dpkg -i packages-microsoft-prod.deb &&\
|
161
|
+
rm packages-microsoft-prod.deb &&\
|
162
|
+
apt -q update &&\
|
163
|
+
apt install -y dotnet-sdk-6.0 dotnet-sdk-7.0 &&\
|
164
|
+
rm -rf /var/lib/apt/lists/*
|
159
165
|
|
160
166
|
# install Composer
|
161
167
|
# The ARG and ENV are for installing tzdata which is part of this installaion.
|
162
168
|
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
|
163
169
|
ENV TZ=GMT
|
164
170
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5267A6C &&\
|
165
|
-
echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu
|
166
|
-
apt-get update &&\
|
171
|
+
echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" | tee /etc/apt/sources.list.d/php.list &&\
|
167
172
|
export DEBIAN_FRONTEND=noninteractive &&\
|
168
|
-
apt-
|
173
|
+
apt -q update && apt install -y php7.4-cli && rm -rf /var/lib/apt/lists/* &&\
|
169
174
|
EXPECTED_COMPOSER_INSTALLER_CHECKSUM="$(curl --silent https://composer.github.io/installer.sig)" &&\
|
170
175
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&\
|
171
176
|
ACTUAL_COMPOSER_INSTALLER_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" &&\
|
@@ -178,60 +183,43 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5
|
|
178
183
|
# See https://docs.conda.io/en/latest/miniconda_hashes.html
|
179
184
|
# for latest versions and SHAs.
|
180
185
|
RUN \
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
186
|
+
conda_installer=Miniconda3-py38_4.9.2-Linux-x86_64.sh &&\
|
187
|
+
ref='1314b90489f154602fd794accfc90446111514a5a72fe1f71ab83e07de9504a7' &&\
|
188
|
+
wget -q https://repo.anaconda.com/miniconda/${conda_installer} &&\
|
189
|
+
sha=`openssl sha256 "${conda_installer}" | cut -d' ' -f2` &&\
|
190
|
+
([ "$sha" = "${ref}" ] || (echo "Verification failed: ${sha} != ${ref}"; false)) &&\
|
191
|
+
(echo; echo "yes") | sh "${conda_installer}"
|
187
192
|
|
188
193
|
# install Swift Package Manager
|
189
|
-
# Based on https://github.com/apple/swift-docker/blob/main/5.
|
194
|
+
# Based on https://github.com/apple/swift-docker/blob/main/5.8/ubuntu/22.04/Dockerfile
|
190
195
|
# The GPG download steps has been modified. Keys are now on LF repo and copied instaad of downloaded.
|
191
196
|
# Refer to https://swift.org/download/#using-downloads in the Linux section on how to download the keys
|
192
|
-
RUN apt-
|
193
|
-
libatomic1 \
|
194
|
-
libcurl4 \
|
195
|
-
libxml2 \
|
196
|
-
libedit2 \
|
197
|
-
libsqlite3-0 \
|
198
|
-
libc6-dev \
|
197
|
+
RUN apt -q update && apt -q install -y \
|
199
198
|
binutils \
|
200
|
-
libgcc-5-dev \
|
201
|
-
libstdc++-5-dev \
|
202
|
-
zlib1g-dev \
|
203
|
-
libpython2.7 \
|
204
|
-
tzdata \
|
205
199
|
git \
|
200
|
+
gnupg2 \
|
201
|
+
libc6-dev \
|
202
|
+
libedit2 \
|
203
|
+
libgcc-9-dev \
|
204
|
+
libcurl4-openssl-dev \
|
205
|
+
libpython3-dev \
|
206
|
+
libsqlite3-0 \
|
207
|
+
libstdc++-9-dev \
|
208
|
+
libxml2-dev \
|
209
|
+
libz3-dev \
|
206
210
|
pkg-config \
|
211
|
+
python3-lldb-13 \
|
212
|
+
tzdata \
|
213
|
+
zlib1g-dev \
|
207
214
|
&& rm -r /var/lib/apt/lists/*
|
208
215
|
|
209
|
-
#install flutter
|
210
|
-
ENV FLUTTER_HOME=/root/flutter
|
211
|
-
RUN curl -o flutter_linux_2.8.1-stable.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_2.8.1-stable.tar.xz \
|
212
|
-
&& tar xf flutter_linux_2.8.1-stable.tar.xz \
|
213
|
-
&& mv flutter ${FLUTTER_HOME} \
|
214
|
-
&& rm flutter_linux_2.8.1-stable.tar.xz
|
215
|
-
|
216
|
-
ENV PATH=$PATH:${FLUTTER_HOME}/bin:${FLUTTER_HOME}/bin/cache/dart-sdk/bin
|
217
|
-
RUN flutter doctor -v \
|
218
|
-
&& flutter update-packages \
|
219
|
-
&& flutter precache
|
220
|
-
# Accepting all licences
|
221
|
-
RUN yes | flutter doctor --android-licenses -v
|
222
|
-
# Creating Flutter sample projects to put binaries in cache fore each template type
|
223
|
-
RUN flutter create --template=app ${TEMP}/app_sample \
|
224
|
-
&& flutter create --template=package ${TEMP}/package_sample \
|
225
|
-
&& flutter create --template=plugin ${TEMP}/plugin_sample
|
226
|
-
|
227
|
-
|
228
216
|
# pub 4096R/ED3D1561 2019-03-22 [SC] [expires: 2023-03-23]
|
229
217
|
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
|
230
218
|
# uid Swift 5.x Release Signing Key <swift-infrastructure@swift.org
|
231
219
|
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
|
232
|
-
ARG SWIFT_PLATFORM=
|
233
|
-
ARG SWIFT_BRANCH=swift-5.
|
234
|
-
ARG SWIFT_VERSION=swift-5.
|
220
|
+
ARG SWIFT_PLATFORM=ubuntu22.04
|
221
|
+
ARG SWIFT_BRANCH=swift-5.8-release
|
222
|
+
ARG SWIFT_VERSION=swift-5.8-RELEASE
|
235
223
|
ARG SWIFT_WEBROOT=https://download.swift.org
|
236
224
|
|
237
225
|
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
|
@@ -247,7 +235,7 @@ RUN set -e; \
|
|
247
235
|
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
|
248
236
|
# - Grab curl here so we cache better up above
|
249
237
|
&& export DEBIAN_FRONTEND=noninteractive \
|
250
|
-
&& apt
|
238
|
+
&& apt -q update && apt -q install -y curl && rm -rf /var/lib/apt/lists/* \
|
251
239
|
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
|
252
240
|
&& export GNUPGHOME="$(mktemp -d)" \
|
253
241
|
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \
|
@@ -259,6 +247,25 @@ RUN set -e; \
|
|
259
247
|
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
|
260
248
|
set +e
|
261
249
|
|
250
|
+
# install flutter
|
251
|
+
ENV FLUTTER_HOME=/root/flutter
|
252
|
+
RUN git config --global --add safe.directory /root/flutter
|
253
|
+
RUN curl -o flutter_linux_2.8.1-stable.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_2.8.1-stable.tar.xz \
|
254
|
+
&& tar xf flutter_linux_2.8.1-stable.tar.xz \
|
255
|
+
&& mv flutter ${FLUTTER_HOME} \
|
256
|
+
&& rm flutter_linux_2.8.1-stable.tar.xz
|
257
|
+
|
258
|
+
ENV PATH=$PATH:${FLUTTER_HOME}/bin:${FLUTTER_HOME}/bin/cache/dart-sdk/bin
|
259
|
+
RUN flutter doctor -v \
|
260
|
+
&& flutter update-packages \
|
261
|
+
&& flutter precache
|
262
|
+
# Accepting all licences
|
263
|
+
RUN yes | flutter doctor --android-licenses -v
|
264
|
+
# Creating Flutter sample projects to put binaries in cache fore each template type
|
265
|
+
RUN flutter create --template=app ${TEMP}/app_sample \
|
266
|
+
&& flutter create --template=package ${TEMP}/package_sample \
|
267
|
+
&& flutter create --template=plugin ${TEMP}/plugin_sample
|
268
|
+
|
262
269
|
# install license_finder
|
263
270
|
COPY . /LicenseFinder
|
264
271
|
RUN bash -lc "cd /LicenseFinder && bundle config set no-cache 'true' && bundle install -j4 && bundle pristine && rake install"
|
data/README.md
CHANGED
@@ -3,11 +3,10 @@
|
|
3
3
|
[](https://codeclimate.com/github/pivotal/LicenseFinder)
|
4
4
|
|
5
5
|
Build status
|
6
|
-
* Ruby 2.
|
7
|
-
* Ruby
|
8
|
-
* Ruby 2.
|
9
|
-
* Ruby
|
10
|
-
* Ruby 3.1.1 [](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
|
6
|
+
* Ruby 2.7.8 [](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
|
7
|
+
* Ruby 3.1.4 [](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
|
8
|
+
* Ruby 3.2.3 [](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
|
9
|
+
* Ruby 3.3.0 [](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
|
11
10
|
|
12
11
|
|
13
12
|
LicenseFinder works with your package managers to find dependencies,
|
@@ -57,8 +56,19 @@ and give you an actionable exception report.
|
|
57
56
|
|
58
57
|
## Installation
|
59
58
|
|
60
|
-
License Finder
|
61
|
-
|
59
|
+
License Finder may be run as a [pre-commit](https://pre-commit.com) hook by
|
60
|
+
adding the following to your `.pre-commit-config.yaml`:
|
61
|
+
|
62
|
+
```yaml
|
63
|
+
repos:
|
64
|
+
- repo: https://github.com/pivotal/LicenseFinder
|
65
|
+
rev: v7.1.0 # You probably want the latest tag.
|
66
|
+
hooks:
|
67
|
+
- id: license-finder
|
68
|
+
```
|
69
|
+
|
70
|
+
Running License Finder directly requires Ruby 2.6.0 or greater. If you have an
|
71
|
+
older version of Ruby installed, you can update via Homebrew:
|
62
72
|
|
63
73
|
```sh
|
64
74
|
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
@@ -70,7 +80,7 @@ then:
|
|
70
80
|
$ brew install ruby
|
71
81
|
```
|
72
82
|
|
73
|
-
The easiest way to use `license_finder` is to install it as a command
|
83
|
+
The easiest way to use `license_finder` directly is to install it as a command
|
74
84
|
line tool, like brew, awk, gem or bundler:
|
75
85
|
|
76
86
|
```sh
|
@@ -154,7 +164,8 @@ $ dlf "bundle install && license_finder"
|
|
154
164
|
|
155
165
|
You can better understand the way this script works by looking at its source, but for
|
156
166
|
reference it will mount your current directory at the path `/scan` and run any commands
|
157
|
-
passed to it from that directory.
|
167
|
+
passed to it from that directory. If your command has `&&`, ensure you quote the command.
|
168
|
+
If it does not, ensure the command is not quoted.
|
158
169
|
|
159
170
|
Note that the docker image will run the gem which is installed within it.
|
160
171
|
So the docker image tagged `7.0.0` will run *License Finder Version 7.0.0*
|
@@ -195,7 +206,7 @@ languages, as long as that language has a package definition in the project dire
|
|
195
206
|
* `build.sbt` file (for `sbt`)
|
196
207
|
* `Cargo.lock` file (for `cargo`)
|
197
208
|
* `composer.lock` file (for `composer`)
|
198
|
-
* `environment
|
209
|
+
* `environment.yml` file (for `conda`)
|
199
210
|
* `pubspec.yaml & .pub cache locaton through ENV variable` (for `flutter`)
|
200
211
|
|
201
212
|
### Continuous Integration
|
@@ -333,12 +344,40 @@ you should manually research what the actual license is. When you
|
|
333
344
|
have established the real license, you can record it with:
|
334
345
|
|
335
346
|
```sh
|
336
|
-
$ license_finder licenses add my_unknown_dependency MIT
|
347
|
+
$ license_finder licenses add my_unknown_dependency MIT
|
348
|
+
```
|
349
|
+
|
350
|
+
This command would assign the MIT license to all versions of the dependency
|
351
|
+
`my_unknown_dependency`. If you prefer, you could instead assign the license
|
352
|
+
to only a specific version of the dependency:
|
353
|
+
|
354
|
+
```sh
|
355
|
+
$ license_finder licenses add my_unknown_dependency MIT --version=1.0.0
|
337
356
|
```
|
338
357
|
|
339
|
-
|
340
|
-
|
358
|
+
Please note that adding a license to a specific version of a dependency will
|
359
|
+
cause any licenses previously added to all versions of that dependency to be
|
360
|
+
forgotten. Similarly, adding a license to all versions of a dependency will
|
361
|
+
override any licenses previously added to specific versions of that dependency.
|
362
|
+
|
363
|
+
There are several ways in which you can remove licenses that were previously
|
364
|
+
added through the `licenses add` command:
|
365
|
+
|
366
|
+
```sh
|
367
|
+
# Removes all licenses from any version of the dependency
|
368
|
+
$ license_finder licenses remove my_unknown_dependency
|
341
369
|
|
370
|
+
# Removes just the MIT license from any version of the dependency
|
371
|
+
$ license_finder licenses remove my_unknown_dependency MIT
|
372
|
+
|
373
|
+
# Removes all licenses from only version 1.0.0 of the dependency
|
374
|
+
# This has no effect if you had last added a license to all versions of the dependency
|
375
|
+
$ license_finder licenses remove my_unknown_dependency --version=1.0.0
|
376
|
+
|
377
|
+
# Removes just the MIT license from only version 1.0.0 of the dependency
|
378
|
+
# This has no effect if you had last added a license to all versions of the dependency
|
379
|
+
$ license_finder licenses remove my_unknown_dependency MIT --version=1.0.0
|
380
|
+
```
|
342
381
|
|
343
382
|
### Adding Hidden Dependencies
|
344
383
|
|
@@ -502,7 +541,7 @@ licenseConfigurations := Set("compile", "provided")
|
|
502
541
|
|
503
542
|
## Requirements
|
504
543
|
|
505
|
-
`license_finder` requires ruby >= 2.
|
544
|
+
`license_finder` requires ruby >= 2.6.0.
|
506
545
|
|
507
546
|
|
508
547
|
## Upgrading
|
data/Rakefile
CHANGED
@@ -54,7 +54,7 @@ task :update_pipeline, [:slack_url, :slack_channel] do |_, args|
|
|
54
54
|
puts 'Warning: You should provide slack channel and url to receive slack notifications on build failures'
|
55
55
|
end
|
56
56
|
|
57
|
-
ruby_versions = %w[3.
|
57
|
+
ruby_versions = %w[3.3.0 3.2.3 3.1.4 2.7.8]
|
58
58
|
|
59
59
|
params = []
|
60
60
|
params << "ruby_versions=#{ruby_versions.join(',')}"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.0
|
1
|
+
7.2.0
|