aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2024-05-08 11:30:18 +0200
committerosmith <osmith@sysmocom.de>2024-05-08 13:03:41 +0000
commit91a79bd8aa8e7901a7d687b6222df360db1bcdc5 (patch)
tree2963cf230a69772c15065def6ccf6fcab1df74f0
parent0aa60b04a5193fc3d79ce64c9ce94ebed42a96bb (diff)
jobs: gerrit: build osmo-pcap + dep for centos7
We are about to remove the rpm spec files for almost all Osmocom git repositories. The only two git repositories where we still need them, because we have a customer using them on centos 7, are libosmocore and osmo-pcap (SYS#6760). Add CI to ensure that these still build fine, and that we don't remove these by mistake. Related: OS#6446 Change-Id: I4d4a67c053ed29811c504158d1ef49430880ad4f
-rw-r--r--jobs/gerrit-verifications.yml4
-rwxr-xr-xscripts/obs/build_binpkg.py1
-rw-r--r--scripts/obs/data/build_binpkg.Dockerfile20
-rwxr-xr-xscripts/obs/data/build_rpm.sh18
-rw-r--r--scripts/obs/lib/config.py1
5 files changed, 41 insertions, 3 deletions
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index 607e909..1a5d656 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -121,6 +121,7 @@
a1: !!python/tuple [arm-none-eabi, amd64]
combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")'
cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins_arch.sh "$arch"'
+ pipeline_binpkgs: "centos:7 debian:10 debian:12" # centos7: SYS#6760
- libsmpp34
@@ -258,7 +259,8 @@
-e WITH_MANUALS="$WITH_MANUALS" \
{docker_img} {timeout_cmd} /build/contrib/jenkins.sh
- - osmo-pcap
+ - osmo-pcap:
+ pipeline_binpkgs: "centos:7 debian:10 debian:12" # centos7: SYS#6760
- osmo-pcu:
slave_axis: !!python/tuple [osmocom-gerrit, rpi4-raspbian11]
diff --git a/scripts/obs/build_binpkg.py b/scripts/obs/build_binpkg.py
index ae2fe53..5c8cd01 100755
--- a/scripts/obs/build_binpkg.py
+++ b/scripts/obs/build_binpkg.py
@@ -69,6 +69,7 @@ def main():
env = {"JOBS": str(args.jobs),
"PACKAGE": args.package,
"BUILDUSER": os.environ["USER"],
+ "DISTRO": args.docker,
"PACKAGEFORMAT": "deb"}
docker_args = []
diff --git a/scripts/obs/data/build_binpkg.Dockerfile b/scripts/obs/data/build_binpkg.Dockerfile
index 55bfe0c..b29d8f9 100644
--- a/scripts/obs/data/build_binpkg.Dockerfile
+++ b/scripts/obs/data/build_binpkg.Dockerfile
@@ -51,6 +51,24 @@ RUN case "$DISTRO" in \
yum config-manager --set-enabled powertools && \
su user -c rpmdev-setuptree \
;; \
+ centos:7) \
+ yum -y install \
+ autoconf \
+ automake \
+ binutils \
+ dnf-utils \
+ gcc \
+ gcc-c++ \
+ glibc-devel \
+ iproute \
+ libtool \
+ make \
+ redhat-rpm-config \
+ rpm-build \
+ rpmdevtools \
+ wget && \
+ su user -c rpmdev-setuptree \
+ ;; \
esac
# Add master repository, where packages immediately get updated after merging
@@ -71,7 +89,7 @@ RUN set -x; \
echo "deb https://downloads.osmocom.org/packages/osmocom:/$FEED/xUbuntu_$VERSION/ ./" \
> /etc/apt/sources.list.d/osmocom-$FEED.list \
;; \
- almalinux:*) \
+ almalinux:*|centos:*) \
{ echo "[network_osmocom_$FEED]"; \
echo "name=osmocom:$FEED"; \
echo "type=rpm-md"; \
diff --git a/scripts/obs/data/build_rpm.sh b/scripts/obs/data/build_rpm.sh
index a73d164..7247999 100755
--- a/scripts/obs/data/build_rpm.sh
+++ b/scripts/obs/data/build_rpm.sh
@@ -22,7 +22,23 @@ su "$BUILDUSER" -c "cp _temp/srcpkgs/$PACKAGE/rpmlintrc ~/rpmbuild/SOURCES"
su "$BUILDUSER" -c "cp /obs/data/rpmmacros ~/.rpmmacros"
# Force refresh of package index data (OS#6038)
-dnf makecache --refresh
+if command -v dnf; then
+ dnf makecache --refresh
+else
+ yum clean expire-cache
+fi
+
+case "$DISTRO" in
+ centos:7)
+ # HACK: remove pkg-config as centos7 has pkgconfig instead
+ # (which will get pulled in automatically). This could be
+ # solved more elegantly, but we only build very few centos7
+ # packages, so let's not spend too much time on this. In OBS
+ # this is handled in the centos7 prjconf:
+ # https://build.opensuse.org/projects/CentOS:CentOS-7/prjconf
+ sed -i '/^BuildRequires:.*pkg-config/d' "/home/$BUILDUSER/rpmbuild/SPECS/$spec"
+ ;;
+esac
$yum_builddep "/home/$BUILDUSER/rpmbuild/SPECS/$spec"
diff --git a/scripts/obs/lib/config.py b/scripts/obs/lib/config.py
index b4e23a0..82bf188 100644
--- a/scripts/obs/lib/config.py
+++ b/scripts/obs/lib/config.py
@@ -122,6 +122,7 @@ git_latest_tag_pattern_other = {
docker_distro_default = "debian:12"
docker_distro_other = [
"almalinux:*", # instead of centos (SYS#5818)
+ "centos:7", # SYS#6760
"debian:*",
"ubuntu:*",
]