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

sysroot: Handle ro /boot but rw /sysroot #2261

Merged
merged 3 commits into from
Jan 11, 2021

Commits on Jan 10, 2021

  1. main: Unconditionally set up mount namespace

    I was being very conservative initially here, but I think it's
    really safe to just unconditionally set up the mount namespace.
    
    This avoids having to check twice for a read-only `/sysroot`
    (once in the binary and once in the library).
    cgwalters committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    10556a9 View commit details
    Browse the repository at this point in the history
  2. sysroot: Also maintain canonical boot_fd

    Just like we hold a fd for `/sysroot`, also do so for `/boot`
    instead of opening and closing it in a few places.
    
    This is a preparatory cleanup for further work.
    cgwalters committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    a1c0cff View commit details
    Browse the repository at this point in the history
  3. sysroot: Handle ro /boot but rw /sysroot

    The recent change in coreos/fedora-coreos-config#659
    broke some of our tests that do `mount -o remount,rw /sysroot` but
    leave `/boot` read-only.
    
    We had code for having `/boot` read-only before `/sysroot` but
    in practice we had a file descriptor for `/sysroot` that we opened
    before the remount that would happen later on.
    
    Clean things up here so that in the library, we also remount
    `/boot` at the same time we remount `/sysroot` if either are readonly.
    
    Delete the legacy code for remounting `/boot` rw if we're not in
    a mount namespace.  I am fairly confident most users are either
    using the `ostree` CLI, or they're using the mount namespace.
    cgwalters committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    9a526bb View commit details
    Browse the repository at this point in the history