How to convert .rpm package to .deb?
I want to create rpm package from a .deb package. Please let me know about any easy method to do it. I am new to packaging.
asked 2014-08-15 21:06:27 -0600
This post is a wiki. Anyone with karma >750 is welcome to improve it.
I want to create rpm package from a .deb package. Please let me know about any easy method to do it. I am new to packaging.
You need learn how to compile a program, is not difficult, if you provides me the source code, I can help you. But you need learn no?
1) The correctly way
You need learn how to compile, and read the official guide here
2) Funny way
You can use fpm; read about fpm here
su -c 'yum -y install ruby-devel binutils dpkg-devel rpm-build libffi'
gem install fpm
If you have a debian package is very simple:
mkdir /tmp/installdir
cp -f myprogram.deb /tmp/installdir
cd /tmp/installdir
ar vx mypackage.deb
tar -xzvf data.tar.gz
rm -f control.tar.gz data.tar.gz debian-binary
The line using fpm, magic no?
You need change to name you want, and the version "1.1" to ??; also your name; email, url and license, no delete the quotes. Also you need write a simple description (change the example). and finally write all dependencies; example the next line I need java then -d 'java >= 6' , you can put all necessary. Remember no delete the quotes!
fpm -s dir -t rpm -p myprogram-VERSION_ARCH.rpm -n myprogram -v 1.1 -m "Juan Camaney <juancamaney at gmail dot com>" --license "GPLv3" --url http://miprogram.edu --description "My program is..." -d 'java >= 6' -C /tmp/installdir usr/
3) Alien way
It can cause problems, I broke my system by installing an rpm, I created with alien...
su -c 'yum -y install alien fakeroot'
fakeroot alien -r myprogram.deb
@gnovi no problem! In the dependencies you must compare the equivalent in Fedora; then I recommend check dependencies with 'yum whatprovides' or my favorite site http://pkgs.org/
You can use alien
for this purpose. Install using:
# yum install alien
For help learning alien, visit
# man alien
or,
# alien --help
To convert deb to rpm, use
# sudo alien -r file.deb
The output will be:
file.rpm generated
In cases of errors, the deb file is probably corrupt or unusable. On the other hand, sometimes, alien cannot handle the deb file. In that case,
# ar vx mypackage.deb
then,
# tar -xzvf data.tar.gz
For a listing of the files,
# tar -tzvf data.tar.gz
After extracting the files,
# yum install fedora-packager
Follow the instructions here to build your rpm:
https://fedoraproject.org/wiki/How_to_create_an_RPM_package
HTH.
Asked: 2014-08-15 21:06:27 -0600
Seen: 10,083 times
Last updated: Aug 19 '14
Building RPM file for Unix RuneScape Client: nothing provides Perl(JSON::backportPP)
Will dependencies be installed by the packaged rpm ?
How to add entries to /etc/services with rpm/spec
What are the advantages or disadvantages of using rpm to deb packaging? [closed]
How to install Pervasive PSQL on Fedora 27 (Server) 64bit - headless
Install upstream library with dnf
Off topic: I like Gnovi, the physics OS, are you the maintainer?
In which direction to you want to convert? The title says RPM → Debian, the text says Debian → RPM.