diff options
author | Andrei Vagin <avagin@gmail.com> | 2021-03-11 21:41:16 -0800 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2021-03-11 21:59:51 -0800 |
commit | 8cbea788b968233dfa86dae147777d4c1c2fac4d (patch) | |
tree | d3f313602d7c2579ef58858f52c7779c69f3a763 /tools/make_apt.sh | |
parent | 32578a591c01b1a64ce0bc5c9c62be4e8689232d (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.
Diffstat (limited to 'tools/make_apt.sh')
-rwxr-xr-x | tools/make_apt.sh | 2 |
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 |