summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2023-08-05 13:01:33 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2023-08-05 13:01:33 +0200
commit2b338a4a748704a875038ac68b65315394721a65 (patch)
treed8f7e2d6b716ba38737cd33d10a86f246e07d976
parentadd sign-binpackages.sh (diff)
downloadmastermirror-scripts-2b338a4a748704a875038ac68b65315394721a65.tar.gz
mastermirror-scripts-2b338a4a748704a875038ac68b65315394721a65.tar.bz2
mastermirror-scripts-2b338a4a748704a875038ac68b65315394721a65.zip
more details
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rwxr-xr-xsign-binpackages.sh24
-rwxr-xr-xsync-binpackages.sh2
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"