Replies: 6 comments 25 replies
-
I think most of this adjusting |
Beta Was this translation helpful? Give feedback.
-
Good idea, I was looking for smth like this in the unix/linux/xdg standard when thinking of moving Collecting different paths/files I think should be in the directory.Edit: I had previously left out
|
Beta Was this translation helpful? Give feedback.
-
@EinoHR Another issue: I discovered that I propose that we also move the yafti config for startingpoint where it belongs, to |
Beta Was this translation helpful? Give feedback.
-
@EinoHR Pull request is ready, since there haven't been any interjections so far. Everyone seems to go "yep, that's a nice location", so let's just do it and not bikeshed too much more. It's a great location. Here's the first pull request. |
Beta Was this translation helpful? Give feedback.
-
FYI for all config's udev-rules and update-services should be compliant with this proposal: |
Beta Was this translation helpful? Give feedback.
-
With the merge of ublue-os/config#42 I'd say this discussion has been fully actioned. |
Beta Was this translation helpful? Give feedback.
-
We currently have a bit of a mess, with components placing their files wherever they want. There's a need for a standardized location where all ublue components can safely and cleanly dump their necessary files.
Some examples of our component data would be things like immutable config files, templates, artwork/images, and potentially even binaries (for any components that shouldn't pollute places like
/usr/bin/
). We need to unify it all in one location.Need for immutability
The location we choose must be immutable, to avoid issues during OS upgrades (for example, user-modified files or configs in
/var
or/etc
would not be upgraded).As such,
/usr/share/ublue-os
would be a great location, and there's already precedent for using it.Need for sub-project namespaces
To avoid components stepping on each other, especially if they contain many files (or if they grow to multiple files in the future), we should definitely have sub-project folders. That way everyone can work on component projects without worrying about overwriting other component files by accident.
Avoiding repetition
Many of our components have "ublue" in the official name, which gives us very clunky paths. I think that we should avoid that in the sub-project folders.
Proposal
Here's an idea for a structure:
So for our current needs, with the "update service", the startingpoint's "first boot" files (desktop-file and yafti config), our global "just" config, and the startingpoint recipe, it would look like this:
Important: You may notice that recipe.yml isn't in a folder. This is just a suggestion, since it's the "overall recipe" used for the whole OS, so it doesn't really need a sub-folder, and since it's something that people may want to look at, it sits really neatly in
/usr/share/ublue-os/recipe.yml
in my opinion. What are your thoughts on that exception?Regarding "loose" config files and upstream configs that lack standardization: We should have one sub-directory for each upstream project, such as
/just/
in the example above. I thought about having a specific sub-directory where we combine all loose configs, but after more consideration, let's not do/usr/share/ublue-os/configs/custom.just
, since that re-introduces the old issue we had where components could accidentally overwrite each other's files. And certain components can contain a lot of small config files, which would quickly make a universal "configs" sub-directory very messy. Upstream projects can also grow over time, requiring more and more little files, which should all live in separate per-upstream folders to be safer. So let's instead do something like the proposed/<upstream project>/
sub-directories, such as/usr/share/ublue-os/just/*
in this example. I can also easily imagine that ublue and downstream images will be adding a lot of configs over time, so we definitely need to sort this out and serve as a good example for the rest of the ublue community. Putting anything directly in/ublue-os/
rather than a sub-folder would be a very bad example to the downstream OCI images and would encourage bad habits.Why not a
/usr/share/ublue-os/configs/
directory?: It was discussed, but having a/configs/
directory instead of specific per-project folders such as/just/
could confuse ublue contributors and downstream users over time and make new contributors start to use that directory for our own configs (our own components), which shouldn't be the purpose. So let's not do that... Because if there's a/usr/share/ublue-os/configs/
directory, we could start getting the feeling that "that's where all ublue configs go". It creates the opposite "that doesn't feel right", where we'll have a bunch of native ublue components that don't use that directory, and a bunch of loose upstream components that use it. It'll be very confusing. That's why it makes more sense to separate/<upstream project name>/
folders for each individual upstream project config.Examples of avoiding name-repetition
Compare the clarity and readability of the following paths:
/usr/share/ublue-os/ublue-os-update-services
/usr/share/ublue-os/update-services
It's already clear that the sub-folders belong to ublue without repeating it twice. Even if it's part of the sub-project's official name, it would still be overkill in the system folder hierarchy, and would require extra typing/
<tab>
-completion in the shell.Therefore, it makes sense to enforce a strict "don't repeat yourself" policy for the sub-folders.
What to do with justfiles
It was discovered that various uBlue projects were overwriting each other's justfiles. For that reason, it was decided that each justfile should have its own prefix. At the moment, we have the following justfiles:
The "main" file comes from
ublue-os/main
and the "custom" file is from theublue-os/startingpoint
template. Other projects and downstream images should follow the same pattern for their own justfiles.Note that all justfiles must end in
.just
, which is the official "upstream" naming pattern. Just officially uses the<something>.just
suffix for all include-files:https://just.systems/man/en/chapter_52.html
What to do when the files are intended for another, upstream project
/usr/share/ublue-os/<project name>/
hierarchy. Thejustfile
template is included in the example hierarchy diagram above, for that reason, since they don't have any upstream storage location. (Furthermore, "just" is working on being able to use "include" statements, and then it'll be nice to simply be able to~/.justfile: include /usr/share/ublue-os/just/custom.just
for users who want our config.That way we'll have a super clean, reliable, maintainable and non-confusing system.
Let's discuss!
Looking forward to hearing your thoughts and ideas!
Beta Was this translation helpful? Give feedback.
All reactions