Monday, June 6, 2022

[SOLVED] How do I build a .deb without zstd compression in Ubuntu 21.10?

Issue

I'm building a .deb using dpkg-buildpackage on Ubuntu 21.10 that is then extracted in a Debian system, which does not use zstd compression. How can I switch to the old compression when building my deb?

Running the command with --compression=xz or the equivalent -Z flag still leads to a zstd compressed file.


Solution

You can make dpkg use another compression format by adding the following lines to the rules file, which is located in your debian folder:

override_dh_builddeb:
    dh_builddeb -- -Zgzip

It is a bit late, but I hope it helps somebody.



Answered By - AldegarRızvan
Answer Checked By - Cary Denson (WPSolving Admin)