Yeah luckily we can clean the clutter

Yeah... luckily we can clean the clutter later
163 Replies
bsherman
bsherman9mo ago
maybe we thread this for discussion I'll restate in a better way than my emotional 😭 earlier.
bsherman
bsherman9mo ago
GitHub
Proposal: reduce the scope of ublue-os/main images · Issue #369 · u...
Summary Revise scope of Universal Blue Main Images such that kmods (and associated kernel packages) are no longer included. Description The purpose of this change is to streamline build processes(c...
bsherman
bsherman9mo ago
So I want to put together a set of of PRs in main, asus, surface, bazzite, and bluefin which demonstrate this scenario This is @EyeCantCU's first draft of main https://github.com/ublue-os/main/pull/375 I'll probably drop a distinct PR to demonstrate my thoughts better... I appreciate the work on this PR, but I am most concerned about future maintenance... so, seems we should have a "legacy" and "normal" path that's a little easier to follow., so I'll probably branch from this branch for my PR, because I'll build on this work.
EyeCantCU
EyeCantCU9mo ago
Sorry. I've been wanting to give this a proper response but we're about to leave for the next day and a half or so. If we changed the implementation a little bit (prevented tagged PR images from being used outside the org so that things proceed as normal), I think it would be awesome to do The limitation I ran into here was that as soon as someone from an external repo opened a PR, it fell apart for a couple reasons that I'm going to have a hard time explaining here We can jump into tty or something later tomorrow and maybe even today if I have any time Real quick, while I can, the cosign pairs have to match and the user also needs to be a part of that repo if I'm not mistaken. Meaning an outside PR from a different repo, will refuse to push to the tag Again sorry Two different things being discussed here Disregard all that ^ lmao
bsherman
bsherman9mo ago
i think this was all meant for the other thread 😉
EyeCantCU
EyeCantCU8mo ago
@bsherman figured I'd necro this since F39 is due soon (release got pushed back a little). Just want to clarify what a legacy and normal path looks like to you. Do we split the Containerfiles away, removing all legacy stuff from the new stuff, then adapt the build workflow?
bsherman
bsherman8mo ago
appreciate the necro the last week got really busy i'm working on that PR now
EyeCantCU
EyeCantCU8mo ago
Awesome!
bsherman
bsherman8mo ago
I'm almost done... Containerfile/scripts are finishing testing now... will just need to tweak the workflow do you want me to make a distinct PR or just update yours?
EyeCantCU
EyeCantCU8mo ago
Either way would work for me. Whatever is easier for you
bsherman
bsherman8mo ago
well, i'd prefer fewer PRs for less confusion, otherwise i don't care see what I did here if interested: https://github.com/ublue-os/main/pull/375/files I have NOT updated workflows/build.xml yet... doing that now
EyeCantCU
EyeCantCU8mo ago
I'll have a look 🙂 This is much cleaner and much more straight to the point. Less confusing as well
bsherman
bsherman8mo ago
thank you it is working better than I had feared, too, which is good
EyeCantCU
EyeCantCU8mo ago
That's awesome. Setting up CI shouldn't be too bad
bsherman
bsherman8mo ago
almost ready to push again yeah, the main issue will be adding logic to the downstream repos Dunno if you saw, but I did add some improvements to the README for akmods repo https://github.com/ublue-os/akmods#how-its-organized
EyeCantCU
EyeCantCU8mo ago
Yeah. I'm going to need to investigate more of what that's going to take. I'll have a look
bsherman
bsherman8mo ago
well we're going to have 2 resulting artifacts from this push... I'm getting rid of *-nokmods and instead... all *-main images will be nokmods by default... but on F37/F38 there will also *-kmods
EyeCantCU
EyeCantCU8mo ago
Took my medicine on an empty stomach and it just hit hard. One sec. Brb
bsherman
bsherman8mo ago
so... the *-nvidia images... to keep current behaviors the same... will need to build from *-kmods for F37/F38 but *-main for F39 and forward... but asus and surface already build from *-nokmods so they just need to switch to *-main since those will always be "nokmods" Bazzite and Bluefin are more complicated becasue they build from main/nvidia/asus/surface repos.
EyeCantCU
EyeCantCU8mo ago
This sounds great to me
bsherman
bsherman8mo ago
ugh i just re-read our proposal this approach conflicts with the proposal
EyeCantCU
EyeCantCU8mo ago
Ackk
bsherman
bsherman8mo ago
adding that timeline concession really made this hard 😦
EyeCantCU
EyeCantCU8mo ago
Yeah. I was hoping to knock this out earlier but I've been busy as well
bsherman
bsherman8mo ago
ok, i'm going to think on the matrix a bit more but WITH the proposal up on my screen
EyeCantCU
EyeCantCU8mo ago
Sounds good. I'll get things pulled up as well and assess what this should look like
bsherman
bsherman8mo ago
ok, just pushed again i THINK this will work per the proposal
EyeCantCU
EyeCantCU8mo ago
Awesome. I'll have a look
bsherman
bsherman8mo ago
hmm i think the logic works, but maybe it all needs to be renamed to be more obvious i was trying to be clever calling the build targets "main" and "legacy" but... maybe it should just be "nokmods" "kmods" on the build targets or something i'm watching builds and thinking "does this make sense"? https://github.com/ublue-os/main/actions/runs/6498273671
EyeCantCU
EyeCantCU8mo ago
I think kmods and nokmods suits it better
bsherman
bsherman8mo ago
my GOAL with "main/legacy" was to make it clear to future selves that "legacy" is going away or to other readers of the code maybe instead of legacy call it "deprecated" 😄
EyeCantCU
EyeCantCU8mo ago
We could document that elsewhere, but I can see how that's also helpful deprecated makes it sound like we don't support it haha
bsherman
bsherman8mo ago
we don't that's the whole point deprecated literrally means "this will go away in the future, you probably don't want to use" i mean, not dictionary definition, but that's the idea in software
EyeCantCU
EyeCantCU8mo ago
That's fair
bsherman
bsherman8mo ago
this current build IS doing what we said we'd do, though
EyeCantCU
EyeCantCU8mo ago
Looks great to me personally
bsherman
bsherman8mo ago
so... i'm fine with renaming stuff to be more "this is what it is" and less "legacy/deprecated" and just keep comments all over WARNING people i think it may help
EyeCantCU
EyeCantCU8mo ago
I agree The only thing I'm not excited about is the "messy" bit in ci
bsherman
bsherman8mo ago
eg, i'll probalby make the Containerfile build targets nokmods and kmods and rename the "legacy-*" stuff in filesystem to "kmods-*" and then in the build.xml our targets will be nokmods and kmods and that'll show in the build job list ... but i'll keep the same logic to name the images approriately
EyeCantCU
EyeCantCU8mo ago
Fantastic Then in NVIDIA, that'll need work for differentiating between 39 > and < images since the logic won't be quite the same
bsherman
bsherman8mo ago
yep this is the hard part about keeping F38 "kmod" images around 😦
EyeCantCU
EyeCantCU8mo ago
Luckily it's only 7 more months 37 can be turned off next month entirely
bsherman
bsherman8mo ago
wait what! why does our "main" kmods install kernel-devel and kernel-tools?
EyeCantCU
EyeCantCU8mo ago
I have no idea lol
EyeCantCU
EyeCantCU8mo ago
"The kernel-devel package is important for building out-of-tree modules and has a chance of failing to install on an update if layered. Having this package in the base image will ensure that downstream images and users don't get this update issue."
bsherman
bsherman8mo ago
so that's probably why it moved to the install script where we isolate kmods because we explcitly CANNOT have it in a "nokmods" build as it breaks custom kernels
EyeCantCU
EyeCantCU8mo ago
That's what I figure as well I wonder if this chance of failing to update is just due to a kenrel version mismatch though and whether or not it is actually worth including
EyeCantCU
EyeCantCU8mo ago
GitHub
feat: add kernel-tools by Arcitec · Pull Request #208 · ublue-os/ma...
"This package contains the tools/ directory from the kernel source and the supporting documentation." Helps people debug the kernel and control CPU power states, etc. Only 290kb. Cl...
bsherman
bsherman8mo ago
hmm. i wonder if kernel-tools pulls in kernel-devel lets revisit that question later
EyeCantCU
EyeCantCU8mo ago
I wouldn't be suprised
bsherman
bsherman8mo ago
unless you want to test
EyeCantCU
EyeCantCU8mo ago
I'll pull the spec up
bsherman
bsherman8mo ago
should be a quick check in a fresh distrobox or container
EyeCantCU
EyeCantCU8mo ago
I'll go look Although the spec doesn't list it: https://src.fedoraproject.org/rpms/kernel-tools/blob/rawhide/f/kernel-tools.spec A dep could pull it in
bsherman
bsherman8mo ago
hah, cool looks lsafe i think that should be in packages.json, but not kernel-devel-matched
EyeCantCU
EyeCantCU8mo ago
Yeah, just tested in a container. Doesn't get pulled in
bsherman
bsherman8mo ago
ok, pushed the renames... and this does look like it is a bit more obvious: https://github.com/ublue-os/main/actions/runs/6498632895 for 39, there are ONLY "nokmods" builds and the images are getting named properly
EyeCantCU
EyeCantCU8mo ago
I like this a lot! Awesome work. Stuff looks great
bsherman
bsherman8mo ago
i guess we need to update the website too i liked just having a useful README
EyeCantCU
EyeCantCU8mo ago
Yeah, the site will need an update to reflect the change. Not good with docs If you look at anything I have on GitHub for docs, it's nothing special
bsherman
bsherman8mo ago
Dunno if you saw, but I did add some improvements to the README for akmods repo https://github.com/ublue-os/akmods#how-its-organized
EyeCantCU
EyeCantCU8mo ago
Saw this earlier and I think it looks great
bsherman
bsherman8mo ago
😄 so... we can't merge this main PR until nvidia, asus, and surface also have PRs staged... and probably bluefin/bazzite, too
EyeCantCU
EyeCantCU8mo ago
Except a couple things. ASUS and Surface 37 don't exist/aren't currently built for akmods either and surface-470 doesn't exist as all Surface devices have a recent enough NVIDIA GPU to use the latest driver
bsherman
bsherman8mo ago
or can we? since we didn't change F38, and F39 is already a "best effort pre-release"? oh, by all means please fix the akmods workflow or README if somethings wrong there
EyeCantCU
EyeCantCU8mo ago
It would be easier to work with right now knowing builds downstream succeed rather than making a shot in the dark so I think we should merge now but I'd like another opinion Will do
bsherman
bsherman8mo ago
yeah, this is the upside to following akdev's suggestion and NOT changing F38/F37... it may be some headache to maintain for 7-8 months, but... it's easier to merge and make changes
EyeCantCU
EyeCantCU8mo ago
Definitely
bsherman
bsherman8mo ago
btw, I saw that I'm the one who moved kernel-devel and kernel-tools from packages.json to shell script in this https://github.com/ublue-os/main/commit/fa5d9c4007a01502225bde6e271fc81f4351657f so I've just pushed a related change in this current PR i think it fits now that kmods aren't in all images
EyeCantCU
EyeCantCU8mo ago
Sounds good to me. I think it fits the scope as well
bsherman
bsherman8mo ago
nice, i'm feeling good about the PR now not sure if i want to do nvidia or website next 😉 ooh! Should we still be including our ublue-os-akmods-addons RPM even on nokmods? this includes the secure boot key and some repos
EyeCantCU
EyeCantCU8mo ago
Hmm... I think that's a good idea. Users would be able to layer anything they feel they need and secure boot is a plus
bsherman
bsherman8mo ago
yeah, plus it connects to the config repo's justfile config RPM
EyeCantCU
EyeCantCU8mo ago
I can take a look at what NVIDIA changes we need to make if you want to look at the website
bsherman
bsherman8mo ago
i just looked, but you can check my assumptions: I think if we add ublue-os-akmods-addons to even the *-nokmods images ... then nvidia should work with no changes it just builds from main
EyeCantCU
EyeCantCU8mo ago
I will confirm that though I believe you're correct You're correct! No changes to NVIDIA. I'll grab Bazzite and Bluefin
bsherman
bsherman8mo ago
those i expect conditional changes on, because starting in F39, they'll want to add their specific choice of kmods
EyeCantCU
EyeCantCU8mo ago
I was just going to throw in all the kmods that were in main and let them be more selective after the fact if they'd like to be
bsherman
bsherman8mo ago
yeah, that's fair... and... another way to handle it is... use a version condition to change if they source from nokmods or main but always install the desired kmods so the "hard logic" will be done... and all that has to change later is removing the version conditional i think that meshes well with what you were doing rather
EyeCantCU
EyeCantCU8mo ago
That's what I had planned. Should be a piece of cake Oh shoot Are any of our kmods even compatible with 39 yet? I noticed in main we do this:
bsherman
bsherman8mo ago
hahah
EyeCantCU
EyeCantCU8mo ago
if grep -qv "39" <<< $FEDORA_MAJOR_VERSION; then
rpm-ostree install \
kernel-devel-matched \
kernel-tools \
/tmp/akmods-rpms/kmods/*xpadneo*.rpm \
/tmp/akmods-rpms/kmods/*xpad-noone*.rpm \
/tmp/akmods-rpms/kmods/*xone*.rpm \
/tmp/akmods-rpms/kmods/*openrazer*.rpm \
/tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \
/tmp/akmods-rpms/kmods/*wl*.rpm
fi
if grep -qv "39" <<< $FEDORA_MAJOR_VERSION; then
rpm-ostree install \
kernel-devel-matched \
kernel-tools \
/tmp/akmods-rpms/kmods/*xpadneo*.rpm \
/tmp/akmods-rpms/kmods/*xpad-noone*.rpm \
/tmp/akmods-rpms/kmods/*xone*.rpm \
/tmp/akmods-rpms/kmods/*openrazer*.rpm \
/tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \
/tmp/akmods-rpms/kmods/*wl*.rpm
fi
So like... That's everything
bsherman
bsherman8mo ago
i think they should be good now https://negativo17.org/repos/steam/fedora-39/x86_64/ at least worth trying, AFAIK , the negativo17 RPMs were the ones holding us back
EyeCantCU
EyeCantCU8mo ago
I'll give it a shot
bsherman
bsherman8mo ago
i'm assukming that openrazer and xpad-noone have an F39 builds here https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/packages/ yeah, looks like it man i wish we could just publish binary kmods to a repo like that LOL
EyeCantCU
EyeCantCU8mo ago
Would be super nice
bsherman
bsherman8mo ago
oh, crap i forgot to push a change LOL
EyeCantCU
EyeCantCU8mo ago
lol
bsherman
bsherman8mo ago
k, i need to get back to work work
EyeCantCU
EyeCantCU8mo ago
Sounds good to me :). Looks like the Xbox kmods are ready but evdi isn't quite there yet so I enabled those. Only one kmod down for 39
bsherman
bsherman8mo ago
where? PR link?
EyeCantCU
EyeCantCU8mo ago
GitHub
feat: Re-enable Xbox kmods for Fedora 39 by EyeCantCU · Pull Reques...
These were disabled for the Fedora 39 bringup as they hadn't been built for 39 quite yet, but now that they are, we can enable these
bsherman
bsherman8mo ago
ahhhh i was thinking on a different repo... very cool
EyeCantCU
EyeCantCU8mo ago
EyeCantCU
EyeCantCU8mo ago
Now getting Bluefin
bsherman
bsherman8mo ago
did you test build that bazzite Containerfile?
EyeCantCU
EyeCantCU8mo ago
None of our changes have been merged yet. It's a draft Failures are unrelated
bsherman
bsherman8mo ago
i think it is related
EyeCantCU
EyeCantCU8mo ago
obs-vkcapture isn't us
bsherman
bsherman8mo ago
but... it MIGHT work if our main PR merge is completed
EyeCantCU
EyeCantCU8mo ago
I think the main PR looks great Bluefin 39 builds!
bsherman
bsherman8mo ago
woot i think our merge queue needs some improving to not need full rebuilds when it's just a READM/markdown change
EyeCantCU
EyeCantCU8mo ago
I agree. Kinda ridiculous
bsherman
bsherman8mo ago
so, your PRs are merged for bluefin/bazzite... is this "completely done"?
EyeCantCU
EyeCantCU8mo ago
Yep. We're good
bsherman
bsherman8mo ago
wild ok, cool. what about asus/surface? F39 stuff?
EyeCantCU
EyeCantCU8mo ago
So that would depend. Do we include them because they're already hardware support images or do we exclude them like we do in main and leave it to downstream It would make downstream kinda messy
bsherman
bsherman8mo ago
I agree asus/surface should not be customized beyond what is required for their custom kernels... what i mean is... do they already build FROM FOO-nokmods - on F37/F38 FROM FOO-main -on F39 ?
EyeCantCU
EyeCantCU8mo ago
Ah. Let me see PR up for ASUS. Also going to remove the kmods. Then tackle Surface. Then PR Bazzite and Bluefin again. Hoping 3 copies of akmods downstream doesn't make images huge OH OH OH I have an idea One COPY for akmods that somehow incorperates image_flavor So 3 versions aren't being copied to the image Oh wait. We only install these below 39 so no more changes other than my PR that changes 39 to main Bazzite and Bluefin will need adjustments for Surface/ASUS though. Working on that rn too
bsherman
bsherman8mo ago
i'm not sure what i'm following you here 🙂 but yeah, i would expect any akmods installed would be "flavor" specific i don't get the 3 copies concern
EyeCantCU
EyeCantCU8mo ago
It makes the images larger as you copy over the entire container
bsherman
bsherman8mo ago
yeah, i've started to trim down a bit... like... here: https://github.com/ublue-os/main/blob/main/Containerfile#L19 only copying the single rpm in that directory rather than all the kmods
bsherman
bsherman8mo ago
nope, because once you leave the RUN you've lost the flavor variable but you have flavor... why can't use use it directly?
EyeCantCU
EyeCantCU8mo ago
because surface-nvidia asus-nvidia
bsherman
bsherman8mo ago
yeah, conditionals in Containerfile is hard bluefin is already pretty complicated i don't think it's possible to do a conditional COPY only to pass a variable to it to change where it's coming from i have wondered if we can use skopeo in a script to pull files out of images without having to COPY them... my reason has been to avoid that layer... but it could help with this, too
EyeCantCU
EyeCantCU8mo ago
So we'd need to do 3 copies to different directories, assess image flavor and assign akmods flavor like I was then install in one RUN It would be cool if we could somehow pull that off
bsherman
bsherman8mo ago
no. I think you are always passing image flavor so worst case, you copy akmods-FLAVOR:VERSION and akmods-FLAVOR-nvidia:VERSION even if you don't use nvidia
EyeCantCU
EyeCantCU8mo ago
That's not what I mean :/ I'm not a good communicator at times I'll update the code
bsherman
bsherman8mo ago
So we'd need to do 3 copies to different directories, assess image flavor and assign akmods flavor like I was then install in one RUN
ok 🙂 i'm happy to read your draft PR
EyeCantCU
EyeCantCU8mo ago
You don't get both parsing just image flavor, you'd get either So like surface-nvidia, using just image flavor, you're getting the surface-nvidia akmods Not surface
bsherman
bsherman8mo ago
yeah, i am following like i said, i know bluefin is already pretty complicated... but trying to do "flavor-specific" spins is tricky why not add something to the build-args....? you already pass IMAGE_FLAVOR ... so... also pass AKMODS_FLAVOR... but just strip anything past the - of IMAGE_FLAVOR right in the buildah action defintion i think i'm seeing what you mean now... you have IMAGE_FLAVOR (one of [ asus, asus-nvidia, surface, surface-nvidia, main, nvidia ] or something ) and you need to copy the correct akmods image (not the nvidia image) to install akmods
EyeCantCU
EyeCantCU8mo ago
akmods_flavor isn't a bad idea but that will need a long list of exclusions. Updated the PR Ehhh... Let's do akmods_flavor rather than what I've got... 3 copies is so redundant to bring in the same thing
bsherman
bsherman8mo ago
yeah, you definitely don't want to pull all 3 kmods layers in
EyeCantCU
EyeCantCU8mo ago
Yeah, that's what I had been saying Will lead to a huge image
bsherman
bsherman8mo ago
i thought I was agreeing with you 🙂
EyeCantCU
EyeCantCU8mo ago
lol. Got all backwards Updated the PR... Reaaaallly long exclude list but it works
bsherman
bsherman8mo ago
hmm i was thinking something a bit simpler maybe in the Matrix Variables step, you can do your logic based on the image_flavor and store a env.AKMODS_FLAVOR and use that in your build-args later the matrix DOES work, but i think a little bash conditional might be simpler
EyeCantCU
EyeCantCU8mo ago
Okay. I can get on that here in a little bit
bsherman
bsherman8mo ago
i think you basically had the logic in an earlier commit, but it was in the Containerfile
EyeCantCU
EyeCantCU8mo ago
Yeah. Just need that and to pass it to the environment I'm not at my computer rn But will be soon All right, should be gtg
bsherman
bsherman8mo ago
that looks good to me... feel better to you?
EyeCantCU
EyeCantCU8mo ago
For sure. A whole lot better
bsherman
bsherman8mo ago
ok, so i'm testing 🙂 because all the builds failed 😄
EyeCantCU
EyeCantCU8mo ago
I fixed it @bsherman I put quotes around the akmod flavors
bsherman
bsherman8mo ago
ahhh why is there only a single commit? oh, you force pushed yeah, so looks like there's some things needed for F39 to work probalby because "nokmods" are being installed I wonder... I think we may need another change to the main repo... to install ublue-os-akmods-addons RPM even when not installing actual akmods oh, that IS what we are installing
EyeCantCU
EyeCantCU8mo ago
Yup. We left that earlier I wonder what's going on Given that framework and main succeed as well as vanilla Nvidia, something in either of those repos needs work ASUS and Surface I mean
bsherman
bsherman8mo ago
sed: can't read /etc/yum.repos.d/_copr_ublue-os-akmods.repo: No such file or directory i think this is why adhoc adding/deleting repo files is a problem 🙂
EyeCantCU
EyeCantCU8mo ago
I'll take a look and see where things don't align
bsherman
bsherman8mo ago
i'm pulling the asus 38/39 images to inspect locally
EyeCantCU
EyeCantCU8mo ago
I see what's going on already
bsherman
bsherman8mo ago
39 doesn't have ublue-os-akmods-addons
EyeCantCU
EyeCantCU8mo ago
Because we left it, ASUS and Surface try to reinstall it Fixing now
bsherman
bsherman8mo ago
ah, so their 39 images are failing?
EyeCantCU
EyeCantCU8mo ago
Yeah Addressing it now
bsherman
bsherman8mo ago
i KNEW we weren'te QUITE done yet 😉 thanks for sticking with me on this "simplify main" quest not to mention this PR didn't get merged 😄
EyeCantCU
EyeCantCU8mo ago
Yeah, just came to mind And no problem 🙂
bsherman
bsherman8mo ago
so fix it in that PR and we'll get it merged?
EyeCantCU
EyeCantCU8mo ago
Yup. Working on it right now. Also looks like I need to fix kernel replacement since kernel-devel is no longer there Should tie it up
bsherman
bsherman8mo ago
that last commit for kerel-devel is bad you removed a required && \
EyeCantCU
EyeCantCU8mo ago
God damn it Lol
bsherman
bsherman8mo ago
extra 👀
EyeCantCU
EyeCantCU8mo ago
Fixed YES FINALLY Lol
bsherman
bsherman8mo ago
🎉 ready to merge? cuz i pushed the button LOL queued
bsherman
bsherman8mo ago
btw, would you please approve this? https://github.com/ublue-os/nvidia/pull/162
GitHub
feat: enable ublue-nvctk-cdi.service by default by bsherman · Pull ...
We added this service to generate nvidia device definitions for container toolkit, but it isn't enabling by default like it should. This corrects that.
EyeCantCU
EyeCantCU8mo ago
Yep!
bsherman
bsherman8mo ago
i gotta crash for tonight, tomorrow will be hit or miss, but i'm happy to review surface stuff etc... to get this wrapped up
EyeCantCU
EyeCantCU8mo ago
Sounds good, we've covered a lot of ground today. This is the Surface PR: https://github.com/ublue-os/surface/pull/18 And here's the surface-nvidia PR: https://github.com/ublue-os/surface-nvidia/pull/5 The second PR won't build until the first has been merged, but other than that, we're good :). Don't worry about reviewing until you have the time. I'm going to be wrapping today up myself here soon
bsherman
bsherman8mo ago
looks like you got these merged! sorry, i was out of touch yesterday
EyeCantCU
EyeCantCU8mo ago
Yup! It's cool. 39 images for Bazzite now too. I just need to throw the gts tag stuff in ASUS and Surface at this point but other than that we're gooe