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

deploy: Support an empty /etc and populated /usr/etc #2958

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

cgwalters
Copy link
Member

In preparation for support for a transient /etc: #2868
particularly in combination with composefs.

Basically it's just much more elegant if we can directly mount an overlayfs on the empty etc directory, using usr/etc as the lower.

In the composefs case, we'd have to mount the composefs overlayfs itself writable (and call mkdir) just so we can make that empty etc directory which is ugly.

In preparation for support for a transient `/etc`:
ostreedev#2868
particularly in combination with composefs.

Basically it's just much more elegant if we can directly mount
an overlayfs on the *empty* `etc` directory, using `usr/etc` as
the lower.

In the composefs case, we'd have to mount the composefs overlayfs
itself writable (and call `mkdir`) *just* so we can make that
empty `etc` directory which is ugly.
@cgwalters cgwalters mentioned this pull request Aug 4, 2023
Copy link
Collaborator

@ericcurtin ericcurtin left a comment

Choose a reason for hiding this comment

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

LGTM

@ericcurtin ericcurtin merged commit c57c005 into ostreedev:main Aug 5, 2023
20 checks passed
@alexlarsson
Copy link
Member

For the record, we always add an /etc to the composefs image, so this is not needed in the ostree commit for composefs + transient-etc to work.

See ostree_repo_checkout_composefs() which has:

  char *root_dirs[] = { "usr", "etc", "boot", "var", "sysroot" };

  /* To work as a rootfs we need some root directories to use as bind-mounts */
  for (i = 0; i < G_N_ELEMENTS (root_dirs); i++)

@alexlarsson alexlarsson mentioned this pull request Aug 8, 2023
@cgwalters
Copy link
Member Author

@alexlarsson
I didn't understand that code at all and I meant to circle back to it.

I find it confusing to have these hardcoded directories. Why don't we just require them to be in the ostree commit as we were doing before?

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.

3 participants