Skip to content

Commit 8d3377f

Browse files
packages-signed-by: Fix script to only search repositories
By looking through the `/pool/` directory the idea was to have a nice shortcut access to all repositories, however pool is not cleaned up instantly all the time, leading to stale state. Link: https://gitlab.archlinux.org/archlinux/archlinux-keyring/-/issues/318#note_411383 Signed-off-by: Christian Heusel <christian@heusel.eu>
1 parent 4a43d80 commit 8d3377f

File tree

1 file changed

+35
-13
lines changed

1 file changed

+35
-13
lines changed

package/packages-signed-by

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,38 @@ parallel_common_command=(
9292
"grep --quiet -- '${KEY_ID}'"
9393
)
9494

95-
case $OUTPUT_FORMAT in
96-
filename)
97-
# shellcheck disable=SC2029
98-
ssh "${SEARCH_HOST}" "parallel \"${parallel_common_command[*]} && echo {/.}\" ::: /srv/ftp/pool/packages/*.pkg.tar.*.sig"
99-
;;
100-
packagename)
101-
# shellcheck disable=SC2016 # $3 is to be used by awk and not bash
102-
awk_search='/pkgname/ { print \$3 }'
103-
104-
# shellcheck disable=SC2029
105-
ssh "${SEARCH_HOST}" "parallel \"${parallel_common_command[*]} && bsdtar xfO {.} .BUILDINFO | awk '${awk_search}'\" ::: /srv/ftp/pool/packages/*.pkg.tar.*.sig"
106-
;;
107-
esac
95+
REPOSITORIES=(
96+
core
97+
core-testing
98+
core-staging
99+
extra
100+
extra-testing
101+
extra-staging
102+
multilib
103+
multilib-testing
104+
multilib-staging
105+
gnome-unstable
106+
kde-unstable
107+
)
108+
ARCHITECTURES=(
109+
x86_64
110+
)
111+
112+
for arch in "${ARCHITECTURES[@]}"; do
113+
for repo in "${REPOSITORIES[@]}"; do
114+
case $OUTPUT_FORMAT in
115+
filename)
116+
# shellcheck disable=SC2029
117+
ssh "${SEARCH_HOST}" "parallel \"${parallel_common_command[*]} && echo {/.}\" ::: /srv/ftp/${repo}/os/${arch}/*.pkg.tar.*.sig"
118+
;;
119+
packagename)
120+
# shellcheck disable=SC2016 # $3 is to be used by awk and not bash
121+
awk_search='/pkgname/ { print \$3 }'
122+
123+
# shellcheck disable=SC2029
124+
ssh "${SEARCH_HOST}" "parallel \"${parallel_common_command[*]} && bsdtar xfO {.} .BUILDINFO | awk '${awk_search}'\" ::: /srv/ftp/${repo}/os/${arch}/*.pkg.tar.*.sig"
125+
;;
126+
esac
127+
done
128+
done
129+

0 commit comments

Comments
 (0)