This repository contains scripts and configurations to generate ROS packages for Fedora.
If you just want to install ROS, please go to the ROS COPR.
The rosfed.py
script works as follows:
It fetches package information about the upstream ROS package with the
rosinstall_generator
. This includes dependencies, license, sources, and
the version.
Note: It is important to have an updated rosdep database. You can update it
by executing rosdep update
.
./templates/
. The generic template in ./templates/pkg.spec.j2
works for
most packages. For some packages, the template needs to be modified, in
which case you can find the per-package template in
./templates/$pkgname.spec.j2
. Note that all package-specific templates
extend the generic base template in ./templates/pkg.spec.j2
.cfg/$pkgname.yaml
. This allows to add missing build and runtime
dependencies, filter out some dependencies, add build flags, and make a
package noarch.copr_build
supports
building dependency chains.The rosfed.py
script uses a default ROS distro, which usually is the latest
one but it may be falling behind in some cases. To know the default ROS distro
the ./rosfed.py --help
command can be used.
A --distro
option allows to choose a different ROS distro than the default.
In the simplest case, run ./rosfed.py $pkgname
, or
./rosfed.py -r $pkgname
if you want to generate SPEC files
for all dependencies of the given package.
You may need to do the following modifications to the config in
./cfg/$pkgname.yaml
:
Make the package noarch by adding noarch: true
.
Add dependencies, e.g., a system build dependency to qt5-qtbase-devel
:
dependencies: build: system:
Removing dependencies, e.g., opencv should not require ffmpeg:
dependencies: exclude_run: system:
Add build flags by adding buildflags: <build_flags>
to the config file.
Example from opencv:
build_flags: "--cmake-args -DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_FFMPEG=OFF"
To build a package with all its missing dependencies (i.e., the package is not updated if it already exists), run:
$ ./rosfed.py -b --copr-owner thofmann --copr-project ros --chroot fedora-rawhide-x86_64 -c Initial package --only-new -r moveit
To build a single package, run:
$ ./rosfed.py -b --copr-owner thofmann --copr-project ros --chroot fedora-rawhide-x86_64 moveit_ros_manipulation
To build the desktop_full stack, run:
$ ./rosfed.py -b --copr-owner thofmann --copr-project ros --chroot fedora-rawhide-x86_64 -r desktop_full
Additionally, you may need to modify the template by providing a
package-specific template in ./templates/$pkgname.spec.j2
. Have a look at the
existing templates for examples.
It should always be possible to regenerate the SPEC file. Thus, do not modify the generated SPEC file but instead modify the config and/or template as necessary. If you need to do a modification that is not possible, please file an issue.