Can't install package via script?

Waveterm isn't in Fedora repos, doesn't have a flatpak, etc, but they do release an rpm file. So I made a script that greps the URL and rpm-ostree installs the latest rpm package. Logs say: [14:09:18 g.i/k/charoite:latest] => #32 12.46 Installing 1 packages: [14:09:18 g.i/k/charoite:latest] => #32 12.46 waveterm-0.8.11-1.x86_64 (@commandline) [14:09:18 g.i/k/charoite:latest] => #32 13.38 Installing: waveterm-0.8.11-1.x86_64 (local) And no errors, the image builds fine, but the application is nowhere to be seen when updating.
Solution:
I've had this issue with other rpms that install to /opt. If that's the case, you need to use the optfix option in your recipe. You'll likely also need to modify the .desktop file so it appears in your menu. Here's how I do it with enpass which installs to /opt/enpass/...: In my recipe under the rpm-ostree module, I add:...
Jump to solution
8 Replies
valvix
valvixOP2mo ago
https://github.com/kityr/charoite my repo with the script and recipe and whatever (i commented out the script for now)
GitHub
GitHub - kityr/charoite: This is my OS based on silverblue-nvidia b...
This is my OS based on silverblue-nvidia by ublue. - kityr/charoite
Solution
Mike
Mike2mo ago
I've had this issue with other rpms that install to /opt. If that's the case, you need to use the optfix option in your recipe. You'll likely also need to modify the .desktop file so it appears in your menu. Here's how I do it with enpass which installs to /opt/enpass/...: In my recipe under the rpm-ostree module, I add:
optfix:
- enpass # This needs to be the directory name that it installs to under /opt
optfix:
- enpass # This needs to be the directory name that it installs to under /opt
I then add a finalize-enpass-install.sh script to modify the enpass.desktop file with:
sed -i 's|/opt/enpass/Enpass|/usr/lib/opt/enpass/Enpass|g' /usr/share/applications/enpass.desktop
sed -i 's|/opt/enpass/Enpass|/usr/lib/opt/enpass/Enpass|g' /usr/share/applications/enpass.desktop
valvix
valvixOP2mo ago
ohh, i see Thanks! haha wonder if optfix will fix the installation if it's not via the rpm-ostree module but by a script
Mike
Mike2mo ago
I believe the rpm-ostree module was updated so that you can install directly from a url. Just put the url to the .rpm in the 'install' section.
valvix
valvixOP2mo ago
Yes, but they don't have a permanent url for the latest package I have a script that gets it though, let's see if i can $(substitute) it in the recipe cuz i do have a script that echoes the url So maybe i can install: - $(files/scripts/waveterm.sh) doesnt seem to have crashed yet yep doesnt work that way cant have a file downloaded into files/ regularly either lmao, i can make a github action to clone my repo, change the recipe with the url, and commit the change although that is a bit too much jank
Luke Skywunker
Luke Skywunker2mo ago
Yeah the url install path is meant for exact urls. We do allow using %OS_VERSION% in the url though I have several scripts setup for my image to pull the latest release of some programs from github since they aren't in the default repos
Mike
Mike2mo ago
I would try using the optfix option, and making sure your script runs after the rpm-ostree module. Based on my experience, I think optfix simply makes the necessary directories and symlinks allowing the install to proceed correctly, but I'm not one of the devs so can't be certain.
Luke Skywunker
Luke Skywunker2mo ago
This is pretty much exactly that
Want results from more Discord servers?
Add your server