Closed Oakleafknight06 closed 2 months ago
I don't know how optfix functions currently to fix this issue now, but I know that we are waiting for rpm-ostree
v2024.3 update to land in Fedora, which includes this function natively, which will hopefully work better.
Related issue: https://github.com/blue-build/modules/issues/112
I assume that fix will land sometime soon when its ready? I was a bit confused going from bluebuild docs to the mentioned issue which was merged, wasnt sure when that lands in regular fedora atomic desktops
Probably no need for a fix with the current system as there's a manual workaround and an upstream fix coming sometime soon
I don't know how optfix functions currently to fix this issue now, but I know that we are waiting for
rpm-ostree
v2024.3 update to land in Fedora, which includes this function natively, which will hopefully work better.
I'm the original writer of the work around (Well, only did the bash code for it as a script in my personal image, but some other users started using it in theirs and it was made into a module by somebody else) and how it works is that it first symlinks /opt to point to /var/opt, and then it iterates through the specified directories and creates symlinks on /var/opt/[directory] to /usr/lib/opt/[directory] before installing packages.
This makes the packages successfully install, but for some reason, these symlinks sometimes don't make it to the final image.
I've tried to look into it, but I eventually gave up as I couldn't consistently reproduce the issue consistently. Sadly, it isn't an easy fix.
I could look into it once more, but as mentioned in #112, upstream's experimental feature should work better, so if I have time I'll take a look at how to enable it by default and make a pull request.
My current optfix version is v2024.4
. Do yall's builds work fine without using optfix at all?
My current optfix version is
v2024.4
I assume you mean rpm-ostree?
Do yall's builds work fine without using optfix at all?
Mine doesn't, and my rpm-ostree version is v2024.4
as well. I created a branch from main in my image and removed the optfix section I have on the rpm-ostree module and the build fails when installing the packages.
Mine doesn't, and my rpm-ostree version is
v2024.4
as well. I created a branch from main in my image and removed the optfix section I have on the rpm-ostree module and the build fails when installing the packages.
I believe that optfix
needs to be enabled as the experimental feature in rpm-ostree
I don't know currently how to do that in build-time, but I will try to investigate.
Here's how it works:
https://github.com/coreos/rpm-ostree/issues/233#issuecomment-1856720559
I think that we should go with environment variable solution (Modifying rpm-ostreed.service.d)
Needs to be tested.
https://github.com/blue-build/modules/pull/191
EDIT: Environment variable approach doesn't work. It's not documented how to use optfix in "compose time" at all to try the 2nd solution, so Idk how to solve this.
It's not documented how to use optfix in "compose time"
The only mention I've found of that is in the release page:
rpm-ostree now has experimental support for installing RPMs with files in /opt and /usr/local. This can be enabled at compose time (via the
opt-usrlocal-overlays
switch), or client-side using https://github.com/coreos/rpm-ostree/issues/233#issuecomment-1856720559.
However, I can't find where this switch is. I've tried rpm-ostree [command] --help and searching the source code for it and no dice.
Oh yeah, I think opt-usrlocal-overlays
is in the treefile. We should try to contrib that in upstream Fedora or at least make an issue.
I think someone already did? https://github.com/coreos/fedora-coreos-tracker/issues/1681
However, I can't find where this switch is. I've tried rpm-ostree [command] --help and searching the source code for it and no dice.
Okay, I figured it out. This switch was changed to an enum named opt-usrlocal
. As you said, it's on the treefile. https://coreos.github.io/rpm-ostree/treefile/#experimental-options
This is where the treefiles are. I can make an issue there later, if someone doesn't go first.
I run a custom image, https://github.com/Oakleafknight06/startingleaf, in which I install Mullvad VPN, which requires optfix as it installs into /opt. On my main workstation, this is working perfectly. However, on my secondary test system, the last two fresh installs I have done the symlink is not created correctly. The files are present in /usr/lib/opt/Mullvad\ VPN, but not in /opt/Mullvad\ VPN . To fix temporarily I have run
sudo ln -s /usr/lib/opt/Mullvad\ VPN /opt/Mullvad\ VPN
and with that mullvad works normally.(and a sidenote, I am new to filing issues so if I dont include anything you need or any other way I don't do the correct thing let me know, I'm happy to help)