Skip to content

Commit

Permalink
add missing build_script
Browse files Browse the repository at this point in the history
  • Loading branch information
kulukami committed Dec 27, 2023
1 parent 9e4f6ce commit 2fa4d88
Show file tree
Hide file tree
Showing 10 changed files with 352 additions and 4 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/Elkeid_driver_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,92 @@ jobs:
with:
name: elkeid_driver_ol8_uek_x86_64
path: ${{steps.extract-ol8_uek.outputs.destination}}
build_oracle7_x86_64:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: false
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
password: ${{secrets.DOCKERHUB_TOKEN}}
username: ${{secrets.DOCKERHUB_USERNAME}}
- name: Set up Docker Buildx oracle7
uses: docker/setup-buildx-action@v2
- name: Build oracle7
uses: docker/build-push-action@v3
timeout-minutes: 300
with:
context: .
file: driver/dockerfiles.x86_64/Dockerfile.oracle7
load: false
push: true
tags: elkeidteam/elkeid_driver_oracle7_x86_64:latest
- name: Docker Hub Description oracle7
uses: peter-evans/dockerhub-description@v3
with:
password: ${{secrets.DOCKERHUB_TOKEN}}
repository: elkeidteam/elkeid_driver_oracle7_x86_64
short-description: ${{github.event.repository.description}}
username: ${{secrets.DOCKERHUB_USERNAME}}
- name: Extract oracle7
if: always()
id: extract-oracle7
uses: shrink/actions-docker-extract@v2
with:
image: elkeidteam/elkeid_driver_oracle7_x86_64:latest
path: /ko_output/.
- name: Upload oracle7
uses: actions/upload-artifact@v3
if: always()
with:
name: elkeid_driver_oracle7_x86_64
path: ${{steps.extract-oracle7.outputs.destination}}
build_oracle8_uek_x86_64:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: false
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
password: ${{secrets.DOCKERHUB_TOKEN}}
username: ${{secrets.DOCKERHUB_USERNAME}}
- name: Set up Docker Buildx oracle8_uek
uses: docker/setup-buildx-action@v2
- name: Build oracle8_uek
uses: docker/build-push-action@v3
timeout-minutes: 300
with:
context: .
file: driver/dockerfiles.x86_64/Dockerfile.oracle8_uek
load: false
push: true
tags: elkeidteam/elkeid_driver_oracle8_uek_x86_64:latest
- name: Docker Hub Description oracle8_uek
uses: peter-evans/dockerhub-description@v3
with:
password: ${{secrets.DOCKERHUB_TOKEN}}
repository: elkeidteam/elkeid_driver_oracle8_uek_x86_64
short-description: ${{github.event.repository.description}}
username: ${{secrets.DOCKERHUB_USERNAME}}
- name: Extract oracle8_uek
if: always()
id: extract-oracle8_uek
uses: shrink/actions-docker-extract@v2
with:
image: elkeidteam/elkeid_driver_oracle8_uek_x86_64:latest
path: /ko_output/.
- name: Upload oracle8_uek
uses: actions/upload-artifact@v3
if: always()
with:
name: elkeid_driver_oracle8_uek_x86_64
path: ${{steps.extract-oracle8_uek.outputs.destination}}
build_rhel6_x86_64:
runs-on: ubuntu-latest
continue-on-error: true
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/Elkeid_driver_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,92 @@ jobs:
with:
name: elkeid_driver_ol8_uek_x86_64
path: ${{steps.extract-ol8_uek.outputs.destination}}
build_oracle7_x86_64:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: false
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
password: ${{secrets.DOCKERHUB_TOKEN}}
username: ${{secrets.DOCKERHUB_USERNAME}}
- name: Set up Docker Buildx oracle7
uses: docker/setup-buildx-action@v2
- name: Build oracle7
uses: docker/build-push-action@v3
timeout-minutes: 300
with:
context: .
file: driver/dockerfiles.x86_64/Dockerfile.oracle7
load: false
push: true
tags: elkeidteam/elkeid_driver_oracle7_x86_64:latest
- name: Docker Hub Description oracle7
uses: peter-evans/dockerhub-description@v3
with:
password: ${{secrets.DOCKERHUB_TOKEN}}
repository: elkeidteam/elkeid_driver_oracle7_x86_64
short-description: ${{github.event.repository.description}}
username: ${{secrets.DOCKERHUB_USERNAME}}
- name: Extract oracle7
if: always()
id: extract-oracle7
uses: shrink/actions-docker-extract@v2
with:
image: elkeidteam/elkeid_driver_oracle7_x86_64:latest
path: /ko_output/.
- name: Upload oracle7
uses: actions/upload-artifact@v3
if: always()
with:
name: elkeid_driver_oracle7_x86_64
path: ${{steps.extract-oracle7.outputs.destination}}
build_oracle8_uek_x86_64:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: false
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
password: ${{secrets.DOCKERHUB_TOKEN}}
username: ${{secrets.DOCKERHUB_USERNAME}}
- name: Set up Docker Buildx oracle8_uek
uses: docker/setup-buildx-action@v2
- name: Build oracle8_uek
uses: docker/build-push-action@v3
timeout-minutes: 300
with:
context: .
file: driver/dockerfiles.x86_64/Dockerfile.oracle8_uek
load: false
push: true
tags: elkeidteam/elkeid_driver_oracle8_uek_x86_64:latest
- name: Docker Hub Description oracle8_uek
uses: peter-evans/dockerhub-description@v3
with:
password: ${{secrets.DOCKERHUB_TOKEN}}
repository: elkeidteam/elkeid_driver_oracle8_uek_x86_64
short-description: ${{github.event.repository.description}}
username: ${{secrets.DOCKERHUB_USERNAME}}
- name: Extract oracle8_uek
if: always()
id: extract-oracle8_uek
uses: shrink/actions-docker-extract@v2
with:
image: elkeidteam/elkeid_driver_oracle8_uek_x86_64:latest
path: /ko_output/.
- name: Upload oracle8_uek
uses: actions/upload-artifact@v3
if: always()
with:
name: elkeid_driver_oracle8_uek_x86_64
path: ${{steps.extract-oracle8_uek.outputs.destination}}
build_rhel6_x86_64:
runs-on: ubuntu-latest
continue-on-error: true
Expand Down Expand Up @@ -2518,11 +2604,13 @@ jobs:
- build_rocky8_x86_64
- build_ubuntu1404_k4_x86_64
- build_ubuntu1804_x86_64
- build_oracle8_uek_x86_64
- build_rhel8_plus_x86_64
- build_rhel7_elrepo_lt_archive_x86_64
- build_ubuntu2004_azure_x86_64
- build_debian9_x86_64
- build_rhel8_elrepo_ml_x86_64
- build_oracle7_x86_64
- build_rhel7_elrepo_lt_x86_64
- build_ubuntu1604_k410_x86_64
- build_ubuntu1604_aws_x86_64
Expand Down
16 changes: 16 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.oracle7
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM oraclelinux:7 AS oracle7


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 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
RUN rm -rf /root/headers/*.rpm

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

18 changes: 18 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.oracle8_uek
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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 mkdir /root/headers
RUN dnf config-manager --set-enable ol8_UEKR7
RUN dnf config-manager --set-enable ol8_UEKR6
RUN for eachversion in `dnf --showduplicates list kernel-uek-devel | grep kernel-uek-devel.x86_64 | awk '{print $2}'` ; do dnf download --downloaddir=/root/headers kernel-uek-devel-$eachversion.x86_64 || true ; done;
RUN rpm --force -i /root/headers/*.rpm || true

ADD . /elkeid
WORKDIR /elkeid/driver
RUN scl enable gcc-toolset-11 "bash ./build_script/x86_64/batch_compile_ol8_uek.sh"

RUN rm -rf /root/headers/*.rpm


4 changes: 3 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.rocky8
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ RUN yum groupinstall -y "Development Tools";
RUN mkdir /root/headers

WORKDIR /root/headers
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/8.8/BaseOS/x86_64/os/Packages/k/';

RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/8.9/BaseOS/x86_64/os/Packages/k/';
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/8/BaseOS/x86_64/os/Packages/k/';
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky-vault/8.8/BaseOS/x86_64/os/Packages/k/';
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky-vault/8.7/BaseOS/x86_64/os/Packages/k/';
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky-vault/8.6/BaseOS/x86_64/os/Packages/k/';
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky-vault/8.5/BaseOS/x86_64/os/Packages/k/'
Expand Down
8 changes: 5 additions & 3 deletions driver/dockerfiles.x86_64/Dockerfile.rocky9
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ WORKDIR /root/headers
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9/BaseOS/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9/AppStream/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9/devel/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9.1/BaseOS/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9.1/AppStream/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9.1/devel/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9.2/BaseOS/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9.2/AppStream/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9.2/devel/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9.3/BaseOS/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9.3/AppStream/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky/9.3/devel/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky-vault/9.0/devel/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky-vault/9.0/AppStream/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky-vault/9.1/devel/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky-vault/9.1/AppStream/x86_64/os/Packages/k/' || true ;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.nju.edu.cn/rocky-vault/9.1/BaseOS/x86_64/os/Packages/k/' || true ;

RUN rm -f /root/headers/kernel-devel-matched*
RUN rpm --force -i /root/headers/*.rpm || true

Expand Down
35 changes: 35 additions & 0 deletions driver/tools/ubuntu12_headers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/python

# python 2.7.3 only

import requests
import re
import os

version_list = [
r"3.2.0",
r"3.5.0",
r"3.8.0",
r"3.11.0",
]


def find_all_childs(version_list, data):
pkgs = [each[0] for each in re.findall(
r'<a href="(linux-headers-(' + '|'.join(version_list) + ').*_(all|amd64).deb)">linux-headers', data)
]
return pkgs


def download(url, filename):
os.system("wget -q --no-check-certificate "+url)


ubuntu_kernel_header_url = "https://old-releases.ubuntu.com/ubuntu/pool/main/l/linux/"

response = requests.get(url=ubuntu_kernel_header_url)
page_info = str(response.content)

all_versions = find_all_childs(version_list, page_info)
for each in all_versions:
download(ubuntu_kernel_header_url+each, each)
34 changes: 34 additions & 0 deletions driver/tools/ubuntu14_k3_headers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/python

# python 2.7.3 only

import requests
import re
import os

version_list = [
r"3.16.0",
r"3.19.0",
r"4.2.0"
]


def find_all_childs(version_list, data):
pkgs = [each[0] for each in re.findall(
r'<a href="(linux-headers-(' + '|'.join(version_list) + ').*_(all|amd64).deb)">linux-headers', data)
]
return pkgs


def download(url, filename):
os.system("wget -q --no-check-certificate "+url)


ubuntu_kernel_header_url = "https://old-releases.ubuntu.com/ubuntu/pool/main/l/linux/"

response = requests.get(url=ubuntu_kernel_header_url, verify=False)
page_info = str(response.content)

all_versions = find_all_childs(version_list, page_info)
for each in all_versions:
download(ubuntu_kernel_header_url+each, each)
35 changes: 35 additions & 0 deletions driver/tools/ubuntu14_k4_headers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/python

# python 2.7.3 only

import requests
import re
import os

version_list = [
r"4.10.0"
r"4.8.0"
r"4.13.0"
r"4.18.0"
]


def find_all_childs(version_list, data):
pkgs = [each[0] for each in re.findall(
r'<a href="(linux-headers-(' + '|'.join(version_list) + ').*_(all|amd64).deb)">linux-headers', data)
]
return pkgs


def download(url, filename):
os.system("wget -q --no-check-certificate "+url)


ubuntu_kernel_header_url = "https://old-releases.ubuntu.com/ubuntu/pool/main/l/linux/"

response = requests.get(url=ubuntu_kernel_header_url, verify=False)
page_info = str(response.content)

all_versions = find_all_childs(version_list, page_info)
for each in all_versions:
download(ubuntu_kernel_header_url+each, each)
Loading

0 comments on commit 2fa4d88

Please sign in to comment.