aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2017-11-24 19:12:15 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2017-11-24 19:12:15 -0800
commit7925c8d517cb731a61c728fb157b262b01d708fd (patch)
tree940cc5d7c23e2ef31a45fb5727f7d52d313f23f6
parentrsync-gen.sh: engage GPG signing of MetaManifest. (diff)
downloadmastermirror-scripts-7925c8d517cb731a61c728fb157b262b01d708fd.tar.gz
mastermirror-scripts-7925c8d517cb731a61c728fb157b262b01d708fd.tar.bz2
mastermirror-scripts-7925c8d517cb731a61c728fb157b262b01d708fd.zip
rsync-gen.sh/signing: improve variables and log entries.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xrsync-gen.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/rsync-gen.sh b/rsync-gen.sh
index 94b1311..cd27cf6 100755
--- a/rsync-gen.sh
+++ b/rsync-gen.sh
@@ -228,23 +228,27 @@ timelog___end "THICKEN-META" | timelogger
# end 6a)
# 6b) Sign top-level MetaManifest
+timelog_start "SIGN-METAMANIFEST" | timelogger
for m in Manifest metadata/glsa/Manifest Manifest/news/Manifest ; do
tmp="$(mktemp)"
+ src="${STAGEDIR_repo_gentoo}"/$m
+ [ -s "${src}" ] || continue
gpg --batch -u "${SIGNKEYID}" \
--armor --clearsign \
- --output "${m}.$$" "$m"
+ --output "${tmp}" "$src"
rc=$?
if [[ $rc -ne 0 ]]; then
- echo "$0: Failed to GPG-clearsign $m, tempfile at $tmp"
+ echo "$0: Failed to GPG-clearsign $src, tempfile at $tmp"
exit 5
fi
- mv -f "${tmp}" "$m"
+ mv -f "${tmp}" "$src"
rc=$?
if [[ $rc -ne 0 ]]; then
- echo "$0: Move to signed $m, tempfile at $tmp"
+ echo "$0: Move to signed $src, tempfile at $tmp"
exit 5
fi
done
+timelog___end "SIGN-METAMANIFEST" | timelogger
# end 6b)
# start 6c) Validate manifests