Open rkosegi opened 6 years ago
This is a good question, and I don't know the answer. I don't think there's going to be any automatic renaming possible given the inconsistencies in naming practices between debian and red hat.
That said, maybe fpm can provide some kind of setting where you can define the mapping?
Yeah, that would be most flexible way IMHO.
Something like adding CLI option --package-mapping file
This is an even larger ... not problem, but simply larger inconsistency, in my opinion.
The big distributions often simply use a different name, even for (mostly) similar packages, like -dev/-devel packages for a given program at hand (even when both are largely the same between debian and fedora, content-wise).
Additionally there are different policies at work that largely depend on the individual maintainer at hand, e. g. how "ruby" itself used to be split up into many different subcomponents on debian but nowhere near as much as on rpm/fedora-based systems.
However had, I think that in principle it could be possible. All the information is available on the www; in ruby one can perhaps scan for this via open-uri (I use open-uri a lot to grab and track upstream releases such as mate-desktop, kde-packages etc...), including the dependencies and the name of the programs that are used.
@rkosegi if you happen to have time, do you think you could give an example of 5 random programs, of somewhat popular projects, that map between debian and redhat? You gave one already, the "openssh-client" to "openssh-clients"; perhaps with some more input, one could come up with a simple script that works fairly well (or perhaps just do the hard task and map all the debian packages first, and then finding the corresponding names to fedora, and vice versa, automatically. It is probably a straightforward task but it may involve quite a lot of code ... guess as a first step it may help to know which URLs one could use, and then write some open-uri glue to it).
@shevegen I'm afraid that simple script can't handle this. Naming strategies doesn't seems to be consistent even within same distro. Sometimes there is no 1:1 mapping, ie. single package on one distro can be modularized into multiple packages on other.
Here are couple of 1:1 examples
CentOS | Ubuntu |
---|---|
pysnmp | python-pysnmp4 |
python2-pip | python-pip |
python34-pip | python3-pip |
nagios | nagios3 |
openldap-servers | slapd |
python-websocket-client | python-websocket |
Just came across this today:
debian .deb
dependency:
libc6 >= 2.34
Installed version of libc
on almalinux:
glibc 2.34
yum
output, when trying to install the rpm package created like: fpm -s deb -t rpm ...
:
[root@0290c3d3315c ~]# yum install ./triton-mdata-client-0.0.2-1.x86_64.rpm
Last metadata expiration check: 0:02:04 ago on Fri Jun 2 11:44:30 2023.
Error:
Problem: conflicting requests
- nothing provides libc6 >= 2.34 needed by triton-mdata-client-0.0.2-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Is there any way to override the dependencies and declare them manually? When using -d glibc
it gets added but the broken dependency libc6
is still there...
EDIT: Found it, working flags:
--no-auto-depends --depends glibc
Is it possible to provide mapping for dependencies while converting deb => rpm?
For example debian-like OSes have
openssh-client
, but RHEL-like OSes haveopenssh-clients
.