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

machine.go: Fix kernel modules open failed by checking builtin modules #36

Closed
wants to merge 1 commit into from

Conversation

fdanis-oss
Copy link

This allows to use debos on Ubuntu (at least)

Signed-off-by: Frédéric Danis [email protected]

@simonschmeisser
Copy link

this seems to work fine on ubuntu 18.04 / neon user edition

machine.go Outdated Show resolved Hide resolved
if mergedUsrSystem() {
usrpath = "/usr/lib/modules"
}
data, err := ioutil.ReadFile(path.Join(usrpath, kernelRelease, "modules.builtin"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On debian systems modules.builtin doesn't exist at least on the 4.19 kernels it does however exist on the 5.3 packaging. So the code should handle that properly (e.g. assume nothing is builtin like its' done now)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In any case, we’re unconditionally copying modules.builtin below, so the case when it doesn’t exist has already not been covered.

This allows to use debos on Ubuntu (at least)

Signed-off-by: Frédéric Danis <[email protected]>
andrewshadura added a commit to andrewshadura/fakemachine that referenced this pull request Feb 28, 2020
Several distributions (including Ubuntu) ship some of the modules we
rely on compiled into the kernel. Since these modules are listed in
modules.builtin, it’s very easy to detect and skip them.

This change fixes go-debos#13 and supersedes go-debos#36.

Signed-off-by: Andrej Shadura <[email protected]>
andrewshadura added a commit to andrewshadura/fakemachine that referenced this pull request Feb 28, 2020
Several distributions (including Ubuntu) ship some of the modules we
rely on compiled into the kernel. Since these modules are listed in
modules.builtin, it’s very easy to detect and skip them.

This change fixes go-debos#13 and supersedes go-debos#36.

Signed-off-by: Andrej Shadura <[email protected]>
sjoerdsimons pushed a commit that referenced this pull request May 27, 2020
Several distributions (including Ubuntu) ship some of the modules we
rely on compiled into the kernel. Since these modules are listed in
modules.builtin, it’s very easy to detect and skip them.

This change fixes #13 and supersedes #36.

Signed-off-by: Andrej Shadura <[email protected]>
@obbardc
Copy link
Member

obbardc commented Oct 14, 2020

Reworked and merged in #47, hence closing :-)

@obbardc obbardc closed this Oct 14, 2020
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.

6 participants