Skip to content

Commit 9bd19d0

Browse files
committed
Remove ros2 repository
Install rosdep and colcon from pypi instead of apt
1 parent 2de23d3 commit 9bd19d0

File tree

3 files changed

+8
-21
lines changed

3 files changed

+8
-21
lines changed

src/README.md.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
## Install
44

55
```bash
6-
# Configure ROS 2 apt repository
7-
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /etc/apt/keyrings/ros-archive-keyring.gpg
8-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list
9-
106
# Configure custom ROS repository
117
echo "deb [trusted=yes] @REPO_URL@ ./" | sudo tee /etc/apt/sources.list.d/@DISTRO_NAME@.list
128

src/prepare.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ function create_chroot {
8888

8989

9090
local tmp; tmp=$(mktemp "/tmp/ros-builder-XXXXXX.sh")
91+
# shellcheck disable=SC2001
9192
cat <<- EOF > "$tmp"
93+
set -x # bash debug mode
9294
mkdir -p /etc/apt/keyrings
93-
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /etc/apt/keyrings/ros-archive-keyring.gpg
94-
$INSTALL_GPG_KEYS
95+
$(echo "$INSTALL_GPG_KEYS" | sed 's/sudo //')
9596
echo "Acquire::http::Proxy \"http://127.0.0.1:3142\";" > tee /etc/apt/apt.conf.d/01acng
9697
EOF
9798

@@ -104,13 +105,12 @@ EOF
104105
local chroot_folder="/var/cache/sbuild-chroot"
105106
# shellcheck disable=SC2016
106107
ici_cmd ici_asroot mmdebstrap \
107-
--variant=buildd --include=apt,apt-utils,ccache,ca-certificates,curl,build-essential,debhelper,fakeroot,cmake,git,python3-rosdep,python3-catkin-pkg \
108+
--variant=buildd --include=apt,apt-utils,ccache,ca-certificates,curl,build-essential,debhelper,fakeroot,cmake,git \
108109
--customize-hook="upload $tmp $tmp" \
109110
--customize-hook="chroot \$1 chmod 755 $tmp" \
110111
--customize-hook="chroot \$1 sh -c $tmp" \
111112
"$DEB_DISTRO" "$chroot_folder" \
112-
"deb $DISTRIBUTION_REPO $DEB_DISTRO main universe" \
113-
"deb [signed-by=/etc/apt/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $DEB_DISTRO main"
113+
"deb $DISTRIBUTION_REPO $DEB_DISTRO main universe"
114114

115115
ici_log
116116
ici_color_output BOLD "Write schroot config"

src/scripts/prepare.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ ici_append INSTALL_HOST_GPG_KEYS "sudo apt-key adv --keyserver keyserver.ubuntu.
1414
ici_append EXTRA_HOST_SOURCES "deb http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/sbuild/ubuntu jammy main"
1515
ici_cmd restrict_src_to_packages "release o=v-launchpad-jochen-sprickerhof-de" "mmdebstrap sbuild"
1616

17-
# ROS for python3-rosdep, python3-colcon-*
18-
ros_key_file="/etc/apt/keyrings/ros-archive-keyring.gpg"
19-
ici_append INSTALL_HOST_GPG_KEYS "sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o $ros_key_file"
20-
ici_append EXTRA_HOST_SOURCES "deb [signed-by=$ros_key_file] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main"
21-
2217
# Configure sources
2318
ici_hook INSTALL_HOST_GPG_KEYS
2419
ici_timed "Configure EXTRA_HOST_SOURCES" configure_extra_host_sources
@@ -30,8 +25,7 @@ echo apt-cacher-ng apt-cacher-ng/tunnelenable boolean true | ici_asroot debconf-
3025

3126
# Install packages on host
3227
DEBIAN_FRONTEND=noninteractive ici_timed "Install build packages" ici_cmd "${APT_QUIET[@]}" ici_apt_install \
33-
mmdebstrap sbuild schroot devscripts ccache apt-cacher-ng python3-pip python3-rosdep libxml2-utils libarchive-tools \
34-
python3-colcon-package-information python3-colcon-package-selection python3-colcon-ros python3-colcon-cmake \
28+
mmdebstrap sbuild schroot devscripts ccache apt-cacher-ng python3-pip libxml2-utils libarchive-tools \
3529
debhelper python3-all dh-python build-essential
3630

3731
export PIP_BREAK_SYSTEM_PACKAGES=1
@@ -41,11 +35,8 @@ ici_timed "Install bloom" ici_asroot pip install -U git+https://github.com/rhasc
4135
ici_timed "Install vcstool" ici_asroot pip install -U git+https://github.com/rhaschke/vcstool.git@master
4236
# Install latest stdeb
4337
ici_timed "Install stdeb" ici_asroot pip install -U git+https://github.com/astraw/stdeb@master
44-
45-
# Remove ros2 package repository, now that rosdep and colcon are installed
46-
# This repo might have newer versions, e.g. of colcon, than the ones to be built
47-
ici_asroot sed -i '/packages.ros.org\/ros2\/ubuntu/d' "$REPOS_LIST_FILE"
48-
ici_timed "Update apt package list" ici_asroot apt-get update
38+
# Install colcon and rosdep from pypi
39+
ici_timed "Install rosdep and colcon" ici_asroot pip install -U rosdep colcon-package-information colcon-package-selection colcon-ros colcon-cmake
4940

5041
# remove existing rosdep config to avoid conflicts with rosdep init
5142
ici_asroot rm -f /etc/ros/rosdep/sources.list.d/20-default.list

0 commit comments

Comments
 (0)