From b778133e89aba5f472ddc9fce2d3492521f47dc1 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Thu, 10 Sep 2020 00:35:13 +0200 Subject: [PATCH] container: support installing via RPMs If the share dir contains rpms in /share/rpms, install those, instead of using the plugin from the container. --- container/builder/run-kojid.sh | 7 +++++++ container/hub/run-hub.sh | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/container/builder/run-kojid.sh b/container/builder/run-kojid.sh index 5901940..a2acf05 100755 --- a/container/builder/run-kojid.sh +++ b/container/builder/run-kojid.sh @@ -1,6 +1,13 @@ #!/bin/bash set -ux +if ls /share/rpms/*.rpm 1> /dev/null 2>&1; then + echo "Using RPMs" + rm /usr/lib/koji-builder-plugins/osbuild.py + rpm -i /share/rpms/koji-osbuild-?-0.*.rpm \ + /share/rpms/koji-osbuild-builder-*.rpm +fi + KOJI="koji --server=http://org.osbuild.koji.koji/kojihub --user=kojiadmin --password=kojipass --authtype=password" $KOJI add-host org.osbuild.koji.kojid i386 x86_64 diff --git a/container/hub/run-hub.sh b/container/hub/run-hub.sh index fcc97a7..b884167 100755 --- a/container/hub/run-hub.sh +++ b/container/hub/run-hub.sh @@ -1,6 +1,13 @@ #!/bin/bash set -eux +if ls /share/rpms/*.rpm 1> /dev/null 2>&1; then + echo "Using RPMs" + rm /usr/lib/koji-hub-plugins/osbuild.py + rpm -i /share/rpms/koji-osbuild-?-0.*.rpm \ + /share/rpms/koji-osbuild-hub-*.rpm +fi + # Set DB credentials sed -i -e "s/.*DBHost =.*/DBHost = ${POSTGRES_HOST}/" \ -e "s/.*DBUser =.*/DBUser = ${POSTGRES_USER}/" \