Skip to content

Commit 9318249

Browse files
Change installation instructions to use ros-apt-source package (#5684)
* update RHEL installation to use ros2-release package * update Ubuntu installation to use ros-apt-source * fix typo * update uninstall docs to remove apt-source package * address doc8/lint warning. Signed-off-by: Tomoya.Fujita <[email protected]> --------- Signed-off-by: Tomoya.Fujita <[email protected]> Co-authored-by: Tomoya.Fujita <[email protected]>
1 parent 6987641 commit 9318249

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

source/Installation/RHEL-Install-RPMs.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ Next, download the ``ros2-release`` package and install it:
4444

4545
.. code-block:: console
4646
47-
$ sudo dnf install "https://ftp.osuosl.org/pub/ros/packages.ros.org/ros2/rhel/$(rpm -E %rhel)/x86_64/Packages/r/ros2-release-1.0.0-1.noarch.rpm"
48-
47+
$ sudo dnf install curl
48+
$ 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}')
49+
$ 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"
4950
5051
The `ros2-release <https://github.com/ros-infrastructure/ros-apt-source/>`_ package provides keys and repo configuration for the various ROS repositories.
5152
Updates to repository configuration will occur automatically when new versions of this package are released to the ROS repositories.
@@ -161,3 +162,9 @@ have already installed from binaries, run the following command:
161162
.. code-block:: console
162163
163164
$ sudo dnf remove ros-{DISTRO}-*
165+
166+
To remove the repository configuration run
167+
168+
.. code-block:: console
169+
170+
$ 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
@@ -139,7 +139,7 @@ You may also want to remove the repository:
139139

140140
.. code-block:: console
141141
142-
$ sudo rm /etc/apt/sources.list.d/ros2.list
142+
$ sudo apt remove ros2-apt-source
143143
$ sudo apt update
144144
$ sudo apt autoremove
145145
$ 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)