From 4f766e602844780390d87f7e643adc5ef259120c Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 18 Aug 2022 13:14:23 +0200 Subject: [PATCH] repo-install-test: adjust for obs.osmocom.org Related: OS#5557 Change-Id: Ib53df6c40ae92634e6d93389dcb8a21c48dfb63d --- scripts/repo-install-test.sh | 12 ++++---- .../repo-install-test/run-inside-docker.sh | 30 +++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh index d34cf6e3..2a3e7391 100755 --- a/scripts/repo-install-test.sh +++ b/scripts/repo-install-test.sh @@ -2,8 +2,8 @@ # Environment variables: # * INTERACTIVE: set to 1 to keep an interactive shell open after the script ran (for debugging) # * FEED: binary package feed (e.g. "latest", "nightly") -# * PROJ: OBS project namespace (e.g. "network:osmocom:latest") -# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "network:osmocom:nightly") +# * PROJ: OBS project namespace (e.g. "osmocom:latest") +# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly") # * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development) # * TESTS: which tests to run (all by default, see below for possible values) . "$(dirname "$0")/common.sh" @@ -31,7 +31,7 @@ check_usage docker_images_require "$DISTRO-repo-install-test" FEED="${FEED:-nightly}" -PROJ="${PROJ:-network:osmocom:$FEED}" +PROJ="${PROJ:-osmocom:$FEED}" CONTAINER="$DISTRO-repo-install-test-$FEED" if [ -z "$TESTS" ]; then @@ -46,13 +46,13 @@ fi if [ -z "$PROJ_CONFLICT" ]; then case "$FEED" in latest) - PROJ_CONFLICT="network:osmocom:nightly" + PROJ_CONFLICT="osmocom:nightly" ;; nightly) - PROJ_CONFLICT="network:osmocom:latest" + PROJ_CONFLICT="osmocom:latest" ;; next) - PROJ_CONFLICT="network:osmocom:nightly" + PROJ_CONFLICT="osmocom:nightly" ;; esac fi diff --git a/scripts/repo-install-test/run-inside-docker.sh b/scripts/repo-install-test/run-inside-docker.sh index fec344e9..f95bae02 100755 --- a/scripts/repo-install-test/run-inside-docker.sh +++ b/scripts/repo-install-test/run-inside-docker.sh @@ -1,8 +1,8 @@ #!/bin/sh -ex # Environment variables: # * FEED: binary package feed (e.g. "latest", "nightly") -# * PROJ: OBS project namespace (e.g. "network:osmocom:latest") -# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "network:osmocom:nightly") +# * PROJ: OBS project namespace (e.g. "osmocom:latest") +# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly") # * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development) # * DISTRO: linux distribution name (e.g. "centos8") # * TESTS: which tests to run (see repo-install-test.sh) @@ -54,12 +54,12 @@ distro_obsdir() { DISTRO_OBSDIR="$(distro_obsdir)" -# $1: OBS project (e.g. "network:osmocom:nightly" -> "network:/osmocom:/nightly") +# $1: OBS project (e.g. "osmocom:nightly" -> "osmocom:/nightly") proj_with_slashes() { echo "$1" | sed "s.:.:/.g" } -# $1: OBS project (e.g. "network:osmocom:nightly" -> "network_osmocom_nightly") +# $1: OBS project (e.g. "osmocom:nightly" -> "osmocom_nightly") proj_with_underscore() { echo "$1" | tr : _ } @@ -96,10 +96,10 @@ check_env() { fi } -# $1: OBS project (e.g. "network:osmocom:nightly") +# $1: OBS project (e.g. "osmocom:nightly") configure_osmocom_repo_debian() { local proj="$1" - local obs_repo="download.opensuse.org/repositories/$(proj_with_slashes "$proj")/$DISTRO_OBSDIR/" + local obs_repo="downloads.osmocom.org/packages/$(proj_with_slashes "$proj")/$DISTRO_OBSDIR/" echo "Configuring Osmocom repository" @@ -107,7 +107,7 @@ configure_osmocom_repo_debian() { if ! [ -e "$release_key" ]; then apt-get update apt install -y wget - wget -O /tmp/Release.key "https://build.opensuse.org/projects/network:osmocom/public_key" + wget -O /tmp/Release.key "https://obs.osmocom.org/projects/$proj/public_key" fi apt-key add /tmp/Release.key @@ -115,20 +115,20 @@ configure_osmocom_repo_debian() { apt-get update } -# $1: OBS project (e.g. "network:osmocom:nightly") +# $1: OBS project (e.g. "osmocom:nightly") configure_osmocom_repo_debian_remove() { local proj="$1" rm "/etc/apt/sources.list.d/$proj.list" } -# $1: OBS project (e.g. "network:osmocom:nightly") +# $1: OBS project (e.g. "osmocom:nightly") configure_osmocom_repo_centos() { local proj="$1" - local baseurl="https://download.opensuse.org/repositories/$(proj_with_slashes "$proj")/$DISTRO_OBSDIR" + local baseurl="https://downloads.osmocom.org/packages/$(proj_with_slashes "$proj")/$DISTRO_OBSDIR" echo "Configuring Osmocom repository" # Generate this file, based on the feed: - # https://download.opensuse.org/repositories/network:osmocom:latest/CentOS_8/network:osmocom:latest.repo + # https://downloads.osmocom.org/packages/osmocom:/latest/CentOS_8/osmocom:latest.repo cat << EOF > "/etc/yum.repos.d/$proj.repo" [$(proj_with_underscore "$proj")] name=$proj @@ -140,13 +140,13 @@ enabled=1 EOF } -# $1: OBS project (e.g. "network:osmocom:nightly") +# $1: OBS project (e.g. "osmocom:nightly") configure_osmocom_repo_centos_remove() { local proj="$1" rm "/etc/yum.repos.d/$proj.repo" } -# $1: OBS project (e.g. "network:osmocom:nightly") +# $1: OBS project (e.g. "osmocom:nightly") configure_osmocom_repo() { case "$DISTRO" in debian*) @@ -285,14 +285,12 @@ filter_packages_txt() { } install_repo_packages_debian() { - local obs="obs://build.opensuse.org/$PROJ/$DISTRO_OBSDIR" - echo "Installing all repository packages" # Get a list of all packages from the repository. Reference: # https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html aptitude search -F%p \ - "?origin($obs) ?architecture(native)" | sort \ + "?origin(.*$PROJ.*) ?architecture(native)" | sort \ > osmocom_packages_all.txt filter_packages_txt