dnf vs rpm-ostree (kernel-cache, akmods, etc)

@M2 curious if you've seen this failure yet
594 Replies
bsherman
bshermanOPβ€’2y ago
https://github.com/ublue-os/ucore-kmods/actions/runs/9814573437/job/27102383611 so, it seems newer CoreOS is either configured or uses a newer rpm-ostree setting which prevents use of dnf It’s making me wonder if we don’t add the CoreOS testing kernel to akmods in addition to the stable kernel, and just build all kmods there, thus ucore would use those
M2
M2β€’2y ago
That's definitely new. I'm completely down to consolidating into akmods since all that should matter is making sure kernel versions match
bsherman
bshermanOPβ€’2y ago
I think I’ll first prep the PR for ucore to use akmods. It will only work with stable for now obviously, but I want to validate. Then I’ll add the extra kernel to akmods. I do like the idea of all the kmods building in one place.
M2
M2β€’2y ago
Also we have a massive library of scripts in akmods right now. Like most of them aren't needed for ucore, but it would simplify things for people who want to make a custom Ucore image
bsherman
bshermanOPβ€’2y ago
yeah i mostly want the benefit of not doing the same thing in different places shared benefit from fixes
M2
M2β€’2y ago
And things like the zfs module that needs a little babying for versions
bsherman
bshermanOPβ€’2y ago
i didn't make much progress on this today, mostly a ucore:testing concern at the moment, but i'll need to fix soon. i was short on time so focussed on helping finish up the luks tpm lock/unlock stuff working on this... one thing i forgot... while the kmods themselves are fine for ucore to source from akmods... there's a couple other "addons" rpms i'm building in the ucore-kmods so, i'll need to sort that out, but for testing, i'll copy kmods from akmods, but still copy the addons rpms from ucore-kmods stepping away for a bit, hope the workflow actually works for the bits which i changed i do know the containerfile is working
bsherman
bshermanOPβ€’2y ago
GitHub
refactor: use akmods repo as source for kmods by bsherman Β· Pull Re...
This is an effort to move away from distinct builds of kmods for CoreOS based uCore, instead using the shared akmods repo's kmods.
bsherman
bshermanOPβ€’2y ago
also note... i only made changes for the CoreOS" nvidia-zfs" builds, not the ucore ones w00t
kernel: 6.8.11-300.fc40.x86_64,
image: 40.20240616.3.0,
fedora: 40
kernel: 6.8.11-300.fc40.x86_64,
image: 40.20240616.3.0,
fedora: 40
M2
M2β€’2y ago
I was thinking of pulling zfs out of common and having another Containerfile for it.
bsherman
bshermanOPβ€’2y ago
extra? or just zfs
M2
M2β€’2y ago
Just zfs. Similar to nvidia
bsherman
bshermanOPβ€’2y ago
i think it would be good to do just zfs and only build for coreos
M2
M2β€’2y ago
Basically my thought. I would throw possibly throw in fsync for shits/giggles but basically coreOS common does a few extra things compared to everyone else
bsherman
bshermanOPβ€’2y ago
hmm yeah, whatever, i just don't think need to build for all kernel permutations
M2
M2β€’2y ago
Oh yes. Hence why I said shits/giggles and point to people on why zfs on fedora full speed kernel is dumb But. Main reason is simply to get away from the extra logic inside of common. Putting in Extra doesn't seem great since extra has so much random stuff in it. A separate containerfile also kinda makes sense since we have to do different package prep for it
bsherman
bshermanOPβ€’2y ago
do you know this error message? https://github.com/ublue-os/ucore/actions/runs/9831803039/job/27139706272#step:5:763 Error: invalid reference format
M2
M2β€’2y ago
Passed a bad tag The image:tag you are trying to pull doesn't exist is when I see that usually
bsherman
bshermanOPβ€’2y ago
yeah, seems to be the case
M2
M2β€’2y ago
GitHub
refactor: use akmods repo as source for kmods Β· ublue-os/ucore@f934...
An OCI base image of Fedora CoreOS with batteries included - refactor: use akmods repo as source for kmods Β· ublue-os/ucore@f934e0c
M2
M2β€’2y ago
Doesn't have "coreos-40" Same for the next line. It's missing the akmods flavor
bsherman
bshermanOPβ€’2y ago
ah, thanks! yeah i was pretty sure it was something like that, but i'd overlooked that part of log
M2
M2β€’2y ago
Yeah I wonder for that retry action if we can have it set -x so we can see the line that it fails on Instead of just getting stdout/stderr
M2
M2β€’2y ago
Includes are really finicky. I find it easier to do excludes. Will take a look at what is the whole matrix
bsherman
bshermanOPβ€’2y ago
agree, they ARE finicky i can make it work a different way
M2
M2β€’2y ago
GitHub
refactor: use akmods repo as source for kmods Β· ublue-os/ucore@f934...
An OCI base image of Fedora CoreOS with batteries included - refactor: use akmods repo as source for kmods Β· ublue-os/ucore@f934e0c
bsherman
bshermanOPβ€’2y ago
yep
M2
M2β€’2y ago
Since it's a one to one pair. Use a environment variable.
bsherman
bshermanOPβ€’2y ago
hmm... i want to do this differently yeah been a while since i was deep in the weeds with github workflows
M2
M2β€’2y ago
Yeah I find the documentation for include to be on the bad side. It doesn't do what I feel like it should. Meanwhile exclude does exactly what I expect, except work with an array
bsherman
bshermanOPβ€’2y ago
yep
M2
M2β€’2y ago
I do like inspecting from the store and confirming everything matches up. I also like that you split out the skopeo stuff to a block beforehand
bsherman
bshermanOPβ€’2y ago
yeah, I had been thinking about that improvement for a while... 1) make sure we can pull images 2) make sure the kernels align by checking what we've pulled i want to fail, not push bad images hah! i know why the include failed now, but it's ok, i'd rather do env
M2
M2β€’2y ago
I have been doing the skopeo stuff inside the build container step. But I like the idea of breaking up the massive build job to smaller blocks
bsherman
bshermanOPβ€’2y ago
i was checking for a matrix valuewhich didn't exist πŸ˜„ back to this... the RPMs I build which aren't building yet in akmods are: - ublue-os-ucore-nvidia - ublue-os-ucore-addons they are similar to the ublue versions, but a bit simpler i suppose i could just build them in akmods , only for coreos kernel_flavor, and store in a sub-dir of the /rpms dir so as to not break existing consumers of those images
M2
M2β€’2y ago
Do you always copy over zfs?
bsherman
bshermanOPβ€’2y ago
sadly
M2
M2β€’2y ago
Then put in that Containerfile
bsherman
bshermanOPβ€’2y ago
thats one of the areas where i think a yum repo would help
M2
M2β€’2y ago
True
bsherman
bshermanOPβ€’2y ago
i don't follow you here
M2
M2β€’2y ago
The idea of making a containerfile for explicitly zfs Since realistically only coreOS is going to use that one
bsherman
bshermanOPβ€’2y ago
ah well i'll cross that bridge later πŸ™‚ when i'm looking at the code more closely
M2
M2β€’2y ago
But doesn't exist yet
bsherman
bshermanOPβ€’2y ago
GitHub
refactor: use akmods repo as source for kmods Β· ublue-os/ucore@776c...
An OCI base image of Fedora CoreOS with batteries included - refactor: use akmods repo as source for kmods Β· ublue-os/ucore@776cffc
bsherman
bshermanOPβ€’2y ago
sweet! ok, i'll finish that set of changes for ucore... then work on the akmods side 🀞 https://github.com/ublue-os/ucore/actions/runs/9833009866
M2
M2β€’2y ago
looks like a lot of green
bsherman
bshermanOPβ€’2y ago
yep, just didn't get to the akmods side yet @M2 what do you think about including the "stable" / "testing" in the coreos tag for akmods? I think I'm going to need it for testing... even if we don't add it for stable or do you have another idea?
M2
M2β€’2y ago
So we currently do akmods:coreos-fedora_version Are you thinking about changing to akmods:coreos-stable/testing?
bsherman
bshermanOPβ€’2y ago
i was thinking akmods:coreos-stable-40 as an example
M2
M2β€’2y ago
Okay, I think that should work.
bsherman
bshermanOPβ€’2y ago
i THINK the only consumer of coreos is currently bluefin, so maybe we can just change it
M2
M2β€’2y ago
Bluefin would then move to akmods:coreos-stable
bsherman
bshermanOPβ€’2y ago
right, akmods:coreos-stable-40 and akmods:coreos-stable-39
M2
M2β€’2y ago
Yeah we are the only consumer unless someone has made a custom image with it
bsherman
bshermanOPβ€’2y ago
and ucore would use both the stable and testing -40 if you don't mind, I can include that change in my PR or we can keep it distinct
M2
M2β€’2y ago
Yeah please let us get a draft PR in place
bsherman
bshermanOPβ€’2y ago
small PRs aren't bad k
M2
M2β€’2y ago
RJ is working on getting fsync in place on bluefin:latest
bsherman
bshermanOPβ€’2y ago
yep
bsherman
bshermanOPβ€’2y ago
lets keep it simple and do one thing at a time https://github.com/ublue-os/akmods/pull/212
GitHub
feat: build both stable and testing CoreOS streams by bsherman Β· Pu...
This provides both kernel streams for uCore or other CoreOS images to consume. A breaking change occurs in the tagging for existing coreos akmods images. Instead of: akmods:coreos-40 and akmods:cor...
bsherman
bshermanOPβ€’2y ago
I just noticed @EyeCantCU 's kernel version tagging here https://github.com/ublue-os/fsync/pkgs/container/fsync and i'm now wondering if our tagging for akmods should change πŸ™‚
EyeCantCU
EyeCantCUβ€’2y ago
That caching layer was all M2 πŸ™‚
bsherman
bshermanOPβ€’2y ago
oh πŸ˜„ well, you help on stuff a lot toO!
EyeCantCU
EyeCantCUβ€’2y ago
We can parse the ostree.linux label for akmods, but having the kernel version would be very nice *as a tag
bsherman
bshermanOPβ€’2y ago
yeah, maybe even as an extra tag?
EyeCantCU
EyeCantCUβ€’2y ago
That's what I was thinking the other day
bsherman
bshermanOPβ€’2y ago
akmods is used enough by many people, i'd be hesitant to completely change it
EyeCantCU
EyeCantCUβ€’2y ago
Yeah, wouldn't be bad to add it as a tag at all either. Can look into it more tomorrow. Going to finalize a PR adding fsync to latest in Bluefin real fast and call it
bsherman
bshermanOPβ€’2y ago
joy, looks like package skew is breaking akmods builds no fun when i'm trying to work on it
EyeCantCU
EyeCantCUβ€’2y ago
Package skew is always fun
bsherman
bshermanOPβ€’2y ago
actually not sure it's package skew it looks like dnf and dnf5 really have a conflict i'm working on it
bsherman
bshermanOPβ€’2y ago
i think we may have a problem https://github.com/ublue-os/akmods/pull/213 at least, something to fix... this issue is what led me to trying to use akmods instead of building my own for ucore in the first place:
*** This system is managed with ostree. Changes to the system
*** made with dnf will be lost with the next ostree-based update.
*** If you do not want to lose these changes, use 'rpm-ostree'.

Operation aborted.
2024/07/09 03:29:17 akmods: Could not install newly built RPMs. You can find them and the logfile in:
2024/07/09 03:29:17 akmods: /var/cache/akmods/nvidia/555.58.02-1-for-6.9.7-200.fc40.x86_64.failed.log
+ exit 1
*** This system is managed with ostree. Changes to the system
*** made with dnf will be lost with the next ostree-based update.
*** If you do not want to lose these changes, use 'rpm-ostree'.

