https://blue-build.org/ logo
Can't install package via script?
# questions
v
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 `grep`s the URL and `rpm-ostree install`s the latest rpm package. Logs say:
Copy code
[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.
a
message has been deleted
v
https://github.com/kityr/charoite my repo with the script and recipe and whatever (i commented out the script for now)
e
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:
Copy code
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:
Copy code
sed -i 's|/opt/enpass/Enpass|/usr/lib/opt/enpass/Enpass|g' /usr/share/applications/enpass.desktop
v
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
e
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.
v
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
g
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
e
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.
g
This is pretty much exactly that