changing debian package name for parallel installation

37 views Asked by At

I want to make a custom version of a package already installed in the system and install it next to it without it conflicting with the already installed version.

In particular, it's about Protobuf v3.6.1 that comes with ubuntu 20.04 and a custom build of Protobuf v3.21.12. Several tools that I use on the system link to libprotobuf.so which points to libprotobuf.so.17 If I install the new version of protobuf, it conflicts the old libprotobuf-dev and it makes libprotobuf.so by default point to libprotobuf.so.32. So the tools that use the old protobuf now link to the new one and break.

The packaging scripts for protobuf v3.21.12 I have taken from ubuntu project I think (or perhaps debian salsa, don't recall right now, but shouldn't matter).

Now my question is, is there a simple way, some debian packaging tool like debchange perhaps, that allows to rename the packages/libs in the custom built protobuf to something different so there are no more potential conflicts with the ubuntu default version of protobuf?

I imagine something like renaming all of them to protobuf-foo (e.g. libprotobuf-dev -> libprotobuf-foo-dev). This way, I can make my new software that depends on the new protobuf version depend on that protobuf-foo specifically and nothing else is affected at all.

And if there's no such tool, would that mean I'd have to manually edit all those debian/control files etc as well as potentially the protobuf bazel build scripts too, to get things renamed properly?

0

There are 0 answers