8000 Statelessness: Settle on a uapi / freedesktop "hermetic /usr" compatible statelessness story · Issue #420 · AerynOS/os-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Statelessness: Settle on a uapi / freedesktop "hermetic /usr" compatible statelessness story #420

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

Open
ermo opened this issue Feb 8, 2025 · 0 comments
Labels
priority: must have type: developer experience Will make for a nicer developer experience
Milestone

Comments

@ermo
Copy link
Contributor
ermo commented Feb 8, 2025

Historical context

For context, Ikey has been in the statelessness game at least since the days when he worked on Clear Linux at intel's OSTC.

This definition of statelessness, via Ikey, made its way into Solus, where the de facto standard was to have per-package stateless configuration saved to /usr/share/defaults/<packagename>.

Current state of statelessness

Per the uapi-group configuration files specification and the freedesktop file-hierarchy specification, we may want to consider building a "hermetic /usr" story which is as compatible as we can make it with Ikey's preferred Clear Linux-derived statelessness approach.

Goals and non-goals

The longer term goal is to avoid getting into a situation where our definition of statelessness clashes with the upstream "hermetic /usr" approach, to the point where upstreams refuse to accept patches related to our definition of statelessness, thus forcing us to maintain an unbounded number of downstream patches that have no upstream relevance.

Instead, we may want to make it so that we have a well understood and agreed upon way to integrate upstream "hermetic /usr" compatible packages in our recipes, to the point where we can reliably get statelessness patches accepted upstream, whilst seamlessly benefiting from them in our package recipe maintenance story as a downstream distribution.

Concrete implementation suggestion

One option we have is to keep our current %(vendordir) macro (resolves to /usr/share/defaults) and then also add a %(factorydir) macro, that resolves to e.g. /usr/share/factory/etc (TBD!), for the case where it makes more sense to use a shared, (...)/etc/foo.d/ configuration drop-in layout?

Another option is to consolidate completely and use %(vendordir) = /usr/share/defaults/etc/, which would essentially displace the need for a separate %factorydir macro. Up until a certain point, I think this was actually our previous boulder default.

@ikeycode thoughts?

Context: AerynOS/recipes#597 and #419

Upstream and distro collaboration options

Taking the above one step further, one option that was informally discussed with the nice FHS people on matrix (people from openSUSE and Fedora were present at the time), is to attempt to patch build systems to provide a distconfdir variable next to the existing sysconfdir variable.

In openSUSE, the distconfdir variable apparently already refers to their hermetic-/usr config directory, /usr/etc, hence re-using this variable name would be the path of least resistance for openSUSE.

The idea here is the following:

  • Build systems use the prefix variable and distro packagers then ensure that this reflects in the source code of distributed tarballs (no hardcoding of /usr for instance) -- this is upstreamable already.
  • Build systems gain the distconfdir next to the existing sysconfdir variables via a patchset that can be adopted by distros and then proposed for upstreaming once consensus is reached.

The outcome of this is that distros using the build system patches can now patch packages to support the hermetic-/usr approach of first checking the distconfdir config file in question, and then letting any config files present in sysconfdir override these settings in a way that makes sense for code base in question.

And by making the patches use the distconfdir variable, the hermetic-/usr patches can now be adopted verbatim by other distros, where the only thing that is change is the config-time setting of the distconfdir path used by the distro.

This would ideally lead to the longer term outcome where:

  • All build systems eventually accept the distconfdir patches into their default distribution tarballs
  • All software vendors accept patches that enable them to take advantage of the hermetic-/usr distconfdir + sysconfdir approach
  • All distributions contribute towards the same hermetic-/usr goal, whilst being able to use each others' patches until they become properly upstreamed
@ermo ermo added this to the alpha2 milestone May 9, 2025
@ermo ermo added type: developer experience Will make for a nicer developer experience priority: must have labels May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: must have type: developer experience Will make for a nicer developer experience
Projects
None yet
Development

No branches or pull requests

1 participant
0