TLDR; How can I add an app to my snap that runs a binary on the host?
I have created a snap with some parts and apps. I was able to build it and install it using classic confinement because the snap needs to access sos from the host. Since it is classically confined, I assumed I could add to my snapcraft.yaml
apps:
sos-report:
command: /usr/local/bin/sos report
Where /usr/local/bin/sos
is the binary location on my host. When I try to build with snapcraft
I get the error:
2024-09-24 16:30:50.791 :: 2024-09-24 16:30:49.964 Detailed information: 2024/09/24 16:30:49.954002 container.go:393: in snap "cos-doctor": path "usr/local" does not exist
2024-09-24 16:30:50.791 :: 2024/09/24 16:30:49.955874 container.go:393: in snap "cos-doctor": path "usr" does not exist
2024-09-24 16:30:50.791 :: 2024/09/24 16:30:49.956047 container.go:393: in snap "cos-doctor": path "usr/local/bin/sos" does not exist
2024-09-24 16:30:50.791 :: 2024/09/24 16:30:49.956090 container.go:393: in snap "cos-doctor": path "usr/local/bin" does not exist
How can I add an app to my snap that runs a binary on the host?