From 2b338a4a748704a875038ac68b65315394721a65 Mon Sep 17 00:00:00 2001 From: "Andreas K. Hüttel" Date: Sat, 5 Aug 2023 13:01:33 +0200 Subject: more details MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas K. Hüttel --- sign-binpackages.sh | 24 ++++++++++++++++++++---- sync-binpackages.sh | 2 +- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/sign-binpackages.sh b/sign-binpackages.sh index 4ae9dc0..2fe0ff9 100755 --- a/sign-binpackages.sh +++ b/sign-binpackages.sh @@ -2,14 +2,17 @@ # Copyright 2010-2023 Gentoo Authors; Distributed under the GPL v2 # might be earlier copyright, no history available -# Keep this variable in sync in both sign-autobuilds.sh & sync-autobuilds.sh +# for testing +ARCHES="aarch64 sparc" + +# Keep this variable in sync _ARCHES="alpha amd64 arm64 arm hppa ia64 loong m68k mips ppc riscv s390 sh sparc x86" #alpha amd64 arm64 arm hppa ia64 loong m68k mips ppc riscv s390 sh sparc x86 ARCHES=${ARCHES:-${_ARCHES}} -INTREE=blablabla -SIGTREE=blablabla +INTREE=/release/weekly/binpackages +SIGTREE=/release/binpackages DEBUG='' VERBOSE='' @@ -19,12 +22,25 @@ BINPKG_GPG_SIGNING_KEY=blablabla gpgconf --kill all +# step 0: ensure all directories exist and have the right +# permissions + +for a in $ARCHES ; do + if ! [[ -d ${INTREE}/${a} ]]; then + mkdir -p ${INTREE}/${a} + chown ${a}:${a} ${INTREE}/${a} + chmod u+rwx,o+rx ${INTREE}/${a} + fi +done + +[[ -d SIGTREE ]] || mkdir -p ${SIGTREE} + # step 1: rsync from the dirs where the arches copy in # make sure to *not* overwrite existing newer files (obviously # the signature changed them)... for a in $ARCHES ; do - rsync --recursive --delete --delete-after --update ${INTREE}/${a}/* ${SIGTREE}/${a}/ + rsync --recursive --delete --delete-after --update ${INTREE}/${a}/ ${SIGTREE}/${a}/ done # step 2: iterate over all binary package trees, sign diff --git a/sync-binpackages.sh b/sync-binpackages.sh index bae48af..da94c33 100755 --- a/sync-binpackages.sh +++ b/sync-binpackages.sh @@ -4,7 +4,7 @@ # this is the directory where the tree is fully assembled and all packages are signed # we assume it's on dipper / releng-incoming, but might as well give a full rsync # specification here -INITIALDIR="blabla" +INITIALDIR="/release/binpackages" FINALDIR="/var/tmp/gmirror-releases/binpackages" RSYNC="/usr/bin/rsync" -- cgit v1.2.3-65-gdbad