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

build_sysext destroys potentially important files #1298

Closed
jhaprins opened this issue Dec 18, 2023 · 2 comments
Closed

build_sysext destroys potentially important files #1298

jhaprins opened this issue Dec 18, 2023 · 2 comments
Labels
kind/bug Something isn't working kind/invalid This doesn't seem right

Comments

@jhaprins
Copy link

Description

When running build_sysext to create a sysext image for Flatcar, from line 190 on everything that is not in the /usr folder is deleted. This could potentially be, but not only:

  • Important udev files
  • Important configuration files

It would be better to move everything that is now deleted, either into a folder that is packed into the sysext image so it can be put in place when the sysext image is mounted, or it should be put into a tar ball that can then be used to create the configation of the system.

Impact

Things might simply not work because important information is missing.

Environment and steps to reproduce

  1. Set-up: Flatcar
  2. Task: build_sysext in the sdk.
  3. Action(s): Follow the documentation to create a sysext image for any given package and check the content. A nice example is zfs with zfs-kmod. This includes a configuration tree and udev files and everything is lost during the build.
  4. Error: zfs was not working on the end system.

Expected behavior

Important files need to be available, either in the documentation directory in the sysext image or in a seperate tar ball deliverd with the sysext image. Even better would be if it is put in place by the sysext image on installation.

Additional information

Please add any information here that does not fit the above format.

@jhaprins jhaprins added the kind/bug Something isn't working label Dec 18, 2023
@t-lo
Copy link
Member

t-lo commented Dec 18, 2023

The main use case of build_sysext is to build OS dependent sysexts (like docker, vendor tools, kmods etc). Contrary to user-supplied sysexts, these need careful integration with the base OS. build_sysext is not meant to be a generic packaging tool; ebuilds built into sysexts with this tool will always need some adoption.

For instance, Flatcar populates /etc at provisioning time, so there needs to be a custom mechanism to account for this. This is what the mangle scripts are for. (For example, here's the script for the containerd sysext: https://github.com/flatcar/scripts/blob/main/build_library/sysext_mangle_containerd-flatcar). This is the right place to align whatever the sysext packages produce with the specifics of Flatcar.

The mechanism provided by mangle scripts make it easy to use stock Gentoo ebuilds (to benefit from upstream version updates etc) and to align the sysexts to Flatcar specifics at the same time.

@t-lo t-lo added the kind/invalid This doesn't seem right label Dec 18, 2023
@t-lo
Copy link
Member

t-lo commented Dec 18, 2023

Closing as "works as intended", though I absolutely agree we need to further improve the sysext developer experience of the SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working kind/invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants