Skip to content

Commit

Permalink
Changed apt installation instructions gpg import (#1845) (#1849)
Browse files Browse the repository at this point in the history
apt-key is deprecated and shouldn't be used nor should the trusted keystore in /etc/apt. Instead the gpg keys should be stored somewhere else and the list file that adds the openHAB repo should point at that one key. Thus, apt will only trust that key for that repo instead of trusting that key even if it's used by some other repo.

There were problems with the redirect from `gpg` which makes the command fail sometimes even when using sudo which is why I save it locally and then move and chmod it after.

Signed-off-by: Richard Koshak rlkoshak@gmail.com

Co-authored-by: Richard Koshak <rkoshak@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and rkoshak authored Jul 3, 2022
1 parent 37f1910 commit ee44f8d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions installation/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ Alternatively resort to the [manual installation approach](#manual-installation)

{% include collapsible/body.html %}

First, add the openHAB repository key to your package manager:
First, add the openHAB repository key to your package manager (note `/usr/share/keyrings` may already exist):

```shell
wget -qO - 'https://openhab.jfrog.io/artifactory/api/gpg/key/public' | sudo apt-key add -
curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor > openhab.pgp
sudo mkdir /usr/share/keyrings
sudo mv openhab.pgp /usr/share/keyrings
sudo chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.pgp
```

Then, you can choose between, *Official (Stable)*, *Beta* or *Snapshot* builds:
Expand All @@ -84,7 +87,7 @@ Then, you can choose between, *Official (Stable)*, *Beta* or *Snapshot* builds:
Add the **openHAB Stable Repository** to your systems apt sources list:

```shell
echo 'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab.list
echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab.list
```

- **Testing Release**
Expand All @@ -94,7 +97,7 @@ Then, you can choose between, *Official (Stable)*, *Beta* or *Snapshot* builds:
Add the **openHAB Beta Repository** to your systems apt sources list:

```shell
echo 'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg testing main' | sudo tee /etc/apt/sources.list.d/openhab.list
echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg testing main' | sudo tee /etc/apt/sources.list.d/openhab.list
```

- **Snapshot Release**
Expand All @@ -106,7 +109,7 @@ Then, you can choose between, *Official (Stable)*, *Beta* or *Snapshot* builds:
To use it, add the **openHAB Unstable Repository** to your systems apt sources list:
```shell
echo 'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg unstable main' | sudo tee /etc/apt/sources.list.d/openhab.list
echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg unstable main' | sudo tee /etc/apt/sources.list.d/openhab.list
```
Next, resynchronize the package index:
Expand Down

0 comments on commit ee44f8d

Please sign in to comment.