The Haveno .deb are build with Ubuntu. Debian 11 dpkg can't handle tar.zst files.
DEB install: unknown compression for member 'control.tar.zst'
[Edit:] Debian has fixed this in dpkg (1.21.18) = bookworm (stable) and newer.
"the ZStandard format is widely used on many projects, has been specified within the IETF as RFC8878, so backwards compatibility and format stability are no longer a concern,"
Haveno & Haveno-reto .deb can be installed directly. Repackage is no longer necessary!
#!/bin/bash
DEBPACKAGE="${1%.deb}"
[[ -z "$1" ]] && echo "Usage: $0 <package.deb>" && exit 1
set -e
ar x $DEBPACKAGE.deb
zstd -d < control.tar.zst | xz > control.tar.xz
zstd -d < data.tar.zst | xz > data.tar.xz
ar -m -c -a sdsd "$DEBPACKAGE"_repacked.deb debian-binary control.tar.xz data.tar.xz
rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst
echo "Repack done. Use the following command to install:"
echo "sudo dpkg -i ${DEBPACKAGE}_repacked.deb"
usage example:
~/bin/repack.sh ~/Downloads/haveno_1.0.9_amd64.deb
Or just with wildcard * (asterisk):
~/bin/repack.sh ~/Downloads/haveno_*amd64.deb
Credits and more info: yktoo/indicator-sound-switcher#113