Project packaging (x86_64)

In this section there are commands to follow.

The local builder allows projects to be packaged locally, so you will write and apply modifications to the project’s specfile locally before uploading it in the factory.

Thanks to the package initialization done before, the specfile is available here: ~/my_rp_builder_dir/gitpkgs/anemometer-industrial-demo/anemometer-industrial-demo.spec.

With the local builder, you can modify the specfile on the host and test the packaging. Furthermore, you can update your sources and specfile locally and commit once the build works.

You can get the right specfile with this command:

wget http://github.com/redpesk/redpesk-samples/industrial-demo-project/-/raw/master/packaging/anemometer-industrial-demo.spec -O ~/my_rp_builder_dir/gitpkgs/industrial-demo-project/anemometer-industrial-demo.spec

Then, start packaging your project:

rp-cli local package run anemometer-industrial-demo --target x86_64 --project industrial-demo-project --regen-archive

The flag --regen-archive is here to use the local sources. If you want to iterate on package several times (while debugging a specfile for example), you can use the flag -N, so that the packaging environment is not recreated each time. This should speed up the packaging.

Cross packaging (aarch64)

In order to cross-build in the local builder, you have to setup your host to be able to run aarch64 binaries. To do so, refer to the main documentation

Now that your host is ready for crossbuild, use the following command:

# If the target flag is not present, the default target is aarch64
rp-cli local package run anemometer-industrial-demo --target aarch64 --project industrial-demo-project

Upload the new specfile to the factory

If the package was correctly built in the previous step, it is possible to upload the specfile to the factory using the following command:

rp-cli applications upload anemometer-industrial-demo --file-path ~/my_rp_builder_dir/gitpkgs/industrial-demo-project/anemometer-industrial-demo/anemometer-industrial-demo.spec

Force the app rebuild from the factory

UI

Once you are on your application view (Projects > Industrial Demo Project > Applications > anemometer-industrial-demo), just click on the build button.

Application build

rp-cli

rp-cli applications build anemometer-industrial-demo