Skip to content

Instantly share code, notes, and snippets.

@boldsuck
Last active August 8, 2024 22:46
Show Gist options
  • Select an option

  • Save boldsuck/097a807e2f07655f5e9e4dcf3d9fc99b to your computer and use it in GitHub Desktop.

Select an option

Save boldsuck/097a807e2f07655f5e9e4dcf3d9fc99b to your computer and use it in GitHub Desktop.

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.

bug=892664

"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!

Debian 11 users can repack Haveno with this little script:

#!/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment