Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Kernel Build System (Debian 11) #475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support Kernel Build System (Debian 11) #475

wants to merge 1 commit into from

Conversation

kvaps
Copy link
Member

@kvaps kvaps commented May 23, 2023

Debian 11 installs the linux-kbuild as dependency to kernel-headers package.

The tools and Makefile from it are used directly by entry.sh script of kernel-module-injector

The problem is that most of files from this package are located under /usr/lib directory which we can't directly passtrough into container, because bash and other libs inside the container are using them.

We can't also passtrough the /usr/lib/linux-kbuild-5.10 directory as the name is unpredictable for it and depending only on kernel version.

Solution: pass it trough under /host/usr/lib directory and setup symlinks for non-existing paths into /usr/lib of the container

@kvaps kvaps requested a review from WanzenBug May 23, 2023 11:11
@WanzenBug
Copy link
Member

Just last week we added linux-kbuild-* in the debian containers: piraeusdatastore/piraeus#145

From my tests this seems to be enough to fix building with the existing Operator on Debian.

@kvaps
Copy link
Member Author

kvaps commented May 24, 2023

Okay then this PR is up for consideration

I was just thinking if there are no other cases like that, when kernel-headers demands on anything from /usr/lib?
If not, we can limit pattern to symlink only them /usr/lib/linux-kbuild-*

Another question: Is it correct way to install linux-kbuild-* from debian and ship it with the docker image? What if Ubuntu will go the same way by separating kbuild files from kernel-headers, then we will use debian tools to compile ubuntu's kernel-headers, can we be sure that it will work in that way?

@WanzenBug
Copy link
Member

I was just thinking if there are no other cases like that, when kernel-headers demands on anything from /usr/lib?

For now, Debian seem to be the only ones doing this micro-packaging, in all other cases /usr/src and /lib/modules was enough

Another question: Is it correct way to install linux-kbuild-* from debian and ship it with the docker image?

If we use the debian image to build, we need to have the debian linux-kbuild-* tools. The tools depend on shared libraries, and those need to be available in the container.

If Ubuntu decided they also want to do this split with linux-kbuild-*, and we would link those from the host, I think this would break. Because the tools try to load some shared libraries that don't exist in a Debian container. Luckily, if Ubuntu switches, we would use our Ubuntu containers in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants