Skip to content
/ spec2deb Public
forked from macq/spec2deb

This utility takes a rpm package.spec as input generating a series of debian-specific files like the package.dsc build descriptor and the debian.diff.gz / debian.tar.gz containing the control file and patches. The result is a directory that is ready for dpkg-source to build a *.deb.

Notifications You must be signed in to change notification settings

gdttn/spec2deb

 
 

Repository files navigation

spec2deb

Build Status codecov

This utility takes a rpm package.spec as input generating a series of debian-specific files like the package.dsc build descriptor and the debian.diff.gz / debian.tar.gz containing the control file and patches.

The result is a directory that is ready for dpkg-source to build a *.deb.

Note that the script has some builting "magic" to transform the rpm spec %build and %install scripts as well. Although it works in a lot of cases it might be failing in your case. And yes ... we take patches.

debtransform

The script is mainly used in converting existing rpm packages in the Opensuse Build System (OBS). That system has a special "debtransform" script that can take an existing tarball from the existing rpm sources repository tree (without renaming it to some "*.orig.tar.gz" name) to populate a debian source directory. The "debtransform" script will also generate the debian.diff.gz which would be otherwise done by this spec2deb script. In the "--debtransform" mode however the spec2deb script will create a "debian.tar.gz" that will be picked up OBS's "debtransform" script. The resulting temporary debian source directory for Debian/Ubuntu builds will therefore mainly contain specs and code generated by "spec2deb".

Note that the "spec2deb" script will automatically switch into the "--debtransform" mode when an ".osc" subdirectory is found which flags the current directory to be a checkout from some OBS project/package.

debian.diff.gz

In the "--no-debtransform" mode the script will prefer to generate a package.debian.diff.gz which is much easier to read. It does have the same content however as the debian.tar.gz including the required files like debian/source/format, debian/control, debian/changelog and the debian/patches.

For debugging purposes the script has additional options that will show only one of these generated elements. While many things can be converted directly you should take care to check the "--debian-rules" generated from the rpm build script parts.

Download

Get a source snapshot from one of the tags: https://github.com/macq/spec2deb/releases

Documentation

There is additional documentation in the README.TXT in the project sources.

Functional tests

inside src directory:

python3 -m coverage run --branch test/run_tests.py
python3 -m coverage report -m

About

This utility takes a rpm package.spec as input generating a series of debian-specific files like the package.dsc build descriptor and the debian.diff.gz / debian.tar.gz containing the control file and patches. The result is a directory that is ready for dpkg-source to build a *.deb.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.3%
  • Makefile 0.7%