Skip to content

Commit 0562ec1

Browse files
committed
Fix build in CI
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
1 parent 7902b9d commit 0562ec1

File tree

4 files changed

+46
-8
lines changed

4 files changed

+46
-8
lines changed

dependencies.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ dependencies:
115115
- path: hack/install-libbpf.sh
116116
match: VERSION
117117

118+
- name: libelf
119+
version: 0.193
120+
refPaths:
121+
- path: hack/install-libelf.sh
122+
match: VERSION
123+
118124
- name: debian-vmlinux
119125
version: trixie
120126
refPaths:
@@ -174,11 +180,6 @@ dependencies:
174180
match: llvmPackages_\d+.clang-unwrapped
175181
- path: nix/derivation-bpf.nix
176182
match: llvm_\d+
177-
178-
# TODO: update to the latest clang of debian 12 packages are available.
179-
- name: clang-debian-12
180-
version: 16
181-
refPaths:
182183
- path: hack/pull-security-profiles-operator-verify
183184
match: CLANG_VERSION
184185

hack/install-libelf.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2025 The Kubernetes Authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -euo pipefail
17+
18+
# TODO: remove this script once the debian image (via golang:1.25 or higher) ships
19+
# the fixed libelf version.
20+
#
21+
apt-get install -y \
22+
bzip2 \
23+
m4 \
24+
zlib1g-dev
25+
26+
VERSION=0.193
27+
curl -sSfL --retry 5 --retry-delay 3 \
28+
"https://sourceware.org/elfutils/ftp/$VERSION/elfutils-$VERSION.tar.bz2" -o- |
29+
tar xfj -
30+
31+
DIR="elfutils-$VERSION"
32+
trap 'rm -rf -- "$DIR"' EXIT
33+
34+
pushd "$DIR"
35+
./configure
36+
make install -j8
37+
popd

hack/install-packages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -euo pipefail
55
apt-get update
66
apt-get install -y \
77
libapparmor-dev \
8-
libelf-dev \
98
libseccomp-dev \
109
libzstd-dev
1110

11+
./hack/install-libelf.sh
1212
./hack/install-libbpf.sh

hack/pull-security-profiles-operator-verify

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ set -euo pipefail
33

44
./hack/install-packages
55

6-
CLANG_VERSION=16
7-
apt-get install -y software-properties-common
6+
CLANG_VERSION=18
7+
apt-get install -y lsb-release
88
curl -sSfL --retry 5 --retry-delay 3 https://apt.llvm.org/llvm.sh | bash -s -- $CLANG_VERSION all
99
ln -sf /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format
1010

0 commit comments

Comments
 (0)