Skip to content

make deb-pkg on Ubuntu results an incompatible package with Debian releases. This script can repack it

Notifications You must be signed in to change notification settings

divaldo95/DebRepack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Deb Repack

Information

Compiling a new kernel on Ubuntu (make deb-pkg) created a deb package which can not be installed on Debian, because it does not support zstd compression:

dpkg-deb: error: archive 'mypackage.deb' uses unknown compression for member 'control.tar.zst', giving up

This can be resolved by repacking the deb content to tar.xz. This script does the job, just pass the deb package name to the script and use the *_repacked.deb fron the out folder:

./deb_repack.sh mypackage.deb

Sample output:

Checking file extension...
Creating output directory...
Creating temp directory...
Extracting deb package...
x - tmp/debian-binary
x - tmp/control.tar.zst
x - tmp/data.tar.zst
Extracting control.tar.zst...
tmp/control.tar.zst : 71680 bytes
Extracting data.tar.zst...
tmp/data.tar.zst    : 6748160 bytes
Compressing control.tar.xz...
Compressing data.tar.xz...
Creating new deb package...
Cleaning up...
Done. mypackage.deb repacked as /mydir/out/mypackage_repacked.deb

Requirements

xz-utils, zstd and binutils package must be installed. This can be done on Debian based distros with the following command:

# apt install xz-utils zstd binutils

About

make deb-pkg on Ubuntu results an incompatible package with Debian releases. This script can repack it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages