Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ansible-playbooks/group_vars/all/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ machines:
- {name: "fedora-5.17", kernel: "{{ repo }}/fedora-kernel:5.17-x86_64-{{ tag }}", rootfs: "{{ repo }}/fedora-image:5.17-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
- {name: "fedora-5.8", kernel: "{{ repo }}/fedora-kernel:5.8-x86_64-{{ tag }}", rootfs: "{{ repo }}/fedora-image:5.8-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
- {name: "fedora-6.2", kernel: "{{ repo }}/fedora-kernel:6.2-x86_64-{{ tag }}", rootfs: "{{ repo }}/fedora-image:6.2-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
- {name: "oraclelinux-3.10", kernel: "{{ repo }}/oraclelinux-kernel:3.10-x86_64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:3.10-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
- {name: "oraclelinux-4.14", kernel: "{{ repo }}/oraclelinux-kernel:4.14-x86_64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:4.14-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
- {name: "oraclelinux-5.15", kernel: "{{ repo }}/oraclelinux-kernel:5.15-x86_64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.15-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
- {name: "oraclelinux-5.4", kernel: "{{ repo }}/oraclelinux-kernel:5.4-x86_64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.4-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
- {name: "oraclelinux-5.4", kernel: "{{ repo }}/oraclelinux-kernel:5.4-x86_64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.4-x86_64-{{ tag }}", arch: "x86_64", skip_legacy_bpf_tests: true} # noqa: yaml[line-length]
- {name: "ubuntu-5.8", kernel: "{{ repo }}/ubuntu-kernel:5.8-x86_64-{{ tag }}", rootfs: "{{ repo }}/ubuntu-image:5.8-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
- {name: "ubuntu-6.5", kernel: "{{ repo }}/ubuntu-kernel:6.5-x86_64-{{ tag }}", rootfs: "{{ repo }}/ubuntu-image:6.5-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
- {name: "amazonlinux2022-5.15", kernel: "{{ repo }}/amazonlinux2022-kernel:5.15-aarch64-{{ tag }}", rootfs: "{{ repo }}/amazonlinux2022-image:5.15-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
- {name: "amazonlinux2-5.4", kernel: "{{ repo }}/amazonlinux2-kernel:5.4-aarch64-{{ tag }}", rootfs: "{{ repo }}/amazonlinux2-image:5.4-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
- {name: "fedora-6.2", kernel: "{{ repo }}/fedora-kernel:6.2-aarch64-{{ tag }}", rootfs: "{{ repo }}/fedora-image:6.2-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
- {name: "oraclelinux-4.14", kernel: "{{ repo }}/oraclelinux-kernel:4.14-aarch64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:4.14-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
- {name: "oraclelinux-5.15", kernel: "{{ repo }}/oraclelinux-kernel:5.15-aarch64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.15-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
- {name: "ubuntu-6.5", kernel: "{{ repo }}/ubuntu-kernel:6.5-aarch64-{{ tag }}", rootfs: "{{ repo }}/ubuntu-image:6.5-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
- {name: "oraclelinux-5.15", kernel: "{{ repo }}/oraclelinux-kernel:5.15-aarch64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.15-aarch64-{{ tag }}", arch: "aarch64", skip_legacy_bpf_tests: true} # noqa: yaml[line-length]
- {name: "ubuntu-6.5", kernel: "{{ repo }}/ubuntu-kernel:6.5-aarch64-v0.3.2", rootfs: "{{ repo }}/ubuntu-image:6.5-aarch64-v0.3.2", arch: "aarch64"} # noqa: yaml[line-length]

builders:
- {name: "centos-builder", kernel: "{{ repo }}/ubuntu-kernel:6.5-x86_64-{{ tag }}", rootfs: "{{ repo }}/builder:x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
Expand Down
13 changes: 12 additions & 1 deletion ansible-playbooks/roles/scap_open/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,18 @@
- name: Enable old Bpf support
ansible.builtin.set_fact:
scap_open_bpf_supported: true
when: ansible_kernel is version(scap_open_bpf_minimum_kver[ansible_architecture],'>=')
# Enable legacy BPF support if the minimum kernel version requirement is met and the user didn't explicitly decide
# to skip legacy BPF tests.
when:
- ansible_kernel is version(scap_open_bpf_minimum_kver[ansible_architecture],'>=')
- machines
| selectattr('name', 'equalto', inventory_hostname)
| selectattr('arch', 'equalto', ansible_architecture)
| map(attribute='skip_legacy_bpf_tests')
| map('default', false)
| select('equalto', true)
| list
| length == 0

- name: Prepare the build directory
block:
Expand Down
9 changes: 6 additions & 3 deletions images/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ build-kernel: initrd-builder
arch=$(ARCH); \
rootfs_dir=$$(find . -type d -path "./$$arch/$$distro/$$version"); \
kernel_dir=$$(find . -type d -path "./$$arch/$$distro/$$version"); \
rootfs_image=$(REPOSITORY)/$$distro-image:$$version-$$arch; \
kernel_image=$(REPOSITORY)/$$distro-kernel:$$version-$$arch; \
rootfs_image=$(REPOSITORY)/$$distro-image:$$version-$$arch-$(TAG); \
kernel_image=$(REPOSITORY)/$$distro-kernel:$$version-$$arch-$(TAG); \
if [ -n "$$rootfs_dir" ]; then \
if [ "$(DRY_RUN)" = "true" ]; then \
echo "Dry run: Building rootfs image: docker build -t $$rootfs_image --build-arg CMAKE_VERSION=\"$(CMAKE_VERSION)\" $$rootfs_dir"; \
Expand All @@ -148,7 +148,10 @@ build-kernel: initrd-builder
echo "Dry run: Building kernel image: docker build -t $$kernel_image -f $$kernel_dir/Dockerfile.kernel $$kernel_dir"; \
else \
echo "Building kernel image: $$kernel_image"; \
docker build -t $$kernel_image -f $$kernel_dir/Dockerfile.kernel $$kernel_dir; \
docker build \
-t $$kernel_image \
-f $$kernel_dir/Dockerfile.kernel \
$$kernel_dir; \
if [ "$(PUSH)" = "true" ]; then \
echo "Pushing image: $$kernel_image"; \
docker push $$kernel_image; \
Expand Down
2 changes: 1 addition & 1 deletion images/aarch64/amazonlinux2/5.4/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN touch .placeholder && \
cd .. && \
find ./extracted/ -name 'vmlinuz-*' -exec cp -v {} extracted/vmlinux \;

FROM amazonlinux:2 as kmod-builder
FROM amazonlinux:2 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/aarch64/amazonlinux2022/5.15/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN touch .placeholder && \
find ./extracted/lib/modules -name vmlinuz -exec cp -v {} extracted/vmlinux.gz \; && \
gunzip extracted/vmlinux.gz

FROM amazonlinux:2023 as kmod-builder
FROM amazonlinux:2023 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/aarch64/oraclelinux/4.14/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN touch .placeholder && \
cd .. && \
find ./extracted/ -name 'vmlinuz-*' -exec cp -v {} extracted/vmlinux \;

FROM amazonlinux:2 as kmod-builder
FROM amazonlinux:2 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/aarch64/oraclelinux/5.15/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN touch .placeholder && \
cd .. && \
find ./extracted/ -name 'vmlinuz*' -exec cp -v {} extracted/vmlinux \;

FROM oraclelinux:9 as kmod-builder
FROM oraclelinux:9 AS kmod-builder

ARG VERSION
ARG ARCHITECTURE
Expand Down
10 changes: 2 additions & 8 deletions images/aarch64/ubuntu/6.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM ubuntu:22.04

ARG VERSION=6.5.0-1024-aws
ARG URL='https://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-aws-6.5/'
ARG CMAKE_VERSION

# Use bash for all RUN steps with some safety options enabled.
Expand All @@ -20,6 +19,8 @@ RUN apt-get update && apt-get install -y \
kmod \
libcap-dev \
libelf-dev \
linux-headers-${VERSION} \
linux-tools-${VERSION} \
llvm \
net-tools \
openssh-server \
Expand All @@ -31,13 +32,6 @@ RUN apt-get update && apt-get install -y \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
curl ${URL} | \
grep -E "linux-headers-${VERSION}|linux-tools-${VERSION}" | \
grep "arm64" | \
cut -d\" -f8 | \
xargs -I@ curl -LO ${URL}@ && \
find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \
rm -f *.deb && \
CMAKE_ARCH="aarch64" && \
CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \
curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \
Expand Down
2 changes: 1 addition & 1 deletion images/modernprobe-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:latest
FROM fedora:39

ARG CMAKE_VERSION

Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/amazonlinux2/4.19/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/ -name 'vmlinuz-*') > extracted/vmlinux

FROM amazonlinux:2 as kmod-builder
FROM amazonlinux:2 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/amazonlinux2/5.10/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/ -name 'vmlinuz-*') > extracted/vmlinux

FROM amazonlinux:2 as kmod-builder
FROM amazonlinux:2 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/amazonlinux2/5.15/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/ -name 'vmlinuz-*') > extracted/vmlinux

FROM amazonlinux:2 as kmod-builder
FROM amazonlinux:2 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/amazonlinux2/5.4/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/ -name 'vmlinuz-*') > extracted/vmlinux

FROM amazonlinux:2 as kmod-builder
FROM amazonlinux:2 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/amazonlinux2022/5.15/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/lib/modules -name vmlinuz) > extracted/vmlinux

FROM amazonlinux:2023 as kmod-builder
FROM amazonlinux:2023 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/amazonlinux2023/6.1/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/lib/modules -name vmlinuz) > extracted/vmlinux

FROM amazonlinux:2023 as kmod-builder
FROM amazonlinux:2023 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/fedora/5.17/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN touch .placeholder && \
find . -name '*.xz' -exec xz -d {} \; && \
extract-vmlinux $(find lib/modules -name vmlinuz) > /home/ubuntu/extracted/vmlinux

FROM fedora:36 as kmod-builder
FROM fedora:36 AS kmod-builder

ARG VERSION
ARG HVERSION
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/fedora/5.8/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN touch .placeholder && \
find . -name '*.xz' -exec xz -d {} \; && \
extract-vmlinux $(find lib/modules -name vmlinuz) > /home/ubuntu/extracted/vmlinux

FROM fedora:33 as kmod-builder
FROM fedora:33 AS kmod-builder

ARG VERSION
ARG HVERSION
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/oraclelinux/3.10/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/ -name 'vmlinuz-*') > extracted/vmlinux

FROM oraclelinux:7 as kmod-builder
FROM oraclelinux:7 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/oraclelinux/4.14/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/ -name 'vmlinuz-*') > extracted/vmlinux

FROM oraclelinux:7 as kmod-builder
FROM oraclelinux:7 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/oraclelinux/5.15/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/ -name 'vmlinuz') > extracted/vmlinux

FROM oraclelinux:9 as kmod-builder
FROM oraclelinux:9 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
2 changes: 1 addition & 1 deletion images/x86_64/oraclelinux/5.4/Dockerfile.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN touch .placeholder && \
cd .. && \
extract-vmlinux $(find ./extracted/ -name 'vmlinuz') > extracted/vmlinux

FROM oraclelinux:8 as kmod-builder
FROM oraclelinux:8 AS kmod-builder

ARG VERSION
ARG URL
Expand Down
10 changes: 2 additions & 8 deletions images/x86_64/ubuntu/4.15/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM ubuntu:18.04

ARG VERSION=4.15.0-1118-aws
ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws/'
ARG CMAKE_VERSION

# Use bash for all RUN steps with some safety options enabled.
Expand All @@ -20,6 +19,8 @@ RUN apt-get update && apt-get install -y \
kmod \
libcap-dev \
libelf-dev \
linux-headers-${VERSION} \
linux-tools-${VERSION} \
llvm \
net-tools \
openssh-server \
Expand All @@ -31,13 +32,6 @@ RUN apt-get update && apt-get install -y \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
curl ${URL} | \
grep -E "linux-headers-${VERSION}|linux-tools-${VERSION}|linux-tools-common_${VERSION}" | \
grep -vE 'i386|lowlatency' | \
cut -d\" -f8 | \
xargs -I@ curl -LO ${URL}@ && \
find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \
rm -f *.deb && \
CMAKE_ARCH="x86_64" && \
CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \
curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \
Expand Down
10 changes: 3 additions & 7 deletions images/x86_64/ubuntu/6.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM ubuntu:22.04

ARG VERSION=6.2.0-1018-aws
ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.2/'
ARG CMAKE_VERSION

# Use bash for all RUN steps with some safety options enabled.
Expand All @@ -20,6 +19,8 @@ RUN apt-get update && apt-get install -y \
kmod \
libcap-dev \
libelf-dev \
linux-headers-${VERSION} \
linux-tools-${VERSION} \
llvm \
net-tools \
openssh-server \
Expand All @@ -30,12 +31,7 @@ RUN apt-get update && apt-get install -y \
udev \
wget && \
apt-get clean && \
curl ${URL} | \
grep -E "linux-headers-${VERSION}|linux-tools-${VERSION}|linux-tools-common_${VERSION}" | \
cut -d\" -f8 | \
xargs -I@ curl -LO ${URL}@ && \
find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \
rm -f *.deb && \
rm -rf /var/lib/apt/lists/* && \
CMAKE_ARCH="x86_64" && \
CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \
curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \
Expand Down
9 changes: 2 additions & 7 deletions images/x86_64/ubuntu/6.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM ubuntu:22.04

ARG VERSION=6.5.0-1024-aws
ARG URL='https://archive.ubuntu.com/ubuntu/pool/main/l/linux-aws-6.5/'
ARG CMAKE_VERSION

# Use bash for all RUN steps with some safety options enabled.
Expand All @@ -20,6 +19,8 @@ RUN apt-get update && apt-get install -y \
kmod \
libcap-dev \
libelf-dev \
linux-headers-${VERSION} \
linux-tools-${VERSION} \
llvm \
net-tools \
openssh-server \
Expand All @@ -31,12 +32,6 @@ RUN apt-get update && apt-get install -y \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
curl ${URL} | \
grep -E "linux-headers-${VERSION}|linux-tools-${VERSION}|linux-tools-common_${VERSION}" | \
cut -d\" -f8 | \
xargs -I@ curl -LO ${URL}@ && \
find . -name '*.deb' | xargs -n1 dpkg -i --force-depends && \
rm -f *.deb && \
CMAKE_ARCH="x86_64" && \
CMAKE_RELEASE_NAME="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}" && \
curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_RELEASE_NAME}.tar.gz" | \
Expand Down