1. Classic LOCKSS Development

Note

This page is under construction.

The code base of the Classic LOCKSS system (version 1.x) is contained in a single Git repository, https://github.com/lockss/lockss-daemon.

1.1. Prerequisites

To do development work with the Classic LOCKSS system (version 1.x), you will need:

  • Git

  • Java 8 Development Kit (JDK 8), for example OpenJDK 8

  • Apache Ant

  • Python 3

    Note

    A few scripts in the repository use Python 2.7, invoked as python2.

1.1.1. Installing Git

You can check if Git is installed on your system by typing git --version at the command line and seeing if you get a valid response. If you need to install Git, select your operating system below and follow the instructions (as root, except for Homebrew on MacOS):

To install Git, run this Dnf command (as root):

dnf --assumeyes install git

To install Git, run this Pacman command (as root):

pacman -Sy --noconfirm git

To install Git, run this Yum command (as root):

yum --assumeyes install git

To install Git, run this Dnf command (as root):

dnf --assumeyes install git

To install Git, run this Dnf command (as root):

dnf --assumeyes install git

To install Git, run these Apt commands (as root):

apt update

apt install --assume-yes git

To install Git, run this Yum command (as root):

yum --assumeyes install git

To install Git, run this Dnf command (as root):

dnf --assumeyes install git

To install Git, run this Dnf command (as root):

dnf --assumeyes install git

To install Git, run these Apt commands (as root):

apt update

apt install --assume-yes git

To install Git, run this Homebrew command:

brew install git

To install Git, run this MacPorts command (as root):

sudo port install git

To install Git, run these Zypper commands (as root):

zypper refresh

zypper --non-interactive install git

To install Git, run these Zypper commands (as root):

zypper refresh

zypper --non-interactive install git

To install Git, run this Yum command (as root):

yum --assumeyes install git

To install Git, run this Dnf command (as root):

dnf --assumeyes install git

To install Git, run this Yum command (as root):

yum --assumeyes install git

To install Git, run this Dnf command (as root):

dnf --assumeyes install git

To install Git, run this Dnf command (as root):

dnf --assumeyes install git

To install Git, run this Yum command (as root):

yum --assumeyes install git

To install Git, run these Apt commands (as root):

apt update

apt install --assume-yes git

1.1.2. Installing the Java Development Kit

You can check if a Java Development Kit (JDK) is installed on your system by typing javac -version at the command line and seeing if you get a valid response. (The version numbers output by Java 8 software sometimes use the notation 1.8, for example 1.8.0_332.)

If you need to install a JDK, we recommend OpenJDK; select your operating system below and follow the instructions (as root, except for Homebrew on MacOS):

To install OpenJDK, run this Dnf command (as root):

dnf --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Pacman command (as root):

pacman -Sy --noconfirm jdk8-openjdk

To install OpenJDK, run this Yum command (as root):

yum --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Dnf command (as root):

dnf --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Dnf command (as root):

dnf --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run these Apt commands (as root):

apt update

apt install --assume-yes openjdk-8-jdk

To install OpenJDK, run this Yum command (as root):

yum --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Dnf command (as root):

dnf --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Dnf command (as root):

dnf --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run these Apt commands (as root):

apt update

apt install --assume-yes openjdk-8-jdk

To install OpenJDK, run this Homebrew command:

brew install openjdk@8

Note

You may be directed to create symlinks and/or update your PATH to make OpenJDK visible to your system, for instance:

For the system Java wrappers to find this JDK, symlink it with
  sudo ln -sfn /usr/local/opt/openjdk@8/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-8.jdk

openjdk@8 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have openjdk@8 first in your PATH, run:
  echo 'export PATH="/usr/local/opt/openjdk@8/bin:$PATH"' >> ~/.zshrc

For compilers to find openjdk@8 you may need to set:
  export CPPFLAGS="-I/usr/local/opt/openjdk@8/include"

To install OPenJDK, run this MacPorts command (as root):

sudo port install openjdk

To install OpenJDK, run these Zypper commands (as root):

zypper refresh

zypper --non-interactive install java-1_8_0-openjdk-devel

To install OpenJDK, run these Zypper commands (as root):

zypper refresh

zypper --non-interactive install java-1_8_0-openjdk-devel

To install OpenJDK, run this Yum command (as root):

yum --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Dnf command (as root):

dnf --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Yum command (as root):

yum --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Dnf command (as root):

dnf --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Dnf command (as root):

dnf --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run this Yum command (as root):

yum --assumeyes install java-1.8.0-openjdk-devel

To install OpenJDK, run these Apt commands (as root):

apt update

apt install --assume-yes openjdk-8-jdk

1.1.3. Installing Apache Ant

You can check if Ant is installed on your system by typing ant -version at the command line and seeing if you get a valid response. If you need to install Ant, select your operating system below and follow the instructions (as root, except for Homebrew on MacOS):

To install Ant, run this Dnf command (as root):

dnf --assumeyes install ant

To install Ant, run this Pacman command (as root):

pacman -Sy --noconfirm ant

To install Ant, run this Yum command (as root):

yum --assumeyes install ant

To install Ant, run this Dnf command (as root):

dnf --assumeyes install ant

To install Ant, run this Dnf command (as root):

dnf --assumeyes install ant

To install Ant, run these Apt commands (as root):

apt update

apt install --assume-yes ant

To install Ant, run this Yum command (as root):

yum --assumeyes install ant

To install Ant, run this Dnf command (as root):

dnf --assumeyes install ant

To install Ant, run this Dnf command (as root):

dnf --assumeyes install ant

To install Ant, run these Apt commands (as root):

apt update

apt install --assume-yes ant

To install Ant, run this Homebrew command:

brew install ant

To install Ant, run this MacPorts command (as root):

sudo port install apache-ant

To install Ant, run these Zypper commands (as root):

zypper refresh

zypper --non-interactive install ant

To install Ant, run these Zypper commands (as root):

zypper refresh

zypper --non-interactive install ant

To install Ant, run this Yum command (as root):

yum --assumeyes install ant

To install Ant, run this Dnf command (as root):

dnf --assumeyes install ant

To install Ant, run this Yum command (as root):

yum --assumeyes install ant

To install Ant, run this Dnf command (as root):

dnf --assumeyes install ant

To install Ant, run this Dnf command (as root):

dnf --assumeyes install ant

To install Ant, run this Yum command (as root):

yum --assumeyes install ant

To install Ant, run these Apt commands (as root):

apt update

apt install --assume-yes ant

1.2. Cloning the Git Repository

To clone the lockss-daemon repository from Git, use one of these commands:

# GitHub account with SSH key
git clone git@github.com:lockss/lockss-daemon

# Anonymous access
git clone https://github.com/lockss/lockss-daemon

This will create a lockss-daemon directory.

1.2.1. Additional Prerequisites

  • JUnit 3.8.1 is included is included in the LOCKSS source distribution to run unit tests, but the Ant targets that invoke JUnit (test-xxx) require the JUnit JAR to be on Ant's CLASSPATH. The easiest way to do this is to copy lib/junit.jar (relative to the root of the lockss-daemon Git tree) into Ant's lib directory (relative to its installation directory on the system).

  • For some tools and Ant targets, the JAVA_HOME environment variable must be set to the directory in which the JDK is installed, i.e. it is expected that tools.jar can be found in $JAVA_HOME/lib.

  • For runtime contexts that process split Zip files and some unit tests, the command-line zip program must be installed.

    Tip

    Most Linux systems have zip and unzip installed by default.