aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/templates/sign-check-package
diff options
context:
space:
mode:
Diffstat (limited to 'modules/buildsystem/templates/sign-check-package')
-rw-r--r--modules/buildsystem/templates/sign-check-package16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/buildsystem/templates/sign-check-package b/modules/buildsystem/templates/sign-check-package
new file mode 100644
index 00000000..de397f02
--- /dev/null
+++ b/modules/buildsystem/templates/sign-check-package
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+file="$1"
+key="$2"
+keydir="$3"
+
+tmpfile=`/tmp/tmp.fMzaAHPDgM`
+cp -p "$file" "$tmpfile"
+rpm --delsign "$tmpfile"
+/usr/bin/mga-signpackage "$tmpfile" "$key" "$keydir"
+while rpmsign -Kv "$tmpfile" 2>&1 | grep BAD
+do
+ cp -p "$file" "$tmpfile"
+ /usr/bin/mga-signpackage "$tmpfile" "$key" "$keydir"
+done
+mv -f "$tmpfile" "$file"