From 91d0753de7c2abfced99f3e47500d34dc227108a Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Wed, 8 Nov 2023 09:33:53 +1100 Subject: [PATCH] add in allowed scms as parameter --- install-koji-farm.sh | 8 ++++++-- koji-setup/koji-deploy-builder.sh | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/install-koji-farm.sh b/install-koji-farm.sh index 9194730..2fcaad4 100644 --- a/install-koji-farm.sh +++ b/install-koji-farm.sh @@ -4,16 +4,21 @@ set -e DEBUG= KOJI_HUB_FQDN="$(hostname -f)" KOJI_WEB_FQDN=$KOJI_HUB_FQDN +KOJI_ALLOWED_SCMS="src.koozali.org:/*" KOJI_BUILD_FQDNS= for param in "$@"; do if [ $param ] ; then case $param in + -h | --help ) + echo "install-koji-farm.sh [web= | build= | scm= | debug]" ;; debug ) DEBUG="debug" ;; web=* ) KOJI_WEB_FQDN=${param#*=} ;; build=* ) - KOJI_BUILD_FQDNS=$KOJI_BUILD_FQDNS" "${param#*=} ;; + KOJI_BUILD_FQDNS=$KOJI_BUILD_FQDNS" "${param#*=} ;; + scm=* ) + KOJI_ALLOWED_SCMS=$KOJI_ALLOWED_SCMS" "${param#*=} ;; esac else break @@ -108,7 +113,6 @@ KOJI_DIR="/mnt/koji" KOJI_PKI_DIR=/etc/pki/koji RPM_ARCH="x86_64" KOJID_CAPACITY=16 -KOJI_ALLOWED_SCMS="src.koozali.org:/*" SRC_RPM_DIR= BIN_RPM_DIR= DEBUG_RPM_DIR= diff --git a/koji-setup/koji-deploy-builder.sh b/koji-setup/koji-deploy-builder.sh index eb80b71..44e5cee 100755 --- a/koji-setup/koji-deploy-builder.sh +++ b/koji-setup/koji-deploy-builder.sh @@ -65,7 +65,7 @@ user=$KOJI_BUILD_FQDN server=$KOJI_URL/kojihub topurl=$KOJI_URL/kojifiles use_createrepo_c=True -allowed_scms=$KOJI_ALLOWED_SCMS +allowed_scms=:/packages/* $KOJI_ALLOWED_SCMS cert = $KOJI_PKI_DIR/$KOJI_BUILD_FQDN.pem serverca = $KOJI_PKI_DIR/koji_ca_cert.crt mock_bootstrap_image=False