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

Move content in /opt to /usr/lib/opt as part of ostree container commit if state overlays enabled #573

Closed
jlebon opened this issue Dec 14, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@jlebon
Copy link
Member

jlebon commented Dec 14, 2023

As part of ostreedev/ostree#3120 and coreos/rpm-ostree#4728, packages which install to /opt are converted to /usr/lib/opt/ by the importer. To mesh with this, imported container images need to also do this translation. It can know if a system is configured for state overlays on /opt by checking if /usr/lib/systemd/system/local-fs.target.requires/ostree-state-overlay@usr-lib-opt.service is defined.

(Or alternatively, the code can automatically enables this service if it detects content in /opt. That way, users can leverage this stuff before the base image compose actually enables the opt-usrlocal-overlay knob).

@cgwalters
Copy link
Member

Or alternatively, the code can automatically enables this service if it detects content in /opt.

That would conflict though with the existing logic in 495988e

@cgwalters cgwalters added the enhancement New feature or request label Dec 14, 2023
@cgwalters
Copy link
Member

Querying systemd units while fetching, or when deploying an image feels...a bit icky. A layering violation in a way.

I would perhaps lean a bit towards doing this as part of RUN ostree container commit - i.e. the container content is fixed up at build time, not client side.

@jlebon
Copy link
Member Author

jlebon commented Jan 18, 2024

I would perhaps lean a bit towards doing this as part of RUN ostree container commit - i.e. the container content is fixed up at build time, not client side.

Sounds good to me. I guess if we start assuming this in the future (because it's just always on in the base compose), we could move it to the tar processing step. At that point, it'd purely a mechanical move, just like the /var to /usr/share/factory/var move.

@jlebon jlebon changed the title Move content in /opt to /usr/lib/opt when importing container image if state overlays enabled Move content in /opt to /usr/lib/opt as part of ostree container commit if state overlays enabled Jan 18, 2024
@jlebon
Copy link
Member Author

jlebon commented Mar 1, 2024

Obsoleted by #607 (comment). We don't need to move the content to /usr/lib/opt if we don't care about the non-composefs case.

@jlebon jlebon closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants