AppImage template update

I’ve installed the AnythingLLM appimage on a Fedora 43 template and i would like to have it update with the template through Qubes Update.

I’ve created a bash script to do the update, /etc/qubes/post-install.d/05-anythingllm-update.sh
I can run the script just fine from inside the template through the Qubes update proxy (whonix-gw). However, when run during the template’s Qubes update i get,
curl: (6) Could not resolve host: api.github.com
This happens when the script tries to grab the app version on Github,
curl -fsSL -H "User-Agent: AnythingLLM-Updater" https://api.github.com/repos/mintplex-labs/anything-llm/releases/latest | jq -r '.tag_name // "" | sub("^v"; "")'

How come the update proxy can resolve Github when run from inside the template, but not during the Qubes update?

here’s an example of an update script that works, courtesy of @solene.

#!/bin/sh

# abort if not in a template
if [ "$(qubesdb-read /type)" = "TemplateVM" ]
then
    export all_proxy=http://127.0.0.1:8082/
    flatpak upgrade -y --noninteractive
fi

My first inclination is that you’re missing the proxy…

1 Like

During troubleshooting I did add it to see if it’d make any difference, but it did not. Isn’t Qubes update using it anyway?

EDIT. It also runs fine with from inside the template (with no network connection), using the update proxy (export all_proxy=http://127.0.0.1:8082/).

This may be the same problem I’m having with my flatpak updates. Solene’s script works, but frequently Qubes update fails to even run the script. It’s the first script in /etc/qubes/post-install.d/. So maybe try adding a flag to verify that Qubes update is even running the script at all.

I know it is running it, because i can see the echo curl: (6) error in the Qubes update terminal for the template.

I’m sure someone in this forum should be able to answer my question here.

Why the curl: (6) error during Qubes Update and not when run from inside the template with export all_proxy=http://127.0.0.1:8082/

Any help is appreciated.

Maybe try with the --proxy 127.0.0.1:8082 flag:
curl -fsSL -H "User-Agent: AnythingLLM-Updater" --proxy 127.0.0.1:8082 https://api.github.com/repos/mintplex-labs/anything-llm/releases/latest | jq -r '.tag_name // "" | sub("^v"; "")'

I’ve tried to add it as a flag, like you mentioned, and also export the variable right before running curl. It doesn’t work.

I think it is a DNS issue. It’s probably unable to resolve the hostname to IP.
The thing is, the update proxy woks fine from inside the template!

Any of the developers can shine some light on this?