]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Readd CentOS 7 to CI build and package process
authorDavid Petera <david.petera@nic.cz>
Fri, 31 Jan 2025 13:08:49 +0000 (14:08 +0100)
committerMaria Matejka <mq@ucw.cz>
Tue, 1 Apr 2025 10:09:36 +0000 (12:09 +0200)
.gitlab-ci.yml
misc/docker/centos-7-amd64/Dockerfile [new file with mode: 0644]
sysdep/linux/sysio.h

index 9efd796866d220229e208f660747709a53b4c471..db6902938a77e185536e5def45c5ab829d6ce496 100644 (file)
@@ -147,6 +147,11 @@ docker-fedora-41-amd64:
     IMG_NAME: "fedora-41-amd64"
   <<: *docker_build
 
+docker-centos-7-amd64:
+  variables:
+    IMG_NAME: "centos-7-amd64"
+  <<: *docker_build
+
 docker-centos-8-amd64:
   variables:
     IMG_NAME: "centos-8-amd64"
@@ -320,6 +325,14 @@ build-fedora-41-amd64:
   <<: *build-linux
   image: registry.nic.cz/labs/bird:fedora-41-amd64
 
+build-centos-7-amd64:
+  <<: *build-linux
+  variables:
+    # export path to devtoolset-8-gcc
+    CC: /opt/rh/devtoolset-8/root/usr/bin/gcc
+    LC_ALL: en_US.UTF-8
+  image: registry.nic.cz/labs/bird:centos-7-amd64
+
 build-centos-8-amd64:
   <<: *build-linux
   image: registry.nic.cz/labs/bird:centos-8-amd64
@@ -560,12 +573,14 @@ pkg-fedora-41-amd64:
   needs: [build-fedora-41-amd64]
   image: registry.nic.cz/labs/bird:fedora-41-amd64
 
-#pkg-centos-7-amd64:
-#  <<: *pkg-rpm-wa
-#  variables:
-#    LC_ALL: en_US.UTF-8
-#  needs: [build-centos-7-amd64]
-#  image: registry.nic.cz/labs/bird:centos-7-amd64
+pkg-centos-7-amd64:
+  <<: *pkg-rpm-wa
+  variables:
+    # export path to devtoolset-8-gcc
+    CC: /opt/rh/devtoolset-8/root/usr/bin/gcc
+    LC_ALL: en_US.UTF-8
+  needs: [build-centos-7-amd64]
+  image: registry.nic.cz/labs/bird:centos-7-amd64
 
 # Removed due to apkg breakage
 #pkg-centos-8-amd64:
diff --git a/misc/docker/centos-7-amd64/Dockerfile b/misc/docker/centos-7-amd64/Dockerfile
new file mode 100644 (file)
index 0000000..eab1243
--- /dev/null
@@ -0,0 +1,45 @@
+FROM centos:7
+
+# Has to be done for yum to work properly. CentOS 7 is EOL.
+RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
+RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
+RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo
+
+# Add new repos for devtoolset-8-gcc. 
+# We need to use devtoolset, because BIRD cannot be correctly compiled with CentOS 7 version of gcc.
+RUN echo -e \ 
+       "\n[centos-sclo-rh]\nname=CentOS-7.8.2003 - SCLo rh\nbaseurl=https://vault.centos.org/7.8.2003/sclo/\$basearch/rh/\ngpgcheck=0\nenabled=1" \
+       >> /etc/yum.repos.d/CentOS-Base.repo
+RUN echo -e \
+       "\n[centos-sclo-sclo]\nname=CentOS-7.8.2003 - SCLo sclo\nbaseurl=https://vault.centos.org/7.8.2003/sclo/\$basearch/sclo/\ngpgcheck=0\nenabled=1" \
+       >> /etc/yum.repos.d/CentOS-Base.repo
+
+RUN yum -y upgrade
+
+# Change kernel-headers
+RUN yum -y remove \
+       kernel-headers
+RUN yum -y install \
+       https://dl.lamp.sh/kernel/el7/kernel-ml-headers-6.6.41-1.el7.x86_64.rpm
+
+RUN yum -y install \
+       gcc \
+       make \
+       flex \
+       bison \
+       autoconf \
+       libssh-devel \
+       ncurses-devel \
+       readline-devel \
+       centos-release-scl
+
+RUN yum -y install \
+       git \
+       rpm-build \
+       python3 \
+       python3-pip \
+       python3-setuptools \
+       devtoolset-8-toolchain
+
+RUN yum -y install \
+       ftp://ftp.icm.edu.pl/packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/systemsmanagement:/Ardana:/8:/CentOS/CentOS_7.3/noarch/systemd-rpm-macros-3-5.2.noarch.rpm
index ad5399a73a50be2d09bb5cdda59b0394fd3d31fe..94a15b7e47238490bf8a8af4729514f9489ab31d 100644 (file)
 #define TCP_MD5SIG_FLAG_PREFIX 1
 #endif
 
+/* Used for legacy system builds (e.g. CentOS 7) */
+#ifndef UDP_NO_CHECK6_RX
+#define UDP_NO_CHECK6_RX 102
+#endif
 
 /* We redefine the tcp_md5sig structure with different name to avoid collision with older headers */
 struct tcp_md5sig_ext {