6

Given a pacman package (.pkg.tar.xz), is there a tool to convert it to a deb or rpm package?

In other words, I'm looking for an equivalent to alien. So far, I got the impression that such a tool does not exist.

Edit: Some background about .pkg.tar.xz pacman packages (source: Arch Wiki "Creating packages" article):

An Arch package is no more than a tar archive, or 'tarball', compressed using xz, which contains the following files generated by makepkg:

The binary files to install.
.PKGINFO: contains all the metadata needed by pacman to deal with packages, dependencies, etc.
.MTREE: contains hashes and timestamps of the files, which are included in the local database so that pacman can verify the integrity of the package.
.INSTALL: an optional file used to execute commands after the install/upgrade/remove stage. (This file is present only if specified in the PKGBUILD.)
.Changelog: an optional file kept by the package maintainer documenting the changes of the package. (It is not present in all packages.)
  • I don't know what this format is, but if it is (as it sounds) just a tarball of the binary files, you could use the debian packaging tools to build a debian binary package. some details about this format would help. – Faheem Mitha Dec 21 '14 at 19:58
  • @FaheemMitha I edited my post. If there is a way to convert just the binary files to one deb package, it would be good enough for my use case. – Philipp Claßen Dec 21 '14 at 20:50
  • What is your use case? Why not build a Debian package directly? Note that you might be able to convert a pacman package into a Debian binary package, but that doesn't mean it will work correctly. – Faheem Mitha Dec 21 '14 at 20:56
  • @FaheemMitha Creating a Debian package would certainly be the best approach. I'm not familiar with the tool, though. For me, it would be good enough to give it a shot to see if a converted package works. If not, I would just install my little helper library by hand. The only advantage of having a deb package would be that I can uninstall easier if I no longer it. – Philipp Claßen Dec 21 '14 at 21:25
  • 1
    Again, what is your use case? Building a Debian package from sources would be significantly easier and less error-prone, than converting from a pacman package. Can you say what you are trying to do, please? – Faheem Mitha Dec 21 '14 at 21:27
  • 1
    If you have a make; make install kind of software or with autotools or CMake, creating a Debian package is rather quick: Create the directory with dh_make -f SOURCE.tar, then edit debian/control and add the dependencies (not needed for you). Then build it using debuild -us -uc and install it using dpkg -i or within the build tree with debi. – Martin Ueding Mar 27 '15 at 09:54
  • https://unix.stackexchange.com/a/194531/129195 – Andre Figueiredo May 15 '18 at 19:00
  • There is a need for the alien tool to add support of a conversion from arch-linux packages to deb packages (it currently supports rpm,deb,tgz and slp). Or there is a need for an alternative. – Velkan Apr 08 '22 at 08:21

0 Answers0