centos8: don't download .repo file

Generate the .repo file on the fly instead of downloading it from the
OBS repository. Ensure the gpgkey gets downloaded via HTTPS. I'm about
to use centos8-obs-latest with an alternative repository, which does not
have the .repo file. Adjust other containers for consistency.

Related: SYS#5370
Related: https://download.opensuse.org/repositories/network:/osmocom:/latest/CentOS_8/network:osmocom:latest.repo
Related: https://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8/network:osmocom:nightly.repo
Change-Id: Ic9ffa79cfe5a74bdc59d5ddd505a9af7be574bf9
This commit is contained in:
Oliver Smith 2021-04-30 15:02:04 +02:00
parent ce8da526b0
commit 84255c7bb8
7 changed files with 63 additions and 9 deletions

View File

@ -10,8 +10,15 @@ RUN echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf
# Make additional development libraries available from PowerTools and Osmocom nightly (e.g. libdbi)
RUN dnf install -y dnf-utils wget && \
yum config-manager --set-enabled powertools && \
cd /etc/yum.repos.d/ && \
wget $OSMOCOM_REPO_MIRROR/repositories/network:osmocom:nightly/CentOS_8/network:osmocom:nightly.repo
export MIRROR_HTTPS="$(echo $OSMOCOM_REPO_MIRROR | sed s/^http:/https:/)" && \
{ 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 "gpgcheck=1"; \
echo "gpgkey=${MIRROR_HTTPS}/repositories/network:/osmocom:/nightly/CentOS_8/repodata/repomd.xml.key"; \
echo "enabled=1"; \
} > /etc/yum.repos.d/network:osmocom:nightly.repo
RUN dnf install -y \
autoconf \

View File

@ -11,8 +11,15 @@ RUN echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf
# Osmocom latest OBS repository
RUN dnf install -y dnf-utils wget && \
yum config-manager --set-enabled powertools && \
cd /etc/yum.repos.d/ && \
wget $OSMOCOM_REPO_MIRROR/repositories/network:osmocom:latest/CentOS_8/network:osmocom:latest.repo
export MIRROR_HTTPS="$(echo $OSMOCOM_REPO_MIRROR | sed s/^http:/https:/)" && \
{ 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 "gpgcheck=1"; \
echo "gpgkey=${MIRROR_HTTPS}/repositories/network:/osmocom:/latest/CentOS_8/repodata/repomd.xml.key"; \
echo "enabled=1"; \
} > /etc/yum.repos.d/network:osmocom:latest.repo
RUN dnf install -y \
telnet

View File

@ -26,7 +26,15 @@ RUN case "$DISTRO" in \
dnf install -y dnf-utils wget && \
yum config-manager --set-enabled PowerTools && \
cd /etc/yum.repos.d/ && \
wget ${OSMOCOM_REPO_CENTOS}/network:osmocom:$OSMOCOM_REPO_VERSION.repo \
export MIRROR_HTTPS="$(echo $OSMOCOM_REPO_CENTOS | sed s/^http:/https:/)" && \
{ echo "[network_osmocom_${OSMOCOM_REPO_VERSION}]"; \
echo "name=Osmocom ${OSMOCOM_REPO_VERSION}"; \
echo "type=rpm-md"; \
echo "baseurl=${OSMOCOM_REPO_CENTOS}"; \
echo "gpgcheck=1"; \
echo "gpgkey=${MIRROR_HTTPS}repodata/repomd.xml.key"; \
echo "enabled=1"; \
} > "/etc/yum.repos.d/network:osmocom:${OSMOCOM_REPO_VERSION}.repo" \
;; \
esac

View File

