make: add OSMOCOM_REPO_PATH

Allow to change the path between OSMOCOM_REPO_MIRROR and
OSMOCOM_REPO_VERSION. While at it, tweak related comments (comment above
the variable as usually, replace "repo" wording with "feed" for the
latest/nightly variable as we usually refer to it as feed), and mention
OSMOCOM_REPO_* in README.md.

In order to be able to use a different mirror for testsuite and systems
under test, the testsuite related Dockerfiles (osmocom-bb-host-master,
debian-stretch-titan) are not using OSMOCOM_REPO_PATH. We could add a
OSMOCOM_REPO_TESTSUITE_PATH on demand, as mentioned in the next commit.

Related: SYS#5370
Change-Id: I8010a4d49d4620a5c47c2ff4f909a9aeeaad7b73
changes/14/24114/1
Oliver Smith 2 years ago
parent 84255c7bb8
commit 910dacf686
  1. 4
      README.md
  2. 7
      centos8-build/Dockerfile
  3. 7
      centos8-obs-latest/Dockerfile
  4. 3
      debian-buster-erlang/Dockerfile
  5. 3
      debian-buster-jenkins/Dockerfile
  6. 3
      debian-buster-simtrace2/Dockerfile
  7. 3
      debian-jessie-osmocom/Dockerfile
  8. 3
      debian-stretch-build/Dockerfile
  9. 3
      debian-stretch-jenkins/Dockerfile
  10. 3
      debian-stretch-obs-latest/Dockerfile
  11. 11
      make/Makefile
  12. 5
      osmo-ran/Dockerfile
  13. 5
      osmo-ran/split/ran-bsc_mgw/Dockerfile
  14. 5
      osmo-ran/split/ran-bts_pcu/Dockerfile
  15. 5
      osmo-ran/split/ran-trx-ipc/Dockerfile
  16. 5
      osmo-ran/split/ran-trx-uhd/Dockerfile

@ -45,6 +45,10 @@ Environment variables:
* `KERNEL_URL`: git remote url (default: net-next.git on kernel.org)
* `KERNEL_BRANCH` branch to checkout (default: master)
The OBS repository mirror consists of
`${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/${OSMOCOM_REPO_VERSION}`,
e.g. `https://download.opensuse.org/repositories/network:/osmocom:/latest/`.
### Creating kernel config fragments
For the kernel tests, we are storing kernel config fragments in the git
repository instead of full kernel configs. Generate them as follows:

@ -3,6 +3,7 @@ ARG UPSTREAM_DISTRO=centos:centos8
FROM ${REGISTRY}/${UPSTREAM_DISTRO}
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
# Let package metadata expire after 60 seconds instead of 48 hours
RUN echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf
@ -14,9 +15,9 @@ RUN dnf install -y dnf-utils wget && \
{ echo "[network_osmocom_nightly]"; \
echo "name=Nightly packages of the Osmocom project (CentOS_8)"; \
echo "type=rpm-md"; \
echo "baseurl=${OSMOCOM_REPO_MIRROR}/repositories/network:/osmocom:/nightly/CentOS_8/"; \
echo "baseurl=${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly/CentOS_8/"; \
echo "gpgcheck=1"; \
echo "gpgkey=${MIRROR_HTTPS}/repositories/network:/osmocom:/nightly/CentOS_8/repodata/repomd.xml.key"; \
echo "gpgkey=${MIRROR_HTTPS}/${OSMOCOM_REPO_PATH}/nightly/CentOS_8/repodata/repomd.xml.key"; \
echo "enabled=1"; \
} > /etc/yum.repos.d/network:osmocom:nightly.repo
@ -61,4 +62,4 @@ RUN dnf install -y \
COPY .common/respawn.sh /usr/local/bin/respawn.sh
# Invalidate cache once the repository is updated
ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8/repodata/repomd.xml /tmp/repomd.xml
ADD ${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly/CentOS_8/repodata/repomd.xml /tmp/repomd.xml

@ -3,6 +3,7 @@ ARG UPSTREAM_DISTRO=centos:centos8
FROM ${REGISTRY}/${UPSTREAM_DISTRO}
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
# Let package metadata expire after 60 seconds instead of 48 hours
RUN echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf
@ -15,9 +16,9 @@ RUN dnf install -y dnf-utils wget && \
{ echo "[network_osmocom_latest]"; \
echo "name=Latest tagged versions of osmocom cellular network elements (CentOS_8)"; \
echo "type=rpm-md"; \
echo "baseurl=${OSMOCOM_REPO_MIRROR}/repositories/network:/osmocom:/latest/CentOS_8/"; \
echo "baseurl=${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/latest/CentOS_8/"; \
echo "gpgcheck=1"; \
echo "gpgkey=${MIRROR_HTTPS}/repositories/network:/osmocom:/latest/CentOS_8/repodata/repomd.xml.key"; \
echo "gpgkey=${MIRROR_HTTPS}/${OSMOCOM_REPO_PATH}/latest/CentOS_8/repodata/repomd.xml.key"; \
echo "enabled=1"; \
} > /etc/yum.repos.d/network:osmocom:latest.repo
@ -28,4 +29,4 @@ RUN dnf install -y \
COPY .common/respawn.sh /usr/local/bin/respawn.sh
# Invalidate cache once the repository is updated
ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/CentOS_8/repodata/repomd.xml /tmp/repomd.xml
ADD ${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/latest/CentOS_8/repodata/repomd.xml /tmp/repomd.xml

@ -2,10 +2,11 @@ ARG REGISTRY=docker.io
FROM ${REGISTRY}/debian:buster
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
MAINTAINER Harald Welte <laforge@gnumonks.org>
ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_10/"
ARG OSMOCOM_REPO="${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/latest/Debian_10/"
# install the erlang vm and rebar (2)
RUN apt-get update && \

@ -6,6 +6,7 @@ ARG REGISTRY=docker.io
FROM ${REGISTRY}/debian:${DEBIAN_VERSION}
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
# Make "$DEBIAN_VERSION" available after FROM
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
@ -169,7 +170,7 @@ ENV LANG en_US.UTF-8
# Install packages from Osmocom OBS repositories:
# * osmo-remsim: libulfius
# * osmo-trx: liblimesuite-dev, libuhd-dev
ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_10/"
ARG OSMOCOM_REPO="${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly/Debian_10/"
COPY .common/Release.key /tmp/Release.key
RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \

@ -2,10 +2,11 @@ ARG USER
FROM $USER/debian-buster-build
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
MAINTAINER Harald Welte <laforge@gnumonks.org>
ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_10/"
ARG OSMOCOM_REPO="${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly/Debian_10/"
COPY .common/Release.key /tmp/Release.key

@ -2,10 +2,11 @@ ARG REGISTRY=docker.io
FROM ${REGISTRY}/debian:jessie
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
MAINTAINER Harald Welte <laforge@gnumonks.org>
ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_8.0/"
ARG OSMOCOM_REPO="${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly/Debian_8.0/"
COPY .common/Release.key /tmp/Release.key

@ -3,7 +3,8 @@ ARG UPSTREAM_DISTRO=debian:stretch
FROM ${REGISTRY}/${UPSTREAM_DISTRO}
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/${OSMOCOM_REPO_PATH}/nightly/Debian_9.0/"
RUN apt-get update && \
apt-get upgrade -y && \

@ -6,6 +6,7 @@ ARG REGISTRY=docker.io
FROM ${REGISTRY}/debian:${DEBIAN_VERSION}
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
# Make "$DEBIAN_VERSION" available after FROM
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
@ -169,7 +170,7 @@ ENV LANG en_US.UTF-8
# Install packages from Osmocom OBS repositories:
# * osmo-remsim: libulfius
# * osmo-trx: liblimesuite-dev, libuhd-dev
ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/"
ARG OSMOCOM_REPO="${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly/Debian_9.0/"
COPY .common/Release.key /tmp/Release.key
RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \

@ -3,7 +3,8 @@ ARG UPSTREAM_DISTRO=debian:stretch
FROM ${REGISTRY}/${UPSTREAM_DISTRO}
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
ARG OSMOCOM_REPO="${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/latest/Debian_9.0/"
RUN apt-get update && \
apt-get upgrade -y && \

@ -37,10 +37,16 @@ OSMO_STP_BRANCH?=master
PULL?=
UPSTREAM_DISTRO?=debian:stretch
DISTRO?=debian-stretch
OSMOCOM_REPO_MIRROR?=http://download.opensuse.org
# Full OBS repository mirror consists of:
# ${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/${OSMOCOM_REPO_VERSION}
# e.g. "https://download.opensuse.org/repositories/network:/osmocom:/latest/"
#
# Use if down: OSMOCOM_REPO_MIRROR=http://ftp.uni-stuttgart.de/opensuse
OSMOCOM_REPO_MIRROR?=http://download.opensuse.org
OSMOCOM_REPO_PATH?=repositories/network:/osmocom:
# Use "nightly" to use the nightly feed
OSMOCOM_REPO_VERSION?=latest
# Use "nightly" to use the nightly repo
ROOT_DIR=$(shell git rev-parse --show-toplevel)
RELEASE_SUPPORT := $(ROOT_DIR)/make/.make-release-support
@ -76,6 +82,7 @@ docker-build: .release
--build-arg UPSTREAM_DISTRO=$(UPSTREAM_DISTRO) \
--build-arg DISTRO=$(DISTRO) \
--build-arg OSMOCOM_REPO_MIRROR=$(OSMOCOM_REPO_MIRROR) \
--build-arg OSMOCOM_REPO_PATH=$(OSMOCOM_REPO_PATH) \
--build-arg OSMOCOM_REPO_VERSION=$(OSMOCOM_REPO_VERSION) \
--build-arg LIBOSMOCORE_BRANCH=$(LIBOSMOCORE_BRANCH) \
--build-arg OSMO_BB_BRANCH=$(OSMO_BB_BRANCH) \

@ -3,12 +3,13 @@ FROM $USER/systemd
# Arguments used after FROM must be specified again
ARG DISTRO
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
ARG OSMOCOM_REPO_VERSION=latest
MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8/"
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/CentOS_8/"
COPY .common/Release.key /tmp/Release.key

@ -3,12 +3,13 @@ FROM $USER/systemd
# Arguments used after FROM must be specified again
ARG DISTRO
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
ARG OSMOCOM_REPO_VERSION=latest
MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8/"
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/CentOS_8/"
COPY .common/Release.key /tmp/Release.key

@ -3,12 +3,13 @@ FROM $USER/systemd
# Arguments used after FROM must be specified again
ARG DISTRO
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
ARG OSMOCOM_REPO_VERSION=latest
MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8/"
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/CentOS_8/"
COPY .common/Release.key /tmp/Release.key

@ -3,12 +3,13 @@ FROM $USER/systemd
# Arguments used after FROM must be specified again
ARG DISTRO
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
ARG OSMOCOM_REPO_VERSION=latest
MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8/"
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/CentOS_8/"
COPY .common/Release.key /tmp/Release.key

@ -3,12 +3,13 @@ FROM $USER/systemd
# Arguments used after FROM must be specified again
ARG DISTRO
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG OSMOCOM_REPO_PATH="repositories/network:/osmocom:"
ARG OSMOCOM_REPO_VERSION=latest
MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8/"
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/$OSMOCOM_REPO_PATH/$OSMOCOM_REPO_VERSION/CentOS_8/"
COPY .common/Release.key /tmp/Release.key

Loading…
Cancel
Save