Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ubuntu

debian

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.

like image 959
Johannes Pertl Avatar asked Dec 06 '25 06:12

Johannes Pertl


2 Answers

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.

like image 68
AldegarRızvan Avatar answered Dec 08 '25 20:12

AldegarRızvan


If you're using dpkg-deb to build your deb add -Zxz to change the compression method from zstd to xz.

dpkg-deb -Zxz --build --root-owner-group yourdeb_1.1-0_amd64

like image 34
Alan Graham Avatar answered Dec 08 '25 19:12

Alan Graham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!