-
Notifications
You must be signed in to change notification settings - Fork 33
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
standardize path and behavior of ublue-os justfile #41
Comments
I just noticed that Just officially uses the https://just.systems/man/en/chapter_52.html Which is the suffix that everyone else will be using. So we should follow that, like this:
The feature they have implemented in Just is awesome, by the way. It allows people to import as many modular just files as they want. The only issue is that it is still marked as "unstable" and only available if we run just via an extra flag. But that will change sometime soon. :) I am in bed, but will take care of that rename in the startingpoint repo & the standardization discussion's summary post pretty soon, in 10 hours or so. |
The PR for passing unstable as an env var has been open for many many weeks now and I haven't seen any new commits in the just repo for the time I've been tracking it. I'm wondering if it would hurt to |
@EinoHR Yeah I heard about that feature being stalled. But I mean that even though they hide it behind a It's a really nice system btw, being able to include multiple cleanly separated "modules" of just commands. As for aliasing... it's tricky, since people use many different shells which means many different locations to store such an alias. I think just recommending that people manually create that alias is enough. But the simplest for users atm is just merging things ( |
@bsherman For reference, I updated the original comment with the new, official upstream https://github.com/orgs/ublue-os/discussions/149#discussioncomment-5889873 |
I agree with merging until we get the official include feature from |
Uh, scratch that... it did not LOL I'm updating to match the reference. thank you for the alert. @Arcitec @EinoHR does this mean I can implement this now? |
I think i see an addition... This is described as
I think we'd want to override this file in each downstream so they include their appropriate files eg, in
and startingpoint would have something similar. this is the stop gap until or... are we still doing an in Containfile appending of nvidia's extra justfile snippet to |
@bsherman That would be awesome. :) Yes, So config/main is the only area behind.
Yeah I mentioned that in the original comment:
My thought is that we should probably just bother merging main, because in the end, users are gonna be using just's official So anything we make now would be insanely short-lived and not worth the hassle? |
Hmm that's a rough question. Yeah let's make the nvidia image override that shell script for now, to do what you mentioned, where the nvidia image copies main and merges in nvidia. It's just a stopgap until the full |
Yeah, i'm good with this... it's either override the main.justfile or the profile script... and i think the latter is less ugly / clearer about intent for a user trying to read the scripts. And agree, its just the stop gap. |
@bsherman Exactly. Overriding the profile is clearer for intent and also future-proofed for when just has inclusion by default! :) |
Engage hacker mode. |
Good luck, friend! 🥂 |
@Arcitec one correction to your specification...
The rpm DOES use this path, but rpm-ostree puts that file in If files in This is what we see with Anyway, just pointing out I won't be implementing a change for this point and why. |
@bsherman I was referring to this, as you can see it only puts it in
But it seems like those files are being layered via rpm-ostree, which automatically tracks the |
Weird, because it seems different for me.
|
@bsherman Yeah that's strange. The results I listed are what I am getting when I base a |
Is your output from running the image in podman or the rpm-ostree booted image? I think that would explain what you are seeing. |
@bsherman From entering a bash shell in podman to look at the image contents. Yeah it could be something that gets fixed by later processes. :) |
@bsherman Oh yeah you're right. On a Silverblue system that is rebased to |
@bsherman @EinoHR After some discussion on Discord, a good pattern emerged to avoid forks overwriting each other's justfiles randomly: Every image instead has its own separate justfile, which the user can include/merge a-la-carte.
Currently we have these:
The
main
is meant to be the main config, which currently comes from theconfig
repo. Its purpose is to contain the "core" commands.The
custom
is from the startingpoint template repo, which is where the repo maker adds their own. It includes absolutely nothing frommain
and therefore never risks going out of sync with upstreamublue-os/config
.We'll need 4 minor changes in how the main justfile is built:
/usr/share/ublue-os/just/main.justfile
ublue-os-just.sh
needs to use the new justfile path. The purpose of that script is currently to auto-install the justfile on login if the user (even root) doesn't have a~/.justfile
, and it does nothing if the user has the file. So its behavior is already fine. It only needs a tweak to the path. Well, it also uses illegal non-POSIX shell syntax (only works in bash and zsh), so I'll propose a fixed version below./etc/profile.d
on the image which is incorrect. It needs to write itself to/usr/etc/profile.d
, and from there "systemd" will take care of syncing it into the user's real/etc
folder.profile.d
script since we can't know which shell we're running under and therefore can't use bashisms for example... so leaving that off for now.Alright here's the fixed
ublue-os-just.sh
:In time I will probably contribute to the other repos too, but at the moment I am still busy and uncomfortable with the structure of main, config and nvidia. I'm starting to study them though! :)
Originally posted by @Arcitec in ublue-os/base#149 (reply in thread)
The text was updated successfully, but these errors were encountered: