New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add information to website: Linux repository adding commands #2845

Closed
edmundlaugasson opened this Issue Dec 28, 2016 · 9 comments

Comments

Projects
None yet
6 participants
@edmundlaugasson

edmundlaugasson commented Dec 28, 2016

Please add to the site https://riot.im/download/desktop/ and https://riot.im/desktop.html appropriate Linux repository adding commands. As I see from https://riot.im/packages/debian/dists/ then there are Debian and Ubuntu supported.
E.g.:

Adding Linux repository

Check your Linux distribution.

  • using lsb-release command
    • if you do not have then install lsb-release package
      sudo apt update && sudo apt-get -y install lsb-release && sudo ldconfig && sudo dpkg --configure -a && sudo apt-get clean
    • then enter the command
      lsb_release -da | grep -i codename
    • the output could be e.g.:
      Codename: wheezy
      or
      Codename: xenial
      ... then you know, which folder name to choose as codename from the address https://riot.im/packages/debian/dists/
    • to cut the codename only (output will be the codename itself only):
      lsb_release -da 2>/dev/null | grep -i codename | cut -f2
    • In case of Linux Mint, which is based on Ubuntu LTS version you can use Ubuntu repositories - https://en.wikipedia.org/wiki/Linux_Mint_version_history#Release_history - e.g. Linux Mint 18 corresponds to Ubuntu 16.04 LTS, it means xenial can be used as codename in repository list file.
  • In case of any other Debian/Ubuntu based distro please check appropriate Debian or Ubuntu version and use this as codename in /etc/apt/sources.list.d/matrix-riot-im.list file.
  • Add repository (choose one of these):
    • manually entering the appropriate distro codename: replace "codename" with appropriate distro codename:
      echo "deb https://riot.im/packages/debian/ codename main" > /etc/apt/sources.list.d/matrix-riot-im.list
    • using automatic way
      echo "deb https://riot.im/packages/debian/ `lsb_release -da 2>/dev/null | grep -i codename | cut -f2` main" > /etc/apt/sources.list.d/matrix-riot-im.list
  • if you have any other distro than Debian or Ubuntu then check corresponding codename and replace with correct one in /etc/apt/sources.list.d/matrix-riot-im.list file
  • Import GPG-key (digital signature) to ensure in software authenticity:
    wget https://riot.im/packages/debian/repo-key.asc && sudo apt-key add repo-key.asc && rm repo-key.asc
  • Update your Linux repositories database, install the software and clean up the system:
    sudo apt update && sudo apt-get -y install riot-web && sudo ldconfig && sudo dpkg --configure -a && sudo apt-get clean
  • program is now installed and ready to use, it can be run from /opt/Riot/riot-web
  • for easier access you may want to create a symlink:
    ln -s /opt/Riot/riot-web /usr/bin/
    • then you can just run the command riot-web
@4nd3r

This comment has been minimized.

Show comment
Hide comment
@4nd3r

4nd3r Dec 29, 2016

Contributor

why sudo ldconfig && sudo dpkg --configure -a ? normally you wouldn't need to do it. ymmv.

you can get debian release name from /etc/os-release without installing lsb-release.

wheezy (oldstable LTS) doesn't have apt. using apt-get is more universal if you care about anything older than jessie or what ever ubuntu version still supported, but doesn't have apt also.

about that symlink, see #2767

also, too much wall of text imho.

it would be easier if people can just download deb file and do sudo dpkg -i and with first installation postinst script adds repo to sources and riot archive singining key to keyring. for example, this is how google-chrome does it.

Contributor

4nd3r commented Dec 29, 2016

why sudo ldconfig && sudo dpkg --configure -a ? normally you wouldn't need to do it. ymmv.

you can get debian release name from /etc/os-release without installing lsb-release.

wheezy (oldstable LTS) doesn't have apt. using apt-get is more universal if you care about anything older than jessie or what ever ubuntu version still supported, but doesn't have apt also.

about that symlink, see #2767

also, too much wall of text imho.

it would be easier if people can just download deb file and do sudo dpkg -i and with first installation postinst script adds repo to sources and riot archive singining key to keyring. for example, this is how google-chrome does it.

@Mikaela

This comment has been minimized.

Show comment
Hide comment
@Mikaela

Mikaela Dec 29, 2016

Contributor

Why lsb_release -da | grep -i codename instead of lsb_release -sc?

Why three commands for importing GPG key instead of just curl -L https://riot.im/packages/debian/repo-key.asc | sudo apt-key add -?

Contributor

Mikaela commented Dec 29, 2016

Why lsb_release -da | grep -i codename instead of lsb_release -sc?

Why three commands for importing GPG key instead of just curl -L https://riot.im/packages/debian/repo-key.asc | sudo apt-key add -?

@4nd3r

This comment has been minimized.

Show comment
Hide comment
@4nd3r

4nd3r Dec 29, 2016

Contributor

another way:

sudo apt-key adv --keyserver pool.sks-keyservers.net --recv E019645248E8F4A1

but can we trust keyservers or CA which issued cert for riot.im? hehe.

Contributor

4nd3r commented Dec 29, 2016

another way:

sudo apt-key adv --keyserver pool.sks-keyservers.net --recv E019645248E8F4A1

but can we trust keyservers or CA which issued cert for riot.im? hehe.

@Mikaela

This comment has been minimized.

Show comment
Hide comment
@Mikaela

Mikaela Dec 29, 2016

Contributor

If --recv-keys is going to be recommended, the full fingerprint should possibly be used.

Alternatively --fetch-keys now that you mentioned adv

Contributor

Mikaela commented Dec 29, 2016

If --recv-keys is going to be recommended, the full fingerprint should possibly be used.

Alternatively --fetch-keys now that you mentioned adv

@edmundlaugasson

This comment has been minimized.

Show comment
Hide comment
@edmundlaugasson

edmundlaugasson Dec 30, 2016

I'm glad that anyone responded. Certainly those results can be achieved in many ways and great if you found shorter ones. Those software trimming and clean up commands are to ensure all works properly. If there is everything fine then those commands do nothing harmful. Former experience have shown that sometimes there occur some errors whether former software update have somehow not finished or any other unsolved issue in package management. Here is the shorter version:

Adding Linux repository

  • Check your Linux distribution.
    • open the terminal (e.g. CTRL+ALT+T) and enter the following command and press Enter afterwards (applies also to the rest of commands):
      cat /etc/os-release
    • the relevant part from output could be (look the bold codename) e.g. in case of Ubuntu 16.04.x LTS:
      UBUNTU_CODENAME=xenial
      or in case of Debian 8.x:
      VERSION="8 (jessie)"
      or in case of Linux Mint 18.x:
      UBUNTU_CODENAME=xenial
      ... then you know, which folder name to choose (here in bold) as codename from the address https://riot.im/packages/debian/dists/
  • Add repository:
    • replace "codename" with appropriate distro codename:
      echo "deb https://riot.im/packages/debian/ codename main" > /etc/apt/sources.list.d/matrix-riot-im.list
  • if you have any other distro than Debian or Ubuntu then check corresponding codename and replace with correct one
  • Import GPG-key (digital signature) to ensure in software authenticity:
    curl -L https://riot.im/packages/debian/repo-key.asc | sudo apt-key add -
  • Update your Linux repositories database, install the software and clean up the system:
    sudo apt-get update && sudo apt-get -y install riot-web && sudo ldconfig && sudo dpkg --configure -a && sudo apt-get clean
  • program is now installed and ready to use, it can be run from /opt/Riot/riot-web
  • for easier access you may want to create a symlink:
    ln -s /opt/Riot/riot-web /usr/bin/
    • then you can just run the command riot-web

edmundlaugasson commented Dec 30, 2016

I'm glad that anyone responded. Certainly those results can be achieved in many ways and great if you found shorter ones. Those software trimming and clean up commands are to ensure all works properly. If there is everything fine then those commands do nothing harmful. Former experience have shown that sometimes there occur some errors whether former software update have somehow not finished or any other unsolved issue in package management. Here is the shorter version:

Adding Linux repository

  • Check your Linux distribution.
    • open the terminal (e.g. CTRL+ALT+T) and enter the following command and press Enter afterwards (applies also to the rest of commands):
      cat /etc/os-release
    • the relevant part from output could be (look the bold codename) e.g. in case of Ubuntu 16.04.x LTS:
      UBUNTU_CODENAME=xenial
      or in case of Debian 8.x:
      VERSION="8 (jessie)"
      or in case of Linux Mint 18.x:
      UBUNTU_CODENAME=xenial
      ... then you know, which folder name to choose (here in bold) as codename from the address https://riot.im/packages/debian/dists/
  • Add repository:
    • replace "codename" with appropriate distro codename:
      echo "deb https://riot.im/packages/debian/ codename main" > /etc/apt/sources.list.d/matrix-riot-im.list
  • if you have any other distro than Debian or Ubuntu then check corresponding codename and replace with correct one
  • Import GPG-key (digital signature) to ensure in software authenticity:
    curl -L https://riot.im/packages/debian/repo-key.asc | sudo apt-key add -
  • Update your Linux repositories database, install the software and clean up the system:
    sudo apt-get update && sudo apt-get -y install riot-web && sudo ldconfig && sudo dpkg --configure -a && sudo apt-get clean
  • program is now installed and ready to use, it can be run from /opt/Riot/riot-web
  • for easier access you may want to create a symlink:
    ln -s /opt/Riot/riot-web /usr/bin/
    • then you can just run the command riot-web
@ara4n

This comment has been minimized.

Show comment
Hide comment
@ara4n

ara4n Dec 30, 2016

Member

@edmundlaugasson thanks for this. we're about to relaunch the website, and will incorporate this.

Member

ara4n commented Dec 30, 2016

@edmundlaugasson thanks for this. we're about to relaunch the website, and will incorporate this.

@ara4n

This comment has been minimized.

Show comment
Hide comment
@ara4n

ara4n Feb 19, 2017

Member

the website relaunch is delayed, so i've just linked to the instructions in this comment thread for now. thanks!

Member

ara4n commented Feb 19, 2017

the website relaunch is delayed, so i've just linked to the instructions in this comment thread for now. thanks!

@ara4n ara4n closed this Feb 19, 2017

@MurzNN

This comment has been minimized.

Show comment
Hide comment
@MurzNN

MurzNN Jul 13, 2017

Contributor

Here is one-liner for quick install Riot on Debian/Ubuntu systems:

echo "deb https://riot.im/packages/debian/ $(lsb_release -s -c) main" | sudo tee /etc/apt/sources.list.d/matrix-riot-im.list; curl -L https://riot.im/packages/debian/repo-key.asc | sudo apt-key add -; sudo apt-get update; sudo apt-get -y install riot-web
Contributor

MurzNN commented Jul 13, 2017

Here is one-liner for quick install Riot on Debian/Ubuntu systems:

echo "deb https://riot.im/packages/debian/ $(lsb_release -s -c) main" | sudo tee /etc/apt/sources.list.d/matrix-riot-im.list; curl -L https://riot.im/packages/debian/repo-key.asc | sudo apt-key add -; sudo apt-get update; sudo apt-get -y install riot-web
@wikey

This comment has been minimized.

Show comment
Hide comment
@wikey

wikey Jul 31, 2017

There is also an open "Request for Package" bug in the Debian system to include riot-web in the main distribution repositories: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866502

wikey commented Jul 31, 2017

There is also an open "Request for Package" bug in the Debian system to include riot-web in the main distribution repositories: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment