DEBBUILD(8)
π debbuild β the manual, but make it make sense
okay bestie, gather round π«Ά this is debbuild, section 8 of the System Manager's Manual, and she's here to Build Debian-compatible .deb packages from RPM .spec files. yes literally. from .spec files. it's giving crossover episode and honestly? iconic π
πΈ NAME πΈ
debbuild β Build Debian-compatible .deb packages from RPM .spec files. periodt. π
π COPYRIGHT π
no cap, credit where credit's due:
- 2005-2015 Β© Kris Deugau
<kdeugau@deepnet.cx> - 2015-2019 Β© Andreas Scherer
<https://ascherer.github.io/> - 2015-2019 Β© Neal Gompa
ngompa13@gmail.com - 2017-2019 Β© Datto, Inc.
<https://datto.com>
β¨ SHORT DESCRIPTION β¨
Build .deb packages from RPM-style .spec files.
debbuild supports most package-building options rpmbuild does. she's flexible like that πββοΈ
π OPTIONS π
π οΈ Build options with [ <specfile> | <tarball> | <source package> ]:
-b.β build from <specfile> ...-t.β build from <tarball> ...-r.β build from <source package> ...-.pβ ... through%prep(unpack sources and apply patches)-.cβ ... through%build(%prep, then compile)-.iβ ... through%install(%prep,%build, then install)-.lβ verify%filessection-.aβ ... source and binary packages-.bβ ... binary package only-.sβ ... source package only
--rebuild(-rb) β build binary package from <source package>--recompile(-ri) β build through%installfrom <source package>--buildroot=DIRECTORYβ override build root--short-circuitβ skip straight to specified stage (onlyc,i)
π§ Common options:
-D,--define='MACRO EXPR'β defineMACROwith valueEXPR--with/--without FLAGβ define build conditionals fromFLAG-S,--scm=SCMβ short for'--define "__scm SCM"'
π¦ debbuild-specific options:
-i,--installβ Unpack a.sdebin the%_topdirtree--showpkgsβ Show package names that would be built.--nobuildβ Parse <specfile>, but do no processing
π DESCRIPTION π
so basically debbuild attempts to build Debian-friendly semi-native packages from RPM spec files, RPM-friendly tarballs, and RPM source packages (.src.rpm files). she accepts most of the options rpmbuild does, and should be able to interpret most spec files usefully. π«Ά
not me about to say this but: Perl modules should be handled via CPAN+dh-make-perl instead, because it's simpler than even tweaking a .spec template. fr fr, just don't. π
As far as possible, the command-line options are identical to those from rpmbuild, although several rpmbuild options are not supported:
--clean
--rmsource
--rmspec
--target
Some of these could probably be trivially added. Feel free to send me a patch. ;)
Complex spec files will most likely not work well, if at all. Rewrite them from scratch β you'll have to make heavy modifications anyway. π
If you see something you don't like, mail me. Send a patch if you feel inspired. I don't promise I'll do anything other than say "Yup, that's broken" or "Got your message". π
The source package container I invented for debbuild, the .sdeb file, can be installed with debbuild -i exactly the same way as a .src.rpm can be installed with rpm -i. Both will unpack the file and place the source(s) and .spec file in the appropriate places in %_topdir/SOURCES and %_topdir/SPECS respectively. β¨
π ASSUMPTIONS π
As with rpmbuild, debbuild makes some assumptions about your system. she's trusting like that π
- Either you have rights to do as you please under
/usr/src/debian, or you have created a file~/.debmacroscontaining a suitable "%_topdir" definition.
Both rpmbuild and debbuild require the directories %_topdir/{BUILD,SOURCES,SPECS}. However, where rpmbuild requires the %_topdir/{RPMS,SRPMS} directories, debbuild requires %_topdir/{DEBS,SDEBS} instead. Create them in advance; some subdirectories are created automatically as needed, but most are not. β οΈ
/var/tmpmust allow script execution βrpmbuildanddebbuildboth rely on creating and executing shell scripts for much of their functionality. By default,debbuildalso creates install trees under/var/tmpβ however this is (almost) entirely under the control of the package's.specfile. π- If you wish to
--rebuilda.src.rpmfile, your%_topdirfor bothdebbuildandrpmbuildmust either match, or be suitably symlinked one direction or another so that both programs are effectively working in the same tree. (Or you could just manually wrestle files around your system. π)
You could symlink ~/.rpmmacros to ~/.debmacros (or vice versa) and save yourself some hassle if you need to rebuild .src.rpm packages on a regular basis. π‘
π ERRATA π
debbuild deliberately does a few things differently from rpmbuild. main character energy, honestly π
π Finding out what packages should be built (--showpkgs)
rpmbuild does not include any convenient method I know of to list the packages a spec file will produce. Since I needed this ability for another tool, I added it. no cap. π
It requires the .spec file for the package, and produces a list of full package filenames (without path data) that would be generated by one of --rebuild, -ta, -tb, -ra, -rb, -ba, or -bb. This includes the .sdeb source package. β¨
π AUTHOR π
debbuild was written by Kris Deugau. The present version was developed by Andreas Scherer, Neal Gompa, and others. It is available at <http://github.com/debbuild/debbuild>. π«Ά
π BUGS π
- Funky Things Happen if you forget a command-line option or two. I've been too lazy to bother fixing this. π
- Many macro expansions are supported, some are incompletely supported, some not at all. π¬
- The generated scriptlets don't quite match those from
rpmbuildexactly. There are extra environment variables and preprocessing that I haven't needed (yet). π§ - Documentation, such as it is, will likely remain perpetually out of date (in which way it follows in RPM's tradition). π
%_topdirand the five "working" directories under%_topdircould arguably be created bydebbuild. However,rpmbuilddoesn't create these directories either. π€·ββοΈ
π SEE ALSO π
rpm(8), rpmbuild(8), and pretty much any document describing how to write a .spec file. iykyk π
and that's the whole thing bestie!! π this was Release 20.04.0, dated 2025-07-23 β the DEBBUILD(8) era, slay. go build something cute, and remember: make your directories in advance. πβ¨π¦
π¦ where this page comes from
- fedora 43: debbuild 20.04.0-17.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms