diff options
author | Oliver Smith <osmith@sysmocom.de> | 2023-05-10 11:17:12 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2023-05-10 11:41:07 +0200 |
commit | badcf3d055ab744c3dd284c0ef9059a565c03adf (patch) | |
tree | 917d54459656e162bf99421b851d5407f49cde05 /scripts/obs/data/build_binpkg.Dockerfile | |
parent | f1b3c65f8fe320dfcf404b6a75d72b74027eec4d (diff) |
obs: support all debian/ubuntu/almalinux versions
Adjust the code so one can pass all versions, instead of hardcoding
only debian:11, ubuntu:22.04, almalinux:8. I'll use this for
reproducing a build error that happens on e.g. ubuntu:18.04.
Change-Id: Id85f5b67d144dc178d3fb23ff8e533a671473363
Diffstat (limited to 'scripts/obs/data/build_binpkg.Dockerfile')
-rw-r--r-- | scripts/obs/data/build_binpkg.Dockerfile | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/obs/data/build_binpkg.Dockerfile b/scripts/obs/data/build_binpkg.Dockerfile index bd12562..c3c1b1e 100644 --- a/scripts/obs/data/build_binpkg.Dockerfile +++ b/scripts/obs/data/build_binpkg.Dockerfile @@ -52,26 +52,28 @@ RUN case "$DISTRO" in \ # Add master repository, where packages immediately get updated after merging # patches to master. -RUN case "$DISTRO" in \ - debian:11) \ +RUN set -x; \ + VERSION="$(echo "$DISTRO" | cut -d : -f 2)"; \ + case "$DISTRO" in \ + debian:*) \ apt-key add /tmp/Release.key && \ rm /tmp/Release.key && \ - echo "deb https://downloads.osmocom.org/packages/osmocom:/master/Debian_11/ ./" \ + echo "deb https://downloads.osmocom.org/packages/osmocom:/master/Debian_$VERSION/ ./" \ > /etc/apt/sources.list.d/osmocom-master.list \ ;; \ - ubuntu:22.04) \ + ubuntu:*) \ apt-key add /tmp/Release.key && \ rm /tmp/Release.key && \ - echo "deb https://downloads.osmocom.org/packages/osmocom:/master/xUbuntu_22.04/ ./" \ + echo "deb https://downloads.osmocom.org/packages/osmocom:/master/xUbuntu_$VERSION/ ./" \ > /etc/apt/sources.list.d/osmocom-master.list \ ;; \ - almalinux:8) \ + almalinux:*) \ { echo "[network_osmocom_master]"; \ echo "name=osmocom:master"; \ echo "type=rpm-md"; \ - echo "baseurl=https://downloads.osmocom.org/packages/osmocom:/master/CentOS_8/"; \ + echo "baseurl=https://downloads.osmocom.org/packages/osmocom:/master/CentOS_$VERSION/"; \ echo "gpgcheck=1"; \ - echo "gpgkey=https://downloads.osmocom.org/packages/osmocom:/master/CentOS_8/repodata/repomd.xml.key"; \ + echo "gpgkey=https://downloads.osmocom.org/packages/osmocom:/master/CentOS_$VERSION/repodata/repomd.xml.key"; \ echo "enabled=1"; \ } > /etc/yum.repos.d/network:osmocom:master.repo \ ;; \ |