Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Strip the signing key from a debian package.
#!/usr/bin/env bash
if [ "$1" == "" ]; then
echo "Usage: $0 <deb-package>"
exit 1
fi
TARGET=$1
TMPDIR=`mktemp -d`
dpkg-deb -x $TARGET $TMPDIR
dpkg-deb --control $TARGET $TMPDIR/DEBIAN
mv $TARGET $TARGET.old
dpkg -b $TMPDIR $TARGET
rm -rf $TMPDIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.