Change in osmo-ci[master]: repo-install-test: download/add deb release key

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Wed Jan 20 15:33:14 UTC 2021


osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/22332 )

Change subject: repo-install-test: download/add deb release key
......................................................................

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
---
M scripts/repo-install-test/run-inside-docker.sh
1 file changed, 11 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved; Verified



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 @@
 }
 
 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
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/22332
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I91e7a208d8f5cb50f8baa2fde0eb979aae91da8f
Gerrit-Change-Number: 22332
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210120/c790e15a/attachment.htm>


More information about the gerrit-log mailing list