Where can I download files for dnf module to access? #69
-
|
I am trying to fiddle with Bluefin LTS, which is based on CentOS 10. I've used my recipe for Fedora-based Bluefin, and run into a couple of issues. I need to download some rpm file (because for some reason installing it directly from url doesn't work). Adding repo file downloaded into /tmp works fine. Installing rpm file from /tmp results in following error: Why it doesn't work? Where can I download rpm files for installation? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I'm not sure why this wouldn't work. One thing may be the However, you actually do not need the - type: script
snippets:
- "curl https://codeberg.org/api/packages/yataro/rpm.repo | sed -e 's/gpgcheck=1/gpgcheck=0/' > /etc/yum.repos.d/sourcegit.repo"
- "curl https://bitwarden.com/download/?app=desktop&platform=linux&variant=rpm > /tmp/bitwarden.rpm && dnf5 install -y /tmp/bitwarden.rpm"Here all logic for installing bitwarden and this repository is included in the same place and not separated between module calls. |
Beta Was this translation helpful? Give feedback.
-
|
TWIMC, I moved it all to a separate script: #!/usr/bin/env sh
set -euo pipefail
URL=$(curl -s https://api.github.com/repos/bitwarden/clients/releases | jq -r 'first(.[] | .assets[]? | select(.browser_download_url | endswith(".rpm")) | .browser_download_url)')
if [ -n "$URL" ]; then
echo "Downloading Bitwarden from $URL"
curl -sL -o /tmp/bitwarden-latest.rpm "$URL"
else
echo "--- Could not find Bitwarden RPM URL"
exit 1
fi
dnf install -y /tmp/bitwarden-latest.rpm
rm -f /tmp/bitwarden-latest.rpm |
Beta Was this translation helpful? Give feedback.
I'm not sure why this wouldn't work. One thing may be the
/tmp/being cleared between module calls, but I don't think that's how it should work. @gmpinder can correct me on that. You can also test it by putting another script module after your current one and runningls /tmp/bitwarden.rpm.However, you actually do not need the
dnfmodule here at all. I would suggest refactoring your script module call as