Project

General

Profile

User manual » History » Version 3

koszko, 04/27/2022 03:20 PM
document APT repository

1 1 koszko
# User manual
2
3
{{toc}}
4
5
## Installation
6
### Using Python wheel
7
8
*TODO*
9
10
### Using APT
11
12 3 koszko
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).
13
14
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).
15
16
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.
17
18
``` shell
19
__install_hydrilla_apt_repo() {
20
    local TMP="$1"
21
    local LISTS="$(cat <<EOF
22
deb     https://hydrillarepos.koszko.org/apt/ koszko main
23
deb-src https://hydrillarepos.koszko.org/apt/ koszko main
24
EOF
25
)"
26
27
    if ! wget -O "$TMP/koszko-keyring.gpg" https://hydrillarepos.koszko.org/apt/koszko-keyring.gpg; then
28
	echo "Error! Failed to download keyring file!" >&2
29
	return 1
30
    elif ! gpg --no-default-keyring --keyring "$TMP/koszko-keyring.gpg" --list-key E9727060E3C5637C8A4F4B424BC5221C5A79FD1A; then
31
	echo "Error! Invalid keyring file! Someone might be doing something nasty!" >&2
32
	return 1
33
    elif ! sudo cp "$TMP/koszko-keyring.gpg" /etc/apt/trusted.gpg.d/; then
34
	echo "Error!" >&2
35
	return 1
36
    elif ! printf %s "$LISTS" | sudo tee /etc/apt/sources.list.d/hydrillarepos.list > /dev/null; then
37
	echo "Error!" >&2
38
	return 1
39
    fi
40
41
    sudo apt-get update
42
}
43
44
install_hydrilla_apt_repo() {
45
    local TMP="$(mktemp -d)"
46
    __install_hydrilla_apt_repo "$TMP"
47
    local RESULT="$?"
48
49
    rm -r "$TMP"
50
51
    return "$RESULT"
52
}
53
54
install_hydrilla_apt_repo
55
```
56
57
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.
58
59
After installing the repository you can install Hydrilla builder and server using the following commands:
60
``` shell
61
sudo apt install python3-hydrilla.builder
62
```
63
``` shell
64
sudo apt install python3-hydrilla # this alone will also pull the builder as a dependency
65
```
66
67
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/`.
68
69
In addition, the `python3-hydrilla` package also includes sample WSGI script and Apache2 config files for Hydrilla under `/usr/share/doc/python3-hydrilla/examples/`.
70 1 koszko
71
## Understanding the concepts
72
73
*TODO*
74
75
## Running
76
77
### With development server
78
79
*TODO*
80
81
### With Apache2
82
83
*TODO*