Created
October 13, 2016 13:11
-
-
Save wheresjames/16f38cc1330a1ff389d5890a06b505ad to your computer and use it in GitHub Desktop.
Scripts to sign and update a debian repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export KEYNAME=$1 | |
for arch in `find $2 -maxdepth 1 -mindepth 1 -type d`; do | |
for deb in `find $arch -type f -name "*.deb"`; do | |
dpkg-sig -k $KEYNAME -s builder $deb | |
done | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create key | |
# gpg --gen-key | |
# List keys | |
# gpg --list-keys | |
# To export key | |
# gpg -a --export-secret-key 47FBF6FA > private.gpg | |
# gpg -a --export 47FBF6FA > public.gpg | |
# To import key | |
# gpg --import -v -v private.gpg | |
# gpg --import -v -v public.gpg | |
# Add key to apt | |
# apt-key add public.gpg | |
export KEYNAME=$1 | |
for arch in `find $2 -maxdepth 1 -mindepth 1 -type d`; do | |
dpkg-scanpackages $arch > $arch/Packages | |
apt-ftparchive release $arch > $arch/Release | |
gpg --digest-algo SHA256 --yes -abs -u $KEYNAME -o $arch/Release.gpg $arch/Release | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment