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

launcher: allow searching for system-services in /etc/ and /run/ #378

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

bluca
Copy link
Contributor

@bluca bluca commented Sep 13, 2024

This is useful when an asset manager wants to install a system service while /usr/ is read-only (e.g.: local system services running on a different namespaced image)

spec and dbus-daemon corresponding change: https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/467

@dvdhrm
Copy link
Member

dvdhrm commented Sep 17, 2024

Thanks! No objections from me!

Any consensus on whether to enable inotify-watches on the entry? And whether to enforce well-defined file-names for service entries there? I can wait merging these until they the discussion is settled. Personally, I agree with Smcv and we should not provide inotify-watches, but enforce well-defined file-names.

@bluca
Copy link
Contributor Author

bluca commented Sep 17, 2024

Yeah I am fine with not doing inotify and with strict enforcement, already updated as such in dbus-daemon, I'll check later how to do the same here and will update the PR accordingly. Thanks!

@dvdhrm
Copy link
Member

dvdhrm commented Sep 17, 2024

We enforce strict names on the system bus for security reasons, but warn only on the user bus.

I think we unconditionally watch all service dirs, though. I think the reasoning was to be consistent, not entirely sure TBH.

So I think the patch is fine as is.

This is useful when an asset manager wants to install a system
service while /usr/ is read-only (e.g.: local system services
running on a different namespaced image). dbus-daemon also will
search in /run/, so do the same for consistency, for ephemeral
services.

For the spec changes see:

https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/467

Signed-off-by: Luca Boccassi <[email protected]>
@bluca bluca changed the title launcher: allow searching for system-services in /etc/ launcher: allow searching for system-services in /etc/ and /run/ Oct 3, 2024
@bluca
Copy link
Contributor Author

bluca commented Oct 3, 2024

Ok no problem, I'll leave as-is then. We are adding /run/ as well in dbus-daemon, so added here as well.

@bluca
Copy link
Contributor Author

bluca commented Oct 3, 2024

https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/467

The dbus-daemon and spec side was merged just now

@dvdhrm
Copy link
Member

dvdhrm commented Oct 3, 2024

/etc is higher priority than /run?

@bluca
Copy link
Contributor Author

bluca commented Oct 3, 2024

yes that's the case in systemd and everywhere else that uses this pattern - it is weird yes, but too ingrained to change now

@dvdhrm dvdhrm merged commit be28751 into bus1:main Oct 3, 2024
37 checks passed
@dvdhrm
Copy link
Member

dvdhrm commented Oct 3, 2024

Thanks a lot!

Weird, I never noticed that /run isn't highest priority. So it is just a matter of time until we introduce /run/etc? :)

@bluca bluca deleted the etc branch October 3, 2024 16:20
@bluca
Copy link
Contributor Author

bluca commented Oct 3, 2024

...or /etc/run/ !!

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.

2 participants