aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-01-15 15:15:53 +0100
committerOliver Smith <osmith@sysmocom.de>2021-01-20 14:22:48 +0100
commit4d7c21a8ac460bedaa424d286f9c10b923edbb4f (patch)
treedb47fdcfbb92fc4bb0370b011cd5ea224671b663
parent07ea04f8f78e9339a4e97a274261e57219cbf618 (diff)
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
-rwxr-xr-xscripts/repo-install-test/run-inside-docker.sh13
1 files changed, 11 insertions, 2 deletions
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
}