How do I call one of the apps in my snap in the configure script?
I need to (re)authorize to a Backblaze B2 bucket whenever the user changes their keys, the keys are stored via the snap set/get system so it makes sense the configure script would take care of this.
ah, ping is special … not sure you can overcome this, ping requires to be suid root, but none of the confinement rules will allow that … (you could try to ship ping yourself and call it from inside the $SNAP path but i’m not sure if it will work (snapcraft would strip the suid bit))
Stupid me, I don’t really need ping, I was just looking for the smallest example I could use to illustrate the problem. I would like to us the Backblaze B2 CLI.
I don’t think it’s related to the network access. How do I call an application from the snap in the configure script?
You cannot use snap run from inside a Snap package’s world-view. You should instead use the direct path inside your snap to call b2 directly. e.g. $SNAP/usr/bin/python3 $SNAP/bin/b2
Thank you both. I had 2 issues: one was the missing hooks: authorization in my snapcraft.yaml, the other was trying to use snap run in my configure script.
Off-topic but @ogra and @lucyllewy, I see both of your names in almost every single thread in this forum. Thank you for the countless hours you both undoubtedly spent helping people out.