Browse Source

bin/build-packages: retrieve keys from our keystore

Erich Eckner 1 month ago
parent
commit
c22298cdec
1 changed files with 8 additions and 4 deletions
  1. 8
    4
      bin/build-packages

+ 8
- 4
bin/build-packages View File

@@ -27,9 +27,6 @@
27 27
 # TODO: releave some locking conditions - meta goal: be able to run multiple
28 28
 # build slaves on one host from within one archlinux32/builder repository
29 29
 
30
-# TODO: Set up some keyserver to retrieve the missing keys from. A
31
-# background job can then scrub the net for wanted keys.
32
-
33 30
 # shellcheck disable=SC2016
34 31
 usage() {
35 32
   >&2 echo ''
@@ -517,7 +514,14 @@ while [ "${count}" -ne 0 ] && \
517 514
               ' "${log_file}"
518 515
             )
519 516
             if [ -n "${missing_keys}" ]; then
520
-# TODO: how about putting all the missing keys somewhere on archlinux32.org?
517
+              if printf '%s\n' "${missing_keys}" \
518
+                | sed '
519
+                  s@^@https://archlinux32.org/keys.php?k=@
520
+                ' \
521
+                | xargs curl -Ss \
522
+                | gpg --import; then
523
+                continue
524
+              fi
521 525
               if gpg --recv-keys "${missing_keys}"; then
522 526
                 continue
523 527
               fi