summaryrefslogtreecommitdiffstats
path: root/mockit
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-04-26 09:50:06 +0200
committerRemi Collet <remi@php.net>2024-04-26 09:50:06 +0200
commit3ac5d92c33ab04755855b35d11338221a51e7efc (patch)
tree24ffc13b946089ddc600d5ed44e0d4f3403e91a9 /mockit
parenteb7e370cb03a68bfb9cc229088dc5b8c78a47040 (diff)
allow to send aarch64 build from x86_64 builder
Diffstat (limited to 'mockit')
-rwxr-xr-xmockit27
1 files changed, 24 insertions, 3 deletions
diff --git a/mockit b/mockit
index 0989305..3b8c9a0 100755
--- a/mockit
+++ b/mockit
@@ -3,6 +3,7 @@
if [ "$2" = "" ]; then
echo -e "\nusage: $0 [ options ] SRPM distro [ min_ver [, max_ver [, mock_options ]]]\n"
echo -e "\t--redis store build command in redis queue"
+ echo -e "\t--list list queue content"
echo -e "\t--nobase | --scl only build SCL packages"
echo -e "\t--noscl | --base only build base packages\n"
exit 0
@@ -12,6 +13,7 @@ fi
BUILD_BASE=1
BUILD_SCLS=1
REDIS=0
+REMOTE=0
# ARCH detection and check
if [ "$(uname -m)" = "x86_64" ]; then
@@ -31,6 +33,14 @@ if [ "$1" == "--redis" ]; then
shift
fi
+if [ "$1" == "--list" ]; then
+ echo "-- x86_64 queue --"
+ $REDISCLI smembers mockx
+ echo "-- aarch64 queue --"
+ $REDISCLI smembers mocka
+ exit 0
+fi
+
if [ "$1" == "--nobase" -o "$1" == "--scl" ]; then
BUILD_BASE=0
shift
@@ -66,8 +76,12 @@ case $DIST in
;;
*a)
if [ $SUF != a ]; then
- echo "Not an aarch64 builder"
- exit 1
+ if [ $REDIS -ge 1 ]; then
+ REMOTE=1
+ else
+ echo "Not an aarch64 builder"
+ exit 1
+ fi
fi
;;
*)
@@ -77,7 +91,6 @@ esac
# SRPM abolute path
case $DIST in
-
*x)
mocketc=/home/rpmbuild/SPECS/remirepo/tools/mock
srpmdir=/home/rpmbuild/site/rpms/SRPMS
@@ -97,6 +110,14 @@ elif [ ! -f $SRPM ]; then
exit 1
fi
+# Send to remote aarch64 builder
+if [ $REMOTE -ge 1 ]; then
+ scp $SRPM remi@ampere:todo/
+ mocketc=/home/remi/mock
+ QUEUE=mocka
+ SRPM=/home/remi/todo/$(basename $SRPM)
+fi
+
# PHP version matrix
echo mockit $SRPM $DIST $MIN $MAX $@
case $DIST in