From 3bc092d56607af8279b05552233e28532a985e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= Date: Sat, 5 Aug 2023 21:06:23 +0200 Subject: [PATCH] catalyst-auto: add function upsync_binpackages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas K. Hüttel --- tools/catalyst-auto | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tools/catalyst-auto b/tools/catalyst-auto index 2dab0185..e83938fc 100755 --- a/tools/catalyst-auto +++ b/tools/catalyst-auto @@ -296,6 +296,35 @@ upload() { fi } +upsync_binpackages() { + # parameter 1: a PKGDIR on the local host + # parameter 2: the target dir in the mirroring system, should be of the + # form arch/profileversion/name (e.g., amd64/17.0/x32 ) + if [[ ${nonetwork} == 0 ]]; then + echo Upsyncing binpackages from $1 to $2 + local SSH_CMD=( + ssh + -i ${UPLOAD_KEY} + -o UserKnownHostsFile=/dev/null + -o VerifyHostKeyDNS=yes + -o StrictHostKeyChecking=no + -o IPQoS=cs0 + ) + local RSYNC_OPTS=( + -e "${SSH_CMD[*]}" + --archive + --delete + --delete-after + --omit-dir-times + --delay-updates + ) + rsync "${RSYNC_OPTS[@]}" "$1" "${UPLOAD_USER}@releng-incoming.gentoo.org:/release/weekly/binpackages/$2" + else + echo Would now upsync binpackages from $1 to $2 + ls -l $@ + fi +} + run_catalyst_commands() { doneconfig=0 for config_file in "${config_files[@]}"; do