Skip to content

Commit

Permalink
Add readme, fix manifest list issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetkillioglu committed Oct 23, 2024
1 parent 576dc5e commit 3adf621
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: humble-build
on:
push:
branches: [ humble ]
paths-ignore:
- 'README.md'
pull_request:
branches: [ humble ]
workflow_dispatch:
Expand Down Expand Up @@ -78,6 +80,7 @@ jobs:
file: ./Dockerfile.deb_packages
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false

- name: Upload build
uses: actions/upload-artifact@v4
Expand Down
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# tii-fastdds-builder


## Description
This repository builds the required Fast-DDS libraries using `ros:humble-ros-base` baseimage. It has the SECURITY enabled, and has the patch for the PKCS#11.


## How to use
### Clone and build the debs locally
Platform selection can be as "linux/amd64" or "linux/arm64". The arm64 build on a amd64 will be executed with qemu. You can find the instructions online about how to enable qemu on your system.

Make sure to create the bin directory. If the script creates it, it will be owned by root and make the script fail.
```bash
mkdir -p ~/tii-fastdds-builder-ws && cd ~/tii-fastdds-builder-ws
git clone --recurse-submodules https://github.com/tiiuae/tii-fastdds-builder.git
cd tii-fastdds-builder
mkdir bin
PLATFORM=linux/amd64 ./build.sh ./bin/
```

### Copy the deb packages to your local directory
```bash
docker create --name tii-fastdds-builder ghcr.io/tiiuae/tii-fastdds-artifacts:humble
mkdir -p ~/tii-fastdds-builder-ws/bin
docker cp tii-fastdds-builder:/artifacts/. ~/tii-fastdds-builder-ws/bin/
docker rm tii-fastdds-builder
ls -la ~/tii-fastdds-builder-ws/bin
```

Keep in mind that the artifacts include both "deb" packages and "ddeb" debugsymbol messages. If installing with dpkg command, use it as "dpkg -i *.deb".

### Copy and install deb packages in Dockerfile
Modify the tag name accordingly. The baseimage is given as an example, could be used any that has the ros2 installed. If the ROS2 installation is done later, install the deb packages after the ROS2 installation.
```Dockerfile
FROM ros:humble-ros-base

RUN mkdir -p /tmp/fastdds_debs
COPY --from=ghcr.io/tiiuae/tii-fastdds-artifacts:humble /artifacts/*.deb /tmp/fastdds_debs/
RUN dpkg -i /tmp/fastdds_debs/*.deb
```

Warning: If you are running an `apt upgrade` operation later, some of the packages might be upgraded to the version in the ROS2 repo. To avoid this, you can pin the packages to the version you have installed. For example, you can pin the Fast-DDS packages as follows:
```Dockerfile
RUN apt-mark hold ros-humble-fastcdr \
ros-humble-fastrtps \
ros-humble-rmw-fastrtps-cpp \
ros-humble-rmw-fastrtps-dynamic-cpp \
ros-humble-rmw-fastrtps-shared-cpp \
ros-humble-rosidl-typesupport-fastrtps-c \
ros-humble-rosidl-typesupport-fastrtps-cpp \
ros-humble-foonathan-memory-vendor \
ros-humble-fastrtps-cmake-module
```

0 comments on commit 3adf621

Please sign in to comment.