3
26
Fork
You've already forked mere
1

init provider abstraction #82

Merged
jhuntwork merged 4 commits from init-provider-abstraction into main 2026年06月09日 17:57:18 +02:00

Abstract away the init system / service management so that mere can snap-in support for init systems beyond s6.

This is the initial work required to support merelinux/recipes#103

Abstract away the init system / service management so that mere can snap-in support for init systems beyond s6. This is the initial work required to support https://codeberg.org/merelinux/recipes/issues/103
Move service command handling behind a provider-neutral services module. The CLI no longer issues s6-rc commands directly for lifecycle, status, listing, or log operations; it delegates to src/services.zig instead.
The current provider remains s6-rc and behavior is intended to stay the same. This creates the runtime boundary needed before adding alternate init providers such as dinit.
Add an active-provider entry point for package-time service artifact generation and move the existing s6-rc source directory writer behind s6-rc-specific function names.
Behavior is unchanged: recipe service blocks still emit s6-rc source directories under usr/share/s6-rc/sources. This makes the package-time provider boundary explicit before adding alternate artifact generators such as dinit.
Add a typed init-provider setting to Mere configuration and route both runtime service commands and package-time service artifact generation through it.
s6-rc remains the default and only implemented provider. dinit is recognized as a provider name, but selecting it now fails explicitly at the provider boundary instead of silently emitting or executing s6-rc behavior.
Also include services.zig in the aggregate test root so service facade tests run with the full suite.
Preserve service provider diagnostics
All checks were successful
/ test (pull_request) Successful in 6m14s
390c20204f
Keep init-provider configuration errors specific as they pass through service management. Service commands now report unsupported configured providers and format config diagnostics instead of collapsing provider and config failures into generic service errors.
Also include the invalid provider value in config diagnostics so mistakes point directly at the setting that needs correction.
jhuntwork deleted branch init-provider-abstraction 2026年06月09日 17:57:34 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
merelinux/mere!82
Reference in a new issue
merelinux/mere
No description provided.
Delete branch "init-provider-abstraction"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?