[Git][qa/jenkins.debian.net][master] r.d.n: add first stab at a pkgsync script

Holger Levsen (@holger) gitlab at salsa.debian.org
Sat Apr 5 20:51:52 BST 2025



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
0ff58a7b by Holger Levsen at 2025-04-05T21:51:39+02:00
r.d.n: add first stab at a pkgsync script

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- + bin/rebuilderd_pkgsync.sh


Changes:

=====================================
bin/rebuilderd_pkgsync.sh
=====================================
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Copyright 2025 Holger Levsen (holger at layer-acht.org)
+# released under the GPLv2
+
+set -e
+
+JQQUERY='.[] | select(.architecture != "all")'
+#
+# choose correct port
+#
+case $1 in
+	all)		PORT=8489
+			JQQUERY='.[] | select(.architecture = "all")'
+			;;
+	amd64)		PORT=8484
+			;;
+	arm64)		PORT=8486
+			;;
+	armhf)		PORT=8487
+			;;
+	i386)		PORT=8485
+			;;
+	riscv64)	PORT=8488
+			;;
+	*)		echo "need a valid architecture."
+			exit 1
+			;;
+esac
+
+ARCH=$1
+shift
+
+# REBUILDERD_COOKIE_PATH could be set by aservice
+REBUILDERD_COOKIE_PATH=/srv/rebuilderd/$ARCH/.auth-cookie
+while true ; do
+	/opt/usr/bin/rebuildctl -H http://127.0.0.1:$PORT pkgs sync-profile --sync-config /opt/etc/rebuilderd-sync-${ARCH}.conf debian-main --print-json | jq "$JQQUERY" | jq -s | /opt/usr/bin/rebuildctl -H http://127.0.0.1:$PORT pkgs sync-stdin debian main
+	ST=$(shuf -i 150-210 -n 1)
+	echo sleeping ${ST}m now
+	sleep ${ST}m
+done
+
+



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/0ff58a7b8d1dff7cc747f7bff1aa2e4463b9e3bc

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/0ff58a7b8d1dff7cc747f7bff1aa2e4463b9e3bc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20250405/ea49584f/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list