From 11eab6fcc9ac3fb3c90046747999d20400b40f5d Mon Sep 17 00:00:00 2001 From: Ruben Garcia <84038639+rgarciaruiz@users.noreply.github.com> Date: Fri, 22 Mar 2024 15:18:36 -0700 Subject: [PATCH] ROS Noetic Java Generator (#770) * Add scripts to patch and repackage genjava for ROS noetic * Update README to reflect genjava backport to ROS noetic * Update msgs_jar workflow to run on Ubuntu 20 instead * Update android submodule to latest version --------- Co-authored-by: Ruben Garcia Co-authored-by: Trey Smith --- .github/workflows/msgs_jar.yaml | 13 +- INSTALL.md | 6 +- scripts/docker/astrobee_msgs.Dockerfile | 6 +- scripts/docker/build_msgs_jar.Dockerfile | 24 ++-- scripts/setup/debians/rosjava/.gitignore | 12 ++ .../setup/debians/rosjava/bootstrap/changelog | 5 + .../setup/debians/rosjava/bootstrap/compat | 1 + .../setup/debians/rosjava/bootstrap/control | 12 ++ scripts/setup/debians/rosjava/bootstrap/rules | 61 +++++++++ .../debians/rosjava/bootstrap/source/format | 1 + .../debians/rosjava/bootstrap/source/options | 5 + .../debians/rosjava/build-tools/changelog | 5 + .../setup/debians/rosjava/build-tools/compat | 1 + .../setup/debians/rosjava/build-tools/control | 12 ++ .../build-tools/patches/python3_compat.patch | 121 ++++++++++++++++++ .../rosjava/build-tools/patches/series | 1 + .../setup/debians/rosjava/build-tools/rules | 61 +++++++++ .../debians/rosjava/build-tools/source/format | 1 + .../rosjava/build-tools/source/options | 5 + .../setup/debians/rosjava/build_bootstrap.sh | 33 +++++ .../debians/rosjava/build_build-tools.sh | 36 ++++++ .../setup/debians/rosjava/build_genjava.sh | 33 +++++ .../setup/debians/rosjava/build_messages.sh | 33 +++++ .../debians/rosjava/build_rosjava_debians.sh | 78 +++++++++++ .../setup/debians/rosjava/genjava/changelog | 5 + scripts/setup/debians/rosjava/genjava/compat | 1 + scripts/setup/debians/rosjava/genjava/control | 12 ++ .../genjava/patches/python3_compat.patch | 13 ++ .../debians/rosjava/genjava/patches/series | 1 + scripts/setup/debians/rosjava/genjava/rules | 61 +++++++++ .../debians/rosjava/genjava/source/format | 1 + .../debians/rosjava/genjava/source/options | 5 + .../setup/debians/rosjava/messages/changelog | 5 + scripts/setup/debians/rosjava/messages/compat | 1 + .../setup/debians/rosjava/messages/control | 12 ++ .../patches/reduce_package_selection.patch | 67 ++++++++++ .../debians/rosjava/messages/patches/series | 1 + scripts/setup/debians/rosjava/messages/rules | 62 +++++++++ .../debians/rosjava/messages/source/format | 1 + scripts/setup/debians/rosjava/readme.md | 48 +++++++ submodules/android | 2 +- 41 files changed, 837 insertions(+), 27 deletions(-) create mode 100644 scripts/setup/debians/rosjava/.gitignore create mode 100644 scripts/setup/debians/rosjava/bootstrap/changelog create mode 100644 scripts/setup/debians/rosjava/bootstrap/compat create mode 100644 scripts/setup/debians/rosjava/bootstrap/control create mode 100755 scripts/setup/debians/rosjava/bootstrap/rules create mode 100644 scripts/setup/debians/rosjava/bootstrap/source/format create mode 100644 scripts/setup/debians/rosjava/bootstrap/source/options create mode 100644 scripts/setup/debians/rosjava/build-tools/changelog create mode 100644 scripts/setup/debians/rosjava/build-tools/compat create mode 100644 scripts/setup/debians/rosjava/build-tools/control create mode 100644 scripts/setup/debians/rosjava/build-tools/patches/python3_compat.patch create mode 100644 scripts/setup/debians/rosjava/build-tools/patches/series create mode 100755 scripts/setup/debians/rosjava/build-tools/rules create mode 100644 scripts/setup/debians/rosjava/build-tools/source/format create mode 100644 scripts/setup/debians/rosjava/build-tools/source/options create mode 100755 scripts/setup/debians/rosjava/build_bootstrap.sh create mode 100755 scripts/setup/debians/rosjava/build_build-tools.sh create mode 100755 scripts/setup/debians/rosjava/build_genjava.sh create mode 100755 scripts/setup/debians/rosjava/build_messages.sh create mode 100755 scripts/setup/debians/rosjava/build_rosjava_debians.sh create mode 100644 scripts/setup/debians/rosjava/genjava/changelog create mode 100644 scripts/setup/debians/rosjava/genjava/compat create mode 100644 scripts/setup/debians/rosjava/genjava/control create mode 100644 scripts/setup/debians/rosjava/genjava/patches/python3_compat.patch create mode 100644 scripts/setup/debians/rosjava/genjava/patches/series create mode 100755 scripts/setup/debians/rosjava/genjava/rules create mode 100644 scripts/setup/debians/rosjava/genjava/source/format create mode 100644 scripts/setup/debians/rosjava/genjava/source/options create mode 100644 scripts/setup/debians/rosjava/messages/changelog create mode 100644 scripts/setup/debians/rosjava/messages/compat create mode 100644 scripts/setup/debians/rosjava/messages/control create mode 100644 scripts/setup/debians/rosjava/messages/patches/reduce_package_selection.patch create mode 100644 scripts/setup/debians/rosjava/messages/patches/series create mode 100755 scripts/setup/debians/rosjava/messages/rules create mode 100644 scripts/setup/debians/rosjava/messages/source/format create mode 100644 scripts/setup/debians/rosjava/readme.md diff --git a/.github/workflows/msgs_jar.yaml b/.github/workflows/msgs_jar.yaml index d090339dba..ba9cdc8694 100644 --- a/.github/workflows/msgs_jar.yaml +++ b/.github/workflows/msgs_jar.yaml @@ -11,19 +11,12 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Build image astrobee/astrobee:msgs-ubuntu16.04 + - name: Build image astrobee/astrobee:msgs-ubuntu20.04 run: docker build . -f ./scripts/docker/astrobee_msgs.Dockerfile - --build-arg UBUNTU_VERSION=16.04 - --build-arg ROS_VERSION=kinetic - --build-arg PYTHON='' - -t astrobee/astrobee:msgs-ubuntu16.04 + -t astrobee/astrobee:msgs-ubuntu20.04 - - name: Build image astrobee/astrobee:latest-msgs-jar-ubuntu16.04 + - name: Build image astrobee/astrobee:latest-msgs-jar-ubuntu20.04 run: docker build . -f ./scripts/docker/build_msgs_jar.Dockerfile - --build-arg UBUNTU_VERSION=16.04 - --build-arg ROS_VERSION=kinetic - --build-arg PYTHON='' - --build-arg REPO=astrobee -t ghcr.io/${{ github.repository_owner }}/astrobee:latest-msgs-jar - name: Copy jar files diff --git a/INSTALL.md b/INSTALL.md index 16f1ac021f..20d594e996 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -2,13 +2,13 @@ ## System requirements -Ubuntu 20.04 is currently the only supported platform for most Astrobee development use cases. +Ubuntu 20.04 is currently the only supported platform. Here are the currently available host OS options with development roadmap details (use 64-bit PC (AMD64) desktop image): -- [Ubuntu 20.04](http://releases.ubuntu.com/20.04): This is currently the only supported platform for most Astrobee development use cases. The Astrobee hardware on ISS has been running Ubuntu 20.04 since it was upgraded during the "Crew-Minimal S14" activity on December 19, 2023. -- [Ubuntu 16.04](http://releases.ubuntu.com/16.04): No longer supported for most use cases. The Astrobee robot hardware ran Ubuntu 16.04 from its launch in 2019 until it was upgraded to run Ubuntu 20.04. Ubuntu 16.04 support was discontinued for most use cases in February 2024. Ending Ubuntu 16.04 support removed important limitations. For example, going forward, Astrobee's software will no longer need to be backward-compatible with Python 2 and OpenCV 3. However, Ubuntu 16.04 is still required in a very limited role that most developers don't need to worry about. We use it to compile a JAR file binary artifact of Astrobee message definitions used by the [astrobee_android](https://github.com/nasa/astrobee_android) code hosted on Astrobee's High-Level Processor, which runs a legacy version of Android with `rosjava`, which was designed to communicate with the ROS Kinetic distribution. Compiling the JAR file requires the `ros-kinetic-rosjava` package that is only available for Ubuntu 16.04. (But most developers shouldn't need to generate this artifact.) +- [Ubuntu 20.04](http://releases.ubuntu.com/20.04): This is currently the only supported platform. The Astrobee hardware on ISS has been running Ubuntu 20.04 since it was upgraded during the "Crew-Minimal S14" activity on December 19, 2023. Specifically not supported: +- ~~[Ubuntu 16.04](http://releases.ubuntu.com/16.04)~~: No longer supported. The Astrobee robot hardware ran Ubuntu 16.04 from its launch in 2019 until it was upgraded to run Ubuntu 20.04. Ubuntu 16.04 support was discontinued in February 2024. Ending Ubuntu 16.04 support removed important limitations. For example, going forward, Astrobee's software will no longer need to be backward-compatible with Python 2 and OpenCV 3. - ~~[Ubuntu 18.04](http://releases.ubuntu.com/18.04)~~: Ubuntu 18.04 support as a software development platform was discontinued as of November 2023. (It was never supported on the robot hardware.) - ~~[Ubuntu 22.04](http://releases.ubuntu.com/22.04)~~: There is currently no plan for Ubuntu 22.04 support on the Astrobee roadmap. However, note that Astrobee ROS2 support, when it eventually becomes available, is currently expected to use the ROS2 Humble Hawksbill distribution that normally runs on 22.04, but backported to run on 20.04 (the last Ubuntu version supported by ROS1). This will facilitate migrating from ROS1 to ROS2 without requiring a simultaneous Ubuntu distribution upgrade. diff --git a/scripts/docker/astrobee_msgs.Dockerfile b/scripts/docker/astrobee_msgs.Dockerfile index bd0df08cf9..9111c03337 100644 --- a/scripts/docker/astrobee_msgs.Dockerfile +++ b/scripts/docker/astrobee_msgs.Dockerfile @@ -19,11 +19,11 @@ # This will set up an Astrobee docker container using the non-NASA install instructions. # You must set the docker context to be the repository root directory -ARG UBUNTU_VERSION=16.04 +ARG UBUNTU_VERSION=20.04 FROM ubuntu:${UBUNTU_VERSION} -ARG ROS_VERSION=kinetic -ARG PYTHON="" +ARG ROS_VERSION=noetic +ARG PYTHON="3" # try to suppress certain warnings during apt-get calls ARG DEBIAN_FRONTEND=noninteractive diff --git a/scripts/docker/build_msgs_jar.Dockerfile b/scripts/docker/build_msgs_jar.Dockerfile index 7f0b3fd5d6..8457522a9d 100644 --- a/scripts/docker/build_msgs_jar.Dockerfile +++ b/scripts/docker/build_msgs_jar.Dockerfile @@ -21,18 +21,22 @@ ARG REMOTE=astrobee ARG REPO=astrobee -FROM ${REMOTE}/${REPO}:msgs-ubuntu16.04 +FROM ${REMOTE}/${REPO}:msgs-ubuntu20.04 -RUN apt-get update && apt-get install -y \ - unzip \ - libc6-dev-i386 \ - lib32z1 \ - python-wstool \ - openjdk-8-jdk \ - ros-kinetic-rosjava \ - && rm -rf /var/lib/apt/lists/* +COPY scripts/setup/debians/rosjava /src/msgs/src/scripts -# Compile msg jar files, genjava_message_artifacts only works with bash +# make sure there is a python binary +RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 + +# install dependencies for rosjava build script +RUN apt-get update && apt-get install -y devscripts equivs + +# build rosjava debians +RUN cd /src/msgs/src/scripts \ + && /bin/bash build_rosjava_debians.sh --install-with-deps \ + && rm -rf /var/lib/apt/lists/* + +# compile msg jar files, genjava_message_artifacts only works with bash RUN ["/bin/bash", "-c", "cd /src/msgs \ && catkin config \ && catkin build \ diff --git a/scripts/setup/debians/rosjava/.gitignore b/scripts/setup/debians/rosjava/.gitignore new file mode 100644 index 0000000000..27736c0d69 --- /dev/null +++ b/scripts/setup/debians/rosjava/.gitignore @@ -0,0 +1,12 @@ +*.build +*.changes +*.dsc +*.tar.xz +*.tar.gz +*.deb +*.ddeb +*.buildinfo +ros-noetic-rosjava-build-tools +ros-noetic-rosjava-bootstrap +ros-noetic-genjava +ros-noetic-rosjava-messages diff --git a/scripts/setup/debians/rosjava/bootstrap/changelog b/scripts/setup/debians/rosjava/bootstrap/changelog new file mode 100644 index 0000000000..651cb4957c --- /dev/null +++ b/scripts/setup/debians/rosjava/bootstrap/changelog @@ -0,0 +1,5 @@ +ros-noetic-rosjava-bootstrap (0.3.3-1astrobeefocal) focal; urgency=high + + * Add Python3 basic support + + -- Ruben Garcia Thu, 15 Feb 2024 02:00:00 -0000 \ No newline at end of file diff --git a/scripts/setup/debians/rosjava/bootstrap/compat b/scripts/setup/debians/rosjava/bootstrap/compat new file mode 100644 index 0000000000..f11c82a4cb --- /dev/null +++ b/scripts/setup/debians/rosjava/bootstrap/compat @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/scripts/setup/debians/rosjava/bootstrap/control b/scripts/setup/debians/rosjava/bootstrap/control new file mode 100644 index 0000000000..4b61941a65 --- /dev/null +++ b/scripts/setup/debians/rosjava/bootstrap/control @@ -0,0 +1,12 @@ +Source: ros-noetic-rosjava-bootstrap +Section: misc +Priority: extra +Maintainer: Ruben Garcia +Build-Depends: debhelper (>= 9.0.0), ros-noetic-catkin, ros-noetic-rosjava-build-tools +Homepage: http://ros.org/wiki/rosjava_bootstrap +Standards-Version: 3.9.2 + +Package: ros-noetic-rosjava-bootstrap +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ros-noetic-rosjava-build-tools +Description: Bootstrap utilities for rosjava builds. diff --git a/scripts/setup/debians/rosjava/bootstrap/rules b/scripts/setup/debians/rosjava/bootstrap/rules new file mode 100755 index 0000000000..cebf5a8ec7 --- /dev/null +++ b/scripts/setup/debians/rosjava/bootstrap/rules @@ -0,0 +1,61 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 +# TODO: remove the LDFLAGS override. It's here to avoid esoteric problems +# of this sort: +# https://code.ros.org/trac/ros/ticket/2977 +# https://code.ros.org/trac/ros/ticket/3842 +export LDFLAGS= +export PKG_CONFIG_PATH=/opt/ros/noetic/lib/pkgconfig +# Explicitly enable -DNDEBUG, see: +# https://github.com/ros-infrastructure/bloom/issues/327 +export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG + +%: + dh $@ -v --buildsystem=cmake + +override_dh_auto_configure: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_configure -- \ + -DCATKIN_BUILD_BINARY_PACKAGE="1" \ + -DCMAKE_INSTALL_PREFIX="/opt/ros/noetic" \ + -DCMAKE_PREFIX_PATH="/opt/ros/noetic" + +override_dh_auto_build: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_build + +override_dh_auto_test: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + echo -- Running tests. Even if one of them fails the build is not canceled. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_test || true + +override_dh_shlibdeps: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_shlibdeps -l$(CURDIR)/debian/ros-noetic-rosjava-bootstrap//opt/ros/noetic/lib/ + +override_dh_auto_install: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_install diff --git a/scripts/setup/debians/rosjava/bootstrap/source/format b/scripts/setup/debians/rosjava/bootstrap/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/scripts/setup/debians/rosjava/bootstrap/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/scripts/setup/debians/rosjava/bootstrap/source/options b/scripts/setup/debians/rosjava/bootstrap/source/options new file mode 100644 index 0000000000..8bc9182a24 --- /dev/null +++ b/scripts/setup/debians/rosjava/bootstrap/source/options @@ -0,0 +1,5 @@ +# Automatically add upstream changes to the quilt overlay. +# http://manpages.ubuntu.com/manpages/trusty/man1/dpkg-source.1.html +# This supports reusing the orig.tar.gz for debian increments. +auto-commit + diff --git a/scripts/setup/debians/rosjava/build-tools/changelog b/scripts/setup/debians/rosjava/build-tools/changelog new file mode 100644 index 0000000000..da3394c467 --- /dev/null +++ b/scripts/setup/debians/rosjava/build-tools/changelog @@ -0,0 +1,5 @@ +ros-noetic-rosjava-build-tools (0.3.3-1astrobeefocal) focal; urgency=high + + * Add Python3 basic support + + -- Ruben Garcia Thu, 15 Feb 2024 02:00:00 -0000 diff --git a/scripts/setup/debians/rosjava/build-tools/compat b/scripts/setup/debians/rosjava/build-tools/compat new file mode 100644 index 0000000000..f11c82a4cb --- /dev/null +++ b/scripts/setup/debians/rosjava/build-tools/compat @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/scripts/setup/debians/rosjava/build-tools/control b/scripts/setup/debians/rosjava/build-tools/control new file mode 100644 index 0000000000..584edbee6f --- /dev/null +++ b/scripts/setup/debians/rosjava/build-tools/control @@ -0,0 +1,12 @@ +Source: ros-noetic-rosjava-build-tools +Section: misc +Priority: extra +Maintainer: Ruben Garcia +Build-Depends: debhelper (>= 9.0.0), ant, openjdk-8-jdk, ros-noetic-catkin +Homepage: http://ros.org/wiki/rosjava_build_tools +Standards-Version: 3.9.2 + +Package: ros-noetic-rosjava-build-tools +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ant, openjdk-8-jdk, ros-noetic-catkin +Description: Simple tools and catkin modules for rosjava development. diff --git a/scripts/setup/debians/rosjava/build-tools/patches/python3_compat.patch b/scripts/setup/debians/rosjava/build-tools/patches/python3_compat.patch new file mode 100644 index 0000000000..1420cf5ced --- /dev/null +++ b/scripts/setup/debians/rosjava/build-tools/patches/python3_compat.patch @@ -0,0 +1,121 @@ +Index: ros-noetic-rosjava-build-tools/src/rosjava_build_tools/__init__.py +=================================================================== +--- ros-noetic-rosjava-build-tools.orig/src/rosjava_build_tools/__init__.py ++++ ros-noetic-rosjava-build-tools/src/rosjava_build_tools/__init__.py +@@ -4,10 +4,11 @@ + # Imports + ############################################################################## + +-import console +-from create_package import init_android_package, init_rosjava_package +-from create_android_project import create_android_project +-from create_rosjava_project import create_rosjava_project, create_rosjava_msg_project, create_rosjava_library_project +-from utils import which +-from release import scrape_for_release_message_packages +-import catkin ++from rosjava_build_tools import console ++from rosjava_build_tools.create_package import init_android_package, init_rosjava_package ++from rosjava_build_tools.create_android_project import create_android_project ++from rosjava_build_tools.create_rosjava_project import create_rosjava_project, create_rosjava_msg_project, create_rosjava_library_project ++from rosjava_build_tools.utils import which ++from rosjava_build_tools.release import scrape_for_release_message_packages ++from rosjava_build_tools import catkin ++ +Index: ros-noetic-rosjava-build-tools/src/rosjava_build_tools/create_android_project.py +=================================================================== +--- ros-noetic-rosjava-build-tools.orig/src/rosjava_build_tools/create_android_project.py ++++ ros-noetic-rosjava-build-tools/src/rosjava_build_tools/create_android_project.py +@@ -11,11 +11,10 @@ import sys + import argparse + import subprocess + import shutil +-import exceptions + + # local imports +-import utils +-import console ++from rosjava_build_tools import utils ++from rosjava_build_tools import console + + ############################################################################## + # Methods +@@ -72,9 +71,9 @@ def actually_create_android_project(pack + except subprocess.CalledProcessError: + print("Error") + raise subprocess.CalledProcessError("failed to create android project.") +- except exceptions.OSError as e: ++ except OSError as e: + print("OS error" + str(e)) +- raise exceptions.OSError() ++ raise OSError() + + # This is in the old form, let's shovel the shit around to the new form + utils.mkdir_p(os.path.join(path, 'src', 'main', 'java')) +Index: ros-noetic-rosjava-build-tools/src/rosjava_build_tools/create_package.py +=================================================================== +--- ros-noetic-rosjava-build-tools.orig/src/rosjava_build_tools/create_package.py ++++ ros-noetic-rosjava-build-tools/src/rosjava_build_tools/create_package.py +@@ -12,8 +12,8 @@ import catkin_pkg + from catkin_pkg.package_templates import create_package_xml, PackageTemplate + + # local imports +-import utils +-import console ++from rosjava_build_tools import utils ++from rosjava_build_tools import console + + ############################################################################## + # Methods +Index: ros-noetic-rosjava-build-tools/src/rosjava_build_tools/create_rosjava_project.py +=================================================================== +--- ros-noetic-rosjava-build-tools.orig/src/rosjava_build_tools/create_rosjava_project.py ++++ ros-noetic-rosjava-build-tools/src/rosjava_build_tools/create_rosjava_project.py +@@ -13,8 +13,8 @@ import argparse + import xml.etree.ElementTree as ElementTree + + # local imports +-import utils +-import console ++from rosjava_build_tools import utils ++from rosjava_build_tools import console + + ############################################################################## + # Methods +Index: ros-noetic-rosjava-build-tools/src/rosjava_build_tools/release.py +=================================================================== +--- ros-noetic-rosjava-build-tools.orig/src/rosjava_build_tools/release.py ++++ ros-noetic-rosjava-build-tools/src/rosjava_build_tools/release.py +@@ -6,7 +6,7 @@ + + import rosdistro + import catkin_pkg +-from . import catkin ++from rosjava_build_tools import catkin + + ############################################################################## + # Imports +@@ -16,9 +16,9 @@ from . import catkin + def scrape_for_release_message_packages(track): + url = rosdistro.get_index_url() + index = rosdistro.get_index(url) +- cache = rosdistro.get_release_cache(index, 'kinetic') ++ cache = rosdistro.get_release_cache(index, 'noetic') + packages = [] +- for package_name, package_string in cache.package_xmls.iteritems(): ++ for package_name, package_string in cache.package_xmls.items(): + package = catkin_pkg.package.parse_package_string(package_string) + #print(" Name: %s" % package_name) + #print(" Buildtool Depends %s" % package.build) +Index: ros-noetic-rosjava-build-tools/src/rosjava_build_tools/utils.py +=================================================================== +--- ros-noetic-rosjava-build-tools.orig/src/rosjava_build_tools/utils.py ++++ ros-noetic-rosjava-build-tools/src/rosjava_build_tools/utils.py +@@ -8,7 +8,7 @@ import os + import sys + import errno + import pwd +-import console ++from rosjava_build_tools import console + + ############################################################################## + # Methods diff --git a/scripts/setup/debians/rosjava/build-tools/patches/series b/scripts/setup/debians/rosjava/build-tools/patches/series new file mode 100644 index 0000000000..8e52d4741b --- /dev/null +++ b/scripts/setup/debians/rosjava/build-tools/patches/series @@ -0,0 +1 @@ +python3_compat.patch diff --git a/scripts/setup/debians/rosjava/build-tools/rules b/scripts/setup/debians/rosjava/build-tools/rules new file mode 100755 index 0000000000..8f579861ce --- /dev/null +++ b/scripts/setup/debians/rosjava/build-tools/rules @@ -0,0 +1,61 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 +# TODO: remove the LDFLAGS override. It's here to avoid esoteric problems +# of this sort: +# https://code.ros.org/trac/ros/ticket/2977 +# https://code.ros.org/trac/ros/ticket/3842 +export LDFLAGS= +export PKG_CONFIG_PATH=/opt/ros/noetic/lib/pkgconfig +# Explicitly enable -DNDEBUG, see: +# https://github.com/ros-infrastructure/bloom/issues/327 +export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG + +%: + dh $@ -v --buildsystem=cmake + +override_dh_auto_configure: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_configure -- \ + -DCATKIN_BUILD_BINARY_PACKAGE="1" \ + -DCMAKE_INSTALL_PREFIX="/opt/ros/noetic" \ + -DCMAKE_PREFIX_PATH="/opt/ros/noetic" + +override_dh_auto_build: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_build + +override_dh_auto_test: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + echo -- Running tests. Even if one of them fails the build is not canceled. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_test || true + +override_dh_shlibdeps: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_shlibdeps -l$(CURDIR)/debian/ros-noetic-rosjava-build-tools//opt/ros/noetic/lib/ + +override_dh_auto_install: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_install diff --git a/scripts/setup/debians/rosjava/build-tools/source/format b/scripts/setup/debians/rosjava/build-tools/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/scripts/setup/debians/rosjava/build-tools/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/scripts/setup/debians/rosjava/build-tools/source/options b/scripts/setup/debians/rosjava/build-tools/source/options new file mode 100644 index 0000000000..8bc9182a24 --- /dev/null +++ b/scripts/setup/debians/rosjava/build-tools/source/options @@ -0,0 +1,5 @@ +# Automatically add upstream changes to the quilt overlay. +# http://manpages.ubuntu.com/manpages/trusty/man1/dpkg-source.1.html +# This supports reusing the orig.tar.gz for debian increments. +auto-commit + diff --git a/scripts/setup/debians/rosjava/build_bootstrap.sh b/scripts/setup/debians/rosjava/build_bootstrap.sh new file mode 100755 index 0000000000..02cfe6f566 --- /dev/null +++ b/scripts/setup/debians/rosjava/build_bootstrap.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright (c) 2017, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The Astrobee platform is licensed under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +PACKAGE_NAME=ros-noetic-rosjava-bootstrap +ORIG_TAR=ros-noetic-rosjava-bootstrap_0.3.3.orig.tar.gz +DEB_DIR=bootstrap + +if [ -d $PACKAGE_NAME ]; then + rm -rf $PACKAGE_NAME +fi + +git clone --quiet https://github.com/rosjava/rosjava_bootstrap.git --branch kinetic $PACKAGE_NAME 2>&1 || exit 1 +cd $PACKAGE_NAME +git archive --prefix=$PACKAGE_NAME/ --output=../$ORIG_TAR --format tar.gz HEAD || exit 1 +cp -r ../$DEB_DIR debian +debuild -us -uc || exit 1 +cd .. diff --git a/scripts/setup/debians/rosjava/build_build-tools.sh b/scripts/setup/debians/rosjava/build_build-tools.sh new file mode 100755 index 0000000000..87486116cd --- /dev/null +++ b/scripts/setup/debians/rosjava/build_build-tools.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# Copyright (c) 2017, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The Astrobee platform is licensed under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +# make sure setuptools from pip3 matches apt version +# you may need to fix it like this: pip3 install setuptools==45.2.0 && pip3 install -U testresources + +PACKAGE_NAME=ros-noetic-rosjava-build-tools +ORIG_TAR=ros-noetic-rosjava-build-tools_0.3.3.orig.tar.gz +DEB_DIR=build-tools + +if [ -d $PACKAGE_NAME ]; then + rm -rf $PACKAGE_NAME +fi + +git clone --quiet https://github.com/rosjava/rosjava_build_tools.git --branch kinetic $PACKAGE_NAME 2>&1 || exit 1 +cd $PACKAGE_NAME +git archive --prefix=$PACKAGE_NAME/ --output=../$ORIG_TAR --format tar.gz HEAD || exit 1 +cp -r ../$DEB_DIR debian +debuild -us -uc || exit 1 +cd .. diff --git a/scripts/setup/debians/rosjava/build_genjava.sh b/scripts/setup/debians/rosjava/build_genjava.sh new file mode 100755 index 0000000000..10624dfd7b --- /dev/null +++ b/scripts/setup/debians/rosjava/build_genjava.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright (c) 2017, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The Astrobee platform is licensed under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +PACKAGE_NAME=ros-noetic-genjava +ORIG_TAR=ros-noetic-genjava_0.3.4.orig.tar.gz +DEB_DIR=genjava + +if [ -d $PACKAGE_NAME ]; then + rm -rf $PACKAGE_NAME +fi + +git clone --quiet https://github.com/rosjava/genjava.git --branch kinetic $PACKAGE_NAME 2>&1 || exit 1 +cd $PACKAGE_NAME +git archive --prefix=$PACKAGE_NAME/ --output=../$ORIG_TAR --format tar.gz HEAD || exit 1 +cp -r ../$DEB_DIR debian +debuild -us -uc || exit 1 +cd .. diff --git a/scripts/setup/debians/rosjava/build_messages.sh b/scripts/setup/debians/rosjava/build_messages.sh new file mode 100755 index 0000000000..853edd4f9d --- /dev/null +++ b/scripts/setup/debians/rosjava/build_messages.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright (c) 2017, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The Astrobee platform is licensed under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +PACKAGE_NAME=ros-noetic-rosjava-messages +ORIG_TAR=ros-noetic-rosjava-messages_0.3.0.orig.tar.gz +DEB_DIR=messages + +if [ -d $PACKAGE_NAME ]; then + rm -rf $PACKAGE_NAME +fi + +git clone --quiet https://github.com/rosjava/rosjava_messages.git --branch kinetic $PACKAGE_NAME 2>&1 || exit 1 +cd $PACKAGE_NAME +git archive --prefix=$PACKAGE_NAME/ --output=../$ORIG_TAR --format tar.gz HEAD || exit 1 +cp -r ../$DEB_DIR debian +debuild -us -uc || exit 1 +cd .. diff --git a/scripts/setup/debians/rosjava/build_rosjava_debians.sh b/scripts/setup/debians/rosjava/build_rosjava_debians.sh new file mode 100755 index 0000000000..d5a84a57c1 --- /dev/null +++ b/scripts/setup/debians/rosjava/build_rosjava_debians.sh @@ -0,0 +1,78 @@ +#/bin/bash -e +# +# Copyright (c) 2017, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The Astrobee platform is licensed under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# Build and install flight software custom dependencies. +set -e + +debian_loc=$(dirname "$(readlink -f "$0")") +build_list=() +install_debians=false +install_deps=false + +die () { + printf "${c_red}${c_bold}[ FATAL ]${c_reset} ${c_bold}%b${c_reset}\\n" "$1" >&2 + exit "${2:-1}" +} + +cleanup() { + rm -rf ros-noetic-rosjava-build-tools ros-noetic-rosjava-bootstrap \ + ros-noetic-genjava ros-noetic-rosjava-messages +} + +# delete old files (-f avoids 'no such file' warning on first run) +rm -f *.deb *.debian.tar.xz *.orig.tar.gz *.dsc *.build *.buildinfo *.changes *.ddeb + +# Process arguments and take action +while [[ $# -gt 0 ]]; do + case "$1" in + -i|--install) + install_debians=true + ;; + -d|--install-with-deps) + install_debians=true + install_deps=true + ;; + esac + shift +done + +# Add public debians to build list +build_list+=( build-tools bootstrap genjava messages ) + +echo "Building debians" +trap 'cleanup' EXIT + +for pkg in ${build_list[@]} +do + # Dependencies + if $install_deps ; then + cd ${debian_loc}/$pkg || die + sudo mk-build-deps -i -r -t "apt-get --no-install-recommends -y" control || + die "Failed to install dependencies for $pkg" + fi + + # Building + cd "$debian_loc" + ./build_${pkg}.sh || die "Failed to build $pkg" + + # Installing + if $install_debians ; then + sudo dpkg -i *${pkg}*.deb || die "Failed to install $pkg" + fi +done diff --git a/scripts/setup/debians/rosjava/genjava/changelog b/scripts/setup/debians/rosjava/genjava/changelog new file mode 100644 index 0000000000..8d1af52dec --- /dev/null +++ b/scripts/setup/debians/rosjava/genjava/changelog @@ -0,0 +1,5 @@ +ros-noetic-genjava (0.3.4-1astrobeefocal) focal; urgency=high + + * Add Python3 basic support + + -- Ruben Garcia Thu, 15 Feb 2024 02:00:00 -0000 diff --git a/scripts/setup/debians/rosjava/genjava/compat b/scripts/setup/debians/rosjava/genjava/compat new file mode 100644 index 0000000000..f11c82a4cb --- /dev/null +++ b/scripts/setup/debians/rosjava/genjava/compat @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/scripts/setup/debians/rosjava/genjava/control b/scripts/setup/debians/rosjava/genjava/control new file mode 100644 index 0000000000..f86ceb1948 --- /dev/null +++ b/scripts/setup/debians/rosjava/genjava/control @@ -0,0 +1,12 @@ +Source: ros-noetic-genjava +Section: misc +Priority: extra +Maintainer: Ruben Garcia +Build-Depends: debhelper (>= 9.0.0), python3-catkin-pkg, python3-rospkg, ros-noetic-catkin, ros-noetic-genmsg, ros-noetic-rosjava-bootstrap, ros-noetic-rosjava-build-tools +Homepage: http://www.ros.org/wiki/genjava +Standards-Version: 3.9.2 + +Package: ros-noetic-genjava +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, python3-catkin-pkg, python3-rospkg, ros-noetic-genmsg, ros-noetic-rosjava-bootstrap, ros-noetic-rosjava-build-tools +Description: Java ROS message and service generators. diff --git a/scripts/setup/debians/rosjava/genjava/patches/python3_compat.patch b/scripts/setup/debians/rosjava/genjava/patches/python3_compat.patch new file mode 100644 index 0000000000..e374e1e638 --- /dev/null +++ b/scripts/setup/debians/rosjava/genjava/patches/python3_compat.patch @@ -0,0 +1,13 @@ +Index: ros-noetic-genjava/src/genjava/gradle_project.py +=================================================================== +--- ros-noetic-genjava.orig/src/genjava/gradle_project.py ++++ ros-noetic-genjava/src/genjava/gradle_project.py +@@ -79,7 +79,7 @@ def get_templates(): + + def populate_project(project_name, project_version, pkg_directory, gradle_project_dir, msg_dependencies): + author = author_name() +- for filename, template in get_templates().iteritems(): ++ for filename, template in get_templates().items(): + contents = instantiate_genjava_template(template, project_name, project_version, pkg_directory, author, msg_dependencies) + try: + p = os.path.abspath(os.path.join(gradle_project_dir, filename)) diff --git a/scripts/setup/debians/rosjava/genjava/patches/series b/scripts/setup/debians/rosjava/genjava/patches/series new file mode 100644 index 0000000000..8e52d4741b --- /dev/null +++ b/scripts/setup/debians/rosjava/genjava/patches/series @@ -0,0 +1 @@ +python3_compat.patch diff --git a/scripts/setup/debians/rosjava/genjava/rules b/scripts/setup/debians/rosjava/genjava/rules new file mode 100755 index 0000000000..6a5918ca68 --- /dev/null +++ b/scripts/setup/debians/rosjava/genjava/rules @@ -0,0 +1,61 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 +# TODO: remove the LDFLAGS override. It's here to avoid esoteric problems +# of this sort: +# https://code.ros.org/trac/ros/ticket/2977 +# https://code.ros.org/trac/ros/ticket/3842 +export LDFLAGS= +export PKG_CONFIG_PATH=/opt/ros/noetic/lib/pkgconfig +# Explicitly enable -DNDEBUG, see: +# https://github.com/ros-infrastructure/bloom/issues/327 +export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG + +%: + dh $@ -v --buildsystem=cmake + +override_dh_auto_configure: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_configure -- \ + -DCATKIN_BUILD_BINARY_PACKAGE="1" \ + -DCMAKE_INSTALL_PREFIX="/opt/ros/noetic" \ + -DCMAKE_PREFIX_PATH="/opt/ros/noetic" + +override_dh_auto_build: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_build + +override_dh_auto_test: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + echo -- Running tests. Even if one of them fails the build is not canceled. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_test || true + +override_dh_shlibdeps: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_shlibdeps -l$(CURDIR)/debian/ros-noetic-genjava//opt/ros/noetic/lib/ + +override_dh_auto_install: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_install diff --git a/scripts/setup/debians/rosjava/genjava/source/format b/scripts/setup/debians/rosjava/genjava/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/scripts/setup/debians/rosjava/genjava/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/scripts/setup/debians/rosjava/genjava/source/options b/scripts/setup/debians/rosjava/genjava/source/options new file mode 100644 index 0000000000..8bc9182a24 --- /dev/null +++ b/scripts/setup/debians/rosjava/genjava/source/options @@ -0,0 +1,5 @@ +# Automatically add upstream changes to the quilt overlay. +# http://manpages.ubuntu.com/manpages/trusty/man1/dpkg-source.1.html +# This supports reusing the orig.tar.gz for debian increments. +auto-commit + diff --git a/scripts/setup/debians/rosjava/messages/changelog b/scripts/setup/debians/rosjava/messages/changelog new file mode 100644 index 0000000000..30b0aaebcc --- /dev/null +++ b/scripts/setup/debians/rosjava/messages/changelog @@ -0,0 +1,5 @@ +ros-noetic-rosjava-messages (0.3.0-0astrobeefocal) focal; urgency=high + + * Generate only Astrobee dependencies + + -- Ruben Garcia Thu, 15 Feb 2024 02:00:00 -0000 diff --git a/scripts/setup/debians/rosjava/messages/compat b/scripts/setup/debians/rosjava/messages/compat new file mode 100644 index 0000000000..f11c82a4cb --- /dev/null +++ b/scripts/setup/debians/rosjava/messages/compat @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/scripts/setup/debians/rosjava/messages/control b/scripts/setup/debians/rosjava/messages/control new file mode 100644 index 0000000000..2871a23c61 --- /dev/null +++ b/scripts/setup/debians/rosjava/messages/control @@ -0,0 +1,12 @@ +Source: ros-noetic-rosjava-messages +Section: misc +Priority: extra +Maintainer: Ruben Garcia +Build-Depends: debhelper (>= 9.0.0), ros-noetic-actionlib-msgs, ros-noetic-catkin, ros-noetic-genjava, ros-noetic-geometry-msgs, ros-noetic-roscpp, ros-noetic-rosjava-build-tools, ros-noetic-sensor-msgs, ros-noetic-std-msgs, ros-noetic-trajectory-msgs +Homepage: http://ros.org/wiki/rosjava_messages +Standards-Version: 3.9.2 + +Package: ros-noetic-rosjava-messages +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ros-noetic-genjava, ros-noetic-rosjava-build-tools +Description: Message generation for rosjava. diff --git a/scripts/setup/debians/rosjava/messages/patches/reduce_package_selection.patch b/scripts/setup/debians/rosjava/messages/patches/reduce_package_selection.patch new file mode 100644 index 0000000000..7bb9b4d339 --- /dev/null +++ b/scripts/setup/debians/rosjava/messages/patches/reduce_package_selection.patch @@ -0,0 +1,67 @@ +Index: ros-noetic-rosjava-messages/CMakeLists.txt +=================================================================== +--- ros-noetic-rosjava-messages.orig/CMakeLists.txt ++++ ros-noetic-rosjava-messages/CMakeLists.txt +@@ -14,36 +14,36 @@ find_package(catkin REQUIRED genjava) + generate_rosjava_messages( + PACKAGES + std_msgs +- rosgraph_msgs # ros/ros_comm_msgs +- std_srvs +- rosjava_test_msgs # rosjava/rosjava_test_msgs ++ #rosgraph_msgs # ros/ros_comm_msgs ++ #std_srvs ++ #rosjava_test_msgs # rosjava/rosjava_test_msgs + actionlib_msgs # ros/common_msgs +- common_msgs +- diagnostic_msgs ++ #common_msgs ++ #diagnostic_msgs + geometry_msgs +- nav_msgs ++ #nav_msgs + sensor_msgs +- shape_msgs +- stereo_msgs ++ #shape_msgs ++ #stereo_msgs + trajectory_msgs +- visualization_msgs +- tf2_msgs # geometry_experimental/tf2_msgs +- ar_track_alvar_msgs # sniekum/ar_track_alvar_msgs +- uuid_msgs # ros-geographic-info/unique_identifier +- yocs_msgs # yujinrobot/yocs_msgs +- concert_msgs # robotics-in-concert/rocon_msgs +- concert_service_msgs +- gateway_msgs +- rocon_app_manager_msgs +- rocon_device_msgs +- rocon_interaction_msgs +- rocon_service_pair_msgs +- rocon_std_msgs +- rocon_tutorial_msgs +- world_canvas_msgs +- scheduler_msgs +- move_base_msgs # ros-planning/navigation +- map_store # ros-planning/map_store ++ #visualization_msgs ++ #tf2_msgs # geometry_experimental/tf2_msgs ++ #ar_track_alvar_msgs # sniekum/ar_track_alvar_msgs ++ #uuid_msgs # ros-geographic-info/unique_identifier ++ #yocs_msgs # yujinrobot/yocs_msgs ++ #concert_msgs # robotics-in-concert/rocon_msgs ++ #concert_service_msgs ++ #gateway_msgs ++ #rocon_app_manager_msgs ++ #rocon_device_msgs ++ #rocon_interaction_msgs ++ #rocon_service_pair_msgs ++ #rocon_std_msgs ++ #rocon_tutorial_msgs ++ #world_canvas_msgs ++ #scheduler_msgs ++ #move_base_msgs # ros-planning/navigation ++ #map_store # ros-planning/map_store + + roscpp # !!!!!!! REMOVE THIS ONCE https://github.com/ros-planning/navigation/pull/312 is fixed! !!!!!!!! + ) diff --git a/scripts/setup/debians/rosjava/messages/patches/series b/scripts/setup/debians/rosjava/messages/patches/series new file mode 100644 index 0000000000..388ec32e1e --- /dev/null +++ b/scripts/setup/debians/rosjava/messages/patches/series @@ -0,0 +1 @@ +reduce_package_selection.patch diff --git a/scripts/setup/debians/rosjava/messages/rules b/scripts/setup/debians/rosjava/messages/rules new file mode 100755 index 0000000000..cbe2127f2a --- /dev/null +++ b/scripts/setup/debians/rosjava/messages/rules @@ -0,0 +1,62 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 +export DH_OPTIONS=-v --buildsystem=cmake +# TODO: remove the LDFLAGS override. It's here to avoid esoteric problems +# of this sort: +# https://code.ros.org/trac/ros/ticket/2977 +# https://code.ros.org/trac/ros/ticket/3842 +export LDFLAGS= +export PKG_CONFIG_PATH=/opt/ros/noetic/lib/pkgconfig +# Explicitly enable -DNDEBUG, see: +# https://github.com/ros-infrastructure/bloom/issues/327 +export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG + +%: + dh $@ + +override_dh_auto_configure: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_configure -- \ + -DCATKIN_BUILD_BINARY_PACKAGE="1" \ + -DCMAKE_INSTALL_PREFIX="/opt/ros/noetic" \ + -DCMAKE_PREFIX_PATH="/opt/ros/noetic" + +override_dh_auto_build: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_build + +override_dh_auto_test: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + echo -- Running tests. Even if one of them fails the build is not canceled. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_test || true + +override_dh_shlibdeps: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_shlibdeps -l$(CURDIR)/debian/ros-noetic-rosjava-messages//opt/ros/noetic/lib/ + +override_dh_auto_install: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree that was dropped by catkin, and source it. It will + # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \ + dh_auto_install diff --git a/scripts/setup/debians/rosjava/messages/source/format b/scripts/setup/debians/rosjava/messages/source/format new file mode 100644 index 0000000000..46ebe02665 --- /dev/null +++ b/scripts/setup/debians/rosjava/messages/source/format @@ -0,0 +1 @@ +3.0 (quilt) \ No newline at end of file diff --git a/scripts/setup/debians/rosjava/readme.md b/scripts/setup/debians/rosjava/readme.md new file mode 100644 index 0000000000..498e28ba63 --- /dev/null +++ b/scripts/setup/debians/rosjava/readme.md @@ -0,0 +1,48 @@ +# Java Generator for ROS Noetic + +These scripts are meant to patch and repackage the Java Generator for ROS +Noetic. + +Generated Debians include: + +- ros-noetic-rosjava-build-tools +- ros-noetic-rosjava-bootstrap +- ros-noetic-genjava +- ros-noetic-rosjava-messages + +These are based on official ros-kinetic versions. Minimal patches have been +applied to make them compatible with Astrobee usage. + +These Debians are not meant for general rosjava use. They are made with +Astrobee-specific needs in mind. + +## Notes + +### Building multiple times + +Depending on the system, some of these Debians may not be able to compile again +if their package is installed. If you need to recompile these Debians for some +reason, please remove them before: + +```shell +sudo apt remove ros-noetic-rosjava-messages ros-noetic-genjava ros-noetic-rosjava-bootstrap ros-noetic-rosjava-build-tools +``` + +### Build-tools and Python setuptools + +The build-tools Debian may have issues compiling if the pip3 setuptools +package does not match the default Ubuntu 20 version. + +**If pip3 is not installed in your system this may not apply to you.** + +```shell +# Versions should match (default: 45.2.0) +pip3 list | grep setuptools +apt show python3-setuptools +``` + +If they don't match, adjust the pip3 version. Example: + +```shell +pip3 install setuptools==45.2.0 && pip3 install -U testresources +``` \ No newline at end of file diff --git a/submodules/android b/submodules/android index d6f045ab8a..ad16e76730 160000 --- a/submodules/android +++ b/submodules/android @@ -1 +1 @@ -Subproject commit d6f045ab8a276576cae8c046dce21fb26e67cdfb +Subproject commit ad16e76730c664a0cc890bd40010973edec2acdf