Skip to content

daemon: move getUnprivilegedMountFlags to internal package#47567

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:move_rootless_mountopts
Mar 15, 2024
Merged

daemon: move getUnprivilegedMountFlags to internal package#47567
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:move_rootless_mountopts

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Mar 15, 2024

This code is currently only used in the daemon, but is also needed in other places. We should consider moving this code to github.com/moby/sys, so that BuildKit can also use the same implementation instead of maintaining a fork; moving it to internal allows us to reuse this code inside the repository, but does not allow external consumers to depend on it (which we don't want as it's not a permanent location).

As our code only uses this in linux files, I did not add a stub for other platforms (but we may decide to do that in the moby/sys repository).

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

This code is currently only used in the daemon, but is also needed in other
places. We should consider moving this code to github.com/moby/sys, so that
BuildKit can also use the same implementation instead of maintaining a fork;
moving it to internal allows us to reuse this code inside the repository, but
does not allow external consumers to depend on it (which we don't want as
it's not a permanent location).

As our code only uses this in linux files, I did not add a stub for other
platforms (but we may decide to do that in the moby/sys repository).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added status/2-code-review area/rootless Rootless Mode kind/refactor PR's that refactor, or clean-up code labels Mar 15, 2024
@thaJeztah thaJeztah added this to the 26.0.0 milestone Mar 15, 2024
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@thaJeztah
Copy link
Member Author

cc @vvoland ptal

@thaJeztah thaJeztah merged commit 979f03f into moby:master Mar 15, 2024
@thaJeztah thaJeztah deleted the move_rootless_mountopts branch March 15, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/rootless Rootless Mode kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants