From 4d7c21a8ac460bedaa424d286f9c10b923edbb4f Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 15 Jan 2021 15:15:53 +0100 Subject: repo-install-test: download/add deb release key Download and add the release key for the debian repository from OBS. This is useful for manually testing the existing tests with a different PROJ for debugging, and it will be used by a future conflict test to install a second repository (e.g. nightly and latest at the same time). Note that this is not needed for rpm, because the dnf package manager automatically downloads the key if it is missing. Related: OS#4733 Change-Id: I91e7a208d8f5cb50f8baa2fde0eb979aae91da8f --- scripts/repo-install-test/run-inside-docker.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/repo-install-test/run-inside-docker.sh b/scripts/repo-install-test/run-inside-docker.sh index 3dd3101..652fcd1 100755 --- a/scripts/repo-install-test/run-inside-docker.sh +++ b/scripts/repo-install-test/run-inside-docker.sh @@ -67,10 +67,19 @@ check_env() { } configure_osmocom_repo_debian() { - local http="http://download.opensuse.org/repositories/$(proj_with_slashes "$PROJ")/Debian_9.0/" + local obs_repo="download.opensuse.org/repositories/$(proj_with_slashes "$PROJ")/Debian_9.0/" + local release_key="/var/cache/apt/${PROJ}_Release.key" echo "Configuring Osmocom repository" - echo "deb $http ./" > "/etc/apt/sources.list.d/$PROJ.list" + echo "deb http://$obs_repo ./" > "/etc/apt/sources.list.d/$PROJ.list" + + # Add repository key + if ! [ -e "$release_key" ]; then + apt install -y wget + wget -O "$release_key" "https://$obs_repo/Release.key" + fi + apt-key add "$release_key" + apt-get update } -- cgit v1.2.3