summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@gmail.com>2021-03-11 21:41:16 -0800
committerAndrei Vagin <avagin@gmail.com>2021-03-11 21:59:51 -0800
commit8cbea788b968233dfa86dae147777d4c1c2fac4d (patch)
treed3f313602d7c2579ef58858f52c7779c69f3a763
parent32578a591c01b1a64ce0bc5c9c62be4e8689232d (diff)
make/release: Sign a package only if it isn't signed yet.
We can generate more than one apt repo for the same package. If we will sign a package again, its file will be changed and all hashes that have been generated before will be invalid.
-rwxr-xr-xtools/make_apt.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/make_apt.sh b/tools/make_apt.sh
index 68f6973ec..935c4db2d 100755
--- a/tools/make_apt.sh
+++ b/tools/make_apt.sh
@@ -107,7 +107,9 @@ for pkg in "$@"; do
cp -a -L "$(dirname "${pkg}")/${name}.deb" "${destdir}"
cp -a -L "$(dirname "${pkg}")/${name}.changes" "${destdir}"
chmod 0644 "${destdir}"/"${name}".*
+ # Sign a package only if it isn't signed yet.
# We use [*] here to expand the gpg_opts array into a single shell-word.
+ dpkg-sig -g "${gpg_opts[*]}" --verify "${destdir}/${name}.deb" ||
dpkg-sig -g "${gpg_opts[*]}" --sign builder "${destdir}/${name}.deb"
done