Skip to content

Commit 606d024

Browse files
authored
falco: Adds jammy packages in the building stages (#16)
We're currently building rocks using LXD, meaning that they LXDs will share the host's kernel. In the GitHub action, we're building on ubuntu 22.04 nodes. In the falco and falco-driver-loader rocks, we have set the base rocks to ubuntu 24.04. The building LXD container will have the 24.04 apt package repositories, though we're going to need 22.04's repositories in order to install the right linux-headers, linux-tools, and linux-cloud-tools (based on uname -r). Otherwise, falco will fail to build.
1 parent 2419b9b commit 606d024

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

falco-driver-loader/0.38.2/rockcraft.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ parts:
9595
# build idempotency, so we can build locally *and* in the CI.
9696
# linux-tools and linux-cloud-tools are required for building BPF (for x86_64).
9797
if [ "$(uname -m)" == "x86_64" ]; then
98+
# In the GitHub action, we're using ubuntu 22.04 nodes, and LXD containers share its
99+
# kernel. Due to the build-base set above, we don't have jammy's apt repositories set
100+
# in the LXD container, and we need them to install the requirements below.
101+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list
102+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list
103+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list
104+
echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list
105+
apt update
106+
98107
apt install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-cloud-tools-$(uname -r)
99108
else
100109
apt install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-cloud-tools

falco-driver-loader/0.39.0/rockcraft.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ parts:
9595
# build idempotency, so we can build locally *and* in the CI.
9696
# linux-tools and linux-cloud-tools are required for building BPF (for x86_64).
9797
if [ "$(uname -m)" == "x86_64" ]; then
98+
# In the GitHub action, we're using ubuntu 22.04 nodes, and LXD containers share its
99+
# kernel. Due to the build-base set above, we don't have jammy's apt repositories set
100+
# in the LXD container, and we need them to install the requirements below.
101+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list
102+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list
103+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list
104+
echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list
105+
apt update
106+
98107
apt install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-cloud-tools-$(uname -r)
99108
else
100109
apt install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-cloud-tools

falco/0.38.2/rockcraft.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ parts:
9292
# build idempotency, so we can build locally *and* in the CI.
9393
# linux-tools and linux-cloud-tools are required for building BPF (for x86_64).
9494
if [ "$(uname -m)" == "x86_64" ]; then
95+
# In the GitHub action, we're using ubuntu 22.04 nodes, and LXD containers share its
96+
# kernel. Due to the build-base set above, we don't have jammy's apt repositories set
97+
# in the LXD container, and we need them to install the requirements below.
98+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list
99+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list
100+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list
101+
echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list
102+
apt update
103+
95104
apt install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-cloud-tools-$(uname -r)
96105
else
97106
apt install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-cloud-tools

falco/0.39.0/rockcraft.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ parts:
9292
# build idempotency, so we can build locally *and* in the CI.
9393
# linux-tools and linux-cloud-tools are required for building BPF (for x86_64).
9494
if [ "$(uname -m)" == "x86_64" ]; then
95+
# In the GitHub action, we're using ubuntu 22.04 nodes, and LXD containers share its
96+
# kernel. Due to the build-base set above, we don't have jammy's apt repositories set
97+
# in the LXD container, and we need them to install the requirements below.
98+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list
99+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list
100+
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list
101+
echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list
102+
apt update
103+
95104
apt install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-cloud-tools-$(uname -r)
96105
else
97106
apt install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-cloud-tools

0 commit comments

Comments
 (0)