|
|
|
|
|
# ORT installation guide
|
|
|
|
|
|
These are the exact steps committed when installing ORT on the VM.
|
|
|
|
|
|
## System requirements
|
|
|
|
|
|
As root:
|
|
|
```
|
|
|
apt-get install prometheus-node-exporter htop
|
|
|
apt-get install openjdk-17-jdk nodejs git python3-virtualenv python3-pip npm subversion cvs mercurial
|
|
|
npm install --global yarn
|
|
|
```
|
|
|
|
|
|
## Install scancode
|
|
|
|
|
|
As root:
|
|
|
```
|
|
|
cd /ort
|
|
|
wget https://github.com/nexB/scancode-toolkit/releases/download/v30.1.0/scancode-toolkit-30.1.0_py39-linux.tar.xz
|
|
|
tar xJf scancode-toolkit-30.1.0_py39-linux.tar.xz
|
|
|
chown -R ort:users scancode-toolkit-30.1.0
|
|
|
```
|
|
|
|
|
|
As user ort:
|
|
|
```
|
|
|
cd /ort/scancode-toolkit-30.1.0
|
|
|
./scancode --help
|
|
|
```
|
|
|
|
|
|
## Install Conan
|
|
|
|
|
|
As root:
|
|
|
```
|
|
|
pip install conan
|
|
|
```
|
|
|
|
|
|
## Install ORT
|
|
|
|
|
|
As root:
|
|
|
```
|
|
|
cd /ort
|
|
|
git clone --recurse-submodules https://github.com/oss-review-toolkit/ort.git
|
|
|
chown -R ort:users ort
|
|
|
```
|
|
|
|
|
|
As user ort:
|
|
|
```
|
|
|
cd /ort/ort
|
|
|
export JAVA_HOME=/lib/jvm/java-17-openjdk-amd64/
|
|
|
./gradlew installDist
|
|
|
./gradlew cli:run --args="requirements"
|
|
|
```
|
|
|
|
|
|
Add binaries to PATH:
|
|
|
```
|
|
|
cd /usr/local/bin/
|
|
|
ln -s /ort/scancode-toolkit-30.1.0/scancode .
|
|
|
ln -s /ort/ort/cli/build/install/ort/bin/ort .
|
|
|
```
|
|
|
|
|
|
Check that they can be found:
|
|
|
```
|
|
|
ort@ort-vm1:/usr/local/bin$ ort requirements
|
|
|
________ _____________________
|
|
|
\_____ \\______ \__ ___/ the OSS Review Toolkit, version a056b54c72.
|
|
|
/ | \| _/ | |
|
|
|
/ | \ | \ | | Running 'requirements' under Java 17.0.2 on Linux with
|
|
|
\_______ /____|_ / |____| 8 CPUs and a maximum of 4004 MiB of memory.
|
|
|
\/ \/
|
|
|
Environment variables:
|
|
|
ORT_CONFIG_DIR = /home/ort/.ort/config
|
|
|
ORT_DATA_DIR = /home/ort/.ort
|
|
|
SHELL = /bin/bash
|
|
|
TERM = screen.xterm-256color
|
|
|
JAVA_HOME = /lib/jvm/java-17-openjdk-amd64/
|
|
|
|
|
|
Scanners:
|
|
|
- Askalono: Requires 'askalono' in no specific version. Tool not found.
|
|
|
- BoyterLc: Requires 'lc' in no specific version. Tool not found.
|
|
|
- Licensee: Requires 'licensee' in no specific version. Tool not found.
|
|
|
* ScanCode: Requires 'scancode' in no specific version. Found version 30.1.0.
|
|
|
|
|
|
[SNIP]
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
## Prepare for run
|
|
|
|
|
|
Clone the Eclipse ORT git repository:
|
|
|
```
|
|
|
git clone https://gitlab.eclipse.org/eclipsefdn/emo-team/eclipsefdn-ort.git
|
|
|
chown -R ort:users eclipsefdn-ort/
|
|
|
```
|
|
|
|
|
|
Add following lines to ~ort/.bashrc
|
|
|
```
|
|
|
export EDITOR=emacs
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
|
|
|
export ORT_CONFIG_DIR=/ort/eclipsefdn-ort/conf
|
|
|
```
|
|
|
|
|
|
Increase allocated Java Memory by editing `ORT_HOME/cli/build/install/ort/bin/ort` and set DEFAULT_JVM_OPTS:
|
|
|
```
|
|
|
DEFAULT_JVM_OPTS="-Xmx12192M"
|
|
|
```
|
|
|
|
|
|
|
|
|
## Execute first run
|
|
|
|
|
|
Clone a batch of git repositories:
|
|
|
```
|
|
|
cd /data/projects/
|
|
|
git clone https://git.eclipse.org/r/jgit/jgit
|
|
|
git clone https://github.com/eclipse-theia/theia
|
|
|
git clone https://github.com/eclipse/tycho
|
|
|
git clone https://github.com/eclipse/che.git
|
|
|
```
|
|
|
|
|
|
Execute first run to check everything is in place:
|
|
|
```
|
|
|
ort@ort-vm1:/data/projects$ time bash /ort/eclipsefdn-ort/scripts/run_ort.sh /data/projects/che/ /data/results/
|
|
|
Start scan at 2022-02-24 10:40
|
|
|
- Using ort from [ort].
|
|
|
- Log written to [/data/results/che_202202241040.log].
|
|
|
- Working on project [/data/projects/che/].
|
|
|
|
|
|
* Start analyzer at 2022-02-24 10:40
|
|
|
10:40:36.525 [main] INFO org.ossreviewtoolkit.model.config.OrtConfiguration - Using ORT configuration file '/ort/eclipsefdn-ort/conf/ort.conf'.
|
|
|
|
|
|
[SNIP]
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|