@ -26,7 +26,15 @@ RUN case "$DISTRO" in \
dnf install -y dnf-utils wget && \
yum config-manager --set-enabled PowerTools && \
cd /etc/yum.repos.d/ && \
wget ${OSMOCOM_REPO_CENTOS}/network:osmocom:$OSMOCOM_REPO_VERSION.repo \
export MIRROR_HTTPS="$(echo $OSMOCOM_REPO_CENTOS | sed s/^http:/https:/)" && \
{ echo "[network_osmocom_${OSMOCOM_REPO_VERSION}]"; \
echo "name=Osmocom ${OSMOCOM_REPO_VERSION}"; \
echo "type=rpm-md"; \
echo "baseurl=${OSMOCOM_REPO_CENTOS}"; \
echo "gpgcheck=1"; \
echo "gpgkey=${MIRROR_HTTPS}repodata/repomd.xml.key"; \
echo "enabled=1"; \
} > "/etc/yum.repos.d/network:osmocom:${OSMOCOM_REPO_VERSION}.repo" \
;; \
esac

View File

@ -26,7 +26,15 @@ RUN case "$DISTRO" in \
dnf install -y dnf-utils wget && \
yum config-manager --set-enabled PowerTools && \
cd /etc/yum.repos.d/ && \
wget ${OSMOCOM_REPO_CENTOS}/network:osmocom:$OSMOCOM_REPO_VERSION.repo \
export MIRROR_HTTPS="$(echo $OSMOCOM_REPO_CENTOS | sed s/^http:/https:/)" && \
{ echo "[network_osmocom_${OSMOCOM_REPO_VERSION}]"; \
echo "name=Osmocom ${OSMOCOM_REPO_VERSION}"; \
echo "type=rpm-md"; \
echo "baseurl=${OSMOCOM_REPO_CENTOS}"; \
echo "gpgcheck=1"; \
echo "gpgkey=${MIRROR_HTTPS}repodata/repomd.xml.key"; \
echo "enabled=1"; \
} > "/etc/yum.repos.d/network:osmocom:${OSMOCOM_REPO_VERSION}.repo" \
;; \
esac

View File

@ -26,7 +26,15 @@ RUN case "$DISTRO" in \
dnf install -y dnf-utils wget && \
yum config-manager --set-enabled PowerTools && \
cd /etc/yum.repos.d/ && \
wget ${OSMOCOM_REPO_CENTOS}/network:osmocom:$OSMOCOM_REPO_VERSION.repo \
export MIRROR_HTTPS="$(echo $OSMOCOM_REPO_CENTOS | sed s/^http:/https:/)" && \
{ echo "[network_osmocom_${OSMOCOM_REPO_VERSION}]"; \
echo "name=Osmocom ${OSMOCOM_REPO_VERSION}"; \
echo "type=rpm-md"; \
echo "baseurl=${OSMOCOM_REPO_CENTOS}"; \
echo "gpgcheck=1"; \
echo "gpgkey=${MIRROR_HTTPS}repodata/repomd.xml.key"; \
echo "enabled=1"; \
} > "/etc/yum.repos.d/network:osmocom:${OSMOCOM_REPO_VERSION}.repo" \
;; \
esac

View File

@ -26,7 +26,15 @@ RUN case "$DISTRO" in \
dnf install -y dnf-utils wget && \
yum config-manager --set-enabled PowerTools && \
cd /etc/yum.repos.d/ && \
wget ${OSMOCOM_REPO_CENTOS}/network:osmocom:$OSMOCOM_REPO_VERSION.repo \
export MIRROR_HTTPS="$(echo $OSMOCOM_REPO_CENTOS | sed s/^http:/https:/)" && \
{ echo "[network_osmocom_${OSMOCOM_REPO_VERSION}]"; \
echo "name=Osmocom ${OSMOCOM_REPO_VERSION}"; \
echo "type=rpm-md"; \
echo "baseurl=${OSMOCOM_REPO_CENTOS}"; \
echo "gpgcheck=1"; \
echo "gpgkey=${MIRROR_HTTPS}repodata/repomd.xml.key"; \
echo "enabled=1"; \
} > "/etc/yum.repos.d/network:osmocom:${OSMOCOM_REPO_VERSION}.repo" \
;; \
esac