aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-08-18 13:14:23 +0200
committerosmith <osmith@sysmocom.de>2022-08-19 14:09:52 +0000
commit4f766e602844780390d87f7e643adc5ef259120c (patch)
tree04da2608f63277c83d2422ea75503778f82b1ed2
parent4cb6289b516ab9f7d57e1d259686a63384859739 (diff)
repo-install-test: adjust for obs.osmocom.org
-rwxr-xr-xscripts/repo-install-test.sh12
-rwxr-xr-xscripts/repo-install-test/run-inside-docker.sh30
2 files changed, 20 insertions, 22 deletions
diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index d34cf6e..2a3e739 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 fec344e..f95bae0 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