Skip to content

Commit

Permalink
update CI for v1.9 ko
Browse files Browse the repository at this point in the history
  • Loading branch information
kulukami authored and shenping-bd committed Mar 7, 2024
1 parent 35c8572 commit 63e923d
Show file tree
Hide file tree
Showing 38 changed files with 72 additions and 28 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/Elkeid_driver_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2545,11 +2545,16 @@ jobs:
with:
path: ~/all_elkeid_drivers
- name: Prepare artifact 1 mkdir
run: mkdir -p elkeid_driver/ko elkeid_driver/log
- name: Prepare artifact 2-1 ko
run: mv -f ~/all_elkeid_drivers/*/*.ko elkeid_driver/ko || true
- name: Prepare artifact 2-2 sign
run: mv -f ~/all_elkeid_drivers/*/*.sign elkeid_driver/ko || true
run: mkdir -p elkeid_driver/ko/aarch64 elkeid_driver/ko/x86_64 elkeid_driver/log
- name: Prepare artifact 2-1-1 x86_64 ko
run: mv -f ~/all_elkeid_drivers/*/*amd64*ko elkeid_driver/ko/x86_64/. || true
- name: Prepare artifact 2-1-2 aarch64 ko
run: mv -f ~/all_elkeid_drivers/*/*arm64*ko elkeid_driver/ko/aarch64/. || true
- name: Prepare artifact 2-1-1 x86_64 sign
run: mv -f ~/all_elkeid_drivers/*/*amd64*sign elkeid_driver/ko/x86_64/. || true
- name: Prepare artifact 2-1-2 aarch64 ko
run: mv -f ~/all_elkeid_drivers/*/*arm64*sign elkeid_driver/ko/aarch64/. ||
true
- name: Prepare artifact 2-3 log
run: mv -f ~/all_elkeid_drivers/*/*.log elkeid_driver/log || true
- name: Pack artifact
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/aarch64/batch_compile.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/aarch64/batch_compile_el7.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/aarch64/batch_compile_el8.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/aarch64/batch_compile_ol8_uek.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
19 changes: 13 additions & 6 deletions driver/build_script/gen_ci_from_dockerfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,24 @@ def gen_job(vminfo):

OrderedDict({
"name": "Prepare artifact 1 mkdir",
"run": "mkdir -p elkeid_driver/ko elkeid_driver/log"
"run": "mkdir -p elkeid_driver/ko/aarch64 elkeid_driver/ko/x86_64 elkeid_driver/log"
}),

OrderedDict({
"name": "Prepare artifact 2-1 ko",
"run": "mv -f ~/all_elkeid_drivers/*/*.ko elkeid_driver/ko || true"
"name": "Prepare artifact 2-1-1 x86_64 ko",
"run": "mv -f ~/all_elkeid_drivers/*/*amd64*ko elkeid_driver/ko/x86_64/. || true"
}),
OrderedDict({
"name": "Prepare artifact 2-1-2 aarch64 ko",
"run": "mv -f ~/all_elkeid_drivers/*/*arm64*ko elkeid_driver/ko/aarch64/. || true"
}),
OrderedDict({
"name": "Prepare artifact 2-1-1 x86_64 sign",
"run": "mv -f ~/all_elkeid_drivers/*/*amd64*sign elkeid_driver/ko/x86_64/. || true"
}),

OrderedDict({
"name": "Prepare artifact 2-2 sign",
"run": "mv -f ~/all_elkeid_drivers/*/*.sign elkeid_driver/ko || true"
"name": "Prepare artifact 2-1-2 aarch64 ko",
"run": "mv -f ~/all_elkeid_drivers/*/*arm64*sign elkeid_driver/ko/aarch64/. || true"
}),

OrderedDict({
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_el7.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_el7_centosplus.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_el8_plus.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_elrepo6.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_elrepo7_lt.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_elrepo7_ml.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_elrepo8_lt.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_elrepo8_ml.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_ol8_uek.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/build_script/x86_64/batch_compile_tencentos.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rm -rf /ko_output || true
mkdir -p /ko_output
BUILD_VERSION=$(cat LKM/include/kprobe.h | grep SMITH_VERSION | awk -F '"' '{print $2}')
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.aarch64/Dockerfile.aliyun_linux3
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CMD [ "sh", "-c", "echo start" ]
RUN sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/AliYun.repo;
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel;
RUN dnf groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers
RUN for each_tag in `dnf --showduplicates list kernel-devel | grep kernel-devel | awk -c '{print $2}'`; do dnf -y install --downloadonly --downloaddir=/root/headers kernel-devel-$each_tag.aarch64; done
RUN rpm --force -i /root/headers/*.rpm || true
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.aarch64/Dockerfile.ol8_uek
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN dnf install -y wget perl gcc make tree openssl-devel openssl gcc-toolset-11

RUN dnf groupinstall -y "Development Tools";

RUN rm -rf /root/headers || true
RUN mkdir /root/headers

RUN dnf config-manager --set-enable ol8_UEKR7
Expand Down
2 changes: 1 addition & 1 deletion driver/dockerfiles.aarch64/Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN yum install -y wget perl gcc make tree elfutils-libelf-devel yumdownloader g
RUN yum groupinstall -y "Development Tools";
RUN yum install -y centos-release-scl
RUN yum install -y devtoolset-8

RUN rm -rf /root/headers || true
RUN mkdir /root/headers

ADD . /elkeid
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.aarch64/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RUN dnf groupinstall -y "Development Tools";
RUN dnf install -y centos-release-scl
RUN dnf install -y devtoolset-8

RUN rm -rf /root/headers || true
RUN mkdir /root/headers

ADD . /elkeid
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.aliyun_linux2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CMD [ "sh", "-c", "echo start" ]
RUN sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/AliYun.repo;
RUN yum install -y wget perl gcc make tree elfutils-libelf-devel yumdownloader;
RUN yum groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers
RUN for each_tag in `yum --showduplicates list kernel-devel | grep kernel-devel | awk -c '{print $2}'`; do yumdownloader --destdir /root/headers kernel-devel-$each_tag.x86_64; done
RUN rpm --force -i /root/headers/*.rpm || true
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.aliyun_linux3
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CMD [ "sh", "-c", "echo start" ]
RUN sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/AliYun.repo;
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel;
RUN dnf groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers
RUN for each_tag in `dnf --showduplicates list kernel-devel | grep kernel-devel | awk -c '{print $2}'`; do dnf -y install --downloadonly --downloaddir=/root/headers kernel-devel-$each_tag.x86_64; done
RUN rpm --force -i /root/headers/*.rpm || true
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.almalinux8
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CMD [ "sh", "-c", "echo start" ]
RUN sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/almalinux*.repo;
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel;
RUN dnf groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers

RUN cd /root/headers; \
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.almalinux9
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/almalinux*.repo;
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel openssl-devel;

RUN dnf groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers

WORKDIR /root/headers
Expand Down
21 changes: 11 additions & 10 deletions driver/dockerfiles.x86_64/Dockerfile.anolis8
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ CMD [ "sh", "-c", "echo start" ]
RUN sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/almalinux*.repo;
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel;
RUN dnf groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers

RUN cd /root/headers; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.2/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.2/Plus/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.4/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.4/Plus/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.5/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.5/Plus/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.6/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.6/Plus/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.8/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.8/Plus/x86_64/os/Packages/';
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.2/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.2/Plus/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.4/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.4/Plus/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.5/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.5/Plus/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.6/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.6/Plus/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.8/BaseOS/x86_64/os/Packages/'; \
wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.openanolis.cn/anolis/8.8/Plus/x86_64/os/Packages/';

RUN rpm --force -i /root/headers/*.rpm || true

Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ol8_uek
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM oraclelinux:8 AS rhel8
RUN dnf install -y wget perl gcc make tree openssl-devel openssl gcc-toolset-11 gcc-toolset-11-binutils-devel binutils-devel gcc-toolset-11-elfutils-libelf-devel;
RUN dnf groupinstall -y "Development Tools";

RUN rm -rf /root/headers || true
RUN mkdir /root/headers
RUN dnf config-manager --set-enable ol8_UEKR7
RUN dnf config-manager --set-enable ol8_UEKR6
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.oracle7
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN yum update -y || true;
RUN yum install -y wget perl gcc make tree openssl-devel openssl binutils-devel elfutils-libelf-devel yumdownloader || true;
RUN yum groupinstall -y "Development Tools" || true;

RUN rm -rf /root/headers || true
RUN mkdir /root/headers
RUN for eachversion in `yum --showduplicates list kernel-devel | grep kernel-devel.x86_64 | awk '{print $2}'` ; do yumdownloader --destdir /root/headers kernel-devel-$eachversion.x86_64 || true ; done;
RUN rpm --force -i --nodeps /root/headers/*.rpm || true
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.oracle8_uek
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM oraclelinux:8 AS oracle8

RUN dnf install -y wget perl gcc make tree openssl-devel openssl gcc-toolset-11 gcc-toolset-11-binutils-devel binutils-devel gcc-toolset-11-elfutils-libelf-devel;
RUN dnf groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers
RUN dnf config-manager --set-enable ol8_UEKR7
RUN dnf config-manager --set-enable ol8_UEKR6
Expand Down
8 changes: 4 additions & 4 deletions driver/dockerfiles.x86_64/Dockerfile.rhel6
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ FROM centos:centos6 AS rhel6

RUN rm -f /etc/yum.repos.d/CentOS-Media.repo
RUN sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=https://mirrors.aliyun.com/centos-vault/6.10|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=https://mirrors.aliyun.com/centos-vault/6.10|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo

RUN yum install -y wget perl gcc make tree elfutils-libelf-devel unzip yum-utils;
RUN yum groupinstall -y "Development Tools";

RUN sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/*.repo

RUN rm -rf /root/headers || true
RUN mkdir /root/headers
RUN for each_tag in `yum --showduplicates list kernel-devel | grep kernel-devel | awk '{print $2}'`; do yumdownloader --destdir /root/headers kernel-devel-$each_tag.x86_64; done

Expand Down
2 changes: 1 addition & 1 deletion driver/dockerfiles.x86_64/Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN yum install -y centos-release-scl
RUN yum install -y devtoolset-8
RUN yum install -y devtoolset-9
RUN yum install -y devtoolset-10

RUN rm -rf /root/headers || true
RUN mkdir /root/headers

ADD . /elkeid
Expand Down
2 changes: 1 addition & 1 deletion driver/dockerfiles.x86_64/Dockerfile.rhel7_centosplus
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN yum install -y centos-release-scl
RUN yum install -y devtoolset-8
RUN yum install -y devtoolset-9
RUN yum install -y devtoolset-10

RUN rm -rf /root/headers || true
RUN mkdir /root/headers

ADD . /elkeid
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM oraclelinux:8 AS rhel8

RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel openssl-devel openssl;
RUN dnf groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers

RUN for eachversion in `dnf --showduplicates list kernel-devel | grep kernel-devel.x86_64 | awk '{print $2}'` ; do dnf download --downloaddir=/root/headers kernel-devel-$eachversion.x86_64 || true ; done;
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8_plus
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM cern/c8-base:latest AS rhel8

RUN yum install -y wget perl gcc make tree elfutils-libelf-devel pciutils-libs;
RUN yum groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers

RUN cd /root/headers; \
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rocky8
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM rockylinux:8 AS rockylinux8

RUN yum install -y wget perl gcc make tree elfutils-libelf-devel;
RUN yum groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers

WORKDIR /root/headers
Expand Down
1 change: 1 addition & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rocky9
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM rockylinux:9 AS rockylinux9
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel openssl-devel;

RUN yum groupinstall -y "Development Tools";
RUN rm -rf /root/headers || true
RUN mkdir /root/headers

WORKDIR /root/headers
Expand Down

0 comments on commit 63e923d

Please sign in to comment.