README.md 1.72 KB
Newer Older
thc's avatar
thc committed
1 2
licensechecker
==============
Maximilian Dolling's avatar
Maximilian Dolling committed
3

thc's avatar
thc committed
4 5 6
Overview
--------

thc's avatar
thc committed
7
### Description ###
thc's avatar
thc committed
8 9 10 11 12 13 14 15 16 17

Uses the [OSR](https://github.com/heremaps/oss-review-toolkit) to check for inherent licenses in a given project. Compares them to a given target license that you want so put on the given project. 

### Requirements ###
From [OSR](https://github.com/heremaps/oss-review-toolkit/blob/master/docs/GettingStarted.md):

In addition to Java (version >= 8), for some of the supported package managers and Version Control Systems additional
tools need to be installed. In the context of this tutorial the following tools are required:

* Git (any recent version will do)
thc's avatar
thc committed
18
* Docker 19.* or higher
thc's avatar
thc committed
19 20 21 22 23 24
* [Node.js](https://nodejs.org) 8.*
* [NPM](https://www.npmjs.com) 5.5.* - 6.4.*
* [Yarn](https://yarnpkg.com) 1.9.* - 1.17.*

### Running ###

thc's avatar
thc committed
25 26 27 28 29 30 31 32
start docker
```bash
sudo systemctl start docker.service
```
run license checker
```bash
./path/to/licensechecker/run.sh /path/to/project license
```
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

### Update 2020

We have switched to [Scancode-Toolkit](https://github.com/nexB/scancode-toolkit) to check Licenses and copyrights.

- Download it
- unzip it
- then:

```
#!/usr/bin/env bash
datum=$(date +%Y-%m-%d)
./scancode --info --package --license --copyright --json-pp scancode_result_$(hostname)_$datum.json \
  --ignore "icdp_work" --ignore web --ignore build \
  --ignore statsgraph --ignore runtime --ignore data \
  --ignore node_modules/spdx-correct/*  --ignore node_modules/spdx-correct \
  --ignore node_modules/spdx-exceptions/* --ignore node_modules/spdx-expression-parse/* --ignore node_modules/spdx-license-ids/* \
/home/knb/code/git/dis

```

Analyze with Scancode-Workbench:

```
  cd code/git/scancode-workbench-3.1.1
  ./ScanCode-Workbench 
  # import JSON
  # save aas sqlite
```