Skip to content

Instantly share code, notes, and snippets.

@deltabravozulu
Forked from axeliodiaz/howto_deb_repackage.txt
Last active January 10, 2023 08:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deltabravozulu/10d61586bc7bf796ed005175d17445b8 to your computer and use it in GitHub Desktop.
Save deltabravozulu/10d61586bc7bf796ed005175d17445b8 to your computer and use it in GitHub Desktop.
Howto repackage deb packages
Use folowing steps to repackage debian package:
1: Make dirs
# mkdir extract/DEBIAN build -p
2: Extract deb package
# dpkg-deb -x <package.deb> extract/
3: Extract control-information from a package
# dpkg-deb -e <package.deb> extract/DEBIAN
4: Do some stuff/make the changes you need to make, enter the extract directory, then recalculate the md5sums
# cd extract
# find * -type f ! -ipath '*DEBIAN*' -exec md5sum {} \; > DEBIAN/md5sums
# cd ..
4. After completed to make changes to the package, repack the deb
# dpkg-deb -b extract/ build/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment