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

common: Split up socket setup from flatpak-run into multiple files #5411

Merged
merged 1 commit into from May 15, 2023

Conversation

smcv
Copy link
Collaborator

@smcv smcv commented May 15, 2023

flatpak-run is large enough to be getting unwieldy, so separate it out into various smaller modules.

A side benefit of these is that they'll be easier to reuse in other projects, like Steam's pressure-vessel tool.

flatpak-run is large enough to be getting unwieldy, so separate it out
into various smaller modules.

A side benefit of these is that they'll be easier to reuse in other
projects, like Steam's pressure-vessel tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
@smcv smcv marked this pull request as ready for review May 15, 2023 18:54
@smcv smcv merged commit db7a8bb into flatpak:main May 15, 2023
9 checks passed
@Erick555
Copy link
Contributor

Erick555 commented May 17, 2023

The downside is if you want to understand what flatpak-run does then you need to inspect several files instead of one.

@smcv
Copy link
Collaborator Author

smcv commented May 17, 2023

The downside is if you want to understand what flatpak-run does then you need to inspect several files instead of one.

That's already the case: flatpak-run is high-level functionality that has tentacles in most of Flatpak, including bwrap, context, exports, and even dir (because it needs to be able to find deployments and extensions).

@Erick555
Copy link
Contributor

Yeah although I specifically meant how sandbox is created (which system sockets, paths, etc. are mounted). Previously all of those were in flatpak-run.c. Now some were put in flatpak-run-sockets.c but others have dedicated files like flatpak-run-cups.c and so on (after brief look I don't know what rules for split-it-or-not were).

@TingPing
Copy link
Member

Everybody will have a different taste. I like not having flatpak-run.c be a behemoth and find the split pretty logical. I also expect peoples editors to jump to/search for a function wherever it is anyway.

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.

None yet

3 participants