Skip to content

Commit f6e5896

Browse files
mergify[bot]claraberendsenfujitatomoya
authored
Change installation instructions to use ros-apt-source package (backport #5684) (#5689)
Signed-off-by: Tomoya.Fujita <[email protected]> Co-authored-by: Tomoya.Fujita <[email protected]> (cherry picked from commit 9318249) Signed-off-by: Tomoya Fujita <[email protected]> Co-authored-by: Clara Berendsen <[email protected]> Co-authored-by: Tomoya Fujita <[email protected]>
1 parent 26158da commit f6e5896

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

source/Installation/RHEL-Install-RPMs.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,16 @@ You will need to enable the EPEL repositories and the PowerTools repository:
3838
.. note:: This step may be slightly different depending on the distribution you are using.
3939
`Check the EPEL documentation <https://docs.fedoraproject.org/en-US/epel/#_quickstart>`_
4040

41-
Next, download the ROS 2 ``.repo`` file:
41+
Next, download the ``ros2-release`` package and install it:
4242

4343
.. code-block:: console
4444
4545
$ sudo dnf install curl
46-
$ sudo curl --output /etc/yum.repos.d/ros2.repo http://packages.ros.org/ros2/rhel/ros2.repo
46+
$ export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
47+
$ sudo dnf install "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-release-${ROS_APT_SOURCE_VERSION}-1.noarch.rpm"
4748
48-
Then, update your metadata cache.
49-
DNF may prompt you to verify the GPG key, which should match the location ``https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc``.
50-
51-
.. code-block:: console
52-
53-
$ sudo dnf makecache
49+
The `ros2-release <https://github.com/ros-infrastructure/ros-apt-source/>`_ package provides keys and repo configuration for the various ROS repositories.
50+
Updates to repository configuration will occur automatically when new versions of this package are released to the ROS repositories.
5451

5552
.. _rhel-install-rpms-install-ros-2-packages:
5653

@@ -135,3 +132,9 @@ have already installed from binaries, run the following command:
135132
.. code-block:: console
136133
137134
$ sudo dnf remove ros-{DISTRO}-*
135+
136+
To remove the repository configuration run
137+
138+
.. code-block:: console
139+
140+
$ sudo dnf remove ros2-release

source/Installation/Ubuntu-Install-Debs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ You may also want to remove the repository:
150150

151151
.. code-block:: console
152152
153-
$ sudo rm /etc/apt/sources.list.d/ros2.list
153+
$ sudo apt remove ros2-apt-source
154154
$ sudo apt update
155155
$ sudo apt autoremove
156156
$ sudo apt upgrade # Consider upgrading for packages previously shadowed.

source/Installation/_Apt-Repositories.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ First ensure that the `Ubuntu Universe repository <https://help.ubuntu.com/commu
77
$ sudo apt install software-properties-common
88
$ sudo add-apt-repository universe
99
10-
Now add the ROS 2 GPG key with apt.
10+
The `ros-apt-source <https://github.com/ros-infrastructure/ros-apt-source/>`_ packages provide keys and apt source configuration for the various ROS repositories.
1111

12-
.. code-block:: console
13-
14-
$ sudo apt update && sudo apt install curl -y
15-
$ sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
16-
17-
Then add the repository to your sources list.
12+
Installing the ros2-apt-source package will configure ROS 2 repositories for your system.
13+
Updates to repository configuration will occur automatically when new versions of this package are released to the ROS repositories.
1814

1915
.. code-block:: console
2016
21-
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
17+
$ sudo apt update && sudo apt install curl -y
18+
$ export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
19+
$ curl -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" # If using Ubuntu derivates use $UBUNTU_CODENAME
20+
$ sudo apt install /tmp/ros2-apt-source.deb

0 commit comments

Comments
 (0)