updated: signing

This commit is contained in:
Filip Rojek 2023-04-27 15:20:02 +02:00 committed by Ubuntu
parent d78bf72e89
commit b5af5b54c8
2 changed files with 12 additions and 4 deletions

View File

@ -28,7 +28,12 @@ if [ "$1" = "list" ] || [ "$1" = "-l" ] || [ "$1" = "--list" ]; then
exit exit
fi fi
if [ "$1" = "serve" ] || [ "$1" = "-s" ] ||[ "$1" = "--serve" ]; then if [ "$1" = "sign" ] || [ "$1" = "-s" ] || [ "$1" = "--sign" ]; then
$DIR/scripts/gpgSign.sh $2
exit
fi
if [ "$1" = "serve" ] || [ "$1" = "-S" ] ||[ "$1" = "--serve" ]; then
python3 -m http.server python3 -m http.server
exit exit
fi fi

9
scripts/gpgSign.sh Normal file → Executable file
View File

@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
# This is INSECURE! KEY="$1"
cat ~/tmprepo/apt-repo/dists/stable/Release | gpg --default-key example -abs > ~/tmprepo/apt-repo/dists/stable/Release.gpg
cat ~/tmprepo/apt-repo/dists/stable/Release | gpg --default-key example -abs --clearsign > ~/tmprepo/apt-repo/dists/stable/InRelease echo "debrepo: signing using $KEY"
cat ./apt-repo/dists/stable/Release | gpg --default-key $KEY -abs > ./apt-repo/dists/stable/Release.gpg
cat ./apt-repo/dists/stable/Release | gpg --default-key $KEY -abs --clearsign > ./apt-repo/dists/stable/InRelease