Operation aborted.
2024/07/09 03:29:17 akmods: Could not install newly built RPMs. You can find them and the logfile in:
2024/07/09 03:29:17 akmods: /var/cache/akmods/nvidia/555.58.02-1-for-6.9.7-200.fc40.x86_64.failed.log
+ exit 1
EyeCantCU
EyeCantCUβ€’2y ago
That warning doesn't sound good
bsherman
bshermanOPβ€’2y ago
i think something changed in rpm-ostree maybe?
EyeCantCU
EyeCantCUβ€’2y ago
I'll take a look. This is going to make akmods complicated
bsherman
bshermanOPβ€’2y ago
Yes. Very. F40 got the latest rpm-ostree but F39 does not (yet?)
EyeCantCU
EyeCantCUβ€’2y ago
Oh, it's just a warning saying those changes will be lost when an update is performed (which is correct): https://github.com/rpm-software-management/dnf/commit/5c050ba2324c5fb95bf0e0501c7925f38f6a09dc We're safe
bsherman
bshermanOPβ€’2y ago
But it’s causing akmods to fail. No?
EyeCantCU
EyeCantCUβ€’2y ago
Oh wait. Shit. Yeah, it raises an error We need to rethink akmods πŸ€¦β€β™‚οΈ Or convince upstream that this should just be a warning
M2
M2β€’2y ago
Since its python we could try patching out the error message. Another option is removing bootc which is how it's doing the detection Nope. They are also doing a check for the ostree dir and failing out if that exists. What would happen if we built in a fedora container instead of an ostree container? We also could do a downgrade for a little bit on dnf
EyeCantCU
EyeCantCUβ€’2y ago
This would be fine if the kernel in atomic always aligned with it, but unfortunately it doesn't. We'd have to ensure the kernels match But, I think this is a strong case for having a caching layer for the kernel shipped in Fedora. We'd be able to kill kernel skew entirely
M2
M2β€’2y ago
Well we have a template with fsync. We can do the same with the main kernel. I also want to have the fsync layer not be dependent on akmods. We still occasionally have Nvidia driver skew and some problematic packages. Maybe if we do the || true that Bazzite does it will mitigate that as well
EyeCantCU
EyeCantCUβ€’2y ago
What if we enabled install-to-root and symlinked rpm-ostree to /usr/bin/dnf? All these should be doing is an install
M2
M2β€’2y ago
We do install to root. I think the only reason we were using dnf is for the easy copr stuff.
EyeCantCU
EyeCantCUβ€’2y ago
Let's drop it then and just curl the repos
M2
M2β€’2y ago
Actually I think we also need dnf for akmods install
bsherman
bshermanOPβ€’2y ago
right, i don't have the example in the draft PR, but i tried using cliwrap, and akmods failed in other ways with that... this is a problem with rpm-ostree/dnf changes which are now blocking akmods builds, i think i haven't tested yet, but i'm thinking of going to the coreos examples github and using one of those examples to demo to Colin/Timothee about this issue, though, maybe seeing our PR here is enough of a demo? feels like this is unforseen consequence
M2
M2β€’2y ago
Yeah, the PR said warn but it's failing out I don't know if them Putting Error there was actually intended
bsherman
bshermanOPβ€’2y ago
i'm guessing the warning is returning a non-zero exit code? yeah, in raise CliError(_("Operation aborted."))
M2
M2β€’2y ago
Yeah, why are they aborting an operation if its a warning? and if it was attempting to do this on an ostree system right now.... it would fail trying to write the rpm lock fail file*
bsherman
bshermanOPβ€’2y ago
this has to break akmods from rpm-fusion, too
M2
M2β€’2y ago
yepp i think they need to revert that PR. or at least not error out
bsherman
bshermanOPβ€’2y ago
the commit is linked above, but the the PR is https://github.com/rpm-software-management/dnf/pull/2053 (for my own context) @m2 do you mind to file the issue ?
bsherman
bshermanOPβ€’2y ago
thank you! ya know, thinking about this... there IS a workaround... the RPM is successfully built, just not installed so, we could handle the error, and install the rpm with rpm-ostree to verify or, ideally, there's an option which tells akmods "don't actually install" but the latter seems to not be available
M2
M2β€’2y ago
other option is to cache main line kernel like fsync and then use a normal fedora container
bsherman
bshermanOPβ€’2y ago
i don't understand what that means... I get the idea of querying what kernel is installed (or will be installed) in an image and making sure we install that version in a normal fedora container for build... but not sure what the "cache like fsync" really does/means
M2
M2β€’2y ago
GitHub
GitHub - ublue-os/fsync: A caching layer for the fsync kernel from ...
A caching layer for the fsync kernel from sentry/kernel-fsync - ublue-os/fsync
M2
M2β€’2y ago
We cache the current version of fedora ostree image kernel and use that with akmods main reason we are using quay.io/fedora-ostree-desktops/base is that it has the same kernel and is the smallest image
bsherman
bshermanOPβ€’2y ago
so this just caches a known version of a set of kernel RPMs?
M2
M2β€’2y ago
yepp
bsherman
bshermanOPβ€’2y ago
ok, so the idea is we could run a "kernel-cache" repo or image, and each could be tagged with "flavor-version" eg, "fsync-6.8.11-xyz" i know this is a distinct repo and image for fsync, but that doesn't scale we could have all our kernel flavors cached and then, for akmods, use generic fedora container, and install the different kernel flavors from cache?
M2
M2β€’2y ago
yeah
bsherman
bshermanOPβ€’2y ago
it wouldn't address other library/rpm differences beyond kernel, but hopefully would be "close enough" this is a major PITA what's the value of the cache layer? vs.... knowing the version and installing from dnf? repos losing old kernels? because the cost is copying RPM files into a layer which can't be removed
M2
M2β€’2y ago
This would be for akmods where we publish only the scratch image
bsherman
bshermanOPβ€’2y ago
ah so... downstreams like bluefin/bazzite still install kernels from regular repos or their upstream silverblue/bazzite main?
M2
M2β€’2y ago
Only swap kernels if we need to we probably could do everything with skopeo and not need to cache main kernel
bsherman
bshermanOPβ€’2y ago
yeah, come to think of it, even where we need RPMS on downstreams (eg, installing kmods/custom kernels from a cache image layer) we could spin up a nested container, mount the akmods/kernel images and copy RPMs out at runtime rather than use Contianerfile COPY ... but... then the Containerfiles wouldn't be standalone capable or maybe they could be eh no i think we just need a yum repo πŸ˜‚
M2
M2β€’2y ago
would be simpler. But with a scratch container.
podman pull xyz
podman create xyz
podman export xyz > /tmp/xyz.tar
$(cd /tmp && tar -xvf /tmp/xyz.tar)
rpm-ostree install blah
podman pull xyz
podman create xyz
podman export xyz > /tmp/xyz.tar
$(cd /tmp && tar -xvf /tmp/xyz.tar)
rpm-ostree install blah
bsherman
bshermanOPβ€’2y ago
yep well, all said, for the short term, i do think caching kernels in a scratch image and using for akmods builds with standard fedora container is a winner
M2
M2β€’2y ago
we could also just downgrade dnf in akmods
bsherman
bshermanOPβ€’2y ago
I wonder if @EyeCantCU can tell us (or you @M2 sorry, i'm still not paying attention to who is doing what)... can we rename fsync repo to kernel-cache or something? and make it more generic for all our kernel-caching image needs? maybe, but i fear dependency hell
M2
M2β€’2y ago
GitHub
GitHub - ublue-os/kernel-cache: A caching layer for the fsync kerne...
A caching layer for the fsync kernel from sentry/kernel-fsync - ublue-os/kernel-cache
M2
M2β€’2y ago
i'll rework the workflow to get it to not needs akmods as a bootstrap and then think how we can refactor to be more generic
bsherman
bshermanOPβ€’2y ago
thanks very much who know that coreos testing kmod failures were the harbinger of problems we'd soon face with all akmods
M2
M2β€’2y ago
kinda miffed since it does say warning warnings warn.... not abort
bsherman
bshermanOPβ€’2y ago
i agree
M2
M2β€’2y ago
also we do need to split out zfs from common but that is a later thing
bsherman
bshermanOPβ€’2y ago
yeah, so order of operations seems to be: 1) fix current state (kernel-cache+generic-fedora?) 2) my PR for coreos-stable/coreos-testing 3) move zfs to distinct akmods-zfs image 4) finish my move of ucore stuff to kamods
M2
M2β€’2y ago
sounds about right
bsherman
bshermanOPβ€’2y ago
or we could just merge the coreos-stable thing if you want, it doens't break anything worse that it already is and we'd have something merged
M2
M2β€’2y ago
it means that bluefin will be broken until I update the containerfile I think getting akmods first
bsherman
bshermanOPβ€’2y ago
bluefin is already broken because akmods is already failing to build
M2
M2β€’2y ago
lol true yeah we can do the coreos-stable/testing
bsherman
bshermanOPβ€’2y ago
ok, so this is ready to merge: https://github.com/ublue-os/akmods/pull/212 @M2 @EyeCantCU @Robert (p5) per me and M2 discussion... i'll comment also
EyeCantCU
EyeCantCUβ€’2y ago
Hey all. Sorry - can catch up in a bit
M2
M2β€’2y ago
GitHub
feat: build both stable and testing CoreOS streams Β· ublue-os/akmod...
A caching layer for pre-built Fedora akmod RPMs. Contribute to ublue-os/akmods development by creating an account on GitHub.
M2
M2β€’2y ago
oh wow that's a lot of read
bsherman
bshermanOPβ€’2y ago
yep
bsherman
bshermanOPβ€’2y ago
GitHub
ublue akmods 40 Β· ublue-os/akmods@a172797
A caching layer for pre-built Fedora akmod RPMs. Contribute to ublue-os/akmods development by creating an account on GitHub.
M2
M2β€’2y ago
all of those fails were due to dnf5 so fine with me
bsherman
bshermanOPβ€’2y ago
i need to work ... day job... but want to help more get akmods happy probably tonight, or random comments today
M2
M2β€’2y ago
GitHub
feat: Cache all the kernels. No Akmods Bootstrap by m2Giles Β· Pull ...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
bsherman
bshermanOPβ€’2y ago
i'm confused by the matrix args flipping order? (flavor, 40) and (39, flavor) ? you know why? https://github.com/ublue-os/kernel-cache/pull/5#issuecomment-2218478588
M2
M2β€’2y ago
probably because of the order of the include
bsherman
bshermanOPβ€’2y ago
why not excluding? πŸ™‚
M2
M2β€’2y ago
i have no idea it's literally the same either way
bsherman
bshermanOPβ€’2y ago
you told me you prefer excludes πŸ˜‰
M2
M2β€’2y ago
i hate include so much
bsherman
bshermanOPβ€’2y ago
LOL
M2
M2β€’2y ago
Surface has a few additional packages required by a kernel install
bsherman
bshermanOPβ€’2y ago
yah
M2
M2β€’2y ago
only 2. One is an F39 package randomly
M2
M2β€’2y ago
i think tags might be off
bsherman
bshermanOPβ€’2y ago
agree the PR number is not present
M2
M2β€’2y ago
is it not ${{ github.event_number }}?
bsherman
bshermanOPβ€’2y ago
mmm looking closer that is what we use elsewhere i wonder if it breaks on reruns? no... weird, it's not reporting https://github.com/ublue-os/kernel-cache/actions/runs/9862941104/job/27234602246#step:8:5 i wonder if that changed in github expressions and we missed the memo, becasue i'd swear it used to work
M2
M2β€’2y ago
fixed with ${{ github.event.number }}
bsherman
bshermanOPβ€’2y ago
πŸ‘οΈ πŸ‘οΈ yeah i was looking at another one which works and it has a event.number but I didn't see the difference between . and _
M2
M2β€’2y ago
oh the schedule should now be pushed forward before akmods also F39 seems to just take forever for repo sync alright I'm personally happy with the kernel-cache. @EyeCantCU fsync is now called fsync-kernel since the repo is caching everything
bsherman
bshermanOPβ€’2y ago
thanks for this! looks great! I'm excited to see this in action for all of akmods, and beyond
M2
M2β€’2y ago
Long term. https://linux.die.net/man/1/rpmrebuild This could possibly be used to sign the kernel in the kernel cache.
M2
M2β€’2y ago
GitHub
hwe/install.sh at f050686e82c0d0ab4730ccc483a795dd1c85e290 Β· ublue-...
Fedora variants with support for ASUS devices, Nvidia devices, and Surface laptops - ublue-os/hwe
bsherman
bshermanOPβ€’2y ago
I have work started on moving akmods to kernel cache. I just didn’t get a draft PR pushed as it wasn’t quite far enough
M2
M2β€’2y ago
Let me know if tags need to change
bsherman
bshermanOPβ€’2y ago
that'll be an interesting thing, do we leave tags as is, but ADD the kernel version?
M2
M2β€’2y ago
Right now it's: flavor-kernel:latest, short, and full kernel version
bsherman
bshermanOPβ€’2y ago
the PR in progress https://github.com/ublue-os/akmods/pull/214 but it does NOT yet actually pull kernel-cache and hasn't converted the kernel-install method in build-prep
GitHub
feat: use kernel-cache images and fedora for builds by bsherman Β· P...
This PR uses the new kernel-cache images to install the desired kernel flavor to a generic Fedora container (not ostree based), allowing: consistent kmod builds per kernel version (avoid repo skew...
bsherman
bshermanOPβ€’2y ago
sorry, i misunderstood and was thinking something else... about if we needed to change the tags on akmods images but I think the tags on kernel are solid. my only question is if we want to make the image name more specific. instead of coreos-stable:TAG or fsync:TAG, should they be: kernel-coreos-stable:TAG and kernel-fsync:TAG ?
M2
M2β€’2y ago
Right now: fsync-kernel:TAG
bsherman
bshermanOPβ€’2y ago
or kc-etc... or kernel-chache-etc.. i'll go look before i sound even more like an idiot
M2
M2β€’2y ago
coreos-stable-kernel:TAG
bsherman
bshermanOPβ€’2y ago
ok, yeah, they are appropriately unique πŸ™‚ just a question of kernel as a prefix or suffix... but i don't care enough to argue for changes. the only reason for prefix is sorting
M2
M2β€’2y ago
The thing I realized is that I only have main, coreos-stable, and surface have fedora version as part of the latest tag Just thinking of better mechanism for passing tags in a build since you may not have kernel version
bsherman
bshermanOPβ€’2y ago
hmm ya know... since the kernel version part of the tag includes the fedora version (eg, fsync-kernel's 6.9.8-201.fsync.fc40.x86_64 includes fc40 and coreos-stable's 6.8.11-200.fc39.x86_64 includes fc39 even though stable is really fc40 based...) i think those kernel versions have all the meta that's required when paired with the proper (as currently done) image names probably don't need the 39- 40- prefix and latest ... let's burn it... seems very inappropriate for this use case these cache images are most valuable when the consumer DOES know the kernel version, and they find it by inspecting their base image's labels, no? i think the problem with my statement is something needs to be the source of truth for what is "current" kernel (regardless of flavor)
M2
M2β€’2y ago
Yes
bsherman
bshermanOPβ€’2y ago
how will bluefin (or akmods, for that matter) know which fysync to use, unless asking for "latest" or "39"?
M2
M2β€’2y ago
Fsync is only building 40 right now So fsync only provides an F40 kernel. Also each package is always tagged with entire kernel version as well which includes the fedora version. It's just there isn't a simple tag that's like fsync-kernel:40 it's fsync-kernel:latest For main that caches 39 and 40 It's main-kernel:40-latest Instead of using latest it probably should be the fedora version is all I'm saying
bsherman
bshermanOPβ€’2y ago
ok, so I suggest this... all images get a tag which is the full kernel version, which handles the case where a user KNOWS the kernel they want eg fsync-kernel:6.9.8-201.fsync.fc40.x86_64 or coreos-stable-kernel:6.8.11-200.fc39.x86_64 but all images ALSO get a tag which is simply the fedora major version eg fsync-kernel:40 and coreos-stable-kernel:39 and main-kernel:40 those fedora major version numbers are de facto latest for the fedora release of the respective kernel flavor, which are the tags akmods should be consuming. and bluefin, et al will look at latest akmods-kernel_flavor to find the specific kernel version they should install (or look at kernel-cache, then use that to find akmods, i'm not sure the order matters) but i think extra tags like :39-6.8.11-200.fc39.x86_64 and :39-latest are extraneous
M2
M2β€’2y ago
So right now the tags are: for main, coreos-stable, and surface:
main-kernel:${fedora-version}-latest
main-kernel:${fedora-version}-major_minor_patch
main-kernel:full-kernel-name
main-kernel:${fedora-version}-latest
main-kernel:${fedora-version}-major_minor_patch
main-kernel:full-kernel-name
for fsync, asus, coreos-testing:
fsync-kernel:latest
fsync-kernel:major_minor_patch
fsync-kernel:full-kernel-name
fsync-kernel:latest
fsync-kernel:major_minor_patch
fsync-kernel:full-kernel-name
I think we should consolidate to:
main-kernel:${fedora-version}
main-kernel:${fedora-version}-major_minor_patch
main-kernel:full-kernel-name
main-kernel:${fedora-version}
main-kernel:${fedora-version}-major_minor_patch
main-kernel:full-kernel-name
I think we are on the same page
bsherman
bshermanOPβ€’2y ago
yep! i'm good with this! one problem the fsync-kernel:major_minor_patch doesn't work for coreos since we are building a coreos-stable:39-major_minor_patch even though coreos stable is actually FC40 oh geez you covered that sorry, i'm context switching
M2
M2β€’2y ago
GitHub
chore: consolidate tags to fedora-version by m2Giles Β· Pull Request...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
bsherman
bshermanOPβ€’2y ago
I think we should consolidate to:
main-kernel:${fedora-version}
main-kernel:${fedora-version}-major_minor_patch
main-kernel:full-kernel-name
main-kernel:${fedora-version}
main-kernel:${fedora-version}-major_minor_patch
main-kernel:full-kernel-name
M2
M2β€’2y ago
PR is in with change Back to work
bsherman
bshermanOPβ€’2y ago
i'm not 100% the change is what we expect echo 'alias_tags=pr-7-6.8.11-200.fc39.x86_64 8e3197b-6.8.11-200.fc39.x86_64 pr-7-39 8e3197b-39' https://github.com/ublue-os/kernel-cache/actions/runs/9878224005/job/27281675392#step:8:73 seems we are missing major_minor_patch?
M2
M2β€’2y ago
I didn't put in the major minor one in pr. But it's in build tags I should just make the commit tags be the same as build tags.
bsherman
bshermanOPβ€’2y ago
i think for this repo, it would be much simpler... we always have the 3 base tags fedora_version, fedora_version-major_minor_patch, and full_kernel_name .... but on PR's this all gets prefixed with pr-N-
M2
M2β€’2y ago
Agreed I had sha on there
bsherman
bshermanOPβ€’2y ago
i don't think it's wrong to have a sha tag too, I generally assume there is one
M2
M2β€’2y ago
okay, updated to have major minor patch for commit tags. So PRs will have SHA+PR nomenclature. Build Tags will have the 3 agreed upon tags
Generated the following tags:
pr-7-40
pr-7-40-6.9.7
pr-7-6.9.7-200.fc40.x86_64
a4a501e-40
a4a501e-40-6.9.7
a4a501e-6.9.7-200.fc40.x86_64
Generated the following tags:
pr-7-40
pr-7-40-6.9.7
pr-7-6.9.7-200.fc40.x86_64
a4a501e-40
a4a501e-40-6.9.7
a4a501e-6.9.7-200.fc40.x86_64
bsherman
bshermanOPβ€’2y ago
hah! i had a comment open to capture this idea and walked away, now i probably don't need to push "Comment"
M2
M2β€’2y ago
I don't think a sha tag is particularly necessary since we will have a digest that we can pin to if needed. If we ever push PRs having the sha tag there would make the most sense. Also I would like to look into signing the kernels inside the RPMs so we don't have to do the kernel signer step in downstream images.
bsherman
bshermanOPβ€’2y ago
agree on sha stuff re: signing kernels... that wouldn't mean building initramfs... does initramfs need to be signed?
M2
M2β€’2y ago
no initramfs is not signed
bsherman
bshermanOPβ€’2y ago
i was thinking not... just confirming
M2
M2β€’2y ago
the file inside the rpm at /usr/lib/modules/*/vmlinuz is what needs to be signed
bsherman
bshermanOPβ€’2y ago
by signing, our key, the same key used for akmods, would be all that's required for secure boot? even if a user nuked their Microsoft keys, but imported ours as MOK it still boots, right? or does something else in the chain need signing?
M2
M2β€’2y ago
we would sign with our MOK.
bsherman
bshermanOPβ€’2y ago
seems like something else is needed
M2
M2β€’2y ago
Microsoft keys are used by shim.
bsherman
bshermanOPβ€’2y ago
well, all said, i think https://github.com/ublue-os/kernel-cache/pull/7 is good, just needs other approval
GitHub
chore: consolidate tags to fedora-version by m2Giles Β· Pull Request...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’2y ago
Basically, https://github.com/EyeCantCU/kernel-signer/blob/main/sign-kernel.sh we are using this to sign the kernel but it's doing the signature after vmlinuz is in the correct spot. oh did you put it up to 2 approvals? Probably makes sense if we are moving so our kernel install method to this for akmods and images
bsherman
bshermanOPβ€’2y ago
i did πŸ™‚
M2
M2β€’2y ago
yeah, this is definitely going to be one of those no stars, infrastructure repos its the layer before akmods
bsherman
bshermanOPβ€’2y ago
yep
M2
M2β€’2y ago
if there are src rpms I think this would be download the src.rpm and do the rpmbuild action?
bsherman
bshermanOPβ€’2y ago
yeah, i think so... if the build process auto-matically picks up the signing key like when building the zfs kmod that should be pretty easy.
M2
M2β€’2y ago
fsync doesn't do source RPMs so would need to work with the regular rpm the vmlinuz lives in kernel-core Will need to look into rpmrebuild maybe @Kyle Gospo @EyeCantCU any familiarity with rpmrebuild? Also fishing for a second ack on the PR
EyeCantCU
EyeCantCUβ€’2y ago
I used it like once last year and I have no idea how to use it now πŸ˜†
M2
M2β€’2y ago
Okay. The idea is to extract the files out of kernel-core and kernel-virt-uki and sign vmlinuz and vmlinuz-uki.efi with our MOK and then rebuild the RPM with rpmrebuild. Losing the GPG key signature shouldn't matter since the container will be signed by our cosign key
EyeCantCU
EyeCantCUβ€’2y ago
Oh my gosh, that would be amazing and kill an entire layer we add to the container I'm going to have to relearn
M2
M2β€’2y ago
Additionally since these are now cached in a container. We could use podman inside the build to pull out the RPMs and not use a COPY directive saving the the size of the RPMs in COPY layer.
EyeCantCU
EyeCantCUβ€’2y ago
Sounds solid to me! The smaller we can make things, the better
M2
M2β€’2y ago
So instead of doing
COPY akmods:fsync-40 /tmp/rpms /tmp/rpms
COPY fsync-kernel:40 ...
COPY akmods:fsync-40 /tmp/rpms /tmp/rpms
COPY fsync-kernel:40 ...
We can do a podman pull inside of a run directive And do
podman pull ...
podman create ...
podman export > /tmp/rpm.tar
tar -xvf /tmp/rpm.tar
rpm-ostree install ./rpm....
podman pull ...
podman create ...
podman export > /tmp/rpm.tar
tar -xvf /tmp/rpm.tar
rpm-ostree install ./rpm....
Yeah kinda sucky maybe make a bash function for it but no wasted space in COPY layer So we match size of using a repo but get control over our kernel version and akmods. And if the kernels are signed... No kernel signer action needed downstream and custom images can kernel swap
EyeCantCU
EyeCantCUβ€’2y ago
I was about to ask if we could use podman cp but remembered that requires it to be running
M2
M2β€’2y ago
Hmmm I wonder if we could do that. We would need something like sleep to run. If we used BusyBox/alpine/Wolfi instead of scratch we could use sleep and get the easier podman cp command We also could have a tiny sleep like statically compiled binary image. I can use rpmdev-extract to extract files. Move them into place. Then use rpmrebuild to rebuild the package using the files in place? okay need to figure how to due this with batch mode: but install kernel-core sign /lib/modules/*/vmlinuz rpmrebuild kernel-core and you will have an rpm in /root/rpmbuild/RPMs that you is signed
M2
M2β€’2y ago
No description
bsherman
bshermanOPβ€’2y ago
I'm back at the desk and going to pick up work on my PR for akmods to use kernel-cache
M2
M2β€’2y ago
okay
dnf install -y kernel-core rpmrebuild sbsigntools
sbsign --key MOK.key --cert MOK.crt --output /lib/modules/${kernel_version}/vmlinuz /lib/modules/${kernel_version/vmlinuz
rpmrebuild --batch kernel-core
dnf remove kernel-core
dnf install /root/rpmbuild/RPMs/$(uname -m)/kernel-core-${kernel_version}.rpm
sbverify --list /lib/modules/${kernel_version}/vmlinuz
dnf install -y kernel-core rpmrebuild sbsigntools
sbsign --key MOK.key --cert MOK.crt --output /lib/modules/${kernel_version}/vmlinuz /lib/modules/${kernel_version/vmlinuz
rpmrebuild --batch kernel-core
dnf remove kernel-core
dnf install /root/rpmbuild/RPMs/$(uname -m)/kernel-core-${kernel_version}.rpm
sbverify --list /lib/modules/${kernel_version}/vmlinuz
bsherman
bshermanOPβ€’2y ago
you are a machine
M2
M2β€’2y ago
will go the route of how akmods gets the keys. I believe we have a test key in akmods
bsherman
bshermanOPβ€’2y ago
yes, the test key is in repo and the real key overrides it at runtime in Github Actions reminder @Kyle Gospo @EyeCantCU I'm still needing an extra approval on this one: https://github.com/ublue-os/akmods/pull/212 thanks y'all
bsherman
bshermanOPβ€’2y ago
this is looking pretty close... think i have a detail to cleanup around ZFS and... need some more review https://github.com/ublue-os/akmods/pull/214
GitHub
feat: use kernel-cache images and fedora for builds by bsherman Β· P...
This PR uses the new kernel-cache images to install the desired kernel flavor to a generic Fedora container (not ostree based), allowing: consistent kmod builds per kernel version (avoid repo skew...
bsherman
bshermanOPβ€’2y ago
@M2 looking at the only 2 failures with this PR... they are coreos common builds with ZFS... both failed during the last kmod build, ZFS... however, those builds succeed locally if i use the same build-args for Containerfile.common OH... it's the tar bug on older podman in ubuntu-22.04
I thought for some reason I could move back to ubuntu-latest builders... will swap that back and test again
M2
M2β€’2y ago
Yeah we need 24.04 builders for the podman tar bug 24.04 is still in beta I think Again I think we should probably move it to it's own containerfile. Since it has its own prep we could do it as a second step instead of as part of the build matrix to specify the 24.p4 builder
bsherman
bshermanOPβ€’2y ago
i do agree, i'm just trying to keep changes scoped although, at this point I'd be willing in this PR, i just wanted it "working" before adding more changes
M2
M2β€’2y ago
sounds good. Putting 24.04 on the builder should make akmods green
bsherman
bshermanOPβ€’2y ago
uh what? https://github.com/ublue-os/akmods/actions/runs/9893048873/job/27327238596#step:7:29 Error during unshare(...): Operation not permitted
M2
M2β€’2y ago
uhm what?
bsherman
bshermanOPβ€’2y ago
yeah
M2
M2β€’2y ago
did they just turn on app armor or something?
bsherman
bshermanOPβ€’2y ago
GitHub
apparmor should be disabled by default on Ubuntu Β· Issue #10015 Β· a...
Description apparmor.service being enabled by default in the images causes various issues (e.g. https://gitlab.com/apparmor/apparmor/-/issues/402). Given these are ephemeral build VMs where users h...
bsherman
bshermanOPβ€’2y ago
checking AAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHH this is maddening https://github.com/ublue-os/akmods/actions/runs/9893238618/job/27327861506#step:6:18
M2
M2β€’2y ago
are we no longer root?
bsherman
bshermanOPβ€’2y ago
beta builders gonna beta?
M2
M2β€’2y ago
if we are root.... we don't need an interactive login
bsherman
bshermanOPβ€’2y ago
i added sudo and it disabled apparmor, but still fails on that unshare
M2
M2β€’2y ago
that seems to indicate we are an unprivileged user now
bsherman
bshermanOPβ€’2y ago
i agree https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#administrative-privileges
The Linux and macOS virtual machines both run using passwordless sudo. When you need to execute commands or install tools that require more privileges than the current user, you can use sudo without needing to provide a password.
Is this actually new?
M2
M2β€’2y ago
i have no idea I've assumed we been root in the build environment do we just use skopeo against the registry? but this is really bizarre
bsherman
bshermanOPβ€’2y ago
oh, you think maybe using skopeo against local storage is the problem on 24.04?
M2
M2β€’2y ago
yeah
bsherman
bshermanOPβ€’2y ago
i have the ucore PR for using akmods sourced kmods... i'll test there since it uses same strategy
M2
M2β€’2y ago
i have the kernel-cache running on latest. Will also try 24.04. But the pre PR version was using 24.04
bsherman
bshermanOPβ€’2y ago
yeah feels so bizarre ok, so this "verify version" works with the skopeo inspect on 24.04 https://github.com/ublue-os/ucore/actions/runs/9893501157/job/27328777885#step:6:28 and this fails but i think it should be about the same: https://github.com/ublue-os/akmods/actions/runs/9893048856/job/27327671867#step:7:13 so what's different? set -eo pipefail
M2
M2β€’2y ago
but that should be a shell exit not an unshare not permitted
bsherman
bshermanOPβ€’2y ago
and shell:bash i agree it's definitely the skopeo command that's so frustrating the unprivileged user can't access its own container storage? can I get an approval from @Kyle Gospo @EyeCantCU or @Robert (p5) ? πŸ™‚ https://github.com/ublue-os/kernel-cache/pull/10
bsherman
bshermanOPβ€’2y ago
GitHub
Correct tag name by m2Giles Β· Pull Request #11 Β· ublue-os/kernel-ca...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’2y ago
Not sure why that didn't work. Going to just remove that
bsherman
bshermanOPβ€’2y ago
GitHub
Cache Kernels Β· ublue-os/kernel-cache@7611571
A caching layer for Fedora kernels. Contribute to ublue-os/kernel-cache development by creating an account on GitHub.
M2
M2β€’2y ago
any objections?
bsherman
bshermanOPβ€’2y ago
remove the pr blocking thing?
M2
M2β€’2y ago
yeah that bash check should be redundent
bsherman
bshermanOPβ€’2y ago
true,
M2
M2β€’2y ago
or we can use ${{ github.pull_request }} there instead of trying to match on tags containing "pr"
bsherman
bshermanOPβ€’2y ago
well, thinking about that we only have a "pr tag" if github.event_name is pull_request... and we only retrieve the key if event_name is pull_request so if we use pull_request in bash, it's doubly redundant, no?
M2
M2β€’2y ago
yeah we're using the github action if oh.... it's because the shell is sh and not bash
- name: Retrieve Signing Key
if: (github.event_name == 'scheduled' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group') && github.event_name != 'pull_request'
shell: bash
run: |
mkdir -p certs
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
echo "This should not have run... exiting..."
exit 1
else
- name: Retrieve Signing Key
if: (github.event_name == 'scheduled' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group') && github.event_name != 'pull_request'
shell: bash
run: |
mkdir -p certs
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
echo "This should not have run... exiting..."
exit 1
else
bsherman
bshermanOPβ€’2y ago
cool!
M2
M2β€’2y ago
and I can get rid of that && in the github if statement
M2
M2β€’2y ago
GitHub
chore(ci): change signing check logic by m2Giles Β· Pull Request #13...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’2y ago
What sucks is that this is code I don't want to run during a PR.... so the checks are happening as we merge
bsherman
bshermanOPβ€’2y ago
i'm not 100% sure i'm with you... are you lamenting the more general problem we have where certain parts of our workflow don't get validated during PR runs and only at merge time?
M2
M2β€’2y ago
yeah. We have a lot of things where we don't run if they are PR. Like the push actions and this one here. So really the merge check is the actual validation for the workflow. It's not so much of an issue for things inside the build image. But I don't like the noisy commits when it's literally debugging the workflow
bsherman
bshermanOPβ€’2y ago
not for today, but that's one of the things i wish to improve when we reduce privileges on our default GIT_TOKEN and are able to push to an alternative registry/image_name even during PRs
M2
M2β€’2y ago
probably the correct answer to this lamentation is I do this in a repo under my namespace I could test there lets take a look at the akmods changes.
bsherman
bshermanOPβ€’2y ago
feeling dense... systemctl status apparmor || exit 0 is that what I want?
M2
M2β€’2y ago
yeah well actually you could use || true
bsherman
bshermanOPβ€’2y ago
yes! that's what i wanted was || true, thank you
M2
M2β€’2y ago
that seemed to be the ticket
bsherman
bshermanOPβ€’2y ago
i wasn't anticipating a systemctl status check to fail my build πŸ™‚
M2
M2β€’2y ago
well the status is dead.....
bsherman
bshermanOPβ€’2y ago
yeah, i get why, just wasn't thinking ahead on it one thing i REALLY like about this approach, building akmods on fedora image with the kernel_cache... fedora container image doesn't have a kernel, so there's no confusing "dnf swap" or "rpm-ostree replace" stuff... simply install the cached kernel RPMs it's all a bit faster
M2
M2β€’2y ago
We may want to consider setting the install only 1 kernel parameter for dnf, but that shouldn't matter since we start from zero
bsherman
bshermanOPβ€’2y ago
right
bsherman
bshermanOPβ€’2y ago
I'm going to ask #πŸ’Ύublue-dev to take a look too https://github.com/ublue-os/akmods/pull/214
GitHub
feat: use kernel-cache images and fedora for builds by bsherman Β· P...
This PR uses the new kernel-cache images to install the desired kernel flavor to a generic Fedora container (not ostree based), allowing: consistent kmod builds per kernel version (avoid repo skew...
M2
M2β€’2y ago
okay, using kernel-cache for akmods looks great. Another thought is that we are going back to dnf with this. So this should look less crazy and could be copied over to a centos style image in the future if needed
bsherman
bshermanOPβ€’2y ago
yep
M2
M2β€’2y ago
cache-kernels is green!
bsherman
bshermanOPβ€’2y ago
and the resulting image labels look good! oh! i found an issue with my akmods PR ARG KERNEL_IMAGE="${KERNEL_IMAGE:-${KERNEL_FLAVOR}-kernel}" in Containerfile.common that's required for builds to work if the user passes KERNEL_FLAVOR but not KERNEL_IMAGE and i didn't do it the nvidia or extra Containerfiles it actually makes me think this is bad easy to mess up
M2
M2β€’2y ago
Yeah, that looks like a fix to add. KERNEL_FLAVOR should be what's being passed in. And I believe you can have it defined on the layer above or do another nested one ARG KERNEL_IMAGE="${KERNEL_IMAGE:-${KERNEL_FLAVOR:-main}-kernel}"
bsherman
bshermanOPβ€’2y ago
yeah, that works, i was trying to avoid the assuming of ${KERNEL_FLAVOR}-kernel, but if it's a default which can be overridden that's fine i'll clean that up quick,
M2
M2β€’2y ago
Should kernel image even be a passed in build-arg? if kernel_flavor is being passed in
bsherman
bshermanOPβ€’2y ago
i feel like it has to be a possible to override, otherwise all images ever used even for local dev would be fored into name $KERNEL_FLAVR-kernel it's an edge case
M2
M2β€’2y ago
oh you're right
bsherman
bshermanOPβ€’2y ago
this will be fine, and i'll use it correctly by only passing KERNEL_FLAVOR from workflow hmm... or...
M2
M2β€’2y ago
yeah. And then local can override
bsherman
bshermanOPβ€’2y ago
we can make the assumption here: ARG KERNEL_BASE="ghcr.io/${KERNEL_ORG}/${KERNEL_FLAVOR}-kernel:${FEDORA_MAJOR_VERSION}" and if someone really wants to not use defaults they can set both KERNEL_FLAVOR and a ful name for KERNEL_BASE blah feels like over thinking... what we already said will work fine
Kyle Gospo
Kyle Gospoβ€’2y ago
weee
No description
Kyle Gospo
Kyle Gospoβ€’2y ago
oh, can I get the new pub key for this so I can add it to the repos?
bsherman
bshermanOPβ€’2y ago
it's in kernel-cache
Kyle Gospo
Kyle Gospoβ€’2y ago
tx
bsherman
bshermanOPβ€’2y ago
GitHub
kernel-cache/certs/public_key_2.der at main Β· ublue-os/kernel-cache
A caching layer for Fedora kernels. Contribute to ublue-os/kernel-cache development by creating an account on GitHub.
M2
M2β€’2y ago
otherway around
bsherman
bshermanOPβ€’2y ago
_2 is old and "" is new?
M2
M2β€’2y ago
boom
bsherman
bshermanOPβ€’2y ago
@Kyle Gospo
Kyle Gospo
Kyle Gospoβ€’2y ago
No description
Robert
Robertβ€’2y ago
Hey guys How would somebody resolve the "dnf" vs "dnf5" conflicts normally, without implementing this whole kernel-cache thing?
Is there an "easy fix"?
52.73 error: Error running transaction: file /etc/dnf/dnf.conf conflicts between attempted installs of dnf-data-4.21.0-1.fc40.noarch and libdnf5-5.2.4.0-1.fc41.x86_64
52.73 file /usr/share/man/man5/dnf.conf.5.gz conflicts between attempted installs of dnf-data-4.21.0-1.fc40.noarch and dnf5-5.2.4.0-1.fc41.x86_64
52.73 error: Error running transaction: file /etc/dnf/dnf.conf conflicts between attempted installs of dnf-data-4.21.0-1.fc40.noarch and libdnf5-5.2.4.0-1.fc41.x86_64
52.73 file /usr/share/man/man5/dnf.conf.5.gz conflicts between attempted installs of dnf-data-4.21.0-1.fc40.noarch and dnf5-5.2.4.0-1.fc41.x86_64
bsherman
bshermanOPβ€’2y ago
I didn't find one. I had this branch going: https://github.com/ublue-os/akmods/pull/213 i found that the coreos-devel pool was adding some complications
Kyle Gospo
Kyle Gospoβ€’2y ago
@M2 where is KERNEL_VERSION: 6.9.7-201.fsync.fc40.x86_64 defined? I need 6.9.8 real bad
M2
M2β€’2y ago
It's now called: fsync-kernel:40
bsherman
bshermanOPβ€’2y ago
https://github.com/ublue-os/kernel-cache/pkgs/container/fsync-kernel/242493473?tag=40 yeah, i think you are still looking at fsync:40 not fsync-kernel:40
Kyle Gospo
Kyle Gospoβ€’2y ago
FROM ghcr.io/ublue-os/fsync:latest AS fsync
bsherman
bshermanOPβ€’2y ago
FROM ghcr.io/ublue-os/fsync-kernel:40 AS fsync
Kyle Gospo
Kyle Gospoβ€’2y ago
AH thank you
M2
M2β€’2y ago
Sorry. We added the -kernel because of all of the other kernels
bsherman
bshermanOPβ€’2y ago
needs to match the fedora release version, latest isn't being published
Kyle Gospo
Kyle Gospoβ€’2y ago
nah all good secure_boot_key_url: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' was this key updated? actually it's goofy that this points to akmods anyway gonna redirect this to my own repo
M2
M2β€’2y ago
No Only place new key is hung right now is in kernel-cache I also want to clean up the old fsync and things tagged with latest in kernel-cache. Okay to unpublish?
Kyle Gospo
Kyle Gospoβ€’2y ago
give it a couple days need to get this on bazzite main and I'm testing other things
M2
M2β€’2y ago
Okay
Kyle Gospo
Kyle Gospoβ€’2y ago
GitHub
chore: Update kernel source Β· ublue-os/bazzite@dcf9b05
Bazzite is a custom image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld. - chore: Update kernel source Β· ublue-os/...
Kyle Gospo
Kyle Gospoβ€’2y ago
Know what I'm missing?
# Install kernel-fsync
COPY --from=fsync /tmp/rpms /tmp/fsync-rpms
RUN rpm-ostree cliwrap install-to-root / && \
if [[ "${KERNEL_FLAVOR}" =~ "fsync" ]]; then \
echo "Will install ${KERNEL_FLAVOR} kernel" && \
rpm-ostree override replace \
--experimental \
/tmp/fsync-rpms/kernel-6*.rpm \
/tmp/fsync-rpms/kernel-core-*.rpm \
/tmp/fsync-rpms/kernel-modules-*.rpm \
/tmp/fsync-rpms/kernel-uki-virt-*.rpm \
; else \
echo "will use kernel from ${KERNEL_FLAVOR} images" \
; fi && \
ostree container commit
# Install kernel-fsync
COPY --from=fsync /tmp/rpms /tmp/fsync-rpms
RUN rpm-ostree cliwrap install-to-root / && \
if [[ "${KERNEL_FLAVOR}" =~ "fsync" ]]; then \
echo "Will install ${KERNEL_FLAVOR} kernel" && \
rpm-ostree override replace \
--experimental \
/tmp/fsync-rpms/kernel-6*.rpm \
/tmp/fsync-rpms/kernel-core-*.rpm \
/tmp/fsync-rpms/kernel-modules-*.rpm \
/tmp/fsync-rpms/kernel-uki-virt-*.rpm \
; else \
echo "will use kernel from ${KERNEL_FLAVOR} images" \
; fi && \
ostree container commit
I assume the problem is here
M2
M2β€’2y ago
Akmods is a day behinf
Kyle Gospo
Kyle Gospoβ€’2y ago
ahh ok sorry I'll rebuild that
Kyle Gospo
Kyle Gospoβ€’2y ago
No description
Kyle Gospo
Kyle Gospoβ€’2y ago
trying this change as well definitely cleaner if it works
M2
M2β€’2y ago
If you look at bshermans PR that will base akmods on kernel-cache This is the issue were trying to eliminate Also if you don't mind shipping devel packages you can just install everything in that directory
bsherman
bshermanOPβ€’2y ago
Yay! πŸ™‚ my PR got merged
M2
M2β€’2y ago
Hopefully no more kernel skew and just now package skew! Now to go implement installing from cache for main / hwe / bluefin
bsherman
bshermanOPβ€’2y ago
yeah, i think that's the priority before double sign, right?
M2
M2β€’2y ago
Yeah. I think so
bsherman
bshermanOPβ€’2y ago
will prevent build fails
M2
M2β€’2y ago
No one should have only the new key yet.
bsherman
bshermanOPβ€’2y ago
@M2 minor issue, i think we added extra double quotes to the kernel_cache ostree.linux labels
$ skopeo inspect docker://ghcr.io/ublue-os/coreos-testing-kernel:40|jq -r '.["Labels"]["ostree.linux"]'
"6.8.11-300.fc40.x86_64"
$ skopeo inspect docker://ghcr.io/ublue-os/coreos-testing-kernel:40|jq -r '.["Labels"]["ostree.linux"]'
"6.8.11-300.fc40.x86_64"
$ skopeo inspect docker://ghcr.io/ublue-os/coreos-testing-kernel:40|jq '.["Labels"]["ostree.linux"]'
"\"6.8.11-300.fc40.x86_64\""
$ skopeo inspect docker://ghcr.io/ublue-os/coreos-testing-kernel:40|jq '.["Labels"]["ostree.linux"]'
"\"6.8.11-300.fc40.x86_64\""
we need to fix it i can PR, but that's not correct
M2
M2β€’2y ago
Yeah. Seeing that now. Makes sense on what RJ was saying about using tr You can use | tr '"' to strip it for now in ucore
bsherman
bshermanOPβ€’2y ago
i'm not working around with tr πŸ™‚ we should fix
M2
M2β€’2y ago
Agreed Wow.... Stupid yaml strings are being strings getting me
bsherman
bshermanOPβ€’2y ago
this should be all it needs working with PR: https://github.com/ublue-os/kernel-cache/actions/runs/9897080735/job/27340751854?pr=14#step:9:64 previous not correct: https://github.com/ublue-os/kernel-cache/actions/runs/9895211309/job/27334585507#step:9:64 yes, yaml strings are PITA approval if you can please @Kyle Gospo ... we'll have to kickoff another akmods build, after this mergeds and builds because akmods inherits the ostree.linux field from kernel-cache merged and rebuilding kernel-cache kernel-cache rebuilt now rebuilding akmods 39 and 40
Kyle Gospo
Kyle Gospoβ€’2y ago
Awesome That just leaves dual signing, yes?
M2
M2β€’2y ago
For akmods. Main/hwe/bluefin still need to switch over to kernel-cache
bsherman
bshermanOPβ€’2y ago
akmods all rebuilt Right so our pending tasks in rough priority order: 1. convert main to use kernel-cache (always reinstall kernel) 2. convert hwe to use kernel-cache (always reinstall kernel for asus/surface, etc) 3. convert bluefin to use kernel-cache (always reinstall kernel) 4. add dual-signing to akmods 5. split zfs into distinct akmods build (Containerfile.zfs) and also move over residual zfs bits from ucore-kmods 6. add ucore specific addons to akmods to be built for coreos images
Kyle Gospo
Kyle Gospoβ€’2y ago
@M2 dual signing not working breaks existing users
M2
M2β€’2y ago
What's broken? Secureboot or the kernel?
Kyle Gospo
Kyle Gospoβ€’2y ago
secure boot it fails to load the kernel w/ the old key
M2
M2β€’2y ago
Can you do a secureboot off and dump the certificates?
Kyle Gospo
Kyle Gospoβ€’2y ago
working on it, secure boot off broke my luks tpm
bsherman
bshermanOPβ€’2y ago
in all seriousness, i'm happy to help with the task list above and secureboot testing, but i need to unplug on ublue for several hours for "day job"
M2
M2β€’2y ago
Luks tpm needs secureboot on. We bind to secureboot state
Kyle Gospo
Kyle Gospoβ€’2y ago
send me the command you want run
M2
M2β€’2y ago
Just need to know what failed for the dual signing.
Kyle Gospo
Kyle Gospoβ€’2y ago
booting now
M2
M2β€’2y ago
Once in.... mokutil --list-enrolled sbverify /usr/lib/modules/*/vmlinuz
M2
M2β€’2y ago
That looks like mokutil. I see old cert
Kyle Gospo
Kyle Gospoβ€’2y ago
https://paste.centos.org/view/22536e06 first was mok 2nd is kernel
M2
M2β€’2y ago
Okay. That's weird
bsherman
bshermanOPβ€’2y ago
did the new cert simply not get enrolled?
Kyle Gospo
Kyle Gospoβ€’2y ago
this is an existing install, so that's correct the problem is the 2nd paste, kernel sigs are invalid
bsherman
bshermanOPβ€’2y ago
ahh... and since it's not enrolled it's failing the sig check got it
M2
M2β€’2y ago
GitHub
Cache Kernels Β· ublue-os/kernel-cache@78555fe
A caching layer for Fedora kernels. Contribute to ublue-os/kernel-cache development by creating an account on GitHub.
M2
M2β€’2y ago
Just one of the signatures needs to be valid
Kyle Gospo
Kyle Gospoβ€’2y ago
https://paste.centos.org/view/2599b589 previous kernel w/ secure boot turned back on so uhhh not the problem(?) kylegospo@daedalus:~$ sbverify /usr/lib/modules//vmlinuz Signature verification failed this is my desktop on the old kernel that command doesn't work lol ```sbverify --list /usr/lib/modules//vmlinuz signature 1 image signature issuers: - /O=Universal Blue/OU=akmods/emailAddress=jorge.castro@gmail.com/L=None/ST=None/C=XX/CN=ublue akmods image signature certificates: - subject: /O=Universal Blue/OU=akmods/emailAddress=jorge.castro@gmail.com/L=None/ST=None/C=XX/CN=ublue akmods issuer: /O=Universal Blue/OU=akmods/emailAddress=jorge.castro@gmail.com/L=None/ST=None/C=XX/CN=ublue akmods ``` this works I will do the same on my handheld w/ new kernel
M2
M2β€’2y ago
Sorry tired. Missed the --list. Sbverify is done with the certificate.
Kyle Gospo
Kyle Gospoβ€’2y ago
https://paste.centos.org/view/09612a19 there we go -- not signed
M2
M2β€’2y ago
Uhmmm what the Which kernel are you using
Kyle Gospo
Kyle Gospoβ€’2y ago
signature 1
image signature issuers:
- /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./CN=Red Hat Test Certifying CA
image signature certificates:
- subject: /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./CN=Red Hat Test Certificate
issuer: /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./CN=Red Hat Test Certifying CA
signature 1
image signature issuers:
- /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./CN=Red Hat Test Certifying CA
image signature certificates:
- subject: /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./CN=Red Hat Test Certificate
issuer: /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./CN=Red Hat Test Certifying CA
M2
M2β€’2y ago
Yeah thats not our certs at all
Kyle Gospo
Kyle Gospoβ€’2y ago
6.9.8-201 fsync just verified that the fsync copr is not still present so it's fsync from kernel-fsync
M2
M2β€’2y ago
Okay. The RPM I have downloaded has vmlinuz signed with our keys
M2
M2β€’2y ago
No description
M2
M2β€’2y ago
and on the most recent run its there as well. https://github.com/ublue-os/kernel-cache/actions/runs/9897204070/job/27341138629#step:11:783 where did this signature come from?
Kyle Gospo
Kyle Gospoβ€’2y ago
how'd you download it? FROM ghcr.io/ublue-os/fsync-kernel:latest AS fsync
# Install kernel-fsync
COPY --from=fsync /tmp/rpms /tmp/fsync-rpms
RUN rpm-ostree cliwrap install-to-root / && \
if [[ "${KERNEL_FLAVOR}" =~ "fsync" ]]; then \
echo "Will install ${KERNEL_FLAVOR} kernel" && \
rpm-ostree override replace \
--experimental \
/tmp/fsync-rpms/kernel-[0-9]*.rpm \
/tmp/fsync-rpms/kernel-core-*.rpm \
/tmp/fsync-rpms/kernel-modules-*.rpm \
/tmp/fsync-rpms/kernel-uki-virt-*.rpm \
; else \
echo "will use kernel from ${KERNEL_FLAVOR} images" \
; fi && \
ostree container commit
# Install kernel-fsync
COPY --from=fsync /tmp/rpms /tmp/fsync-rpms
RUN rpm-ostree cliwrap install-to-root / && \
if [[ "${KERNEL_FLAVOR}" =~ "fsync" ]]; then \
echo "Will install ${KERNEL_FLAVOR} kernel" && \
rpm-ostree override replace \
--experimental \
/tmp/fsync-rpms/kernel-[0-9]*.rpm \
/tmp/fsync-rpms/kernel-core-*.rpm \
/tmp/fsync-rpms/kernel-modules-*.rpm \
/tmp/fsync-rpms/kernel-uki-virt-*.rpm \
; else \
echo "will use kernel from ${KERNEL_FLAVOR} images" \
; fi && \
ostree container commit
this is what bazzite is doing and getting the unsigned/original fsync
bsherman
bshermanOPβ€’2y ago
we aren't publishing latest
M2
M2β€’2y ago
yeah....
bsherman
bshermanOPβ€’2y ago
we need to use API to purge all latest from those
M2
M2β€’2y ago
FROM ghcr.io/ublue-os/fsync-kernel:40 AS fsync
bsherman
bshermanOPβ€’2y ago
then there will be a proper error if someone tries to use it
M2
M2β€’2y ago
@Kyle Gospo https://discord.com/channels/1072614816579063828/1259209376011517995/1261018256265707621 yeah latest would of been from yesterday prior to signing I'm sorry.... should of killed the latest tags when we started the new packages
bsherman
bshermanOPβ€’2y ago
i'm fixing now i did it manuall via UI, but i think i deleted all: - latest - 39-latest - 40-latest - major.minor.patch as our agreed upon convention is: - RELEASE (eg, 39, 40, which is a release specific latest) - RELASE-major.minor.patch (eg, 40-6.9.8) - kernel-version (eg, 6.9.8-268.rog.fc40.x86_64) we could probably add those tag conventions to README πŸ™‚ so much for me working LOL
M2
M2β€’2y ago
Yeah ... I also will add signature verification to the workflow
Kyle Gospo
Kyle Gospoβ€’2y ago
ah, ok I'll update on my end
bsherman
bshermanOPβ€’2y ago
to which workflow?
Kyle Gospo
Kyle Gospoβ€’2y ago
FROM ghcr.io/ublue-os/fsync-kernel:${FEDORA_MAJOR_VERSION} AS fsync ezpz thank you both
M2
M2β€’2y ago
Well to the fetch script or in the downstream image
bsherman
bshermanOPβ€’2y ago
or both! πŸ˜„
M2
M2β€’2y ago
Actually wouldn't be a bad idea That would be a good action step
Kyle Gospo
Kyle Gospoβ€’2y ago
working now! thanks guys oh, what did we go with for the new enrollment password? universalblue?
M2
M2β€’2y ago
yes. Should be good. minimun length is 8 characters
Kyle Gospo
Kyle Gospoβ€’2y ago
well the key is already made just wondering what we went with lol gotta update the docs since I'm pointing our ISOs to the new one now
bsherman
bshermanOPβ€’2y ago
this password you are talking about is not in the key/cert we use for signing, it's hard coded in the installer ISO though... and it's in our just config for enrolling secure-boot key/MOK its something a user would type manually if self-enrolling a MOK, but not part of the MOK itself and i don't think config/just or ISOs have been updated with a changed password, unless i've just missed it
M2
M2β€’2y ago
No config hasn't been updated yet. Bazzite should be changing. Working on main right now
bsherman
bshermanOPβ€’2y ago
Oh I guess I misread. And you are trying to update the ISO to the agreed upon password. πŸ€¦β€β™‚οΈ I feel dumb. I’m going to feed the family
bsherman
bshermanOPβ€’2y ago
No description
Kyle Gospo
Kyle Gospoβ€’2y ago
ok, done
Kyle Gospo
Kyle Gospoβ€’2y ago
Kyle Gospo
Kyle Gospoβ€’2y ago
this is the last thing to update from bazzite's perspective
M2
M2β€’2y ago
hwe needs update as well since you have some asus images main is about done
M2
M2β€’2y ago
GitHub
feat: use cached kernel by m2Giles Β· Pull Request #605 Β· ublue-os/m...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’2y ago
looks like very old podman doesn't like create a container from a scratch image
Kyle Gospo
Kyle Gospoβ€’2y ago
they don't use hwe or at least, hwe's kernel gets replaced w/ fsync
M2
M2β€’2y ago
interesting. THought you kept Asus's
Kyle Gospo
Kyle Gospoβ€’2y ago
naw, would just be yet another difference we get HWE's software, but the fsync kernel has all asus patches and a few removed where the ones in asus's kernel are absolutely awful
M2
M2β€’2y ago
struggling with the fact that the rpms have the same name for main rpm-ostree override replace doesn't seem to work i'm about to just delete vmlinuz and extract vmlinuz into place So if there is kernel skew, we can use rpm-ostree override replace. If there is no kernel skew the only thing that needs to change is vmlinuz. Dnf handles this fine with reinstall but rpm-ostree doesn't seem to have the same I don't want to change version numbers of main. But I think main is the only one where we run into this issue. I want to try manually swapping the vmlinuz file if kernel versions match. We can get the vmlinuz package using rpm2cpio. When kernel versions don't match we can use rpm-ostree override replace.
bsherman
bshermanOPβ€’2y ago
just --force πŸ˜‚ i wish it were so easy
M2
M2β€’2y ago
swapping the file seems to keep rpm happy. no idea if ostree liked that....
bsherman
bshermanOPβ€’2y ago
can always test it
M2
M2β€’2y ago
kernel-install says no
bsherman
bshermanOPβ€’2y ago
😦
M2
M2β€’2y ago
wait... it picked up host
bsherman
bshermanOPβ€’2y ago
if you can push an image to a registry i'll test in a VM? the latest code in PR branch doesn't have this change so i can 't build my own πŸ™‚
M2
M2β€’2y ago
GitHub
feat: use cached kernel Β· ublue-os/main@4e84235
OCI base images of Fedora with batteries included. Contribute to ublue-os/main development by creating an account on GitHub.
M2
M2β€’2y ago
code was pushed
bsherman
bshermanOPβ€’2y ago
that's an interesting approach... and... i'll probably need the same solution for ucore that is, however we solve this for main needs to be done the same way for ucore if we are going to ship ublue signed kernels so with this solution... now if there IS kernel skew we don't get the desired kernel. seems like we want to handle both cases, but for now just trying to test if this works?
M2
M2β€’2y ago
Correct that's why I have the todo Please draft this so no one attempts to merge seeing green
bsherman
bshermanOPβ€’2y ago
drafted
M2
M2β€’2y ago
Case 1: Kernel skew: use rpm-ostree override replace on kernel, core, modules, modules-core, modules-extra Case 2 (default case): No skew: swap vmlinuz Case 1 is are normal kernel swap, but case 2 was giving me fits
bsherman
bshermanOPβ€’2y ago
built the image locally, pushing to local registry... will test
M2
M2β€’2y ago
Note, since it didn't do kernel install.... It didn't run through dracut (which doesn't work when used with kernel install) But sbverify shows the signature was on the kernel
bsherman
bshermanOPβ€’2y ago
right
M2
M2β€’2y ago
And rpm still saw the file as part of kernel-core package
bsherman
bshermanOPβ€’2y ago
so, there are a couple questions with this approach: 1) will it boot even non secureboot? 2) if i import this new key will it boot with secureboot? 3) if i rebase, reboot, rollback, reboot, will it still boot? 4) does the initramfs regen have anything to do with it? ok, 0) fails to boot in secureboot WITHOUT the key, that's good 1) boots without secureboot
M2
M2β€’2y ago
4) we can manually do initramfs gen to pick up the stuff from config.
bsherman
bshermanOPβ€’2y ago
bsherman@fedora:~$ sbverify --list /usr/lib/modules/6.9.7-200.fc40.x86_64/vmlinuz
signature 1
image signature issuers:
- /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./OU=Fedora Secure Boot CA 20200709/CN=fedoraca
image signature certificates:
- subject: /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./OU=Fedora Secure Boot Signer/OU=bkernel01 kernel/CN=kernel-signer
issuer: /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./OU=Fedora Secure Boot CA 20200709/CN=fedoraca
signature 2
image signature issuers:
- /C=XX/L=Default City/O=Default Company Ltd
image signature certificates:
- subject: /C=XX/L=Default City/O=Default Company Ltd
issuer: /C=XX/L=Default City/O=Default Company Ltd
signature 3
image signature issuers:
- /CN=Test Key for Dual Signatures
image signature certificates:
- subject: /CN=Test Key for Dual Signatures
issuer: /CN=Test Key for Dual Signatures
bsherman@fedora:~$ sbverify --list /usr/lib/modules/6.9.7-200.fc40.x86_64/vmlinuz
signature 1
image signature issuers:
- /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./OU=Fedora Secure Boot CA 20200709/CN=fedoraca
image signature certificates:
- subject: /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./OU=Fedora Secure Boot Signer/OU=bkernel01 kernel/CN=kernel-signer
issuer: /C=US/ST=Massachusetts/L=Cambridge/O=Red Hat, Inc./OU=Fedora Secure Boot CA 20200709/CN=fedoraca
signature 2
image signature issuers:
- /C=XX/L=Default City/O=Default Company Ltd
image signature certificates:
- subject: /C=XX/L=Default City/O=Default Company Ltd
issuer: /C=XX/L=Default City/O=Default Company Ltd
signature 3
image signature issuers:
- /CN=Test Key for Dual Signatures
image signature certificates:
- subject: /CN=Test Key for Dual Signatures
issuer: /CN=Test Key for Dual Signatures
that's correct, since it was test signing key
M2
M2β€’2y ago
Oh you built that as well?
bsherman
bshermanOPβ€’2y ago
did you push the image to ghcr in that action run? i didn't even realize hmm... we can't enroll the test key so easily though, since it's not on the image
M2
M2β€’2y ago
Yeah that image has the wrong keys
bsherman
bshermanOPβ€’2y ago
it would have wrong keys in a PR image too
M2
M2β€’2y ago
We're not building here. That image is coming from ublue-os/main-kernel:40 So somehow that didn't signed correctly
bsherman
bshermanOPβ€’2y ago
oh, yeah, crap the last run was even scheduled and yep, it skipped https://github.com/ublue-os/kernel-cache/actions/runs/9900362761/job/27350999988
M2
M2β€’2y ago
Looks like the condition for grab keys for scheduled didn't work
No description
bsherman
bshermanOPβ€’2y ago
i'm reading the workflow conditions
M2
M2β€’2y ago
Watch as it's scheduled instead of schedule
bsherman
bshermanOPβ€’2y ago
M2
M2β€’2y ago
Yeah. I'm off to bed. You can do a dispatch run to clear the tags
bsherman
bshermanOPβ€’2y ago
already started the dispatch run akmods didn't run, so that's good
M2
M2β€’2y ago
Quick thought on adding a sbsign check in the runner. Use `podman run --entrypoint /bin/bash image -c "cat path to vmlinuz" > tmp/vmlinuz And then do a sbverify --cert
bsherman
bshermanOPβ€’2y ago
you want that in kernel-cache?
M2
M2β€’2y ago
Yeah after image build and before push
bsherman
bshermanOPβ€’2y ago
to block test key pushing?
M2
M2β€’2y ago
Yepp
bsherman
bshermanOPβ€’2y ago
k distinct PR πŸ™‚
M2
M2β€’2y ago
Agreed
bsherman
bshermanOPβ€’2y ago
actually, created an issue for this so i can get back to testing actually, they started before the kernel-cache rebuild finished, so i cancelled akmods and restarted manually
bsherman
bshermanOPβ€’2y ago
I did some testing on a silverblue-main image built with the current branch for testing kernel-cache signed kernel replacement and reported here: https://github.com/ublue-os/main/pull/605#issuecomment-2224466568
GitHub
feat: use cached kernel by m2Giles Β· Pull Request #605 Β· ublue-os/m...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’2y ago
Okay. I can get the second half implemented. While it's goofy, it works. We can talk about improvements in future for minimizing size costs. After kernel swap is done we have akmods dual signing For akmods dual sign we should be able to use rpmrebuild for adding the additional signature like we are doing with the kernel main is about done now. Working on secureboot check right now that block should be able to be copied into all of our workflows this is working in the pr. I haven't gotten the secureboot check working but kinoite-main has kernel skew, but silverblue-main does not So silverblue-main only copies the signed kernel, while kinoite-main downgrades the kernel
M2
M2β€’2y ago
No description
M2
M2β€’2y ago
No description
M2
M2β€’2y ago
Removing the secureboot check for now. Will add in another PR later
M2
M2β€’2y ago
GitHub
feat: use cached kernel by m2Giles Β· Pull Request #605 Β· ublue-os/m...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’2y ago
Not doing the SB check in this PR now. But you can see that kinoite 39 does a downgrade, while silverblue 39 just does a kernel swap But this is ready for review. @bsherman @Kyle Gospo @Robert (p5) @EyeCantCU Working on hwe right now. Nvidia is good. Asus running through now. Surface is annoying with kernel package being named differently Asus and Nvidia are now good. Working on surface alright, surface is being very, very fickle hwe should also be ready now main and hwe are ready hwe main-nvidia inherits signed kernel from main @bsherman @Kyle Gospo @Robert (p5) @EyeCantCU Next up is bluefin. Thoughts for akmods is that we will do the same rpmrebuild technique
bsherman
bshermanOPβ€’2y ago
i approved hwe, and main already merged... by "same rpmrebuild technique" you are referring to the signing process used in kernel-cache, right?
M2
M2β€’2y ago
Yes. Let akmods build the RPMs then repack it Need to sign the .ko's and .ko.xz's
bsherman
bshermanOPβ€’2y ago
needed due to our multi-key sign, right? since the akmods script would only use one key
M2
M2β€’2y ago
Yepp We can have it be an optional turn on like in kernel-cache So when we are only using one key it's not doing the repack Most up to date key goes for to akmods expected spot. Old key that's getting cycled out goes into slot 2
bsherman
bshermanOPβ€’2y ago
seems great
M2
M2β€’2y ago
Noticing that image sizes are a little larger due to the copy over. After completing akmods and bluefin. I will look into slimming down the image by reducing copies.
bsherman
bshermanOPβ€’2y ago
Yep. I think slight increase is worth it for reliability, but solving that is of course a nice thing
Robert
Robertβ€’2y ago
Finally got around to resolving the build errors in a slightly simpler way than a kernel-cache repo in a custom image (without supporting third-party kernels). Mostly following how Ben and M2 did it. For anybody else crazy enough to be maintaining their own Nvidia builds, here is what it needed: 1. Switch the builder to Fedora Workstation 2. Query the kernel version from the upstream images 3. Install the upstream kernel version on the workstation container build Obviously this doesn't allow for any custom fsync kernels since it's not touching the user-facing kernels, but it does allow for the nvidia and nvidia-open kmods to build in a way that's compatible with installing to the ci-test images. https://github.com/rsturla/akmods/commit/b2110b5d7abe1247d2f7d465655e42443fe7efec
M2
M2β€’17mo ago
I got sbverify working as part of the actions so we can make sure that the kernel is signed in downstream images it will look something like this:
- name: Check Secureboot
id: secureboot
shell: bash
run: |
set -x
if [[ ! $(command -v sbverify) || ! $(command -v curl) || ! $(command -v openssl) ]]; then
sudo apt update
sudo apt install sbsigntool curl openssl
fi
podman run --rm "${{ env.IMAGE_NAME }}":$(echo "${{ steps.generate_tags.outputs.build_tags }}" | cut -d " " -f 1) /bin/bash -c "cat /usr/lib/modules/*/vmlinuz" > vmlinuz
sbverify --list vmlinuz
curl -Lo akmods.der https://github.com/ublue-os/kernel-cache/raw/main/certs/public_key_2.der
openssl x509 -in akmods.der -out akmods.crt
sbverify --cert akmods.crt vmlinuz
- name: Check Secureboot
id: secureboot
shell: bash
run: |
set -x
if [[ ! $(command -v sbverify) || ! $(command -v curl) || ! $(command -v openssl) ]]; then
sudo apt update
sudo apt install sbsigntool curl openssl
fi
podman run --rm "${{ env.IMAGE_NAME }}":$(echo "${{ steps.generate_tags.outputs.build_tags }}" | cut -d " " -f 1) /bin/bash -c "cat /usr/lib/modules/*/vmlinuz" > vmlinuz
sbverify --list vmlinuz
curl -Lo akmods.der https://github.com/ublue-os/kernel-cache/raw/main/certs/public_key_2.der
openssl x509 -in akmods.der -out akmods.crt
sbverify --cert akmods.crt vmlinuz
I guess the cat method doesn't work with the 22.04 builder
M2
M2β€’17mo ago
No description
M2
M2β€’17mo ago
but this does
M2
M2β€’17mo ago
Think I have the pathway for dual signing down for kmods. This should result in kvmfr to have two signatures https://github.com/ublue-os/akmods/actions/runs/9946624178/job/27477574324
GitHub
feat: Enable Dual Signing for akmods Β· ublue-os/akmods@0854ab0
A caching layer for pre-built Fedora akmod RPMs. Contribute to ublue-os/akmods development by creating an account on GitHub.
M2
M2β€’17mo ago
i only see the second signature
M2
M2β€’17mo ago
No description
M2
M2β€’17mo ago
modinfo only seems to show the last signature
M2
M2β€’17mo ago
No description
M2
M2β€’17mo ago
so the signatures are getting appended. Will the kernel actually load them is the question
bsherman
bshermanOPβ€’17mo ago
next up for me is this bit:
split zfs into distinct akmods build (Containerfile.zfs) and also move over residual zfs bits from ucore-kmods
bsherman
bshermanOPβ€’17mo ago
GitHub
refactor: split zfs into distinct image by bsherman Β· Pull Request ...
Initially ZFS support was added as part of the akmods common image and corresponding workflow matrix element. This splits ZFS support into a distinct: workflow matrix element (distinct build) Cont...
bsherman
bshermanOPβ€’17mo ago
ready to go for +1
M2
M2β€’17mo ago
I put in some comments really only the final copy is a blocker
bsherman
bshermanOPβ€’17mo ago
final copy? oh, i see the 3rd comment now
M2
M2β€’17mo ago
Alright that all looks good! Did you see my issue about tagging with kernel version?
bsherman
bshermanOPβ€’17mo ago
been AFK, then working, just getting back to this. i replied on kernel tagging issue https://github.com/ublue-os/akmods/issues/216#issuecomment-2231580804 so.... https://github.com/ublue-os/bluefin/pull/1513 i'm working on it intermittently... but welcome feedback
M2
M2β€’17mo ago
I wonder if this is due to container in container. And that we are on an old version We could just hardcode to akmods-zfs:coreos-stable-${FEDORA-MAJOR-VERSION} For now. Could try mounting it in to avoid a wasteful copy layer
bsherman
bshermanOPβ€’17mo ago
oh, i see you just made a change i like the bind mount idea
M2
M2β€’17mo ago
GitHub
refactor: use akmods-zfs for ZFS install Β· ublue-os/bluefin@6bbeb7d
The next generation Linux workstation, designed for reliability, performance, and sustainability. - refactor: use akmods-zfs for ZFS install Β· ublue-os/bluefin@6bbeb7d
M2
M2β€’17mo ago
It builds it needs the newer podman from 24.04 it also hardcodes using coreos-stable-${FEDORA_MAJOR_VERSION}.... can I use the bind mount from inside a script? so I can do some sort of logic with it? looks like if it doesn't use a rw layer for those bind mounts... or it reuses it okay and we are green across the board. 24.04 works. Can look to change to using the obs build of podman instead until 24.04 is ready @bsherman
bsherman
bshermanOPβ€’17mo ago
i haven't messed with the obs build of podman... it's just a build we install over the pre-installed version on 22.04?
M2
M2β€’17mo ago
yepp on the runner it was one of the things we were trying for the tar bug looks like this
# Update Podman
- name: Setup Podman
shell: bash
run: |
# from https://askubuntu.com/questions/1414446/whats-the-recommended-way-of-installing-podman-4-in-ubuntu-22-04
ubuntu_version='22.04'
key_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key"
sources_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}"
echo "deb $sources_url/ /" | sudo tee /etc/apt/sources.list.d/devel-kubic-libcontainers-unstable.list
curl -fsSL $key_url | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
sudo apt-get update
sudo apt-get install -y podman
# Update Podman
- name: Setup Podman
shell: bash
run: |
# from https://askubuntu.com/questions/1414446/whats-the-recommended-way-of-installing-podman-4-in-ubuntu-22-04
ubuntu_version='22.04'
key_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key"
sources_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}"
echo "deb $sources_url/ /" | sudo tee /etc/apt/sources.list.d/devel-kubic-libcontainers-unstable.list
curl -fsSL $key_url | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
sudo apt-get update
sudo apt-get install -y podman
We also could do something like this instead from the pr on main
M2
M2β€’17mo ago
GitHub
main/.github/workflows/reusable-build.yml at ef474caf61592c27d211c2...
OCI base images of Fedora with batteries included. Contribute to ublue-os/main development by creating an account on GitHub.
M2
M2β€’17mo ago
Which I really like a lot of the changes
bsherman
bshermanOPβ€’17mo ago
see latest updates on bluefin PR looking weird, why is asus, etc not doing "build image" ? https://github.com/ublue-os/bluefin/actions/runs/9968090782/job/27542788534?pr=1513
M2
M2β€’17mo ago
we don't build image for asus/surface on PRs
M2
M2β€’17mo ago
M2
M2β€’17mo ago
This speeds up builds during PRs and the only difference we have for surface/asus is the evdi and not installing kernel from the kernel-cache
bsherman
bshermanOPβ€’17mo ago
makes sense! i just hadn't noticed pushed another update to use OBS podman @M2 😭 https://github.com/ublue-os/bluefin/actions/runs/9968374176/job/27543541390#step:20:135
M2
M2β€’17mo ago
24.04 it is for now
bsherman
bshermanOPβ€’17mo ago
yeah pushed
M2
M2β€’17mo ago
Okay will approve Akmods should be triggered immediately following when cache-kernel occurs.
bsherman
bshermanOPβ€’17mo ago
@M2 re: testing the dual-signed akmods... do you have a published image I can test with?
M2
M2β€’17mo ago
You can use either the bluefin or Aurora iso. Normal version. Then do local akmods build for common. That will build thr kvmfr module Extract and install. The two test public certs are in the repo. Default Company is cert 1 and Dual Signed is cert 2. I've been loading default company with MOK. I'm going to try seeing if we can directly load the cert in a running system to the system keyring
bsherman
bshermanOPβ€’17mo ago
oh I see, you've been testing with the test certs, not "real" certs good enough for testing though
M2
M2β€’17mo ago
yepp. VM so doesn't matter. kvmfr since it's in common but not installed by default on bluefin/aurora so for module signing the documentation reads that the signature is appended. So I'm thinking that it is limited to that last signature https://github.com/torvalds/linux/blob/master/scripts/sign-file.c this is the tool i've been using for kmod signing something i'm noticing is that wl, and xpad don't have the signature with Module Appended line but we don't have any write permissions to platform or machine keyring. We do have write to secondary_trust_keyring but I had mssing key when attempting to add a certificate to that keyring
M2
M2β€’17mo ago
SlideShare
Multi-signed Kernel Module
Multi-signed Kernel Module - Download as a PDF or view online for free
M2
M2β€’17mo ago
Resigning doesn't work. However you can use openssl directly and then use sign-file
Kyle Gospo
Kyle Gospoβ€’17mo ago
πŸ‘€
M2
M2β€’17mo ago
Okay still confused since only one public_cert is used with sign-file Well this still doesn't seem to work And it's working!!!!! Holy shit this was way harder than I expected
Kyle Gospo
Kyle Gospoβ€’17mo ago
what was the final fix?
M2
M2β€’17mo ago
2 things. 1. The signer file is both the signing key and certificate in one file. 2. The attached public cert at the end is all public certs in one file You don't use sign file to sign. Use openssl directly. Then use sign-file to attach the signature to the module Need to confirm that either key works. But the key that isn't shown in modinfo worked with a modprobe
M2
M2β€’17mo ago
No description
M2
M2β€’17mo ago
mokutil enrolled cert
M2
M2β€’17mo ago
No description
M2
M2β€’17mo ago
modinfo showing different cert
M2
M2β€’17mo ago
No description
M2
M2β€’17mo ago
inserting it and showing that exists
Kyle Gospo
Kyle Gospoβ€’17mo ago
what a pain why can't it just be consistent lol
M2
M2β€’17mo ago
like i seriously thought it would be something like sbsign.... but no.... i'm now totally thinking about modifying sign-file.c and adding that to kernel like seriously.... they all need to be keypairs so if there is an even amount of inputs..... go to the races
M2
M2β€’17mo ago
https://github.com/ublue-os/akmods/pull/215 Attached my updates here for people to test. Easiest test method is use bluefin:gts. 1. You need a secureboot enabled vm. 2. Clone the repo and switch to the pr branch. 3. Import the public key into using mokutil. mokutil --import akmods/certs/public_key.der.test 4. Build the akmods common container podman build -t akmods -f Containerfile.common --build-arg KERNEL_FLAVOR=coreos-stable FEDORA_MAJOR_VERSION=39 . 5. Create, export, and install rpm
podman create --name akmods localhost/akmods:latest sh
podman export akmods > /tmp/akmods.tar
tar -xvf /tmp/akmods.tar -C /tmp
rpm-ostree install /tmp/rpms/kmods/kmod-kvmfr-*.rpm --reboot
podman create --name akmods localhost/akmods:latest sh
podman export akmods > /tmp/akmods.tar
tar -xvf /tmp/akmods.tar -C /tmp
rpm-ostree install /tmp/rpms/kmods/kmod-kvmfr-*.rpm --reboot
6. Finish importing your key.
GitHub
feat: Enable Dual Signing for akmods by m2Giles Β· Pull Request #215...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’17mo ago
Alright. Assuming everything goes into extra for out of tree modules. Looping through the kmods to resign everything and rebuild in one script at the end looks like I'll need a little different script for zfs but common, extra, and nvidia all seem to build All but zfs appears to be working So zfs does not get installed as part of the build process. That was causing an issue If you want debug packages.... Well you can build and sign your own ZFS should be dual signed now it doesn't appear so.... grrr
bsherman
bshermanOPβ€’17mo ago
sorry, i've been stuck on annoying work problems today
Kyle Gospo
Kyle Gospoβ€’17mo ago
grrr
bsherman
bshermanOPβ€’17mo ago
grrr
Kyle Gospo
Kyle Gospoβ€’17mo ago
So-called free-thinkers when grrr
bsherman
bshermanOPβ€’17mo ago
thoughts are not free, they are quite expensive, in fact
Kyle Gospo
Kyle Gospoβ€’17mo ago
I don't know, I've seen some pretty worthless thoughts in my time
bsherman
bshermanOPβ€’17mo ago
depends where you get those thoughts πŸ˜‰ gotta pay for the good stuff
M2
M2β€’17mo ago
Okay so strings definitely seems to indicate no double signing I want my threadripper for compiling I'm just an idiot.... never actually copied over the rebuilt rpm.... and dual signing on zfs! again... that was harder than I expected
M2
M2β€’17mo ago
https://github.com/ublue-os/akmods/pull/215 Put it on ready for review. Someone other than me please test this thing
GitHub
feat: Enable Dual Signing for akmods by m2Giles Β· Pull Request #215...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’17mo ago
instructions are above with kvmfr you can also do an ostree admin unlock o swap other individual modules Dual signature also works with zfs. Used ostree admin unlock --hotfix to have a persistant change. It works with either public certificates
Kyle Gospo
Kyle Gospoβ€’17mo ago
@bsherman honors on the 2nd ack? I'm gonna test this in a bazzite:testing build right after it merges to be 100% sure it's good
M2
M2β€’17mo ago
bazzite testing sounds like a great place to test this Only concern I have is nvidia but, it appears to be the same as how extra/common build. ZFS is definitely the oddball
Kyle Gospo
Kyle Gospoβ€’17mo ago
@j0rge up for an ack?
j0rge
j0rgeβ€’17mo ago
gotchu fam do we need to coordinate changes down the line or is it just here?
Kyle Gospo
Kyle Gospoβ€’17mo ago
as long as there's no bugs, we're good everywhere just need to start using the new keys
j0rge
j0rgeβ€’17mo ago
lol wait until you see the heredoc stuff in main
M2
M2β€’17mo ago
Bazzite testing gonna be truly testing
j0rge
j0rgeβ€’17mo ago
your bazzite containerfile life is about to go booooooom.
M2
M2β€’17mo ago
@Kyle Gospo queued akmods
Kyle Gospo
Kyle Gospoβ€’17mo ago
Sweet
M2
M2β€’17mo ago
Why aren't they running? @j0rge anything using the builders They all have waiting for a runner
j0rge
j0rgeβ€’17mo ago
looking
j0rge
j0rgeβ€’17mo ago
No description
j0rge
j0rgeβ€’17mo ago
stuck here
j0rge
j0rgeβ€’17mo ago
GitHub Status
Welcome to GitHub's home for real-time and historical data on system performance.
j0rge
j0rgeβ€’17mo ago
appears to be an actions outage?
M2
M2β€’17mo ago
@Kyle Gospo how has dual signed kmods been going on testing? Have you tried with only the new pulic key in the MOK?
bsherman
bshermanOPβ€’17mo ago
i got bit by an unsigned kernel today πŸ™‚ had to disable secure boot... i'm guessing it'll be fixed with our new changes, once we get a clean build of 40
M2
M2β€’17mo ago
Yepp We can add the same check to ucore as well
bsherman
bshermanOPβ€’17mo ago
yep, i plan to do so once i'm pulling in the kernel cache stuff i plan to: 1) add a couple ucore only packages to akmods 2) convert ucore to kernel-cache + akmods w/ signature check
M2
M2β€’17mo ago
Sounds good.
M2
M2β€’17mo ago
GitHub
chore(ci): Check secureboot signatures by m2Giles Β· Pull Request #1...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’17mo ago
next up is confirming kmods
M2
M2β€’17mo ago
this is making me feel dumb again
M2
M2β€’17mo ago
GitHub
feat: verify kmod signatures for dual-sign by m2Giles Β· Pull Reques...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’17mo ago
GitHub
feat: verify kmod signatures for dual-sign Β· ublue-os/akmods@325c2c7
A caching layer for pre-built Fedora akmod RPMs. Contribute to ublue-os/akmods development by creating an account on GitHub.
M2
M2β€’17mo ago
So we could create another container that then tests the rpms or we can call this good enough. added a test container Almost got the test container finished off common is working, now working through extra/nvidia/zfs nvidia and zfs should be good now and extra has gone green
M2
M2β€’17mo ago
GitHub
feat: verify kmod signatures for dual-sign by m2Giles Β· Pull Reques...
Thank you for contributing to the Universal Blue project! Please read the Contributor's Guide before submitting a pull request.
M2
M2β€’17mo ago
Ready for review The longest ones take like 20ish minutes to build now which sucks but most of that was mesa-filesystem taking forever to download
bsherman
bshermanOPβ€’17mo ago
interesting... so, the test image (Container.test) mounts the previously built scratch akmods image and runs dual-sign check on all the RPMs that's sweet man ready to merge MERGED
j0rge
j0rgeβ€’17mo ago
what's next step do we need to announce anything?
bsherman
bshermanOPβ€’17mo ago
well, we still can't get clean builds thanks to package skew on mesa freeworld stuff, at least in F40 realistically, we are just tightening up our reliability here... yes, we're dual singing, but much more important IMHO, is the check M2 added to ensure expected signature(s) exist in kernel/kmod RPMs before publishing an image however, it doesn't change anything for downstreams
j0rge
j0rgeβ€’17mo ago
oh so nothing user visible then
M2
M2β€’17mo ago
Bluefin needs to switch to new public key for ISOs. Config needs an update to the just script for the new public key as well. All the adds have been to ensure that kmods/kernels are signed with what we expect right now.
bsherman
bshermanOPβ€’17mo ago
right, but not yet, right? we still need a full set of clean builds with verified signatures before we switch ISOs to use new key, etc
M2
M2β€’17mo ago
correct waiting on clean builds
bsherman
bshermanOPβ€’17mo ago
the ucore addons in akmods, which will let me shutdown ucore-kmods repo and have ucore source from akmods https://github.com/ublue-os/akmods/pull/219
GitHub
refactor: move ucore addons builds here by bsherman Β· Pull Request ...
This relocates the ucore-addons and ucore-nvidia RPM builds from ublue-os/ucore-kmods to ublue-os/akmods, allowing us to continue consolidating our build processes into more managable units. Note: ...
M2
M2β€’17mo ago
Do you want to add any tests for a ucore build?
bsherman
bshermanOPβ€’17mo ago
Such as? This PR doesn’t add kmods just those simple addons rpms
M2
M2β€’17mo ago
fair. Was just thinking if we should have another guard or something Alright there are also now staged PRs for main/hwe to go back to remove the COPY layers 40 being busted right now is frustrating
bsherman
bshermanOPβ€’17mo ago
@M2 hmm... kernel-cache failed https://github.com/ublue-os/kernel-cache/actions/runs/10024187753 but main f40 built! πŸ™‚ i think the problem is it's a main branch build, so should be using production keys but it's downloading test keys curl --retry 3 -Lo kernel-sign.der https://github.com/ublue-os/kernel-cache/raw/main/certs/public_key.der.test https://github.com/ublue-os/kernel-cache/actions/runs/10024187753/job/27705966906#step:12:134 https://github.com/ublue-os/kernel-cache/pull/19 I checked main's "Check Secureboot" job and it looks fine ditto hwe's @Kyle Gospo you able to hit this +1 also? thank you @Kyle Gospo πŸ’™
M2
M2β€’17mo ago
Oh darn. Need an if statement for making sure right public keys are downloaded for that test. I am confused since kernel cache worked yesterday.... Thanks for the quick fix Oh I see. We should double check akmods as well to make sure the check is fine there as well. But kernel consumers should be fine since no kernel signing there
bsherman
bshermanOPβ€’17mo ago
Yep. I’m pretty sure I checked akmods, I know I checked main and hwe And yes, any consumer of kernel-cache shouldn’t have a problem since they are consuming images with the proper β€œprod” keys.
M2
M2β€’17mo ago
I think you have some paths to handle. But super stoked.
bsherman
bshermanOPβ€’17mo ago
lol πŸ™‚ yeah, it failed after i pasted and what's odd, that built locally invalid mount type "cache"
M2
M2β€’17mo ago
24.04 Will fix that
bsherman
bshermanOPβ€’17mo ago
i'm on 24.04
M2
M2β€’17mo ago
Will look.
bsherman
bshermanOPβ€’17mo ago
AH! no... i have 3 jobs, so 3 places to change to 24.04 i was NOT on 24.04
M2
M2β€’17mo ago
About to say... I see 22.04 Stupid old podman/buildah
bsherman
bshermanOPβ€’17mo ago
ok, that was just the "fedora-coreos" images... now for ucore UGH
bsherman
bshermanOPβ€’17mo ago
GitHub
chore(ci): reduce copy layers Β· ublue-os/ucore@926d8ac
An OCI base image of Fedora CoreOS with batteries included - chore(ci): reduce copy layers Β· ublue-os/ucore@926d8ac
bsherman
bshermanOPβ€’17mo ago
i remember we hit this before ubuntu is so broken
M2
M2β€’17mo ago
I just wonder if we end up building with docker and then use podman to chunk it before pushing to ghcr. Like we are only missing some things on 24.04 but we'll have issues again possibly in a year or we go to nested build container
Kyle Gospo
Kyle Gospoβ€’17mo ago
In one year: Like we are only missing some things on 25.04 but we'll have issues again possibly in a year or we go to nested build container
j0rge
j0rgeβ€’17mo ago
what are the downsides of using the OBS podman builds?
M2
M2β€’17mo ago
They are currently old And it's not just podman. We also need an up to date buildah. The action builds with buildah not podman
j0rge
j0rgeβ€’17mo ago
ah ok I was gonna say, when podman-cache?
M2
M2β€’17mo ago
So it's with the Ubuntu runner. Not sure what is the easiest way to modify without just standing up a ppa
j0rge
j0rgeβ€’17mo ago
they just sunset the podman ppa last release or something
M2
M2β€’17mo ago
This is a barrier for adoption for them.
j0rge
j0rgeβ€’17mo ago
yeah not much we can do the red hat <-> canonical competitive landscape wins this one.
bsherman
bshermanOPβ€’17mo ago
seems like redhat not supporting a PPA is killing cross-platform usefulness of their container tooling solution
j0rge
j0rgeβ€’17mo ago
It's like the manager who decided "we should kill docker!" left half way through
bsherman
bshermanOPβ€’17mo ago
ok, my last PR related to this thread is ready and then i'll let the thread die πŸ™‚ https://github.com/ublue-os/ucore/pull/179 a littel help please? @Kyle Gospo @M2 @p5 ?
bsherman
bshermanOPβ€’17mo ago
@j0rge i'll take a +1 from you too πŸ™‚ i'm ready to GOOOOOOOO πŸ’™ @M2 and @Kyle Gospo πŸ™‚ i'll merge now
j0rge
j0rgeβ€’17mo ago
Let's gooooooooooooooooooooooooooooo my man was getting desperate
bsherman
bshermanOPβ€’17mo ago
πŸ˜„
j0rge
j0rgeβ€’17mo ago
"jorge we will allow you to click this button, but ONLY THIS ONE. AND ONLY ONCE PLEASE."
bsherman
bshermanOPβ€’17mo ago
well, i waited overnight πŸ˜‰ because I wanted to monitor the merge, but yeah, i just want it done now DONE i've carefully pulled prior versions of the images, i'm eager to measure the space savings
j0rge
j0rgeβ€’17mo ago
I didn't have any savings in bluefin according to dive but I'd be curious to see
bsherman
bshermanOPβ€’17mo ago
hah, maybe none for me either i was promised savings πŸ™‚ where's my savings? πŸ˜„ was buildah/podman already doing something smart for us?
j0rge
j0rgeβ€’17mo ago
I dunno, but we're about to compress them all with zstd:chunked so whatever invisible layer crap needs to be done before then I'm a +1 make everything nice and neat, sure, I'm in.
bsherman
bshermanOPβ€’17mo ago
yeah, regardless, it's a lot cleaner build
j0rge
j0rgeβ€’17mo ago
nod
M2
M2β€’17mo ago
No space savings at all? Wow. Wonder if ostree container commit was doing some sort of cleanup for us then
Kyle Gospo
Kyle Gospoβ€’17mo ago
best place to check would be bazzite-deck or bazzite-nvidia since both pull akmods multiple times
bsherman
bshermanOPβ€’17mo ago
Not on my local disk as compared by image size from β€œpodman pull”
M2
M2β€’17mo ago
interesting. We no longer have the copy layers. So unless the mounts are being committed or something it should be fine
Kyle Gospo
Kyle Gospoβ€’17mo ago
I did notice your script is failing to delete files from tmp saying that it's a read-only file system But that shouldn't be an issue since tmp does get wiped regardless during the container commit Worth a quick check
M2
M2β€’17mo ago
i mean yeah, the things it fails to delete is the mount themselves hence the || true but yeah, doing a new pull on silverblue and I see it's still on the hefty side bluefin (not -dx) seems to have 2 large layers, 1 that's 500 MB and 1 that's 900 MB
j0rge
j0rgeβ€’17mo ago
I never looked inside those maybe we can split them up more or something
bsherman
bshermanOPβ€’17mo ago
this is output from dive... I really don't think we have anything in /tmp except for this empty rpms dir which was the mount point
No description
bsherman
bshermanOPβ€’17mo ago
and this is a ucore-hci image, btw
M2
M2β€’17mo ago
That looks right. Nothing in tmp and nothing in var. We probably should point the /var/lib/alternatives to /etc (unsure) since I think var is mounted over and is just a mount point Ucore-hci is only 1.5 GB? Wow Or is there a delta? I thought everything in /usr is a hardlink
bsherman
bshermanOPβ€’17mo ago
No. That’s the ucore-minimal layer Which is where kmods get mounted. There’s then a ucore layer and a ucore-hci layer

Did you find this page helpful?