Is it safe to install own rpm packages on Debian-based distros?

0

We have multiple servers with Debian, Ubuntu and CentOS. We decided, that we need to be able install our own non-binary and java packages to any of these servers using rpm, because CentOS our primary distro. But a lot of warnings about using rpm could be found in various Debian documents, and none of these documents covers what's bad in-deep.

What could go wrong, if we create our own rpm packages containing only .jar/.js files, pre-install/post-install/startup scripts and without any dependencies?

outring

Posted 2015-01-16T14:14:50.020

Reputation: 103

Answers

0

Those are all the reasons I can think of why one shouldn't use packages built for another distro:

  • Binaries could be built against libraries that aren't present on the current distro or are present in the wrong version.
  • filesystem layouts can differ between different distros.
  • other assumptions about the system where the package is getting installed on, made by the packager that might not apply on the current distro.
  • Package names may differ between distros, so dependencies might not resolve properly.
  • Special package management features like hooks etc. differ between package managers.

If you are well aware of this and you know what you're doing, then using RPMs on Debian and Ubuntu isn't a problem.

In case of JS and Java without additional dependencies, this shouldn't be a problem.

FSMaxB

Posted 2015-01-16T14:14:50.020

Reputation: 1 528

There is one more consideration that is important. Package managers track what packages each file belongs to. Installing outside package managers or using 2 on the same system can lead to overwriting of important files. – Bruno9779 – 2015-03-11T12:44:28.917

@Bruno9779 I understand the question in a way that there is only one package manager. The foreign packages get converted to the native package format via a tool like "alien" prior to installing. – FSMaxB – 2015-03-11T23:06:31.033

OP does not mention convertin the packages, and there is rpm available for debian: https://packages.debian.org/wheezy/rpm

– Bruno9779 – 2015-03-12T11:31:27.393

0

Without any dependencies it may work, but I think you don't any rpm package at all. Just copy your scripts where you want.

Also you can use converter for simple packet management.

I don't think that it is good idea to get several package management systems at one OS.

user2986553

Posted 2015-01-16T14:14:50.020

Reputation: 134

0

Converter, aka alien, is unstable and buggy.

To package your software for different package manager I strongly advise you to build from source with a tool like fpm.

Do not convert binaries for production servers. Ever. Instead invest 1 hour more packaging properly, and avoid long and boring debugging.

Bruno9779

Posted 2015-01-16T14:14:50.020

Reputation: 1 225