You can install Hydrilla server and(or) builder using .whl files from the Releases page. Please consider verifying the downloads using provided cryptographic signatures.
Hydrilla requires Python interpreter in at least version 3.7. You'd typically use Python3 as provided by you operating system distribution. For example, on Debian-based systems (including Trisquel) you can install it with:
sudo apt install python3
Pip is the package manager for Python. While not a direct dependency of Hydrilla, it is needed to utilize .whl files. You most likely also want to install pip as provided by your distro, e.g. for APT-based ones:
sudo apt install python3-pip
Hydrilla relies on the following Python packages:
jsonschema
click
flask
(needed for Hydrilla server only)reuse
(optional, only needed for Hydrilla builder to generate SPDX report)If you don't have those dependencies installed, pip will automatically pull them from PyPI (except for reuse which would need to be installed separately with a command like python3 -m pip install reuse
).
Nevertheless, you are encouraged to instead install the respective packages from your operating system's official repositories because those usually have stricter policies on stability, security and free licensing. In case of APT-based distributions the packages to install would be python3-jsonschema
, python3-click
, python3-flask
and reuse
1.
Let's assume you want to install version 1.0 of Hydrilla server. First, download and verify both2 hydrilla.builder-1.0-py3-none-any.whl
and hydrilla-1.0-py3-none-any.whl
. Then, run:
python3 -m pip install path/to/downloaded/hydrilla.builder-1.0-py3-none-any.whl path/to/downloaded/hydrilla-1.0-py3-none-any.whl
This will install Hydrilla for the current user. The commands hydrilla
and hydrilla-builder
will be made available in ~/.local/bin/
.
If for example you don't want pip to install things under ~/.local/
, you might choose to create a virtual Python environment. First, make sure you have the virtualenv
tool installed3 (for example from APT package python3-virtualenv
). Then, choose the folder in which you'd like to install the environment and run:
virtualenv -p python3 --system-site-packages path/to/chosen/folder
The --system-site-packages
flag is not strictly necessary for it to work but is needed if you want packages inside the virtual environment to be able to see globally-installed dependencies.
Once the environment is created, you need to enter it by sourcing a script created by the virtualenv command, e.g.:
source path/to/chosen/folder/bin/activate
Afterwards, the python3 -m pip
commands you enter in this shell will install packages inside this virtual environment. You can learn more about Python virtual environments from online tutorials and the virtualenv documentation.
Hydrilla APT repository is hosted at https://hydrillarepos.koszko.org/apt/ and is signed with Wojtek's PGP key (fingerprint E9727060E3C5637C8A4F4B424BC5221C5A79FD1A). It is expected to work with modern releases of most APT-based distributions (including Debian bullseye and Trisquel nabia).
This APT repository can be used to install Hydrilla server and builder system-wide and to later update the installation. It has to be said that this also requires you to trust Wojtek's repository with your system's safety (a malicious APT repository could easily take over a system that uses it).
If you've decided you want to install the APT repository on your system, the easiest way to do so is by copy-pasting the following script into your POSIX shell (and then confirming with your password). You can of course modify it according to your needs.
__install_hydrilla_apt_repo() {
local TMP="$1"
local LISTS="$(cat <<EOF
deb https://hydrillarepos.koszko.org/apt/ koszko main
deb-src https://hydrillarepos.koszko.org/apt/ koszko main
EOF
)"
if ! wget -O "$TMP/koszko-keyring.gpg" https://hydrillarepos.koszko.org/apt/koszko-keyring.gpg; then
echo "Error! Failed to download keyring file!" >&2
return 1
elif ! gpg --no-default-keyring --keyring "$TMP/koszko-keyring.gpg" --list-key E9727060E3C5637C8A4F4B424BC5221C5A79FD1A; then
echo "Error! Invalid keyring file! Someone might be doing something nasty!" >&2
return 1
elif ! sudo cp "$TMP/koszko-keyring.gpg" /etc/apt/trusted.gpg.d/; then
echo "Error!" >&2
return 1
elif ! printf %s "$LISTS" | sudo tee /etc/apt/sources.list.d/hydrillarepos.list > /dev/null; then
echo "Error!" >&2
return 1
fi
sudo apt-get update
}
install_hydrilla_apt_repo() {
local TMP="$(mktemp -d)"
__install_hydrilla_apt_repo "$TMP"
local RESULT="$?"
rm -r "$TMP"
return "$RESULT"
}
install_hydrilla_apt_repo
This snippet is idempotent (i.e. it can be run multiple times and the effect will be as if it was run once). In addition, it executes apt-get update
command at the end so that your APT is immediately aware of the new repository and its contents.
After installing the repository you can install Hydrilla builder and server using the following commands:
sudo apt install python3-hydrilla.builder
sudo apt install python3-hydrilla # this alone will also pull the builder as a dependency
The packages install their modules under /usr/lib/python3/dist-packages/
which is seen by Python3 interpreters installed from APT. The hydrilla
and hydrilla-builder
commands get placed in /usr/bin/
.
In addition, the python3-hydrilla
package also includes sample WSGI script and Apache2 config files for Hydrilla under /usr/share/doc/python3-hydrilla/examples/
.
TODO
TODO
TODO