Building RPMs with docker

I’m trying to package monerod and the monero wallets, which is simple enough to get it to compile and everything. The big issue I have is that I’m trying to reproduce the same builds that are distributed here: Downloads | Monero - secure, private, untraceable. But those are built with docker.

I would like to be able to use the compiled binaries that I get building without docker, but those are going to run into issues such as with Trezor wallets: monero/src/device_trezor/README.md at master · monero-project/monero · GitHub. Trezor support needs protobuf 21 and the latest version of protobuf available in Fedora is 3.19.6 which is 2 years old. I’m concerned I might run into other issues as well, being able to use docker to reproduce their builds appears to be the simplest option.

I can’t really find any documentation about building RPMs with docker, other than a couple very old posts here and there and a github repo, but no official documentation. Is there not any guidelines or macros for docker? I want to be able to submit these packages to Fedora as well, so I want to ensure I do this properly.

Maybe there is another way I can approach this as well that I’m just not seeing or understanding, suggestions are welcome.

I never contemplated using docker, but do use mock to handle things. Last I was informed, any packages that you wish to submit need to be buildable in mock cleanly. Things may have changed, as that was a decade back.

Yes building with mock is the easy part. The hard part is building in mock with all features enabled.

In all honesty, I don’t know much about docker nor do I want to use it, however, the Fedora repos are missing key components needed to build with all features enabled such as protobuf v21. So my question sort of was if it’s even possible or if it makes any sense to build with docker inside of mock and if that’s okay for a package submission to do, since I can’t really find any documentation on it or macros for it.

Maybe it’ll be better to file a bug report about updating to a newer version of protobuf and any other components I need?

There is already a bug for the protobuf update: 1831350 – protobuf-26.0 is available. It looks like the maintainers need more manpower.

Wouldn’t mind being that extra manpower, although I’d just have to get sponsored and familiar with protobuf and everything else. One small step at a time.