How to cross build a rust package for tumbleweed and fedora39 using obs?

Hello,
I’m trying to package ttyper crate for tumbleweed and fedora. I followed this wiki page to setup my obs repository and I succeed to build and install my own rpm packages built from obs server for opensuse tumbleweed.

Here’s my repository Show home:prx0 / ttyper - openSUSE Build Service

However I would like to provide ttyper rpm package for Fedora 39 too but fedora wiki mention a slightly different way to generate some rpm spec using rust2rpm tool.

My question is, what is the most common way to release a rpm package for openSUSE and fedora ?
Should I use the same .spec file with macros for fedora parts ?
Can I use two different rpm spec and specify a .spec file for each target ?

Thank you for reading,

Maximilien

@prx0 Hi and welcome to the Forum :smile:
Have a look here https://en.opensuse.org/Portal:Packaging but more specifically at https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto for the options to use in your spec file for the two build targets.

I tried to setup if define macro for fedora part, but to be honest it is really hard to make it build without problem.

Fedora recommend rust2rpm which use cargo2rpm under the hood while opensuse use cargo-packaging.
Sounds like it would be easier to setup a spec file for each target but I don’t know if it’s possible to do that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.