amprolla

devuan's apt repo merger
git clone git://parazyd.org/amprolla.git
Log | Files | Refs | README | LICENSE

commit 0b83b1bd2a2b3a48af5e4fd93eb6f697500ef240
parent 3e8dae84947870efda45b72c7cbae6dbebf1bf14
Author: parazyd <parazyd@dyne.org>
Date:   Wed, 28 Jun 2017 19:20:00 +0200

implement orchestration of incremental updates with a shell script

Diffstat:
Mlib/config.def.py | 4++--
Aorchestrate.sh | 18++++++++++++++++++
2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/lib/config.def.py b/lib/config.def.py @@ -10,7 +10,7 @@ cpunm = 4 # number of cpus you want to use for multiprocessing logdir = './log' spooldir = './spool' signingkey = 'CA608125' -mergedir = './merged' +mergedir = './merged-volatile' mergesubdir = 'dists' banpkgs = {'systemd', 'systemd-sysv'} checksums = [ @@ -40,7 +40,7 @@ repos = { }, 'debian': { 'name': 'DEBIAN', - 'host': 'http://deb.debian.org', + 'host': 'http://ftp.debian.org', 'dists': 'debian/dists', 'pool': 'debian/pool', 'aliases': True, diff --git a/orchestrate.sh b/orchestrate.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# orchestration of incremental updates + +# make sure these correlate to lib/config.py +AMPROLLA_UPDATE=/srv/amprolla/amprolla_update.py +REPO_ROOT=/srv/amprolla + +# TODO: remove the while loop and run with cron after testing phase + +while true; do + ln -snf "$REPO_ROOT"/merged-staging "$REPO_ROOT"/merged + # the break call is temporary to catch unhandled exceptions in the testing phase + python3 "$AMPROLLA_UPDATE" || break + rsync --delete -raX "$REPO_ROOT"/merged-volatile/* "$REPO_ROOT"/merged-production + ln -snf "$REPO_ROOT"/merged-production "$REPO_ROOT"/merged + rsync --delete -raX "$REPO_ROOT"/merged-volatile/* "$REPO_ROOT"/merged-staging + sleep 3600 +done